Add PRIVACY_SETTINGS intent to privacy, not backup, page.

Bug: 123878762
Test: updated backupSettingsHelper
Change-Id: I53632e4eeb5fa42447aa5fc075be69eeb68cdd52
This commit is contained in:
Fan Zhang
2019-02-06 10:37:03 -08:00
parent 2f13aa55d6
commit 11482d220f
4 changed files with 14 additions and 20 deletions

View File

@@ -31,16 +31,13 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.UserInfo;
import android.content.res.Resources;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.UserHandle;
import android.os.UserManager;
import com.android.settings.R;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -57,8 +54,6 @@ import org.robolectric.shadows.ShadowUserManager;
@RunWith(RobolectricTestRunner.class)
@Config(shadows = BackupSettingsHelperTest.ShadowBackupManagerStub.class)
public class BackupSettingsHelperTest {
private static final String DEFAULT_SETTINGS_CLASSNAME =
"com.android.settings.Settings$PrivacySettingsActivity";
private static final int DEFAULT_SUMMARY_RESOURCE =
R.string.backup_configure_account_default_summary;
@@ -294,16 +289,6 @@ public class BackupSettingsHelperTest {
assertThat(backupIntent).isEqualTo(intent);
}
@Test
public void testGetIntentForBackupSettings_WithoutIntentFromTransport() throws Exception {
when(mBackupManager.getDataManagementIntent(anyString())).thenReturn(null);
Intent backupIntent = mBackupSettingsHelper.getIntentForBackupSettings();
assertThat(backupIntent.getComponent().getClassName())
.isEqualTo(DEFAULT_SETTINGS_CLASSNAME);
}
@Test
public void testGetLabelForBackupSettings_WithLabelFromTransport() throws Exception {
String label = "test_label";