... so that one package can supply the data and another one can issue
the commit.
Also allow reading of sealed sessions.
Also lock more in PackageInstallerSession so that we can be sure the
session is not used by the old package anymore once transferred and that
all calls into the session work on consistent data.
Bug: 37281396
Test: cts-tradefed run cts-dev -m CtsContentTestCases --test=android.content.pm.cts.InstallSessionTransferTest
Installed and uninstalled packages via the PackageInstaller app
Installed and uninstalled packages via the Google Play Store
Change-Id: Id4b7a0071d703b7d18c9f5bf2bd15ebf67086d07
The underlying session may have been destroyed before we go back to
read out the icon.
Test: builds, boots
Bug: 63795821
Change-Id: I16eb32c74a0e3b1d0605392878d65f28437006a6
Log time it takes to parse a package (parse=) and update the cache
(update_cache=), if time exceeds 100ms threshold.
This can be useful for analyzing bugreports of slow PM init post-OTA.
Test: manual
Bug: 62462279
Change-Id: I4099b21fae6a5db8c8f1cbc2147a33b9ee51767a
Since appBounds encodes both dimensions and positions, movement will
cause a diff change. This happens in situations where the dimensions
stay constant, such as dragging a PiP window around.
To avoid flooding the client side with configuration changes, this CL
checks whether the new configuration is equivalent to the existing
configuration with the exception of the position of the appBounds
before sending to the registered callbacks.
Change-Id: I8fbc94458fd9ed3b39494c3587f25e704ec02a7d
Fixes: 63927944
Test: bit FrameworksServicesTests:com.android.server.wm.AppBoundsTests
Test: go/wm-smoke
The presence of these new flags leads to issues with application that
do not expect their presence. Since these flags can appear at
critical times, such as on orientation change, these issues are
brought to the surface often.
This CL remedies this problem by first removing the rotation
property. It is not used and the original issue of orientation and
Configuration alignment has been addressed. For app bounds, the CL
reverts the behavior back to identifying diffs as a screen size
change.
Fixes: 64004417
Test: bit FrameworksServicesTests:com.android.server.wm.AppBoundsTests
Test: go/wm-smoke
Change-Id: I1fabb564dfb5c13d897336708523cf7cd5099fa0
We added a couple of protection flags that also apply to
normal and dangerous permissions. These flags are folded
in the protection level breaking apps that directly and
compare against the protection constants. Apps that target
older than O SDK don't get protection flags folded into
the protection level.
Test: All permission tests pass
Added a new test to ensure no protection flags reported
for normal and dangerous permissions
Change-Id: I87b10a7695d8ecfa7156525d6f3d101fc0639513
bug:62755026
We added a couple of protection flags that also apply to
normal and dangerous permissions. These flags are folded
in the protection level breaking apps that directly and
compare against the protection constants. Apps that target
older than O SDK don't get protection flags folded into
the protection level.
Test: All permission tests pass
Added a new test to ensure no protection flags reproted
for normal and dangerous permissions
bug:62755026
Change-Id: I72547b0146e6b6919803e33ff64b7208c4a255ad
Record the class loader context for secondary dex loads and pass it to
dexopt during compilation.
The class loader context is passed from libcore every time a
BaseDexClassLoader is created and its recorded in the package dex usage
file.
Note that the context may be:
- unknown: if the dex file was not use after the the upgrade and its
context was not yet updated
- unsupported: if any of the class loaders from the loading context is
unsupported (only PathClassLoader and DelegateLastClassLoader are
supported).
- variable: if it changes over time, form one run to another.
In all the above cases the old compilation behavior is preserved for
now.(i.e. the dex file with be compiled with SKIP_SHARED_LIBRARY_CHECK)
Bug: 38138251
Test: runtest -x
services/tests/servicestests/src/com/android/server/pm/dex/
adb shell cmd package compile -f -m quicken ^Csecondary-dex
com.google.android.gms
(cherry picked from commit 3bec94d78b)
Change-Id: Ie8b78c7c0d5de43733b3d116f8dcb3a65324cca8
App bounds are an internal Configuration field and should not
influence the diff that determines whether the Configuration has
changed. This changelist ensures this by introducing a new flag that
is identified server side and filtered before informing the client
that the configuration has changed.
Change-Id: Ibf1387f73eaa9b39e6213e1a1109c4cd57554e7c
Fixes: 63927944
Test: bit FrameworksServicesTests:com.android.server.wm.AppBoundsTests#testAppBoundsConfigurationDiff
Test: go/wm-smoke
Change-Id: I43c8c331883b5b381fb0f133fff448f3a57d0fe5
Bug: 36446542
Test: Manual
Test: Create a stub and a compressed application; put on the /system partition
Test: Restart the system and see that it decompresses the full application onto the /data partition
Test: Restart again and see that we skip decompression
Test: Create an invalid compressed application [eg. empty file]
Test: Restart the system and see that the stub is disabled
Test: Restart again and see that we skip decompression
Virtual preloads are applications that aren't actually on the
/system partition, but, act as if they were. One such distinction
is that these apps receive Intent.ACTION_BOOT_COMPLETED and start
out of the stopped state.
Change-Id: I812d3e7008b9d87e84aa33dbc4b3d8e8b334533c
Fix: 34855677
Test: Manual
Test: Install an app with "--preload"
Test: See that it receives Intent.ACTION_BOOT_COMPLETED
On dumpsys we do show history broadcast intents with extras, but
if an intent's extras are still parceled, we can't show anything
(but the length) anyway, so let's just remove them, because sometimes
they contain heavy objects such as bitmaps.
Bug: 62144301
Test: manual tests: Boot, add account start apps, insert SIM
Change-Id: Ia64dd46d66fba3098e32c435509f4940ae978710
(Note it shouldn't be persisting parceled data in the first place. There's
already a bug filed for that.)
Bug 63935632
Test: manaul test
Change-Id: I5385caa6cd0663c7e13db0256b2c1027abe6c3a1
Wrap the arguments passed to the various performDexopt calls into the
DexoptOptions object.
This will make adding extra arguments (like compile only a split) much
easier and avoid extending quite a few internal methods.
Bug: 38138251
Test: adb shell cmd package compile ....
adb shell cmd package bg-dexopt-job ...
install new apps and check that they compiled
runtest -x
services/tests/servicestests/src/com/android/server/pm/dex/DexoptOptionsTests.java
Change-Id: Ia9930edd2dceb7535d6168eceb8e3199c82b6306