Commit Graph

10640 Commits

Author SHA1 Message Date
TreeHugger Robot
bea5bfe1ce Merge "Fix usb menu not switch to "File Transfer/Android Auto" right after connected to car unit" 2020-09-22 02:55:15 +00:00
TreeHugger Robot
660b17c7cb Merge "Update state when there is Bluetooth tethering state changed" 2020-09-21 03:24:38 +00:00
Hugh Chen
af0a45bb7a Fix usb menu not switch to "File Transfer/Android Auto" right after connected to car unit
- This CL before usb receiver didn't check the extra
  information of the accessory. It will cause the usb
  menu not to be aware that the usb port is switched
  to accessory mode.

  This CL usb receiver will check intent whether to have
  accessory extra. If the usb port is switched to accessory
  mode the usb menu will switch to "File Transfer/Android Auto".
- Update test case

Bug: 162451162
Test: make -j42 RunSettingsRoboTests
Change-Id: I0eca89a23670c674b74753fc526256cc1d52e759
2020-09-18 15:45:37 +08:00
TreeHugger Robot
b7d5c72d0f Merge "Create NetworkProviderSettings for provider model" 2020-09-18 05:08:08 +00:00
TreeHugger Robot
a4161789d6 Merge "Fix the device on "Media devices" wouldn't update" 2020-09-17 11:32:12 +00:00
Hugh Chen
cafeab2813 Fix the device on "Media devices" wouldn't update
- This CL use new CachedBluetoothDevice callback instance
  in construct to avoid unregister wrong callback.
- This CL use flag to make sure preference will register
  callback on onAttached() when preference remove callback
  on onPrepareForRemoval() or onDetached().
- Update test case

Bug: 168682778
Bug: 157653997
Test: make -j42 RunSettingsRoboTests
Change-Id: I7a0d9f5332153ee80634e191847b84cd7c380b7d
2020-09-17 08:45:12 +00:00
Kevin Chyn
b646169818 Merge "2/n: Add default implementation for multi-biometric enroll" 2020-09-17 07:43:59 +00:00
Kevin Chyn
87bb772e16 2/n: Add default implementation for multi-biometric enroll
1) Adds a layout for multi-biometric selection in BiometricEnrollActivity
2) Adds widgets for checkboxes
3) Shows ConfirmLock*/ChooseLock* for multi-biometric devices in
   BiometricEnrollActivity
4) finish()'s when loses foreground
5) Adds default string for ChooseLock* and multi-biometrics, e.g.
   "Set up Password + Biometrics", as well as associated plumbing
   to bring the user back to BiometricEnrollActivity once the
   credential is enrolled
6) When max templates enrolled, checkbox becomes disabled and
   description string is updated

Bug: 162341940
Bug: 152242790
Fixes: 161742393

No effect on existing devices with the following:
Test: adb shell am start -a android.settings.BIOMETRIC_ENROLL
Test: SUW
Test: make -j RunSettingsRoboTests

Exempt-From-Owner-Approval: Biometric-related change
to EncryptionInterstitial

Change-Id: I855460d50228ace24d4ec5fbe330f02ab406cc02
2020-09-16 23:30:11 -07:00
Julia Reynolds
ebfa9e31a1 Merge "Fix crash on rotation" 2020-09-16 13:21:31 +00:00
TreeHugger Robot
8678e5112a Merge "Fix the ANR in panel when changing volume continuously" 2020-09-15 05:43:09 +00:00
TreeHugger Robot
34937eb21e Merge "Hide the icon if didn't have media session or album art" 2020-09-15 02:32:08 +00:00
Julia Reynolds
e06050cc63 Fix crash on rotation
by making the information the dialog needs available earlier

Test: manual, with rotation
Fixes: 165889571
Change-Id: I68627d17573a876f8e81cc63ccf74eee0063b63d
2020-09-14 15:27:05 -04:00
Hugh Chen
30805af9de Hide the icon if didn't have media session or album art
- This CL before, output switcher panel will show default
  icon if there are no media session or album art.

  This CL will hide the icon if there are no media session
  or album art.
- Add test case

Bug: 161495909
Test: make -j42 RunSettingsRoboTests
Change-Id: I5f80158b12f89c8499fb97d0b203ebeffefbc18b
2020-09-14 17:17:04 +08:00
Quang Luong
77e32049bd Merge "[Wi-Fi] Show Pie+x Wi-Fi icon when a connected Wi-Fi is not default route" into rvc-qpr-dev am: db667a8971 am: 8704114f02
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12444567

Change-Id: I95ac03dcb6a45fbc8c71aae0d7c9fcae20f36ff2
2020-09-11 23:50:57 +00:00
Quang Luong
8704114f02 Merge "[Wi-Fi] Show Pie+x Wi-Fi icon when a connected Wi-Fi is not default route" into rvc-qpr-dev am: db667a8971
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12444567

Change-Id: I655406b69ef689a1b604ed6fc6c9e4d2bbf8bf82
2020-09-11 18:57:42 +00:00
Quang Luong
db667a8971 Merge "[Wi-Fi] Show Pie+x Wi-Fi icon when a connected Wi-Fi is not default route" into rvc-qpr-dev 2020-09-11 18:30:32 +00:00
Yi Jiang
f7b60ee566 Merge "Disable screen attention when DISALLOW_CONFIG_SCREEN_TIMEOUT" 2020-09-10 17:33:36 +00:00
Yi Jiang
038d18ff73 Disable screen attention when DISALLOW_CONFIG_SCREEN_TIMEOUT
Test: atest AdaptiveSleepDetailPreferenceControllerTest
Bug: 161938926
Change-Id: I4ed96ad36efe67091a26cbfe2cde16c116f7c8fb
2020-09-10 00:58:03 -07:00
Ted Wang
47f2ebb1af Update state when there is Bluetooth tethering state changed
Monitor Bluetooth Tethering state and update preference when there is
Bluetooth tethering state change.
Add test case to verify when recieve
BluetoothPan.TETHERING_STATE_CHANGED will update bluetooth state

Bug: 138688805
Test: make RunSettingsRoboTests
Change-Id: I8f468d1d99ed6d87f6cd8305ef56b0d7a5dec95b
2020-09-10 06:15:41 +00:00
Arc Wang
746176eb56 Create NetworkProviderSettings for provider model
Provider model is a feature which improves networks
Settings UX.

NetworkProviderSettings is the fragment which allow
users to choose a mobile network or a Wi-Fi network
to connect.

At this change, NetworkProviderSettings is a clone
of WifiSettings, mobile networks will be integrated
at later CLs.

Bug: 167474581
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.network.NetworkProviderSettingsTest
Change-Id: I185639a8f2469e9ec76ad18b6c2bc2e8a4d079e3
2020-09-10 11:03:48 +08:00
Yanting Yang
7b8b881f8a Merge "Resolve tiles intent before prompting a dialog for profile selection" 2020-09-09 14:44:35 +00:00
Yanting Yang
552f340dda Resolve tiles intent before prompting a dialog for profile selection
Symptom:
Once the work profile component of the tile is disabled after Settings
preloaded tiles, Settings will crash when the user clicks the work
option from the profile selection dialog.

Root cause:
Settings just checks the users from the preloaded tiles to prompt
profile selection dialog. It doesn’t check the activity for the work
profile user before launching.

Solution:
Resolve the activity by intent as users before launching if the work
profile is enabled. Directly start activity if only one user is
resolvable, otherwise prompt a dialog for profile selection.

Fixes: 162227425
Test: make RunSettingsRoboTests
Change-Id: Idcc4e5a266ab2a2252db30bb97d4be002212c677
2020-09-09 18:12:42 +08:00
Jason Chiu
6a8d2c5e55 Fix the endless panel loading
Re-launching volume panel continuously will trigger an endless panel
loading, show a transparent unfinished UI, and then block the user's
screen.

Root cause:
When the activity receives a new intent from user's clicking, it will
call PanelFragment#createPanelContent to update the current fragment.
The method triggers an animation and then loads the panel content. If
multiple invocations run concurrently before the animation or the
loading finish, the loader's countdown latch will be increased
abnormally and lead to the endless loading.

Solution:
1. Since the invocations are in UI thread, simply add a flag to avoid
reentrance when the panel is animating or loading.
2. Filter out the same panel's creation request when the panel is still
visible.
3. Do not force a panel's recreation when it's under construction.

Bug: 143889510
Bug: 160491854
Test: robotest, manual
Change-Id: I821faedeb62354929f3af9804cbbe44ee5bb8a53
2020-09-03 07:10:21 +00:00
Jason Chiu
2c7b77dad7 Fix the ANR in panel when changing volume continuously
When users open volume panel and keep on changing the volume slider for
a while, the panel starts to defer the slider updating, and finally gets
stuck and causes an ANR.

Root cause:
Volume panel has four volume adjusting slices. Each of them registers
a broadcast receiver to listen to the volume changed and muted events.
However, when the media volume changes, AudioManager will send four
broadcasts (music, assistant, accessibility, tts) to every receiver, and
each of them will reload slice four times. Thus, one media volume
changed event will lead to 16 (4*4) UI updates. Consequently, keeping on
sliding the volume bar will trigger hundreds of broadcasts and UI
updates, which makes the system busy and getting stuck.

Solution:
Introduce a VolumeSliceHelper to integrate the broadcasts of the volume
slices specifically.
1. Only register one broadcast receiver to reduce the broadcast loading
   since the four slices are listening to the same signal.
2. Filter the only one eligible broadcast among the multiple concurrent
   ones, and then relay it to the registered slice.
3. Listen to one more action STREAM_DEVICES_CHANGED_ACTION to update the
   volume panel when audio output device changes.

Test: robotest, visual
Bug: 144134209
Bug: 160489394
Change-Id: I780b9eee35802b19a5f0ab0a7d07bd3e081f5556
2020-09-03 14:12:10 +08:00
TreeHugger Robot
0e3c359888 Merge "Fix settings crash" 2020-09-03 00:46:02 +00:00
TreeHugger Robot
698b4eafa0 Merge "Set highest priority as default value to Bluetooth codec" 2020-09-02 10:14:55 +00:00
Hugh Chen
a6aae425bc Fix settings crash
- This CL before, "Previously connected device" didn't
  handle dock device. If user have disconnected dock
  device will cause Settings crash.

  This CL add condition to handle dock device to avoid crash.
- Update test case.

Bug: 167054620
Test: make -j42 RunSettingsRoboTests
Change-Id: I769cee3f589e14a993b00a0ae6ec3ddfba8ef281
2020-09-02 17:14:30 +08:00
timhypeng
ce4dfc5c04 Set highest priority as default value to Bluetooth codec
-To set highest priority when codec modification comes from development setting

Bug: 165442632
Test: make -j42 RunSettingsRoboTests
Change-Id: I8cfbaa276f3b3e269f4a80e8aae987fbb90f646e
2020-09-01 15:28:59 +08:00
Arc Wang
20680c254c [Wi-Fi] Show Pie+x Wi-Fi icon when a connected Wi-Fi is not default route
This change shows Pie+x Wi-Fi icon in Wi-Fi Details for a connected Wi-Fi
network which is not the default network when

  1. It's connection speed quality is bad.
  or
  2. It has certain internet connection problem.

Bug: 163627176
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiDetailPreferenceController2Test
      manual visual
Change-Id: I1f102471426a55c7dabd9110afba20f802abedbe
2020-08-28 11:43:55 +08:00
Colin Cross
38fa185a27 Revert "Snap for 6793014 from 3777d883a3857b1a1589181c436d9018d7..."
Revert "Snap for 6793014 from 3157b4ee4325286f0c2ab0f26528460c8b..."

Revert "Snap for 6793014 from a43295d1825da62af038d345a7a861ed7a..."

Revert "Snap for 6793014 from 2076be4d27078d6ebc0a6b5e5ceb386109..."

Revert "Snap for 6793014 from d0e31526c62b2aeb35c293ac96feb180fc..."

Revert "Snap for 6793014 from 7a3a8c6351d5167a6ae0b33bc376efabd2..."

Revert "Snap for 6793014 from 41471cb21bb16b5c3bcc92f84293b79684..."

Revert "Snap for 6793014 from 42e5cca3cfb829690c9d8c6aca57a8e7d5..."

Revert "Snap for 6793014 from 4f81304963d19f4511b1e8e7d0aad87a67..."

Revert "Snap for 6793014 from 07602cdacf5bcc835db41f7eaa24af9964..."

Revert "Snap for 6793014 from 14cb57e107a3abce8b14937b1f92c28d18..."

Revert "Snap for 6793014 from ab1e4a81d09a540a5f927059e5bc03a606..."

Revert "Snap for 6793014 from 8c65adad0bcdfb3acc561063b4048dca24..."

Revert "Snap for 6793014 from b3061942700265e2bf04af9997775dcbbb..."

Revert "Snap for 6793014 from 551c5953fc62e339e4ee884ec2cd0ac3be..."

Revert "Snap for 6793014 from 4919273b2ac5c6347a18e17c5ec70d8da6..."

Revert "Snap for 6793014 from 988d4244914e0c749655e8cb6db18ba44f..."

Revert submission 12465146-release-request-6b259cbc-1f45-4b05-bc7e-c9b893b79d68-for-git_main-busytown-release-6793014

Reason for revert: b/166531456
Reverted Changes:
I5ff7a6c0d:Snap for 6793014 from f2989f9c65556d5155dbd57f82f0...
I77bdff943:Snap for 6793014 from a43295d1825da62af038d345a7a8...
I2ac5c520a:Snap for 6793014 from c3f124cca05579acf0a6cb589ebd...
I023b9702f:Snap for 6793014 from 98756d6d3e2bb0ba28eb125caa7a...
Ibc7893d72:Snap for 6793014 from fd1ad6750ef332d3f50f218f4d5d...
Ic27847bee:Snap for 6793014 from 8c65adad0bcdfb3acc561063b404...
If20bc9352:Snap for 6793014 from 7a3a8c6351d5167a6ae0b33bc376...
I6542d17e8:Snap for 6793014 from 3777d883a3857b1a1589181c436d...
I66e6bb8a9:Snap for 6793014 from 8b8bf0a07b0521bbe8483fbbab12...
I3cd190b6b:Snap for 6793014 from 424180bdc4aa18249e678daebfd0...
If92db7402:Snap for 6793014 from ab1e4a81d09a540a5f927059e5bc...
Iaced03c87:Snap for 6793014 from d0e31526c62b2aeb35c293ac96fe...
I5d28c6b4b:Snap for 6793014 from 4f81304963d19f4511b1e8e7d0aa...
I30d07bea3:Snap for 6793014 from 7594ec6384c4da320726def34f47...
I473205f48:Snap for 6793014 from 551c5953fc62e339e4ee884ec2cd...
I0656b41af:Snap for 6793014 from 44725f06b7f7d6407b5ee82d989b...
I0f9796067:Snap for 6793014 from 4919273b2ac5c6347a18e17c5ec7...
I9a38cda8f:Snap for 6793014 from 2076be4d27078d6ebc0a6b5e5ceb...
I876a82f51:Snap for 6793014 from 11467102abddb6026aaa164c1361...
I749d7d023:Snap for 6793014 from 41471cb21bb16b5c3bcc92f84293...
I038daea41:Snap for 6793014 from 07602cdacf5bcc835db41f7eaa24...
I47aa3131c:Snap for 6793014 from 14cb57e107a3abce8b14937b1f92...
I32dba8a95:Snap for 6793014 from 3157b4ee4325286f0c2ab0f26528...
I2ebc9f9db:Snap for 6793014 from 988d4244914e0c749655e8cb6db1...
Iae7c3370f:Snap for 6793014 from 9ffb8852294e06e2d387dc1fb868...
I6467a7f1b:Snap for 6793014 from 42e5cca3cfb829690c9d8c6aca57...
I8c6375203:Snap for 6793014 from b3061942700265e2bf04af999777...
I843b2e1f3:Snap for 6793014 from 265280bf5cb4bc14e132c3a35ae5...
Ie254f7079:Snap for 6793014 from f22ad3164937a8f2e309965c102b...
I01e0974ed:Snap for 6793014 from bbbccc3c2b7fc7c5780f6c415c42...

Change-Id: Ie8b2b332f7ebaaee7cd39c6f94d280c047426bc9
2020-08-27 04:12:26 +00:00
TreeHugger Robot
3777d883a3 Merge "Show just disconnected device on previously connected" 2020-08-26 14:50:45 +00:00
Hugh Chen
386df49bbc Show just disconnected device on previously connected
- This CL before, previously connected devices will show most
  recently connected devices and the maximum is 3.
  In this time, if next most recently connected device is disconnected.
  It's will not show on "previously connected devices", user needs go to
  "see all" page to found that device.
  This CL add rule to compare the priority of most recently connected
  device. If priority of next disconnected device is higher than
  currnect devices that on "previously connected devices".
  Let next disconnected device show on "previously connected devices".
- Update test case.

Bug: 157653997
Test: make -j42 RunSettingsRoboTests
Change-Id: I684501a20a67755b2196ba9d4b5565add01a5d01
2020-08-26 18:56:30 +08:00
TreeHugger Robot
98dd4491b7 Merge "Hide conversation bubble switch if app bubbles are off" into rvc-qpr-dev am: 794482fb92
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12410582

Change-Id: I84db13dbe58d05cb8639515e302b927c00342662
2020-08-25 18:58:11 +00:00
TreeHugger Robot
794482fb92 Merge "Hide conversation bubble switch if app bubbles are off" into rvc-qpr-dev 2020-08-25 18:14:50 +00:00
TreeHugger Robot
6a23ee5d37 Merge "Add 'Adaptive connectivity' UI" into rvc-qpr-dev am: b75d2f6009
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12391062

Change-Id: Ib275c7ce10f274d815a155cf9d95af03757e1a7c
2020-08-24 16:05:10 +00:00
TreeHugger Robot
b75d2f6009 Merge "Add 'Adaptive connectivity' UI" into rvc-qpr-dev 2020-08-24 15:47:38 +00:00
TreeHugger Robot
96b2d774fb Merge "Add 'Adaptive connectivity' UI" 2020-08-24 14:19:01 +00:00
Arc Wang
71a25ea64f Add 'Adaptive connectivity' UI
'Adaptive connectivity' toggle button controls whether
network connection is automatically managed.

Bug: 162871294
Test: make RunSettingsRoboTests
      manual
      Switch the toggle button and reboot device, observe
      if the state is retained.
Change-Id: I4499a3639abab356e8faa6316bfa45541efd63ac
2020-08-21 17:17:02 +08:00
Arc Wang
e4ba98cebe Add 'Adaptive connectivity' UI
'Adaptive connectivity' toggle button controls whether
network connection is automatically managed.

Bug: 162871294
Test: make RunSettingsRoboTests
      manual
      Switch the toggle button and reboot device, observe
      if the state is retained.
Change-Id: I4499a3639abab356e8faa6316bfa45541efd63ac
Merged-In: I4499a3639abab356e8faa6316bfa45541efd63ac
2020-08-21 16:44:06 +08:00
Lyn Han
aea66dcc96 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
(cherry picked from commit 9af95dae7d)
2020-08-20 16:59:33 +00:00
Kevin Chyn
54a5f51dba Merge "Update settings together with frameworks/base" 2020-08-19 22:33:04 +00:00
PETER LIANG
f92160da4a Merge changes from topic "color_correction_b_148785841"
* changes:
  Fix the screen will move by itself when enabled Color correction.
  Refine and migrate the functions that related to update preference into the specific lifecycle.
2020-08-19 07:51:41 +00:00
Peter_Liang
896e18012d Fix the screen will move by itself when enabled Color correction.
Root Cause:
Using the listener to update the UI dynamically might have some time delay.

Solution:
Refactor to another implementation and avoid using the listener to update it.

Additional condition:
Add height restriction in preference to avoid the palette view to cover whole screen.

Bug: 148785841
Test: make RunSettingsRoboTests ROBOTEST_FILTER=PaletteListPreferenceTest
Change-Id: I6a854e16321b3426e2f8ff65c6404036d55caed4
2020-08-19 11:59:59 +08:00
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
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
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