Commit Graph

18111 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
Louis Chang
e500c6773b Merge "Do not always report configuration change to activity" into rvc-dev 2020-05-27 04:17:14 +00:00
Collin Fijalkovich
88aa314afa Add performance counters to cacheinfo dumps.
Tracks the number of hits, misses, refreshes, and invalidations on a
per-cache basis, and makes that information available through dumpsys
cacheinfo.

Bug: 157175501
Test: adb shell dumpsys cacheinfo
Change-Id: Icabdd82acda2edc54d787d0a2d15a33ba18fd668
2020-05-26 18:47:42 -07:00
Neil Fuller
29867f046d Merge "Be more defensive around invalid tzids" am: f60c302dad am: 96c57398b4
Change-Id: If8695ee257155eaedc901aa797f1939eab0c721e
2020-05-26 10:54:50 +00:00
Neil Fuller
96c57398b4 Merge "Be more defensive around invalid tzids" am: f60c302dad
Change-Id: I08e1daaf9dd0a26017b18c984eb6d4093c46ed46
2020-05-26 10:36:28 +00:00
Neil Fuller
f60c302dad Merge "Be more defensive around invalid tzids" 2020-05-26 10:20:09 +00:00
Neil Fuller
26fe60a188 Be more defensive around invalid tzids
Add checks during boot in case the persist.sys.timezone property is set
to a bad ID.

This can happen in the rare case of a mainline rollback: i.e. if a device has
been set to a new ID and then the update is rolled back. Using GMT as a
fallback probably works without this change (it does in java.util.TimeZone),
but relies on all code, including native code that uses
persist.sys.timezone directly, knowing to interpret a bad ID as "GMT".
This commit makes that choice more explicit and defensive.

This change also removes the possibility of IOException, which is never
thrown, from some ZoneInfoDb methods.

Bug: 155738410
Test: boot with a valid id, verify persist.sys.timezone is unchanged
Test: boot with an invalid id set,  verify persist.sys.timezone is "GMT"
Merged-In: I6dc0f4f81848efbbaec6a11a62014471a0ef01fd
Change-Id: I6dc0f4f81848efbbaec6a11a62014471a0ef01fd
Exempt-From-Owner-Approval: Approved / landed internally
2020-05-26 10:19:53 +00:00
Stanislav Zholnin
dc84372155 Merge "Remove UidAtomTests from presubmit due to failures." into rvc-dev am: c1846a1a65
Change-Id: Ic55f54c525d0aa21ed01ac9ea3fe9776ea47c663
2020-05-25 19:51:02 +00:00
Stanislav Zholnin
86b0b984cf Remove UidAtomTests from presubmit due to failures.
Test: manual

Bug: 155714228
Change-Id: I661c6503c387a00803bb949e3e8ca431045dd266
2020-05-25 19:01:34 +00:00
easoncylee
6043c366b5 Fix mis-configuration of TEST_MAPPING file. am: 3e213cffec
Change-Id: I59f141c2b95e29a69a4b0f19436349340e8417b2
2020-05-24 23:35:01 +00:00
easoncylee
3e213cffec Fix mis-configuration of TEST_MAPPING file.
UidAtomTests:testAppOps is a test class and test method of
CtsStatsdHostTestCases. To run this in Test Mapping, it should
specify CtsStatsdHostTestCases. as the name in TEST_MAPPING file,
and android.cts.statsd.atom.UidAtomTests as the options.

Bug: 155714228
Test: presubmit test.
Change-Id: I7df08ae811425020ebbeae6a8e9f1317065c00c9
2020-05-24 21:32:51 +00:00
Julia Reynolds
a4eebac4e4 Merge "Update conversation labels" into rvc-dev am: 28c3a34faa
Change-Id: I9b1715deb958d5bf72ee173e46575f4a2788af1a
2020-05-21 19:17:25 +00:00
Julia Reynolds
28c3a34faa Merge "Update conversation labels" into rvc-dev 2020-05-21 18:53:24 +00:00
Winson
badad7b62f Remove InstantAppResolverTests for migration to CTS
See change I79b7c42e8a495c0f4ba4cd42a076ac3b43ee2919

Bug: 155114274
Bug: 155115137
Bug: 155115845
Bug: 155116506
Bug: 155116748
Bug: 155117421

Test: atest CtsInstantAppTests

Change-Id: I09023d098c93758c049169a909c27c230bb3dd9b
2020-05-21 11:50:43 -07:00
TreeHugger Robot
3fb3ffeda8 Merge "Prevent DPCs from requesting INTERACT_ACROSS_PROFILES" into rvc-dev am: 5d6cf38cd1
Change-Id: I6120224f6026d605121e00e38b18fe5fcd769d99
2020-05-21 16:27:31 +00:00
TreeHugger Robot
5d6cf38cd1 Merge "Prevent DPCs from requesting INTERACT_ACROSS_PROFILES" into rvc-dev 2020-05-21 16:25:25 +00:00
Hui Yu
0c107e3d09 Merge "Check PendingStartActivityUids list before updateOomAdj is done." into rvc-dev am: 600ce540ca
Change-Id: Ic0af8fa5f1e9bcaa9b7eeb2aba990524024f013e
2020-05-21 16:04:04 +00:00
Hui Yu
600ce540ca Merge "Check PendingStartActivityUids list before updateOomAdj is done." into rvc-dev 2020-05-21 16:00:43 +00:00
Alex Johnston
28ccaf1dfd Merge "setAutoTimeRequired disabled on managed profile" into rvc-dev am: fa6cf17648
Change-Id: Ifebf6a1e9320028b3a3ab1604a876621d35aee93
2020-05-21 10:26:57 +00:00
Alex Johnston
fa6cf17648 Merge "setAutoTimeRequired disabled on managed profile" into rvc-dev 2020-05-21 10:08:51 +00:00
Hui Yu
3f5b1521f0 Check PendingStartActivityUids list before updateOomAdj is done.
While starting activity, WindowManager posts a runnable to DisplayThread to updateOomAdj.
The latency of the thread switch could cause client app failure when the app is checking
ActivityManagerService.isUidActive() before updateOomAdj is done.

Use PendingStartActivityUids to save uid after WindowManager start activity and before
updateOomAdj is done.

PendingStartActivityUids list is checked in
ActivityManagerService.isUidActive() and
AppOpsService.UidState.evalMode(). A uid in this list is treated same as
uid is active.

Bug: 157180494
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerCameraLaunchTest.java
Change-Id: If0685c3c2fad01e48f3fcf2228057041f4ec9b00
2020-05-20 23:04:34 -07:00
Julia Reynolds
8d34af82ac Update conversation labels
By adding a util method that prefers longlabel and
falls back to shortlabel.

Test: atest
Bug: 157140669
Change-Id: Ib7229b75b7a8ab87274e9aab1c7816129f04e505
2020-05-20 17:03:35 -04:00
Alex Johnston
67623cf556 setAutoTimeRequired disabled on managed profile
* A security exception should be thrown when
  setAutoTimeRequired is called on a managed profile
* Update javadoc

Bug: 156620695
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetAutoTimeRequired
      atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testSetAutoTimeRequired
      atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testSetAutoTimeRequired
Change-Id: Ifb53c218947f62aa446aa607d3f4eee354586395
2020-05-20 12:50:04 +01:00