Commit Graph

14928 Commits

Author SHA1 Message Date
Eran Messeri
55b8d082ba KeyChain: Improve key override documentation.
Improve the documentation on the case of key override: When a new key is
generated/installed using an alias that already exists.

In particular, clarify that grants are lost and that a new call to
KeyChain.choosePrivateKeyAlias must be issued in this case.

Bug: 123563258
Test: that it builds.
Change-Id: I055e95f57b9576883736ca0cfa6a998dec08a6c2
2019-02-07 23:45:44 +00:00
Hai Zhang
f28075bf00 Merge "Add flags parameter for managing role holders." 2019-02-06 23:04:44 +00:00
TreeHugger Robot
0600f09bd2 Merge "Make DPM's setDefaultSmsApplication public API" 2019-02-06 18:14:40 +00:00
Stefano Tommasini
bd8491866c Merge "Create API in BackupManagerService for work profile serial id mapping." 2019-02-06 17:41:02 +00:00
Dianne Hackborn
bbf7d55941 Merge "Fix issue #123661377: API Review: MODE_FOREGROUND" 2019-02-06 17:26:37 +00:00
Makoto Onuki
db7d1c98a4 Merge "Rename SmsAppService to CarrierMessagingClientService" 2019-02-06 17:01:38 +00:00
Julia Reynolds
7f52f4a051 Merge "Add settings for notification bubbling" 2019-02-06 13:41:43 +00:00
Hai Zhang
71d70360b2 Add flags parameter for managing role holders.
This change allows passing a flag parameter when managing role
holders, including a DONT_KILL_APP flag that can be used by the
request role dialog.

Bug: 123429697
Test: manual
Change-Id: I57b690dcdfbf6fd13940cf45d392a48adeccdfaa
2019-02-05 15:37:40 -08:00
Stefano Tommasini
471a35da6c Create API in BackupManagerService for work profile serial id mapping.
The launcher needs to know the serial id of the ancenstral device's work
profile  and the serial id of the current device's work profile in order
to properly perform a restore.

Test: atest BackupManagerService
Bug: 111301511

Change-Id: Ia929dcc2cb599f935183be1820b1c45f2d6e1de7
2019-02-05 18:16:49 +00:00
Felipe Leme
aba2ef4af2 Merge "Made ContentCapture APIs available for testing." 2019-02-05 15:20:04 +00:00
Felipe Leme
0a64976a09 Merge "Refactored how initial content capture events are sent." 2019-02-05 15:15:17 +00:00
Julia Reynolds
4509ce731c Add settings for notification bubbling
And a new api to consolidate that information for notification
listeners

Test: atest
Bug: 123543052
Change-Id: I61d1718ef5b5bb8ab824d4c3efff511669266313
2019-02-05 08:47:16 -05:00
Chad Brubaker
7685530067 Merge "Log noteProxyOp and startOp as well" 2019-02-05 06:15:21 +00:00
Felipe Leme
19652c0c27 Made ContentCapture APIs available for testing.
Test: atest CtsContentCaptureServiceTestCases
Test: m update-api

Bug: 123584359
Bug: 119187075

Change-Id: I4ece03de6c7994451dbb9d0ce36d37f20656d3e0
2019-02-04 21:09:16 -08:00
Felipe Leme
01297698a1 Refactored how initial content capture events are sent.
The overall workflow of Content Capture is:
 - send initial structure
 - send deltas afterwards

Initially, the initial structure was being reported one view at time, which was causing janking.
This CL changes it so while that while the initial structure is being laid out, the content captures
are held. Then after it's finished, it traverses the structure and sends the initial events.

This change also allowed use to optimize the performance by caching the following state:
 - View.isImportantForContentCapture()
 - View.getContentCaptureSession()
 - Context.getContentCaptureManager()

Besides the performance improvements, this approach also has the following advantanges:
- It sends the VIEW_APPEARED events for the parent views before the events for the children.
- It send events to notify when the view structure layout is ready.

Bug: 123307965
Test: atest CtsContentCaptureServiceTestCases
Test: m update-api

Change-Id: I6db7cc11c6edf65cbffe42187fda82c84c3665ff
2019-02-04 18:28:15 -08:00
Dianne Hackborn
f8709f574f Fix issue #123661377: API Review: MODE_FOREGROUND
Expand documentation of MODE_FOREGROUND to better explain its
subtleties.

Bug: 123661377
Test: built docs
Change-Id: I522f439d677ee5c1000047c2017076fc36c26118
2019-02-04 16:31:24 -08:00
TreeHugger Robot
729bf1cf17 Merge "Create a default package name for device level events." 2019-02-04 22:20:19 +00:00
Makoto Onuki
05d64cbc41 Rename SmsAppService to CarrierMessagingClientService
Also rename the permission and the intent action.

Change-Id: I366a136556a42db1eb657dfb8e797ec22b67a5ba
Fix: 123661399
Test: atest CtsAppBindingHostTestCases
2019-02-01 16:10:05 -08:00
Chad Brubaker
9f39431529 Log noteProxyOp and startOp as well
Test: Manual
Bug: 123351070
Change-Id: Ib30edfcaedb2427f0725d0a921e8d2d5bac10bce
2019-02-01 14:05:54 -08:00
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