Commit Graph

12573 Commits

Author SHA1 Message Date
Yi-Ling Chuang
c248da2974 [DO NOT MERGE] Pre-allocate height for contextual cards. am: 228bc78bf9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12343231

Change-Id: I76c77c66be5da635571f876d9b76906f789e8472
2020-08-15 02:08:57 +00:00
Yi-Ling Chuang
631465df31 [DO NOT MERGE] Pre-allocate height for contextual cards. am: 228bc78bf9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12343231

Change-Id: Iefb77041715dba0cc2a19210e1353f935e25a8a8
2020-08-15 02:08:53 +00:00
Jason Chiu
4113bf12d0 [DO NOT MERGE] Update contextual cards display mechanism am: b824187524
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12343226

Change-Id: Iaf3bcd4f531d7a82aa78c5eba12b44192e3b7df8
2020-08-15 02:08:43 +00:00
Jason Chiu
68173c1343 [DO NOT MERGE] Update contextual cards display mechanism am: b824187524
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12343226

Change-Id: Ia3f637ea89d7209cfdbc1a97238e4bfb6d66d77f
2020-08-15 02:08:34 +00:00
Peiyong Lin
9511d443cb Rename game driver to updatable driver.
Game driver is considered a production name. We should use the term
updatable driver instead of the production name.

Bug: b/164449016
Test: make RunSettingsRoboTests ROBOTEST_FILTER=GraphicsDriver
Change-Id: I2237dfb22ecd94bc2475249b1460796ac1693d81
2020-08-14 16:29:03 -07:00
Lyn Han
354e25c125 Merge "Hide conversation bubble switch if app bubbles are off" 2020-08-14 20:18:57 +00:00
Lyn Han
9af95dae7d Hide conversation bubble switch if app bubbles are off
Fixes: 159340745

Test: BubblePreferenceControllerTest

Test: priority conversation bubble
=> app bubbles OFF => toggle hidden
=> selected bubbles ON => toggle checked
=> app bubbles ON => toggle checked

Test: default/silent conversation bubble
=> app bubbles OFF => toggle hidden
=> selected bubbles ON => toggle NOT checked
=> app bubbles ON => toggle NOT checked

Change-Id: Ia5759c2a06c1da4d84b3dafed95e52c3aa30ad56
2020-08-14 20:18:26 +00:00
Bonian Chen
6f5e9d1ee2 Merge "[Settings] Grant permissions to submit junit test" am: 33e4971820 am: af57413abc am: 45cc4bbe61 am: 454bcb012e am: a716d48ffc
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1398398

Change-Id: I41e6a4e0604d9fe051fdb8168287c53a8da763c8
2020-08-14 09:13:01 +00:00
Bonian Chen
a716d48ffc Merge "[Settings] Grant permissions to submit junit test" am: 33e4971820 am: af57413abc am: 45cc4bbe61 am: 454bcb012e
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1398398

Change-Id: I2cdf575a7aeb63c28508578588ad36c8154428df
2020-08-14 08:56:55 +00:00
Bonian Chen
454bcb012e Merge "[Settings] Grant permissions to submit junit test" am: 33e4971820 am: af57413abc am: 45cc4bbe61
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1398398

Change-Id: I65d1b2561a86542bd1cccd95f0e69b6b4ee594fe
2020-08-14 08:41:51 +00:00
Bonian Chen
45cc4bbe61 Merge "[Settings] Grant permissions to submit junit test" am: 33e4971820 am: af57413abc
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1398398

Change-Id: I1e5921c9a4cc5b223d0ee61eae2cac7afaa19e2a
2020-08-14 08:20:48 +00:00
Bonian Chen
33e4971820 Merge "[Settings] Grant permissions to submit junit test" 2020-08-14 07:45:50 +00:00
Jeffrey Carlyle
7a7a55c1a4 Merge "Add BatteryStatusFeatureProvider" into rvc-qpr-dev am: d553d434cd
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12153212

Change-Id: I36bc3699d0af28ad40e52fd11946ae3222eb90a4
2020-08-14 03:03:20 +00:00
Jeffrey Carlyle
d553d434cd Merge "Add BatteryStatusFeatureProvider" into rvc-qpr-dev 2020-08-14 02:32:05 +00:00
Beth Thibodeau
c414527e07 Merge "Allow user to block individual apps from resuming" 2020-08-13 17:00:55 +00:00
Beth Thibodeau
f01cce88fc Allow user to block individual apps from resuming
This adds a new section to the media controls settings screen with a
list of apps that could potentially be used for resumption. If an app is
toggled off it will be added to a list of apps which will not persist in
QS, even when resumption is on.

Also updated the strings on this setting page to match UX
recommendation, so the default toggle state is now on.

Bug: 161813143
Bug: 159852516
Test: manual
Test: atest SettingsProviderTests
Test: make -j40 RunSettingsRoboTests ROBOTEST_FILTER="ResumableMedia"
Change-Id: Id3de52419ffba233469396dd47439428201e5e00
2020-08-13 09:46:27 -04:00
Betty Chang
18c9d1db3f Merge "[Testing] Use AndroidJUnit4 instead in GlobalSettingsChangeListenerTest" 2020-08-13 13:19:59 +00:00
TreeHugger Robot
be6d42ebbd Merge "Add AirplaneModePreferenceControllerTest at Androidx.Test" 2020-08-13 12:17:11 +00:00
Bonian Chen
1c97e70641 [Settings] Grant permissions to submit junit test
Grant permissions for adding new Junit test case.

Change-Id: Iabde2307669815fd50cdba241492c82b9e2cf64d
2020-08-13 18:49:31 +08:00
changbetty
7f94b4dbb9 [Testing] Use AndroidJUnit4 instead in GlobalSettingsChangeListenerTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Add new TestListener for spy GlobalSettingsChangeListener

Bug: 163299183
Test: atest -c GlobalSettingsChangeListenerTest
Change-Id: I0290470d3d3b235e0069ecbb9c1ce87a705d71d1
2020-08-13 18:24:49 +08:00
Jason Chiu
b824187524 [DO NOT MERGE] Update contextual cards display mechanism
1. Make Wi-Fi card default to collapse.
2. Support showing a default card when there's no displayable card.
3. Solve the problem of icon not showing for cached slices in card
renderer

Bug: 163288869
Fixes: 159092915
Test: manual, robotest
Change-Id: Ie8b61ad58410337334e29b7a794353b0c6a6ba8c
2020-08-13 17:58:55 +08:00
SongFerngWang
4ba7007aba Add AirplaneModePreferenceControllerTest at Androidx.Test
Bug: 161875909
Test: atest AirplaneModePreferenceControllerTest (PASS)
Change-Id: Id1c50824fa420d958fcc45f80aba30a360c40b94
2020-08-13 17:32:13 +08:00
Arc Wang
8df77fd7a3 Merge "[Wi-Fi] Fix crash after editing invalid hotspot password" into rvc-qpr-dev am: b6a9493804
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12355969

Change-Id: Ibe5882d260907654e8c8891a4e65fb73e9e39730
2020-08-13 09:06:17 +00:00
Jackal Guo
765fb8293d Revert "[Settings] Refactor PhoneStateListener"
This reverts commit e01df59027.

Reason for revert: b/163995409 | Build failure.

Change-Id: Ia413a4bae93055ceca5b6aa85602c84a8fbe5424
2020-08-13 08:48:31 +00:00
Bonian Chen
e01df59027 [Settings] Refactor PhoneStateListener
Remove Looper and update of mSubId

Bug: 144542981
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=Enhanced4gBasePreferenceControllerTest
make RunSettingsRoboTests -j ROBOTEST_FILTER=VideoCallingPreferenceControllerTest
make RunSettingsRoboTests -j ROBOTEST_FILTER=WifiCallingPreferenceControllerTest

Merged-In: Ie6ae5b5914322644f2655e585b03a6b685bbc84a
Change-Id: I5306b3a80220c02d2de1b25f20e8ef7f845e9a09
2020-08-13 13:02:04 +08:00
Arc Wang
e86a292990 Merge "[Wi-Fi] Fix crash after editing invalid hotspot password" 2020-08-13 03:03:07 +00:00
Bonian Chen
5560882548 [Settings] Replace getSimCount() API
Change design of monitor change in Settings.Global.MOBILE_DATA and
Settings.Global.DATA_ROAMING in order to avoid from accessing
getSimCount().

Bug: 144251589
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=RoamingPreferenceControllerTest
make RunSettingsRoboTests -j ROBOTEST_FILTER=VideoCallingPreferenceControllerTest

Merged-In: I965a0c07c7c9ef5897b33809bae6a7921977db18
Change-Id: I8010f74c41826b081aa9f599d33a9519a1888215
2020-08-13 10:56:55 +08:00
Yi-Ling Chuang
228bc78bf9 [DO NOT MERGE] Pre-allocate height for contextual cards.
To prevent the UI jank causing by the async card loads, we pre-allocate
some space for the card to fill in. After this change, only one card can
be shown at a time.

More details:
- When the card number configuration is set to 0, don't trigger the card
loader.
- The height adjusting logic is as follows.
When Settings is opened, pre-allocate a space first.
After the RV finish laying out, reset the RV to wrap_content. So if the
card has to be expanded(eg. wifi large mode or dismissal view), then it
will adjust the height accordingly. While if a card previously shown
becomes unavailable(dismissed or conditions not meet), we also reset the
RV so the space can be gone.

Bug: 163288869
Test: robotest
Change-Id: I0dcb2dae8f0533e562ad06f664b7ae7a9afecd21
2020-08-12 21:40:06 +08:00
TreeHugger Robot
6af0342084 Merge "Display "see all" option when bluetooth is off" 2020-08-12 10:24:29 +00:00
Hugh Chen
bde100849e Display "see all" option when bluetooth is off
- This CL before, Bluetooth settings will hide the "see all"
  option when bluetooth is off. For the UX improvement, this
  CL will show the "see all" button when bluetooth is off. And
  turn on the BT when user press "see all" button to let user to
  quick pair their disconnected devices.
- Update and add test case

Bug: 147150367
Test: make -j42 RunSettingsRoboTests
Change-Id: I7a1451a36a31253b6be2203341bea4e59fed7c2b
2020-08-12 17:07:33 +08:00
TreeHugger Robot
6a128b486f Merge "Update language to comply with Android's inclusive language guidance" 2020-08-12 08:19:06 +00:00
Arc Wang
ae79c41cd7 [Wi-Fi] Fix crash after editing invalid hotspot password
From Android 11, Wi-Fi framework only supports ASCII encoding
for hotspot password, APP should check if password character is
valid.

This change checks if SoftApConfiguration accepts the password
and disable the OK button if the password is invalid.

Bug: 163353576
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiUtilsTest
Change-Id: Ief3c6c1f08f8fcdf128768cde3ab8eef91f19fbe
2020-08-12 14:34:02 +08:00
Arc Wang
b432cf293c [Wi-Fi] Fix crash after editing invalid hotspot password
From Android 11, Wi-Fi framework only supports ASCII encoding
for hotspot password, APP should check if password character is
valid.

This change checks if SoftApConfiguration accepts the password
and disable the OK button if the password is invalid.

Bug: 163353576
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiUtilsTest
Change-Id: Icf3b5c85856906e4cbe2f0ad79583c1b7182b8c7
Merged-In: Ief3c6c1f08f8fcdf128768cde3ab8eef91f19fbe
2020-08-12 14:29:30 +08:00
Edgar Wang
a8742aa7ab Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Test: robotest & manual
Change-Id: Ia8625091a107fc3fb652d3ba3f75ea3cc1a8d9f5
2020-08-12 11:29:07 +08:00
Edgar Wang
8c8a2e85ec Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Test: robotest & manual

Change-Id: I32f369a608c8b4f513f2c32afca6d408ee273428
2020-08-12 11:25:21 +08:00
TreeHugger Robot
232aaec569 Merge "Update language to comply with Android's inclusive language guidance" 2020-08-12 02:36:07 +00:00
TreeHugger Robot
3c8f93a6a5 Merge "Update inclusive language for Accessibility Settings" 2020-08-12 02:28:23 +00:00
Jeffrey Carlyle
f22059f21f Add BatteryStatusFeatureProvider
This allows the battery header status line to be overridden.

Bug: 150239363
Test: implemented provider and changed status line text
Signed-off-by: Jeffrey Carlyle <jcarlyle@google.com>
Change-Id: I05bedbee641f087de5ee1b25a00724ce2de51f87
Merged-In: I05bedbee641f087de5ee1b25a00724ce2de51f87
2020-08-11 13:49:27 -07:00
changbetty
7f57ef4766 [Testing] Use AndroidJUnit4 instead in DataConnectivityListenerTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context

Bug: 162048313
Test: atest -c DataConnectivityListenerTest
Change-Id: I8f05ac7f5f14cb2b990da137099a22e4a89fcc37
2020-08-11 15:32:58 +08:00
Fan Zhang
6c046831de Override 2 getSliceUri() instance to return platform slice
(This is not a clear cherry-pick, @Override need to be removed.)

Bug: 126222433
Test: robotest
Merged-In: I3f9c8202d9b75b24b80ebcf385abc95f8df851e2
Change-Id: Iec9fae48e91baef5861baef946fc155b1eb37904
2020-08-11 04:24:27 +00:00
Bonian Chen
5c4154b2e4 Merge "Add interface and extend db to support storing slice uris" 2020-08-11 02:23:56 +00:00
Fan Zhang
f609df425d Add interface and extend db to support storing slice uris
Bug: 126222433
Test: manual
Merged-In: Ie81e69477d297aa96a0daad02d56196c956271a3
Change-Id: Ifdae6fc47dc078ba83c211d07d6028f00f11e6f2
2020-08-10 16:50:21 +08:00
Josh Hou
abe032ea66 Show/hide 5G preferred network type also consider allowed_network_type
1. The carrier or privileged apps will enable/disable network types on
the device, so Settings references the allowed network type to show/hide
5G preferred network type option.

2. For mainline, copy the getNetworkTypeFromRaf() from RadioFamily to
Settings.

Bug: 136730709
Test: Manual test & EnabledNetworkModePreferenceControllerTest
1. Enable allowed_network_type
2. Disable allowed_network_type
Merged-In: I493f2a2c7f4bc32b3fcb8ab2bace5839d8667bd5

Change-Id: Id591f454a60d0ba08c3fc4a2ffe40836dafeb5f0
2020-08-10 16:18:36 +08:00
Kevin Chyn
bee84e2daa Remove remainder of generateChallengeBlocking
Test: make -j56 RunSettingsRoboTests

Face Tests:
Test: Open face settings, remove face, add face
Test: Open face settings, but cancel credential confirmation.
      Face settings does not show up
Test: adb shell am start -a android.app.action.SET_NEW_PASSWORD
      Able to enroll face

Fingerprint Tests:
Test: Open fingerprint settings, add button is shown
Test: Open fingerprint settings, but cancel credential confirmation.
      Fingerprint settings does not show up
Test: adb shell am start -a android.app.action.SET_NEW_PASSWORD
      Able to enroll fingerprint

Bug: 162533680
Change-Id: Ie448ed086e73b0b545bd3a2e62437c543f7aad6c
2020-08-07 12:49:37 -07:00
Kevin Chyn
7b0867c6d3 4/n: Remove challenge from choose/confirm, use new path
Biometric enrollment will not request a Gatekeeper HAT during
initial credential setup or credential confirmation anymore.
Instead, it is broken down into the following steps now.

Bug: 161765592

1) Request credential setup / confirmation to return a
   Gatekeeper Password
2) Biometric enrollment will generate a challenge
3) Biometric enrollment will request LockSettingsService to
   verify(GatekeeperPassword, challenge), and upon verification,
   the Gatekeeper HAT will be returned.

Since both LockSettingsService and Biometric enroll/settings
make use of biometric challenges, this allows us to make the
challenge ownership/lifecycle clear (vs. previously, where
LockSettingsService has no idea who the challenge belongs to).

Exempt-From-Owner-Approval:For files not owned by our team,
(StorageWizard), this change is just a method rename

Test: RunSettingsRoboTests

Run the following on face/fingerprint devices
Test: Remove credential
      adb shell am start -a android.app.action.SET_NEW_PASSWORD
      Set up credential + fingerprint
Test: Remove credential,
      adb shell am start -a android.settings.FINGERPRINT_SETTINGS
      This tests the ChooseLock* logic in FingerprintSettings
Test: Set up credential,
      adb shell am start -a android.settings.FINGERPRINT_SETTINGS
      This tests the ConfirmLock* logic in FingerprintSettings
Test: Remove device credential, enroll fingerprint/face. Succeeds.
      This tests the ChooseLock* returning SP path from
      BiometricEnrollIntro
Test: With credential and fingerprint/face enrolled, go to
      fingerprint/face settings and enroll. This tests the
      ConfirmLock* path in Fingerprint/FaceSettings
Test: Remove device credential, enroll credential-only, enroll
      fingerprint/face separately. Succeeds. This tests the
      ConfirmLock* returning SP path in BiometricEnrollIntro
Test: In SUW, set up credential, then biometric. This tests
      the ChooseLock* path in SUW
Test: In SUW, set up credential, go back, then set up biometric.
      This tests the ConfirmLock* path in SUW

Change-Id: Idf6fcb43f7497323d089eb9c37125294e7a7f5dc
2020-08-07 12:49:15 -07:00
TreeHugger Robot
2acae9df4a Merge "[Wi-Fi] Support multi-SIM for SIM dependent EAP methods" into rvc-qpr-dev am: edd587c2a6 am: 48d768b00c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12167384

Change-Id: I559cee4b76432f72cab16b926ad7d8a2f87abedc
2020-08-07 12:04:56 +00:00
TreeHugger Robot
48d768b00c Merge "[Wi-Fi] Support multi-SIM for SIM dependent EAP methods" into rvc-qpr-dev am: edd587c2a6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12167384

Change-Id: I41175eb59b2cea6dfeb97d1413ab6c4846ddb844
2020-08-07 11:49:39 +00:00
TreeHugger Robot
edd587c2a6 Merge "[Wi-Fi] Support multi-SIM for SIM dependent EAP methods" into rvc-qpr-dev 2020-08-07 11:37:27 +00:00
Edgar Wang
ed45314758 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Test: robotest & manual
Change-Id: Idf3cb1eca8b814d5863f286f6a46f79fc5e7a967
2020-08-07 10:25:06 +00:00
Lee Chou
4fd08a2145 Replaced reference to setPreferredNetworkType
replaced with @SystemApi setPreferredNetworkTypeBitmask

Bug: 147405973
Test: make RunSettingsRoboTests ROBOTEST_FILTER=EnabledNetworkModePreferenceControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=PreferredNetworkModePreferenceControllerTest

Merged-In: I8ae86595b104dcd16daacbf52cc8eaa5e7a3d08b
Change-Id: Ia66cfc8fe109cfc038a8b53969bcd562727dbbc2
2020-08-07 14:59:38 +08:00