Mark ab/6881855 as merged am: 8443c456c0 am: ce3966dab2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/providers/CallLogProvider/+/13112890
Change-Id: Iee710a5e2391ca5b650c0b905ed7d8c04f826a98
diff --git a/src/com/android/calllogbackup/CallLogBackupAgent.java b/src/com/android/calllogbackup/CallLogBackupAgent.java
index d589708..02b7839 100644
--- a/src/com/android/calllogbackup/CallLogBackupAgent.java
+++ b/src/com/android/calllogbackup/CallLogBackupAgent.java
@@ -105,8 +105,6 @@
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 = 1008;
@@ -148,14 +146,6 @@
@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()));
@@ -598,12 +588,6 @@
}
}
- 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 @@
@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();
}
}