Commit Graph

100332 Commits

Author SHA1 Message Date
Yuri Ufimtsev
d27a463baf Merge "Use FakeFeatureFactory in SafetySourceBroadcastReceiverTest" into tm-dev 2022-02-24 08:54:01 +00:00
Xiao Ma
2771fcaa8e Merge "Adapt new EthernetManager APIs in Settings." am: 3340b8e3c3 am: b3fedd0633 am: 397b3fe978
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1968461

Change-Id: Ie5150b1987653c52d922af1a057df39553ccf7b4
2022-02-24 06:07:48 +00:00
Xiao Ma
397b3fe978 Merge "Adapt new EthernetManager APIs in Settings." am: 3340b8e3c3 am: b3fedd0633
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1968461

Change-Id: Ifd244bd60e65937c510a5447c9642225be400e3f
2022-02-24 05:46:28 +00:00
Xiao Ma
b3fedd0633 Merge "Adapt new EthernetManager APIs in Settings." am: 3340b8e3c3
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1968461

Change-Id: Icc3b8d9fd42ee9712cfc81c74ae886576695ee2a
2022-02-24 05:22:10 +00:00
Xiao Ma
3340b8e3c3 Merge "Adapt new EthernetManager APIs in Settings." 2022-02-24 04:58:26 +00:00
Xiao Ma
db7d7de3b4 Adapt new EthernetManager APIs in Settings.
EthernetManager is going to be moved to Connectivity mainline module and
new EthernetManager management APIs have been exposed. This CL adapts
new APIs in the settings in advance, the changes include:

1. use addInterfaceStateListener and removeInterfaceStateListener.
2. rely on the onInterfaceStateChanged callback to receive the Ethernet
   interface state update, to replace the getAvailableInterfaces and
   getConfiguration.
3. after the Ethernet mainline migration completes, Settings cannot
   access the platform resource such as config_ethernet_iface_regex,
   instead, check the availability of Ethernet interface by checking
   if either any of FEATURE_ETHERNET and FEATURE_USB_HOST is supported.

Bug: 210586283
Bug: 218798003
Test: m
Test: manually verify that device can access the Internet via Ethernet
Test: manually verify that device can share the Internet via Ethernet
      tethering
Test: make RunSettingsRoboTests ROBOTEST_FILTER=<modified test cases>
      EthernetTetherPreferenceControllerTest
      AllInOneTetherSettingsTest
Change-Id: I9e10481e1751975772a24db29568aa26bb85cd70
2022-02-24 01:49:57 +00:00
TreeHugger Robot
2164070f4a Merge "Update TARE UI." into tm-dev 2022-02-24 01:27:56 +00:00
TreeHugger Robot
42156e7ba9 Merge "Reset all TARE constants." into tm-dev 2022-02-23 21:34:34 +00:00
Kweku Adams
2d12b846d4 Update TARE UI.
1. Connect the UI and controller components so that users can make
   changes and the changes will be written to settings and properly read
   back.
2. Update string constants to reflect changes from TIP1.
3. Refactor components slightly to reduce duplicate code.
4. Hide unsupported factors for now. They'll be added back later.

Bug: 158300259
Test: Manually change factors and check settings constant via adb
Change-Id: I2b70e7013c4766ea50f1f013da582eca74015c6b
2022-02-23 21:20:25 +00:00
TreeHugger Robot
ad1a789a86 Merge "Ensure icons on app filtering page" into tm-dev 2022-02-23 20:05:34 +00:00
TreeHugger Robot
78d917cc14 Merge "Clean up code." into tm-dev 2022-02-23 19:16:39 +00:00
Julia Reynolds
de08d984ef Ensure icons on app filtering page
Test: BridgedAppsPreferenceControllerTest.java, manually look at screen
Fixes: 218724983
Change-Id: I6ee4bb6c39efacecff5c4219dbe9fdb066c49368
2022-02-23 12:25:49 -05:00
Kweku Adams
bc3304b6a2 Clean up code.
1. Create a method for duplicate code.
2. Address style/lint issues.
3. Properly parse settings constant string. The original iteration
   wouldn't reset values to their default if the constant string didn't
   have a value set.

Bug: 158300259
Test: manual
Change-Id: I994b872ba16f12c8e06ce85aedc526b84e5fa31b
2022-02-23 16:30:08 +00:00
Kweku Adams
ba685c0be0 Switch from androidx to android.
The rest of the TARE classes use pure Android Fragments and will have an
issue trying to create an androidx Fragment, so switch from using an
androidx Fragment to an android Fragment.

Bug: 158300259
Test: manual
Change-Id: I4c27198a66bd51b3822421116b46ae3d80d589ff
2022-02-23 16:04:45 +00:00
Kweku Adams
a6693df48d Reset all TARE constants.
Reset all TARE constants, not just the enabled status, when a user
clicks on "Reset to defaults."

Bug: 158300259
Test: manual
Change-Id: I5328c7790729e3358751e703271a6ffd386bb33f
2022-02-23 16:03:10 +00:00
Yuri Ufimtsev
5d69ff508a Use FakeFeatureFactory in SafetySourceBroadcastReceiverTest
Test: atest SettingsUnitTests

Bug: 215517420
Change-Id: I5beefa766440dd86a5b159160699c3bc0ca46e0c
2022-02-23 14:48:14 +00:00
Marie Matheson
d4822fe6b4 Use primary profile lock settings string in Safety Source, not work profile
Test: atest CtsSafetyCenterTestCases
Bug: 215518847
Change-Id: I1c7ddbeb05be81fa902fcb4e42868ddd770d2dc0
2022-02-23 13:42:03 +00:00
Marie Matheson
67c0b83f7f Merge "Merge SafetyCenterStatusHolder into SafetyCenterManagerWrapper" into tm-dev 2022-02-23 13:34:15 +00:00
TreeHugger Robot
d3cb79a127 Merge "Cache mechanism for Storage page" into tm-dev 2022-02-23 12:13:38 +00:00
TreeHugger Robot
4003526dd5 Merge "Fix incorrect colored bar when task bar is hidden" into tm-dev 2022-02-23 10:43:03 +00:00
Christian Göllner
1a160636b5 Merge "Add support for device state based auto-rotation preferences in Settings." into tm-dev 2022-02-23 10:41:24 +00:00
Tsung-Mao Fang
39c8905f4c Fix incorrect colored bar when task bar is hidden
Set backgorund color on content id view instead of homepage view.
Also setup edge to edge for the homepage.

Fix: 215440529
Test: See correct ui on the two pane mode and regular phone.
Change-Id: I2d5988a489410e9620137bd6cf9607768787d4fc
2022-02-23 10:41:14 +00:00
Mill Chen
c23be3fa16 Cache mechanism for Storage page
- Use SharedPreference to cache the size info
- Improve the flicker problem on Documents & other preference
- The jobs are destroied on onPause to prevent the jobs being
  restarting when back to Storage page
- Enable progress bar animation for each storage item

Bug: 191117970
Test: manual test
1) The loading spinner will be shown when entering Storage page
   at first time.
2) Back to Settings homepage and switch back to Storage page, the
   loading spinner shouldn't be shown.
3) Click each preference in the Storage page and switch between these
   pages, the size info should be updated if something removed and the
   order of preference shouldn't be changed.

Change-Id: I75533742a025dc61116207285a894ee728d0af68
Merged-In: I75533742a025dc61116207285a894ee728d0af68
(cherry picked from commit 77775a66f2)
2022-02-23 08:15:14 +00:00
Kweku Adams
82b0e1ccdb Simplifying settings string generation.
Remove duplicate code for generating the settings constant strings, and
make sure not to write redundant data (setting a value to its default).

Bug: 158300259
Test: Android builds
Change-Id: Id79bae3685bfecb4858574ee38b67b2a554823fe
2022-02-22 18:52:35 +00:00
Marie Matheson
ce321f0dd0 Merge SafetyCenterStatusHolder into SafetyCenterManagerWrapper
Test: SettingsUnitTests
Bug: 220384387
Change-Id: I3886d3cf4717b5c7efd99ebd8ffb6a039e3565a4
2022-02-22 16:36:17 +00:00
Yuri Ufimtsev
6368af8bdf Merge "Provide data to LockScreenSafetySource" into tm-dev 2022-02-22 14:21:40 +00:00
Yuri Ufimtsev
9bc5f2ee0d Merge "Move all the shared data from biometric controllers to separate utility classes" into tm-dev 2022-02-22 14:20:51 +00:00
Yuri Ufimtsev
268d1d6dc6 Move all the shared data from biometric controllers to separate utility classes
Test: atest SettingsUnitTests

Bug: 215517420
Change-Id: Ic5421cd910ae77d4e7c0a29ae0337edb98a1d3b9
2022-02-22 10:35:45 +00:00
Hugh Chen
827910d3c3 Show prediction time when both value are ready
Bug: 215767460
Test: make -j64 RunSettingsRoboTests
Change-Id: I07947b3eca1f656e0dc603f9b9839825dd3149fd
2022-02-22 05:38:33 +00:00
Kweku Adams
01ad893e8c Merge "Update constant names." into tm-dev 2022-02-22 01:20:10 +00:00
Menghan Li
24abb535ed Merge "Show different tooltips for QS features auto-added and non-auto-added" into tm-dev 2022-02-21 21:15:01 +00:00
Christian Göllner
ff9065ac95 Add support for device state based auto-rotation preferences in Settings.
- Creates new preferences that are shown when device-state rotation
  is supported.
- Hides standard preferences when device-state rotation is supported.
- Controllers/Preferences for individual folded/unfolded rotation
  settings are created and added programatically based on the settable
  device states available.

Test: Manually + Unit tests
Bug: 195757480
Change-Id: I16f50fd3664756b363c7eb79e5c35eb0d3b6df17
2022-02-21 17:18:04 +01:00
Wesley Wang
a01477087c Merge "Refactor compact battery status method (1/2)" into tm-dev 2022-02-21 09:25:33 +00:00
menghanli
cad616bd9a Show different tooltips for QS features auto-added and non-auto-added
There are 2 different kinds of auto-added / non-auto-added illustrations in QS tooltips for framework features. Show animation in the settings page for full flow for non-framework services.

Bug: 218968108
Test: manual testing
Change-Id: I9c95c9f3e60ce94ce4059e27ef93c1dacce7a5c7
2022-02-21 15:49:18 +08:00
Menghan Li
100a1f9990 Merge "Fix two intro strings for Magnification page during Suw" into tm-dev 2022-02-21 07:04:38 +00:00
Wesley Wang
6cd9fc0a7e Refactor compact battery status method (1/2)
- Move compact battery status logic into libs

Bug: 219650786
Test: make SettingsRoboTests
Change-Id: Icc53c8d88235bffedfb51a3526668277fcbf4f40
2022-02-21 06:34:46 +00:00
Yuri Ufimtsev
fc9b13e865 Provide data to LockScreenSafetySource
Test: atest SettingsUnitTests

Bug: 215515298
Change-Id: I59640e9f691754a2225870d40f5db3e6fd8557f8
2022-02-18 23:47:42 +00:00
Kweku Adams
2a51b8bfe0 Update constant names.
Updating references based on changes for TIP1. This change is just to
keep things building properly. Updates to the UI and functionality will
be done separately.

Bug: 158300259
Test: Android builds
Change-Id: I3a50c028fe69a6180ae842d3117b5cdfd712e0fd
(cherry picked from commit b05665fa83)
2022-02-18 21:55:13 +00:00
TreeHugger Robot
dff5a34eed [automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-qpr1-dev am: 1c5ae8a124 -s ours am: 1a2962d15b -s ours am: e647298264 -s ours
am skip reason: subject contains skip directive

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

Change-Id: I919509a9dd95115228db54984529c6bbe89324d2
2022-02-18 18:02:31 +00:00
Bill Yi
503240098d [automerger skipped] [automerged blank] Import translations. DO NOT MERGE ANYWHERE 2p: bfb1c0090c am: 382229bcb6 -s ours am: be2ae00267 -s ours am: e29c0bb725 -s ours
am skip reason: subject contains skip directive

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

Change-Id: If3a3114cc6b164e8dbc073f6adb77ee9272f2718
2022-02-18 18:01:52 +00:00
Bill Yi
45e3ec1efa [automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: b45dc4ca74 -s ours am: e2d91a630e -s ours
am skip reason: subject contains skip directive

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

Change-Id: I2465ea56326a9646fdc01fbc08f1e59833c0bed0
2022-02-18 18:00:44 +00:00
TreeHugger Robot
e647298264 [automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-qpr1-dev am: 1c5ae8a124 -s ours am: 1a2962d15b -s ours
am skip reason: subject contains skip directive

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

Change-Id: Ib0efa9857c3e46969c664f6460b793aa2518844a
2022-02-18 17:50:08 +00:00
Bill Yi
e29c0bb725 [automerger skipped] [automerged blank] Import translations. DO NOT MERGE ANYWHERE 2p: bfb1c0090c am: 382229bcb6 -s ours am: be2ae00267 -s ours
am skip reason: subject contains skip directive

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

Change-Id: I0b51595a36d4dcee8c6f6833d05e96a3f697c063
2022-02-18 17:49:34 +00:00
TreeHugger Robot
1a2962d15b [automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-qpr1-dev am: 1c5ae8a124 -s ours
am skip reason: subject contains skip directive

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

Change-Id: Iea951572b963b5d7c01f2c98fb298b4c579bc3e8
2022-02-18 17:40:19 +00:00
Bill Yi
be2ae00267 [automerger skipped] [automerged blank] Import translations. DO NOT MERGE ANYWHERE 2p: bfb1c0090c am: 382229bcb6 -s ours
am skip reason: subject contains skip directive

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

Change-Id: Ibf22d45eb3d5056bc345ec241c29663a5922b51a
2022-02-18 17:39:27 +00:00
Bill Yi
e2d91a630e [automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: b45dc4ca74 -s ours
am skip reason: subject contains skip directive

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

Change-Id: Ibd6af66701dbe80bcbe1d070ab8ba50e4410387c
2022-02-18 17:37:09 +00:00
TreeHugger Robot
1c5ae8a124 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-qpr1-dev 2022-02-18 17:09:16 +00:00
Bill Yi
b45dc4ca74 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Idba594ec1c8ce5633f197c8a91c4db39cb4eb5ab
2022-02-18 03:20:57 +00:00
Bill Yi
b3c81561c2 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I97f82f3f3ab3ac037a2b28c4e0c0db21398a605c
2022-02-18 03:17:09 +00:00
Bill Yi
382229bcb6 [automerged blank] Import translations. DO NOT MERGE ANYWHERE 2p: bfb1c0090c
Blank merge reason: commit message contains skip directive

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

Change-Id: I1b36efd22b8f9c8af9ceeca44656c53010349444
2022-02-18 03:13:47 +00:00