Commit Graph

8540 Commits

Author SHA1 Message Date
Jeffrey Huang
77db950964 Merge "Rename writeToProto to be dumpDebug" 2019-12-06 18:53:15 +00:00
TreeHugger Robot
4f1d1ca772 Merge "Fix asset loading on ResourcesImpl swap" 2019-12-06 15:38:27 +00:00
Winson
c932ff2100 Fix asset loading on ResourcesImpl swap
The ResourceLoaderManager reference was not being updated and
so any configuration change would drop loaders from the asset
search list.

Also re-enables and updates a test originally designed to catch
this kind of problem.

Test: atest ResourceLoaderChangesTest

Change-Id: I5d9bba2f85c516573d3da0c8f1a97a1d716b3a34
2019-12-05 16:52:13 -08:00
Songchun Fan
4e19d8fda3 Merge "[incremental/installation] new API to add file to session" 2019-12-05 20:56:03 +00:00
Songchun Fan
b7c6d8d861 Merge "[incremental] data loader manager interface" 2019-12-05 20:55:50 +00:00
Jeffrey Huang
cb78285b81 Rename writeToProto to be dumpDebug
We want to eventually migrate some of these APIs to be @SystemApi for mainline modules.
The #dumpDebug name is more appropriate than #writeToProto.

Bug: 142279786
Test: Manual
Change-Id: I60793e91cedf6b720d4ecef6a8484f4fed4ff30f
2019-12-05 11:28:11 -08:00
Alan Stokes
f25c755705 Merge "Add PackageManager#getInstallSourceInfo() to the API." 2019-12-05 15:57:02 +00:00
Songchun Fan
4e758697eb [incremental/installation] new API to add file to session
A new method called addInstallationFile() to add files to an installation session.

Test: builds
Change-Id: Iaf086f5cfbc131428668e37d83e7677f5d5bf586
2019-12-04 18:05:41 -08:00
Songchun Fan
6dd47b58c5 [incremental] data loader manager interface
Checking in the interface for data loader manager and installation
files in android.content.pm.

Copied from branch master-instamatic. TODO to update the code with
latest API design.

Test: builds
Change-Id: Ie87dd8b45dc18f538ddabf87e2899e958133ff04
2019-12-04 11:00:23 -08:00
Alex Buynytskyy
ea4fe39ad3 Adding a non-blocking version of transfer.
Along with blocking utility method.

Test: atest PackageManagerShellCommandTest
Bug: b/136132412

Change-Id: I4ff8504c54c989e4d6a18d53d8b015d9481b4781
2019-12-03 13:20:23 -08:00
Alan Stokes
cae316df07 Add PackageManager#getInstallSourceInfo() to the API.
Adds a new parcelable class InstallSourceInfo and a method to retrieve
it for a given package.

Also deprecates getInstallerPackageName(), which is subsumed by the
new method.

Bug: 134746019
Test: atest PackageManagerTests
Test: atest CtsContentTestCases
Change-Id: I9e5be29cac15a6bbe1482a6fdefca595418e6e66
2019-12-03 16:37:55 +00:00
Neil Fuller
8c6790cc7e Merge "Add a new time zone detection service" 2019-11-28 13:00:28 +00:00
Neil Fuller
3e3b5405b6 Add a new time zone detection service
Add a new time zone detection service. Much of the code is from
frameworks/opt/telephony with some changes for naming, threading and
to modify the interaction with the "Callback" class.

Overall goal:

Implementing the service in the system server means it will be easier to
add new time zone detection logic unrelated to telephony in future.

Bug: 140712361
Test: atest com.android.server.timezonedetector
Test: atest android.app.timezonedetector
Change-Id: I89505fc4fecbd3667b60f8e1479b8f177eaa60ae
2019-11-28 12:58:05 +00:00
Songchun Fan
f4c2c56121 Merge "[incremental] Manager, Storage and changes to Package Manager Service" 2019-11-28 07:38:50 +00:00
Songchun Fan
d1b41d49eb [incremental] Manager, Storage and changes to Package Manager Service
Checking in basic high-level classes and their interactions with
package manager service.

Incremental Manager manages IncrementalStorage instances. Both are
backed by Incremental Service.

Package Manager Service uses Incremental Manager to handle file
operaions on Incremental File System, such as renaming and cleanup.

Also adding place holders for native library handling.

Test: builds
Change-Id: I78b64f795de480e109aeaffe61272a413a6b4be5
2019-11-27 15:47:29 -08:00
Peter Wang
7701f57250 [Telephony Mainline] Exposed sendOrderedBroadcast
with appOp as String and options as Bundle

Bug: 139077993
Test: Build, GsmInboundSmsHandlerTest, CdmaInboundSmsHandlerTest and WapPushOverSmsTest
Change-Id: I60e21c7202d1bc7c5d28dfad2e2edde902f28a15
2019-11-27 15:20:42 -08:00
TreeHugger Robot
8baf5b7578 Merge "Do not use empty UserInfo constructor" 2019-11-26 23:47:28 +00:00
TreeHugger Robot
ca4f0580fe Merge "Add public API and stub implementations for app integrity manager (service)." 2019-11-26 20:31:33 +00:00
Bookatz
5e2c884015 Do not use empty UserInfo constructor
The UserInfo() constructor is not safe, since it does not set the
mandatory fields. It should not be used. Right now it is used in some
tests, so we cannot remove it yet. But we mark that it should not
be used.

Test: N/A (just comments/annotations)
Bug: 142482943
Change-Id: I2f70a8d372c2e2bcd0e136cfe7ff76f9756dddeb
2019-11-26 12:09:48 -08:00
Song Pan
75147d5967 Add public API and stub implementations for app integrity manager (service).
App integrity manager will accept rules from verifier and evaluate these rules
during install (and accept/reject the install accordingly). For more
information, see the linked bug (and the blocked bug).

Design doc: go/integrity-component-android-infra

Bug: 143689885
Change-Id: Ie965c6cc77987e06e9dea4be8fb49785a7bd08c4
Test: moving only
2019-11-26 18:38:17 +00:00
Roshan Pius
f7ea8f9d32 Revert "Add a new wifi protection level"
This reverts commit 73266f2f64.

Reason for revert: Wifi services no longer plan to be a separate
APK/process for mainline. Will instead become a jar loaded from Apex.

Bug: 144722612
Test: Device boots up & connects to wifi networks.
Change-Id: I234510b96ddd39f64f74eb0573963365f9ff5556
2019-11-25 21:00:00 -08:00
Roshan Pius
ac76d48454 Revert "Mainline wifi stack module"
This reverts commit 6f5338dd8f.

Reason for revert: Wifi services no longer plan to be a separate
APK/process for mainline. Will instead become a jar loaded from Apex.

Bug: 144722612
Test: Device boots up & connects to wifi networks.
Change-Id: I293e36973c4bdbd8bf9db2fcd78e61e6c38b39f4
2019-11-25 20:59:31 -08:00
TreeHugger Robot
276b49f758 Merge "Create empty PowerWhitelistManager." 2019-11-23 01:33:12 +00:00
TreeHugger Robot
153f66fb91 Merge "Fix "Allow the system AssetManager to be reinitialized for testing"" 2019-11-22 22:39:00 +00:00
Kweku Adams
e371b09fbf Create empty PowerWhitelistManager.
This is the first step in extracting the power whitelist from
DeviceIdleController. The whitelist will stay inside the JobScheduler
mainline module boundary, so all calls will have to be made through a
stable API. Eventually, all users of IDeviceIdleController will be
migrated to this interface.

Bug: 140141678
Bug: 141155196
Bug: 144864180
Test: atest PowerWhitelistTest
Change-Id: I8468e74ac8fe6611bfa957d4f5093c8d15be1299
2019-11-22 11:54:24 -08:00
Terry Wang
2cf38fe7e9 Merge "Add a new system service for app search project" 2019-11-21 22:43:08 +00:00
Terry Wang
ecc0d1b2c1 Add a new system service for app search project
Bug: 142567528
Test: manual
Change-Id: Iefb426383f94ec89c896065c798b22cfb2977bf3
2019-11-21 14:15:22 -08:00
Winson Chiu
1e05667111 Merge "Overlayable actor enforcement" 2019-11-21 21:46:47 +00:00
Winson
d9d1736767 Overlayable actor enforcement
Validates that the caller of an OverlayManager API that mutates state
is actually allowed to act on the target as defined in the target's
overlayable tag.

<overlayable name="MyResources" actor="namespace/name">

An actor is valid if any of the following is true:
 - is root/system
 - is the target overlay package
 - has the CHANGE_OVERLAY_PACKAGES permission and an actor is not defined
 - is the same package name as the sole resolved Activity for the actor specified
     in the overlayable definition, with only pre-installed, namespaced actors
     currently supported

Bug: 119442583
Bug: 135052950

Test: atest SystemConfigNamedActorTest
Test: atest com.android.server.om

Change-Id: If56b9e8366852eaef84f6bb25c3e6871eaa3f219
2019-11-21 12:01:41 -08:00
TreeHugger Robot
2f6c5fe32f Merge changes from topic "broadcast_multiple_perm"
* changes:
  AndroidKeyStoreProvider: Add @throws documentation
  RemoteException: Add @throws documentation
  Context: Rename Context.sendBroadcastMultiplePermissions
2019-11-21 06:28:10 +00:00
TreeHugger Robot
dfe69d9e2d Merge "Move UserTypeDetails & UserTypeFactory to services" 2019-11-21 00:43:29 +00:00
Roshan Pius
a2baf58e26 Context: Rename Context.sendBroadcastMultiplePermissions
Renaming based on API council feedback. Leaving the old API as @hide
since there are other modules in platform using the old API.

Bug: 144793100
Test: Compiles
Change-Id: Id3fd01da3b4163d186cf9651a5b2b82c18859239
2019-11-20 14:47:43 -08:00
Jordan Liu
337e999d5c Merge "Remove unneeded @RequiresPermission annotation" am: 0a1b47573e am: 277ea3584f
am: ec296c8e53

Change-Id: I2e8d0718a56bcc205f3fa93244b0ee9d8b367707
2019-11-20 14:37:17 -08:00
Jordan Liu
ec296c8e53 Merge "Remove unneeded @RequiresPermission annotation" am: 0a1b47573e
am: 277ea3584f

Change-Id: I83c853e4512261f0c94432659a1b7a749d6fd32a
2019-11-20 14:29:40 -08:00
Jordan Liu
277ea3584f Merge "Remove unneeded @RequiresPermission annotation"
am: 0a1b47573e

Change-Id: I47d83e0d224cb9840b326212f84c83a8e16c1a85
2019-11-20 14:22:03 -08:00
Makoto Onuki
2dfdf1a4cf Merge "Add Context.createContextAsUser()" am: 63d5e4a0b9
am: 056b8f00b7

Change-Id: I703b0234c75f91ad548a0c431277d684212e0586
2019-11-20 14:11:19 -08:00
Jordan Liu
0a1b47573e Merge "Remove unneeded @RequiresPermission annotation" 2019-11-20 22:04:20 +00:00
Makoto Onuki
056b8f00b7 Merge "Add Context.createContextAsUser()"
am: 63d5e4a0b9

Change-Id: I022daba2bc9234ffe7b7fa760942a58852e406b3
2019-11-20 14:04:20 -08:00
Treehugger Robot
63d5e4a0b9 Merge "Add Context.createContextAsUser()" 2019-11-20 21:53:01 +00:00
Ryan Mitchell
3286a5f61c Fix "Allow the system AssetManager to be reinitialized for testing"
The logic was incorrect and prevented the test from reinitializing
the system assets.

Bug: 136085555
Test: tradefed.sh
Change-Id: If95417d29a8a1110560b670900a53ff3db2604a2
2019-11-20 11:57:04 -08:00
TreeHugger Robot
aa26bed5c8 Merge "Remove legacy idmap binary" 2019-11-20 16:41:38 +00:00
Makoto Onuki
9432f7d43c Add Context.createContextAsUser()
Without it, apps (mainline modules) will need to use createPackageContext...,
which is a bit painful.

Bug: 142472686
Test: atest android.content.cts.ContextTest#testCreateContextAsUser
Change-Id: Id640e03862462724df1a4a3101f0b08faafba22f
(cherry picked from commit b844001d6a)
Merged-in: Id640e03862462724df1a4a3101f0b08faafba22f
2019-11-19 20:51:04 -08:00
Ryan Mitchell
a12b9e0c3f Merge "Allow the system AssetManager to be reinitialized for testing" 2019-11-20 04:01:11 +00:00
TreeHugger Robot
5c407dc002 Merge "Remove @SystemApi annotation for an overriding method" 2019-11-20 00:22:32 +00:00
Patrick Baumann
ff21f7b085 Merge "DO NOT MERGE Avoids deadlock when applying preferred activities" am: 35dd014a79
am: 92269e5ef8

Change-Id: I6d95f0bbdaa146c4d96f8b8c5f715ef2053074be
2019-11-19 16:20:20 -08:00
Patrick Baumann
92269e5ef8 Merge "DO NOT MERGE Avoids deadlock when applying preferred activities"
am: 35dd014a79

Change-Id: I9b4646c9c0674380e37eea44a226b1b279b53f6b
2019-11-19 16:05:31 -08:00
Hall Liu
ae63546d19 Merge commit '1d7a53da981b7d4281c58af7eb9b150163b344a6' into manual_merge_1d7a53da981b7d4281c58af7eb9b150163b344a6
am: dab3711435

Change-Id: Ib75482a87545f7743f0049c8e51c354d2294c2af
2019-11-19 15:12:28 -08:00
Ryan Mitchell
260d13b27d Allow the system AssetManager to be reinitialized for testing
ResourcesPerfWorkloads replays record resources calls for 1P and 3P
apps. The recordings use private resource ids. Since private
resources ids can change between builds, the replay must have the
ability to use a stable version of framework resources with the
correct resource ids.

Bug: 136085555
Test: atest ResourcesPerfWorkloads
Change-Id: I46297e355ed6347ce8063e7f1c26708f28faacc8
2019-11-19 14:05:16 -08:00
Patrick Baumann
3fa8853331 DO NOT MERGE Avoids deadlock when applying preferred activities
Prior to this change, we were resolving the mime type of a given intent
while holding the package lock. With this change, we instead rely on the
preferred-activity declaration to define the mime type if it's
important, removing need for an activity manager service call and the
potential for deadlock.

Fixes: 143105100
Test: Manual; sideload to /system/etc/preferred-apps/ and reset app preferences
Change-Id: Ia87b7ecbd7987ef654fb0fc2bda942cd6a9c00a7
2019-11-19 21:43:48 +00:00
Hall Liu
dab3711435 Merge commit '1d7a53da981b7d4281c58af7eb9b150163b344a6' into manual_merge_1d7a53da981b7d4281c58af7eb9b150163b344a6
Change-Id: Ie08d8bb30e48a9e7ade85334c6195a791ecc0d9b
2019-11-19 12:37:24 -08:00