In this way, we can clarify the owners and it is easier to maintain.
Also refactor to move WindowContext creation logic to ContextImpl.
Test: atest WindowContext WindowContextTests WindowContextPolicyTests
Bug: 159767464
Bug: 152193787
Change-Id: I78432aa18aa97e001f5a9a04321109e456fd137b
This change adds a new hidden user type "android.os.usertype.profile.CLONE"
and two new system APIs "isCloneProfile" and "hasSharedMedia". To support App cloning, we need to support sharing media between the owner user and the clone user. Adding this as a property in UserTypeDetails.
Bug: 182396009
Test: atest android.multiuser.cts.UserManagerTest#testCloneUser, atest com.android.server.pm.UserManagerTest#testCloneUser and manually ran shell commands on the clone user.
Change-Id: I49ddcbd499944ca9ec05ef4dc10d2e2b231d8b88
(cherry picked from commit db930667a21dac9f0de7cb2fe99175b3b4545bf4)
Add new manifest attribute requestOptmizedExternalStorageAccess.
When the flag is set, app requests for performance optimisations for
file path operations. Apps get this performance optimisation by
bypassing database operations as part of file path operations. Hence,
when the flag is set, app will be resposible to keep MediaStore database
consistent for its file path operations.
App should hold android.Manifest.permission#MANAGE_EXTERNAL_STORAGE
permission or SYSTEM_GALLERY role, otherwise the flag will be ignored.
The default values is
- True if
* if app has android.Manifest.permission#MANAGE_EXTERNAL_STORAGE
permission and targets targetSDK<=30.
* app has SYSTEM_GALLERY role and targetSDK<=29.
- False otherwise.
Bug: 178209446
Test: atest
android.scopedstorage.cts.device.BypassDatabaseOperationsTest
Change-Id: I951c3001c2b7dbe163b3bfecef4ee8ad350230ae
Following changes are implemented in this CL:
1. Persist shortcuts to icing whenever a shortcut is created/updated.
2. Delete shortcuts from icing only when publisher explicitly removes
the shortcut. i.e. deletion due to exceeding shortcut limit / disabling
shortcut do not lead to shortcut deletion from icing.
3. Call AppSearchSession#reportUsage when
ShortcutManger#pushDynamicShortcuts is invoked.
4. Add StrictMode warning for calling async method on mainthread.
Bug: 151359749
Test: atest ShortcutManagerTest1 ShortcutManagerTest2 ShortcutManagerTest3 ShortcutManagerTest4 ShortcutManagerTest5 ShortcutManagerTest6 ShortcutManagerTest7 ShortcutManagerTest8 ShortcutManagerTest9 ShortcutManagerTest10 ShortcutManagerTest11
Test: atest CtsShortcutManagerTestCases
Change-Id: I7ae7ec50a7e49f8de819d8239d429fc494017f96
Since developers can declare the "neverForLocation" flag in their
manifest as public API, we should also offer a way to inspect the
value that we parsed from the manifest. We do this by surfacing it
through the existing PackageInfo.requestedPermissionsFlags field.
This also means we can remove the PackageManagerInternal API, since
interested parties can now check PackageInfo directly.
Fix a potential security issue by only accepting flags from manifest
when the application is targeting a modern enough SDK.
Bug: 181812281
Test: atest CtsContentTestCases:PackageManagerTest
Test: atest FrameworksServicesTests:PackageParserTest
Test: atest com.android.server.pm.parsing
Change-Id: I877768c06ee15281f3334794034f4af563e74569
- Race condition between Theme.setImpl() cnd Theme.applyStyle() can
happen when creating Window and Configuration-change occur together.
- To maintain the integrity, the whole process of creating new ThemeImpl
and setting it in Resources.setImpl() should be guarded by the lock.
- Moves the lock of ThemeImpl.mKey to Theme.mLock.
Bug: 173558667
Test: manual test in the bug
Change-Id: I9ebdc48333b188c0b26b1b7490a5cbb34bbe6e0f
Clarifies that it's the Context's user being queried and updates for
the selection -> state rename.
Bug: 182345452
Test: none, docs change
Change-Id: Iaefc82b5e1c25292db1f694bf4f05d9f82b81958
TestNetworkManager is being unbundled; the TEST_NETWORK_SERVICE constant
is necessary for the module to register the manager with
registerContextAwareService.
Bug: 171540887
Test: m
Change-Id: I0690251ddfcdaa8a34830e110b75869a370de389
Merged-In: I0690251ddfcdaa8a34830e110b75869a370de389
TestNetworkManager is being unbundled; the TEST_NETWORK_SERVICE constant
is necessary for the module to register the manager with
registerContextAwareService.
Bug: 171540887
Test: m
Change-Id: I0690251ddfcdaa8a34830e110b75869a370de389
- Added the following testAPIs to replace the usage
of adb shell commands in tests:
* stopUser and ACTION_USER_STOPPED
* waitForBroadcastIdle
- Changed the documentation for switchUser to correctly
reflect that it accepts CREATE_USERS
Test: verfied that tests can access the APIs
Bug: 181030374
Change-Id: I92b92471a18cf97a118d3f1946d6e06c277a76f1
* changes:
Remove app links caller BROWSABLE requirement
Fix DomainVerificationShell user/allowed bugs
Remove pending/restored domain state when attaching
Check user ID for domain verification setters
Expose error codes for domain verification setters
Move domain state ints to DomainVerificationInfo
Migrate approved/denied domain states and add tests
As part of an upcoming feature, developers will need the ability to
clearly communicate that they'll never use a permission derive the
physical location of the device, regardless of ACCESS_FINE_LOCATION
and/or ACCESS_COARSE_LOCATION being granted. The first use of this
is the BLUETOOTH permission, but developers may need to communicate
this for other permissions such as READ_PHONE_STATE, etc.
This change begins parsing this developer declaration as one of
multiple "usesPermissionFlags", which are then stored in a new
ParsedUsesPermission object. To minimize refactoring, we continue
to offer this data through the older String-based APIs.
Bug: 181812281
Test: atest FrameworksServicesTests:PackageParserTest
Test: atest com.android.server.pm.parsing
Test: atest -p core/java/android/content/pm \
core/java/com/android/internal/content \
services/core/java/com/android/server/pm \
services/tests/servicestests/src/com/android/server/pm
Change-Id: I2ccda05cf416653d311151591f91ae55a729e05b
Does not require BROWSABLE category on the caller side anymore to apply
app links logic. However, it is now enforced on the receiver side, such
that all IntentFilter matches must contain BROWSABLE to be considered
approved for a domain.
Bug: 181890795
Change-Id: I8d5a10c3b8cc2370a4a69d4abe9ee74b1964f19e
Removes the InvalidDomainSetException and exposes the reasons as API
error codes. Implementers can check for a non-0 error code to tell if
the failure is meant to indicate a cancelled request.
Bug: 180991102
Test: atest com.android.server.pm.test.verify.domain
Test: atest DomainVerificationManagerApiTest
Change-Id: I19b88fb582fc7f633497d036a0590350ec463f3e