Commit Graph

8140 Commits

Author SHA1 Message Date
Jordan Liu
2493a630a6 Merge "Expose Context.sendOrderedBroadcast with appop" am: 08a94a2236
am: 43b6116549

Change-Id: I556cbff8a4aa8ca1f507cd1f63c435506b09cf0f
2019-11-04 13:31:04 -08:00
Jordan Liu
43b6116549 Merge "Expose Context.sendOrderedBroadcast with appop"
am: 08a94a2236

Change-Id: I8dd6fe3a9a70eba9d95cfd1e4cefd14c4ba376ed
2019-11-04 12:20:47 -08:00
Jordan Liu
08a94a2236 Merge "Expose Context.sendOrderedBroadcast with appop" 2019-11-04 19:59:28 +00:00
Chen Xu
626f4cdb81 Merge "new TelephonyRegistryManager" am: 7a79194fcb
am: 44d0c2a7dc

Change-Id: I2a8f753c2c9fbceb4a3cde9b31fdb3d7d82ea028
2019-11-04 10:46:46 -08:00
Chen Xu
44d0c2a7dc Merge "new TelephonyRegistryManager"
am: 7a79194fcb

Change-Id: I89e60de64c4c3b8b760413c136241b6c9c0fc98f
2019-11-04 10:35:20 -08:00
Chen Xu
7a79194fcb Merge "new TelephonyRegistryManager" 2019-11-04 18:21:51 +00:00
Jordan Liu
a32e6fcb03 Expose Context.sendOrderedBroadcast with appop
Bug: 143100231
Test: atest ContextTest#testSendOrderedBroadcastWithAppOp
      atest ContextTest#testSendOrderedBroadcastWithAppOp_NotGranted

Change-Id: Ia75d0db11f337769eaf3cf5436e09a7d38b0564c
Merged-In: Ia75d0db11f337769eaf3cf5436e09a7d38b0564c
2019-11-01 16:25:15 -07:00
Chen Xu
1f1c25e815 new TelephonyRegistryManager
today telephonyRegistry lives in system process
this is intended to persists all telephony listeners when
phone process crash. Telephony today notify system server by
using AIDL APIs directly. Instead, we are exposing a proper API
surface: telephonyRegistryManager where only phone app and
carrier privileged apps are allowed to use APIs in
TelephonyRegistryManger to notify telephony related status update.

Bug: 140908357
Test: Build & Manaul
Change-Id: I1b750751148925b4a7bd94553318907654012fc1
(cherry picked from commit 288b71c8c1)
Merged-in: I1b750751148925b4a7bd94553318907654012fc1
2019-11-01 22:44:36 +00:00
Xin Li
6f48900f50 DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master
Bug: 142003500
Change-Id: If5056a73ede668b0048ca107b686413695e5b3b6
2019-10-30 14:33:01 -07:00
Varun Shah
b53b34487b Use language tags to store Configuration's locale list.
Instead of storing each Locale within a Configuration object's locale
list by its language, country, variant, and script to proto, store the
entire locale list by its language tags representation which accurately
describes each locale.

Bug: 140197723
Test: atest ConfigurationTest
Test: atest UsageStatsDatabaseTest
Test: manually with bad data
Merged-In: I53946ed4e31de0ffe9c84875c391a7dec6f5375a
Change-Id: Idaae690f79a5c680ad0059a52be62160d9dfb5e7
(cherry picked from commit 5e67462971)
2019-10-22 22:52:49 +00:00
Anna Trostanetski
fc827db988 Merge "Add a native aidl API." am: 577e3114da am: 4cfb3545d6
am: b17294db1c

Change-Id: I1628aaba2bb1b029fe8b7279bce6faff7503e982
2019-10-22 13:40:13 -07:00
Anna Trostanetski
b17294db1c Merge "Add a native aidl API." am: 577e3114da
am: 4cfb3545d6

Change-Id: I8284ed74352c6212f43a6689f3fb27740d528157
2019-10-22 13:33:13 -07:00
Anna Trostanetski
4cfb3545d6 Merge "Add a native aidl API."
am: 577e3114da

Change-Id: I22c7963991747fe1e27dce432da3fc02c644bbef
2019-10-22 13:20:59 -07:00
atrost
ff948d8a2f Add a native aidl API.
Introduce a platform_compat_native service that just calls the
platform_compat service.
The new service is needed as it needs a slightly different (more
limited, no ApplicationInfo in cpp) aidl API, and a class can only
extend one stub.

Test: Call the service from dumpsys.cpp (http://aosp/1142055)
Bug: 138275545
Change-Id: Ic46cc34b4c1dd4ebc6bcc996fb3f8503607214ac
Merged-In: Ic46cc34b4c1dd4ebc6bcc996fb3f8503607214ac
2019-10-22 18:54:13 +00:00
Kevin Hufnagle
76dd46c992 Merge "docs: App doesn't receive "first launch" broadcast" into qt-dev am: 0823f1b508 am: e7832d514b
am: d6105c8316

Change-Id: Ie4a9c26029d31be6b31a29856423f298274b3dff
2019-10-21 15:57:10 -07:00
Kevin Hufnagle
e0b54ab365 Merge "docs: App doesn't receive "first launch" broadcast" into qt-dev am: 0823f1b508
am: e7832d514b

Change-Id: I6fdee76474fb8df0b67378178294b7bf3276ec90
2019-10-21 15:51:07 -07:00
Kevin Hufnagle
d6105c8316 Merge "docs: App doesn't receive "first launch" broadcast" into qt-dev am: 0823f1b508
am: e7832d514b

Change-Id: Ib2590dc07f3aa284c993bd4c65772277ea457727
2019-10-21 15:51:06 -07:00
Felipe Leme
3cbb257821 Fix UserInfo Parcel
am: 5284336dec

Change-Id: I3af8a8c64137320124df6a1adc698cb0501f68d4
2019-10-18 13:32:17 -07:00
Felipe Leme
6400043a6e Added option to pre-create user templates to optimize first user creation time.
am: 7ad2f6bdad

Change-Id: I8594bfe6912e56b32b7cda0ee1a321f098264d5b
2019-10-18 13:07:52 -07:00
Felipe Leme
5284336dec Fix UserInfo Parcel
ag/9372503 put the order of reading preCreated from a UserInfo parcel
in the wrong spot. We fix it here.

Test: none
Merged-In: I4502e901ff2aac977c584fa8c5a3d1263be33572
Change-Id: I4502e901ff2aac977c584fa8c5a3d1263be33572
(cherry picked from commit e80af14d33)
2019-10-18 13:07:13 -07:00
Felipe Leme
7ad2f6bdad Added option to pre-create user templates to optimize first user creation time.
Initial user creation is slow because the system must prepare per-user data (like storage and
permissions) whose cost is proportional to the number of pre-installed apps. On automovive's
reference implementation, it can take more than 10s, which is a bad user experience.

This change lets OEMs pre-create some users , so that high initial-creation cost is "paid" during
the initial boot. On automotive, it improves the creation of an additional user (or guest user)
in about 7s (from ~17s to 9s).

Bug: 111451156
Bug: 132111956
Bug: 140750212
Bug: 140868593

Test: manual verification
Test: atest FrameworksServicesTests:UserControllerTest#testStartTemplateUser_background

Merged-In: I81de1b5376dc9c42b63be8853d7204c88826401f
Change-Id: I81de1b5376dc9c42b63be8853d7204c88826401f
(cherry picked from commit c1ca4410e1)
2019-10-18 11:05:06 -07:00
Kevin Hufnagle
49d171d595 docs: App doesn't receive "first launch" broadcast
Test: make ds-docs -j32

Bug: 116543817
Change-Id: I9aa1f1851ce236397ad2e1a36ea487b96daa55c5
2019-10-15 19:47:38 +00:00
Treehugger Robot
2f1d3ac4f4 Merge "[DO NOT MERGE] Update PermissionChecker usages to avoid unnecessary attribution." 2019-10-14 21:44:51 +00:00
Svet Ganov
484271bc7e [DO NOT MERGE] Update PermissionChecker usages to avoid unnecessary attribution.
We had accidental usages of the PermissionChecker for cases where no
private data was provided to the app but the checkPermission API on
the latter also did blame data access on the app. The PermissionChecker
was designed to handle IPC calls and not for generic API checks.

To avoid future accidental incorrect PermissionChecker usages this
change renames the existing APIs of the latter to clearly indicate
that they should be used for data delivery and also adds sibling
methods for doing the same permission checks for preflight purposes.
Also the documentation is improved to furhter assist developers.

In addition, this change fixes accidental permission checker usages
that blame when they should not by using the new preflight flavor
of the permission check APIs.

Test:
    atest com.android.settingslib.location.RecentLocationAppsTest
    atest CtsPermissionTestCases
    added: LocationAccessCheckTest#notificationOnlyForAccessesSinceFeatureWasEnabled
    added: LocationAccessCheckTest#noNotificationIfFeatureDisabled
    added: LocationAccessCheckTest#noNotificationIfBlamerNotSystemOrLocationProvider
    added: LocationAccessCheckTest#testOpeningLocationSettingsDoesNotTriggerAccess

Bug:141028068
Change-Id: I89f4add79a55c3c8d6fbe8d57decaa78fe12f0f9
Merged-In: I65c71569d0dd8a40bc6fecabb22c5373dd6e806e
2019-10-14 17:22:30 +00:00
Svet Ganov
534b728a1e [DO NOT MERGE] Update PermissionChecker usages to avoid unnecessary attribution.
We had accidental usages of the PermissionChecker for cases where no
private data was provided to the app but the checkPermission API on
the latter also did blame data access on the app. The PermissionChecker
was designed to handle IPC calls and not for generic API checks.

To avoid future accidental incorrect PermissionChecker usages this
change renames the existing APIs of the latter to clearly indicate
that they should be used for data delivery and also adds sibling
methods for doing the same permission checks for preflight purposes.
Also the documentation is improved to furhter assist developers.

In addition, this change fixes accidental permission checker usages
that blame when they should not by using the new preflight flavor
of the permission check APIs.

Test:
    atest com.android.settingslib.location.RecentLocationAppsTest
    atest CtsPermissionTestCases
    added: LocationAccessCheckTest#notificationOnlyForAccessesSinceFeatureWasEnabled
    added: LocationAccessCheckTest#noNotificationIfFeatureDisabled
    added: LocationAccessCheckTest#noNotificationIfBlamerNotSystemOrLocationProvider
    added: LocationAccessCheckTest#testOpeningLocationSettingsDoesNotTriggerAccess

Bug:141028068
Change-Id: I4a74d4906f92e323fbd30b9b25011129895afc9a
Merged-In: I89f4add79a55c3c8d6fbe8d57decaa78fe12f0f9
Merged-In: I65c71569d0dd8a40bc6fecabb22c5373dd6e806e
2019-10-14 17:15:38 +00:00
Xin Li
8efb8c35f1 DO NOT MERGE - Merge QP1A.191005.007 into master
Bug: 142297020
Merged-In: Ifc7254ab3a5272b056cbc75233aa2dfa8219ea84
Change-Id: Ib4566cec52912a8daa86c317fd99d6d60ef1524f
2019-10-10 00:28:04 +00:00
Alan Stokes
36ac62aaa8 Merge "Revert new app installed notification doc" into qt-dev am: 98540e2a16 am: 24e18b415f
am: 9ed11c9dea

Change-Id: I639bb92f80a8be435014b6d52c6577b337121fca
2019-10-07 08:36:47 -07:00
Alan Stokes
9ed11c9dea Merge "Revert new app installed notification doc" into qt-dev am: 98540e2a16
am: 24e18b415f

Change-Id: I2675329bb8a87beb1e8c221f35e12f0fa675445a
2019-10-07 08:30:38 -07:00
Alan Stokes
1275551f18 Merge "Revert new app installed notification doc" into qt-dev am: 98540e2a16
am: 24e18b415f

Change-Id: I886882a9c90b8e6c4a275647801b9bf4a95f3750
2019-10-07 08:30:37 -07:00
Alan Stokes
98540e2a16 Merge "Revert new app installed notification doc" into qt-dev 2019-10-07 14:41:57 +00:00
Philip P. Moltmann
36329e5725 Merge "Update PermissionChecker usages to avoid unnecessary attribution." into qt-dev am: 0a71df1f7e am: 43f6144e21
am: 7cd4256dde

Change-Id: I2cdc90ac3af6e1a89bd79d13f5baa637864e7ccb
2019-10-04 12:20:06 -07:00
Philip P. Moltmann
7cd4256dde Merge "Update PermissionChecker usages to avoid unnecessary attribution." into qt-dev am: 0a71df1f7e
am: 43f6144e21

Change-Id: Ib8548cbfc7531a5f5e9100ae26cf9b6c8f97760f
2019-10-04 12:05:17 -07:00
Philip P. Moltmann
273a67d261 Merge "Update PermissionChecker usages to avoid unnecessary attribution." into qt-dev am: 0a71df1f7e
am: 43f6144e21

Change-Id: Ie6ef9dd529218711a88f19e921c260e2feb59c28
2019-10-04 11:57:17 -07:00
Ricky Wai
5f5bacfda0 Revert new app installed notification doc
Bug: 111214100
Test: Able to compile
Change-Id: Id4fdabf0e8c69074eb8cb5838ab11d9d5f030093
2019-10-04 16:10:17 +01:00
Svet Ganov
7fe065eb66 Update PermissionChecker usages to avoid unnecessary attribution.
We had accidental usages of the PermissionChecker for cases where no
private data was provided to the app but the checkPermission API on
the latter also did blame data access on the app. The PermissionChecker
was designed to handle IPC calls and not for generic API checks.

To avoid future accidental incorrect PermissionChecker usages this
change renames the existing APIs of the latter to clearly indicate
that they should be used for data delivery and also adds sibling
methods for doing the same permission checks for preflight purposes.
Also the documentation is improved to furhter assist developers.

In addition, this change fixes accidental permission checker usages
that blame when they should not by using the new preflight flavor
of the permission check APIs.

Test:
    atest com.android.settingslib.location.RecentLocationAppsTest
    atest CtsPermissionTestCases
    added: LocationAccessCheckTest#notificationOnlyForAccessesSinceFeatureWasEnabled
    added: LocationAccessCheckTest#noNotificationIfFeatureDisabled
    added: LocationAccessCheckTest#noNotificationIfBlamerNotSystemOrLocationProvider
    added: LocationAccessCheckTest#testOpeningLocationSettingsDoesNotTriggerAccess

bug:141028068
Merged-In: I65c71569d0dd8a40bc6fecabb22c5373dd6e806e
Change-Id: I65c71569d0dd8a40bc6fecabb22c5373dd6e806e
2019-10-03 21:58:13 +00:00
Jeongik Cha
cac5791954 Merge changes from topic "system_ext" am: a828ee6442 am: dee02a0fae
am: 6a46c5315a

Change-Id: Ic31f9d12fffda486d36ce427848e04c7755cc531
2019-09-26 16:00:00 -07:00
Jeongik Cha
6a46c5315a Merge changes from topic "system_ext" am: a828ee6442
am: dee02a0fae

Change-Id: If2cc7cfe20182578b4e3c515f42209d9446f6a68
2019-09-26 15:53:32 -07:00
Jeongik Cha
f6629839d1 Support /system_ext partition
This commit is mainly from I7a6a30bf8e8db9f2738594d187bb9148f138b8da, so
test cases and features are mostly same.

We change product_services partition name to "system_ext" because this
partition's purpose changes.

 - installing a RRO package for framework from /system_ext/overlay
 - installing apps from /system_ext/app
 - installing priv-apps from /system_ext/priv-app
 - installing permissions from
   /system_ext/etc/[default-permissions|permissions|sysconfig]

Bug: 134359158
Test: `mma` under frameworks/base/tests/[libs|privapp]-permissions
      adb sync && adb reboot
      adb shell cmd package list libraries
        => confirmed com.android.test.libs.system_ext library
      adb shell cmd package dump \
        com.android.framework.permission.privapp.tests.system_ext
        => confirmed that the package is a priv-app

Change-Id: Ibbccbba64156a7bc464ffb3785fb8fe69ebb973c
Merged-In: Ibbccbba64156a7bc464ffb3785fb8fe69ebb973c
(cherry picked from commit 9ec059ac1d)
2019-09-23 22:00:50 +00:00
wangmingming1
4a4ceeeb79 notify netd about uid internet permission changes when package replaced
1. If a previous version of an app doesn't declare internet permission;
2. The User upgraded it to a new version and the new one does declare the
internet permission;
3. The new app are not allowed to access the internet until next boot

Bug: 137864893
Test: Manual, just make sure the onPackageChanged would be executed on package changes
Change-Id: I69cdbb16a027a9c4e974b32371b1f64a23a51a23
Signed-off-by: wangmingming1 <wangmingming1@xiaomi.com>
2019-09-20 03:23:23 +00:00
Kevin Hufnagle
84b5194c1c Merge "docs: Add condition for hiding synth. activities" into qt-dev am: 00537efd07 am: 12298403b0
am: c67e4da871

Change-Id: I7d478b8c7a1071961d8e2b365e9bd2c25c62e450
2019-09-18 17:45:34 -07:00
Kevin Hufnagle
c67e4da871 Merge "docs: Add condition for hiding synth. activities" into qt-dev am: 00537efd07
am: 12298403b0

Change-Id: I7a71cdb8fd5ecfd008d0e8257185cdd8c5366ce0
2019-09-18 17:39:27 -07:00
Kevin Hufnagle
2bac1d7287 Merge "docs: Add condition for hiding synth. activities" into qt-dev am: 00537efd07
am: 12298403b0

Change-Id: Ibb907639ad9b4ded2682bd354cf6d8789e49f7ee
2019-09-18 17:39:25 -07:00
Kevin Hufnagle
00537efd07 Merge "docs: Add condition for hiding synth. activities" into qt-dev 2019-09-19 00:20:47 +00:00
Kevin Hufnagle
4d53ea94c7 Merge "docs: Fixed contradictory info in IntentFilter" into qt-dev am: 1fe99017eb am: 1e8492c744
am: 85bd2c62cb

Change-Id: Ic7beb1eabce4ce8b241a11163b637000c4df4270
2019-09-17 12:37:20 -07:00
Kevin Hufnagle
85bd2c62cb Merge "docs: Fixed contradictory info in IntentFilter" into qt-dev am: 1fe99017eb
am: 1e8492c744

Change-Id: Idbc73307a0c3f4a937a2a964667f01b28aa274ce
2019-09-17 12:32:20 -07:00
Kevin Hufnagle
b8f9986a1c Merge "docs: Fixed contradictory info in IntentFilter" into qt-dev am: 1fe99017eb
am: 1e8492c744

Change-Id: I666adc700cc68ccb9982713cafd97d8792579bd9
2019-09-17 12:32:09 -07:00
Kevin Hufnagle
1fe99017eb Merge "docs: Fixed contradictory info in IntentFilter" into qt-dev 2019-09-17 18:54:20 +00:00
Kevin Hufnagle
b8779b82bb docs: Add condition for hiding synth. activities
If an app doesn't have a launcher activity enabled by default, a
synthesized activity isn't created for that app.

Test: make ds-docs -j32

Bug: 140968734
Change-Id: I2fe8666ee8cde479f404e43c622f03891d96c38f
2019-09-17 18:48:39 +00:00
Varun Shah
57213b0ce5 Use language tags to store Configuration's locale list.
Instead of storing each Locale within a Configuration object's locale
list by its language, country, variant, and script to proto, store the
entire locale list by its language tags representation which accurately
describes each locale.

Bug: 140197723
Test: atest ConfigurationTest
Test: atest UsageStatsDatabaseTest
Test: manually with bad data
Merged-In: I53946ed4e31de0ffe9c84875c391a7dec6f5375a
Change-Id: Idaae690f79a5c680ad0059a52be62160d9dfb5e7
(cherry picked from commit 5e67462971)
2019-09-16 20:56:34 +00:00
Varun Shah
f1c7097834 Fix bootloop issue with UsageStatsService.
When the configurations are being read from the proto file, if a
duplicate locale is found in the list, an exception is thrown from
LocaleList which causes the UsageStatsService to crash. Instead, we'll
now log a WTF if duplicate locales are found when parsing the
configuration proto and not add the duplicate locale to the list.

Bug: 140197723
Test: atest UsageStatsDatabaseTest
Change-Id: Ie178b3cfdd45e6771a7c0e4bb42e47f79b5c30cc
(cherry picked from commit 5d9031dbee)
(cherry picked from commit 669d886cdc)
2019-09-16 20:56:27 +00:00