Commit Graph

6048 Commits

Author SHA1 Message Date
Steven Timotius
4346f0a15c Convert ActivityManager dumpsys to protobuf
Also adding ActivityInfo.RESIZE_MODE_RESIZEABLE to TestApi

Test: cts-tradefed run commandAndExit cts-dev --module CtsActivityManagerDeviceTestCases

Change-Id: I958aa155b266799840ece1ca07feed8593724449
2017-09-20 11:30:59 -07:00
Adam Bookatz
43b272e20c Merge changes I82fe220e,Iff324c73,I3bd73acd
* changes:
  indexed priority queue for AnomalyMonitor
  StatsCompanionService connection to Statsd
  Set up StatsCompanionService.java
2017-09-20 14:01:49 +00:00
Michael Wright
1985976b66 Improve WMP dumpsys readability.
It's hard enough to read bugreports without having to decipher all of
the various IntDef's littered around; let's go ahead and just translate
them to something readable.

Bug: 65563703
Test: adb shell dumpsys window policy
Change-Id: Iea6cd309eb3411a65e54217fef814a66107a8e31
2017-09-18 21:21:47 +01:00
Wale Ogunwale
0d5609ba8c Added WindowConfigurationProto and friends
Also added WindowContainerProto and ConfigurationContainerProto
Will be used by cts tests in upcoming CLs that replace StackId APIs.

Test: adb shell dumpsys window --proto
Bug: 64146578
Change-Id: Id6ca2a93e3d15ac696ab54cb241870e973985967
2017-09-18 07:23:23 -07:00
Svet Ganov
087dce20e3 Add new OEM permission flavor
The new OEM permission flavor of signature protected perissions
can be granted only to apps on the OEM partition if they are:

 1. Signed as the one declaring the permission

 2. The requesting app is on OEM partition of the system image and
    declares the permission used and the OEM explicitly granted this
    permission by adding an entry in /oem/permission/*.xml
    with the following format:

    <permissions>
        <oem-permissions package="foo.bar.baz">
            <permission name="android.permission.ACCESS_FOO" granted="true"/>
        </oem-permissions>
    </permissions>

All OEM permissions requested by any app on the OEM partition
must be declared granted or not to force the OEM making a well
though out explicit choice. If that condidtion is not met the
system server restarts - this prevents shipping a device with
OEM permissions for which no opition was explicitly expressed.

Normal apps requesting an OEM permission has no effect, i.e the
permission is only granted on a signature match.

Change-Id: I345bb0b56368ee03e4bd768faab540ee4e0571ae
Bug: 65497745
Test: Manual
2017-09-14 11:48:45 -07:00
Bookatz
9472641287 Set up StatsCompanionService.java
Introduces StatsCompanionService.java and sets it up as a system service.

This service is a helper for statsd. It will be responsible for setting
and cancelling alarms related to polling stats and anomaly detection.

It currently does not have selinux permission, so must be started
manually (or with selinux temporarily disabled).

Test: disable enforcing selinux, then set and cancel alarms and make
sure they work.

Change-Id: I3bd73acdd998ee424696cce40965134c14220d8f
2017-09-12 14:56:54 -07:00
Paul Duffin
0a22778237 Remove org.apache.http.legacy from bootclasspath
Updated data/etc/platform.xml to make the org.apache.http.legacy library
usable by applications. The runtime location of the
org.apache.http.legacy library is
/system/framework/org.apache.http.legacy.boot.jar not
/system/framework/org.apache.http.legacy.jar.

Stop removing org.apache.http.legacy from the required and optional
shared library lists and instead add it to the required list if it is
not present in either and the package is targeted at SDK
version <= O_MR1.

Bug: 18027885
Test: make FrameworksCoreTests, install and run
Change-Id: I686e3c20f5860e58825e1b88f220f9b8c335849c
2017-09-11 11:28:41 +01:00
Calin Juravle
acef92cde7 Merge "Handle configuration splits when creating the class loader context" into oc-mr1-dev am: ed54b41e3c
am: b2e1a3cbc2

Change-Id: I9c36d6cd44a6f65a3bbd6ea89f1f328e7fbfcfc6
2017-09-09 00:29:41 +00:00
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
Todd Kennedy
bdb4bc4fc0 Merge "Add internal implementation for notifyPackageUse" into oc-mr1-dev am: 8bb58a145c
am: ad64df2bac

Change-Id: I7fab82efe230dea393fa4b12c9c7ea71c44243fe
2017-09-05 17:00:43 +00: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
9402bb4994 Merge "Fix wrong dump output of *Info#flags" into oc-mr1-dev am: c4a8b3625b
am: edaa2ea5b7

Change-Id: I491132d3841b55d258fa9221467815fe7ef6f006
2017-08-31 15:45:40 +00: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
dd0f38c842 Merge "Grant location to default launcher" into oc-mr1-dev am: 25e5a3446e
am: 6da0a2b8a6

Change-Id: Icd2e83f4a8d3b4803d7d8e2b1cd9e8f836c9d46e
2017-08-29 01:19:55 +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
Jesse Hall
beaa76b8ad Merge "Update FEATURE_VULKAN_HARDWARE_COMPUTE documentation" into oc-mr1-dev am: d1736cb2a7
am: b02a9c862a

Change-Id: Icda42d11d0fc37da160f4fb92a8f6663c2e21fd5
2017-08-25 02:10:43 +00:00
TreeHugger Robot
d1736cb2a7 Merge "Update FEATURE_VULKAN_HARDWARE_COMPUTE documentation" into oc-mr1-dev 2017-08-25 01:50:38 +00:00
Garry Boyer
63431405de Merge "Remove child package max." 2017-08-24 22:28:15 +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
Svetoslav Ganov
4a82f72efe Merge "Use all certs for computing package signing sha256" into oc-mr1-dev am: ee580764ad
am: 58d7ef66c5

Change-Id: If59ded7ac42c8277d12b8f65865806e8ffb9f036
2017-08-23 23:35:25 +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
675e99ac6e Merge "Only log resolution when starting activities" into oc-mr1-dev am: e4de49140d
am: d10454ecc3

Change-Id: I179996d5c4b79b19fdacd08049ee5fdc047fe1bf
2017-08-23 01:01:14 +00:00
Svet Ganov
50f75df634 Merge "Allow clearing instant app meta-data" into oc-mr1-dev am: e391175330
am: a80370745b

Change-Id: I719169bc27017a8e8c4d6a858c14ca2a458acc95
2017-08-23 00:13:48 +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
TreeHugger Robot
25fd1afa7b Merge "StringParceledListSlice throws exception when the IPC memory threshold is exceeded" 2017-08-22 17:25:01 +00: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
Alexandru-Andrei Rotaru
2682fa7067 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 : b/64833731
Test: Added unit test in ParceledListSliceTest

Change-Id: I4e16708010125a444baa8fcb0af6101dc643cd38
2017-08-21 13:57:06 +01:00
Bryce Lee
96a91f11c1 Merge "Don't resume activity if user is locked and encryption is unsupported" into oc-mr1-dev am: 1327cdc53d
am: 004f9a3066

Change-Id: Ifcbb0d3fbde8f87052509d5ef0a0b57e013e2245
2017-08-18 21:55:35 +00: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
8ee6ecc1d0 Merge "Avoid potential reboot loop due to package cache" into oc-mr1-dev am: edda7ebdd9
am: 4558b89ca2

Change-Id: I0094396111cccaa5210252bbc2b9fa3eaa4d859a
2017-08-18 21:23:52 +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
Wale Ogunwale
822e512127 Introducing WindowConfiguration
Used to house configurations that don't affect resources and that
we don't want to communicate to apps, but need to be propagated
along side Configuration.

Test: bit FrameworksServicesTests:com.android.server.wm.WindowConfigurationTests
Test: adb shell am instrument -w -e package com.android.server.wm com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I97de3efbe6d5e1d3b07156a8cfbce9be5eae5cb5
2017-08-18 07:57:06 -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
be25fc4240 Merge "docs: Updated ShortcutManager API reference guide." into oc-dev am: 80376a98a5 am: d6d6d2cf79 am: 9c43a77971
am: 817b77489c

Change-Id: I62d190807c95e95848fef042ac2fe9c21193efeb
2017-08-17 00:49:26 +00: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
Garrett Boyer
b8a9351214 Remove child package max.
Any value we pick now is likely not to make any sense later.  Since devices
don't have any limit on the number of installed apps, and we're talking
about priv-apps here, a limit isn't necessary.

Test: Framework tests and on Pixel device.

Change-Id: I05b1edc0e96dd8ca2a16e8a542f302efb1dcf6f8
2017-08-15 09:35:10 -07:00
Todd Kennedy
9467febacf Merge "Change protection level from ephemeral to instant" into oc-mr1-dev am: ef2e7d27ae
am: a1f2f3eb7b

Change-Id: If8801cd35c71e35cbb11881dca18a58bab1b4aff
2017-08-14 23:48:21 +00:00
Todd Kennedy
4d725903ae Merge "Hide internal value" into oc-mr1-dev am: d57287be19
am: c25cb8f933

Change-Id: Ie0285e781f82ffe400dcedf1e853385d185b5327
2017-08-14 23:25:11 +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
10a23a69bb Add extra about SDK version that system restore happened from to ACTION_SETTING_RESTORED intent am: 6135a26551
am: 1a7a743fea

Change-Id: If9b944d16dfc297f8cd0a3eded191170fd278b90
2017-08-14 13:28:57 +00:00