Commit Graph

10713 Commits

Author SHA1 Message Date
Hugh Chen
e16a8077b5 Fix output switcher will show 2 media session when remote playing
Before this CL, output switcher will show 2 media sessions when
some apps are remote playing. The root cause is some apps will
also create local media sessions when they cast media to remote
playing.

This CL add condition to only show remote sessions on output switcher
if apps both have remote and local sessions.

Bug: 169052790
Test: make -j42 RunSettingsRoboTests
Change-Id: I80479d35b2bb2e353cf41f41f457f2dfd15cadbf
2020-10-14 17:58:47 +08:00
Yi Jiang
79dc82fb6f Merge "Merge Screen Attention and Screen timeout Settings." 2020-10-14 05:07:40 +00:00
TreeHugger Robot
2228c642b8 Merge "Fix crash on "Connection preferences"" 2020-10-14 03:36:43 +00:00
Yi Jiang
f5d1841c9d Merge Screen Attention and Screen timeout Settings.
Bug: 155051311
Test: atest
Change-Id: I6f6ee52618eab629a41b28982be32ead5f9ba08d
2020-10-13 00:47:13 -07:00
Hugh Chen
84fe29ae79 Fix crash on "Connection preferences"
This CL adds a null check condition to avoid crash for
some device not support PrintManager.

Bug: 159848003
Test: make -j42 SettingsGoogle
Change-Id: Ic6c4c17bb563458f4f5a61dc0d93ae22b05f8763
2020-10-12 15:58:55 +08:00
Jason Hsu
a5085443ff Merge changes I02f03ccb,I0ee46dd9
* changes:
  Extract UserShortcutType functions from ToggleFeaturePreferenceFragment
  Add data class PreferredShortcut to replace inner class UserShortcutType
2020-10-12 03:56:20 +00:00
tim peng
e5deddbe47 Merge changes from topic "update_entry"
* changes:
  Update rule of launching media output dialog
  Update OutputSwitcher from MediaOutputSlice to MediaOutputDialog in Settings
2020-10-12 01:03:27 +00:00
Hall Liu
9d39cc3d63 Merge "Replace TelephonyManager methods for mobile data" 2020-10-09 17:03:16 +00:00
Jiashen Wang
6265cf8e6c Merge "[SIM Dialog Migration] Migrate eSIM erase dialog" 2020-10-09 16:38:58 +00:00
Jiashen Wang
ff311a2107 [SIM Dialog Migration] Migrate eSIM erase dialog
Bug: 160819390
Test: Manually tested eSIM profile disabling.
Design: https://docs.google.com/document/d/1wb5_hoBkZVbkXGNWHbx4Jf61swjfxsJzkytiTzJosYo/edit?usp=sharing
Change-Id: I9523ee5dbab5b6a5ea020647a20992ac0b1aea86
2020-10-08 22:31:53 -07:00
Hall Liu
d67a1c3d8e Replace TelephonyManager methods for mobile data
TelephonyManager had a minor refactor of some of the methods revolving
around mobile data. Change code in Settings to use the new ones instead.

Bug: 169367013
Test: existing unit tests, manual
Change-Id: I7ebae37373d53fb2c59b6b546232dbddf77398d4
2020-10-08 19:37:57 -07:00
jasonwshsu
48b546eccf Extract UserShortcutType functions from ToggleFeaturePreferenceFragment
* Simplify StringJoiner to '+' since it only have one case
* Simplify Collections usage to use removeIf() and findFirst() directly
* Change class name SharedPreferenceUtils to PreferredShortcuts

Bug: 158540780
Test: atest ToggleFeaturePreferenceFragmentTest
Test: atest PreferredShortcutsTest
Change-Id: I02f03ccba09b6d7edaa5c0c8223ab3561a5e976b
2020-10-09 00:34:04 +00:00
jasonwshsu
26f1b5f65c Add data class PreferredShortcut to replace inner class UserShortcutType
* Add basic function equals(), hashcode() into data class
* Change flatternToString() to toString()
* Change constructor to fromString(flatternToString)

Bug: 158540780
Test: atest PreferredShortcutTest
Change-Id: I0ee46dd940d22ff9f168b95fe75d9cff2f0fddfb
2020-10-08 10:53:48 +00:00
timhypeng
eee759ea29 Update rule of launching media output dialog
-Do not hide Media Output Dialog in Settings, and let dialog handles
-Hide Media output slice panel when launching dialog

Bug: 155822415
Test: make -j50 RunSettingsRoboTests
Change-Id: I16732f625f100b259d6e53c85db40af0ec1652c5
2020-10-08 16:29:28 +08:00
timhypeng
3084d063f3 Update OutputSwitcher from MediaOutputSlice to MediaOutputDialog in Settings
-Update entry point at media indicator in volume panel
-Update entry point at remote media slice in volume panel
-Update entry point at remote volume group in Sound Settings
-Update entry point at media output preference in Sound Settings
-Hide Media output dialog when the caller is not active

Bug: 155822415
Test: make -j50 RunSettingsRoboTests
Change-Id: Ib6c86067522925c439f336644e4d027dbae3379c
2020-10-08 16:18:43 +08:00
TreeHugger Robot
5446e7a7c4 Merge "Add randomized MAC (last used)" 2020-10-08 03:42:00 +00:00
xshu
19eabbff63 Add randomized MAC (last used)
Makes it clear that when a network is disconnected, the randomized MAC
address shown is the last used one. (ie. it could change in the next
connection depending on whether enhanced MAC randomization is active)

Bug: 170166681
Test: Manually verified that the new text is shown for disconnected
networks.

Change-Id: I4aec47b2de68c077e6fdc7efa96d39e6666d4c86
2020-10-07 14:20:16 -07:00
TreeHugger Robot
351821e688 Merge "Preliminary classification for homepage IA grouping" 2020-10-07 11:40:13 +00:00
TreeHugger Robot
2489494cd3 Merge "Implement advanced device battery prediction" 2020-10-07 02:14:16 +00:00
Andras Kloczl
2ac45dd49e Add user name photo dialog to user creation in SysUI
- Move user creation dialog related resources to SettingsLib
- Change dialog showing logic in UserSettings because
   EditUserInfoController contracts have changed.
- Show UserCreatingDialog when user is being created
- Fix crash when phone is rotated during user creation

Test: manual test
Doc: http://shortn/_cJE9o6pBZR
Screenrecord: http://shortn/_Jy5Q0lTAUL
Bug: 147653252
Change-Id: I15e15ad88b768a5b679de32c5429d921d850a3cb
2020-10-06 20:43:52 +01:00
Yanting Yang
4dd4567bfc Preliminary classification for homepage IA grouping
Bug: 168166015
Test: robotest & visual
Change-Id: If02639d8a5b8886e036b30c5c654c27db5837b62
2020-10-06 20:40:53 +08:00
Hugh Chen
fa75a469da Implement advanced device battery prediction
This CL implements prediction of advanced device to
let users know what time their advanced device will
be out of battery.

Bug: 153706138
Test: make -j42 SettingsGoogle
Change-Id: Iadf2f1fa425ff5f0fa1abed681d82d13c392db62
2020-10-06 17:38:08 +08:00
TreeHugger Robot
1ae5e59c32 Merge "Move isMediaOutputDisabled() from Utils to LocalMediaManager" 2020-10-06 08:40:15 +00:00
Alexander Dorokhine
7aadf2da70 Merge "Migrate away from deprecated Truth APIs." 2020-10-06 07:06:00 +00:00
Tom Hsu
272c21911d Merge "[Settings] Refractor ApnSettings code to independent package folder." 2020-10-06 03:30:10 +00:00
Martijn Coenen
98c7ad9953 Revert "Kill uid when REQUEST_INSTALL_PACKAGES is denied"
This reverts commit 732edc3e39.
The kill is already done by StorageManagerService these days.

Bug: 133504844
Test: flip toggle, verify app is still killed.
Change-Id: I1de15108e1e214478c2b67701e95208f280195b6
2020-10-05 14:15:31 +02:00
PETER LIANG
4866b0ae7c Merge "Add test cases for legacy components." 2020-10-05 09:09:27 +00:00
Peter_Liang
7f0919aebe Add test cases for legacy components.
Bug: 168567356
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ColorPreferenceTest
&& make RunSettingsRoboTests ROBOTEST_FILTER=EdgeTypePreferenceTest

Change-Id: I7ffc0561c6124050fe8c37007e547facdf8ab278
2020-10-05 10:22:37 +08:00
Kevin Chyn
a8bf11979b Merge "Update settings together with frameworks/base" 2020-10-01 01:24:02 +00:00
tom hsu
2fd7c9ffd1 [Settings] Refractor ApnSettings code to independent package folder.
Bug: 169750507
Test: make RunSettingsRoboTests
Change-Id: I8b2709ba8d16c625863d8a17abc3d0ab5d019bb8
2020-09-30 15:56:01 +00:00
TreeHugger Robot
5709f7a083 Merge "Do nothing when choosing file transfer when in accessory mode" 2020-09-30 06:54:29 +00:00
Hugh Chen
3251a04ba3 Do nothing when choosing file transfer when in accessory mode
- Before this CL, the device will be disconnected and reconnected
  to accessory mode when choosing "File transfer/Android Auto" in
  accessory mode. Because the USB menu didn't check state of
  function, it should do nothing when choosing
  "File transfer/Android Auto" in accessory mode.

  This CL add condition to check state of function, it will do
  nothing when choosing "File transfer/Android Auto" in
  accessory mode.

Bug: 162451162
Test: make -j42 RunSettingsRoboTests
Change-Id: I1749c6c43d2a192e4ce1bf1ae5343ff8deafbe48
2020-09-30 11:19:31 +08:00
Kevin Chyn
587bd62dff Update settings together with frameworks/base
Bug: 169459906
Test: Builds

Exempt-From-Owner-Approval: Name change

Change-Id: I453d743fe29c33776a784942863dcba19c67c26a
2020-09-29 18:19:16 -07:00
Hugh Chen
c07b475843 Move isMediaOutputDisabled() from Utils to LocalMediaManager
- Move isMediaOutputDisabled() from Utils to LocalMediaManager.
  The isMediaOutputDisabled() is used to check whether should
  disable the entry point of media output, it's not a general
  method for Settings. To reduce the usage of Utils.java,
  it's better to let LocalMediaManager handle this method.
- Add test cases.

Bug: 169378895
Test: make -j42 RunSettingsRoboTests
Change-Id: I5dbed2ad4de6dca8105414f8b7d7ce7141e258bd
2020-09-29 11:27:39 +08:00
TreeHugger Robot
f0cdd9cdb4 Merge "Hide tethering option when in a guest account" 2020-09-28 09:11:39 +00:00
Hugh Chen
bde627b263 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
2020-09-28 11:20:31 +08:00
PETER LIANG
24e31fa068 Merge "Add test cases for legacy components." 2020-09-26 09:22:01 +00:00
jasonwshsu
1a1ae82460 Modify flow in ToggleFeaturePreferenceFragment
* Show edit shortcut dialog should belong to the basic feature, so move
them back to ToggleFeaturePreferenceFragment
* Add test cases for UserShortcutType to prepare to further refactor

Bug: 158540780
Test: atest ToggleFeaturePreferenceFragmentTest
Change-Id: Ia84bea5581f85d199f395b2065652ce69738abbf
2020-09-26 04:30:04 +00:00
Peter_Liang
96ea49a38b Add test cases for legacy components.
Bug: 168567356
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AnimatedImagePreferenceTest
&& make RunSettingsRoboTests ROBOTEST_FILTER=DividerAllowedBelowPreferenceTest
&& make RunSettingsRoboTests ROBOTEST_FILTER=DividerSwitchPreference

Change-Id: Ibe1add4ac6509f456ea76a6053f43c894e410eeb
2020-09-26 11:03:13 +08:00
Hugh Chen
b6840ced0d 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
2020-09-25 02:38:19 +00:00
Alexander Dorokhine
46e85a2fad Migrate away from deprecated Truth APIs.
This is a transitional step towards truth 1.0.1, where these APIs have
been completely removed.

Bug: 168765701
Test: m checkbuild
Change-Id: I76f9c37cb699ce6ab8715ffe35d11668ccbceea1
2020-09-24 23:09:41 +00:00
Kevin Chyn
9096f09405 Merge "Update settings together with frameworks/base" 2020-09-23 21:33:35 +00:00
Wesley.CW Wang
ff0e65c7f7 Add intent extra when launching WallpaperPicker from SUW and Settings
- Add extra to these intents to help WallpaperPicker log the launch
 source

Bug: 154781896
Test: make SettingsRoboTests
Change-Id: Ifb0ed22ab8ebfbb3c2ad24e9b7bad80007162b6e
2020-09-23 08:06:52 +00:00
Kevin Chyn
8d63b98272 Update settings together with frameworks/base
Bug: 169195610
Test: Builds
Change-Id: I2c732dba78eb8c90ef71351562415e06949b31bb
2020-09-23 00:17:56 -07:00
TreeHugger Robot
89cc479bd8 Merge "Disable bubbles for low ram devices" into rvc-qpr-dev am: f9469f109a am: 3bce073370
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12620222

Change-Id: I3485643cce554f1b028ed35d20b9ea4ed500cc73
2020-09-22 17:56:32 +00:00
TreeHugger Robot
3bce073370 Merge "Disable bubbles for low ram devices" into rvc-qpr-dev am: f9469f109a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12620222

Change-Id: I90731be022b3bc354cc1cb00e1b23a4cd1dd791f
2020-09-22 17:36:40 +00:00
TreeHugger Robot
f9469f109a Merge "Disable bubbles for low ram devices" into rvc-qpr-dev 2020-09-22 17:11:41 +00:00
PETER LIANG
ed3944ae64 Merge "Fix the Real Time Text option was shown in accessibility settings under active Fi." 2020-09-22 13:08:01 +00:00
TreeHugger Robot
e02dda0aab Merge "Hide the icon if there is no media session or album art." into rvc-qpr-dev am: e9d4e584d5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12613116

Change-Id: Id1ecd31b8ad1b6290ad7fda12a7752f55655ad2b
2020-09-22 03:50:01 +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