Commit Graph

9622 Commits

Author SHA1 Message Date
Sunny Shao
7687e0b17d Use FooterPreference in xml explicitly
Removed the FooterPreferenceMixin from the UserSettings page.

Fixes: 140008560
Test: manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.users
Change-Id: If6da2bd2f6a72d8e61b8c8bca9e3179cfdee05e6
2019-08-26 17:08:31 +08:00
Jayachandran Chinnakkannu
b5617b6f21 Merge "[Settings] hide preferred network mode UI" into qt-r1-dev
am: 7afb9854a7

Change-Id: I561ecbcd376ac4be2003e291f5528130673460fd
2019-08-23 20:36:56 -07:00
Jayachandran Chinnakkannu
15a9d54958 Merge "[Settings] hide preferred network mode UI" into qt-r1-dev
am: 7afb9854a7

Change-Id: I2598b482b4630279d47685381ddac9c746fbe12d
2019-08-23 20:31:09 -07:00
Xin Li
bd8030e8b2 DO NOT MERGE - Merge build QP1A.190711.019 into stage-aosp-master
Bug: 139893257
Change-Id: I54b340294458df6016b7893838e1b0f6e61daf11
2019-08-23 06:45:17 +00:00
Arc Wang
ea15072a94 Merge "[Wi-Fi] Support hidden SSID Wi-Fi networks for Wi-Fi QR code scanner & generator" into qt-qpr1-dev
am: 318be48d07

Change-Id: I6a33141d8e12a3a16d723b506c986eff941956c9
2019-08-22 22:23:57 -07:00
TreeHugger Robot
318be48d07 Merge "[Wi-Fi] Support hidden SSID Wi-Fi networks for Wi-Fi QR code scanner & generator" into qt-qpr1-dev 2019-08-23 05:04:35 +00:00
Goven Liu
765a37f803 Merge "[Wi-Fi NetworkRequest] Don't need to have code to test theme" 2019-08-23 01:42:15 +00:00
Bonian Chen
128de7bdb6 [Settings] hide preferred network mode UI
Hide preferred network mode UI no matter home, roaming or no service
when KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL been enabled.

Bug: 137681413
Test: atest PreferredNetworkModePreferenceControllerTest
      atest EnabledNetworkModePreferenceControllerTest
      Manual with AT&T SIM card in out of servce and in service

Change-Id: Ia0d1333c6cbae3a3717c8db6b77fbb9ea8cec968
2019-08-22 14:36:12 -07:00
SongFerng Wang
26ed731e5e Merge "If the user add APN with empty APN type, map it for default type" into qt-qpr1-dev am: 201fc40816
am: f1a5d8a08a

Change-Id: I239d149303efd378a53ac34525c4a53f5eaed2bc
2019-08-22 03:16:03 -07:00
SongFerng Wang
f1a5d8a08a Merge "If the user add APN with empty APN type, map it for default type" into qt-qpr1-dev
am: 201fc40816

Change-Id: I76ac45fbc93bf01bbc4783fecfd3eed8b9dbb6d2
2019-08-22 03:01:21 -07:00
TreeHugger Robot
04e72e23d9 Merge "[Wi-Fi] Prevent fatal exception for null intent action" 2019-08-22 09:51:01 +00:00
SongFerng Wang
201fc40816 Merge "If the user add APN with empty APN type, map it for default type" into qt-qpr1-dev 2019-08-22 09:49:27 +00:00
Arc Wang
1e451cf708 [Wi-Fi] Prevent fatal exception for null intent action
Intent action may be null.

Bug: 139020487
Test: WifiScanModeActivityTest
      WifiNoInternetDialogTest
      WifiDppConfiguratorActivityTest
      WifiDppEnrolleeActivityTest
Change-Id: Ie6119a86aaee1a6b40710705a0ea7d92c24736d6
2019-08-22 13:42:47 +08:00
andychou
34fc2495d2 If the user add APN with empty APN type, map it for default type
Original behavior will map all APN type if enter empty APN type. But it
sometimes cause problem that MMS or IMS not working when select to this
custom APN. So if the user doesn't enter any APN type, just map to
valure of carrier config 'apn_settings_default_apn_types_string_array'
to avoid all the functions broken.

Bug: 129704611
Test: 1.Enter empty APN type and check if only default is added into
APN. 2.atest ApnEditorTest pass.
Change-Id: Icec274e5b402af06822479bcc60294b347f5254f
2019-08-21 21:20:49 +08:00
govenliu
2b9aaaf943 [Wi-Fi NetworkRequest] Don't need to have code to test theme
Per setting team's suggestion, don't need to test theme, so remove
related code in testing.

Bug: N/A
Test: N/A, Just remove test code.
Change-Id: If0ca632506b554a4471b5d25f07ab27a078de92e
2019-08-21 16:32:50 +08:00
Raff Tsai
64d9bc1351 Fix failed testcase
Fixes: 139505838
Test: robolectric
Change-Id: I553dfe1709fc845708c07c4f3288840b5925f0b3
2019-08-21 13:44:03 +08:00
Goven Liu
fe3548ef41 Merge "[Wi-Fi NetworkRequest] Set theme for the NetworkRequest dialog" into qt-qpr1-dev
am: cfcfb024c4

Change-Id: If72465328b970ce0d8e9d0c69f0a229a528bdbee
2019-08-20 22:36:09 -07:00
Goven Liu
7d6a2dd886 Merge "[Wi-Fi] Hide SoftKeyboard temporary when user tap the advanced button." 2019-08-21 04:27:59 +00:00
govenliu
14a74125e6 [Wi-Fi NetworkRequest] Set theme for the NetworkRequest dialog
We should set the same theme which applied in Settings APP to the NetworkRequestDialog

Bug: 139294487
Test: check if the right theme is applied when launching this activity.
Change-Id: Iefdfd5b810f5cf22c220830e1ee965113a439a3e
Merged-In: Iefdfd5b810f5cf22c220830e1ee965113a439a3e
2019-08-21 12:23:32 +08:00
TreeHugger Robot
785c024cad Merge "[Wi-Fi] Support hidden SSID Wi-Fi networks for Wi-Fi QR code scanner & generator" 2019-08-20 08:37:07 +00:00
Arc Wang
3fff50e3ba [Wi-Fi] Support hidden SSID Wi-Fi networks for Wi-Fi QR code scanner & generator
WifiTracker#getAccessPoints() only contains a hidden SSID Wi-Fi
network if it's a saved Wi-Fi network. We can't check if a hidden
SSID Wi-Fi network is reachable inadvance. That is the difference
after a user scanned a QR code of hidden SSID Wi-Fi network.

Bug: 135892509
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiDppUtilsTest
      manual test:
      Click the Share button of a connected hidden SSID Wi-Fi network
      and save the QR code image. Use Wi-Fi QR code scanner in Wi-Fi
      Settings to scan the saved QR code image.

Change-Id: I9056622e6dadb04e5642ae1c50fb4d227a78d26d
Merged-In: I9056622e6dadb04e5642ae1c50fb4d227a78d26d
2019-08-20 16:15:02 +08:00
govenliu
c3eab6a9d9 [Wi-Fi] Hide SoftKeyboard temporary when user tap the advanced button.
When tapping on the advanced button during configuring a network, some items in the expanded list are covered by IME keyboard, which may cause user to ignore them accidently.

To improve it, hide the IME temporary to let user can see most of them.

Bug: 78441374
Test: Use ShadowInputMethodManager to check if the keyboard is hide or not after tapping on the advance button.
Change-Id: I0677d96febc90c66d1cf6f98555bbb436a654660
2019-08-20 10:55:44 +08:00
govenliu
dbf920cfff [Wi-Fi NetworkRequest] Set theme for the NetworkRequest dialog
We should set the same theme which applied in Settings APP to the NetworkRequestDialog

Bug: 139294487
Test: check if the right theme is applied when launching this activity.
Change-Id: Iefdfd5b810f5cf22c220830e1ee965113a439a3e
2019-08-20 10:26:14 +08:00
Arc Wang
03f1ee1b50 [Wi-Fi] Support hidden SSID Wi-Fi networks for Wi-Fi QR code scanner & generator
WifiTracker#getAccessPoints() only contains a hidden SSID Wi-Fi
network if it's a saved Wi-Fi network. We can't check if a hidden
SSID Wi-Fi network is reachable inadvance. That is the difference
after a user scanned a QR code of hidden SSID Wi-Fi network.

Bug: 135892509
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiDppUtilsTest
      manual test:
      Click the Share button of a connected hidden SSID Wi-Fi network
      and save the QR code image. Use Wi-Fi QR code scanner in Wi-Fi
      Settings to scan the saved QR code image.

Change-Id: I9056622e6dadb04e5642ae1c50fb4d227a78d26d
2019-08-20 09:54:17 +08:00
Raff Tsai
648ada031d Fix Battery page animation
TextView summary1 has default height 2 line. If the content is longer
than 2 line, the TextView increases itself which causes the animation.
By increasing minLines to 3, it can avoid the animation. And remove
summary2 because it is only for debug purpose, the debug information
can be merged to summary1.

Fixes: 139554919
Test: visual, make RunSettingsRoboTests
Change-Id: I167ac87c9bd83035e00d4991961599e76f4f69e1
2019-08-19 16:47:53 +08:00
Arc Wang
a266ec8ffd Merge "[Wi-Fi] Fix multi SIM devices switch to mobile data automatically settings missing problem" into qt-r1-dev am: 54dbed859d
am: 0e53b6293d

Change-Id: I574c161e5cdde8f879031ff403082dddefe0dbb9
2019-08-17 07:27:01 -07:00
Arc Wang
0e53b6293d Merge "[Wi-Fi] Fix multi SIM devices switch to mobile data automatically settings missing problem" into qt-r1-dev
am: 54dbed859d

Change-Id: I0d5071d429dbd82d420e1199bd5baed0b687e2ae
2019-08-17 07:18:03 -07:00
Arc Wang
2394d0821b Merge "[Wi-Fi] Fix multi SIM devices switch to mobile data automatically settings missing problem" into qt-r1-dev
am: 54dbed859d

Change-Id: I19214265a783f092bb183b3341aa1c2116f3188f
2019-08-17 07:17:59 -07:00
Arc Wang
5101624819 Merge "[Wi-Fi] Fix multi SIM devices switch to mobile data automatically settings missing problem" into qt-r1-dev
am: 54dbed859d

Change-Id: I7267b4fe82f6e5e6e6523463eb710049c68e66f9
2019-08-17 07:17:59 -07:00
TreeHugger Robot
79d9e9069b Merge "[Wi-Fi] Check default data SIM instead of all active subscriptions for 'Switch to mobile data automatically' setting" 2019-08-17 02:40:20 +00:00
Arc Wang
91200e610d [Wi-Fi] Fix multi SIM devices switch to mobile data automatically settings missing problem
Context#getResources loading is done based on the last SIM to
come up, we may get wrong customization settings.

This fix check the setting of active subscription and shows the preference.

Bug: 138956509
Test: CellularFallbackPreferenceControllerTest
      manual test:
          1. Insert feature supported SIM and check UI.
          2. Remove feature supported SIM and check UI.
          3. Turn airplane mode on and check 1. and 2..

Change-Id: I72b6db415429181395a02f163889bb1b9c0f070f
Merged-In: I72b6db415429181395a02f163889bb1b9c0f070f
2019-08-17 01:37:21 +00:00
Goven Liu
fb9a140739 Merge "[Wi-Fi HotSpot] Improve Wi-Fi hotspot settings entries visibility problem" 2019-08-16 07:51:50 +00:00
Arc Wang
35b7b6d078 [Wi-Fi] Check default data SIM instead of all active subscriptions for
'Switch to mobile data automatically' setting

To align with framework design.

Bug: 138956509
Test: CellularFallbackPreferenceControllerTest
      manual test:
          1. Insert feature supported SIM and check UI.
          2. Remove feature supported SIM and check UI.
          3. Turn airplane mode on and check 1. and 2..

Change-Id: If10616c9b47fae490521479c5abc99c5df87f409
2019-08-16 04:00:58 +00:00
govenliu
6ee894759a [Wi-Fi HotSpot] Improve Wi-Fi hotspot settings entries visibility problem
When the security type of hotspot changed, the hidden item will showed because of the Expanded child list is set as constant.

To improve it, dynamicall adjust the Expanded child count according to the security type.

Bug: 138594907
Test: Manually
      1. Enter Settings APP -> Network & internet -> Hotspot & tethering
      ->Wi-Fi hotspot
      2. Check if there are only two expanded items if the
      Security type is None, or three expaned items if the Security type
      is WPA2-personal
      3. Change the Security type and back to check item 2 match or not.

Change-Id: I84d1c5dca94d6a218cfc7ecd57e201e1cffdd878
2019-08-15 19:07:22 +08:00
TreeHugger Robot
5c4f9b3748 Merge "Use FooterPreference in xml explicitly" 2019-08-14 05:12:33 +00:00
Arc Wang
05381bf009 Merge "[Wi-Fi] Fix multi SIM devices switch to mobile data automatically settings missing problem" 2019-08-14 01:44:18 +00:00
Arc Wang
fe9a794eaf [Wi-Fi] Fix multi SIM devices switch to mobile data automatically settings missing problem
Context#getResources loading is done based on the last SIM to
come up, we may get wrong customization settings.

This fix check all active subscriptions and shows the preference
when there is one SIM applies.

Bug: 138956509
Test: CellularFallbackPreferenceControllerTest
      manual test:
          1. Insert feature supported SIM and check UI.
          2. Remove feature supported SIM and check UI.
          3. Turn airplane mode on and check 1. and 2..

Change-Id: I72b6db415429181395a02f163889bb1b9c0f070f
2019-08-13 13:03:19 +00:00
Sunny Shao
1bebe19101 Use FooterPreference in xml explicitly
Removed the FooterPreferenceMixin from the ChooseLockGeneric page.

Fixes: 139269907
Test: manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.password
Change-Id: I86e294015354c0a6a6311441892a770503382d1f
2019-08-13 20:08:54 +08:00
TreeHugger Robot
66ca4bbd75 Merge "Fix flaky test error" 2019-08-13 11:19:30 +00:00
TreeHugger Robot
4f9595a88d Merge "Make Bluetooth settings page can be discoverable" 2019-08-13 09:57:39 +00:00
hughchen
2353dd54b8 Fix flaky test error
Use mac address to check preference whether is equal instead of use
preference.

Bug: 138547532
Test: make -j42 RunSettingsRoboTests
Change-Id: Iffbbdf063e78a3bf40e74d798ef4dd3a439f8677
2019-08-13 11:26:02 +08:00
hughchen
a0b167e3da Make Bluetooth settings page can be discoverable
Bug: 118760361
Test: make -j42 RunSettingsRoboTests
Change-Id: I2f663197f3c0f6c58529609845bab4dd7e714348
2019-08-13 10:41:34 +08:00
Yi Jiang
943e7b34e8 Merge "Don't show suggestion slice if 'Screen attention' is already on" into qt-qpr1-dev
am: 7933af0273

Change-Id: Ibb750cc10763ade05e3f611a22e602ea3ebe7d5e
2019-08-12 18:41:16 -07:00
Yi Jiang
7933af0273 Merge "Don't show suggestion slice if 'Screen attention' is already on" into qt-qpr1-dev 2019-08-13 01:28:31 +00:00
Goven Liu
2961394f98 Merge "[Wi-Fi] Add a new fragment for configuring a new AccessPoint network." 2019-08-12 06:31:15 +00:00
govenliu
8d6e5d14cb [Wi-Fi] Add a new fragment for configuring a new AccessPoint network.
When configuring a new access point in Wi-Fi settings page, it's hard to figure out there are some other option items after you tapping the "Advanced options" button.

To improve it, use full screen fragment to present the configuration items, so user can see as many items as possible.

Bug: 31052996
Test: Mock this fragment and check each button status run as expected.
Change-Id: I1c8e552fcabb1414bb500d918ed61287bf4aece2
2019-08-10 21:01:01 +08:00
Sunny Shao
01d6f05f53 Use Builder to replace the Uitls.addFooterPreference
Fixes: 139163212
Test: manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.bluetooth
Change-Id: I223e4a234d07e5b95ebb9478f0888a4828e8e64d
2019-08-09 17:03:12 +08:00
Sunny Shao
7e866b670e Use Builder to replace the Uitls.addFooterPreference
Fixes: 139163212
Test: manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.bluetooth
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.accounts
Change-Id: I861434b81c07db785e6f1cfb3e34871ffba41e5f
2019-08-09 11:42:04 +08:00
TreeHugger Robot
fa9e685fff Merge "Use FooterPreference in xml explicitly" 2019-08-09 00:25:22 +00:00
Sunny Shao
660b36e061 Use FooterPreference in xml explicitly
- Removed the FooterPreferenceMixin from the BluetoothDetailsMacAddressController.
 - Added the common api addFooterPreference.

Fixes: 139104386
Test: manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.bluetooth
Change-Id: Iab40fa4c5be674290b1dc6d372c84609ccc2ea49
2019-08-08 18:42:26 +08:00