Svetoslav Ganov
757486cde6
Merge "Switch media fw permissions checks to AttributionSource"
2021-06-01 21:31:30 +00:00
Svet Ganov
b033da4e3a
Switch media fw permissions checks to AttributionSource
...
Attribution source is the abstraction to capture the data
flows for private data across apps. Checking permissions
for an attribution source does this for all apps in the
chain that would receive the data as well as the relevant
app ops are checked/noted/started as needed.
Teach speech recognition service about attribution
chains. If an implementation does nothing the OS
would enforce permisisons and do blame as always.
This apporach leads to double blaming and doesn't
support attribition chains where app calls into
the default recognizer which calls into the on
device recognizer (this nests recursively). If the
implementer takes advantage of the attribution chain
mechanims the permissions for the entire chain are
checked at mic access time and all apps are blamed
only once.
Fixed a few bugs around finishing ops for attribution
chains. Also ensured that any app death in a started
attribution chain would lead to finishing the op for
this app
bug: 158792096
Test: ((added tests for speech reco))
atest CtsMediaTestCases
atest CtsPermissionTestCases
atest CtsPermission2TestCases
atest CtsPermission3TestCases
atest CtsPermission4TestCases
atest CtsPermission5TestCases
atest CtsAppOpsTestCases
atest CtsAppOps2TestCases
Change-Id: Ic92c7adc14bd2d135ac13b96f17a1b393dd562e4
2021-06-01 15:12:57 +00:00
Ryan Mitchell
e72a6bcfc3
Merge changes from topic "inc-dis" into sc-dev am: 488522c9c5 am: a1cb15f54e am: 1e7576afd4
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14505818
Change-Id: Ie2f775bf589806c4d4982f78d3acd2291cf6472b
2021-05-28 03:19:30 +00:00
Ryan Mitchell
a1cb15f54e
Merge changes from topic "inc-dis" into sc-dev am: 488522c9c5
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14505818
Change-Id: I5ae5007659172d8a247b8613646d72a68a7dd06a
2021-05-28 02:49:33 +00:00
Ryan Mitchell
488522c9c5
Merge changes from topic "inc-dis" into sc-dev
...
* changes:
Disable incremental hardening on own resources
StringBlock incremental hardening default values
2021-05-27 21:31:04 +00:00
Ryan Mitchell
c0416698db
Disable incremental hardening on own resources
...
When an application is incrementally installed, and a resources
operation fails due to the resources not being fully present,
the app should crash instead of swallowing the error and
returning default values to not alter the experience of
using the application.
Disable IncFsFileMap protections on ApkAssets that are a part of the
application that is running (base and splits).
Bug: 187220960
Test: atest ResourcesHardeningTest
Change-Id: Ibc67aca688720f983c7c656f404593285a54999b
2021-05-27 09:50:36 -07:00
Ryan Mitchell
bef47a3577
StringBlock incremental hardening default values
...
When a string cannot be retrieved from a StringBlock due to pages of
the StringPool missing, rather than throwing an
IndexOutOfBoundsException, compute a default value rather that
abides by the API contacts of the functions that use the StringBlock.
IndexOutOfBoundsExceptions are not really documented as a possible
exception that can be thrown from APIs that use StringBlock because
it indicates that the binary resource table was built incorrectly.
Returning default values is much less likely to break applications
that fetch the resources of incrementally installed applications than
throwing IndexOutOfBoundsExceptions where they would normally not be
expected.
Bug: 188174746
Test: atest ResourcesHardeningTest
Change-Id: I58fe754fb446fefc031ddba19e290830fdd6d015
2021-05-26 16:01:38 -07:00
Hai Zhang
61ece97e71
Merge "Update permission group mapping API doc according to API review." into sc-dev am: bf8849c1ef am: 8e14d06296 am: 467c45061c
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14737737
Change-Id: I01374b467200a92ab18dd43d24c3f673ed3b7678
2021-05-26 23:01:05 +00:00
Hai Zhang
8e14d06296
Merge "Update permission group mapping API doc according to API review." into sc-dev am: bf8849c1ef
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14737737
Change-Id: If9282d57b80e770d0a6322b42f2fbd7170c0f451
2021-05-26 22:20:56 +00:00
Hai Zhang
bf8849c1ef
Merge "Update permission group mapping API doc according to API review." into sc-dev
2021-05-26 22:10:04 +00:00
Makoto Onuki
75135a7d38
Merge "Remove BIND_ALLOW_BACKGROUND_ACTIVITY_STARTS" into sc-dev am: d55565dcb8 am: 4f26b43620 am: a559eaf3cd
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14721953
Change-Id: Ia19d099400535bdd875d3dd5b2ea98d0ef423bb3
2021-05-26 20:52:48 +00:00
Makoto Onuki
4f26b43620
Merge "Remove BIND_ALLOW_BACKGROUND_ACTIVITY_STARTS" into sc-dev am: d55565dcb8
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14721953
Change-Id: I82a29fe136e81a885deee6224184880e1731ab85
2021-05-26 20:45:49 +00:00
Hai Zhang
0f64fa7228
Update permission group mapping API doc according to API review.
...
Fixes: 189189426
Test: presubmit
Change-Id: I8bd910d035d1cd5d772c6535887a09432ece12f9
2021-05-26 19:38:18 +00:00
TreeHugger Robot
b3bf17d44e
Merge "Update javadoc for ACTION_VIEW_PERMISSION_USAGE" into sc-dev am: 09a4771708
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14704249
Change-Id: Idc6613e0d5d5ce859e09b123df81534855fe75b7
2021-05-26 10:49:31 +00:00
Erik Wolsheimer
2eb1e5786c
Merge "Describe time base/units on ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD" into sc-dev am: af00dc9264
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14707023
Change-Id: Ifa457adc6e4af3b320755669d084dcd6a4614d85
2021-05-26 10:47:01 +00:00
Makoto Onuki
91a1e64991
Remove BIND_ALLOW_BACKGROUND_ACTIVITY_STARTS
...
We ended up defaulting to this behavior, so we no longer need this flag.
Bug: 189235490
Bug: 188057823
Test: Build
Change-Id: I62e383978d9b168657f2eac2e6bf4337a91b909b
2021-05-25 12:51:04 -07:00
TreeHugger Robot
59dafc82e4
Merge "Update javadoc for ACTION_VIEW_PERMISSION_USAGE" into sc-dev am: 09a4771708 am: e73847fd8b am: 9b46c840cc
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14704249
Change-Id: I4c64e76218b5ec9e96dfc8a681ccd1e21fb3a1c3
2021-05-25 04:38:51 +00:00
TreeHugger Robot
9b46c840cc
Merge "Update javadoc for ACTION_VIEW_PERMISSION_USAGE" into sc-dev am: 09a4771708 am: e73847fd8b
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14704249
Change-Id: Ia446659d3a57b95c1f24606f943d883a80c6cf9b
2021-05-25 04:23:24 +00:00
TreeHugger Robot
09a4771708
Merge "Update javadoc for ACTION_VIEW_PERMISSION_USAGE" into sc-dev
2021-05-25 03:17:56 +00:00
Erik Wolsheimer
d20d24dc41
Merge "Describe time base/units on ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD" into sc-dev am: af00dc9264 am: 1c0a2f03e7 am: 2c07336634
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14707023
Change-Id: I60eef0e30da65ec4d738ac95c9e44cead592361d
2021-05-25 01:05:47 +00:00
Erik Wolsheimer
2c07336634
Merge "Describe time base/units on ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD" into sc-dev am: af00dc9264 am: 1c0a2f03e7
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14707023
Change-Id: Ibe7588e9cd24bf6a437a33bf1fc57f5b9b1ff8cf
2021-05-25 01:04:50 +00:00
Guojing Yuan
5a67ef6b76
Update javadoc for ACTION_VIEW_PERMISSION_USAGE
...
Bug: 176902658
Test: N/A
Change-Id: Ic4928fed75ad986c13af704d13985602ba972553
2021-05-25 00:27:01 +00:00
Erik Wolsheimer
350fa3e8b0
Describe time base/units on ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD
...
Bug: 188084977
Test: NA
Change-Id: I25aa1d6419cdec8f0a9508948451be9edbffa964
2021-05-24 17:20:06 -07:00
Tom Natan
80a9c04eb8
Merge "Add support for switching off sandboxing via device config flags" into sc-dev am: c4cf09baa4 am: 2208840f7f am: 0d99d7b2b9
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14530955
Change-Id: I4055d9e759b5638d0b8af78b668522fa355d1d03
2021-05-24 15:56:48 +00:00
Tom Natan
2208840f7f
Merge "Add support for switching off sandboxing via device config flags" into sc-dev am: c4cf09baa4
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14530955
Change-Id: I2901277481ecd8c8bac05d19e2cfb912203dd573
2021-05-24 15:39:00 +00:00
Tom Natan
c4cf09baa4
Merge "Add support for switching off sandboxing via device config flags" into sc-dev
2021-05-24 15:23:35 +00:00
Abhilasha Chahal
01fc166caa
Merge "Fix typo in PermissionChecker.java"
2021-05-24 10:59:56 +00:00
Calin Juravle
dd8b94557d
Merge "Update the use of registerAppInfo" into sc-dev
2021-05-21 20:29:17 +00:00
Hai Zhang
57943e92c2
Merge "Expose platform permission group mapping as public API." into sc-dev am: 5044308999 am: f0b67496fe am: 40339140a5
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14670362
Change-Id: I22ccff3e00f0b359e4519383fa859b34c99de6a0
2021-05-21 19:14:29 +00:00
Hai Zhang
40339140a5
Merge "Expose platform permission group mapping as public API." into sc-dev am: 5044308999 am: f0b67496fe
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14670362
Change-Id: I2db5a11602fde1ebef5c15357eeafbd440750fbf
2021-05-21 18:29:58 +00:00
Hai Zhang
05dcabcf1e
Merge "Expose platform permission group mapping as public API." into sc-dev am: 5044308999
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14670362
Change-Id: I1e39e8747e25b1337ff074606ec4063a83d9b3d8
2021-05-21 17:49:02 +00:00
Hai Zhang
5044308999
Merge "Expose platform permission group mapping as public API." into sc-dev
2021-05-21 17:26:10 +00:00
Calin Juravle
2d2bd54bd5
Update the use of registerAppInfo
...
Pass additional parameters to ART to assist with better profiling
and debuggability.
(cherry picked from commit 3e308c6270 )
Test: m
Bug: 182793486
Bug: 185979271
Merged-In: Iae0beab92194d75f191147578922c760f04470b9
Change-Id: Iae0beab92194d75f191147578922c760f04470b9
2021-05-21 14:13:03 +00:00
Abhilasha Chahal
1d4320ac10
Fix typo in PermissionChecker.java
...
Bug: 188525157
Test: atest android.content.PermissionCheckerTest
Change-Id: Id3f89189e3b81394db9eddf675726c4aca8c2a9d
2021-05-21 12:47:02 +00:00
Hai Zhang
8bda34c493
Expose platform permission group mapping as public API.
...
The API is moved from PermissionControllerManager (only a System API)
to PackageManager to expose it as public API.
Bug: 182094776
Test: atest GetPermissionGroupInfoTest
Change-Id: I175afb2e37bf2651b91765029645f7940f58f39c
2021-05-21 03:03:56 +00:00
Rhed Jao
9467cdf0e8
Merge "Throttle the repeated silent installation requests" into sc-dev am: 6dc12d80fa am: f9bfdcce34
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14462765
Change-Id: Ieee4f5ab09e5ab709c9825033b2989925007db6b
2021-05-21 02:23:37 +00:00
Rhed Jao
2e23ab82df
Merge "Throttle the repeated silent installation requests" into sc-dev am: 6dc12d80fa
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14462765
Change-Id: Ic3c60746935791f60890efc7b6e8d7063f75ecb8
2021-05-21 02:01:56 +00:00
Rhed Jao
6dc12d80fa
Merge "Throttle the repeated silent installation requests" into sc-dev
2021-05-21 01:35:58 +00:00
Erik Wolsheimer
11d471fe33
Merge "Add application-level 'attributionsAreUserVisible' attribute" into sc-dev am: dba8fda0b3 am: e726e33c83 am: 6c705310a9
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14591918
Change-Id: I56ed0f338b4ed074be961ac768f785ee3c51c241
2021-05-21 01:08:25 +00:00
Erik Wolsheimer
6c705310a9
Merge "Add application-level 'attributionsAreUserVisible' attribute" into sc-dev am: dba8fda0b3 am: e726e33c83
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14591918
Change-Id: If70b2cd801500659dae2d01e57e474b1fd5cf8cc
2021-05-21 00:50:07 +00:00
Erik Wolsheimer
518415e420
Merge "Add application-level 'attributionsAreUserVisible' attribute" into sc-dev am: dba8fda0b3
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14591918
Change-Id: I99115747bf1da92212d83494d85e25dc5531029e
2021-05-21 00:34:17 +00:00
Calin Juravle
496339ff01
Merge "Update the use of registerAppInfo" am: 95590e1a62 am: d922359e81 am: e409733954 am: 715a6c3c09
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1704169
Change-Id: Iefa37c3a9427b739f2e0718debe61b3799d2a8fd
2021-05-20 22:57:25 +00:00
Calin Juravle
e409733954
Merge "Update the use of registerAppInfo" am: 95590e1a62 am: d922359e81
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1704169
Change-Id: Iaf5781b354a3d3e93309f920341f7b7576fa1f44
2021-05-20 22:18:37 +00:00
Calin Juravle
95590e1a62
Merge "Update the use of registerAppInfo"
2021-05-20 21:46:00 +00:00
Erik Wolsheimer
afbc4fee9d
Add application-level 'attributionsAreUserVisible' attribute
...
Bug: 176902658
Test: Manual
Change-Id: I56dc9caa6d98b75bc6732bbca0e5adc67bb745e5
2021-05-20 21:07:14 +00:00
Winson Chiu
17eb3ba04e
Merge "Reset target sdk version of ParseTypeImpl" into sc-dev
2021-05-20 17:53:20 +00:00
liulvping
177a7200ab
Reset target sdk version of ParseTypeImpl
...
In device booting, PackageParser2 uses a thread
local ParseTypeImpl obj as shared result and reset
it before parsing everty time. But it doesn't reset
the target sdk version, which could make deferError
returned unexpected error, cause apk scaned failed
and deleted by the system.
Bug: 188523844
Test: atest com.android.server.pm.parsing
Signed-off-by: liulvping <liulvping@xiaomi.com >
Merged-In: Ie6fbc4b79e94943c9282206b1ef6d20b4129fa0b
Change-Id: Ie6fbc4b79e94943c9282206b1ef6d20b4129fa0b
2021-05-20 15:58:39 +00:00
Corina Grigoras
dd4426d832
Merge "Clarify javadocs about mode to parse file." into sc-dev am: b84e828974 am: 9edbfddf0d am: 9e319ab210
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14621143
Change-Id: I1979aefaffb82e5aba3a7c4ca11fd87ca039baf4
2021-05-20 14:25:15 +00:00
Corina Grigoras
9edbfddf0d
Merge "Clarify javadocs about mode to parse file." into sc-dev am: b84e828974
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14621143
Change-Id: I2621e13c20b79ec86cdc201afdeb2905e690e9a3
2021-05-20 14:20:48 +00:00
Corina Grigoras
b84e828974
Merge "Clarify javadocs about mode to parse file." into sc-dev
2021-05-20 14:10:22 +00:00