Commit Graph

8074 Commits

Author SHA1 Message Date
Amith Yamasani
582bedd9d9 Merge "Expose BIND_NOT_PERCEPTIBLE service flag" into qt-dev am: 41d0b1abc8 am: 29c3068cb4
am: 6fb1afce50

Change-Id: Ie4b878d3fa6ae8c0619b10fe8d87a06c3b182ca4
2019-06-20 09:10:41 -07:00
Amith Yamasani
29c3068cb4 Merge "Expose BIND_NOT_PERCEPTIBLE service flag" into qt-dev
am: 41d0b1abc8

Change-Id: I209930a67dfc89cf4c5178ad21452e624122df7f
2019-06-19 22:53:06 -07:00
Amith Yamasani
5016a7891a Expose BIND_NOT_PERCEPTIBLE service flag
Using this flag when binding to a service will
allow the bound process to be held at a low
oom_adj of 250, so that it can be expunged to
reclaim memory if a more user-visible app needs
it.

Use for bindings such as job services and other
connections that the caller can easily recover
from and restart if necessary.

Adjust the lmk thresholds to use this oom_adj
as one of the levels, so they're killed before
perceptible apps (such as foreground services).

Bug: 135219821
Test: CtsAppTestCases
      Manually check notification listener oom_adj
      and dumpsys activity services output

Change-Id: I9f6d0891d842e4d12f7995b9b1a8f57b0903a16d
2019-06-19 14:40:57 -07:00
Kweku Adams
091fa30767 Remove @Deprecated && @removed package fields.
They were tagged as @removed in Nougat and Oreo.

Bug: 135214188
Test: Android builds
Change-Id: Id52c23d02e2c4b7781c9b138ac2cf29cbf70c09c
2019-06-17 16:25:51 -07:00
Narayan Kamath
4e68ac48ba Merge "Move legacy obb data migration to a handler thread." into qt-dev am: 6d371e092e am: 0794b46b43
am: 55e4fadccd

Change-Id: If91cbfd44196187a4b6ff97878bf4c8ef7dc5139
2019-06-13 02:45:02 -07:00
Narayan Kamath
55e4fadccd Merge "Move legacy obb data migration to a handler thread." into qt-dev am: 6d371e092e
am: 0794b46b43

Change-Id: I0b4bd3128c8dafbec78b739ba51921d03e50d0a1
2019-06-13 02:40:04 -07:00
Narayan Kamath
21ab5c0e34 Merge "Move legacy obb data migration to a handler thread." into qt-dev
am: 6d371e092e

Change-Id: I4505e845d2d85a5b8fd9f4c13c29f1ba5adcc690
2019-06-13 02:34:07 -07:00
Narayan Kamath
157dd1dc40 Move legacy obb data migration to a handler thread.
The operation can potentially take a long time to complete
depending on the volume of data to be copied, so move it off
the ActivityManager handler thread that needs to be available
for other operations.

Bug: 134570017
Test: manual; set a 1 minute sleep in migrate_legacy_obb_data.sh

Change-Id: I3d2c52e8b012ed71c53810e6919d11be9a97cc6c
2019-06-12 13:40:15 +01:00
Winson
01045f5d08 Merge "Expose PermissionManager as TestApi and fix SplitPermissionInfo equality" into qt-dev am: d703395fcb am: 7347c0f704
am: 02c612552f

Change-Id: I0e4fbc7d7c7e208d0eb7c029f5dc1ee57afd1ab0
2019-06-10 13:33:41 -07:00
Winson
02c612552f Merge "Expose PermissionManager as TestApi and fix SplitPermissionInfo equality" into qt-dev am: d703395fcb
am: 7347c0f704

Change-Id: If3f0a0e539ced53c291b67b2a750004583f26840
2019-06-10 13:28:35 -07:00
Winson
5d53d4b564 Merge "Expose PermissionManager as TestApi and fix SplitPermissionInfo equality" into qt-dev
am: d703395fcb

Change-Id: I10e09a0bc15d9f4782ac9d91878becb9046581c3
2019-06-10 13:22:46 -07:00
TreeHugger Robot
d703395fcb Merge "Expose PermissionManager as TestApi and fix SplitPermissionInfo equality" into qt-dev 2019-06-10 20:12:57 +00:00
Winson
f27394ee70 Expose PermissionManager as TestApi and fix SplitPermissionInfo equality
Bug: 129200416
Bug: 129200610

Test: atest SplitPermissionsTest

Change-Id: I98795944e6440e5b7ebba134bd7735a6f78ebc4f
2019-06-07 15:09:06 -07:00
Mårten Kongstad
5a4af40e45 Merge "OMS: add TEST_MAPPING" into qt-dev am: f49c18e1a9 am: 50c5ea184f
am: 66e4dd1649

Change-Id: I7693eb76b3440afb62c00f6d6ddcd1699c8a52a4
2019-06-06 14:10:36 -07:00
Mårten Kongstad
50c5ea184f Merge "OMS: add TEST_MAPPING" into qt-dev
am: f49c18e1a9

Change-Id: I159abb9b55a6885fcb3d28fe2fcc275cc632dd78
2019-06-06 13:54:59 -07:00
TreeHugger Robot
f49c18e1a9 Merge "OMS: add TEST_MAPPING" into qt-dev 2019-06-06 20:44:49 +00:00
Adam Bookatz
97aec9789d Merge "loadUnbadgedItemIcon doesn't crash from getUserIcon" into qt-dev am: 14a34b9efb am: aaa16c0734
am: 5429fd5e37

Change-Id: I345a035d702d699777f5a651664a8a9801ee68b8
2019-06-06 11:28:10 -07:00
Adam Bookatz
aaa16c0734 Merge "loadUnbadgedItemIcon doesn't crash from getUserIcon" into qt-dev
am: 14a34b9efb

Change-Id: I96167fe68786a5269d2178d74c3bb4ffa1afca1c
2019-06-06 11:05:58 -07:00
Tyler Gunn
306e9ee0a1 Merge "Update NEW_OUTGOING_CALL broadcast deprecation docs." am: f089867d9b am: 52f65867d2 am: 755f4a8345
am: a3afd26f9f

Change-Id: Id4cd261f7c6b6e9c21f6a4c626cb08f50e663fc0
2019-06-05 21:18:06 -07:00
Tyler Gunn
755f4a8345 Merge "Update NEW_OUTGOING_CALL broadcast deprecation docs." am: f089867d9b
am: 52f65867d2

Change-Id: Ia91a950690930329bc66427af7289ec6f9fc6f42
2019-06-05 20:28:36 -07:00
Bookatz
9313af68c2 loadUnbadgedItemIcon doesn't crash from getUserIcon
AppicationPackageManager.loadUnbadgedItemIcon would call
UserManager.getUserIcon if the icon was supposed to represent
switching to another the parent user (from a work profile).
However, that call requires extra permissions which may not be
available, which would cause a crash. The work profile doesn't
generally have permission to see the parent's icon, so rather
than showing the actual icon, a generic user icon is shown instead.

Bug: 134177607
Test: Manual confirmation: create a work profile and try to share a
picture (from Photos) to the personal profile.

Change-Id: Id79ca50b8e0a26593addbacf1a0ea709a2bc4da2
2019-06-05 03:03:24 +00:00
Treehugger Robot
f089867d9b Merge "Update NEW_OUTGOING_CALL broadcast deprecation docs." 2019-06-04 18:37:48 +00:00
Dario Freni
376c35b896 Merge "Verify staged APKs pre-reboot." into qt-dev am: e5e876265c am: f1d9180e68
am: 6a0bf91690

Change-Id: Ib5e770d018275ca332fc9a5b5ca38461e3635a66
2019-05-31 21:57:30 -07:00
Dario Freni
f1d9180e68 Merge "Verify staged APKs pre-reboot." into qt-dev
am: e5e876265c

Change-Id: Id30f05784a99abbe2a4d4d21c8fc9b04f2b61525
2019-05-31 19:16:16 -07:00
TreeHugger Robot
e5e876265c Merge "Verify staged APKs pre-reboot." into qt-dev 2019-06-01 00:25:51 +00:00
Gavin Corkery
e1c5497726 Merge "Perform user data back up in post install stage" into qt-dev am: 5b9e00273b am: 909ced209c
am: 86f9858534

Change-Id: I88cea0985a7cd13dbaf1768385a89e7ce2e038a6
2019-05-31 09:39:54 -07:00
Gavin Corkery
86f9858534 Merge "Perform user data back up in post install stage" into qt-dev am: 5b9e00273b
am: 909ced209c

Change-Id: Ie792af7ab6c1bf182eacb8fd402ab56741e6f897
2019-05-31 09:23:24 -07:00
Gavin Corkery
9b87b9a6dd Merge "Perform user data back up in post install stage" into qt-dev
am: 5b9e00273b

Change-Id: I7b45401aeaf34855921f25a2c00c9af1a1a25035
2019-05-31 09:18:06 -07:00
Gavin Corkery
5b9e00273b Merge "Perform user data back up in post install stage" into qt-dev 2019-05-31 16:10:13 +00:00
Dario Freni
f141aab4ed Verify staged APKs pre-reboot.
Test: adb install --staged file.apk on taimen-eng target; adb
install-multi-package file1.apex file2.apex file3.apk file4.apk
Test: atest StagedRollbackTest
Bug: 123753157
Change-Id: I41121b73c0db8ca55bafd2f57cba73bb3b940149
2019-05-31 14:55:08 +01:00
Gavin Corkery
ab5ee411e5 Perform user data back up in post install stage
Currently the backup of user data is done in the enable rollback stage,
during which there is no guarantee that the package being backed up is
not currently running. Moving the backup to the post install stage will
guarantee that the package is not running.

Test: atest RollbackTest
Test: atest StagedRollbackTest
Bug: 124032231
Change-Id: I4b42a0c5ade1645585d1d6f698637df950d05c72
2019-05-31 10:26:56 +01:00
Patrick Baumann
5624dd7e4c Merge "Fix install flag overlap" into qt-dev am: 8b486b7870 am: 153d00aecd
am: e1205980fe

Change-Id: I9a443248677e4ba67a4c89f157d1e94d47ec8b21
2019-05-28 18:08:43 -07:00
Patrick Baumann
153d00aecd Merge "Fix install flag overlap" into qt-dev
am: 8b486b7870

Change-Id: I21fb4641dd250680de5a97d7d9fc97e01d93565d
2019-05-28 17:58:40 -07:00
TreeHugger Robot
8b486b7870 Merge "Fix install flag overlap" into qt-dev 2019-05-29 00:45:21 +00:00
Mehdi Alizadeh
c265ac8604 Merge "Clone Persons field in ShortcutInfo only for app prediction" into qt-dev am: f1affe0d17 am: 8a10aa5321
am: 9a30a0ea39

Change-Id: I1ab0b622cd1aa1c2893b01f8fb242a0bcdad59be
2019-05-28 16:13:27 -07:00
Mehdi Alizadeh
8a10aa5321 Merge "Clone Persons field in ShortcutInfo only for app prediction" into qt-dev
am: f1affe0d17

Change-Id: Ib272836caee95f456ea90aa1774184ce889b6dac
2019-05-28 16:02:23 -07:00
Mehdi Alizadeh
f1affe0d17 Merge "Clone Persons field in ShortcutInfo only for app prediction" into qt-dev 2019-05-28 22:42:19 +00:00
Patrick Baumann
72a50878fe Fix install flag overlap
When INSTALL_ALL_WHITELIST_RESTRICTED_PERMISSIONS was added, its value
conflicted with iINSTALL_FORCE_VOLUME_UUID. A subsequent change added
INSTALL_ALL_WHITELIST_RESTRICTED_PERMISSIONS to all adb install
requests, resulting in all adb installs being force UUID installs and
thus breaking adoptable storage CTS. This change fixes that overlap.

Fixes: 133215060
Test: atest android.appsecurity.cts.AdoptableHostTest#testPackageInstaller
Change-Id: I8fbfcc0eea4f4447e4a446fe188b6edfc9cec0f6
2019-05-28 15:20:15 -07:00
Felipe Leme
0f8e034cab Merge "Made Context.CONTENT_CAPTURE_MANAGER_SERVICE visible for tests." into qt-dev am: 05ec93ebc9 am: a3e305d4fa
am: e6469dfc2a

Change-Id: I902e792e2d4696b94fd767e5b31e6f4c4bbcdb1f
2019-05-28 09:40:25 -07:00
Felipe Leme
a3e305d4fa Merge "Made Context.CONTENT_CAPTURE_MANAGER_SERVICE visible for tests." into qt-dev
am: 05ec93ebc9

Change-Id: I9f0be45afbe50ca609f62ee32238a21b7beea0ba
2019-05-28 09:29:59 -07:00
TreeHugger Robot
05ec93ebc9 Merge "Made Context.CONTENT_CAPTURE_MANAGER_SERVICE visible for tests." into qt-dev 2019-05-28 16:17:27 +00:00
Gavin Corkery
bda6221b45 Merge "Allow PackageManager to retrieve inactive/factory APEXs." into qt-dev am: aef1ff0571 am: 2676f10410
am: 9e69d3c0b8

Change-Id: Iad52bbdc37835364092c388d9112e60e559ec2a2
2019-05-28 01:48:16 -07:00
Gavin Corkery
2676f10410 Merge "Allow PackageManager to retrieve inactive/factory APEXs." into qt-dev
am: aef1ff0571

Change-Id: Ic9775129a2d2549861ffcaecee60ca73dfdaedbf
2019-05-28 01:38:11 -07:00
Mehdi Alizadeh
c60960278d Clone Persons field in ShortcutInfo only for app prediction
Persons field in ShortcutInfo should only be accessible when caller
has the MANAGE_APP_PREDICTIONS permission.

Bug: 123959894
Test: atest com.android.server.pm.ShortcutManagerTest1 \
  com.android.server.pm.ShortcutManagerTest2 \
  com.android.server.pm.ShortcutManagerTest3 \
  com.android.server.pm.ShortcutManagerTest4 \
  com.android.server.pm.ShortcutManagerTest5 \
  com.android.server.pm.ShortcutManagerTest6 \
  com.android.server.pm.ShortcutManagerTest7 \
  com.android.server.pm.ShortcutManagerTest8 \
  com.android.server.pm.ShortcutManagerTest9 \
  com.android.server.pm.ShortcutManagerTest10

Change-Id: I1908496dfbf9b11624b0746154bb5ea6f2d30c38
2019-05-27 13:36:42 -07:00
Gavin Corkery
ef441722c8 Allow PackageManager to retrieve inactive/factory APEXs.
Add functionality to ApexManager to filter the list of all APEX
packages in order to obtain lists of inactive or factory APEXs.
Expose this information to dumpsys.

Test: adb shell dumpsys package
Test: adb shell pm list packages -a --apex-only
Test: atest PackageParserTest
Bug: 123680735
Bug: 119767311
Change-Id: Id8ffe6320b55f647cdf550abfd6703cd868565ff
2019-05-25 19:03:51 +01:00
Brad Ebinger
c63f24acd0 Merge "Add CAPABILITY_EMERGENCY_PREFERRED in PhoneAccount" into qt-dev am: a105253ea8 am: f4e407d1d5
am: 608fd93f45

Change-Id: Ia961441fddbd9673967a7d95862dffff97d46513
2019-05-24 19:06:03 -07:00
Philip P. Moltmann
cc76f5e58a Merge "Merge "Make sure to always upgrade runtime permissions" into qt-dev am: 3fb12ba490" into qt-r1-dev am: d80e267260
am: 3d28c311bc

Change-Id: I7c50c3a615fcefbab937dfdc05392316d7a3e412
2019-05-24 17:33:15 -07:00
Hai Zhang
6138202937 Merge "Exclude packages that's not installed from the hash for role." into qt-dev am: c3c75a49ea am: 32765502da
am: c010d23232

Change-Id: I1461fca69a689020d3576a78a8e0433b2211a925
2019-05-24 17:20:23 -07:00
Brad Ebinger
608fd93f45 Merge "Add CAPABILITY_EMERGENCY_PREFERRED in PhoneAccount" into qt-dev am: a105253ea8
am: f4e407d1d5

Change-Id: I13501efa263ca10383c69747b244f49ed0c9ddfd
2019-05-24 12:03:23 -07:00
Tobias Thierer
845f848638 Reintroduce android.test.base for Android R apps targeting Android Q.
The change http://r.android.com/909093 to remove android.test.base
is currently only included for Android R builds. This means that
apps running on Android Q get android.test.base regardless of their
targetSdkVersion (including Q).

It is inconsistent to remove it for those same apps when running
on Android R. Therefore, this CL changes the conditional removal
code only remove android.test.base for apps targeting an SDK
version > Q.

Test: atest FrameworksCoreTests:android.content.pm.AndroidTestBaseUpdaterTest
Test: Manually checked that I was able to reproduce the issue before
      this CL but not afterwards
Fixes: 133396946

Change-Id: I2861035c51cbc1d843a3371828f7902bea83c7cc
2019-05-24 19:45:32 +01:00