Commit Graph

8530 Commits

Author SHA1 Message Date
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
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
Jordan Liu
31a4da61b5 Remove unneeded @RequiresPermission annotation
Fixes: 144360225
Test: no change to behavior
Change-Id: I7b3ab01c4d232013dcc19de32cc8e2cee9b8cb5a
2019-11-19 11:47:53 -08:00
Artur Satayev
785d3a03b9 Merge "Add @UnsupportedAppUsage annotations for greylist." 2019-11-19 15:05:51 +00:00
Artur Satayev
751e55114c Add @UnsupportedAppUsage annotations for greylist.
go/cleanup-greylist-txt

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

This is partial merge of aosp/Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09. Telephony greylist cleanup has been done separately. Note that annotations outside of frameworks/base/ have been merged from AOSP.

Bug: 137350495
Test: m
Exempt-From-Owner-Approval: merge
Change-Id: I015c466e8b69cc0fed5e9d394ba865aad11d8ba6
2019-11-19 15:05:35 +00:00
Jiyong Park
1620457e34 Remove @SystemApi annotation for an overriding method
Context.registerReceiverForAllUsers are already marked as @SystemApi.
The same method in ContextWrapper overriding it doesn't need to be
annotated as such. In fact, that API is even not recorded in
system-current.txt.

Bug: 144424011
Test: atest CtsSystemApiAnnotationTestCases
Change-Id: I60890104bf20a2c674edd91ec6b487cca1b4e37b
2019-11-19 22:48:36 +09:00
Mohammad Samiul Islam
7da3588356 Merge "Allow staging multiple session with non-overlapping packages (apk-only)" 2019-11-19 12:03:51 +00:00
Ilya Matyukhin
d6b829939a Merge "Implemented and integrated AuthService" 2019-11-19 02:03:13 +00:00
TreeHugger Robot
ce934c7d78 Merge "Removed UserInfo.FLAG_MASK_USER_TYPE, it's not used anywhere anymore" 2019-11-18 23:24:54 +00:00
Bookatz
dffffc08ae Move UserTypeDetails & UserTypeFactory to services
These two classes should be in service side, i.e.
frameworks/base/service.

Test: atest com.android.server.pm.UserTests
Bug: 142151520
Change-Id: Idcd62ce4469bb194a16fc9ba932178fdd6fe50e5
2019-11-18 14:50:49 -08:00
Hall Liu
1d7a53da98 Merge changes from topic "mainline4"
* changes:
  Add new API for Telecom to send phone state
  Minor style correction to avoid merge conflict
  non-mainline telephony related AIDL refactor/decoupling
2019-11-18 22:31:27 +00:00
Ilya Matyukhin
e4675b3067 Implemented and integrated AuthService
AuthService in its current form is a thin wrapper around
BiometricService. It initializes BiometricService in onStart();
registers fingerprint, face, and iris authenticators; and forwards all
of the incoming calls to the corresponding methonds in BiometricService.

The next step will be to move non-biometric related functionality from
BiometricService to AuthService, and turn BiometricService into a module
with a stable API.

Bug: 141025588
Test: atest AuthServiceTest
Test: atest BiometricServiceTest
Test: BiometricPrompt works in BiometricPromptDemo
Change-Id: Ia861b7c2d80bfca386c3e0b44ec35b4aca3b0ffc
2019-11-18 22:10:50 +00:00