Merge sc-dev-plus-aosp-without-vendor@7634622
Merged-In: I9a5853741a07261d954816e170e6db90b1f9a573
Change-Id: If1994d3809629429ecb684d6f58b2cbd28fddd22
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 69001e3..e3f43a1 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -4,6 +4,7 @@
android:sharedUserLabel="@string/sharedUserLabel">
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
+ <uses-permission android:name="com.android.voicemail.permission.READ_VOICEMAIL" />
<application android:label="@string/app_label"
android:allowBackup="true"
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();
}
}