Commit Graph

2299 Commits

Author SHA1 Message Date
TreeHugger Robot
a44044dfe6 Merge "Fix the header can't be scrolling problem in landscape mode" 2022-08-12 07:30:22 +00:00
Yanting Yang
4356c9c653 Check DISALLOW_APPS_CONTROL before performing reset app preferences
When DISALLOW_APPS_CONTROL restriction is enabled, users should not be
able to enable/disable apps, clear app caches and clear app data.

The function of reset app preferences will re-enable the disabled apps,
it can let users bypass DISALLOW_APPS_CONTROL to enable an app disabled
by IT admin to see sensitive information.

To fix this vulnerability, we add a check for DISALLOW_APPS_CONTROL
restriction before users reset app preferences. Once the restriction is
enabled, it will show dialog “Blocked by your IT admin” instead.

Fixes: 238745070
Test: Verify change by turning on/off DISALLOW_APPS_CONTROL with TestDPC.
Change-Id: Iffee73cf4952b686a78b4c7aaa54747971337d03
2022-08-11 22:43:38 +08:00
Sunny Shao
151a088094 Fix the header can't be scrolling problem in landscape mode
- Settings header is restricted scrolling by this ag/15029686
- To void some pages can't show the contain part while heading unscrolling.
  We allow the header can be scrolling in the landscape mode.

Fixes: 207353353
Test: make RunSettingsRoboTests -j
Change-Id: Ice97c6244716d4768167feb78588807d13b06a94
2022-08-11 15:33:45 +08:00
Zaiyue Xue
284e049cc1 Switch Battery Usage Chart from V1 to V2.
Test: manual
Bug: 236101166
Change-Id: I9142c0d4e00dea3771777ba9aedeab07b635fa1a
2022-08-10 13:55:54 +08:00
Kuan Wang
373390f660 Update usage data for EBS app usage list and App usage detail from 24
hours to last full charge.

Bug: 236101687
Test: manual + make RunSettingsRoboTests
Change-Id: I48097dcaaf7b4100fbd7802940aac7c5ef92ee0b
2022-08-08 03:29:12 +00:00
Zaiyue Xue
693711469d Updates battery usage messages from last 24hr to last full charge. (Part2: non-V2 files)
Test: manual
Bug: 236101166
Change-Id: Id5ad3e859a01d3288a950bf6288eafc6144a23d6
2022-08-05 10:52:38 +08:00
Tiffany Nguyen
0e37ac8d7a Merge "Add Apps > Battery optimization page implementation." 2022-08-03 15:02:11 +00:00
Tiffany Nguyen
5ecb1a1d69 Add Apps > Battery optimization page implementation.
Moving the old restricted page to the new optimization page will happen
in a follow-up CL.

Test: Unit, manual
Bug: 238026672
Change-Id: I5fee9ebe03284a013da6bfca9ada8b166c6af91c
2022-08-02 18:43:53 +00:00
Patrick Baumann
a12fa8a2f7 Require permission while sending QUERY_PACKAGE_RESTART
Bug: 230755401
Test: Manual - force stop works
Change-Id: I7812ea51da0041b8dfae14d779da72f1295f4c94
2022-07-12 17:21:55 +00:00
Liahav Eitan
21d6249393 Merge "Load work apps in RecentAppStatsMixin" 2022-06-28 15:46:45 +00:00
Liahav Eitan
82e81e23e0 Load work apps in RecentAppStatsMixin
This change will show work apps and personal apps together in the
recent apps settings page, sorted by decreasing last usage time.

Test: see both work and personal apps in the recent apps page in the
correct order.
Fix: 146921442

Change-Id: I174a556010529bc39c085cc006722bc2947535bd
2022-06-28 13:20:36 +00:00
Binyi Wu
57741ad29e Merge "Hide keyboard when user scroll through App search suggestions" 2022-06-21 05:21:41 +00:00
Binyi Wu
a62e8abcba Hide keyboard when user scroll through App search suggestions
Bug: 236037001
Test: manual
Change-Id: Ifdadc0a20f6ac4d658cea8ddca99044064d0d53f
2022-06-21 10:47:23 +08:00
Zaiyue Xue
7e6aa69cca Merge "Move battery usage files to a separate folder." into tm-qpr-dev am: 3b7953eac2 am: 6470ada117
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18797446

Change-Id: I3d6a155e80a5d54c309061c41d0b6436e61cc4cb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-20 09:42:01 +00:00
Zaiyue Xue
3b7953eac2 Merge "Move battery usage files to a separate folder." into tm-qpr-dev 2022-06-20 09:12:04 +00:00
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
Jason Parks
3f55cd8929 Merge "Use API to check for the superivion component." into tm-dev am: 73276b3c91 am: 3b6fe0813b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18817832

Change-Id: I0fafd91b14712a6bf9a118a2512973af1fb3d502
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-15 13:42:02 +00:00
Jason Parks
88c084c018 Merge "Use API to check for the superivion component." into tm-dev am: 73276b3c91 am: 5c4943cc93
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18817832

Change-Id: I64cbc363b3ddb6cb7272b7f21c3567fcbc4e7b73
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-15 13:41:24 +00:00
Jason Parks
4a9c108b28 Use API to check for the superivion component.
Bug: 219025233
Test: manual
Change-Id: Icd2593a67ae0297340991a5375b18e2f933facb1
2022-06-14 17:16:07 +00:00
Rhed Jao
d6804cbff5 Merge "[Settings] Passing correct user id to getAppOpPermissionPackages" 2022-06-01 09:45:06 +00:00
Rhed Jao
bd2bcd5cca [Settings] Passing correct user id to getAppOpPermissionPackages
A new user id parameter is added to the
IPackageManager#getAppOpPermissionPackages API. Update the new api
usage to the Settings application.

Bug: 229684723
Test: atest SettingsUnitTests
Test: m -j RunSettingsRoboTests \
      ROBOTEST_FILTER="AlarmsAndRemindersDetailsTest|
            AlarmsAndRemindersDetailPreferenceControllerTest"
Change-Id: I8c90f0a57426c669478367004571cca5dfb05cb6
2022-05-30 14:55:50 +08:00
Chaohui Wang
304a3fd37e Merge "Enable Kotlin for Settings App" into tm-qpr-dev 2022-05-30 02:43:23 +00:00
Chaohui Wang
9ec6f0e41a Enable Kotlin for Settings App
Currently Kotlin files cannot build with library app-compat-annotations.

Only one @ChangeId need this library, create separate build target
library Settings-change-ids to solve this issue.

After this cl, Kotlin could be used for Settings App.

Fix: 229037247
Test: make Settings
Change-Id: I4a0d99425c9e6cc2cbc015d2561daa68609ca0fd
2022-05-30 01:58:25 +08:00
Chaohui Wang
6737a44fba Merge "Fix unable to toggle off Pause app activity" into tm-dev am: bc2e0f5fc4 am: caabb4fe49
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18581945

Change-Id: I97d75ae94ed28e05698b516ef7e43d6c638c2b7a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 05:48:18 +00:00
Chaohui Wang
dd2e6e88c6 Merge "Fix unable to toggle off Pause app activity" into tm-dev am: bc2e0f5fc4 am: 0580fb0d67
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18581945

Change-Id: Id82a3df97f16a5e10baf96cf636888a57405e1d1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 05:47:28 +00:00
Chaohui Wang
2af5588692 Fix unable to toggle off Pause app activity
The "Pause app activity if unused" SwitchPreference under App info page.

Currently, the preference controller updates the UI state in the
onOpChanged(), which is unnecessary and is called in another non-UI
thread.

Not updating state in onOpChanged() to fix.

Note: This controller implements the LifecycleObserver to handle
lifecycle related logic, but it's actually a no-op before change
If9e48e44267de8e89a5e8f45d256719130936320. So it used to work fine
without the OnOpChangedListener, we can remove it now.

Fix: 227762370
Test: manual
Change-Id: I33f1f55a706407d7b409c3544f9889c45855b34d
2022-05-25 11:45:23 +08:00
Tom Hsu
ab7057cb7f Merge "[Panlingual] Fix icon shall have work badage in work profile." into tm-dev am: 883f5e2572 am: 7a69cee691
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18491260

Change-Id: Ia8b4686e81f5d36c4750ec933c737e5e3b128ea5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 17:03:56 +00:00
tom hsu
7e27ecb91e [Panlingual] Fix icon shall have work badage in work profile.
Bug: 233064114
Test: local
Change-Id: I8aa24373f0381b172c30d16aedb2f9ba97238234
2022-05-23 19:34:51 +08:00
Edgar Wang
b9a06a9f34 Merge "Update learn more string of FooterPrefernce" into tm-dev am: 24654a3d61 am: eaa0a1cf5c am: 21ddf79998
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18356903

Change-Id: I2f7ce317b7bb9d355fbb1e5f0fc2aacb1da7f8d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-21 00:02:22 +00:00
Edgar Wang
42704ba27c Merge "Update learn more string of FooterPrefernce" into tm-dev am: 24654a3d61 am: 4d371adf7f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18356903

Change-Id: I70547c9094cdd200f1fa2a77272affbcbe308a34
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 23:52:43 +00:00
Edgar Wang
24654a3d61 Merge "Update learn more string of FooterPrefernce" into tm-dev 2022-05-20 23:13:07 +00:00
TreeHugger Robot
8329fa64cc Merge "Revert "Show previous query upon configuration change"" into tm-dev am: fea570f524 am: 4ffd6caf54 am: 420b448fd1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18486386

Change-Id: I6e4dd7854a850464c619869b13e3ec0712246512
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 13:11:22 +00:00
TreeHugger Robot
6a2136b93a Merge "Revert "Show previous query upon configuration change"" into tm-dev am: fea570f524 am: 4ffd6caf54
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18486386

Change-Id: I0c4ea8367b14a7ac81867587cddb97a1152f61ba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 13:05:57 +00:00
Calvin Pan
db453f1058 Merge "Avoid getting app locale config for each app" into tm-dev am: 9d6cf4255d am: 4d728de8bc am: c452fe1a61
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18456663

Change-Id: Ia1fb506b1c64d2b69040ca2132f177b9c77edc5d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 12:52:23 +00:00
Calvin Pan
2552125764 Merge "Avoid getting app locale config for each app" into tm-dev am: 9d6cf4255d am: 4d728de8bc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18456663

Change-Id: Ic52667662f873194ff4000b59144fa30223bbc33
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 12:48:28 +00:00
TreeHugger Robot
fea570f524 Merge "Revert "Show previous query upon configuration change"" into tm-dev 2022-05-20 12:27:55 +00:00
Yi-Ling Chuang
e763ca1715 Revert "Show previous query upon configuration change"
This reverts commit d9453bf8c6.

Reason for revert: This introduces a new flicker which doesn't seem good. Will have another solution once all things are ready.

Fixes: 232355879
Change-Id: I0bbc4561ce4fbef36d59de15ae98705a6d81574c
2022-05-20 10:11:20 +00:00
Calvin Pan
9d6cf4255d Merge "Avoid getting app locale config for each app" into tm-dev 2022-05-20 01:52:46 +00:00
Arc Wang
5eb4a3b989 Center apps Preference title when there is no summary am: 3cb8171f4f am: 75eac09a00
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18426345

Change-Id: I9dd27011538e0fce99d33045288e984c6252e853
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 22:39:18 +00:00
Tom Hsu
5156987650 Merge "[Panlingual] Fix the item clicked is not match target application" into tm-dev am: 45c60f8564 am: 6a85746757
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18356600

Change-Id: I96399fbf01ccf5915f263106fbb331b428d1e126
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 22:38:43 +00:00
Arc Wang
d46edb119b Center apps Preference title when there is no summary am: 3cb8171f4f am: 0dc879dbe0 am: 6d64ce7012
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18426345

Change-Id: I951a2a52f45a342730dd06fd310d64792f2faf66
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 21:56:21 +00:00
Tom Hsu
d6337667d6 Merge "[Panlingual] Fix the item clicked is not match target application" into tm-dev am: 45c60f8564 am: 434716f02d am: da1d8acae9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18356600

Change-Id: I7f4d3ed923ba740dbd86758afd55a7850782c8a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 21:54:12 +00:00
Calvin Pan
1a253baae4 Avoid getting app locale config for each app
Getting app locale config will spend a lot of time. Removing the log
to prevent getting locale-config for each system app.

Bug: 232557302
Test: Saving about 80% under java stack tracing mode
Change-Id: I2e755286a4e493be7fd73028ade8d190f6571e46
2022-05-18 11:15:46 +00:00
Arc Wang
3cb8171f4f Center apps Preference title when there is no summary
Hide apps Preference summary when a summary is empty
then its title will be vertically centered.

Bug: 229646669
Test: manual visual
      Settings -> Apps -> See all apps
      Settings -> Notifications -> App settings
      Settings -> Storage -> Apps
      Settings -> System -> Language & input -> App Languages
Change-Id: I6fceba243e2ccac9ea180b940b571da07e1ba805
Merged-In: I6fceba243e2ccac9ea180b940b571da07e1ba805
2022-05-17 09:09:08 +00:00
tom hsu
c5bb55689b [Panlingual] Fix the item clicked is not match target application
- Remove unnecessary action of shift poistion.

Bug: b/232754527
Test: local and see b/232754527#2
Change-Id: Ief8655661dd3cc468e68a085dede528694ede33c
2022-05-16 22:42:20 +08:00
KUAN WANG
614d2dfc0b Merge "Reset Optimization Mode of apps when users reset app settings." into tm-qpr-dev 2022-05-16 05:34:47 +00:00
Kuan Wang
4028e6123c Reset Optimization Mode of apps when users reset app settings.
Fix the issue that Optimization Mode is not reset when users click the
"Reset apps" button in the setting.

Bug: 222037028
Test: make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.fuelgauge" + emulator
Change-Id: I22fb8aa19e284e11882b2920b77b544dee4cc33c
2022-05-16 05:01:20 +00:00
Yi-Ling Chuang
14d31677d6 Merge "Make sure loading extra info once" into tm-dev 2022-05-16 03:26:30 +00:00
tom hsu
36693d8096 [Panlingual][Settings] Add top intro on the top of app list.
- show a message for app selection of user to avoid any confusion of
   searching app.

Bug: b/230689178
Test: see b/230689178
Change-Id: I597e718b81bd7a5019c69dbdfc02f26d7f3af5fd
2022-05-13 16:31:36 +00:00
Edgar Wang
68d12953e7 Update learn more string of FooterPrefernce
Replace FooterPreference#SetLearnMoreContentDescription() with
FooterPreference#SetLearnMoreText().

This is a requirement: All links, controls, and buttons should
also have comprehensible text or tooltip text, so users can identify its
purpose, independent of context, such as when using the URL list from
TalkBack’s local context menu.

Bug: 215045903
Test: manual & robotest
Change-Id: Ib657ba336c5688c1434a58611dea3891001afe14
2022-05-13 08:13:36 +00:00