Commit Graph

4691 Commits

Author SHA1 Message Date
Yiwei Zhang
2b3be86334 Game Driver: rename GUP to Game Driver
Bug: 119221883
Test: Build, flash, boot and make RunSettingsRoboTests
Change-Id: I39724917b516b4871c6b1b1f0d30aa0f793942a4
2019-01-28 00:24:30 -08:00
TreeHugger Robot
1fcbf83856 Merge changes from topic "angle_rules_fast_path"
* changes:
  Guard ANGLE rules checking with a whitelist
  Revert "Revert "Enable ANGLE-for-Android rule processing again""
2019-01-24 18:22:01 +00:00
Michael Groover
b9dd251e1f Merge "Enable device identifier check for priv apps" 2019-01-24 17:46:01 +00:00
Ben Murdoch
754454718e Merge "Migrate AppCompaction settings to DeviceConfig APIs." 2019-01-24 16:19:13 +00:00
Pavel Grafov
46165b5d61 Merge "Whitelist packages from VPN lockdown." 2019-01-24 16:15:08 +00:00
TreeHugger Robot
e1a96063bc Merge changes from topic "calendar-package"
* changes:
  Handle null for the return of getCrossProfileCalendarPackages.
  API change for cross profile calendar feature.
2019-01-24 14:25:45 +00:00
Cody Northrop
5ebb0db104 Guard ANGLE rules checking with a whitelist
In order to reduce the startup impact to near zero, we are
creating a whitelist to be checked before parsing rules.

The whitelist will be generated by the APK based on apps
mentioned in the rules files. At app launch, only those in
the whitelist will do full rules checking.

The whitelist will be checked via Global Settings, which will
be populated by the ANGLE APK when intents are received. The
APK will listen for intents at boot (LOCKED_BOOT_COMPLETED)
and when ANGLE itself is updated (MY_PACKAGE_REPLACED).

The whitelist can also be populated by hand:

  adb shell settings put global angle_whitelist app1,app2,appN

We plan to further mitigate the ANGLE-enabled app impact
by parsing the full rules when creating the whitelist, off of
the critical path.

Note: Developer Options will continue to work, regardless of
whitelist. But temp rules will not be loaded if the app is
not whitelisted.

Test: atest CtsAngleIntegrationHostTestCases
Test: atest google/perf/app-startup/hermetic-apps/cold-dropcache-test -v
Bug: 80239516
Bug: 122528316
Change-Id: I96e5b4d5b4774f59aadbd1e52295437a395cab6b
2019-01-24 07:06:37 -07:00
Ben Murdoch
c26a5a81c4 Migrate AppCompaction settings to DeviceConfig APIs.
To support app compaction P/H experiments, migrate it's
settings away from using the key/value pair string the
rest of ActivityManagerConstants uses, and use the
DeviceConfig APIs instead.

Test: boots, works, atest FrameworksServicesTests:AppCompactorTest

Bug: 122879579

Change-Id: I9d1ae17d9671d0443b728ecdeca7102ba34d9c2f
2019-01-24 14:01:06 +00:00
Pavel Grafov
1d58621a1f Whitelist packages from VPN lockdown.
Bug: 77468593
Test: atest com.android.server.connectivity.VpnTest
Test: atest MixedDeviceOwnerTest#testAlwaysOnVpn
Test: MixedDeviceOwnerTest#testAlwaysOnVpnAcrossReboot
Change-Id: I7f6c5b9172063b588feacd6b9930a6cb88f764ab
2019-01-24 11:34:17 +00:00
TreeHugger Robot
07d4065ace Merge "Add setting for Aware enable/disable" 2019-01-24 10:25:37 +00:00
yuemingw
d2bfbc8246 API change for cross profile calendar feature.
According to new requirements in b/121179845, we are changing the
API pattern from "add/remove" to "set(set<string>)" to support
"enable all packages" operation. Setting the whitelist to null
will enable all packages. This behavior is consistent with existing
methods in DevicePolicyManager, e.g. setPermittedInputMethods.

Also corrected some languages in the comments and annotations.

Bug: 121179845
Test: atest ManagedProfileTest#testCrossProfileCalendar
atest DevicePolicyManagerTest

Change-Id: I87f17a2094792e44fdeb672658bddb871c2c1eeb
2019-01-24 10:04:50 +00:00
TreeHugger Robot
82c9a92d5e Merge "[Game Driver] Add support for whitelist." 2019-01-24 09:20:15 +00:00
Xiangyu/Malcolm Chen
1ea414819a Merge "Add API to handle user's subscription selection changes." 2019-01-24 08:46:54 +00:00
Alex Salo
ef79062cba Merge "Add INTELLIGENCE_ATTENTION experiment namespace" 2019-01-24 07:09:47 +00:00
Soonil Nagarkar
397ad580d3 Add whitelist for location settings piercing
Use a whitelist to control which packages may use location piercing
settings on LocationRequest.

Test: Manually
Bug: 118883513
Change-Id: I16e8496c49b6bef016cb7f090969ed97a39e38c2
2019-01-23 22:47:57 -08:00
Edgar Wang
5ee8154aea Add setting for Aware enable/disable
Bug: 122712565
Test: make
Change-Id: I65358e815c1e2cb30be0ad90b3c94f4af11f17d9
2019-01-24 14:43:07 +08:00
Malcolm Chen
94d74d291e Add API to handle user's subscription selection changes.
When user selects a eSIM subscription, Settings app informs Telephony.
Telephony needs to take actions such as writting it into global
settings, switch profiles and notify registrants, for example
AlternativeNetworkAccessService.

Bug: 120945564
Test: unittest
Change-Id: I846d9444aac368d183e06744c9eb8aa0c08dfe6a
2019-01-23 21:11:08 -08:00
Michael Groover
efca477259 Enable device identifier check for priv apps
Bug: 117781266
Test: atest CtsTelephony3TestCases
Test: atest android.telephony.cts.TelephonyManagerTest
Test: atest android.permission.cts.telephony.TelephonyManagerPermissionTest
Change-Id: I6b54edec787779c91478277ba18744f9696e6e8b
2019-01-24 04:53:15 +00:00
TreeHugger Robot
3eee2c51b6 Merge "Automatically turning off battery saver at a high percentage." 2019-01-24 04:19:26 +00:00
Alex Salo
cbd05e6b56 Add INTELLIGENCE_ATTENTION experiment namespace
Test: m update-api
Bug: 111939367
Change-Id: Ia1476c678efcb4045ed928eeda4b4c4f55bcd753
2019-01-23 19:45:10 -08:00
Peiyong Lin
b3b4cce67c [Game Driver] Add support for whitelist.
Instead of keeping reading the whitelist everytime, we want to store it in
Settings.Global variable and reuse it later.

BUG: 120869311
Test: Build, flash and boot.
Change-Id: I5e39757383c5ba7d31af7efb3e6e8a2996e669f4
2019-01-23 16:35:03 -08:00
Jeff Sharkey
6474100f22 Merge "Migrate to single sanely-sized thumbnails." 2019-01-23 23:47:19 +00:00
Hyunyoung Song
d41cd56850 Merge "Add Setting.Secure for theme customization." 2019-01-23 22:41:07 +00:00
TreeHugger Robot
ac3f33c5b2 Merge "Change the old experiment setup to use the new API" 2019-01-23 22:37:05 +00:00
Kweku Adams
b243a996ca Automatically turning off battery saver at a high percentage.
This introduces a setting that turns off sticky Battery Saver above a
certain threshold and disables Battery Saver if it was enabled due to
the sticky setting.

Bug: 112232746
Test: atest com.android.server.power.batterysaver.BatterySaverStateMachineTest
Test: atest android.provider.SettingsBackupTest
Change-Id: Ib9a9fd627a56529404b41fbabedf8bb4a372074e
2019-01-23 13:54:27 -08:00
Victor Hsieh
293595faa2 Change the old experiment setup to use the new API
Vendors can still set the default behavior by pm.dexopt.priv-app-oob*
system properties, but still the experiment flag can override the
behavior.

This change also removes the audit log because the setting provider is
not ready.  The old code works because we use the default system property
(which may be inconsistent to settings).

Test: cmd package compile -m speed -f com.google.android.dialer
      am start com.google.android.dialer
      cat /proc/`pidof com.google.android.dialer`/maps |grep oat |grep /data
      # Compiled code IS mapped as executable
Test: device_config put fsi_boot oob_enabled true
      pkill com.google.android.dialer; am start ...
      # Compiled code is NOT mapped as executable
Test: device_config put fsi_boot oob_enabled false
      # Compiled code IS mapped as executable
Test: device_config put fsi_boot oob_enabled true
      device_config put fsi_boot oob_whitelist com.android.vending,com.example
      # Compiled code is NOT mapped as executable
Test: device_config put fsi_boot oob_enabled true
      device_config put fsi_boot oob_whitelist com.android.vending,com.google.android.dialer
      # Compiled code IS mapped as executable
Test: device_config reset untrusted_clear
      # Compiled code IS mapped as executable
Test: atest DexManagerTests
Bug: 120793002
Change-Id: I67f29ac593bd2c33dc8c75ce2135cf9ec5490650
2019-01-23 10:17:51 -08:00
Jeff Sharkey
36ee36238c Migrate to single sanely-sized thumbnails.
Instead of generating only a handful of thumbnail "kinds", none of
which scale with display density, shift to generating only a single
thumbnail whose dimensions are limited to half the smallest screen
width of the device.

This change also shifts to storing thumbnails on the relevant volume
where the source data actually came from.  This solves the problem
of having to GC thumbnails for a storage device that we haven't seen
in a long time.

Bug: 119887587
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I2ce6c5051b7058d2f1bba523c077e84a1f0b46e9
2019-01-23 11:03:53 -07:00
Michael Wachenschwanz
b9877a0137 Merge "Add Task Root package info to UsageEvent" 2019-01-23 18:03:40 +00:00
Michael Groover
d15f8b9ad5 Merge "Revoke 'always allow' adb grants after period of inactivity" 2019-01-23 16:47:48 +00:00
Yiwen Chen
57406a7e0e Merge "Add Ramping Ringer platform flags and fix some Ringtone bugs." 2019-01-23 15:20:08 +00:00
Varun Shah
f71cb5ac32 Merge "Revert "Optimize service restart logic."" 2019-01-23 12:45:24 +00:00
Michael Wachenschwanz
0b4ab1f171 Add Task Root package info to UsageEvent
Bug: 113094946
Test: manual (use "adb shell dumpsys usagestats apptimelimit" to verify
apps at the root of tasks are considered active)
Test: atest cts/tests/tests/app.usage/src/android/app/usage/cts/UsageStatsTest.java#testTaskRootEventField
Test: atest cts/tests/tests/app.usage/src/android/app/usage/cts/UsageStatsTest.java#testUsageSourceAttribution
Test: atest UsageStatsDatabaseTest

Change-Id: I40f86743d33c13892de0e59ae02c9ebddb606ee7
2019-01-22 22:19:21 -08:00
Varun Shah
4311f21b06 Revert "Optimize service restart logic."
This reverts commit 16522412eb.

Reason for revert: solution needs some adjustments - will update with a better solution.

Change-Id: I74ed92225017a8c1ac23176ed176663acfef7578
2019-01-23 05:59:31 +00:00
Jeff Sharkey
8a83ae1069 Merge "Sanity check raw paths against requested volume." 2019-01-23 05:47:17 +00:00
Yiwen Chen
3d3ad02312 Add Ramping Ringer platform flags and fix some Ringtone bugs.
Bug: 120789399
Test: When finish the whole change, flash into a dev phone to test first.
Change-Id: Ifd952cf7dfc8fedb6b1b95d276fd8a46e79d172b
2019-01-22 21:41:24 -08:00
Michael Groover
9e7b06efe3 Revoke 'always allow' adb grants after period of inactivity
Bug: 111656592
Change-Id: I679078dc3e8f61f33ca0922a47777eedb6a933de
Fixes: 116512306
Test: atest AdbDebuggingManagerTest
2019-01-22 20:46:20 -08:00
Ivan Chiang
035808eea0 Merge "Add new column into Root to get the supported query args" 2019-01-23 02:56:02 +00:00
Ivan Chiang
ad4ba486b9 Merge "Fix CTS test fail for isTreeUri check in findDocumentPath method" 2019-01-23 02:54:33 +00:00
Varun Shah
359263d17c Merge "Optimize service restart logic." 2019-01-23 02:30:19 +00:00
TreeHugger Robot
f749198d19 Merge "Add exp flag for min number of sys gen smart replies in notifications" 2019-01-22 22:36:37 +00:00
TreeHugger Robot
9b90262605 Merge "Add a DeviceConfig namespace for the NOTIFICATION_ASSITANT package." 2019-01-22 22:35:52 +00:00
Amin Shaikh
b25e9c753c Add Setting.Secure for theme customization.
Change-Id: I71e6fb7182d2f743452ca9f230c1794fac09f61a
Fixes: 122302585
Test: make
2019-01-22 16:52:27 -05:00
Jeff Sharkey
5199727294 Merge "Add nullability annotations for some apis and update java doc" 2019-01-22 21:37:50 +00:00
Jeff Sharkey
3f64ec57dd Sanity check raw paths against requested volume.
When callers are inserting or updating raw "_data" paths, we need to
sanity check them to make sure they're not "crossing the streams"
between storage devices.  For example, it would be really broken to
insert a file on the SD card into the "internal" storage volume.

This also enforces that callers don't "cross the streams" between
multiple storage volumes on devices that support them, since
otherwise they'd end up with very confusing behavior, such as
the same underlying file being inserted into multiple databases.

Also, the "internal" storage volume should really only be used for
common media (such as ringtones), and it shouldn't be allowed to
point into private app data directories, since MODE_WORLD_READABLE
has been deprecated for many years now.

Bug: 117932814
Test: atest MediaProviderTests
Test: atest cts/tests/tests/media/src/android/media/cts/MediaScanner*
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I267eacd45bbd270b8ce9b28de9d6e209f780f31a
2019-01-22 13:55:25 -07:00
Varun Shah
16522412eb Optimize service restart logic.
If a non-persistent service is being restarted and it was killed due to
low memory previously, instead of restarting the service in one second,
we now restart it based on its last known oom_adj value. The backoff
logic of consistent restarts remains the same.

Additionally, when the service is due to restart, if the memory pressure
is still considered to be critical, the new logic will further delay the
service restart.

Initial test results: # of restarts dropped by 40-50% on average with
the optimized logic when the memory pressure was gradually increased.

Tested manually via memeater. Increased the memory pressure by 500 mb
at a time via the following command: adb shell memeater 500
On a 4gb device, no significant restarts were noticed when memory
pressure was increased by 2gb in total. When increased by 3gb in total,
services started to restart and the above results were observed via
the logged output over a 5 min period.

Bug: 79848281
Test: manually (steps listed above)
Change-Id: Idcd1300882321c6033e569736150a8bf7889678b
2019-01-22 12:24:59 -08:00
Gustav Sennton
1aebc9b561 Add a DeviceConfig namespace for the NOTIFICATION_ASSITANT package.
The notification_assistant package will contain flags controling the
default Android Platform implementation of the Notification Assistant
(named ExtServices).
The flags will be read in
android.ext.services.notification.AssistantSettings.

Bug: 120792826
Test: build
Change-Id: Ib57ca8bb707e1582f315390d5d2eb833033b7d25
2019-01-22 19:31:06 +00:00
Alex Salo
1e84afbac2 Merge "Add ADAPTIVE_SLEEP setting" 2019-01-22 18:10:44 +00:00
Ivan Chiang
857a2221ec Add nullability annotations for some apis and update java doc
- Add nullability annotations for some methods
- Update the java doc of isRootsUri to make it more clear

Change-Id: I8b065d526e11fe8d71bb1aec223918e7559967e0
Fix: 122549058
Test: make
2019-01-22 18:59:54 +08:00
TreeHugger Robot
a2eeced7b7 Merge "Adding native flag namespace(netd)." 2019-01-22 04:36:25 +00:00
Svetoslav Ganov
4188aeb5d6 Merge "Use proper API to get op name" 2019-01-22 03:51:14 +00:00