Add a wrapper Activity to launch scanning settings
GmsCore needs to start scanning settings from notification
Bug: 77823544
Test: adb shell am start -a android.settings.LOCATION_SCANNING_SETTINGS
Change-Id: Iecf1f811983068b29aa06a9985c83a5a1fb11a2a
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index fc49e02..e87951b 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1301,6 +1301,22 @@
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
</activity>
+ <activity
+ android:name="Settings$ScanningSettingsActivity"
+ android:label="@string/location_scanning_screen_title"
+ android:icon="@drawable/ic_settings_location"
+ android:configChanges="orientation|keyboardHidden|screenSize"
+ android:taskAffinity="com.android.settings"
+ android:parentActivityName="Settings">
+ <intent-filter android:priority="1">
+ <action android:name="android.settings.LOCATION_SCANNING_SETTINGS" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+ android:value="com.android.settings.location.ScanningSettings" />
+ <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+ android:value="true" />
+ </activity>
<activity
android:name=".Settings$SecurityDashboardActivity"
diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java
index e3fcd5c..e5df27a 100644
--- a/src/com/android/settings/Settings.java
+++ b/src/com/android/settings/Settings.java
@@ -67,6 +67,7 @@
public static class SecurityDashboardActivity extends SettingsActivity { /* empty */ }
public static class UsageAccessSettingsActivity extends SettingsActivity { /* empty */ }
public static class LocationSettingsActivity extends SettingsActivity { /* empty */ }
+ public static class ScanningSettingsActivity extends SettingsActivity { /* empty */ }
public static class PrivacySettingsActivity extends SettingsActivity { /* empty */ }
public static class FactoryResetActivity extends SettingsActivity { /* empty */ }
public static class RunningServicesActivity extends SettingsActivity { /* empty */ }
diff --git a/src/com/android/settings/core/gateway/SettingsGateway.java b/src/com/android/settings/core/gateway/SettingsGateway.java
index ede23dc..aa9d7b5 100644
--- a/src/com/android/settings/core/gateway/SettingsGateway.java
+++ b/src/com/android/settings/core/gateway/SettingsGateway.java
@@ -91,6 +91,7 @@
import com.android.settings.language.LanguageAndInputSettings;
import com.android.settings.localepicker.LocaleListEditor;
import com.android.settings.location.LocationSettings;
+import com.android.settings.location.ScanningSettings;
import com.android.settings.network.ApnEditor;
import com.android.settings.network.ApnSettings;
import com.android.settings.network.NetworkDashboardFragment;
@@ -166,6 +167,7 @@
ProcessStatsUi.class.getName(),
NotificationStation.class.getName(),
LocationSettings.class.getName(),
+ ScanningSettings.class.getName(),
SecuritySettings.class.getName(),
UsageAccessDetails.class.getName(),
PrivacySettings.class.getName(),