Commit Graph

15319 Commits

Author SHA1 Message Date
Winson
710e3ecbe0 Revert ContextImpl LoadedApk packageInfo caching workaround
Reverts changes made for b/120987987 that are no longer necessary
with changes for b/124363683.

Test: manually built, enabled/disabled FontCursiveMonospaceOverlay

Change-Id: Ied18a412d30514b40cc720d9a1af5c0d2053d795
2019-03-29 12:18:18 -07:00
Winson
83708c8258 Diff resource dirs when checking LoadedApk packageInfo cache in ActivityThread
Need to check the overlayDirs with the current appInfo passed into
getPackageInfo, otherwise it's possible to return an old, outdated
LoadedApk which hasn't loaded the correct resource dirs into its
AssetManager.

There is a separate issue with AssetManager2.isUpToDate not being
implemented correctly, but that will be moved to a different
changelist.

Bug: 124363683

Test: manually tested Wellbeing with repro steps in linked bug

Change-Id: Iace6e8aab322bdb7b5b93398a4f5e2c69fccc68e
2019-03-29 12:18:18 -07:00
Winson
d605e2d665 Propagate base code path and split dir changes to Resources objects
When split APK loading is deferred, like a dynamic feature module
or delayed install, the ResourcesImpl for old Resources objects
weren't being updated.

This is because the stable key used was "mResDir", which
corresponds to a path with a random hash ID suffixed to the end
of the APKs, like com.example.android-RANDOMHASH/base.apk.

Because RANDOMHASH changes every time a package is updated
(like installing a split), the stable key is no longer valid for
old Resources objects. That means they would never get notified
that the package resource directories could have changed.

There was a partial solution added 2 years ago to solve this case
for refreshing overlays. This extends the solution to replace base
code paths and split dirs, as well as force updates to Resources
with the old code paths.

The original breakage started from P, but I was unable to narrow
down what caused it. This bug should've existed in O, but maybe
a separate, unrelated resources behavior allowed it to work. And
given that, I don't know of a workaround for current instant apps.

Bug: 112392906
Bug: 116167993

Test: manual test Dotloop IA in b/112392906
Test: manual test Hollar IA in b/116167993

Change-Id: I73491fa2b9397a489765ddac8f0a07a797f02028
2019-03-26 17:09:01 -07:00
TreeHugger Robot
1f8d933b32 Merge "Add NonNull/Nullable annotations" 2019-03-26 20:26:35 +00:00
TreeHugger Robot
a967066a1e Merge "Modify AbstractRemoteService#mBindInstantServiceAllowed to #mBindingFlags in order to support multiple binding flags" 2019-03-26 17:16:05 +00:00
Todd Kennedy
63ff464661 Add NonNull/Nullable annotations
Change-Id: Id2a343765b29226a13ba41102df4bca739112192
Fix: 126701786
Test: Manual
2019-03-26 13:27:03 +00:00
Alex Kershaw
2384444f75 Merge "Add @NonNull to parameter." 2019-03-26 11:14:25 +00:00
Michal Karpinski
322df0bb74 Modify AbstractRemoteService#mBindInstantServiceAllowed to #mBindingFlags
in order to support multiple binding flags

And supply BIND_ALLOW_BACKGROUND_ACTIVITY_STARTS for RemoteFillService.

Test: atest CtsAutoFillServiceTestCases
Test: atest AutofillManagerServiceTest
Bug: 126267782
Change-Id: Id5262d6a4e0fde0ad874020f783cfbf72fe201f4
2019-03-26 11:07:33 +00:00
Antoan Angelov
4d7990f458 Merge "Remove PROVISIONING_MODE_MANAGED_PROFILE_ON_FULLY_MANAGED_DEVICE" 2019-03-25 12:53:43 +00:00
Varun Shah
06c5aacde7 Merge "Remove deprecated USM#registerAppUsageLimitObserver." 2019-03-23 22:14:40 +00:00
TreeHugger Robot
0369790fac Merge "Add Shell permission for CTS test." 2019-03-22 22:31:32 +00:00
Mady Mellor
d3304bfd0a Merge "Update BubbleMetadata#setDesiredHeight to be in DPs" 2019-03-22 17:31:16 +00:00
arangelov
1b146c2306 Remove PROVISIONING_MODE_MANAGED_PROFILE_ON_FULLY_MANAGED_DEVICE
This constant is no longer part of the admin integrated flow.

Bug: 129135684
Test: compiled code
Change-Id: I81f3d4dc2bfb0ee456bd902ca6de212b4e9b5c10
2019-03-22 17:30:59 +00:00
Mady Mellor
36e132b02a Merge "Remove the title API bc we don't use it" 2019-03-22 17:30:41 +00:00
TreeHugger Robot
c396d6738c Merge "API review followup: DynamicAndroidClient" 2019-03-22 17:21:39 +00:00
Sunny Goyal
006ab03fb7 Merge "Updating the AppTarget API to use a builder for constuction" 2019-03-22 15:55:17 +00:00
TreeHugger Robot
4656a9e37f Merge "API council feedback for dnd" 2019-03-22 15:53:32 +00:00
TreeHugger Robot
6d623e495b Merge "Updating onLocation related APIs to onLaunchLocation as per API review" 2019-03-22 15:24:29 +00:00
Rubin Xu
e120a42c25 Merge "Improve javadoc" 2019-03-22 11:12:21 +00:00
Hai Zhang
be1fe6f31a Merge "Add getDeclaredShareLibraries() for role qualification checking." 2019-03-22 09:43:48 +00:00
TreeHugger Robot
6798ab9e95 Merge "Remove unnecessary called from system process warning." 2019-03-22 03:51:16 +00:00
TreeHugger Robot
f621dfc7d5 Merge "Make LSS report honest password quality to DPMS" 2019-03-22 03:02:04 +00:00
Hai Zhang
1ad238f935 Add getDeclaredShareLibraries() for role qualification checking.
Bug: 124452117
Test: build
Change-Id: I13e4313c4ab5305335fc9490dfc58b03a24a86dd
2019-03-21 18:37:08 -07:00
wilsonshih
5db7b39dd8 Add Shell permission for CTS test.
Add Shell permission for new CTS tests to test the multi-display
functionality in WallpaperService/WallpaperManagerService.

Bug: 123707989
Test: atest WallpaperManagerMultiDisplayTests
Test: atest ActivityManagerMultiDisplayTests

Change-Id: Id97db050a0b9d1940c2dfaa793fbe526df578105
2019-03-22 09:13:10 +08:00
Mady Mellor
2c70987cce Remove the title API bc we don't use it
Fixes: 124909846
Test: atest BubbleControllerTest / atest NotificationTest
Change-Id: I087b1107e1a9a44ecadc3b4489bba1fe6db36ae6
2019-03-21 16:18:38 -07:00
Julia Reynolds
395bf70548 API council feedback for dnd
Test: cts
Fixes: 126726239
Change-Id: I864f8ea0c109e81c941cc3e2feb135e4c216a3f5
2019-03-21 14:53:12 -04:00
Sunny Goyal
c2baa4d724 Updating onLocation related APIs to onLaunchLocation as per API review
Bug: 126179809
Bug: 126180256
Test: everything compiles

Change-Id: I583f96bd5f5b5042131488a9ad5950cbad298071
2019-03-21 18:03:48 +00:00
Mady Mellor
989d897933 Merge "Documentation & refinements around BubbleMetadata#setIcon API" 2019-03-21 17:18:38 +00:00
Joe Onorato
324cb51012 Remove unnecessary called from system process warning.
This method takes the UserHandle, so we don't need to warn that the
system process is calling the method without UserHandle.

Test: treehugger
Change-Id: I68b0ffc75e11ee2d45faec510ea63e446830a378
2019-03-21 10:13:02 -07:00
Julia Reynolds
b4a9e9c8c6 Allow delegates to read target app notification channels
Test: cts, atest
Fixes: 128852206
Change-Id: I12ddfbdf6f520d29a8ea5fe8e0581bc425c1638b
2019-03-21 09:29:06 -04:00
Julia Reynolds
a5516ba016 Merge "Add the ability to turn off NAS capabilities individually" 2019-03-21 13:09:00 +00:00
Annie Meng
153edfc35e Merge "API Review: Make dataManagementLabel a CharSequence" 2019-03-21 10:17:09 +00:00
Po-Chien Hsueh
4e908c24ca API review followup: DynamicAndroidClient
Some API changes per API reivew:
- Move DynamicAndroidClient and ~Manager to android.os.image.
- Rename them to DynamicSystemClient and ~Manager.
- Rename permission MANAGE_DYNAMIC_ANDROID to MANAGE_DYNAMIC_SYSTEM
- Corresponding changes in the installation service.
- Corresponding changes in privapp-permissions-platform.xml.
- Add missing annotations.
- Change setOnStatusChangedListener's parameters order.
- Improve documentations.
- Re-generate api/system-current.txt.

Bug: 126613281
Test: adb shell am
Change-Id: Ia920e9ccf6de1dbbd38c52910cb72cb81b9b5b32
2019-03-21 17:25:59 +08:00
Mady Mellor
7af771a574 Update BubbleMetadata#setDesiredHeight to be in DPs
Also adds a method to set via res id as well.

Fixes: 127713900
Test: atest NotificationTest; manual - in test app set DP value
Change-Id: Ibc33fff6ca2115d703b0710ba512d98f89135cb2
2019-03-20 20:24:12 -07:00
Mady Mellor
9848a6c4a1 Documentation & refinements around BubbleMetadata#setIcon API
Also actually use the icon if we're provided it!

Test: atest NotificationTest
Bug: 128010752
Change-Id: Ide8bcf9af4ed687501afffeca4e9ccf84482042b
2019-03-20 20:10:46 -07:00
Jeff Sharkey
8c6eee1124 Merge "Implement dual-permission model for storage." 2019-03-20 23:49:08 +00:00
Sunny Goyal
11af969687 Updating the AppTarget API to use a builder for constuction
Bug: 124017728
Test: Everything compiles
Change-Id: I1c07a5dcf0483d014b8350a03ccce141405f6089
2019-03-20 11:03:43 -07:00
Rubin Xu
408b7eabef Improve javadoc
Change-Id: I9a957c162e72676b5ab863fcae40a3e3b412220a
Fix: 76202444
Fix: 79737644
Test: make ds-docs
2019-03-20 17:42:21 +00:00
Pavel Grafov
19a4fb3fe0 Make LSS report honest password quality to DPMS
Previously password quality would be promoted to whatever admin
has requested or depending on whether it was PIN or password.

Bug: 120536847
Test: manual, steps from b/123924734
Test: atest DeviceAdminHostSideTestApi24#testRunDeviceOwnerPasswordTest
Test: atest MixedManagedProfileOwnerTest#testResetPasswordWithToken
Test: atest com.android.cts.devicepolicy.PasswordComplexityTest
Test: atest PasswordMetricsTest
Change-Id: I51ca2d327f4c6db8f74c0b0ec35e4a3a346a9b5c
2019-03-20 15:53:02 +00:00
Svet Ganov
8e5bf968c1 Fix reading app ops data - framework
There was an optimized code path that is hit if the op
has not been accessed that does not write the uid state
information which did not add the closing tag which
resulted in producing a malformed XML.

Test: atest android.app.appops.cts.AppOpsTest#testNonHistoricalStatePersistence

bug:128872367

Change-Id: Iaddcce09b41f3e124e1838b65731d8dac9ca64e3
2019-03-20 15:12:23 +00:00
Julia Reynolds
ad6dd3575c Add the ability to turn off NAS capabilities individually
Test: atest
Bug: 127825514
Change-Id: Ic59e4be40ec71c70703eacf004ef32333e3356c9
2019-03-20 09:09:56 -04:00
Annie Meng
4eb4efc466 API Review: Make dataManagementLabel a CharSequence
Make the data management label a CharSequence for the system APIs:
- BackupManager#updateTransportAttributes
- BackupManager#getDataManagementLabel
- BackupTransport#dataManagementLabel

Renames dataManagementLabel -> dataManagementIntentLabel to change
return type

Removes getDataManagementLabel AIDL method as usages converted to use
"forUser" version in topic CL.

Bug: 113856654
Test: 1) atest RunBackupFrameworksServicesRoboTests
2) atest BackupManagerTransportAttributesHostSideTest
3) atest $(find \
frameworks/base/services/tests/servicestests/src/com/android/server/backup \
-name '*Test.java')
4) Manual: boot and verify transports registered properly using old API;
Modify LocalTransport to use new API, verify success

Change-Id: Ia48017156debe0a29684909f58927fa1fbf972f9
2019-03-20 12:13:10 +00:00
Narayan Kamath
3f95d3bc24 Merge "Require a foreground service of a specific type to start media projection." 2019-03-20 10:18:05 +00:00
Nadav Bar
66a2bdb3a5 Merge "Grant record audio permission to SystemCaptionsService instead of ContentCaptureService" 2019-03-20 08:00:52 +00:00
Brad Stenning
fbc4c76b24 Merge "Updates isKeyguardSecure to take in a user id." 2019-03-19 18:52:00 +00:00
TreeHugger Robot
90088bb8d1 Merge "No need for getProfileOwnerForUser as SystemApi" 2019-03-19 17:35:11 +00:00
TreeHugger Robot
6d15a88107 Merge "Add Nullability annotations for Notification.Action.Builder methods." 2019-03-19 16:57:42 +00:00
Kiyoung Kim
5636c3f3ca Merge "Mark product apks as unbundled" am: 856ef55672 am: 716111d81c
am: e1e02641af

Change-Id: I2b8497140c4ba063a09617ee866c89459fe8918a
2019-03-19 07:44:54 -07:00
TreeHugger Robot
0a96038c85 Merge changes I7bf9bde4,I8d655d1c,Ibc59aa36
* changes:
  Adds class and method documentation in all app prediction classes
  Link Intent.EXTRA_SHORTCUT_ID to ACTION_SEND Intent
  Change ShortcutInfo.Builder.setLongLived to take a boolean
2019-03-19 14:22:28 +00:00
Kiyoung Kim
716111d81c Merge "Mark product apks as unbundled"
am: 856ef55672

Change-Id: I9d4d7cf2ae8e47c8aaed82d0d47861cd7d787067
2019-03-19 07:17:53 -07:00