Device do network scan after user rotates NetworkSelection page
Add the networkSelectSettings fragment into new activity, and set
the activity's android:configChanges as
"orientation|keyboard|keyboardHidden|screenSize|screenLayout
|smallestScreenSize".
Bug: 204039043
Test: atest AutoSelectPreferenceControllerTest (pass)
atest OpenNetworkSelectPagePreferenceControllerTest (pass)
atest NetworkSelectSettingsTest (pass)
Change-Id: Ic933c2294401bc50e105ddcfd2a17886d0bbefc3
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index a471504..a41c89a 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -234,6 +234,11 @@
android:exported="true"
android:launchMode="singleTask"
android:configChanges="orientation|screenSize|keyboardHidden">
+ <!-- Note: Since the framework does not support the multiple requests of network scan
+ from the UI, this singleTask can protect that there is only one
+ Settings$NetworkSelectActivity which can request the network scan.
+ If removing the "singleTask" in the future, please also modify the
+ Settings$NetworkSelectActivity's structure. -->
<intent-filter android:priority="1">
<!-- Displays the MobileNetworkActivity and opt-in dialog for capability discovery. -->
<action android:name="android.telephony.ims.action.SHOW_CAPABILITY_DISCOVERY_OPT_IN" />
@@ -346,6 +351,16 @@
</activity>
<activity
+ android:name="Settings$NetworkSelectActivity"
+ android:label="@string/choose_network_title"
+ android:configChanges="orientation|keyboard|keyboardHidden|screenSize|screenLayout|smallestScreenSize">
+ <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+ android:value="com.android.settings.network.telephony.NetworkSelectSettings" />
+ <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+ android:value="true" />
+ </activity>
+
+ <activity
android:name="Settings$WifiDetailsSettingsActivity"
android:label="@string/wifi_details_title"
android:icon="@drawable/ic_homepage_network"