Commit Graph

18596 Commits

Author SHA1 Message Date
Automerger Merge Worker
cc84f81eee Merge "Merge "Pass displayId to onActivityRotation()" into rvc-dev am: 2983b70983 am: 7309578767 am: e0ddf1d34f" into rvc-qpr-dev-plus-aosp am: f709fd9fc3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11745487

Change-Id: I7107612fed72444fb71562e241fd8b6a08014dae
2020-06-05 19:58:15 +00:00
Vinit Nayak
4b4673021b Merge "Pass displayId to onActivityRotation()" into rvc-dev am: 2983b70983 am: 7309578767 am: e0ddf1d34f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11745487

Change-Id: I656ee1038e2ba1745078fa2ec810796b2064ac9f
2020-06-05 19:46:59 +00:00
Automerger Merge Worker
92b65d94a1 Merge "Merge "Use a ReferenceQueue to prune weak references" into rvc-dev am: 0053a10ea0 am: 3c7d44954d am: 5efdfc829d" into rvc-qpr-dev-plus-aosp am: 1529da6153
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11707956

Change-Id: I065de674e98b7005d16e2e4d600e7dad8820cb1f
2020-06-05 19:05:00 +00:00
Vinit Nayak
2983b70983 Merge "Pass displayId to onActivityRotation()" into rvc-dev 2020-06-05 18:58:32 +00:00
Ryan Mitchell
5efdfc829d Merge "Use a ReferenceQueue to prune weak references" into rvc-dev am: 0053a10ea0 am: 3c7d44954d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11707956

Change-Id: I07cc171872594cb70591e7c63eb33dbfd6ec396e
2020-06-05 18:44:21 +00:00
Liz Kammer
4b91335d50 Merge "Use permissionController name rather than hardcode" into rvc-dev-plus-aosp am: e44a2b2bb8 am: 50be28db92 am: 26262a4c9d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11689878

Change-Id: Ie0b9d3ea4f6862f943464ca4732d41046c8be973
2020-06-05 18:27:55 +00:00
Ryan Mitchell
0053a10ea0 Merge "Use a ReferenceQueue to prune weak references" into rvc-dev 2020-06-05 18:27:50 +00:00
Liz Kammer
e44a2b2bb8 Merge "Use permissionController name rather than hardcode" into rvc-dev-plus-aosp 2020-06-05 15:16:59 +00:00
Vinit Nayak
bedb9f33c2 Pass displayId to onActivityRotation()
Bug: 154580671
Change-Id: I220e1e9ac1a381c6ebadc3849a393225d1f53e3e
2020-06-04 17:15:32 -07:00
Riddle Hsu
1b790effb2 Merge "Override application display adjustments while launching activity" into rvc-dev am: 1421b3dace am: d8eb1df3d7 am: 9096359663 am: a915e3dae4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11716091

Change-Id: I557a1e4aff677b0b51766bf9a5cb2ba1c6fb481c
2020-06-04 07:00:41 +00:00
Riddle Hsu
9096359663 Merge "Override application display adjustments while launching activity" into rvc-dev am: 1421b3dace am: d8eb1df3d7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11716091

Change-Id: I925d1067421e31b6fb811ccbfaa2b4a74f9bfc5b
2020-06-04 06:41:58 +00:00
Riddle Hsu
cd414bdfb0 Merge "Override application display adjustments while launching activity" into rvc-dev am: 1421b3dace
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11716091

Change-Id: I81195b7c5e33160659704d7b7dcf27c203ce7f4c
2020-06-04 06:29:08 +00:00
Riddle Hsu
1421b3dace Merge "Override application display adjustments while launching activity" into rvc-dev 2020-06-04 06:20:45 +00:00
Vinit Nayak
cf040d067f Merge "Add new callback for when activity rotates" into rvc-dev am: 38dbc97939 am: b0d73832e3 am: 8e8e0347d1 am: 6ac75ea8b5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11396809

Change-Id: Ie1e341220ed6c0a1a9e37c4e41fa4c64b2efeb2b
2020-06-04 05:39:52 +00:00
Vinit Nayak
8e8e0347d1 Merge "Add new callback for when activity rotates" into rvc-dev am: 38dbc97939 am: b0d73832e3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11396809

Change-Id: I7e32fd0fca01327cd52cdf2ac74269d50f3c744f
2020-06-04 04:44:30 +00:00
Vinit Nayak
741f304314 Merge "Add new callback for when activity rotates" into rvc-dev am: 38dbc97939
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11396809

Change-Id: Id730f3eccc34843dd006b277bab67e1790f0f04b
2020-06-04 04:33:04 +00:00
Vinit Nayak
38dbc97939 Merge "Add new callback for when activity rotates" into rvc-dev 2020-06-04 04:21:10 +00:00
Peiyong Lin
946de48a41 Merge "Allow to load implicit layer from /vendor/app." into rvc-dev am: 1371b76afd am: f7acfa876c am: 1f6aca105b am: 80d4c4a2c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11688191

Change-Id: I4aaa6fc51ee6c5d79a2d50c4723cbde4e05de9cb
2020-06-04 01:29:47 +00:00
Peiyong Lin
1f6aca105b Merge "Allow to load implicit layer from /vendor/app." into rvc-dev am: 1371b76afd am: f7acfa876c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11688191

Change-Id: I43f519b69c54ba203f2904a8b28f228bfce15467
2020-06-04 01:03:30 +00:00
Peiyong Lin
760338ed90 Merge "Allow to load implicit layer from /vendor/app." into rvc-dev am: 1371b76afd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11688191

Change-Id: I34257bdfd340334bcdfc19a3f6a9c5d9aeebe842
2020-06-04 00:53:47 +00:00
Ryan Mitchell
a74111f81c Use a ReferenceQueue to prune weak references
Currently ResourcesManager iterates over all of its weak references to
Resources objects and calls Reference#get to determine if the object
has been garbage collected. This method of pruning WeakReferences
causes reference locks to be acquired in the native layer and causes
lock contention when "references are being processed" by the garbage
collector.

This change uses a ReferenceQueue to determine if a reference has been
garbage collected which should improve performance of
ResourcesManager#getResources when the system is under memory pressure.

By only removing garbage collected references when creating new
Resources objects, the lists grow larger and are periodically pruned
rather than attempting to prune entries from the list every getResources
invocation.

Bug: 157575833
Test: used debugger to observe pruning happening correctly
hange-Id: I3277e80edfa441d24de165e738d33c4fac6b4121
Change-Id: I3277e80edfa441d24de165e738d33c4fac6b4121
2020-06-04 00:47:35 +00:00
Peiyong Lin
1371b76afd Merge "Allow to load implicit layer from /vendor/app." into rvc-dev 2020-06-04 00:40:15 +00:00
Peiyong Lin
eb1c5a4c28 Allow to load implicit layer from /vendor/app.
Currently when loading implicit layers from apks, NativeLoaderNamespace
doesn't allow to dlopen the binaries if they come from apks from
/vendor/app. Implicit layers ship within /vendor/app should work like
other implicit layers. This patch extracts the construction of library
paths of the implicit layers and includes those paths when
NativeLoaderNamespace is created as the part of the permitted library
paths.

Bug: b/157832445
Test: atest android.gputools.cts.CtsRootlessGpuDebugHostTest
Test: setup debug layer and use adb logcat to check vulkan loader output
Change-Id: Ie2ca989bcab890578b5aa540d07f2aee2a0182bd
2020-06-03 21:30:08 +00:00
Liz Kammer
f0cc376617 Use permissionController name rather than hardcode
soong renames the package name in the resource table, so it no longer
needs to be accessed based on the base package name.

Test: forrest
Bug: 147434671
Change-Id: I5b5b6699f720ad8798d36467e88c8d8ddb52c9ee
2020-06-03 20:28:06 +00:00
Vinit Nayak
66bf45ffa8 Add new callback for when activity rotates
Launcher needs to distinguish display changes
that result naturally vs apps that launch
in a fixed portrait/landscape rotation during
the quickstep gesture.This callback helps anticipate
if a subseqent onDisplayChanged() will
have resulted from a natural rotation or not.

Bug: 154580671
Change-Id: I59ee7985a9f367e8fc5826c08476c1a25d1426b0
2020-06-03 10:55:42 -07:00
Riddle Hsu
a474039bdc Override application display adjustments while launching activity
A launching activity with fixed rotation may get information from
a Display object which is associated with application resources.
In order to let the display size and rotation are consistent with
the activity configuration, the override configuration of activity
will update to the display adjustments of application resources.

Fixes: 157558894
Test: AppConfigurationTests#testRotatedInfoWithFixedRotationTransform

Change-Id: I7f72d838170a5f588bb8dd279ae081d1a3ddba95
2020-06-03 22:34:01 +08:00
Jordan Jozwiak
3988be8c04 Merge "Allow locking with feature or permission" 2020-06-02 20:39:08 +00:00
Steve Elliott
0bc7867b71 Merge "Always use Shortcut Icon in conversation if available" into rvc-dev am: cc1937581a am: 4c42f40c1f am: ad14c752c4 am: aa9275bb9d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11662920

Change-Id: I2aaa8cb531c0d44f6d6f167ef3a9f2c14840e75d
2020-06-02 19:21:01 +00:00
Evan Severson
2ed13f597c Merge "Remove stopship for permissioncontroller pkg name" into rvc-dev am: 1fe28b24c0 am: 2baed048cd am: a63afc7a81 am: e6618ed6b2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11678252

Change-Id: I520b75a3a8ac6c1a843c5a5274cb5fd952d9b2f0
2020-06-02 19:16:42 +00:00
Jordan Jozwiak
3cc489b7f3 Allow locking with feature or permission
Instead of requiring the DEVICE_ADMIN feature, we accept either
the feature or the appropriate permission.

Bug: 133240910
Test: Manual testing
Verify that API executes when on a device without DEVICE_ADMIN
when the caller has the LOCK_DEVICE permission.

Change-Id: I30bd0dc81d9d7b7ed5503a926066caffb389b9c0
2020-06-02 19:06:15 +00:00
Steve Elliott
aa9275bb9d Merge "Always use Shortcut Icon in conversation if available" into rvc-dev am: cc1937581a am: 4c42f40c1f am: ad14c752c4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11662920

Change-Id: I44cd9b7cc4298067f6aef83716bfcf797f1b6edf
2020-06-02 18:54:49 +00:00
Steve Elliott
841ddf9dd2 Merge "Always use Shortcut Icon in conversation if available" into rvc-dev am: cc1937581a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11662920

Change-Id: I4a8979618900abb1e13547d67e6fe2539203b3e8
2020-06-02 18:53:14 +00:00
Evan Severson
a63afc7a81 Merge "Remove stopship for permissioncontroller pkg name" into rvc-dev am: 1fe28b24c0 am: 2baed048cd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11678252

Change-Id: Ieea908678a84e2638f5ae1020a01bcfbf8d963ad
2020-06-02 18:46:43 +00:00
Steve Elliott
cc1937581a Merge "Always use Shortcut Icon in conversation if available" into rvc-dev 2020-06-02 18:46:38 +00:00
Evan Severson
0344d9526e Merge "Remove stopship for permissioncontroller pkg name" into rvc-dev am: 1fe28b24c0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11678252

Change-Id: I651672e8d5874f45087bf5605add3b758766d685
2020-06-02 18:41:30 +00:00
Evan Severson
1fe28b24c0 Merge "Remove stopship for permissioncontroller pkg name" into rvc-dev 2020-06-02 18:39:00 +00:00
Zimuzo Ezeozue
5fd1767ab1 Merge "Support apps sharing file:// URIs with the camera API" into rvc-dev am: efbc3f2d5e am: d371efcfb2 am: 46ca9f3ddd am: b8dd27d216
Original change: undetermined

Change-Id: I7b34b29c6cef114420491bb1710f240e38b3981d
2020-06-02 11:37:20 +00:00
Zimuzo Ezeozue
46ca9f3ddd Merge "Support apps sharing file:// URIs with the camera API" into rvc-dev am: efbc3f2d5e am: d371efcfb2
Original change: undetermined

Change-Id: Ie50c75f157b29fd2376faa2cc9510b64b3a57432
2020-06-02 11:01:42 +00:00
Zimuzo Ezeozue
2d19d79a2a Merge "Support apps sharing file:// URIs with the camera API" into rvc-dev am: efbc3f2d5e
Original change: undetermined

Change-Id: I7ac36ce2c14f1ebfb0b6ccf3e6a054b4d7a7b372
2020-06-02 10:50:34 +00:00
Zimuzo Ezeozue
efbc3f2d5e Merge "Support apps sharing file:// URIs with the camera API" into rvc-dev 2020-06-02 10:45:33 +00:00
Zim
c7496a3a62 Support apps sharing file:// URIs with the camera API
The camera API, MediaStore.ACTION_IMAGE_CAPTURE requires apps to pass
a content:// URI with write permissions to the camera. Unfortunately,
apps haven't been doing this and we only started hitting problems in R
for two reasons:
1. The FileUriExposedException that should crash apps when they try to
share file:// URIs acroos binder is skipped. This is because, the
image_capture intent is passed across binder as a field in a
ChooserActivity Intent and the child intents are not checked for
file URI exposed
2. Prior to R, when camera gets a file:// URI, camera issues a file
open(2) in its process. This open(2) succeeds because the camera had
write_external_storage permission which gave it write access to all
files on external storage

Now, camera targets R and (2) fails because camera does not have write
access to files owned by other apps. To workaround, we do the
following in the apps process when it targets < R:
a. When we detect a file:// URI for the camera in an Intent, we create
the file on disk if it is not already created.
b. Scan the file to insert it in the database and retrieve a
content:// URI
c. Replace the file:// URI with the content URI in the image_capture
intent

This works because, the system will ensure the camera is granted write
access to the content URI.

Test: Manual
Bug: 156336269
Change-Id: I4849ff5e806a8207650ff7534846c36ecdc6d3c0
2020-06-01 20:33:52 +01:00
Evan Severson
eb1e329207 Remove stopship for permissioncontroller pkg name
The change to use the overridden package name in the resources table
won't be included in the current release.

Test: Compile
Bug: 147434671
Change-Id: I9acbf921814088dfaba485d9acc845da650caf87
2020-06-01 12:19:31 -07:00
Julia Reynolds
93e28a23e8 Merge "Add method for Settings" into rvc-dev am: 829ac140f8 am: a990428b2c am: df306bf5bf am: 5bcea49a1a
Change-Id: Ie076633de7b8e018d36b85f07a874f749af31c8f
2020-05-31 19:52:58 +00:00
Julia Reynolds
df306bf5bf Merge "Add method for Settings" into rvc-dev am: 829ac140f8 am: a990428b2c
Change-Id: Ibd9fd814a798361fbdc01e194fb888c4f723b95c
2020-05-31 19:21:24 +00:00
Julia Reynolds
28bbd2256b Merge "Add method for Settings" into rvc-dev am: 829ac140f8
Change-Id: I7ca30e8641733595a050c3fe4056f45d43c0d60e
2020-05-31 19:08:24 +00:00
Julia Reynolds
829ac140f8 Merge "Add method for Settings" into rvc-dev 2020-05-31 18:57:41 +00:00
Charles Chen
a8eb5da27e Merge "Fix get display from display context derived context not working" into rvc-dev am: 13e3568567 am: c1ee356ca6 am: ab67c20603 am: 6eac042d97
Change-Id: I2e4b08ed2e61a9e0039619341f83e3a573a2b5e4
2020-05-30 07:40:50 +00:00
Charles Chen
ab67c20603 Merge "Fix get display from display context derived context not working" into rvc-dev am: 13e3568567 am: c1ee356ca6
Change-Id: I3439185307f11b96449886d60754928487b39bb9
2020-05-30 07:11:45 +00:00
Charles Chen
e50d17bf16 Merge "Fix get display from display context derived context not working" into rvc-dev am: 13e3568567
Change-Id: I814dcfd418f6b7bac9396d539cfef9ed7fee809f
2020-05-30 06:51:40 +00:00
Charles Chen
13e3568567 Merge "Fix get display from display context derived context not working" into rvc-dev 2020-05-30 06:35:35 +00:00