Commit Graph

5882 Commits

Author SHA1 Message Date
Bryce Lee
5496cdd7f2 Merge "Do not report app bound differences as a Configuration change." into oc-dr1-dev am: 512e5d1b9b am: a9ba9c3ed6
am: 0ee2ac73e9

Change-Id: Ieeb3585bbb417283682b947bea481533ee4f796d
2017-07-26 16:46:42 +00:00
Bryce Lee
0ee2ac73e9 Merge "Do not report app bound differences as a Configuration change." into oc-dr1-dev am: 512e5d1b9b
am: a9ba9c3ed6

Change-Id: Iaa194f131f171d01854afdf4b07d7648c4f14964
2017-07-26 16:25:01 +00:00
Bryce Lee
512e5d1b9b Merge "Do not report app bound differences as a Configuration change." into oc-dr1-dev 2017-07-26 14:20:31 +00:00
Todd Kennedy
92f9f98ec0 Merge "compressed images on system partition" into oc-mr1-dev am: 94902c46ba
am: 513125a7e3

Change-Id: I9f51ddc342b92c4e8a0c82eac50433d7394118ed
2017-07-26 01:37:20 +00:00
TreeHugger Robot
94902c46ba Merge "compressed images on system partition" into oc-mr1-dev 2017-07-26 01:09:33 +00:00
Makoto Onuki
53a8bdbd13 Merge "Don't unbind from the sync adapter before cancelSync()." into oc-dr1-dev am: 906d8f57bf am: 5d26d8ab06
am: 380354dcd5

Change-Id: Ifecb3f446533ba44917d9a1361ad16a1a4447268
2017-07-25 23:35:21 +00:00
Makoto Onuki
5d26d8ab06 Merge "Don't unbind from the sync adapter before cancelSync()." into oc-dr1-dev
am: 906d8f57bf

Change-Id: Ied5b515396764d398807c4f945aaf55af87de03a
2017-07-25 22:58:23 +00:00
TreeHugger Robot
906d8f57bf Merge "Don't unbind from the sync adapter before cancelSync()." into oc-dr1-dev 2017-07-25 20:49:39 +00:00
Calin Juravle
7eb1eee0e3 Merge "Use the class loader context when optimizing secondary dex files" 2017-07-25 18:24:29 +00:00
Bryce Lee
600daddb67 Do not report app bound differences as a Configuration change.
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
2017-07-25 18:20:29 +00:00
Todd Kennedy
7c8addfef0 compressed images on system partition
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
2017-07-25 10:45:13 -07:00
Todd Kennedy
782ac9dd37 Merge "Add API for virtual preloads" into oc-mr1-dev am: be74124264
am: f35abca9a0

Change-Id: I5afa4315ece4c045aef50195f312eb706be64d91
2017-07-25 16:28:48 +00:00
TreeHugger Robot
be74124264 Merge "Add API for virtual preloads" into oc-mr1-dev 2017-07-25 16:13:08 +00:00
Todd Kennedy
78a72501af Add API for virtual preloads
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
2017-07-25 06:48:39 -07:00
Calin Juravle
3bec94d78b Use the class loader context when optimizing secondary dex files
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

Change-Id: I2486522fb811f9fc58a44b92642f43a41e7d5bac
2017-07-24 14:51:00 -07:00
Makoto Onuki
a1422523bc Merge "Don't keep parceled extras for history broadcasts." into oc-mr1-dev am: 4fdefef7a1
am: f880d1f9af

Change-Id: I269a85d171d636c4286b6ed4fdc3393e09c8162b
2017-07-24 18:07:58 +00:00
Makoto Onuki
4fdefef7a1 Merge "Don't keep parceled extras for history broadcasts." into oc-mr1-dev 2017-07-24 17:42:31 +00:00
Makoto Onuki
584f10e396 Merge "Persist/pacel # of periodic syncs properly." into oc-dr1-dev am: 5bbf44e715 am: 5eb5ec71fa
am: 6098a153e2

Change-Id: Ibe5deaaae3ccafef77eb8b1120222458d638bd5e
2017-07-22 01:10:26 +00:00
Makoto Onuki
5eb5ec71fa Merge "Persist/pacel # of periodic syncs properly." into oc-dr1-dev
am: 5bbf44e715

Change-Id: Icb54710f8a76f674c75c79e9992eb03264ff3142
2017-07-22 00:57:59 +00:00
TreeHugger Robot
5bbf44e715 Merge "Persist/pacel # of periodic syncs properly." into oc-dr1-dev 2017-07-22 00:45:24 +00:00
David Friedman
5a74b0c8db Merge "Docs: Updates guidance about using permissions when accessing OBB expansion files, Bug: 34273998 Test: Ran "make" to verify error-free building." into oc-dev am: e4d0557334 am: f20c492190 am: ff160ae465
am: bad118a0b4

Change-Id: I7ef10fb02fc2251123cafde32f83cacef0fce743
2017-07-22 00:05:03 +00:00
David Friedman
bad118a0b4 Merge "Docs: Updates guidance about using permissions when accessing OBB expansion files, Bug: 34273998 Test: Ran "make" to verify error-free building." into oc-dev am: e4d0557334 am: f20c492190
am: ff160ae465

Change-Id: I38aa24b225827f7a280f5fcd85c08a0424d10b06
2017-07-21 23:57:18 +00:00
David Friedman
93a1ab8ba1 Merge "Docs: Updates guidance about using permissions when accessing OBB expansion files, Bug: 34273998 Test: Ran "make" to verify error-free building." into oc-dev am: e4d0557334
am: f20c492190

Change-Id: I57da50e47d3fdfefa245baffdeaf16322b28fa30
2017-07-21 23:57:01 +00:00
Makoto Onuki
97f82f28da Don't keep parceled extras for history broadcasts.
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
2017-07-21 16:51:16 -07:00
David Friedman
f20c492190 Merge "Docs: Updates guidance about using permissions when accessing OBB expansion files, Bug: 34273998 Test: Ran "make" to verify error-free building." into oc-dev
am: e4d0557334

Change-Id: I931088e43f29707e1ab5d9764a06adbbe5af1d7e
2017-07-21 23:11:16 +00:00
David Friedman
e4d0557334 Merge "Docs: Updates guidance about using permissions when accessing OBB expansion files, Bug: 34273998 Test: Ran "make" to verify error-free building." into oc-dev 2017-07-21 23:01:56 +00:00
Makoto Onuki
fdc5723076 Persist/pacel # of periodic syncs properly.
(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
2017-07-21 15:30:35 -07:00
Makoto Onuki
6a6ae04bd2 Don't unbind from the sync adapter before cancelSync().
- Also remove the unused method from ISyncAdapter.aidl

Bug: 63773598
Test: Manual test
Change-Id: Ifb2fc520759e83ad961032f9e217100e038e1a8c
2017-07-21 11:44:00 -07:00
Philip P. Moltmann
468300fd7d Merge "Better translatable msgs for permission requests" 2017-07-20 14:58:53 +00:00
Calin Juravle
b6f844d28c Add a command line option to optimize individual splits
The new option is "--split SplitName" and applies to "adb shell cmd
package compile" command.

Usage example:
adb shell cmd package compile -m speed --split split_feature_a.apk
com.android.cts.classloadersplitapp

Bug: 38138251

Test: adb install-multiple CtsClassloaderSplitApp.apk
CtsClassloaderSplitAppFeatureA.apk CtsClassloaderSplitAppFeatureB.apk
      adb shell cmd package compile -m speed --split split_feature_a.apk
com.android.cts.classloadersplitapp
      check the status of split_feature_a
      runtest -x
services/tests/servicestests/src/com/android/server/pm/dex/DexoptOptionsTests.java

Change-Id: I579bb12fa6699f99cd3824f185bd9352fb8007c5
2017-07-19 15:04:48 -07:00
Calin Juravle
1d0e83d2ce Refactor the arguments passed to dexopt invocations
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
2017-07-19 14:58:27 -07:00
Dave Friedman
cfe508824f Docs: Updates guidance about using permissions when accessing OBB
expansion files,
Bug: 34273998
Test: Ran "make" to verify error-free building.

Change-Id: Ic2022bd8bd78e2f6077d6ee6807fbbda7214737a
2017-07-19 10:08:49 -07:00
Rob Carr
e75643d542 Merge "Fix rotation animation selection." into oc-dr1-dev am: cee8098178
am: 228571391e

Change-Id: Idd2a3c23233f0758cc96a55da97b99c6ee8a7c94
2017-07-18 20:01:05 +00:00
Rob Carr
cee8098178 Merge "Fix rotation animation selection." into oc-dr1-dev 2017-07-18 19:31:00 +00:00
Shubham Ajmera
0b1a7a35b5 Merge "Reduce app size by downgrading inactive apps" 2017-07-18 17:09:06 +00:00
Paul Duffin
e60bef0924 Merge "Separate android.test.mock classes from android.test.runner" 2017-07-18 13:11:18 +00:00
Robert Carr
427ba4ff55 Fix rotation animation selection.
The default manifest value needs to be unspecified, not rotate,
as rotate overrides the LayoutParams specified value.

Bug: 63151981
Test: Manual from bug. go/wm-smoke.
Change-Id: I2ad6e3fdd06eeef0166bbe09d07b57cc45ed6e50
2017-07-17 18:37:06 -07:00
Shubham Ajmera
246dccf932 Reduce app size by downgrading inactive apps
This will trigger when the device will have low space.
Active apps here refer to the apps which were either active
in foregrond or in background and also used by other packages.
Apps which are inactive for X days downgraded to verify. X is
determined by sysprop pm.dexopt.unopt_after_inactive_days

If the system properties are not set, no effect will take place.

The above operations will take place in background dexopt service.
If user uses the app again, it will again be speed-compiled when
background dexopt service starts next time.

Bug: 36598475
Test: manual
* Remove the check in the code that allows downgrade only when
  the space is low on the device.
* adb root
* Set pm.dexopt_unopt_after_inactive_days to 600
* Make sure the current time of the device is correctly set
* Install 2 non system apps - B, C
* Downgrade B to extract
* Upgrade a system apps to speed-profile - E
* Downgrade a system app to quicken - G
* adb shell cmd package bg-dexopt-job

Expected Results:
* Extract - B
* Verify - C
* There should not be any entries for apps E an G
  in dalvik_cache

Change-Id: I68f9f617d6722a7ba8b00aa2181cb38a165cfc51
2017-07-17 17:55:16 -07:00
Benjamin Miller
c956914d09 Merge "Docs-change: clarification of LauncherApps.getApplicationInfo()" into oc-dev am: d726ff988c am: 8322920a7c
am: eb3926819a

Change-Id: Ie1b099141194525571553f46f12d7fa0e305779d
2017-07-17 22:53:30 +00:00
Benjamin Miller
8322920a7c Merge "Docs-change: clarification of LauncherApps.getApplicationInfo()" into oc-dev
am: d726ff988c

Change-Id: I42a62feffca60e8beb75e991ea0b6545a2813233
2017-07-17 22:37:35 +00:00
Benjamin Miller
7afa84c373 Docs-change: clarification of LauncherApps.getApplicationInfo()
Staged at: go/dac-stage/reference/android/content/pm/LauncherApps.html#getApplicationInfo(java.lang.String, int, android.os.UserHandle)

Test: make ds-docs and output staged
Bug: 38024981
Change-Id: I9f256d675433457b7c85fa111ed87d1147f1f2bc
2017-07-17 18:35:38 +00:00
Paul Duffin
855d702cb7 Separate android.test.mock classes from android.test.runner
The android.test.runner library contained classes in the
android.test.mock. Those classes have been extracted into a separate
android.test.mock library but are still part of the android.test.runner
library. This change removes them from the android.test.runner library.

The PackageParser change ensures that applications which specify
<uses-library android:name="android.test.runner"/> still see the same
set of classes at runtime as they did before this change.

The logic for updating the Package to maintain backwards compatibility
was extracted into its own class for a number of reasons:
* PackageParser is already huge.
* It is easier to test in separate class.
* It reduces potential for conflicts.

Bug: 30188076
Test: cts/tests/signature/runSignatureTests.sh CtsAndroidTestRunnerCurrentApiSignatureTestCases
Change-Id: I19042b3f9ffff8bf0f8437db7bb8341c703e4244

Remove android.test.mock classes from android.test.runner

Bug: 30188076
Test: cts/tests/signature/runSignatureTests.sh CtsAndroidTestRunnerCurrentApiSignatureTestCases
Change-Id: I8ddbdb0bda7bef8858202bc085881af14d7f0c92
2017-07-17 15:25:04 +01:00
Makoto Onuki
aa6560c148 Two more numbers in the preload log
Bug 63136392
Test: Manual

Change-Id: I0fa1dffa80d4d06cbfc41e0b40ddce5d324052ec
2017-07-14 14:05:18 -07:00
Makoto Onuki
1480b67635 Better preload drawable logging
Bug 63136392
Test: Manual test

Change-Id: I8753b36f632cf2ff57a5ef28df29f3fc5657f607
2017-07-14 11:40:29 -07:00
Tomasz Wasilczyk
e83dbb90fa Merge "Publish new Broadcast Radio APIs." 2017-07-13 20:50:10 +00:00
Bryce Lee
8f18579afe Merge "Do not use rotation as indicator to relaunch from config change." into oc-dr1-dev am: fa62d79a02
am: b3d51770d1

Change-Id: I267b6be7a95c19b927e8ecb01e597342e6bee1d3
2017-07-13 18:47:11 +00:00
Bryce Lee
fa62d79a02 Merge "Do not use rotation as indicator to relaunch from config change." into oc-dr1-dev 2017-07-13 18:28:09 +00:00
Bryce Lee
90ab6ba03f Merge "Allow max aspect ratio to be specified by meta-data tag." into oc-dr1-dev am: a926dbf5d2
am: d0bc21efd5

Change-Id: Idf2bfb1d6c2b70a53ebe46df300be6fe3fce3258
2017-07-13 17:55:05 +00:00
Tenghui Zhu
cd2d38d65e Merge "Update the annotation for getAnimation" 2017-07-13 16:46:35 +00:00
Tomasz Wasilczyk
05392d6360 Publish new Broadcast Radio APIs.
Also, rename FEATURE_RADIO to FEATURE_BROADCASTRADIO.

Bug: b/34348946
Bug: b/63405337
Test: instrumentalization
Change-Id: Ibf5851a10b94f9e82db85f740fde6f28efe48666
2017-07-13 07:46:25 -07:00