Skip to content

Commit

Permalink
Disable the backup feature entirely.
Browse files Browse the repository at this point in the history
Downgrading to targetSdkVersion 22 broke the Play Store upgrade process,
so this is my only remaining option.
  • Loading branch information
pmarks-net committed Jan 18, 2016
1 parent 6428bf1 commit 875c3f2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 48 deletions.
5 changes: 1 addition & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ android {
defaultConfig {
applicationId 'net.pmarks.chromadoze'
minSdkVersion 8
// Not using targetSdkVersion >= 23, because Android 6.0 has a bug which
// effectively runs "bmgr fullbackup net.pmarks.chromadoze" in the middle of
// the night, killing the foreground service.
targetSdkVersion 22
targetSdkVersion 23
}

buildTypes {
Expand Down
15 changes: 8 additions & 7 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.pmarks.chromadoze"
android:versionCode="20"
android:versionName="3.5.3">
android:versionCode="21"
android:versionName="3.5.4">

<uses-permission android:name="android.permission.WAKE_LOCK" />

<!-- Note: When allowBackup is enabled, Android 6.0 will randomly kill the
service after a few hours. The alternative is to stay on
targetSdkVersion 22, but the upgrade/downgrade caused the Play store
to fail with (Error code: -504), So my hands are tied, and disabling
backup is the only solution I can find. -->
<application
android:allowBackup="true"
android:backupAgent="TheBackupAgent"
android:allowBackup="false"
android:icon="@drawable/chromadoze_icon"
android:label="@string/app_name"
android:theme="@style/Theme.ChromaDozeTheme">
Expand All @@ -29,8 +33,5 @@
</receiver>

<service android:name=".NoiseService" />
<meta-data
android:name="com.google.android.backup.api_key"
android:value="AEdPqrEAAAAISXaOEWnqsGHIpO7oONbmE9wULxVx_vswtaPpGA" />
</application>
</manifest>
2 changes: 0 additions & 2 deletions app/src/main/java/net/pmarks/chromadoze/ChromaDoze.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package net.pmarks.chromadoze;

import android.app.backup.BackupManager;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.PorterDuff.Mode;
Expand Down Expand Up @@ -129,7 +128,6 @@ protected void onPause() {
pref.clear();
mUiState.saveState(pref);
pref.commit();
new BackupManager(this).dataChanged();

// Stop receiving progress events.
NoiseService.removePercentListener(this);
Expand Down
35 changes: 0 additions & 35 deletions app/src/main/java/net/pmarks/chromadoze/TheBackupAgent.java

This file was deleted.

0 comments on commit 875c3f2

Please sign in to comment.