Commit Graph

5884 Commits

Author SHA1 Message Date
Bryce Lee
84fa183e7d Merge "Remove rotation and app bounds from Configuration diff." into oc-dr1-dev
am: 5b76ce1b2b

Change-Id: Ibf899e9a08cdab31ae38897add813fc4c8089474
2017-07-28 21:28:05 +00:00
Bryce Lee
5b76ce1b2b Merge "Remove rotation and app bounds from Configuration diff." into oc-dr1-dev 2017-07-28 17:57:09 +00:00
Svetoslav Ganov
899f54da72 Report permission flags for all protections based on SDK am: adb8c522a8
am: 436b901dbb

Change-Id: Ibe7cecd60242f1895434d586af30c2081d451f0b
2017-07-28 16:59:55 +00:00
Svetoslav Ganov
436b901dbb Report permission flags for all protections based on SDK
am: adb8c522a8

Change-Id: Ia30269ec2097d5978ae3e0b3930a38b3f4441ea4
2017-07-28 16:42:59 +00:00
Bryce Lee
0e4a6dfb3f Remove rotation and app bounds from Configuration diff.
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
2017-07-28 07:49:01 -07:00
Svetoslav Ganov
adb8c522a8 Report permission flags for all protections based on SDK
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
2017-07-28 05:46:53 +00:00
Bart Sears
7a8044dc67 Revert "Report permission flags for all protections based on SDK" am: 784b56e1e6
am: 076d6f7669

Change-Id: I6034405a465919b5e4fc75b4eb109b6ae5259fe0
2017-07-28 05:29:23 +00:00
Bart Sears
076d6f7669 Revert "Report permission flags for all protections based on SDK"
am: 784b56e1e6

Change-Id: Ice7dde53c5613f48d013424a7e99203fd854e532
2017-07-28 05:17:52 +00:00
Bart Sears
784b56e1e6 Revert "Report permission flags for all protections based on SDK"
This reverts commit 852cf98cb8.

Change-Id: I62763bf85ec95a02a245c6b503aa34bb0e9d997a
2017-07-28 05:05:38 +00:00
Svetoslav Ganov
2dfbbb3aa4 Report permission flags for all protections based on SDK am: 852cf98cb8
am: 3cf283558a

Change-Id: Iba5b20a777e4cf8953b73e523f25175d7b274a34
2017-07-28 03:03:51 +00:00
Svetoslav Ganov
3cf283558a Report permission flags for all protections based on SDK
am: 852cf98cb8

Change-Id: I6e87c8f40fa466f2a50f41549be41ea4fb598824
2017-07-28 02:49:30 +00:00
Svetoslav Ganov
852cf98cb8 Report permission flags for all protections based on SDK
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
2017-07-28 01:46:04 +00:00
Todd Kennedy
2a896e9074 Merge "Add cross user permission checks" into oc-mr1-dev 2017-07-27 20:49:56 +00:00
Bryce Lee
d6a2ed194c Merge "Do not report app bound differences as a Configuration change." into oc-dr1-dev
am: 512e5d1b9b

Change-Id: If5c2ce81a92d751c3481d7613611b9373060f78a
2017-07-26 16:25:40 +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
TreeHugger Robot
94902c46ba Merge "compressed images on system partition" into oc-mr1-dev 2017-07-26 01:09:33 +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
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
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
Todd Kennedy
dbaef6dc62 Add cross user permission checks
Change-Id: I5d46248fafe52dea66a33c416fbe151776b73679
Fixes: 62348076
Test: Manual
2017-07-24 11:28:00 -07: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
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
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
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