Commit Graph

63257 Commits

Author SHA1 Message Date
Hugh Chen
a50f020c85 Hide tethering option when in a guest account
- Before this CL, users can share their mobile data through enabling
  tethering in the USB menu when in a guest account.
  It will cause main users to spend their money unexpectedly.

  This CL will hide the tethering option on the USB menu when in the
  guest account.
- Add test cases.

Bug: 166125765
Test: 1. make -j42 RunSettingsRoboTests. 2. Switch to a guest account
to verify whether the tethering option is hiding.

Change-Id: I7523b3f3c3a1372bb128a58a6a7fac973d27cfbe
Merged-In: I7523b3f3c3a1372bb128a58a6a7fac973d27cfbe
(cherry picked from commit bde627b263)
2020-09-29 01:57:37 +00:00
TreeHugger Robot
ce61ea1506 Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2020-09-28 15:21:51 +00:00
Bill Yi
2aaa31892e Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I8b5b9411c949934d99bea34b0292d8e5de512413
2020-09-28 00:45:38 -07:00
Bill Yi
1bc5c2a1ed Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ic754186b5e7ee18485a2d441b10965d768072e24
2020-09-27 23:59:31 -07:00
Tyler Gunn
d3d88afee7 Fix issue where "learn more" link on 5G NR settings doesn't work.
Issue is due to the fact the footer text is a spannable string which
although different from the original text loaded when the preference
was constructed, is the same in terms of object equality.
Clearing the preference title before assigning the footer text fixes this.

Fixes: 162011372
Test: Manual test; open settings and verify link is clickable now.
Merged-In: I5d22c665b0d6fb842bc54dc55a2eb3045e0092a2
Change-Id: I5d22c665b0d6fb842bc54dc55a2eb3045e0092a2
(cherry picked from commit 97d8711d84)
Exempt-From-Owner-Approval: Straight cherry-pick.
2020-09-25 21:18:29 +00:00
TreeHugger Robot
39baa4a821 Merge "[adbwifi] wireless debugging qstile long-press to WirelessDebuggingFragment." into rvc-qpr-dev 2020-09-25 15:55:55 +00:00
Joshua Duong
cfcc133467 Merge "Fix adb qr scanner text in dark mode." into rvc-qpr-dev 2020-09-25 14:58:17 +00:00
Joshua Duong
b6b49680e7 Fix adb qr scanner text in dark mode.
The text color is not right when in dark mode, which makes the text
invisible.

Bug: 168845829

Test: In dark/light mode, scan adb QR code and verify text is visible.
Exempt-From-Owner-Approval: Already approved in ag/12640175
Change-Id: I6d8e16fd2d848d09b49673db041c97d667fea6a9
2020-09-25 14:57:41 +00:00
TreeHugger Robot
faf7a2ad78 Merge "Disable entry point of output switcher" into rvc-qpr-dev 2020-09-25 09:04:36 +00:00
TreeHugger Robot
27a7be8a24 Merge "Fix output switcher will display previous media session" into rvc-qpr-dev 2020-09-25 09:03:50 +00:00
Jason Chiu
e8b34c64f4 Merge "[DO NOT MERGE] Fix the blank space on contextual card loading timeout" into rvc-qpr-dev 2020-09-25 07:05:25 +00:00
Hugh Chen
455a0a3186 Disable entry point of output switcher
It adds a minimum value if it shows only one available
cast device in the output switcher. Because users can only
change the volume slider or stop control in the output switcher.
It's too hidden to have the user stop cast in the UI.

- This CL will disable the entry point of the output switcher
  if there is only one available cast device in the list.
- Update test cases.

Bug: 163095048
Test: make -j42 RunSettingsRoboTests
Change-Id: I8906878e1ba769d6940041f17d83b5de6b2a32c0
Merged-In: I8906878e1ba769d6940041f17d83b5de6b2a32c0
(cherry picked from commit b6840ced0d)
2020-09-25 03:18:05 +00:00
Bill Yi
434bffe9e2 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I14b1b7cb5aac3ce15594e0fe470b447e0adf72d6
2020-09-24 12:49:23 -07:00
Joshua Duong
e04e9a508d [adbwifi] wireless debugging qstile long-press to WirelessDebuggingFragment.
Previously, long-pressing any developer options quick settings tiles
redirects to the application info page for Settings app. The manifest
change makes the long-press by default, go into the developer options
page.

Also, there's a check if the long-press came from the wireless debugging
tile so it can launch the WirelessDebuggingFragment.

Bug: 153275926

Test: Enable the wireless debugging qstile in developer options.
Then long-press the wireless debugging tile, which should direct you to
the WirelessDebuggingFragment. Also, enable any other qstile and
long-press them. It should direct you to the developer options page
instead of the application info page.

Change-Id: Id495e5c978005c21d0f33b949d7c410100bf3cf5
2020-09-24 18:17:42 +00:00
TreeHugger Robot
28b05910d8 Merge "Guard against flickering of dynamic injection items" into rvc-qpr-dev 2020-09-24 12:32:20 +00:00
Jason Chiu
a7d76af933 Guard against flickering of dynamic injection items
The summary of injected items may flicker when the data is change from
URI.

Root cause:
If an external app injects an entry to Settings with a dynamic summary,
Settings will observe the summary change via the provideed URI. However,
sometimes when Settings observes the data change and then refreshes the
UI, the data doesn't really change and settings still gets the same
summary. If it happens in a short period, the summary will seem
flickering.

Solution:
Check if the data really changes before refresh UI. Guard both title and
summary.

Fixes: 168309941
Fixes: 166785977
Test: robotest
Change-Id: I137fc317dcfd8919195c10fa8cf7d2559fe1029d
2020-09-24 17:25:48 +08:00
Hugh Chen
49fbc8fdb0 Fix output switcher will display previous media session
Before this CL, the same request code will cause intent to
be cached. It will cause the output switcher to display the
previous media session.

This CL uses the package name as an unique request code to
fix this issue.

Bug: 169077753
Test: make -j42 RunSettingsRoboTests
Change-Id: Iebfc7904609e243d5bf0222307bae98a952a3331
Merged-In: Iebfc7904609e243d5bf0222307bae98a952a3331
(cherry picked from commit c3fe8d87d6)
2020-09-23 09:06:10 +00:00
Mill Chen
19843031ae Update battery saver preference key
The updated preference key made slice auto conversion mechanism fail,
so when this slice is requested by external apps, the UI won't be shown
properly. So we need to revert the key to the original one.

Bug: 131897855
Test: manual test
1. Open Settings app -> Settings search -> search battery saver
2. Observe battery saver result item has a toggle

Change-Id: Ifb5b0a6786d60d1e67567272610cc3cb078f11a4
Merged-In: Ifb5b0a6786d60d1e67567272610cc3cb078f11a4
2020-09-23 03:46:35 +00:00
Jason Chiu
c3ed62e3ae Merge "Fix the ANR in panel when changing volume continuously" into rvc-qpr-dev 2020-09-23 03:01:56 +00:00
Jason Chiu
a78af692c6 Merge "Fix the endless panel loading" into rvc-qpr-dev 2020-09-23 03:01:53 +00:00
TreeHugger Robot
dacfb93762 Merge "Add permission to protect data when sending broadcast" into rvc-qpr-dev 2020-09-23 01:09:03 +00:00
TreeHugger Robot
f9469f109a Merge "Disable bubbles for low ram devices" into rvc-qpr-dev 2020-09-22 17:11:41 +00:00
Bill Yi
b9d958702d Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I59e6f5297bd364526f80af8b1125a566b869f74a
2020-09-22 10:55:48 +00:00
TreeHugger Robot
e9d4e584d5 Merge "Hide the icon if there is no media session or album art." into rvc-qpr-dev 2020-09-22 03:24:09 +00:00
TreeHugger Robot
e0e283cb4c Merge "Update state when there is Bluetooth tethering state changed" into rvc-qpr-dev 2020-09-22 03:16:37 +00:00
TreeHugger Robot
6905a3a353 Merge "Update global bubble settings mp4" into rvc-qpr-dev 2020-09-22 03:02:44 +00:00
Jason Chiu
f447cbbcb5 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
Fixes: 144134209
Fixes: 160489394
Change-Id: I780b9eee35802b19a5f0ab0a7d07bd3e081f5556
Merged-In: I780b9eee35802b19a5f0ab0a7d07bd3e081f5556
(cherry picked from commit 2c7b77dad7)
2020-09-22 02:58:01 +00:00
Jason Chiu
7db71ac87a 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.

Fixes: 143889510
Fixes: 160491854
Test: robotest, manual
Change-Id: I821faedeb62354929f3af9804cbbe44ee5bb8a53
Merged-In: I821faedeb62354929f3af9804cbbe44ee5bb8a53
(cherry picked from commit 6a8d2c5e55)
2020-09-22 02:55:22 +00:00
Lyn Han
29559b1645 Disable bubbles for low ram devices
Fixes: 167677013
Test: set low ram true => bubble settings hidden
Test: make -j80 RunSettingsRoboTests ROBOTEST_FILTER="Bubble"

Change-Id: I1c40a05404ea7c78cc82102b33e4bc3cb3528075
2020-09-21 15:11:07 -07:00
TreeHugger Robot
ca04ccd911 Merge "Fix the device on "Media devices" not updated issue" into rvc-qpr-dev 2020-09-21 10:01:54 +00:00
Hugh Chen
ec597c220e Fix the device on "Media devices" not updated issue
- This CL uses new CachedBluetoothDevice callback instance
  in construct to avoid unregister wrong callback.
- This CL uses 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
Merged-In: I7a0d9f5332153ee80634e191847b84cd7c380b7d
(cherry picked from commit cafeab2813)
2020-09-21 09:58:33 +00:00
Hugh Chen
db0aa6541a Hide the icon if there is no media session or album art.
- Before this CL, the output switch panel will show a default
  icon if there is no media session or album art.

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

Bug: 161495909
Test: make -j42 RunSettingsRoboTests
Change-Id: I5f80158b12f89c8499fb97d0b203ebeffefbc18b
Merged-In: I5f80158b12f89c8499fb97d0b203ebeffefbc18b
(cherry picked from commit 30805af9de)
2020-09-21 09:48:46 +00:00
Jason Chiu
4753adfb52 [DO NOT MERGE] Fix the blank space on contextual card loading timeout
Root cause:
Sometimes loading contextual cards exceeds 1 second and a timeout
expires. In the past, we used the timeout in order not to update
homepage UI and to avoid screen scrolling. But we've introduced a
mechanism of card space pre-allocation to avoid flickering, so when the
timeout expires, the pre-allocated space will be always blank.

Solution:
Display a card on timeout if the one-card space is pre-allocated.

Fixes: 165886791
Test: robotest
Change-Id: I79b29c5fd6d9c4fe6b53dd4f5eab4cd3a606d76d
2020-09-21 09:47:19 +00:00
TreeHugger Robot
35f15fdbff Merge "Fix cast volume control bar not work" into rvc-qpr-dev 2020-09-21 09:23:22 +00:00
TreeHugger Robot
4ac22e55fe Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2020-09-19 05:30:57 +00:00
Bill Yi
46678afcad [automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: 1d033b41dc -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12642138

Change-Id: I75912992dfd44e72c3e8daf2721be656dbc114b9
2020-09-19 01:49:34 +00:00
Bill Yi
6fbc044374 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I05ee4abf21aa97acf518dbb3f7f1fec36a70445c
2020-09-18 17:33:58 -07:00
Bill Yi
1d033b41dc Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I2553421a8fef1330908cba8afc10013ce6331778
2020-09-18 16:54:49 -07:00
Lyn Han
245a6aff75 Update global bubble settings mp4
Fixes: 160797563
Test: compiles with updated overflow button icon
Change-Id: Iaa1319bfb6f111b7675f5682258a8d282c27c6ce
2020-09-18 15:08:57 +00:00
TreeHugger Robot
0be898b31b Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2020-09-17 18:27:09 +00:00
TreeHugger Robot
697d2e1fad Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2020-09-17 18:20:10 +00:00
Beth Thibodeau
7ca988cab1 Merge "[DO NOT MERGE] Revert "Allow user to block individual apps from resuming."" into rvc-qpr-dev 2020-09-17 17:56:29 +00:00
Beth Thibodeau
70920bd9ff [DO NOT MERGE] Revert "Allow user to block individual apps from resuming."
Revert submission 12392268-cherrypick-mediaappsettings-5fxuo164a2

Bug: 161813143

Reason for revert: no longer want change in QPR
Reverted Changes:
Id3de52419:Allow user to block individual apps from resuming....
I8c85bc937:Allow user to block individual apps from resuming

Change-Id: Ieacef217587476532246b466d680219351bc1657
2020-09-17 17:55:56 +00:00
Bill Yi
17d8f4e53a Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ic2d693eb2a6060bd39063cd1e1b6a677c555a500
2020-09-17 13:36:15 +00:00
Bill Yi
fc1e97b985 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I808f46f1aaebeccdfd1bf4c0c561925830b97717
2020-09-17 13:01:33 +00:00
Hugh Chen
c3d4b9ace9 Fix cast volume control bar not work
Use hashcode as a requestCode id, since the
same requestCode will cause the intent be cached.

Bug: 163095633
Test: make -j42 RunSettingsRoboTests
Change-Id: I2c120f18e24a66aeff5565e952fa4064149ec540
Merged-In: I2c120f18e24a66aeff5565e952fa4064149ec540
(cherry picked from commit 7f3efd4357)
2020-09-17 08:53:11 +00:00
Jiashen Wang
f537a702dd Do not display eSIM activation option if the device is eSIm ignored
For the device listed as eSIM ignored device, we should always hide the
eSIM activation button even in the developer mode.
Bug: 168266928
Test: Manually tested

Change-Id: Ide3043606de202c5903e520aa550302ff0d103d3
2020-09-16 15:33:51 -07:00
TreeHugger Robot
19af143fe7 Merge "Fix settings crash" into rvc-qpr-dev 2020-09-16 03:09:38 +00:00
TreeHugger Robot
2b52c56eac Merge "Show just disconnected device on previously connected" into rvc-qpr-dev 2020-09-16 03:09:30 +00:00
TreeHugger Robot
a21c26df38 Merge "Show all devices, including connected ones, into "Previously connected" page" into rvc-qpr-dev 2020-09-15 09:54:08 +00:00