Previously, hasRequestRawExternalStorageAccess would return null if the
app doesn't have requestRawExternalStorageAccess attribute in the
manifest. And, return true/false based on the value specified in
manifest.
Based on API review comments, changed the method to
getRequestRawExternalStorageAccess which returns
* RAW_EXTERNAL_STORAGE_ACCESS_DEFAULT if app didn't specify
requestRawExternalStorageAccess attribute in the manifest.
* RAW_EXTERNAL_STORAGE_ACCESS_REQUESTED if the app requested raw
external storage access.
* RAW_EXTERNAL_STORAGE_ACCESS_NOT_REQUESTED if the app requests to
disable raw external storage access
The API is not guarded with any system level API permissions, hence
changing the API to public API instead of system API. Also added
documentation to ensure apps don't misunderstand this API
Bug: 185484514
Test: atest packages/providers/MediaProvider
Change-Id: Ib7e41ab8ee38389bf44a360e4288d03e58ef44cf
- Open the media activity directly in background to play;
- Request to unlock the phone to open the media activity in foreground.
Bug: 185143406
Test: Studio builds
Change-Id: I88e2a77065694ccf1202e92f33c28e842291a525
When an APK defines multiple "uses-sdk" tags, the Android runtime only
uses the minSdkVersion and targetSdkVersion values from the last
occurrence of the "uses-sdk" tag.
For example an application with the following tags:
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29"/>
<uses-sdk android:maxSdkVersion="28"/>
Will have the following version codes at runtime:
minSdk=1 targetSdk=1
Another example:
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="28"/>
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="19"/>
Will have the following version codes at runtime:
minSdk=5 targetSdk=19
AAPT2 must print the version data from only the last tag, skipping other
occurrences of the tag.
Bug: 175789289
Test: manual
Change-Id: If0fece7de1d96046221c89d1b12515bc5c15c301
Bug: 186684456
Test: manual - get a convo notif that can bubble
- mark it as priority
=> notice the bubble is created but not auto-expanded
Change-Id: I4eec565bb1e32cbe4a53fa1e7db73f35fbabe730
When an APK defines multiple "uses-sdk" tags, the Android runtime only
uses the minSdkVersion and targetSdkVersion values from the last
occurrence of the "uses-sdk" tag.
For example an application with the following tags:
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29"/>
<uses-sdk android:maxSdkVersion="28"/>
Will have the following version codes at runtime:
minSdk=1 targetSdk=1
Another example:
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="28"/>
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="19"/>
Will have the following version codes at runtime:
minSdk=5 targetSdk=19
AAPT must print the version data from only the last tag, skipping other
occurrences of the tag.
Bug: 175789289
Test: manual
Change-Id: Ic855ff920d0b7abedd250d977bfa55189f4c8946
* Pointer was missing if showing vertically on the right
side, this is fixed & tried to make the code a lil more
clear
* Pointer was missing for the bubble overflow, this is
also fixed
Bug: 181888630
Test: manual - make sure the pointer is visible when the
stack is expanded, check landscape left &
right on small & large screen and check
portrait on phone.
Change-Id: Id7dc6ae9a1f3e798940342b780940fb77ceaed3a
Channel removal was resulting in some concurrent modification exceptions, so this change both adds a lock to synchronize any read/write access to mBuffer and also adds a test to make sure attempted concurrent access works correctly.
Test: atest ArchiveTest before and after change
Fixes: 186860793
Change-Id: Ic5f15a0fd3de27a44cc755c5d2f8008887c6b5b9
Thanks to commit 84383b5ef8, now Shell has
UPDATE_FONTS permission and we can use it in instrumentation tests via
UiAutomation#adoptShellPermissionIdentity().
Bug: 186966067
Test: atest UpdatableSystemFontTest
Change-Id: Idd2043f53d95b7c904d563dd3ef1d1846841c0d6
As commit 679a824773 removed 'adb shell
stop', this test doesn't need to be a host side test.
This allows us to call FontManager Java API in UpdatableSystemFontTest.
I will rewrite 'cmd font' to FontManager API calls in a following CL.
Bug: 186966067
Test: atest UpdatableSystemFontTest
Change-Id: I3bad29a3ea8402c990ae0dd553d3230db2d9f67c
Previously, async writes were posted to a Handler but not throttled,
so it was possible to do redundant writes when the latest state had
already been saved.
To avoid that, a counter is stored that serves as a request ID that
can be checked against to see if the latest state has already been
saved, skipping the write request if it has.
This is preferred to calling Handler#hasCallbacks or
Handler#removeCallbacks because those will lock the Handler. And taking
the lock twice is perhaps worse than locking once to schedule a no-op
Runnable, although this was not benchmarked.
This also introduces a retry mechanism in case the write fails.
Bug: 168086110
Test: atest PackageSessionTests
Test: atest RequestThrottleTest
Change-Id: I604dc433c77cf1d9d743c8437674576ad087d62c
The implementation for drag-and-drop provides two ways of taking URI
permissions: a public API that ties permissions to an activity and
an internal API that grants "transient" permissions. The latter is
used in a single code path: dropping content into an editable
TextView (implemented in android.widget.Editor).
The transient code path was previously (Android R and below)
implemented using a try/finally block in Editor.onDrop. The change
I7ae38069fb741925211b42c7ff28784eb9722ce3 had updated that logic to
tie permissions to the app process lifecycle instead, to account for
the new OnReceiveContentListener which apps can use to implement
custom drop handling (and use a background thread to do the processing
of the content). The problem with having permissions tied to the app
process lifecycle is that the app process could potentially be
long-running.
This change updates the logic to tie transient permissions to the
DragAndDropPermissions object lifecycle (release whenever there are no
more reference to the object and it is garbage collected). This
follows the same approach as used for IME permission grants
(InputContentInfo.java and InputContentUriTokenHandler.java).
Bug: 181178998
Test: atest CtsWindowManagerDeviceTestCases:CrossAppDragAndDropTests
Test: Manually verified using development/samples/ReceiveContentDemo
Change-Id: I950d4572ee19af64da1ace1572fe12e17d09c609
The current test verifies that the service parses the persisted state and
initializes successfully.
Test: Checkout multiple previous manifests and cherry pick this and run
`atest SensorPrivacyServiceMockingTest`.
Bug: 186904124
Change-Id: I2990910daa6f240655ba09686e4f5e489dd10995
Listen and respond to changes in state on background thread. Store in-memory to avoid
requerying frequently
Test: PeopleSpaceWidgetManagerTest, PeopleTileViewHelperTest,
PeopleSpaceUtilsTest
Bug: 182891880
Change-Id: Id0142b02bb549275c77d8940cda4eb1f0bf4e947
Change-Id: I65712a7a43d8956499533689fe77afbeeac5bd6e
Reduces the need for each code that needs to know about fold/unfold from
duplicating the exact same code.
Bug: 184795211
Test: They pass!
Change-Id: Ic05a2067c2ec64db7dab0227a7204283c1144a5f