Implement "More privacy settings"

Safety Center is enabled, the existing "Privacy" screen will be
different in a few ways:

1. Its title will become "More privacy settings"
2. A few preferences will be hidden
3. A few preferences will be reworded
4. The ordering of a few preferences will change
5. The PRIVACY_SETTINGS intent will now point to Safety Center;
   PRIVACY_ADVANCED_SETTINGS will point to "More privacy settings".

Test: manual
Bug: 222127397
Change-Id: I74faf770babb34f775b2ef572248e550ea683ab3
This commit is contained in:
Jay Thomas Sullivan
2022-05-05 20:56:43 +00:00
parent a571dd9973
commit ecc0a45a98
5 changed files with 181 additions and 40 deletions

View File

@@ -16,6 +16,8 @@
package com.android.settings;
import static android.provider.Settings.ACTION_PRIVACY_SETTINGS;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
@@ -214,7 +216,8 @@ public class Settings extends SettingsActivity {
/** Redirects to SafetyCenter if enabled. */
@VisibleForTesting
public void handleSafetyCenterRedirection() {
if (SafetyCenterManagerWrapper.get().isEnabled(this)) {
if (ACTION_PRIVACY_SETTINGS.equals(getIntent().getAction())
&& SafetyCenterManagerWrapper.get().isEnabled(this)) {
try {
startActivity(new Intent(Intent.ACTION_SAFETY_CENTER));
finish();