Commit Graph

662 Commits

Author SHA1 Message Date
xuezaiyue
ac7318419a Move battery usage files to a separate folder.
Bug: 202118250
Test: presubmit
Change-Id: I21aa58ebc02327849ed2161dbbafcdc806c007f2
2022-06-19 05:59:35 +00:00
Edgar Wang
610538e10b Merge "Enable hyphenation on most of preference." into tm-dev 2022-05-30 04:00:19 +00:00
Edgar Wang
353ce6f4e9 Enable hyphenation on most of preference.
Bug: 217659992
Bug: 231924943
Test: manual
Change-Id: I1039fbc6c0573c8ce533594a039579b4c8b00e52
2022-05-24 04:27:43 +00:00
Chaohui Wang
a47f9bb17f Merge "Add the jank detection to Settings toggles" into tm-dev 2022-05-20 09:22:46 +00:00
Chaohui Wang
692068d535 Add the jank detection to Settings toggles
Add jank detection when click the following preferences,
 - SwitchPreference
   Single target, detect click in InstrumentedPreferenceFragment
 - PrimarySwitchPreference
   Two target, only detect click switch in switch's onClick()
 - MainSwitchPreference
   Single target, detect click in TogglePreferenceController
 - SettingsMainSwitchPreference
   Single target, detect click in its onSwitchChanged()

Bug: 230285829
Test: manual & robo tests
Change-Id: I97a13e05a601237b16cd2d903ba2fb6ec4a69a74
2022-05-19 12:28:16 +08:00
Yi-Ling Chuang
b64d3589c1 Guard against the NPE in getTransitionType()
Bug: 232852095
Test: Go to fingerprint enrolling page and see the transition stays the
same(sliding) after this change.

Change-Id: I259eb4362b273f6b297e94d59d6720a9d6bf6373
2022-05-18 16:53:37 +08:00
Jason Chiu
c9615611e1 Reduce flickers of Injection
The injection dynamic data was loaded in the background and then post to
main thread to update UI. However, it usually updates after
Fragement.onResume(), which causes the flicker.

To make it more smooth, DashboardFragment to wait for the dynamic data
observers to update UI for a short period, which eliminates the flicker
in most cases.

Also skip the repeated tiles refresh called by onCategoriesChanged in
onResume after all preferences refreshed.

Test: robotest, visual
Bug: 229177114
Change-Id: I04650af9692703f1fc1e6e5ad2090f051b1eeb81
2022-05-09 12:33:54 +08:00
TreeHugger Robot
5d218d9fa4 Merge "Allow intent into Privacy Controls page" into tm-dev 2022-04-25 18:09:39 +00:00
changbetty
d1d9798a5d [LE Audio] Add entry point in Media Volume slice for broadcast sink
Bug: 228274114
Test: make RunSettingsRoboTests
Test: Manual test
Change-Id: I331232c30291348faf7166d4de8060a1cfe12bff
2022-04-25 02:42:46 +00:00
Nate Myren
d1749cfbab Allow intent into Privacy Controls page
Test: manual
Bug: 222127397
Change-Id: If98ce8b89332eaaaa9be70885afe9d8465c191dd
2022-04-22 13:58:50 -07:00
Yi-Ling Chuang
61022c6419 Fix UiBlcoker regression
We determine if the visibility should be updated by mIsFirstLaunch, and
mIsFirstLaunch is set to false in onStop(). This breaks the updatability
if there's a change before onStop() gets called.

So we move the value assignment to the end of checkUiBlocker() because
at that time, all blocker work should be either finished or timeout.
Also remove mIsFirstLaunch since mUiBlockerFinished can cover the
determination with the new design.

Fixes: 229565193
Test: Toggle Use Location in the location page and see the Recent used
section react accordingly.

Change-Id: Id6005e5b8b29cb8a6309068d0a2177489a3fb2f4
2022-04-19 15:12:29 +08:00
SongFerng Wang
b1166a441c Merge "Hide the Contact sharing toggle for LE audio mode" am: 3f830cc646 am: 1e89cd323e am: 028ad8fd3d
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2063555

Change-Id: Ibcd93e3f6610c1f1dfbfa687ba8bec390b8456b4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 10:11:52 +00:00
SongFerngWang
11b337178a Hide the Contact sharing toggle for LE audio mode
1. Add the device config key
2. Hide the Contact sharing toggle for LE audio mode
Bug: 228415214
Test: manual test and take the screenshots at bug.

Change-Id: I07674d0edbcd642814ed61ccd13cb4e1e42caec3
2022-04-13 22:11:49 +08:00
Betty Chang
6ebed73fbe Merge "[LE Audio] Broadcast Sink UI" into tm-dev 2022-04-11 13:57:52 +00:00
changbetty
a56e198c61 [LE Audio] Broadcast Sink UI
- Add dialog for Broadcast and find broadcast source

 - Add Activity for find broadcast source

Bug: 228274114
Test: Manual test
Change-Id: I830efc3514fc42aaa4e53f491ed3a7459bd9bb41
2022-04-11 08:15:10 +00:00
menghanli
18ddc6525b Remove dependency of SudGlifTheme from SettingsTheme
Root cause: Inherit from the glif themes in setupdesign library
Solution: Not inherit from the glif themes and set Setting theme before
applying the dynamic color

Bug: 225800660
Test: Manual testing
Change-Id: Ic4d71bf7a754888c1ed1590c0483360d65f5da44
2022-04-01 11:00:45 +08:00
Philip Junker
bf4878c877 Merge "Add special app access for turning on the screen." into tm-dev 2022-03-24 10:02:49 +00:00
Yi-Ling Chuang
a28770e459 Add visibility control for the UiBlocker
The existing UiBlocker mechanism doesn't support additional visibility
control. With that, controllers that want to control their own
visibility won't be able to use UiBlocker.

Fixes: 223340393
Test: robotest
Change-Id: I2df2eb1ce77e2c94bb271a8b68cc8c6004df5c70
2022-03-22 11:53:33 +08:00
Philip Junker
8a9780527e Add special app access for turning on the screen.
Bug: 216114297
Test: manually built and installed on device, verified absence of jank.
Test: atest SettingsRoboTests:TurnScreenOnDetailsTest
Test: atest SettingsRoboTests:TurnScreenOnSettingsTest
Change-Id: I1ed5948504222b537207978cbaa117b48aa28e6c
2022-03-18 14:53:13 +00:00
Eric Biggers
922a11f659 Remove CryptKeeperSettings
FDE support has been removed in favor of FBE, so remove the FDE settings
from the "Encryption & credentials" page of the Settings app.

For now I didn't change the way the page appears on devices that don't
use FDE; as before, it still lists "Encrypt phone", followed by either
"Encrypted" or "Phone not encrypted" with no changeable settings.  Note
that the strings used for this have "crypt_keeper" in their names but
aren't specific to FDE; the next CL will rename them.

Test: On Cuttlefish with and without encryption enabled, tested visiting
      the "Encryption & credentials" settings.
Bug: 208476087
Change-Id: I3ce9894291ea1f1886f21980a86a92bfce38038a
(cherry picked from commit 36609c18d1)
Merged-In: I3ce9894291ea1f1886f21980a86a92bfce38038a
2022-03-08 17:13:22 +00:00
Tsung-Mao Fang
00cbd72c60 Rename back button to navigate up button
A minor wording review.

Test: build pass
Bug: 219000314
Change-Id: I23bc580b193cc891b659514d13705db2c55b756a
Merged-In: I23bc580b193cc891b659514d13705db2c55b756a
2022-03-07 08:47:30 +00:00
menghanli
b759790da1 Apply Glif theme before using dynamic color.
As changes are being made to remove the dependency between dynamic
color and the glifv3 theme, this sets the Glif theme before calling
trySetDymanicColor, as requested.

Bug: 219882220
Test: Build & flash; visual inspection
Change-Id: I4c28ea52411f3436c98e4689c7fa1784254fd572
2022-03-03 05:23:02 +08:00
Tsung-Mao Fang
2df79641cb Show/hide back button for 2nd page
By design, we want to show/hide back button for 2nd
layer page when it's in two pane mode.

Test: Manual test
Bug: 219000314
Change-Id: I14d8d7ee08280d5ce80c0b59e1e91d077f0b6d09
2022-02-16 18:01:42 +08:00
Peter_Liang
efb44b7173 New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (16/n).
- Add the entry to "Anything else?" screen
1) Add the new activity-alias tag ".TextReadingForSetupWizardActivity", including the fragment class, action, and targetActivity.
2) Temporarily use the “DISPLAY_SETTINGS” category to trigger “.TextReadingForSetupWizardActivity” to ensure the backward compatibility.
3) Add the text reading settings page entry into SettingsGateway to be successfully launched from SuW.

Bug: 211503117
Test: manual test
Change-Id: I5c35df3c33c713342a7a0cfad786b7ae48ad941f
2022-02-09 23:28:20 +08:00
Jason Chiu
94a9c57759 [Large screen] Open the search page in full-screen mode
Bug: 205079744
Test: manual
Change-Id: I3ac663b42fc0538dcb20d53f456b90ea68c9093d
2022-01-24 12:21:58 +08:00
Eric Biggers
36609c18d1 Remove CryptKeeperSettings
FDE support has been removed in favor of FBE, so remove the FDE settings
from the "Encryption & credentials" page of the Settings app.

For now I didn't change the way the page appears on devices that don't
use FDE; as before, it still lists "Encrypt phone", followed by either
"Encrypted" or "Phone not encrypted" with no changeable settings.  Note
that the strings used for this have "crypt_keeper" in their names but
aren't specific to FDE; the next CL will rename them.

Test: On Cuttlefish with and without encryption enabled, tested visiting
      the "Encryption & credentials" settings.
Bug: 208476087
Change-Id: I3ce9894291ea1f1886f21980a86a92bfce38038a
2022-01-11 18:53:51 -08:00
TreeHugger Robot
7f04708f44 Merge "Fix potential OOM problem" 2021-12-27 02:49:05 +00:00
Tsung-Mao Fang
72f823ba9e Fix potential OOM problem
Prior to this cl, there's a potential vulnerability to
cache huge logging data in the memory.
We send the log out when user didn't trigger any event
in 1 min. However, if user keep triggering any log
event in 1 min, then there's a change to preserve a huge
number logs in the device memory. Then, it causes the OOM.

The solution is to set a logging threshold, once the current
logging number is larger than 150, then we simply send it
out immediately and clean the device memory.

Test: Log can be sent out after meeting the threshold.
Fix: 211323528
Change-Id: I9d507e8d55d6b7f7e682369edf3b5334eb2856ae
2021-12-24 11:01:30 +08:00
Yuri Ufimtsev
4eea126959 Group some Security settings to a separate "Advanced settings" screen
Test: adb shell am start -a android.settings.SECURITY_SETTINGS opens Advanced
Security Settings screen
Test: atest SettingsUnitTests:SecurityAdvancedSettingsTest
Test: atest SettingsUnitTests:SecurityAdvancedSettingsControllerTest

Bug: 204416998

Change-Id: If9c6da812ffb7c046b3b00a084007950801e1d4f
2021-12-23 10:26:46 +00:00
tom hsu
26b0bd7f19 [Panlingual] Add outside entry.
- video: https://screencast.googleplex.com/cast/NjIxODkzNzYyMjU5MzUzNnwwMWMxYjI1Ny1hMw

Bug: 207743479
Test: local
Change-Id: Iab3ba4d14f581aed7b737521ccba4f62e1c04998
2021-12-20 19:37:59 +08:00
Zoey Chen
989dd669b2 [Large Screen] Launch MobileNetworkActivity as a fragment for split mode
Receive intent in MobileNetworkActivity and launch a activity which extend SettingsActivity

Test: atest
Bug: 197609014
Bug: 209606859
Change-Id: Ic07b18b3ea11744f240b25a0986474df763a199b
2021-12-10 08:33:33 +00:00
SongFerng Wang
d06e52bc4b Merge "Device do network scan after user rotates NetworkSelection page" into sc-v2-dev am: c350919fa4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16182703

Change-Id: I0a22265ceeab9ccddca467338ed4a43f7636f3b7
2021-12-09 14:49:14 +00:00
SongFerng Wang
c350919fa4 Merge "Device do network scan after user rotates NetworkSelection page" into sc-v2-dev 2021-12-09 14:24:43 +00:00
TreeHugger Robot
66db4b4641 Merge "Revert "Revert "Device do network scan after user rotates NetworkSelection page""" 2021-12-09 12:34:54 +00:00
SongFerng Wang
fa6a3613ab Revert "Revert "Device do network scan after user rotates NetworkSelection page""
This reverts commit 3c9580d573.

Reason for revert: since b/207587612 revert the ag/16259258, do revert this solution back and submit ag/16182703 for sc-v2

Change-Id: I05148506503fc6d1f4ee4ac2ae99e2eb28f61c9f
2021-12-08 14:25:41 +00:00
Lucas Dupin
0b97fbff64 Merge "[Settings] Expose Bluetooth Pairing settings page" into sc-v2-dev am: f6354d8af7 am: 435f0ac1f8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16386048

Change-Id: I22e89ab902d4877e4b748da4a25423182e44eabb
2021-12-07 18:03:56 +00:00
Lucas Dupin
435f0ac1f8 Merge "[Settings] Expose Bluetooth Pairing settings page" into sc-v2-dev am: f6354d8af7
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16386048

Change-Id: I53ed6d54a6f50da601a2b2eaaaa229ef5fc76562
2021-12-07 17:57:09 +00:00
shaoweishen
1b58ba5df2 [Settings] Expose Bluetooth Pairing settings page
Bug: 204405245
Test: N/A
Change-Id: Iac85dcb76b674aa4e6afe21d9ef149d091531888
2021-12-06 12:07:08 +00:00
TreeHugger Robot
ecf408bb24 Merge "Fix talkback issue on Subsettings" into sc-v2-dev am: 9928e585a6 am: ed0b68a71b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16324223

Change-Id: Ia926bc8909ffcda7bb9cbbaa000cda296558b037
2021-11-24 10:18:03 +00:00
TreeHugger Robot
ed0b68a71b Merge "Fix talkback issue on Subsettings" into sc-v2-dev am: 9928e585a6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16324223

Change-Id: I499c652bcad2b4969e7896f5746012e4b2466e04
2021-11-24 10:06:52 +00:00
Tsung-Mao Fang
e260ebe157 Fix talkback issue on Subsettings
Set window title for activity, so it won't announce
"Settings" again.

Test: Run the talkback and do not observe issue
Fix: 200749911
Change-Id: Ied973916bdd43562424b97eadea2b3a413c712ec
2021-11-23 11:35:09 +08:00
Jason Chiu
ed406e779c Merge "Start deep link page synchronously in SettingsActivity" into sc-v2-dev am: b4d3278a45 am: e7a681748e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16263226

Change-Id: I937db64f2c4ab9dfb82637bc7c775c05c4383fb6
2021-11-18 20:26:23 +00:00
Jason Hsu
ab4e03b75d Merge "Provide ability to link to Color Inversion page via Intent" into sc-v2-dev am: 0a8f978357 am: 105bca800a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16013675

Change-Id: Ie658368403f9564a4a5580e55e22ec5862fe6f2d
2021-11-18 20:25:17 +00:00
Jason Chiu
e7a681748e Merge "Start deep link page synchronously in SettingsActivity" into sc-v2-dev am: b4d3278a45
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16263226

Change-Id: Id203bbb5f0d0e0c345494c111ad8c0c296b8e6e5
2021-11-18 19:48:02 +00:00
Jason Hsu
105bca800a Merge "Provide ability to link to Color Inversion page via Intent" into sc-v2-dev am: 0a8f978357
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16013675

Change-Id: Ia9b87f0a221574c54d65700da9f046b301b7d3b5
2021-11-18 19:46:47 +00:00
Jason Chiu
b4d3278a45 Merge "Start deep link page synchronously in SettingsActivity" into sc-v2-dev 2021-11-18 09:34:20 +00:00
Jason Chiu
a3b21cf017 Start deep link page synchronously in SettingsActivity
- Use a synchronous API to make SettingsActivity start deep link intent
  in onCreate
- Change SettingsHomepageActivity from an alias to a real activity
- Clean up redundant codes

Fix: 206585572
Test: Manual, robotest build pass
Change-Id: Idf42c026f593bb5801a13cae250d1523030b7092
2021-11-18 12:20:08 +08:00
SongFerng Wang
3c9580d573 Revert "Device do network scan after user rotates NetworkSelection page"
This reverts commit f54ead1f94.

Reason for revert: using another way. ag/16259258

Change-Id: I4ae695237cb3417cb3d08fcbb3354dc649681aab
2021-11-15 04:50:25 +00:00
SongFerngWang
d42ff2a86b Device do network scan after user rotates NetworkSelection page
Add the networkSelectSettings fragment into new activity, and set
the activity's android:configChanges as
"orientation|keyboard|keyboardHidden|screenSize|screenLayout
|smallestScreenSize".

Bug: 204039043
Test: atest AutoSelectPreferenceControllerTest (pass)
atest OpenNetworkSelectPagePreferenceControllerTest (pass)
atest NetworkSelectSettingsTest (pass)

Change-Id: Ic933c2294401bc50e105ddcfd2a17886d0bbefc3
Merged-In: Ic933c2294401bc50e105ddcfd2a17886d0bbefc3
2021-11-11 18:16:40 +08:00
SongFerngWang
f54ead1f94 Device do network scan after user rotates NetworkSelection page
Add the networkSelectSettings fragment into new activity, and set
the activity's android:configChanges as
"orientation|keyboard|keyboardHidden|screenSize|screenLayout
|smallestScreenSize".

Bug: 204039043
Test: atest AutoSelectPreferenceControllerTest (pass)
atest OpenNetworkSelectPagePreferenceControllerTest (pass)
atest NetworkSelectSettingsTest (pass)

Change-Id: Ic933c2294401bc50e105ddcfd2a17886d0bbefc3
2021-11-11 18:16:23 +08:00