Commit Graph

14907 Commits

Author SHA1 Message Date
Annie Meng
f021dc766c Merge changes Ie9c8934d,Iea747394
* changes:
  Create "android" backup agent in the system process for all users
  [Multi-user] Pass userId on backup agent creation
2019-02-01 14:09:14 +00:00
TreeHugger Robot
2c13539844 Merge "Revert "Minimum viable TimeZoneDetectorService"" 2019-02-01 12:57:32 +00:00
TreeHugger Robot
c01a03bf80 Merge "Only check isTopOfTask() when needed" 2019-02-01 11:15:58 +00:00
TreeHugger Robot
8a72d5a9d5 Merge "Add a new "appPredictor" protection flag." 2019-02-01 03:48:32 +00:00
TreeHugger Robot
ccd5c4896c Merge "StatsManager setActiveConfigsChangedOperation API" 2019-02-01 02:19:11 +00:00
TreeHugger Robot
f973460248 Merge "Implement getting displayId from ActivityManager" 2019-02-01 01:41:31 +00:00
Adam He
bb82c6a9f0 Implement getting displayId from ActivityManager
Change-Id: Ib8659062e5dd58b49c1e1fdee03f5f6a65e00971
Fixes: 121260224
Test: atest CtsContentCaptureServiceTestCases
2019-01-31 15:33:36 -08:00
Sunny Goyal
64643f6dcd Only check isTopOfTask() when needed
This avoids unnecessary binder call to system
Test: Verified on device

Change-Id: I5258550c8fbe837acc93e89f21a44464a00c7d6e
2019-01-31 15:16:21 -08:00
TreeHugger Robot
0e9854e065 Merge "Adding isInstantApp API to UsageEvents" 2019-01-31 23:05:55 +00:00
TreeHugger Robot
7d3adab5e9 Merge "Change foregroundServiceType from enum to flags" 2019-01-31 22:11:41 +00:00
Annie Meng
d582787a82 Create "android" backup agent in the system process for all users
1) Return the system user's appInfo for "android" so we launch into the
system process.
2) In the system process, each user has its own instance of the "android"
backup agent to allow for parallel backups across users.
3) Update agent bookkeeping to key by user id.

Bug: 111500434
Test: 1) "adb shell bmgr backupnow android" for system and non-system
user; verify through debugger and logging that each user has its own
agent instance and both run in the system process; verify backup
succeeds
2) Repeat with "adb shell bmgr restore [token] android"

Change-Id: Ie9c8934daac02fb1c09f37753ef02ef957d18a75
2019-01-31 20:53:59 +00:00
Dimuthu Gamage
88ebac4275 Adding isInstantApp API to UsageEvents
Extending UsageEvents.Event to include isInstantApp()

Bug: 111407095
Test: Expecting to add cts tests to the added API methods
Change-Id: Iead337a23deddc58fa1f2f4a1cc3036572147951
2019-01-31 12:25:59 -08:00
Hui Yu
2d4207f8c1 Change foregroundServiceType from enum to flags
1. Now the value of manifest attribute foregroundServiceType can
be multiple flags ORed together.
2. Add a overloaded version of Service.startForeground() with an
additional parameter foregroundServiceType. The flags in parameter
foregroundServiceType must be a subset of flags specified in manifest
attribute foregroundServiceType, otherwise a IllegalArgumentException is
thrown.
3. Add a field foregroundServiceType in ServiceRecord, it is the types
that have been started on this foreground sevice.

Bug: 111453223
Test: atest frameworks/base/tests/FrameworkPerf

Change-Id: I7eb68f696e6bf75720fe9c9388a6c23a529677f7
2019-01-31 11:50:18 -08:00
Yueming Wang
6f6ab37890 Merge "Enforce cross profile calendar policies in one place." 2019-01-31 19:02:43 +00:00
George Hodulik
cd7695dda0 Add a new "appPredictor" protection flag.
Permissions that have the new apppredictor protection flag will
be granted to the app predictor app, which is AiAi for Pixels.

The MANAGE_APP_PREDICTIONS permission is updated to use the
app predictor flag.

App Predictor for Pixels already set in ag/6019430.
Some one-off handling for app predictor already added in
ag/6025266 and ag/6025267. This cl adds the appPredictor flag.

Test: Tested manually that it worked.
Test: atest CtsPermission2TestCases:PermissionPolicyTest
Bug:123599542

Change-Id: I0550930f78fdb57eea8680762c9b313a330968b6
2019-01-31 10:17:09 -08:00
Jorim Jaggi
9c9b866e1f Merge "Revert "Make WindowContainer surfaces container layers by default."" 2019-01-31 17:26:23 +00:00
Jorim Jaggi
f6ef18334b Revert "Make WindowContainer surfaces container layers by default."
This reverts commit 139c77763b.

Reason: Device gets put into GL comp pretty much all the time,
trashing performance and battery.

Bug: 123686354
Bug: 122561221
Change-Id: Icf658f331c407d03e844557cc2531c034aa38083
Exempt-From-Owner-Approval: Simple revert
2019-01-31 17:26:06 +00:00
Peiyong Lin
a0baea28b7 Merge "Replace createHardwareBitmap with wrapHardwareBuffer." 2019-01-31 15:37:56 +00:00
TreeHugger Robot
dbde8ac29b Merge "Add @RequiresFeature to setPasswordHistoryLength." 2019-01-31 15:01:39 +00:00
Martijn Coenen
81973983b0 Merge "Allow app to specify class name for app zygote preloading." 2019-01-31 12:35:13 +00:00
Lenka Trochtova
aa625a7caf Add @RequiresFeature to setPasswordHistoryLength.
Add the @RequiresFeature(FEATURE_SECURE_LOCK_SCREEN) annotation
to setPasswordHistoryLength for the sake of consistency -
the other password history APIs already have the annotation.

Bug: 123270501
Bug: 111072170
Bug: 111071972
Test: make

Change-Id: I0a321d6bb1b8fb2a4c7ccebfd7c46b2dc9ad8956
2019-01-31 11:47:46 +01:00
Michael Groover
3684f14c48 Merge "Set Build.SERIAL to UNKNOWN for all target SDK" 2019-01-31 07:29:15 +00:00
Hung-ying Tyan
26a8573b27 Merge "Add the DynamicAndroid Service" 2019-01-31 06:31:51 +00:00
linanson
2bcd403526 SeamlessMedia button as one of media action button
- Implement the mechanism for Seamless button in the group of media action button.
- Have a fake Seamless icon in the right of media action button group.
- Need to bind with MediaOutputSlice that are implementing.

Bug: 118428931
Test: Build pass
Change-Id: Idc51d416cc1fc85babdc83d138c8558db5ed5d8e
2019-01-31 14:20:49 +08:00
Howard Chen
0a94764738 Add the DynamicAndroid Service
Define the DynamicAndroid with AIDL.
  Add a java implementation.
  Start a service instance in the system server.
  Add a permission test.

Bug: 122015653
Test: Build & Test on a pixel phone with following command \
  ./frameworks/base/services/tests/runtests.py -e class com.android.server.DynamicAndroidTest

Change-Id: I2e54b6b71fac4a4c5a9c9c25ce6bdac74cddcfb7
2019-01-31 14:19:34 +08:00
TreeHugger Robot
1fe4278594 Merge "Test Context's opPackageName should be the target package name" 2019-01-31 02:40:31 +00:00
yuemingw
dded98f7c4 Enforce cross profile calendar policies in one place.
Instead of checking dpm policy in primary user and settings value
in managed profile user, we'd better check them all in primary user.

Calendar provider will need INTERACT_ACROSS_USER_FULL to access
settings provider and this permission is not granted to any app
in privapp-permissions-platform.xml. So I think it's safer to
change isPackageAllowedToAccessCalendar to check both
admin policy & settings value.

Bug: 123629973
Test: atest CalendarProvider2Test
Change-Id: I01bff1317916bac6de72a71a029a2f99dc8e9a0b
2019-01-31 02:17:10 +00:00
Peiyong Lin
9d4274005e Replace createHardwareBitmap with wrapHardwareBuffer.
The bitmap.createHardwareBitmap doesn't take a ColorSpace as input, as a result
the returned bitmap is always in SRGB color space. Given that we want to remove
the assumption of SRGB color space, we replace the usage of
createHardwareBitmap with wrapHardwareBuffer which takes an extra argument
ColorSpace. As a result, we will be able to also fix SurfaceControl and various
other places that use screenshot in follow up patches.

BUG: 120904891
Test: CtsUiRenderingTestCases
Change-Id: I57fc0c85d68df43b0e69f9a1ebac00d2ba39554d
2019-01-30 15:22:54 -08:00
Makoto Onuki
4becc35ead Test Context's opPackageName should be the target package name
AppOpsManager checks opPackageName against the calling UID,

Fix: 123595310
Test: atest cts/tests/app/src/android/app/cts/TestContextTest.java

Change-Id: I3de72ae77a8b25f42913369af5b8da0132583131
2019-01-30 13:52:56 -08:00
Julia Reynolds
2fdeefc352 Merge "Tests for matchesCallFilter" 2019-01-30 21:27:53 +00:00
Mehdi Alizadeh
26447bc85c Merge "Ensure some calls are available for testing" 2019-01-30 18:37:17 +00:00
Sudheer Shanka
415c74155c Merge "Don't ignore COLUMN_MEDIA_SCANNED values from caller." 2019-01-30 18:22:02 +00:00
Stefano Tommasini
4ac2c95f78 Merge "Revert "Revert "Add support for enabling backup in work profile in""" 2019-01-30 17:53:47 +00:00
Fabian Kozynski
14e327b5ff Merge "API for querying/revoking current NotificationAssistant" 2019-01-30 16:34:18 +00:00
Julia Reynolds
876219430d Tests for matchesCallFilter
Test: cts
Bug: 123406095
Change-Id: Ibece70d3e5d77d447ece4f3d3118b315a8d6e5cb
2019-01-30 10:39:08 -05:00
Stefano Tommasini
fc86b8e16a Revert "Revert "Add support for enabling backup in work profile in""
This reverts commit 0bfafb7f41.

Reason for revert: Removing enforceUnlocked() should fix the bug and Backup now supports it.

Change-Id: Id06f63c62b0f43cd70da77df48674146d4cc0412
2019-01-30 14:15:11 +00:00
Julia Reynolds
3b54a6043a Merge "Add a setting for hiding silent status icons" 2019-01-30 13:41:08 +00:00
Tiger Huang
54caefd531 Merge "Let the activity embedded in ActivityView can be directly touched" 2019-01-30 10:36:02 +00:00
Martijn Coenen
fb7caa96f9 Allow app to specify class name for app zygote preloading.
Instead of using a fixed class name, define an interface for
preloading application code that must be implemented by applications
that use the application zygote.

Also, add an ApplicationInfo parameter to said function, so the app
knows where to look for its data and code.

Bug: 111434506
Test: atest CtsApptestCases:ServiceTest
      atest CtsSeccompHostTestCases

Change-Id: I1f8472da89dc90562dcb4e479e3d87ebf49b926c
2019-01-30 09:57:19 +01:00
Sudheer Shanka
684c02a773 Don't ignore COLUMN_MEDIA_SCANNED values from caller.
Right now, DownloadProvider only uses the COLUMN_MEDIA_SCANNED
value if it is coming from addCompletedDownload and for the rest
of the requests, it ignores the incoming COLUMN_MEDIA_SCANNED value
and always invokes mediascanner. This is not what the documentation
says. For e.g., if the caller uses DownloadManager.setDestinationUri()
API, then unless otherwise specified, the download doesn't need to be
mediascanned.

Also, since we are inserting user visible downloads to MediaProvider,
use that info to populate the COLUMN_MEDIAPROVIDER_URI column as well
and update DownloadProvider to not invoke MediaScanner.

Bug: 123440050
Test: atest DownloadProviderTests
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I65ccae672eabe2efd5132d4b105c18bb591379fc
2019-01-29 19:09:26 -08:00
Chavi Weingarten
e82defc28e Merge "Make WindowContainer surfaces container layers by default." 2019-01-30 01:12:39 +00:00
Evan Laird
a194630221 Merge "Add StatusBarManager#disableForSetup(boolean) @SystemApi" 2019-01-30 00:20:19 +00:00
Evan Laird
3cc59ebe93 Merge "Remove @hide from top-level StatusBarManager" 2019-01-30 00:19:19 +00:00
Winson Chung
5208cbee8d Ensure some calls are available for testing
Bug: 122694646
Test: atest CtsAppPredictionServiceTestCases:AppPredictionServiceTest

Change-Id: I4534eabf8ec6365cd49117f567e25eadf3f63407
2019-01-29 15:59:10 -08:00
TreeHugger Robot
895ce08d6b Merge "Migrate dialer to RoleManager" 2019-01-29 23:28:16 +00:00
Pavel Grafov
0c0af4b0cc Merge "Whitelist packages from VPN lockdown: DPM API." into pi-dev-plus-aosp
am: 299f825678

Change-Id: I3deb4a865e109e2b2e67dc7d8ffc775747f34303
2019-01-29 14:13:19 -08:00
Julia Reynolds
12ad7ca74a Add a setting for hiding silent status icons
Test: atest, cts
Bug: 123419917
Change-Id: Iedfc1fb07e0e2c6639cb0b711cf81553cff29262
2019-01-29 17:03:25 -05:00
Fabian Kozynski
d942566395 API for querying/revoking current NotificationAssistant
Additionally, NotificationAssistants guarantees that only one
NotificationAssistantService can be allowed per user at a time.

Test: added atest
Bug: 120852765
Change-Id: I19d2940e6e198a166963a2dbc05dbe8d9b8d084e
2019-01-29 16:31:12 -05:00
Amith Yamasani
173af94d25 Merge "Introduce a new process state for location fg service" 2019-01-29 20:07:13 +00:00
Pavel Grafov
5cba336daf Whitelist packages from VPN lockdown: DPM API.
Bug: 77468593
Test: atest MixedDeviceOwnerTest#testAlwaysOnVpn
Test: atest MixedDeviceOwnerTest#testAlwaysOnVpnAcrossReboot
Change-Id: I7508070f828fb7150df5d9e34846535d57c6a7c3
2019-01-29 19:37:21 +00:00