Merge "Revert "Add feature flag for "no data" backup calls""
This commit is contained in:
@@ -45,9 +45,6 @@ public class FeatureFlagUtils {
|
||||
public static final String NOTIF_CONVO_BYPASS_SHORTCUT_REQ =
|
||||
"settings_notif_convo_bypass_shortcut_req";
|
||||
/** @hide */
|
||||
public static final String BACKUP_NO_KV_DATA_CHANGE_CALLS =
|
||||
"backup_enable_no_data_notification_calls";
|
||||
/** @hide */
|
||||
public static final String SETTINGS_DO_NOT_RESTORE_PRESERVED =
|
||||
"settings_do_not_restore_preserved";
|
||||
/** @hide */
|
||||
@@ -70,9 +67,6 @@ public class FeatureFlagUtils {
|
||||
DEFAULT_FLAGS.put("settings_controller_loading_enhancement", "false");
|
||||
DEFAULT_FLAGS.put("settings_conditionals", "false");
|
||||
DEFAULT_FLAGS.put(NOTIF_CONVO_BYPASS_SHORTCUT_REQ, "true");
|
||||
|
||||
// Disabled until backup transports support it.
|
||||
DEFAULT_FLAGS.put(BACKUP_NO_KV_DATA_CHANGE_CALLS, "false");
|
||||
// Disabled by default until b/148278926 is resolved. This flags guards a feature
|
||||
// introduced in R and will be removed in the next release (b/148367230).
|
||||
DEFAULT_FLAGS.put(SETTINGS_DO_NOT_RESTORE_PRESERVED, "false");
|
||||
|
||||
@@ -47,7 +47,6 @@ import android.os.RemoteException;
|
||||
import android.os.SELinux;
|
||||
import android.os.UserHandle;
|
||||
import android.os.WorkSource;
|
||||
import android.util.FeatureFlagUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.internal.annotations.GuardedBy;
|
||||
@@ -400,12 +399,6 @@ public class KeyValueBackupTask implements BackupRestoreTask, Runnable {
|
||||
* the transport have no data.
|
||||
*/
|
||||
private void informTransportOfUnchangedApps(Set<String> appsBackedUp) {
|
||||
// If the feautre is not enabled then we just exit early.
|
||||
if (!FeatureFlagUtils.isEnabled(mBackupManagerService.getContext(),
|
||||
FeatureFlagUtils.BACKUP_NO_KV_DATA_CHANGE_CALLS)) {
|
||||
return;
|
||||
}
|
||||
|
||||
String[] succeedingPackages = getSucceedingPackages();
|
||||
if (succeedingPackages == null) {
|
||||
// Nothing is succeeding, so end early.
|
||||
|
||||
@@ -96,7 +96,6 @@ import android.os.Message;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.os.RemoteException;
|
||||
import android.platform.test.annotations.Presubmit;
|
||||
import android.util.FeatureFlagUtils;
|
||||
import android.util.Pair;
|
||||
|
||||
import com.android.internal.backup.IBackupTransport;
|
||||
@@ -259,9 +258,6 @@ public class KeyValueBackupTaskTest {
|
||||
public void tearDown() throws Exception {
|
||||
ShadowBackupDataInput.reset();
|
||||
ShadowApplicationPackageManager.reset();
|
||||
// False by default.
|
||||
FeatureFlagUtils.setEnabled(
|
||||
mContext, FeatureFlagUtils.BACKUP_NO_KV_DATA_CHANGE_CALLS, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -2348,9 +2344,6 @@ public class KeyValueBackupTaskTest {
|
||||
@Test
|
||||
public void testRunTask_whenNoDataToBackupOnFirstBackup_doesNotTellTransportOfBackup()
|
||||
throws Exception {
|
||||
FeatureFlagUtils.setEnabled(
|
||||
mContext, FeatureFlagUtils.BACKUP_NO_KV_DATA_CHANGE_CALLS, true);
|
||||
|
||||
TransportMock transportMock = setUpInitializedTransport(mTransport);
|
||||
mBackupManagerService.setCurrentToken(0L);
|
||||
when(transportMock.transport.getCurrentRestoreSet()).thenReturn(1234L);
|
||||
@@ -2368,9 +2361,6 @@ public class KeyValueBackupTaskTest {
|
||||
@Test
|
||||
public void testRunTask_whenBackupHasCompletedAndThenNoDataChanges_transportGetsNotified()
|
||||
throws Exception {
|
||||
FeatureFlagUtils.setEnabled(
|
||||
mContext, FeatureFlagUtils.BACKUP_NO_KV_DATA_CHANGE_CALLS, true);
|
||||
|
||||
TransportMock transportMock = setUpInitializedTransport(mTransport);
|
||||
when(transportMock.transport.getCurrentRestoreSet()).thenReturn(1234L);
|
||||
when(transportMock.transport.isAppEligibleForBackup(
|
||||
|
||||
Reference in New Issue
Block a user