Commit Graph

8110 Commits

Author SHA1 Message Date
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
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
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
7fcf86ed49 Merge "Use language tags to store Configuration's locale list." into qt-dev am: 6dfa267f91 am: 6947f255e4
am: 667db1bea5

Change-Id: I0700617e4f639f3e03a793419b9e16590c328ad6
2019-09-10 23:42:08 -07:00
Varun Shah
667db1bea5 Merge "Use language tags to store Configuration's locale list." into qt-dev am: 6dfa267f91
am: 6947f255e4

Change-Id: Ic1954896252b758e8360c7fdf7cdeddb184bab03
2019-09-10 23:36:07 -07:00
Varun Shah
019d50c70b Merge "Use language tags to store Configuration's locale list." into qt-dev am: 6dfa267f91
am: 6947f255e4

Change-Id: Iaf75fc18cc7f49249bf03bb0836438a42c9c5241
2019-09-10 23:36:05 -07:00
Varun Shah
5e67462971 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
2019-09-10 19:53:57 +00:00
Colin Cross
ca4f16d099 Merge "Revert "Use language tags to store Configuration's locale list."" into qt-dev am: dd67a548b2 am: 18bf694f3c
am: c09f17d559

Change-Id: I6d503556ea8e7d02a4f2dfa127fe376880e21666
2019-09-10 12:43:01 -07:00
Colin Cross
fb5d404e5b Merge "Revert "Use language tags to store Configuration's locale list."" into qt-dev am: dd67a548b2
am: 18bf694f3c

Change-Id: I18e699541953e0cae3012e1c673e4f7b67c66370
2019-09-10 12:36:03 -07:00
Colin Cross
c09f17d559 Merge "Revert "Use language tags to store Configuration's locale list."" into qt-dev am: dd67a548b2
am: 18bf694f3c

Change-Id: I9481fb2063b8a38a86dd52867c4c9ad52e9b8c7a
2019-09-10 12:36:03 -07:00
Colin Cross
dd67a548b2 Merge "Revert "Use language tags to store Configuration's locale list."" into qt-dev 2019-09-10 19:18:48 +00:00
Varun Shah
68cdb74d91 Revert "Use language tags to store Configuration's locale list."
This reverts commit ff43f4e6a6.

Reason for revert: b/140813780

Change-Id: Id5988b9ec959ca9b294f6bd5caa30c8156238d0a
2019-09-10 18:30:47 +00:00
Varun Shah
fe560ba5f2 Merge "Use language tags to store Configuration's locale list." into qt-dev am: bdfd7d6adb am: ec466c0a8e
am: 6540f10816

Change-Id: Icccf3e70bf24f629230ce5d5127cfff2cdbe22e4
2019-09-10 10:27:58 -07:00
Varun Shah
6540f10816 Merge "Use language tags to store Configuration's locale list." into qt-dev am: bdfd7d6adb
am: ec466c0a8e

Change-Id: If5fbf5869ebed425d2df0d5472d7bbe859fb6505
2019-09-10 10:17:23 -07:00
Varun Shah
18ed0b77a7 Merge "Use language tags to store Configuration's locale list." into qt-dev am: bdfd7d6adb
am: ec466c0a8e

Change-Id: I6d36106dc65f9e293e127c05c056fdf051583de2
2019-09-10 10:17:23 -07:00
Varun Shah
f554cddbb9 Fix bootloop issue with UsageStatsService. am: 669d886cdc
am: ee3d800165

Change-Id: I6e971a6b3403065eb8453b5b46fa4dcc1cd54f4d
2019-09-10 10:17:19 -07:00
Varun Shah
bdfd7d6adb Merge "Use language tags to store Configuration's locale list." into qt-dev 2019-09-10 16:51:37 +00:00
Anthony Hugh
d4d88f2486 Merge "Refactor PermissionManager.SPLIT_PERMISSIONS" into qt-qpr1-dev
am: fcb2ce1503

Change-Id: I830c2580f3d141a3641e023c189c148a0a1737d0
2019-09-09 19:24:39 -07:00
Anthony Hugh
6f5eadc0d3 Refactor PermissionManager.SPLIT_PERMISSIONS
Creating a SystemConfig from a non-system process is taking 500+ ms.
This CL instead exposes the needed split permissions from system_server
to optimize performance.

Tested locally and creating PermissionManager / retrieving SystemConfig
is now less than 1 ms.

Bug: 139828734
Bug: 139485700
Fixes: 139828734
Test: Added systrace / logs to PermissionController app and traced
runtime of onGrantDefaultRoles().

Merged-In: I111403e8dae3bc2b0acafc32e61aa5cd890fea29
Change-Id: I111403e8dae3bc2b0acafc32e61aa5cd890fea29
(cherry picked from commit f69c71e25889d8a9d66da05ee0f386d7fb626c6c)
2019-09-09 15:49:04 -07:00
Varun Shah
ff43f4e6a6 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
Change-Id: Id0e63ae4a7be578d1e93838b371320f86a787e0e
2019-09-09 22:41:54 +00:00
Varun Shah
669d886cdc 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)
2019-09-09 22:41:22 +00:00
Varun Shah
a5c53a01ae Merge "Fix bootloop issue with UsageStatsService." into qt-qpr1-dev
am: eff156093c

Change-Id: Iece7adc8dd9a3cb5c704e917b22337cf8339f460
2019-09-06 10:59:13 -07:00
Varun Shah
5d9031dbee 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
2019-09-04 19:12:08 +00:00
Kevin Hufnagle
fbfe223a44 docs: Fixed contradictory info in IntentFilter
The docs now (correctly) state that, if an intent filter specifies no
actions, then it only matches intents that don't specify/contain an
action.

Test: make ds-docs -j32

Bug: 140435265
Change-Id: I8931c6540cb22edd15e8caa1be984ca70efcdc96
2019-09-03 21:54:31 +00:00
Aurimas Liutikas
488d37b2d0 Merge "Add missing nullability annotations." into stage-aosp-master am: 85c0a5a2be am: ed5beec21b
am: de0ebb082e

Change-Id: I60c55b6706e8d43121e8b2c7a35efff38668f66b
2019-08-30 08:54:38 -07:00
Aurimas Liutikas
ed5beec21b Merge "Add missing nullability annotations." into stage-aosp-master
am: 85c0a5a2be

Change-Id: Ic9ea2b9840fbb678bbb6ab77038415581feba918
2019-08-30 08:35:52 -07:00
Aurimas Liutikas
00be951a08 Add missing nullability annotations.
To prepare for enabling MissingNullability Metalava check this CL
works on adding missing nullability issues that metalava flags if
we tell it to flag new things since API 29.

This is not a complete CL, mostly addresses public api and
toString/equals for @SystemApi

Exempt-From-Owner-Approval: Large scale nullability clean up
Bug: 124515653
Test: make -j checkapi
Merged-In: I109260842cfc25f06e40694997fcbb4afa02c867
Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
2019-08-30 00:14:44 +00:00
Kevin Hufnagle
eba15ec2b4 Merge "docs: Added desc. of launcher app criteria in Q" into qt-dev am: b14d2dede2 am: 13e2b970ec
am: 5e1a48a660

Change-Id: Ic65f9e1e2a51d91a08b482b3ee2e66f9f0ef29ea
2019-08-28 17:56:05 -07:00
Kevin Hufnagle
5e1a48a660 Merge "docs: Added desc. of launcher app criteria in Q" into qt-dev am: b14d2dede2
am: 13e2b970ec

Change-Id: I393ec53ecf097e5ebe4ce2878e149fbf653df622
2019-08-28 17:39:34 -07:00
Kevin Hufnagle
123f51ff28 Merge "docs: Added desc. of launcher app criteria in Q" into qt-dev
am: b14d2dede2

Change-Id: Ibd55727fe3387ef7b6c6cde2e1c5ba7c2f42f34b
2019-08-28 17:21:39 -07:00
Kevin Hufnagle
b14d2dede2 Merge "docs: Added desc. of launcher app criteria in Q" into qt-dev 2019-08-28 22:08:47 +00:00
Andrew Solovay
9f226a0085 Merge "Docs: clarify getSharedPreferences behavior" into qt-dev am: 3791f9b071 am: 73a66dc100
am: c149d6ff19

Change-Id: Ieae488ea773c6f21b4f3517a682be60c99eaa628
2019-08-28 14:13:35 -07:00
Andrew Solovay
c149d6ff19 Merge "Docs: clarify getSharedPreferences behavior" into qt-dev am: 3791f9b071
am: 73a66dc100

Change-Id: Ia14424c38de4a55096bad5e1e91d29681b26f4f5
2019-08-28 13:52:14 -07:00