diff options
| author | Al Sutton <alsutton@google.com> | 2020-05-29 09:10:47 +0100 |
|---|---|---|
| committer | Al Sutton <alsutton@google.com> | 2020-05-30 07:13:54 +0000 |
| commit | 0870269308c385e2960131c9faec4e89e6b62d23 (patch) | |
| tree | f511d2a92fb1d0e60b01528cec19d0b61813ca13 | |
| parent | edfb6642908ea37c9876459bd38b4aa5c1fa320f (diff) | |
| download | platform_packages_providers_CallLogProvider-0870269308c385e2960131c9faec4e89e6b62d23.tar.gz platform_packages_providers_CallLogProvider-0870269308c385e2960131c9faec4e89e6b62d23.tar.bz2 platform_packages_providers_CallLogProvider-0870269308c385e2960131c9faec4e89e6b62d23.zip | |
Remove check which was for L -> M updates
This check was for L->M updates (see b/24783945). For this to still
be useful devices would have needed to go from L->R which we are
unaware of any devices going through 6 Android OS major updates and
so we can assume this test is no longer useful.
Test: atest CallLogBackupTest
Fixes: 33553552
Change-Id: I9bfe4e28e79bb8710ba45fddc75e4fd3c01e9f5f
| -rw-r--r-- | src/com/android/calllogbackup/CallLogBackupAgent.java | 16 | ||||
| -rw-r--r-- | src/com/android/calllogbackup/CallLogChangeReceiver.java | 12 |
2 files changed, 2 insertions, 26 deletions
diff --git a/src/com/android/calllogbackup/CallLogBackupAgent.java b/src/com/android/calllogbackup/CallLogBackupAgent.java index ca0613b..58a72e2 100644 --- a/src/com/android/calllogbackup/CallLogBackupAgent.java +++ b/src/com/android/calllogbackup/CallLogBackupAgent.java @@ -102,8 +102,6 @@ public class CallLogBackupAgent extends BackupAgent { private static final String TAG = "CallLogBackupAgent"; - private static final String USER_FULL_DATA_BACKUP_AWARE = "user_full_data_backup_aware"; - /** Current version of CallLogBackup. Used to track the backup format. */ @VisibleForTesting static final int VERSION = 1007; @@ -144,14 +142,6 @@ public class CallLogBackupAgent extends BackupAgent { @Override public void onBackup(ParcelFileDescriptor oldStateDescriptor, BackupDataOutput data, ParcelFileDescriptor newStateDescriptor) throws IOException { - - if (shouldPreventBackup(this)) { - if (isDebug()) { - Log.d(TAG, "Skipping onBackup"); - } - return; - } - // Get the list of the previous calls IDs which were backed up. DataInputStream dataInput = new DataInputStream( new FileInputStream(oldStateDescriptor.getFileDescriptor())); @@ -586,12 +576,6 @@ public class CallLogBackupAgent extends BackupAgent { } } - static boolean shouldPreventBackup(Context context) { - // Check to see that the user is full-data aware before performing calllog backup. - return Settings.Secure.getInt( - context.getContentResolver(), USER_FULL_DATA_BACKUP_AWARE, 0) == 0; - } - private static boolean isDebug() { return Log.isLoggable(TAG, Log.DEBUG); } diff --git a/src/com/android/calllogbackup/CallLogChangeReceiver.java b/src/com/android/calllogbackup/CallLogChangeReceiver.java index faede1f..b9339cc 100644 --- a/src/com/android/calllogbackup/CallLogChangeReceiver.java +++ b/src/com/android/calllogbackup/CallLogChangeReceiver.java @@ -37,16 +37,8 @@ public class CallLogChangeReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { if (ACTION_CALL_LOG_CHANGE.equals(intent.getAction())) { - - if (CallLogBackupAgent.shouldPreventBackup(context)) { - // User is not full-backup-data aware so we skip calllog backup until they are. - if (VDBG) { - Log.v(TAG, "Skipping call log backup due to lack of full-data check."); - } - } else { - BackupManager bm = new BackupManager(context); - bm.dataChanged(); - } + BackupManager bm = new BackupManager(context); + bm.dataChanged(); } } |
