Commit Graph

2405 Commits

Author SHA1 Message Date
Kuan Wang
fb136dd8d5 Copy BatteryUsageLoaderService and BatteryBroadcastReceiver from
SettingsGoogle to Settings and rename them to BatteryUsageDataLoader and
BatteryUsageBroadcastReceiver.

Bug: 253395332
Test: make RunSettingsRoboTests
Change-Id: Ide7c572a7df826ca576223c297b8ec78c45cc94e
2022-10-19 02:19:57 +00:00
Kuan Wang
0a0ba915ca Copy BatterySettingsContentProvider from SettingsIntelligence to Settings and rename it to BatteryUsageContentProvider.
Bug: 253395332
Test: make RunSettingsRoboTests + manually
Change-Id: Ib6c2240cd065f6e29393e13b7231bba7afd2d850
2022-10-18 02:26:23 +00:00
Chaohui Wang
bb4d0250bb Add AppStoragePreference for Spa
Also add new SettingsSpaUnitTests.

Bug: 236346018
Test: Manual with App Info page
Test: atest SettingsSpaUnitTests
Test: Manual compare generated Settings AndroidManifest.xml
Change-Id: I9f6b2ca446fd3d196792a876a6e4049c5cf97a1d
2022-10-13 17:21:08 +08:00
Zekan Qian
430ed29262 Unsupport DebugActivity & EntryProvider in Settings.
Set SpaEnvironment (with Spp only) in SettingsApplication
Remove DebugActivity & EntryProvider from Settings.

Bug: 244122804
Test: manual - build Settings
Change-Id: I18e97c80b4f1d6094bb22cf28e7e84ea325869d7
2022-10-13 12:53:48 +08:00
TreeHugger Robot
8e74ee57d1 Merge "Fix CtsIntentSignatureTestCases android.signature.cts.intent.IntentTest#shouldNotFindUnexpectedIntents" 2022-10-05 06:20:55 +00:00
menghanli
0d2c2c44be Fix CtsIntentSignatureTestCases android.signature.cts.intent.IntentTest#shouldNotFindUnexpectedIntents
Bug: 250821898
Bug: 249430287
Test: atest CtsIntentSignatureTestCases:android.signature.cts.intent.IntentTest#shouldNotFindUnexpectedIntents
Change-Id: Ice1c525b104ac6029d242a182f3d9a5d0a73706d
2022-10-05 12:14:53 +08:00
TreeHugger Robot
da6919f87c Merge "Disable eager initialization of Jetpack libraries" 2022-10-05 03:34:57 +00:00
Tsung-Mao Fang
fa7394afbc Disable eager initialization of Jetpack libraries
Test: atest -c SettingsUnitTests
Fix: 208883742
Fix: 213872855
Change-Id: Ia2a2f88939d16c84255404696ea159c4a01b3bb5
2022-10-04 15:51:45 +08:00
Menghan Li
ff2961b593 Merge "Provide ability to link to color motion page" 2022-10-04 04:43:28 +00:00
Howard Chen
f53c2f91f5 Merge "Export the DSULoader activity" 2022-10-04 00:49:12 +00:00
menghanli
3c62eb1cf0 Provide ability to link to color motion page
Bug: 249430287
Test: manual test
Change-Id: I4150bef5b6c1be2f50a74dc21546e88d8b2400f4
2022-10-04 08:14:58 +08:00
Menghan Li
b8f7c7624a Merge "Provide ability to link to text reading page" 2022-10-03 23:47:55 +00:00
Tsung-Mao Fang
f5062c2df8 Guard FallbackHome activity behind permission
An attacker can launch FallbackHome of the Settings app
to reset unlock time. This would prevent the device from
sleeping because it runs the following code:
PowerManager#userActivity().

However, running PowerManager.userActivity() requires
android.permission.DEVICE_POWER or android.permission.USER_ACTIVITY.

So, let's add a permission to guard this activity.

Test: Rebuilt a rom and see no side effect.
Bug: 246543238
Change-Id: I23a1e352f76cbec3e8c07a1b58b94615f2779121
2022-09-30 15:31:47 +08:00
Viesturs Zarins
f1d115c38e Fix fragment class for WIFI_SAVED_NETWORK_SETTINGS.
Has been broken since the old access points implementation was deleted.

Change-Id: I8575e6f79644d0a79de9e041cb30b0ccbc0e57d3
Bug: 246772836
2022-09-29 09:36:50 +00:00
Howard Chen
5d7f3e6c4d Export the DSULoader activity
Test: adb shell am start-activity \
  -n com.android.settings/com.android.settings.development.DSULoader\
  -a android.settings.development.START_DSU_LOADER
Bug: 245029263
Change-Id: I0f3afd92b4c896823ebfa4729397d38bf853bbbe
2022-09-29 16:36:09 +08:00
Xuanang Zhao
82f23fe8df Merge "Add auto rotation icon resource." 2022-09-28 15:09:55 +00:00
Xuanang Zhao
569932474e Add auto rotation icon resource.
Change-Id: Ica60e4239439b01f1545bae6f1d809e29a4a9033
Bug: 248428429
Test: manual
2022-09-28 17:55:01 +08:00
menghanli
38714386f9 Provide ability to link to text reading page
Bug: 249430287
Test: manual test
Change-Id: I18fee380a69f92c74d567baf5476131a027913f5
2022-09-28 14:44:05 +08:00
Ats Jenk
ecc62eb469 Merge "Add support to hide developer tile based on a flag" into tm-qpr-dev am: f1807d897b am: 6d69676059
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20031235

Change-Id: If41ee31670d44d19c0b4faf2fb3d258203191abf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-27 16:49:59 +00:00
Zekan Qian
f1fabd488f Add EntryProvider in SettingsGoogle
Bug: 244122804
Test: manual - build SettingsGoogle
Change-Id: I8232361633698f4186c0fda12fb44f221426db9c
2022-09-23 10:44:41 +08:00
Ats Jenk
618876c6c9 Add support to hide developer tile based on a flag
Define new meta-data option for development tiles that can be used to
specify a sysprop flag.
If this meta-data is present, the value will be used as the flag name
that has to be enabled for the preference to show up.

Bug: 248363970
Test: atest SettingsRoboTests:DevelopmentTilePreferenceControllerTest
Change-Id: I66d56777a6290d7fee739492bd2871f637791d75
2022-09-22 19:31:47 -07:00
Xuanang Zhao
2598dd4e39 Rename the shortcut title for dark theme from "Schedule" to "Dark theme"
The label defined in the activity won't be displayed in the page.

Test: manually
Bug: 247701644
Change-Id: Ibf2ef6aa38de109618896a9db28d9a8245aa32c3
2022-09-20 07:11:01 +00:00
Sayak Dutta
b85ee281c2 Merge "Fix following three issues in SD Card UX" 2022-09-18 05:57:51 +00:00
George Chan
9c68bf9312 Added transparency-metadata display.
This feature enables 'App Details' to support MBAs with metadata file and display in an offline UI. This change includes a new fragment and user view that sources data from within any MBAs apk file that contains application-metadata.xml.

Test: make -j64 RunSettingsRoboTests , AVD manual test
Change-Id: If7822100a90f5fb8d33ce5d85958391fc33ecbee
Bug: 244215932
2022-09-16 22:17:48 +00:00
Viesturs Zarins
6cfc593cda Move android.settings.NFC_SETTINGS intent handler to open the Nfc settings fragment, not the generic connected devices fragment.
Change-Id: I03016b36c9beff1bb271710f70e006531290952e
Bug: b/246772836
2022-09-15 16:25:37 +00:00
Sayak Dutta
4c36d4903d Fix following three issues in SD Card UX
1) Link should not work if up-events happen outside the target region
2) Activity should retain it's last state on changing configuration
3) Improve color contrast for "Format card" button

Bug: 246485658
Bug: 246681292
Bug: 246871051

Change-Id: Iebc87e35a3f8496a33a43d906b7faba05d95fe6c
2022-09-15 16:09:18 +00:00
Sayak Dutta
43147377fb Fix following three issues in SD Card UX
1) Link should not work if up-events happen outside the target region
2) Activity should retain it's last state on changing configuration
3) Improve color contrast for "Format card" button

Bug: 246485658
Bug: 246681292
Bug: 246871051

Change-Id: Iebc87e35a3f8496a33a43d906b7faba05d95fe6c
2022-09-15 16:08:59 +00:00
Chaohui Wang
aea2e7cd2e Merge "Migrate UsageStats to Spa" 2022-09-14 08:38:28 +00:00
Zekan Qian
eaa0ca22e7 Add debug page in Settings
Bug: 244122804
Test: manually build SettingsGoogle
Change-Id: I4853e17028dfe0eed4342b4691962b508bc87357
2022-09-13 10:19:37 +00:00
Chaohui Wang
d22619e995 Migrate UsageStats to Spa
The UsageStats page is for testing only, cannot entry through Settings
Home, but is accessible by enter *#*#4636#*#* in dialer.

Migrate UsageStats to Spa for both improving the UI & performance.

Fix: 244675756
Bug: 235727273
Test: Manual with Settings App
Change-Id: I6ec6e233075a3f79ac1231aecafabf2a71dac716
2022-09-09 16:00:41 +08:00
Chaohui Wang
046ea61cf0 Merge "Add SpaLib for Settings" 2022-08-31 05:25:26 +00:00
Chaohui Wang
805f903ae4 Add SpaLib for Settings
SPA main activity can be launched by:
adb shell am start com.android.settings/.spa.SpaActivity

Bug: 235727273
Test: Manual launch SPA main activity
Change-Id: I7b196b0169f91732a6b37ff53a3f79b54267d93f
2022-08-30 16:39:03 +08:00
danielwbhuang
c9cb6806f6 Separate "Keyboard" from "Language & input"
1. Separate "Keyboard" from "Language & input".
2. Use FeatureFlagUtils.SETTINGS_NEW_KEYBOARD_UI to control the
   different UI until Settings launches the new UI design.

Bug: 242680328
Test: local test
Change-Id: Id1ea6d3e3c2e6b83bc4b4d835c6b27e31311c530
2022-08-30 14:22:05 +08:00
kellyz
76516bbd3d Enable predictive back gesture for Settings app.
Bug: 238729272
Test: manually tested on device
Change-Id: Ib75902d1d7bbd289705cb62ef00d5840676bda72
(cherry picked from commit 1bda6428c2)
Merged-In: Ib75902d1d7bbd289705cb62ef00d5840676bda72
2022-08-24 07:26:24 +00:00
sayakiitg
efdedcdc15 Revamp SD card UX
Improve the SD card setup flow so that each formatting option is provided in a separate screen with clear description and illustration.Also make sure that guest users do not have any access to formatting options.

Test: Manual testing on Pixel Device
Screenshot1: https://screenshot.googleplex.com/WJwyxFkBtbSfZmN.png
Screenshot2: https://screenshot.googleplex.com/3oBcrrgRsKTxNPC.png

Bug: 201252175
Change-Id: I77df55c40fd99cabcfc6128084be035bb5b19531

Change-Id: I757abc6076fcc8f467d8faed9f090bcdd5774ff3
(cherry picked from commit 9b432d54a6)
Merged-In: I757abc6076fcc8f467d8faed9f090bcdd5774ff3
2022-08-19 19:07:40 +00:00
Han Xu
b7d1077ada Add BROWSABLE for most Settings Activities
so they can be opened via webpage link.

Bug: 238966547
Test: manual
Change-Id: Ic52895ce0577246a2bbf9536fce1e10ab41f7605
2022-08-16 13:02:57 +08:00
Ats Jenk
c2fae645f0 Merge "Developer tile for toggling desktop mode" into tm-qpr-dev am: 3f000fa764 am: 7dad9f50a9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18975659

Change-Id: I45d7ac7982ea7306ae2ed069920c201f3116ba54
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-12 17:06:30 +00:00
TreeHugger Robot
04facfda8b Merge "Fix "Notification to Allow Messages" dialog is not compatible with dark theme" 2022-08-11 12:29:40 +00:00
Hugh Chen
07a4675429 Fix "Notification to Allow Messages" dialog is not compatible with dark theme
Use @*android:style/Theme.DeviceDefault.Dialog.Alert.DayNight
to fix dark theme problem.

Bug: 213617624
Test: manual visual
Change-Id: Id207db83e88afdef8b0d7720b4b9cf851cb8872d
2022-08-11 09:37:23 +00:00
Arc Wang
059efbd09f Remove singleTask from Settings homepage
Launch Settings homepage on a NO ActivityEmbedding supported device:

  Before & after this change, launch Settings homepage will resume
an existing Settings task and finish SubSettings on top of Settings
homepage.

Launch Settings homepage on a ActivityEmbedding supported device:

  Before this change, launch Settings homepage will resume
an existing Settings task and finish SubSettings on top of Settings
homepage and then start SubSettings.

  After this change, launch Settings homepage will resume
an existing Settings task and resume existing SubSettings.

This change improves UX (keep right pane Activity status) and improves
launch performance (it will not finish and start right pane Activity)
for ActivityEmbedding supported devices.

Bug: 240666118
Test: manual
      Launch Settings and observe events log.
Change-Id: I226b852b360e7106e861752d748f644596a0f320
2022-08-10 08:06:47 +00:00
Ats Jenk
fe2a168189 Developer tile for toggling desktop mode
Create a developer tile for toggling desktop windowing mode.
Relies on desktop windowing prototype flag, captions in shell flag and
freeform to be enabled.

Bug: 241944030
Test: manually verified tile is available in developer tiles
Change-Id: I0e5904ac896405ac166590972a83872cdbabb5a4
2022-08-09 11:19:30 -07:00
Menghan Li
6fd05aa80a Merge "Unify the caption preference class naming" 2022-08-02 22:15:31 +00:00
Bonian Chen
aef21d40d0 [Settings] Remove unused code from AOSP
Code refactor.

Bug: 239114165
Change-Id: Id6afd81ad8e7d4a005044602bcdd1918898a864b
Test: auto testing
2022-08-02 05:03:40 +00:00
menghanli
e57125650d Unify the caption preference class naming
Bug: 197695932
Test: make RunSettingsRoboTests
Change-Id: Ice244442ad21e6d9f006d488992e9f58cf5c8fb0
2022-08-02 10:25:15 +08:00
Sayak Dutta
9e6c889abe Merge "Revamp SD card UX" 2022-07-30 13:04:25 +00:00
sayakiitg
9b432d54a6 Revamp SD card UX
Improve the SD card setup flow so that each formatting option is provided in a separate screen with clear description and illustration.Also make sure that guest users do not have any access to formatting options.

Test: Manual testing on Pixel Device
Screenshot1: https://screenshot.googleplex.com/WJwyxFkBtbSfZmN.png
Screenshot2: https://screenshot.googleplex.com/3oBcrrgRsKTxNPC.png

Bug: 201252175
Change-Id: I77df55c40fd99cabcfc6128084be035bb5b19531

Change-Id: I757abc6076fcc8f467d8faed9f090bcdd5774ff3
2022-07-29 10:21:49 +00:00
Yohei Yukawa
c7fc742a3f Grant CONTROL_UI_TRACING permission to Settings app (2nd try)
We are going to guard the following IPCs with CONTROL_UI_TRACING
permission [1].

 * IWindowManager#startWindowTrace()
 * IWindowManager#stopWindowTrace()
 * IInputMethodManager#startImeTrace()
 * IInputMethodManager#stopImeTrace()

For QS DevelopmentTiles to continue being allowed to access those
IPCs, this CL gives CONTROL_UI_TRACING to the Settings app.

 [1]: Ibdeb38dc9a066cb8ed2904adcdac29014b166526
      2ad02a383b036b02a836a50a43c679a17c2fde6b

Bug: 172444310
Test: Manually verified as follows.
 1. build aosp_coral-userdebug and flash it.
 2. adb shell dumpsys package com.android.settings
 3. Verify that
      android.permission.CONTROL_UI_TRACING
    is granted.
Change-Id: Ic65176d34daebc2190c6009f70d99f8fcb725c00
2022-07-25 18:38:49 +09:00
Luigi Zevola
8e8c3c2b1f Merge "Revert "Grant CONTROL_UI_TRACING permission to Settings app"" 2022-07-22 21:11:31 +00:00
Luigi Zevola
1177e857af Revert "Grant CONTROL_UI_TRACING permission to Settings app"
Revert submission 19391474-yukawa-b172444310

Reason for revert: b/239969206
Reverted Changes:
I34bc22392:Allow com.android.settings to have CONTROL_UI_TRAC...
I2165ce38e:Grant CONTROL_UI_TRACING permission to Settings ap...

Change-Id: I4c9db66d852baa25c7f6f7a435639017140f9d5d
2022-07-22 20:38:01 +00:00
Yohei Yukawa
00ac86939d Merge "Grant CONTROL_UI_TRACING permission to Settings app" 2022-07-22 18:49:43 +00:00