Adding more action filters and map them to cooresponding fragment
Bug: 73470808
Test: tested on head unit
Change-Id: I9b8263f5b5d355b653925430457465734f20642b
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 4fd10ea..3331365 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -81,6 +81,7 @@
<!-- Handles wifi related intent -->
<intent-filter android:priority="1">
<action android:name="android.settings.WIFI_SETTINGS" />
+ <action android:name="android.settings.WIRELESS_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
@@ -89,6 +90,39 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
+ <intent-filter android:priority="1">
+ <action android:name="android.settings.USER_SETTINGS" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+
+ <intent-filter android:priority="1">
+ <action android:name="android.settings.BLUETOOTH_SETTINGS" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+
+ <intent-filter android:priority="1">
+ <action android:name="android.settings.DATE_SETTINGS" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+
+ <intent-filter android:priority="1">
+ <action android:name="android.settings.SOUND_SETTINGS" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+
+ <intent-filter android:priority="1">
+ <action android:name="android.settings.DISPLAY_SETTINGS" />
+ <action android:name="android.settings.NIGHT_DISPLAY_SETTINGS" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+
+ <intent-filter android:priority="1">
+ <action android:name="android.settings.APPLICATION_SETTINGS" />
+ <action android:name="android.settings.MANAGE_APPLICATIONS_SETTINGS" />
+ <action android:name="android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+
<intent-filter android:priority="100">
<action android:name="android.settings.LOCATION_SOURCE_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
@@ -123,6 +157,7 @@
android:configChanges="orientation|keyboardHidden|screenSize">
<intent-filter>
<action android:name="android.car.settings.ADD_ACCOUNT_SETTINGS" />
+ <action android:name="android.settings.ADD_ACCOUNT_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
diff --git a/src/com/android/car/settings/common/FragmentResolver.java b/src/com/android/car/settings/common/FragmentResolver.java
index d02cd06..f79437b 100644
--- a/src/com/android/car/settings/common/FragmentResolver.java
+++ b/src/com/android/car/settings/common/FragmentResolver.java
@@ -20,7 +20,13 @@
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
+import com.android.car.settings.applications.ApplicationsSettingsFragment;
+import com.android.car.settings.bluetooth.BluetoothSettingsFragment;
+import com.android.car.settings.datetime.DatetimeSettingsFragment;
+import com.android.car.settings.display.DisplaySettingsFragment;
import com.android.car.settings.location.LocationSettingsFragment;
+import com.android.car.settings.sound.SoundSettingsFragment;
+import com.android.car.settings.users.UsersListFragment;
import com.android.car.settings.wifi.WifiSettingsFragment;
@@ -38,9 +44,33 @@
switch (action) {
case Settings.ACTION_LOCATION_SOURCE_SETTINGS:
return new LocationSettingsFragment();
+
case android.net.wifi.WifiManager.ACTION_PICK_WIFI_NETWORK:
case Settings.ACTION_WIFI_SETTINGS:
+ case Settings.ACTION_WIRELESS_SETTINGS:
return new WifiSettingsFragment();
+
+ case Settings.ACTION_USER_SETTINGS:
+ case Settings.ACTION_SECURITY_SETTINGS:
+ return new UsersListFragment();
+
+ case Settings.ACTION_BLUETOOTH_SETTINGS:
+ return new BluetoothSettingsFragment();
+
+ case Settings.ACTION_DATE_SETTINGS:
+ return new DatetimeSettingsFragment();
+
+ case Settings.ACTION_SOUND_SETTINGS:
+ return new SoundSettingsFragment();
+
+ case Settings.ACTION_DISPLAY_SETTINGS:
+ case Settings.ACTION_NIGHT_DISPLAY_SETTINGS:
+ return new DisplaySettingsFragment();
+
+ case Settings.ACTION_APPLICATION_SETTINGS:
+ case Settings.ACTION_MANAGE_APPLICATIONS_SETTINGS:
+ case Settings.ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS:
+ return new ApplicationsSettingsFragment();
default:
return null;
}