Commit Graph

4174 Commits

Author SHA1 Message Date
Dianne Hackborn
19e99b432b Merge "Further flesh out app ops foreground state." into pi-dev am: 7105e2ca9a
am: 74dc457242

Change-Id: I54ec9070d60b234f22c6940f78ab001ffdd15b28
2018-05-09 23:11:48 -07:00
Dianne Hackborn
74dc457242 Merge "Further flesh out app ops foreground state." into pi-dev
am: 7105e2ca9a

Change-Id: I3a8056b6685ad7687ff5d54748c242eb9c906343
2018-05-09 22:59:34 -07:00
Dianne Hackborn
65a4f251c7 Further flesh out app ops foreground state.
Fix some bugs, add the ability to monitor state changes, improve
dumpsys output to help debugging, add a new check API that allows
the caller to get the real state.

Bug: 78480444
Test: atest FrameworksServicesTests:AppOpsServiceTest
Test: atest CtsPermissionTestCases:AppOpsTest
Change-Id: I3d41be9968c1d95a1456f4052da958ea64aa068d
2018-05-09 18:02:35 -07:00
Victor Hsieh
1c23dc0ad3 Merge "Allow only selected priv apps to run OOB" into pi-dev am: 792d36c170
am: 5c195ee292

Change-Id: I9aff6c33256745d6c8666365b402e7bd278257cb
2018-05-09 13:15:12 -07:00
Victor Hsieh
5c195ee292 Merge "Allow only selected priv apps to run OOB" into pi-dev
am: 792d36c170

Change-Id: Iad80a321e1b76f19935a23290594a36fd057840c
2018-05-09 12:37:38 -07:00
Victor Hsieh
792d36c170 Merge "Allow only selected priv apps to run OOB" into pi-dev 2018-05-09 19:21:22 +00:00
Victor Hsieh
785d618b1a Allow only selected priv apps to run OOB
- Add pm.dexopt.priv-apps-oob-list to allow selecting specific packages
  to run OOB, in a comma-separated string of package names. When set to
  "ALL" (default), all priv apps will run in OOB.
- Add a global config priv_app_oob_list to persist the state for
  experiment.
- Also make background dexopt to respect the config.

Test: 0. Reset previous OOB settings.
      1. settings put global priv_app_oob_list \
         com.google.android.gms,com.android.vending
      2. cmd package compile -m speed -f com.google.android.gms (then
         com.android.vending, com.google.android.googlequicksearchbox)
      3. dumpsys package dexopt
         # .vending and .gms are "verify", .googlequicksearchbox is
         # "speed".
Test: settings put global priv_app_oob_list 'ALL'  # see the same result
Test: settings delete global priv_app_oob_list  # see the same result
Test: atest SettingsBackupTest
Bug: 30972906
Bug: 63920015
Change-Id: Iba47b4763a026cdc94939db0a743822278917269
2018-05-09 07:45:51 -07:00
Liam Byrne
3a808cda91 Merge "Remove hidden Settings.getGTalkAndroidId method" 2018-05-08 22:53:08 +00:00
Rohan Shah
c30bf94134 Merge "Add knobs for tweaking blocking helper thresholds" into pi-dev am: 7af8fe3e29
am: 566a00935e

Change-Id: I39b306a0d56b4b9a27db4af098b0b30f75e535c7
2018-05-08 14:32:03 -07:00
Rohan Shah
566a00935e Merge "Add knobs for tweaking blocking helper thresholds" into pi-dev
am: 7af8fe3e29

Change-Id: I5a5307d2345bb4ab5d3e91f3b58eaf8fc875f1ef
2018-05-08 14:17:35 -07:00
Rohan Shah
7af8fe3e29 Merge "Add knobs for tweaking blocking helper thresholds" into pi-dev 2018-05-08 21:00:07 +00:00
Rohan Shah
0350dab5b6 Add knobs for tweaking blocking helper thresholds
Added both blocking helper parameters to Global Settings to allow for
tweaking stats/values. Added listeners for value updates (so that
channels are updated properly with new thresholds).

Bug: 77143005
Test: manually, test cases
Change-Id: Ia5cfb29ca40500a694261bd5e9e60fa1f34e742a
2018-05-08 09:34:38 -07:00
Annie Meng
a9b443de16 Merge "Remove unused critical accessibility settings from backup/restore" 2018-05-08 12:45:57 +00:00
chenedward
c47329bb51 Backup and restore default alarm sound setting.
As currently we don't backup/restore the selected alarm sound
(alarm_alert), but both notification sound and ringtone did,
we add the feature to completed backup/restore sound setting.

Bug: 78330382
Test: atest FrameworksCoreTests:SettingsBackupTest
Change-Id: I83321b5cdab4b7b13c46fa4f32785750e3824fc1
2018-05-08 02:11:01 +00:00
Liam Byrne
ac9324a604 Remove hidden Settings.getGTalkAndroidId method
This is obsolete given GTalk has been turned down, and is hidden and
never used anywhere as far as I can tell so isn't a public API change.

BUG=79364231

Test: Removing hidden method not used anywhere

Change-Id: I76ca5649f390ef42700e42ccf9863b121020bebf
2018-05-07 17:25:59 -07:00
android-build-team Robot
4abb099e14 Merge "Convert RTT background throttle to a settable value (1/2)." into pi-dev am: 564942d065
am: 2629cb09ea

Change-Id: Ic8858402a12e08ca1774d06a8b0d435ca40826e5
2018-05-04 16:59:54 -07:00
android-build-team Robot
2629cb09ea Merge "Convert RTT background throttle to a settable value (1/2)." into pi-dev
am: 564942d065

Change-Id: I4fa6433b1e0fa320568c0b8c5ed5f2ce5c93314b
2018-05-04 16:53:04 -07:00
android-build-team Robot
564942d065 Merge "Convert RTT background throttle to a settable value (1/2)." into pi-dev 2018-05-04 23:40:22 +00:00
Annie Meng
37adc270fd Remove unused critical accessibility settings from backup/restore
ACCESSIBILITY_SPEAK_PASSWORD was deprecated in O and is forced true with
a default.

UI_NIGHT_MODE was removed from being backed up since M.

This is to clean up the critical accessibility settings check.

Bug: 78227065
Test: 1) atest SettingsBackupTest
2) atest SettingsValidatorsTest
3) manual: d2d does not restore ACCESSIBILITY_SPEAK_PASSWORD or
UI_NIGHT_MODE

Change-Id: I50478fc8a476817301cce7187165a79b249ee31a
2018-05-03 20:00:27 +01:00
Michael Wachenschwanz
52922df1d8 Merge "Add Stable Charging Threshold for AppStandby" into pi-dev am: b3972f9d23
am: 2870552de6

Change-Id: I8ff2a30cbcef326f03f4308b064abfe890202b32
2018-05-01 17:45:13 -07:00
Michael Wachenschwanz
2870552de6 Merge "Add Stable Charging Threshold for AppStandby" into pi-dev
am: b3972f9d23

Change-Id: Iacdddabdd58c0da6b53d997b08ddf70bef583392
2018-05-01 17:35:00 -07:00
Michael Wachenschwanz
b3972f9d23 Merge "Add Stable Charging Threshold for AppStandby" into pi-dev 2018-05-02 00:23:23 +00:00
android-build-team Robot
bc231faae7 Merge "Add personalization state paused constant" into pi-dev am: 1fc69c5eda
am: ee2b9ee200

Change-Id: I8dd9fbf9d2e7e30f17e2c937ba1e3064f7ae091b
2018-05-01 12:17:23 -07:00
android-build-team Robot
ee2b9ee200 Merge "Add personalization state paused constant" into pi-dev
am: 1fc69c5eda

Change-Id: I9a79ca52682c4cc13a3611560552b2470dc8ebe5
2018-05-01 12:10:02 -07:00
Wei Wang
b6e04d5383 Convert RTT background throttle to a settable value (1/2).
Bug: 69323456
Test: Manual test. Unit tests with runtest.sh.
Change-Id: I7dd3efc0ef3f0a12303f927da134abbd2383deb6
2018-04-30 19:49:02 -07:00
Ajay Nadathur
43bda82c10 Add personalization state paused constant
- Add a new constant USER_SETUP_PERSONALIZATION_PAUSED to inform
interested listeners when personalization is paused.

bug: 78898802
Test: Manually tested and verified
Change-Id: I4481c38e31a8b47dfc98d8733b446885899d4a67
2018-04-30 21:42:44 +00:00
android-build-team Robot
8d7b81e67f Merge "Expose APIs used by CtsPermissionTestCases" 2018-04-27 18:56:48 +00:00
Chia-I Wu
4786eb61ac Merge "Add COLOR_MODE_AUTOMATIC" into pi-dev am: 06c0c3a933
am: 58030441c0

Change-Id: Ic75d5cbb50303981b1b131bb21f1a4cacbc35312
2018-04-27 09:06:42 -07:00
Chia-I Wu
58030441c0 Merge "Add COLOR_MODE_AUTOMATIC" into pi-dev
am: 06c0c3a933

Change-Id: I39b0120433fd1585ba2be7aa777bbb1686d1a254
2018-04-27 08:57:28 -07:00
Chia-I Wu
06c0c3a933 Merge "Add COLOR_MODE_AUTOMATIC" into pi-dev 2018-04-27 15:47:41 +00:00
Sudheer Shanka
dfc8b3ff8e Merge "Schedule external stats sync on battery level change with a delay" into pi-dev am: a750da1960
am: 0c3d9cefcb

Change-Id: I2961daf8ab38bed8f5d4fed804447b0ae2d66fa9
2018-04-26 20:46:41 -07:00
Sudheer Shanka
0c3d9cefcb Merge "Schedule external stats sync on battery level change with a delay" into pi-dev
am: a750da1960

Change-Id: I5af09a2df4458611ad9f3c9812dc0f787bddbd4f
2018-04-26 20:33:52 -07:00
Sudheer Shanka
a750da1960 Merge "Schedule external stats sync on battery level change with a delay" into pi-dev 2018-04-27 03:20:38 +00:00
Michael Wachenschwanz
5ca5cb6c53 Add Stable Charging Threshold for AppStandby
Delay parole when charging to ensure the device has some time to charge
and avoid a spike is activity on plug in.

Change-Id: If85f097249aeed6b64f43a22f4d25ff0a070febb
Fixes: 78040839
Test: atest AppStandbyControllerTests
2018-04-26 15:44:58 -07:00
Sudheer Shanka
0719c6af44 Schedule external stats sync on battery level change with a delay
and fix locking in scheduleCpuStatsSyncDueToWakelockChange().

Bug: 74146897
Test: atest cts/hostsidetests/incident/src/com/android/server/cts/BatteryStatsValidationTest.java
Test: atest core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Change-Id: I2891dfb8a0aedf429232f45e26deab93c738506e
2018-04-26 15:43:40 -07:00
Philip P. Moltmann
33115156f9 Expose APIs used by CtsPermissionTestCases
Test: atest CtsPermissionTestCases
Bug: 77604428
Change-Id: Ib5e9b678e98aab86dac90610ed071eb89f14fce9
2018-04-26 09:40:57 -07:00
Lei Yu
15214bbe42 Merge "Add ADAPTIVE_BATTERY_MANAGEMENT_ENABLED" into pi-dev am: 4620d9b3a3
am: a4940ae0b2

Change-Id: I0c8c974b880a0e0a7cad7edbc1391d578c018599
2018-04-25 17:14:58 -07:00
Lei Yu
a4940ae0b2 Merge "Add ADAPTIVE_BATTERY_MANAGEMENT_ENABLED" into pi-dev
am: 4620d9b3a3

Change-Id: I4890f4b4e1f8dbcf144b2e613165382d67b70de3
2018-04-25 17:02:26 -07:00
TreeHugger Robot
4620d9b3a3 Merge "Add ADAPTIVE_BATTERY_MANAGEMENT_ENABLED" into pi-dev 2018-04-25 23:37:43 +00:00
Chia-I Wu
1e0e7176bd Add COLOR_MODE_AUTOMATIC
COLOR_MODE_SATURATED disables color management and thus treat any
color space as panel color space.  COLOR_MODE_AUTOMATIC is similar
to COLOR_MODE_SATURATED in that it stretches color spaces to panel
color space, but the stretching is color space aware.

persist.sys.sf.native_mode is extended to be a integer, where

 0: use DisplayColorSetting::MANAGED
 1: use DisplayColorSetting::UNMANAGED
 2: use DisplayColorSetting::ENHANCED

Bug: 73824924
Test: manual
Change-Id: Ia356958d8e1fbae90f244ded7111de2e45aa4b3c
2018-04-25 11:35:36 -07:00
Sudheer Shanka
53370a7894 Merge "Rate limit battery external stats collection in takeUidSnapshot(s)." into pi-dev am: 6bc6e21be7
am: ec9e20a1d9

Change-Id: Ifbc3b63ce0173c7f066ed3f5a360c0cca53f1814
2018-04-23 15:08:39 -07:00
Sudheer Shanka
ec9e20a1d9 Merge "Rate limit battery external stats collection in takeUidSnapshot(s)." into pi-dev
am: 6bc6e21be7

Change-Id: I50eba3f8c2171c511e0b1ecd3d0e605956e97d24
2018-04-23 14:52:01 -07:00
Sudheer Shanka
e56013aa31 Rate limit battery external stats collection in takeUidSnapshot(s).
Bug: 74146897
Test: atest cts/tests/tests/os/src/android/os/health/cts/SystemHealthManagerTest.java
Test: atest core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Change-Id: I2e01146718c3ce65d230308097622b958cb2897a
2018-04-23 11:38:36 -07:00
Lei Yu
4b976ad270 Add ADAPTIVE_BATTERY_MANAGEMENT_ENABLED
APP_STANDBY_ENABLED is controlled by server side to do experiment.
Before this CL, Adaptive Battery is hooked up to this flag, so
even though if user turns it off, it may be turned on by server.

Add a high level ADAPTIVE_BATTERY_MANAGEMENT_ENABLED to control
the feature in settings UI side.

AppStandbyController looks at both flags and enables standby
only if both are true.

Bug: 78153913
Test: Build
      Manually change both flags (through UI and adb)
      Verify dumpsys usagestats shows the correct state
      for mAppIdleEnabled.
Change-Id: I1fb4461f382e1ee87000fdc38962d94a17891c1e
2018-04-19 11:47:38 -07:00
Yu-Han Yang
126b83de9c Merge "Add setting for GNSS location request update duration" into pi-dev am: af52d9815a
am: 53bab450b9

Change-Id: I47c8ff74e6297a8a78d9710614353bbf29542120
2018-04-18 12:04:16 -07:00
Yu-Han Yang
53bab450b9 Merge "Add setting for GNSS location request update duration" into pi-dev
am: af52d9815a

Change-Id: If268c45fa38671ebe17b4f7c0c9d58b2029cea48
2018-04-18 11:26:49 -07:00
TreeHugger Robot
af52d9815a Merge "Add setting for GNSS location request update duration" into pi-dev 2018-04-18 18:10:04 +00:00
TreeHugger Robot
951a9700ed Merge "Making app_standby_enabled a SystemApi" 2018-04-18 01:08:18 +00:00
Qingxi Li
8fadaa1d1d Merge "Add Global Settings to device whether show Carrier menu" into pi-dev am: ff03f0cfe4
am: 166f56c4cf

Change-Id: I737af4163b98dc16cae7f9618310d1e2398a6526
2018-04-17 16:13:29 -07:00
Qingxi Li
166f56c4cf Merge "Add Global Settings to device whether show Carrier menu" into pi-dev
am: ff03f0cfe4

Change-Id: Ia086ac7fcaa4faa45c9fce5463b700d735bec1f8
2018-04-17 15:46:07 -07:00