Commit Graph

11006 Commits

Author SHA1 Message Date
SongFerng Wang
c3703cb4fe Revert "Mainline: removed legacy UI for network selection mode."
This reverts commit 521ebeafd3.

Reason for revert: to fix b/157880043

Bug: 157880043
Test: test legacy UI. PASS
Change-Id: I4116457a1f7fc0a3be142671c5d0439cd6bdf11d
2020-06-12 19:03:54 +08:00
tim peng
b2ab3dfff2 Merge "Output switcher panel requires large title icon for Slice slider style" into rvc-dev am: c21406a0a2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11818502

Change-Id: Id609ee38c9b5230def2c8d1cffb7aac8e209e4e6
2020-06-12 05:10:33 +00:00
tim peng
c21406a0a2 Merge "Output switcher panel requires large title icon for Slice slider style" into rvc-dev 2020-06-12 04:58:04 +00:00
Tim Peng
27b0ef6eb3 Output switcher panel requires large title icon for Slice slider style
-Add "VIEW_TYPE_SLIDER_LARGE_ICON" to be a new panel type which would enlarge its title icon
-Set "VIEW_TYPE_SLIDER_LARGE_ICON" to MediaOutputPanel and MediaOutputGroupPanel
-Extend slider style and add customized icon size
-Add test cases

Bug: 157208551
Test: make -j42 RunSettingsRoboTests
Change-Id: I9b4de4aa552e8b26e766411f7eff93ea1a2d1910
2020-06-12 11:22:17 +08:00
Jason Chiu
f7afded1d1 Fix Slice not pinned error
Slices should be pinned before being bound. The original design calls
registerSliceCallback() to pin a slice, and then calls bindSlice() and
passes the result to the callback directly. When the callback is
called, it executes unregisterSliceCallback() and unpins the slice.

However, registerSliceCallback() starts to observe the slice change and
then rebind it in an AsyncTask. If the slice is updating via its
background worker and the timing of the binding overlaps the callback
execution, it's possible to bind the slice right after unpinning it and
causes the error.

The solution is to remove the callback mechanism, and just to pin, bind
and unpin the slice directly.

Fixes: 157387583
Test: robotest
Change-Id: I8748dd3038a3662599935f07420d07cf254a4073
2020-06-12 04:14:46 +08:00
TreeHugger Robot
4327cd65cc Merge "Don't pass channel info for the bubble app page" into rvc-dev am: d6081039c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11636410

Change-Id: Icc6c824db2ad89a8a18fdcdcd595afc4f406aa6d
2020-06-11 17:37:14 +00:00
TreeHugger Robot
d6081039c6 Merge "Don't pass channel info for the bubble app page" into rvc-dev 2020-06-11 17:23:56 +00:00
markchien
17feecffae Replace ConnectivityManager as TetheringManager
Tethering APIs are all move to TetheringManager from Android R.
1. Replace ConnectivityManager tethering API usage as TetheringManager.
2. Use TetheringManager#stopTethering to disable usb tethering instead
of using deprecated ConnectivityService#setUsbTethering
3. Use TetheringManager#stopTethering to disable bluetooth tethering
instead of directly use BluetoothPan#setBlueoothTethering. So bluetooth
getProfileProxy is not needed in TetherService because tethering would
do that when calling #stopTethering.
4. Also support TETHERING_ETHERNET entitlement check that
TETHERING_ETHERNET is new added from Android R.

Bug: 146918263
Test: atest TetherServiceTest
Change-Id: Id969f29d7210f2ee32719c76439049bbc86cd4f6
2020-06-11 23:36:59 +08:00
Mady Mellor
87e16f416f Don't pass channel info for the bubble app page
Fixes: 157485149
Test: make SettingsUnitTests; adb shell am instrument etc
Change-Id: If8d9b446ed056996cda91fcc5e92c7077ff3ea5d
2020-06-11 08:33:45 -07:00
markchien
257b9bcdfa Remove schedule recheck logic from TetherService
This change just remove unused code.
Tethering no longer ask TetherService to schedule recheck
(use #EXTRA_SET_ALARM) from Android Q. Intead Tethering
(EntitlementManager) would schedule the recheck by itself.

This change is necessary in order to move the resourcesout
of the framework because TetherService needs to know when
it need to re-run entitlement recheck from framework res
(config_mobile_hotspot_provision_check_period).

Bug: 146918263
Test: atest TetherSerivceTest
Change-Id: Ie45859c19b96d0689c45dd610501fae0506742ff
2020-06-11 23:28:49 +08:00
András Klöczl
974efbd7f2 Merge "Change user setup prompt dialog showing logic" into rvc-dev am: f8754b4deb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11686951

Change-Id: Ie3c8012398740f0629ef89fce1574cb21f91667d
2020-06-11 09:01:15 +00:00
András Klöczl
f8754b4deb Merge "Change user setup prompt dialog showing logic" into rvc-dev 2020-06-11 08:47:07 +00:00
Yanting Yang
62b15ac669 Update App info behavior for mainline module
As requested by framework team, the mainline module should be considered
as system apps and not stoppable and disable-able. Since many of these
modules provide critical functionality, disabling them can result in a
very unstable device.

According to the request, Settings will apply below changes to App info
page for protecting mainline modules:
- Hide "Force stop" and "Disable" in App info.
- Disable "Clear storage" and "Clear cache" in "Storage & cache".

Since the mainline module checking API interface changed, also change
the dependent files and test cases.

Fixes: 156955322
Test: robotest and verify "Cell Broadcast Service" in App info
Change-Id: Ibc239bdaf3364eda541a33add382364cfdc6fc9b
2020-06-11 13:04:55 +08:00
TreeHugger Robot
4af89f865c Merge "Add app icons to leasee view in shared data dev options." into rvc-dev am: 6647ac93d4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11817586

Change-Id: I62a98c1cd351bc6ea74e69a5a79b833c06ee5402
2020-06-10 07:53:11 +00:00
TreeHugger Robot
6647ac93d4 Merge "Add app icons to leasee view in shared data dev options." into rvc-dev 2020-06-10 07:35:36 +00:00
TreeHugger Robot
42ddde2d73 Merge "Fix blocked notifications screen" into rvc-dev am: 1528d932ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11808483

Change-Id: If2fd41dbb50a4908962fdcbcd40ec08e9a9b8860
2020-06-10 06:15:26 +00:00
Varun Shah
8d5cb9a2d0 Add app icons to leasee view in shared data dev options.
Also disable clicking the header view and list items in the same view.

Bug: 156671006
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SharedDataPreferenceControllerTest
Test: manual (visual)
Change-Id: I2821bc6cdc523097283ab44b864088278850be53
2020-06-09 19:04:36 -07:00
Andras Kloczl
4e2a0717c9 Change user setup prompt dialog showing logic
- Extract user setup prompt dialog creation logic
- Move user setup prompt dialog showing to UserDetailsSettings
- Rename user click and creation related methods to improve readability
- Set "disabled by admin" for switch pref when switch is disabled
- Cleanup UserSettings and UserDetailsSettings onPreferenceClick
- After a guest is created the details page opens instead of switching

Test: Manual test and robo tests with this command:
  make -j64 RunSettingsRoboTests
Demo: http://shortn/_ACYsnbIKO9
Bug: 156867277
Change-Id: Ifa0cdefcd49d5b865e940a7cc332136ed26ecf57
2020-06-09 23:06:00 +00:00
Julia Reynolds
425504c2de Fix blocked notifications screen
Don't filter out apps have don't have any usage events -
the package's notifications are still blocked

Test: atest, and verify that the packages match the 'blocked
count' subtext on the previous screen on an affected device
Fixes: 158343184

Change-Id: Iac01708849e3ae0b82f97db679ce512fc9675a17
2020-06-09 12:25:15 -04:00
Stanley Wang
b9b28441ee Merge "Add the "Smart Lock" item to dynamic index." into rvc-dev am: 37d5ed5073
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11544230

Change-Id: Ib7d80f647fad736266d1930e6eef08d660cccdea
2020-06-09 11:54:48 +00:00
Stanley Wang
37d5ed5073 Merge "Add the "Smart Lock" item to dynamic index." into rvc-dev 2020-06-09 11:46:09 +00:00
Stanley Wang
d1a7a5618e Add the "Smart Lock" item to dynamic index.
- The "Smart Lock" item is a trust agent which comes from
  TrustAgentManager, so add it to dynamic index.

Fixes: 148867137
Test: manual test the search result and run Settings robotest
Change-Id: I7cd3a9df89a9b9378fa49cc2cb2127c778b795f2
2020-06-09 17:48:43 +08:00
TreeHugger Robot
7014feb9a7 Merge "Add blob size to shared data dev options screens." into rvc-dev am: eef7b5e7e3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11764432

Change-Id: Id8ad9c5edcb475c26e3474af7c53ce1422d68291
2020-06-09 06:43:30 +00:00
TreeHugger Robot
7d31298291 Merge "Add a new method to set state description" into rvc-d1-dev 2020-06-08 05:18:20 +00:00
Varun Shah
c920a58d5f Add blob size to shared data dev options screens.
Bug: 156671006
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SharedDataPreferenceControllerTest
Test: manual (visual)
Change-Id: Ia98c3d9812f6225ee834b4d1b0f12a1a73a87598
2020-06-05 22:19:26 -07:00
Amy Hsu
b35b78b3b6 Add Smooth Display option to developer in Settings
Force to the highest refresh rate.

Bug: 137064289
Test:$ adb root
$ adb shell "echo 1 > /d/tracing/events/sde/enable"
$ adb shell "echo 1 > /d/tracing/tracing_on"
$ adb shell "cat /d/tracing/trace_pipe" | grep FPS

Change-Id: Ia1f804cbc7e297a85591e6b0f293ca1014301b74
2020-06-06 02:14:20 +08:00
Hugh Chen
2e5e04e79d Add a new method to set state description
- This CL add a new method setSeekBarStateDescription() to set
  the state of seek bar. Because in some case the description of
  seek bar is not align progress of seek bar.
- Add test case

Bug: 157629483
Test: make -j42 RunSettingsRoboTests
Change-Id: I432e6f9deef59756b0a41244d50aaada1ddac6a9
2020-06-05 15:00:45 +08:00
TreeHugger Robot
f420d0f310 Merge "Hide "Open by default" entirely for browser apps" into rvc-dev 2020-06-04 08:12:11 +00:00
TreeHugger Robot
74755ac915 Merge "Revert "Stop usb tethering when user cancel it"" into rvc-dev 2020-06-04 04:24:55 +00:00
Yi-Ling Chuang
4ff357addc Hide "Open by default" entirely for browser apps
Browsers are explicitly treated outside the web link infrastructure, so
we shouldn't offer "Open by default" section.

Fixes: 129162570
Test: robotests
Change-Id: Ie63d5fbfb32eaed4bba8a80158b6bb19bb45b380
2020-06-03 16:21:51 +08:00
Hugh Chen
737ec77c4f Revert "Stop usb tethering when user cancel it"
This reverts commit 9546b7fdcb.

Reason for revert: This CL will have side effort, when switch from "USB tethering" to "MTP/PTP/Midi" mode, DUT will jump to "No data transfer".
Revert this CL and have good solution to address b/154933817

Bug: 156318036
Test: build pass
Change-Id: Ia79b7a9f5d71c15244b147f5ef26af47c1c1fc7c
2020-06-03 03:35:48 +00:00
Bonian Chen
68cc44bb77 Merge "[Settings] Move mobile data template out of framework" into rvc-dev 2020-06-02 14:36:20 +00:00
Bonian Chen
d40f7f707e [Settings] Move mobile data template out of framework
Move mobile data template out of framework

Bug: 151751844
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DataUsageLibTest
Change-Id: I5072cd1e673194d00b3ce82242bf5fbad88d23cd
2020-06-02 17:16:53 +08:00
TreeHugger Robot
62ec08f7bd Merge "Suppress battery saver suggestion notification" into rvc-dev 2020-06-02 07:18:54 +00:00
TreeHugger Robot
8ab31819e0 Merge "Add a setting for allowing overlays on Settings app" into rvc-dev 2020-06-02 06:58:26 +00:00
Mill Chen
418c85f139 Suppress battery saver suggestion notification
When users turn on battery saver manually more than 3 times, the "Tap to
schedule Battery Saver" notification will suggest users to enable
scheduling battery saver. But this notification is still shown if users
have already turned on scheduling battery saver, which is caused by no
mechanism to suppress this notification.

Solution:
Adding a mechanism to suppress battery saver suggestion if users
scheduled battery saver.

Bug: 147862112
Test: robotests
Change-Id: I8290d76dac09104e64fb98b8a9f4d783a8177d7c
2020-06-02 13:50:48 +08:00
TreeHugger Robot
55b7890150 Merge "Fix contextual card robotests." into rvc-dev 2020-06-02 05:10:02 +00:00
Tsung-Mao Fang
f6841ef548 Add a setting for allowing overlays on Settings app
In the past, we allowed non system overlays on user-debug rom.
Acoording to the user-debug guildline, we should not have differnt
behavior between the user build and user debug rom.

To maintain the consistency between user and user debug rom,
We're creating a new developer setting for allowing non-system overlay on
Settings. By default, we don't allow any non-system app overlays on
Settings app unless user turns it on explictly.

Test: Run robotest. Turn on setting, see the overlays on Settings.
Turn off setting, do not see the overlays on Settings.
Fix: 144989059

Change-Id: I87f00a2eda91de003c6e542e7ec45a066f46fbf7
2020-06-02 12:32:43 +08:00
TreeHugger Robot
0886e90888 Merge "Remove High usage battery tip from Settings homepage." into rvc-dev 2020-06-02 03:52:52 +00:00
SongFerng Wang
4432ac9c7e Merge "Revert "EnabledNetworkModePreferenceController Remove AllowedNetworkType"" into rvc-dev 2020-06-02 02:54:17 +00:00
Yi-Ling Chuang
5e082cb401 Fix contextual card robotests.
We have to set SUPPORTED_SPECS for slice to test.

Fixes: 157904094
Test: robotests
Change-Id: I9f8edd7232d772b2376d4e6ec1e4738bc01ee4aa
2020-06-02 10:21:24 +08:00
Fabian Kozynski
43527ef8f4 Merge "Use PackageManager.FEATURE_CONTROLS to decide availability" into rvc-dev 2020-06-01 20:21:36 +00:00
TreeHugger Robot
f1fbba45d3 Merge "Improve multi user functionality for restricted users" into rvc-dev 2020-06-01 15:29:34 +00:00
Yi-Ling Chuang
3e9fb7c765 Remove High usage battery tip from Settings homepage.
Remove this card since it is not actionable.

Fixes: 157131344
Test: robotests
Change-Id: I562e4bec84429f885911bd99461edbe10bad537a
2020-06-01 19:06:16 +08:00
SongFerng Wang
893107fc60 Revert "EnabledNetworkModePreferenceController Remove AllowedNetworkType"
This reverts commit 259e6288c9.

Reason for revert: Sooraj will implement another API for power manager.
Bug: 156709797
Change-Id: I15ee2799574cdf0318e593500f0dbfbf135d71f8
2020-06-01 06:25:13 +00:00
Julia Reynolds
3d613bb6c9 Only show Bubbles link for messaging apps
Apps that have sent at least one valid conversation

Test: manual, atest
Fixes: 156033178
Change-Id: If4fff6810f2e390ba0ad0f7587b8d8c2d5819c93
2020-05-29 14:51:06 -04:00
Fabian Kozynski
d0d07ddceb Use PackageManager.FEATURE_CONTROLS to decide availability
Using this features, some of the Preference in Power Menu Settings can
change their availability and their summary.

Test: Robotest Settings
Fixes: 157244528
Change-Id: I704438dda181aa6347c3f168ac5ef6bd16148993
2020-05-29 13:12:08 -04:00
Andras Kloczl
106431e525 Improve multi user functionality for restricted users
- Restricted users can change their name
- Improved App&Content access screen
- Remove "Turn on phone calls" from restricted user detail page

Doc: http://shortn/_Prb3SJ3xJ3
Bug: 142798722
Test: Run robo tests with this command:
  make -j64 RunSettingsRoboTests
Change-Id: I2aadf32aef52ba5ad0db7aa0cd83bac9d9941589
(cherry picked from commit f4759e00d5)
2020-05-29 12:55:18 +00:00
TreeHugger Robot
ff35a3e641 Merge "Fix the janky transition of contextual cards." into rvc-dev 2020-05-29 11:51:51 +00:00
TreeHugger Robot
1e0bb9f528 Merge "Cleanup notification channel slice" into rvc-dev 2020-05-29 10:55:53 +00:00