In some circumstances wallpaper-related files are moved into position,
and must then take proper effect. Make sure that they have the
correct SELinux labels afterwards to avoid preventing some valid
accesses.
Bug 29469965
Change-Id: I6d7c86be63d568fa0ad8841d109a7ff2149fdd54
With this CL, the system automatically grants a temporary URI permission
to the target application when the IME calls
InputConnection#commitContent() with
InputConnection#INPUT_CONTENT_GRANT_READ_URI_PERMISSION. The temporary
permission will be revoked by any of the following events:
- InputContentInfo#releasePermission() is explicitly called by the
target application.
- The target application returned false in
InputConnection#commitContent().
- All the InputContentInfo instances copied from the original one are
GC-ed.
If we do not do this and there is an application that forgot to call
that method then there is no way for IME developers to prevent
permission denial from happening in the application except for relaxing
the default permission of the ContentProvider just because of such an
application.
Although application developers are still expected to explicitly call
InputContentInfo#{request,release}Permission(), forgetting to call
InputContentInfo#requestPermission() does not hurt the user anymore.
With this CL, calling InputContentInfo#requestPermission() after calling
InputContentInfo#releasePermission() is also allowed.
Bug: 29892936
Change-Id: Id955435dd2e72549ee7134f46b3c6951581694ad
append() is used to optimized insertions in the array, but it must
preserve the order of the hashcode array; when it doesn't, it falls back
to append(), but it should not log a warning message
In particular, PendingIntentRecords might have different hashcodes
across different processes.
Fixes: 29912192
Change-Id: I0ab566249829ddb934fd51cf21399b68cb286bd5
In another word, create another cached bitmap, when the current VectorDrawable
will look differently when state changed.
Bug: 29870392
Bug: 29854240
Change-Id: I7a5ef91091e547a930368286defc7ab96aeb9471
(cherry picked from commit 4f1acfb5f5)
Fixes a case where notification header text could go missing
if a notification view was recycled and previously had a header text.
Reapplying only hid the text without clearing it, so the extraction
logic thought it was still there and hid the text for the children
even though it was not showing for the parent.
Change-Id: I3f96e1e7bebb2f815020d278ad13b2b5d948e63c
Fixes: 29915184
Pin the default camera app on unlock and user switch if the config requests it.
Do not pin an app if there is no default camera app for the intent.
Only pin the app for the MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA
action, not the _SECURE one. While there could be different apps chosed
for different intents, the belief is most people will choose only one
app.
Pin both apk and odex. Not all apps will have an odex, so it is not a
fatal error if that isn't pinned.
Bug 28251566
Change-Id: I3387c23c20d2f75c8864e29bdfc312fef6276434
In PM.generatePackageInfo, granted permissions (returned by permissionsState.
getPermissions) are only used if the package has a non-empty list of
requested permissions. Added a shortcut to handle that. In my tests
this shortcut is triggered in ~20% calls to PM.generatePackageInfo.
Also added an early continue in PermissionsState.getPermissions. Calling
hasRuntimePermission was not necessary in 90% cases.
Also changed ArraySet to be created with capacity for all mPermissions --
this is the typical scenario, previously it was going through multiple
grow operations.
Bug: 29879962
Change-Id: Ic4d8914d1c4f4df447deee2e3e3a15a2594e90ef
Offload work to the handler thread to allow AM to proceed with unlocking
the user.
Also optimized generatePackageInfo by not computing GIDs when GET_GIDS
flag is not set.
Bug: 29619732
Change-Id: Ib9dea53ea0d74038baeed67f21077305da61e46e
This reverts commit c4b8f36de5.
Having InputContentInfo#requestPermission() should not hurt developers,
but we can polish the behavior in a subsequent CL without changing
the API.
Bug: 29450031
Bug: 29892936
Change-Id: I1b43c19417b643d0c269af860db2d309b73a90d5