Add PRIVACY_SETTINGS intent to privacy, not backup, page.
Bug: 123878762 Test: updated backupSettingsHelper Change-Id: I53632e4eeb5fa42447aa5fc075be69eeb68cdd52
This commit is contained in:
@@ -1235,10 +1235,6 @@
|
||||
android:icon="@drawable/ic_settings_backup"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:parentActivityName="Settings">
|
||||
<intent-filter>
|
||||
<action android:name="android.settings.PRIVACY_SETTINGS" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
@@ -1250,6 +1246,17 @@
|
||||
android:value="true" />
|
||||
</activity>
|
||||
|
||||
<activity android:name="Settings$PrivacyDashboardActivity"
|
||||
android:label="@string/privacy_dashboard_title"
|
||||
android:icon="@drawable/ic_settings_privacy">
|
||||
<intent-filter>
|
||||
<action android:name="android.settings.PRIVACY_SETTINGS" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
|
||||
android:value="com.android.settings.privacy.PrivacyDashboardFragment" />
|
||||
</activity>
|
||||
|
||||
<activity android:name="SetFullBackupPassword"
|
||||
android:label="@string/local_backup_password_title"
|
||||
android:exported="false" />
|
||||
|
@@ -71,6 +71,7 @@ public class Settings extends SettingsActivity {
|
||||
public static class AppUsageAccessSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class LocationSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class ScanningSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class PrivacyDashboardActivity extends SettingsActivity { /* empty */ }
|
||||
public static class PrivacySettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class FactoryResetActivity extends SettingsActivity { /* empty */ }
|
||||
public static class RunningServicesActivity extends SettingsActivity { /* empty */ }
|
||||
|
@@ -274,6 +274,7 @@ public class SettingsGateway {
|
||||
Settings.StorageDashboardActivity.class.getName(),
|
||||
Settings.PowerUsageSummaryActivity.class.getName(),
|
||||
Settings.AccountDashboardActivity.class.getName(),
|
||||
Settings.PrivacySettingsActivity.class.getName(),
|
||||
Settings.SecurityDashboardActivity.class.getName(),
|
||||
Settings.AccessibilitySettingsActivity.class.getName(),
|
||||
Settings.SystemDashboardActivity.class.getName(),
|
||||
|
@@ -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";
|
||||
|
Reference in New Issue
Block a user