Commit Graph

12758 Commits

Author SHA1 Message Date
Hugh Chen
b3640019f6 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)
(cherry picked from commit a50f020c85)
2020-10-13 01:08:17 +00:00
Jeff DeCew
5bfe1d3f9c Update NotificationChannelSettings Preferences in place to prevent re-layout.
(cherry picked from commit b409b64045)

Fixes: 110093185
Test: ChannelListPreferenceControllerTest
Change-Id: If6acf305c44085e502a3304ea57e409ce049b40f
Merged-In: If6acf305c44085e502a3304ea57e409ce049b40f
2020-10-12 20:06:48 -04: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
Xin Li
8656492241 Merge ab/6749736 in stage.
Bug: 167233921
Merged-In: I8e3eb6c072488fdc33fae1ebabd17980a67f5d7d
Change-Id: I0411c2f1dbc2fa47b23ff52cacca990f3141f52f
2020-10-08 23:40:50 -07: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
Sarah Chin
f3d7860c70 Hide 'View plan' button in data usage settings
There are currently no callers of the setSubscriptionPlan() API that
have a MDP app set up. Remove the button when SubscriptionPlans are
defined, since it does nothing and causes confusion for users.

Test: manually verify button does not exist when a plan is defined
Test: make RunSettingsRoboTests
Bug: 169806315
Change-Id: Ieda020bfa692e9465d6297e50cf338deff91a8a9
2020-10-08 21:03:39 -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
Andrei Onea
f21ba0c650 Add support for @EnabledSince compat changes
Bug: 49103556
Test: make RunSettingsRoboTests ROBOTEST_FILTER=PlatformCompatDashboardTest
Change-Id: Iaf83b1ef2f07a910a3590f59562c2f638b5a6089
2020-10-08 21:54:02 +01: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
Arc Wang
ca40e8d31c Merge "[Settings] Remove failure JUnit test cases" 2020-10-08 06:57:35 +00: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
Arc Wang
63e015962c [Settings] Remove failure JUnit test cases
This change removes all the files which have any failure JUnit test case.

Bug: 168429329
Test: atest --test-mapping tests/unit:postsubmit
Change-Id: I1665565760f9dfc185bf9b8dd871ee106eba5dd5
2020-10-07 21:26:09 +08: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
Alexander Dorokhine
01236ed32f Merge "Migrate away from deprecated Truth APIs." am: c5a500bf07 am: 1b69ab26e9 am: 94fa8e0921
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1449661

Change-Id: I82dd6eb5510fd7e35bd2c0473725dc24780ce219
2020-10-06 11:17:56 +00:00
Alexander Dorokhine
94fa8e0921 Merge "Migrate away from deprecated Truth APIs." am: c5a500bf07 am: 1b69ab26e9
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1449661

Change-Id: I86b367dd8c072aeb8de4a610e7cf6c19fc5c8287
2020-10-06 11:05:22 +00: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
6decca7890 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
Merged-In: I76f9c37cb699ce6ab8715ffe35d11668ccbceea1
Change-Id: I76f9c37cb699ce6ab8715ffe35d11668ccbceea1
(cherry picked from commit 46e85a2fad)
2020-10-06 00:25:04 -07: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
TreeHugger Robot
fafe12056c Merge "Hide tethering option when in a guest account" into rvc-qpr-dev am: ab41be5607
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12723406

Change-Id: I4caa8937deae9bc104c9c6c3446b7f793cac1f80
2020-10-06 02:25:09 +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
Betty Chang
e8fa746299 Merge "[Testing] Use AndroidJUnit4 instead in CellDataPreferenceTest" 2020-09-30 06:12:31 +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
Treehugger Robot
c0dbafc438 Merge "[Testing] Use AndroidJUnit4 instead in TelephonyBasePreferenceControllerTest" am: 93cec35cea am: b4093123de am: e13fa41a29 am: 722f9f4ea8
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1426565

Change-Id: I3f2fb62790ba30914d1b7a5555809954066e0455
2020-09-29 05:29:52 +00:00
Treehugger Robot
580963266b Merge "[Testing] use AndroidJUnit4 in new MobileDataPreferenceControllerTest" am: 27806fde5e am: e0890849cd am: 000159f6db am: 6513978872
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1426553

Change-Id: Ia6cbd95f410a4763b5a4a066b942e1fcd44b0fb1
2020-09-29 05:29:43 +00:00
Treehugger Robot
4d513437aa Merge "[Testing] use AndroidJUnit4 in new EuiccPreferenceControllerTest" am: 1cd8904fc5 am: 8c58bd4520 am: e570e80eb8 am: 24dc71f7e8
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1426562

Change-Id: I7ded23298875715dec1a48d9364a174639b7f92b
2020-09-29 05:29:33 +00:00
Treehugger Robot
6ace0ecdde Merge "[Testing] use AndroidJUnit4 in new MultiNetworkHeaderControllerTest" am: 3eeb8b44c2 am: 27978c5d47 am: 5f81bb9a07 am: bb98b793e5
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1426552

Change-Id: Ieb22f4b036c3a569acdf9ea4451fba7b5d7a9851
2020-09-29 05:29:21 +00:00
Treehugger Robot
7b7382fdf2 Merge "[Testing] Use AndroidJUnit4 instead in TelephonyTogglePreferenceControllerTest" am: 71c667322c am: 48c399c18a am: 7c9cc5621b am: 7f3bbcddf0
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1427808

Change-Id: Ia130edabc0cb44a787ef107641e39ead544d81af
2020-09-29 05:29:07 +00:00
Treehugger Robot
722f9f4ea8 Merge "[Testing] Use AndroidJUnit4 instead in TelephonyBasePreferenceControllerTest" am: 93cec35cea am: b4093123de am: e13fa41a29
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1426565

Change-Id: If21308e7f0e67eb39c791206f1e0ee05697b54e8
2020-09-29 05:14:28 +00:00
Treehugger Robot
6513978872 Merge "[Testing] use AndroidJUnit4 in new MobileDataPreferenceControllerTest" am: 27806fde5e am: e0890849cd am: 000159f6db
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1426553

Change-Id: I9e08c98c28e15bc5833d4c23e569a83840d40172
2020-09-29 05:14:19 +00:00
Treehugger Robot
24dc71f7e8 Merge "[Testing] use AndroidJUnit4 in new EuiccPreferenceControllerTest" am: 1cd8904fc5 am: 8c58bd4520 am: e570e80eb8
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1426562

Change-Id: I3bf65953a9751b8cfd9dab666f5b1ad400bbdd36
2020-09-29 05:14:11 +00:00
Treehugger Robot
bb98b793e5 Merge "[Testing] use AndroidJUnit4 in new MultiNetworkHeaderControllerTest" am: 3eeb8b44c2 am: 27978c5d47 am: 5f81bb9a07
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1426552

Change-Id: Ic774e63dd14139999e96210bc89476edc095e02b
2020-09-29 05:14:03 +00:00