Commit Graph

18565 Commits

Author SHA1 Message Date
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
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
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
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
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
13e3568567 Merge "Fix get display from display context derived context not working" into rvc-dev 2020-05-30 06:35:35 +00:00
Charles Chen
e22c4cb3c6 Fix get display from display context derived context not working
In ContextImpl, we checked the flag "mIsAssociatedWithDisplay" to
identify if a context can access a display or not. The flag wasn't
passed from outer context, and it leads to an issue that context
which created from #createConfigurationContext from display context
failed to obtain display instance.

This CL passes mIsAssociatedWithDisplay from outer context and
also add test to verify the behavior.

fixes: 157719118
Test: atest ContextTest ContextAccessTest

Change-Id: Ibeb2a08c75f90304e12dcf99293c84409c5eea34
2020-05-30 12:46:59 +08:00
Steve Elliott
6373829000 Always use Shortcut Icon in conversation if available
Bug: 153751740
Test: manual
Change-Id: Ib1002b53d700d2857f69cd476de79a4e34f90559
2020-05-29 15:56:00 -04:00
Julia Reynolds
0c45c6e8ff Add method for Settings
Test: manual
Bug: 156033178
Change-Id: I3c334c6697e9bc13451faa0c0df1cdbdc3eaf6ea
2020-05-29 19:37:56 +00:00
Robin Lee
90cfc39370 Remove dead code: TV-specific launchAssistIntent
Leanback devices go through the regular assist launch path now
so this workaround code is dead.

Test: make checkbuild
Bug: 157564688
Change-Id: I625c1ca03df9350f181219fe87d0d0c4f1e56e0f
2020-05-29 11:38:45 +00:00
TreeHugger Robot
e84c95eaf3 Merge "Fix transition return issues when more than 1 level depth" into rvc-dev am: 9aa8852510 am: cd991f9b3c am: 6084e4c0ad am: 7d4b99d7cd
Change-Id: Ibadba7c89591345e8e6990cf4d41b834737295cd
2020-05-29 05:21:59 +00:00
TreeHugger Robot
7d4b99d7cd Merge "Fix transition return issues when more than 1 level depth" into rvc-dev am: 9aa8852510 am: cd991f9b3c am: 6084e4c0ad
Change-Id: I81f584b0896136b8fc31632a1a5ff7b4f1359349
2020-05-29 05:09:29 +00:00
TreeHugger Robot
f7bb82a829 Merge "Fix transition return issues when more than 1 level depth" into rvc-dev am: 9aa8852510
Change-Id: I747167bf3e361bf0a8ac6f547b66babaf4398350
2020-05-29 04:48:34 +00:00
TreeHugger Robot
9aa8852510 Merge "Fix transition return issues when more than 1 level depth" into rvc-dev 2020-05-29 04:32:46 +00:00
TreeHugger Robot
d6c0f2d342 Merge "Add AndroidFrameworkClientSidePermissionCheck errorprone check" 2020-05-28 22:44:37 +00:00
Hongwei Wang
0629b9772f Merge "Set isInPictureInPictureMode earlier" into rvc-dev am: 3da602b640 am: d1bc4769ac am: 7b8b330d2a am: 0604285c4b
Change-Id: Ia79a39232f8d7545be9d54ea39bd73dc8eef74bf
2020-05-28 21:39:07 +00:00
Bernardo Rufino
5a2df65f5a Add AndroidFrameworkClientSidePermissionCheck errorprone check
Often a permission check in the app's process is an indicative of a
security issue since the app could work around it. Permission checks
should be done on system_server.

This errorprone warning checks for invocations of
Context.checkPermission() in any class inside android.app package and
emits a warning if it finds one. I also added a @SuppressWarnings for
one such call that has a todo and it and seems like an already tracked
workaround. The other call found by the checker is tracked in
b/157548188.

I also found that errorprone was not running for framework-minus-apex,
so I added the plugin to the relevant build rule. Let me know if this is
not the way to go!

Test: build/soong/soong_ui.bash --make-mode framework-minus-apex
      RUN_ERROR_PRONE=true
Bug: 157626959
Change-Id: Ieb94f2f43722837c8354ac66474797f4f338ae16
2020-05-28 22:00:53 +01:00
Hongwei Wang
d1bc4769ac Merge "Set isInPictureInPictureMode earlier" into rvc-dev am: 3da602b640
Change-Id: Ib8f177257139994942df787a1f93cd5b06bd130b
2020-05-28 20:59:34 +00:00
Hongwei Wang
e37b84d19e Set isInPictureInPictureMode earlier
Per https://developer.android.com/guide/topics/ui/picture-in-picture
After app requests enterPictureInPictureMode and receives onPause
callback, it will continue playback if isInPictureInPictureMode is true.

However, with ag/11273366, isInPictureInPictureMode will now return true
after the new configuration is dispatched to app, which happens after onPause.
This may cause app, following the guidance, to cease playback in PiP mode.

Fixes this by setting the internal mIsInPictureInPictureMode earlier
right in enterPictureInPictureMode

Video: http://go/recall/-/aaaaaabFQoRHlzixHdtY/fVRqG7UWoKkQQhFxPkzcUt
Bug: 156924033
Test: manually enter PiP from Twitch
Change-Id: I8e0865076fcb756cfa5db39901f460ab5ad69b99
2020-05-28 11:41:39 -07:00
Jeff Chang
6d834d86fb Fix transition return issues when more than 1 level depth
d85bed510, Adding support for cross-task hero transition, When running
cross-task, only play the enter animation, but the judgment for start
exit transition with shared element is broken. For the case on the issue,
when the exit transition completes, the activity is on the top of task,
it is not allowed to execute return transition.

This CL modifies the condition to allow the return transition. For start
exit back transition, the isReturning is always true. We can use it to
decide if it is allowed to play the return transition.

Bug: 137838129
Test: atest ActivityTransitionTest
      Manual testing on ApiDemos with Activity transition

Change-Id: Iaa6a875dbe305f6356887616b797dc45e76a4b56
2020-05-28 18:00:43 +08:00
TreeHugger Robot
f22b790260 Merge "Restrict some OpEntry#* methods for apps targeting R." 2020-05-28 09:47:27 +00:00
TreeHugger Robot
a00402bb70 Merge "Remove InstantAppResolverTests for migration to CTS" into rvc-dev am: f37b09335f am: 38a9ac0ff4 am: 538f254eec am: a9196432f5
Change-Id: Ifd8ca2bb20d50a7011d03bf876c00775a00f8cf7
2020-05-28 01:29:26 +00:00
TreeHugger Robot
a9196432f5 Merge "Remove InstantAppResolverTests for migration to CTS" into rvc-dev am: f37b09335f am: 38a9ac0ff4 am: 538f254eec
Change-Id: I3b694a86cb51bb019993de0ac3710a3a0322928e
2020-05-28 01:10:06 +00:00
TreeHugger Robot
bdfa8f11d7 Merge "Remove InstantAppResolverTests for migration to CTS" into rvc-dev am: f37b09335f
Change-Id: I7b58b9f4dee9a0b84f2a6af793ffa0fe1ce7e8a3
2020-05-28 01:05:25 +00:00
TreeHugger Robot
f37b09335f Merge "Remove InstantAppResolverTests for migration to CTS" into rvc-dev 2020-05-28 00:23:16 +00:00
Julia Reynolds
b39d72b8a6 Merge "Clarify conversation policy" into rvc-dev am: 1e8ce29af7 am: 8dc7491d51 am: 1075523e84 am: 1c6b59868a
Change-Id: I23a846a71354c9c6eb26234ac6206820294590e2
2020-05-27 21:38:47 +00:00
Julia Reynolds
1c6b59868a Merge "Clarify conversation policy" into rvc-dev am: 1e8ce29af7 am: 8dc7491d51 am: 1075523e84
Change-Id: Id090a288435134f7fe8ab50ed58ee2b0d44419ed
2020-05-27 21:18:41 +00:00
Julia Reynolds
fc4a4fc109 Merge "Clarify conversation policy" into rvc-dev am: 1e8ce29af7
Change-Id: If75661d756fd67171050e5a434b2c7cdea36d01a
2020-05-27 21:03:53 +00:00
Julia Reynolds
1e8ce29af7 Merge "Clarify conversation policy" into rvc-dev 2020-05-27 20:43:59 +00:00
Collin Fijalkovich
fd92d2fac3 Merge "Add performance counters to cacheinfo dumps." into rvc-dev am: 4edffac782 am: 23e5f201c8 am: 959b44ba0b am: cf0702af73
Change-Id: I8459abf3d6f654023d4cce5b881b382893c7302f
2020-05-27 19:11:20 +00:00
Collin Fijalkovich
cf0702af73 Merge "Add performance counters to cacheinfo dumps." into rvc-dev am: 4edffac782 am: 23e5f201c8 am: 959b44ba0b
Change-Id: Ie19567b510ec47ecc4fdec0ec4412beadbbc2502
2020-05-27 18:49:25 +00:00
Collin Fijalkovich
ca965f44fe Merge "Add performance counters to cacheinfo dumps." into rvc-dev am: 4edffac782
Change-Id: I73af6f35ecb97f7dd938e8de93f1d1f6a5c12808
2020-05-27 18:25:02 +00:00
Collin Fijalkovich
4edffac782 Merge "Add performance counters to cacheinfo dumps." into rvc-dev 2020-05-27 18:24:04 +00:00
Julia Reynolds
2fcfe23f79 Clarify conversation policy
Test: make
Fixes: 157482114
Change-Id: Icb6993a4c2c651465cadfa31c1d1915b7352994c
2020-05-27 12:47:10 -04:00
Louis Chang
f3639b8692 Merge "Do not always report configuration change to activity" into rvc-dev am: e500c6773b am: b29e0c2dc7 am: 731bdebe1c am: 84fd155147
Change-Id: I3170b111104ad5afeb868371bc390799d2bf185a
2020-05-27 05:13:43 +00:00
Louis Chang
84fd155147 Merge "Do not always report configuration change to activity" into rvc-dev am: e500c6773b am: b29e0c2dc7 am: 731bdebe1c
Change-Id: Ib1789b838fa2e36a638a82e297d839a156d1e7d3
2020-05-27 04:49:41 +00:00
Louis Chang
37fe59a2fe Merge "Do not always report configuration change to activity" into rvc-dev am: e500c6773b
Change-Id: I51d3dbb3f0805e7e0afa2edac88ae10fda9f6ea9
2020-05-27 04:18:07 +00:00