Commit Graph

12540 Commits

Author SHA1 Message Date
TreeHugger Robot
e9c717b6c6 Merge "Add Panic button sound preference to panic gesture settings page." 2020-08-19 02:01:06 +00:00
Fan Zhang
67d3454265 Add Panic button sound preference to panic gesture settings page.
Also renamed emergency_sos_* to panic_*. "emergency sos" is used by
other OEMs.

https://screenshot.googleplex.com/66097f3e-6aa0-4e2f-afb8-22f278bb0ed7.png

Bug: 161394591
Test: robotests
Change-Id: I14a59399fe7192d305d89a86dc93380c1e4c8a1c
2020-08-18 09:19:33 -07:00
Beth Thibodeau
ee7da79fbf Allow user to block individual apps from resuming. am: 48ce5892e8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12392268

Change-Id: I131ff7c33871d858a63824fc17ba168ba590f6e2
2020-08-18 14:39:26 +00:00
Betty Chang
19a7ddd02b Merge "[Testing] Use AndroidJUnit4 instead in TelephonyTogglePreferenceControllerTest" 2020-08-18 10:27:32 +00:00
changbetty
fc29bdedc7 [Testing] Use AndroidJUnit4 instead in MobileNetworkUtilsTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change the Copy Right
4. Create the real object for PhoneAccountHandle and ComponentName

Bug: 164989754
Test: atest -c MobileNetworkUtilsTest
Change-Id: I1778832b0602062adb24928343c0c1d0e525942d
2020-08-18 16:18:56 +08:00
TreeHugger Robot
d453134ac1 Merge "Rename game driver to updatable driver." into rvc-dev-plus-aosp am: 60e33309b2 am: e87f0d9fa2 am: ef7b3433a9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12374931

Change-Id: I1ae5cd31a99659d6240c756cc88601185c40b25b
2020-08-17 20:40:17 +00:00
TreeHugger Robot
ef7b3433a9 Merge "Rename game driver to updatable driver." into rvc-dev-plus-aosp am: 60e33309b2 am: e87f0d9fa2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12374931

Change-Id: Ib289fc74a560a02b2d925c8b941c8cc7a04f5d7f
2020-08-17 20:38:28 +00:00
TreeHugger Robot
e87f0d9fa2 Merge "Rename game driver to updatable driver." into rvc-dev-plus-aosp am: 60e33309b2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12374931

Change-Id: I13794e6cf89c14ea1ebd5a2751e4590f4b7f4c01
2020-08-17 20:25:53 +00:00
TreeHugger Robot
60e33309b2 Merge "Rename game driver to updatable driver." into rvc-dev-plus-aosp 2020-08-17 20:11:11 +00:00
Beth Thibodeau
48ce5892e8 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
Merged-In: Id3de52419ffba233469396dd47439428201e5e00
2020-08-17 15:47:04 +00:00
changbetty
d2e9e42f32 [Testing] Use AndroidJUnit4 instead in TelephonyTogglePreferenceControllerTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change the Copy Right

Bug: 164986958
Test: atest -c TelephonyTogglePreferenceControllerTest
Change-Id: I3d6c39f45cb1efb1742148f20f03372214eb0cbe
2020-08-17 12:41:53 +00:00
changbetty
933e4df3c9 [Testing] Use AndroidJUnit4 instead in TelephonyBasePreferenceControllerTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right

Bug: 164986221
Test: atest -c TelephonyBasePreferenceControllerTest
Change-Id: Iabe24aef0b7a5c3aa9d7be275f0c4ed552cdd2e8
2020-08-17 12:41:20 +00:00
Betty Chang
1adaa8ba27 Merge "[Testing] Use AndroidJUnit4 instead in SubscriptionUtilTest" 2020-08-17 10:46:30 +00:00
changbetty
57abc1f865 [Testing] Use AndroidJUnit4 instead in SubscriptionUtilTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Add spy context and get the SubscriptionManager and TelephonyManager
from the spy context

Bug: 163298785
Test: atest -c SubscriptionUtilTest
Change-Id: Iefcf29904c9c4475221c20318526ce48cb88a45a
2020-08-17 11:57:22 +08:00
Kevin Chyn
202494365c Update settings together with frameworks/base
LockSettingsService returns a handle to the gatekeeper password
instead of the password itself now. As such, update areas of code
accordingly.

Bug: 161765592

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: Ibc71ec88f8192620d041bfd125f400371708b296
2020-08-16 12:38:27 -07:00
Yi-Ling Chuang
e50265cb43 [DO NOT MERGE] Pre-allocate height for contextual cards. am: 228bc78bf9 am: 631465df31
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12343231

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

Change-Id: Ib6bcff33b0dc7af2935e937f600cb6832f48febf
2020-08-15 02:20:13 +00:00
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