Commit Graph

5963 Commits

Author SHA1 Message Date
Calin Juravle
ed54b41e3c Merge "Handle configuration splits when creating the class loader context" into oc-mr1-dev 2017-09-08 21:55:28 +00:00
Calin Juravle
da09815e2c Handle configuration splits when creating the class loader context
Configuration splits have no dependencies which can lead to exceptions
when computing their class loader context.

In general, we do not need to compute the class loader context for apks
without code.

This CL addresses the issue by ignoring "code" paths with no actual code.

Bug: 65159159
Test: adb install-multiple config_splits
      runtest -x
services/tests/servicestests/src/com/android/server/pm/dex/DexoptUtilsTest.java

Change-Id: Ida1eb901eecba4a4266de73022f6ee4659367873
2017-09-06 23:31:53 -07:00
TreeHugger Robot
8bb58a145c Merge "Add internal implementation for notifyPackageUse" into oc-mr1-dev 2017-09-05 16:28:13 +00:00
Todd Kennedy
df113c36a7 Add internal implementation for notifyPackageUse
We have checks that prevent applications from modifying the usage
times of instant apps [and vice versa]. However, it's critical for
internal components such as the ActivityManager to be able to upate
this for all packages. Add an internal implementation of this
method that skips the checks.

Change-Id: Ib890296065024104cdaf7c8d64a5a7583d9062c1
Fixes: 65228752
Test: Manual. Run an application installed as an "instant app" and notice the usage time goes up
2017-08-31 16:10:29 -07:00
Yohei Yukawa
8f272178a0 Fix wrong dump output of *Info#flags
This CL follows up to a previous CL [1] that introduced an ability to
control filtering level of
 - ActivityInfo#dump()
 - ApplicationInfo#dump()
 - ComponentInfo#dump()
 - ProviderInfo#dump()
 - ResolveInfo#dump()
 - ServiceInfo#dump()
but also masked following outputs as an unexpected side effect.
 - ActivityInfo#flags
 - ApplicationInfo#flags
 - ProviderInfo#flags
 - ServiceInfo#flags

With this CL, above *Info#flags are correctly dumped again.

 [1]: I0d01565babb87e68b840c9756a2ea730d699efc7
      6ac42aeed9

Test: Manually tested as follows.
 1. make -j SoftKeyboard
 2. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
 3. adb shell dumpsys input_method
    -> Check 'com.example.android.softkeyboard' section
      -> make sure ServiceInfo#flags=0x0
      -> make sure ApplicationInfo#flags=0x38a8be44
           FLAG_HAS_CODE (1<<2)
           FLAG_ALLOW_CLEAR_USER_DATA (1<<6)
           FLAG_SUPPORTS_SMALL_SCREENS (1<<9)
           FLAG_SUPPORTS_NORMAL_SCREENS (1<<10)
           FLAG_SUPPORTS_LARGE_SCREENS (1<<11)
           FLAG_RESIZEABLE_FOR_SCREENS (1<<12)
           FLAG_SUPPORTS_SCREEN_DENSITIES (1<<13)
           FLAG_ALLOW_BACKUP (1<<15)
           FLAG_SUPPORTS_XLARGE_SCREENS (1<<19)
           FLAG_STOPPED (1<<21)
           FLAG_SUPPORTS_RTL (1<<22)
           FLAG_INSTALLED (1<<23)
           FLAG_FULL_BACKUP_ONLY (1<<26)
           FLAG_EXTRACT_NATIVE_LIBS (1<<28)
           FLAG_HARDWARE_ACCELERATED (1<<29)
Fixes: 65057767
Change-Id: Icd1e18237e873844791ccdea7f424b6fe76137c0
2017-08-31 15:24:48 +00:00
Svetoslav Ganov
25e5a3446e Merge "Grant location to default launcher" into oc-mr1-dev 2017-08-29 00:47:25 +00:00
Svet Ganov
5bb6bc6e52 Grant location to default launcher
Test: updated DefaultPermissionGrantPolicy test which passes

bug:62959599

Change-Id: Ifaac04758348049dd170a7e7b7ac234dced5f759
2017-08-28 15:12:05 -07:00
TreeHugger Robot
d1736cb2a7 Merge "Update FEATURE_VULKAN_HARDWARE_COMPUTE documentation" into oc-mr1-dev 2017-08-25 01:50:38 +00:00
Jesse Hall
54fc609183 Update FEATURE_VULKAN_HARDWARE_COMPUTE documentation
Now that VK_KHR_variable_pointers is public, the documentation can be more
precise about the definition of FEATURE_VULKAN_HARDWARE_COMPUTE level 0.
Also document the maxPerStageDescriptorStorageBuffers requirement.

Bug: 34745152
Test: make docs
Change-Id: I0f6c088488243e4daea589d4771d10a8714f7441
2017-08-24 10:23:27 -07:00
TreeHugger Robot
afe28cdf7e Merge "StringParceledListSlice throws exception when the IPC memory threshold is exceeded" into oc-mr1-dev 2017-08-24 10:08:15 +00:00
TreeHugger Robot
ee580764ad Merge "Use all certs for computing package signing sha256" into oc-mr1-dev 2017-08-23 22:51:41 +00:00
Svetoslav Ganov
cdd685c075 Use all certs for computing package signing sha256
In several places we compute the sha256 of the app's signing certificate
(instant cookie storage, backup account permission grants, static shared
lib matching). It is possible that an app is singed with multiple certs
which unfortunately can appear in a random order. We were using only the
first certificate to compute the hash which may be problematic for apps
signed with multiple certs which are later reordered. If an app update's
certs are reordered for cookie storage the app would not be able to
access the cookie, for account grants the app would not get the grant,
and for shared libs the app would fail to install due to a missing lib.

Test: all cookie CTS tests pass
      all static shared lib CTS tests pass
      added test that cookie data not lost on sha256 computation change
      added test that lib install works when specifying
      multiple certs

bug:64270295

Change-Id: Ib6b55f25da735ff5c2762faf6e9b5888e749041d
2017-08-23 11:47:27 -07:00
Alexandru-Andrei Rotaru
b7a79b47cb StringParceledListSlice throws exception when the IPC memory threshold is exceeded
Fixed the code such that list of strings that exceed the 256KB limit can
be transfered.
Bug: 64833731
Test: Added unit test in ParceledListSliceTest

Change-Id: I4e16708010125a444baa8fcb0af6101dc643cd38
(cherry picked from commit 2682fa7067)
2017-08-23 10:07:28 +00:00
Todd Kennedy
e4de49140d Merge "Only log resolution when starting activities" into oc-mr1-dev 2017-08-22 23:00:58 +00:00
TreeHugger Robot
e391175330 Merge "Allow clearing instant app meta-data" into oc-mr1-dev 2017-08-22 22:49:03 +00:00
Svet Ganov
f935a70398 Allow clearing instant app meta-data
The package manager has an API to clear the data of an app
which does not work for uninstalled instant apps for which
we store some meta-data (icon, title, cookie). This change
allows clearing the data of an uninstalled instant app.

Test: Instant cookie CTS tests use this API

bug:64517837

Change-Id: Ia929fead71b5ae786e88ddd0fa8e8a490d970dd0
2017-08-22 12:22:38 -07:00
Todd Kennedy
6ebabca547 Only log resolution when starting activities
Change-Id: I406af40953f3d6ade39e1bab18a35c534e308f3e
Fixes: 63804529
Test: Manual. Query web intent, notice no logs are emitted
Test: Manual. Start activity via web intent, notice logs are emitted
2017-08-22 10:02:12 -07:00
Bryce Lee
1327cdc53d Merge "Don't resume activity if user is locked and encryption is unsupported" into oc-mr1-dev 2017-08-18 21:33:46 +00:00
Makoto Onuki
48e931659f Avoid potential reboot loop due to package cache
Bug: 64295061

Test: Boot (write package cache) and reboot (read package cache)
Change-Id: I5de712c9666bac71ff6121001163ebc90c4b62d0
2017-08-18 11:00:19 -07:00
Bryce Lee
8558ec7dbe Don't resume activity if user is locked and encryption is unsupported
Previously we were not checking if to see if this condition was met
when determining the top running activity. As a result we could get
in a loop where we force stop the process since the app doesn't
support encryption yet try to start it again due to the
ActivityRecord being on top.

This changelist addresses the issue by checking this condition when
determining whether it is okay to show.

Change-Id: I868f97ce8b3ea4220019b8570407e33f27ea88bc
Fixes: 64259425
Test: go/wm-smoke
2017-08-17 15:37:26 -07:00
Kevin Hufnagle
9c43a77971 Merge "docs: Updated ShortcutManager API reference guide." into oc-dev am: 80376a98a5
am: d6d6d2cf79

Change-Id: I63af60b006618bdd8bb74d351f9c17432f411b63
2017-08-16 19:16:10 +00:00
Kevin Hufnagle
d6d6d2cf79 Merge "docs: Updated ShortcutManager API reference guide." into oc-dev
am: 80376a98a5

Change-Id: Iae8814e722f7861ecd96980d16c06a676c6ad1dc
2017-08-16 19:01:36 +00:00
TreeHugger Robot
ef2e7d27ae Merge "Change protection level from ephemeral to instant" into oc-mr1-dev 2017-08-14 23:18:45 +00:00
TreeHugger Robot
d57287be19 Merge "Hide internal value" into oc-mr1-dev 2017-08-14 22:52:25 +00:00
Michal Karpinski
6135a26551 Add extra about SDK version that system restore happened from
to ACTION_SETTING_RESTORED intent

Test: manual (system restore from N-MR1 and O)
Bug: 64232609
Change-Id: I142df7acb11309bc4f5f185e45a1f91f86d0334a
2017-08-14 11:22:15 +01:00
Jeff Sharkey
c2e09129e0 Merge "Remove a bunch of deprecated @SystemApi." into oc-mr1-dev 2017-08-12 03:21:01 +00:00
Ian Pedowitz
4e9806c4b4 Revert "Time zone update API classes"
This reverts commit fe6ec56cce.

Fixes: 64606807
Test: Grab the cts binaries(android-cts.zip) from OC Release
Test: Extract and from android-cts/tools directory, launch ./cts-tradefed
Test: On the DUT with CL cherrypicked, run the below(will run this test on both abi's):
Test: run cts -m CtsPermission2TestCases -t android.permission2.cts.PermissionPolicyTest#testPlatformPermissionPolicyUnaltered --skip-connectivity-check --skip-preconditions --serial <device serial>
Test: android.permission2.cts.PermissionPolicyTest#testPlatformPermissionPolicyUnaltered doesn't fail for android namespace:android.permission.TRIGGER_TIME_ZONE_RULES_CHECK
Change-Id: I238e2b6fa7ce60e6a8cbfebcd13e5e4c596834af
Merged-In: I31b55e88072dd73055cb3d8cf252be6eac920322
2017-08-12 01:21:10 +00:00
Todd Kennedy
877e979b10 Hide internal value
Change-Id: I208b46fa3901e3fe9c1157d75898996024854f2f
Fixes: 62264034
Test: Manual
2017-08-11 22:04:02 +00:00
Todd Kennedy
c247fa1366 Change protection level from ephemeral to instant
Change-Id: If4b01e5f0728f1d1d7e6903b362dcbedc67a9b3f
Fixes: 62264194
Test: Manual. install an instant app and see that it still works
2017-08-11 22:02:29 +00:00
TreeHugger Robot
6561f067bb Merge "Promoting installExistingPackage to SystemApi" into oc-mr1-dev 2017-08-11 21:56:59 +00:00
TreeHugger Robot
3df6be7875 Merge "Reland: PackageManager: update documentation for FEATURE_WIFI_PASSPOINT" into oc-mr1-dev 2017-08-11 21:28:00 +00:00
Jeff Sharkey
8478911f5e Remove a bunch of deprecated @SystemApi.
Verified that nobody should be using these APIs, and they've been
deprecated long enough that we can remove them.

Bug: 62341924, 62263907, 62264550
Test: make -j32 update-api && make
Change-Id: I9a2333ca13e4984b71374aa7ffed081e5106c67e
2017-08-11 14:45:47 -06:00
Jeff Sharkey
5cb2d64b9b Merge "Fix handling of @removed APIs." into oc-mr1-dev 2017-08-10 15:18:58 +00:00
Narayan Kamath
af706b40de Merge "PackageParser: Parse android:classLoader during the full parse." into oc-mr1-dev 2017-08-10 11:04:40 +00:00
TreeHugger Robot
c75f43c1ab Merge "Go: add features for low ram / normal ram devices." into oc-mr1-dev 2017-08-10 04:35:09 +00:00
Dianne Hackborn
2a103f126f Go: add features for low ram / normal ram devices.
Automatically populated from ActivityManager.isLowRamDevice().

Test: manual

Change-Id: I027b8ae0205c9793a91ffdd2635479610a62aff9
2017-08-09 17:14:00 -07:00
Garry Boyer
478f94ba7f Merge "Revert multi-package APK flag to off." into oc-mr1-dev 2017-08-09 23:24:28 +00:00
Jeff Sharkey
f52db085e2 Fix handling of @removed APIs.
The @removed docs tag means that a particular API should be considered
as removed from the API surface area that it otherwise would have been
exposed through.

This set of CLs is fixing a bug where we @removed had been treated as
always removing from the public API.

Bug: 62341924
Test: make -j32 update-api
Change-Id: I336b2df4804e947a0b93a12269d6e7c5594eef7e
2017-08-09 09:18:20 -06:00
TreeHugger Robot
e551d361ac Merge "Allow applications to define failure handlers" into oc-mr1-dev 2017-08-09 14:55:09 +00:00
Narayan Kamath
96c11c58c9 PackageParser: Parse android:classLoader during the full parse.
There's no need to do this during a "lite" parse. Moreover, we don't
resolve resource references during a lite parse, which means that we
lose a lot of flexibility.

Test: CtsAppSecurityTestCases
Bug: 64339642

Change-Id: I7d02faab6bd226d96d63d2edd8c06b94e15e14ad
2017-08-09 15:32:00 +01:00
Sunny Goyal
07f41fb67e Promoting installExistingPackage to SystemApi
Bug: 38269105
Test: N/A
Change-Id: If45076b00e91cd4cc8a887b0f36d427d8a5cdaf3
2017-08-09 02:58:00 -07:00
TreeHugger Robot
a530d79209 Merge "Intern process names." into oc-mr1-dev 2017-08-09 01:10:03 +00:00
TreeHugger Robot
81021c77c8 Merge changes from topic 'ClosebySystem' into oc-mr1-dev
* changes:
  Allow to close session from wrong context.
  Prevent closing by prev owner after transfer.
  Revert "Revert session-transfer change"
2017-08-09 01:01:11 +00:00
TreeHugger Robot
6bf2990e28 Merge "Add virtual preload bit to ApplicationInfo" into oc-mr1-dev 2017-08-08 23:33:03 +00:00
Todd Kennedy
d0084f7583 Allow applications to define failure handlers
Fixes: 37956764
Test: Manual
Test: Create a test app with no handler, see it's not passed to the installer
Test: Create a test app with a handler, see it's passed to the installer
Test: Create a test app with multiple handlers, see one is passed to the installer
Test: Create a test app with a handler defined in a split, see it's not passed to the installer
Change-Id: Idfc3648154afca7ec300019d9695417274118d6f
2017-08-08 22:17:13 +00:00
Makoto Onuki
812d188afb Intern process names.
Bug: 62144301
Test: Boot and start random apps on a secondary user
Change-Id: I8a9b475410c52e1063cff5519b0297ad69dd7925
2017-08-08 14:58:48 -07:00
Todd Kennedy
5eb5a7db83 Add virtual preload bit to ApplicationInfo
Change-Id: I2735b3823a8709b2ffb65cc8085ffcd952d3e1f2
Fixes: 64205417
Test: Manual
Test: Create a sample app and install it as a normal app
Test: See that it returns 'false' for "isVirtualPreload"
Test: Create a sample app and install it as a virtual preload ["--preload"]
Test: See that it returns 'true' for "isVirtualPreload"
Test: Run sample apps after reboot and see they return the correct value
2017-08-08 13:50:07 -07:00
Philip P. Moltmann
7460c5917b Revert "Revert session-transfer change"
This reverts commit 9890f8b426.

Bug: 64467704
Test: cts-tradefed run singleCommand cts-dev -m CtsContentTestCases --test=android.content.pm.cts.InstallSessionParamsUnitTest
      cts-tradefed run singleCommand cts-dev -m CtsContentTestCases --test=android.content.pm.cts.InstallSessionTransferTest
Change-Id: I0cc7e1129d85e4d0de16ade44232a9bd381d6c04
2017-08-08 13:17:15 -07:00
Philip P. Moltmann
7bec053dff Merge "Revert session-transfer change" into oc-mr1-dev 2017-08-08 19:49:13 +00:00
Philip P. Moltmann
9890f8b426 Revert session-transfer change
This reverts:
5d74493f64
94deaf7725

Bug: 64467704
Test: none, 100% revert
Change-Id: I6534c19c594dadfa41457725988485a67f0ed45f
2017-08-08 11:04:56 -07:00