Commit Graph

4944 Commits

Author SHA1 Message Date
TreeHugger Robot
a9da39cb64 Merge "Add wide color gamut and HDR resource qualifiers" 2017-01-20 04:10:04 +00:00
TreeHugger Robot
4c0659f531 Merge "Enable background restrictions" 2017-01-20 02:55:30 +00:00
Romain Guy
c9ba559021 Add wide color gamut and HDR resource qualifiers
Bug: 32984164
Test: Config_test, AaptConfig_test and aapt2_tests
Change-Id: Ie9c82bfe2d36b1d6180ee223250ab5bb2ce90dd4
2017-01-19 18:44:00 -08:00
TreeHugger Robot
a2b1774d75 Merge "Grant access to ephemeral metadata" 2017-01-20 01:23:36 +00:00
TreeHugger Robot
54df14956e Merge "Disable moving 3rd party apps to internal if not allowed." 2017-01-20 00:57:36 +00:00
Christopher Tate
42a386b771 Enable background restrictions
Apps that target O+ are always subject to background restrictions.
Legacy apps' background restriction is subject to the OP_RUN_IN_BACKGROUND
app op.

Apps with these properties are exempted from background restrictions:
  - persistent process
  - currently on the idle battery whitelist
  - global whitelist for things like bluetooth services

Bug 30953212

Change-Id: Icc19b2fbc05f40dcf8c3fc4abf718c373dc8d4f6
2017-01-19 16:23:02 -08:00
Yao Chen
022b8eaa1d Disable moving 3rd party apps to internal if not allowed.
ag/1633903 added config_allow3rdPartyAppOnInternal flag to specify
whether 3rd party apps are allowed on internal storage. We need to
respect the flag when moving apps between storages.

Bug: 30980219

Test: Added ApplicationPackageManagertest

Change-Id: I0f8e76467b5071d70f40da28c2087e689c049c06
2017-01-19 15:32:41 -08:00
Todd Kennedy
0e989d00ed Grant access to ephemeral metadata
When an ephemeral application explicitly accesses an
installed application, it grants access to its package
metadata. The ephemeral application effectively stays
hidden if it doesn't explicitly connect to any activity,
service or provider [i.e. implicit connections using
an ACTION_VIEW/CATEGORY_BROWSABLE intent will not expose
its metadata].

Bug: 34123112
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Change-Id: I7e1680902599b3ada0d4fba5998af30566017051
2017-01-19 15:26:21 -08:00
Adam Lesinski
8f3b174d90 Merge "Teach apps to refresh AppInfos without restarting" 2017-01-19 18:30:43 +00:00
Chris Tate
9e83cbbc10 Revert "Enable background restrictions"
This reverts commit 21f778060b.

Change-Id: I65586f9739da84fb32b51b0ea166b8288c41d1b3
2017-01-19 01:12:19 +00:00
Jeff Davidson
7414065c79 Merge "Add bindServiceAsUser(..., Handler) to ContextWrapper." 2017-01-19 00:36:07 +00:00
Sunny Goyal
6804d4de65 Merge "Adding support for apps to return PinItemRequest to launchers as a result of Intent.ACTION_CREATE_SHORTCUT" 2017-01-19 00:27:52 +00:00
Christopher Tate
21f778060b Enable background restrictions
Apps that target O+ are always subject to background restrictions.
Legacy apps' background restriction is subject to the OP_RUN_IN_BACKGROUND
app op.

Apps with these properties are exempted from background restrictions:
  - persistent process
  - currently on the idle battery whitelist
  - global whitelist for things like bluetooth services

Bug 30953212

Change-Id: Ib444829a2d222125f64ff19e8218823fa78373f9
2017-01-18 11:30:41 -08:00
Sunny Goyal
a6be88a10d Adding support for apps to return PinItemRequest to launchers
as a result of Intent.ACTION_CREATE_SHORTCUT

> Adding API to allow launchers to query shortcut config activities in
  managed profiles.
> Adding API to allow the default Launcher to start the shortcut config
  activity in managed profiles.
> Updating the ACTION_CREATE_SHORTCUT documentation to represend changes
  in the expected result.

Test: Manual tests and all the unit tests
adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
... to test10

Change-Id: I785c4f2fba782b864cc401ac7905330ea4498289
2017-01-18 10:26:51 -08:00
Mårten Kongstad
49a4a1dfce Teach apps to refresh AppInfos without restarting
Teach running applications to refresh already loaded ApplicationInfo
objects without resorting to restarting the application process.

Activities will be scheduled for restart via the regular life-cycle.
This is similar to a configuration change but since ApplicationInfo
changes are too low-level we don't permit apps to opt out.

This change is intended to be used with runtime resource overlays and
split APKs.

Test: Manual - command to update application via ActivityManagerShellCommand
Change-Id: Ice10a1691cced90eee95e3278fd784b8a9206d87
2017-01-17 13:08:05 -08:00
TreeHugger Robot
5471cfc750 Merge "Add doc to Configuration.setTo() method" 2017-01-17 19:21:26 +00:00
TreeHugger Robot
91f5cbf3a0 Merge "Add OFFSET and LENGTH args for paged queries." 2017-01-17 19:14:52 +00:00
Kang Li
0bf67a29d9 Merge "Adds annotations to Intent, and enables ChooserActivity to rank apps according to annotations." 2017-01-16 21:36:09 +00:00
Narayan Kamath
f5bda2874f Merge "PackageParser: Disable package cache on "eng" builds." 2017-01-16 13:28:49 +00:00
Bartosz Fabianowski
9e0642287e Merge "Add install reason" 2017-01-14 12:58:20 +00:00
Kang Li
9fa2a2cd46 Adds annotations to Intent, and enables ChooserActivity to rank apps
according to annotations.

Test: Unit tests and manul tests. More unit tests to be added.
Change-Id: I3cbfd0cc10007290585fa3e7e3c92e1731f1f7b8
2017-01-13 17:40:44 -08:00
Zak Cohen
9013325c3a Merge changes from topic 'vrmode'
* changes:
  Set ui mode in UiModeManagerService to vrheadset when VR mode is enabled.
  Introduce new UI_MODE_TYPE_VR_HEADSET and qualifier.
2017-01-13 23:15:00 +00:00
Chet Haase
d30149eeae Add doc to Configuration.setTo() method
Bug: 11187275
Test: doc fix only, no test
Change-Id: I121aa2e986dacbb794a26fdfba84f4f7b34bea86
2017-01-13 12:55:16 -08:00
Narayan Kamath
21a2838e34 PackageParser: Disable package cache on "eng" builds.
- Catch a wider variety of exceptions from the package parse
  stage. Ignore and delete the cache entry if we catch *any*
  exceptions from deserializing the parse result.

- Rename the system property pm.boot and not ro.boot, since the
  former needs less effort to change back and forth.

- Finally, add a heuristic to wipe caches on non-numbered
  userdebug builds when changes to the system partition are detected.

Also re-enable the cache by reverting commit
20274d15d8.

Test: Manual
Change-Id: I7b5b71ac60d8c438398c354be50b207e80550148
2017-01-13 16:09:05 +00:00
Bartosz Fabianowski
a34f53f61b Add install reason
This CL allows a reason to be specified when installing a package. The
install reason is a sticky piece of metadata: When a package is e.g.
installed via enterprise policy and an update is then manually
installed or sideloaded, the install reason will remain "policy."
The install reason is tracked separately for each user.

With this CL, two install reasons exist: "policy" and "unknown." Other
install reasons will likely be supported in the future.

Bug: 32692748
Bug: 33415829
Test: Tested manually with "adb install" / "adb uninstall"

Change-Id: I0c9b9e1b8eb666bb6962564f6efd97e41703cd86
2017-01-13 16:51:28 +01:00
Steve McKay
d7ece9f78d Add OFFSET and LENGTH args for paged queries.
Also update docs according to parting comments on ag/1726256.

Bug: 30927484
Test: Build and update api.
Change-Id: Ie0dd3ae06f6a7a20001571beec10a4d5bca63970
2017-01-12 17:33:49 -08:00
TreeHugger Robot
07323a9824 Merge "Add structured sort data to ContentResolver.query." 2017-01-12 22:21:53 +00:00
Jeff Sharkey
0078e1b777 Add support for fallback categories.
When an app doesn't define a category, look for a fallback category
in a hard-coded list.  This change only defines a fallback for a
single package, but device-specific overlays can be used to provide
more detailed fallback lists.

The precidence order is: app manifest > installer hint > fallback

Test: builds, boots, fallback categories work
Bug: 33815939
Change-Id: I1f5ca76fb7e5743a4500c0a1230a754266f34d9e
2017-01-12 09:53:44 -07:00
Jeff Sharkey
9bc89af3f1 Add API for apps to declare their "category".
Upcoming platform features need to cluster apps together into broad
categories to help summarize information to users.  (For example,
when presenting battery, network, and disk usage.)

We are tightly limiting the set of categories to keep them easily
presentable to users when summarizing information.  This feature is
not designed to be a general-purpose taxonomy, nor should it be
allowed to become one.

Older apps may not have defined a category in their manifests, so
allow the installing app to define a category on their behalf.

Test: builds, boots
Bug: 33815939
Change-Id: I785b882ee7c18072ef47d56e0fc19ad72888e1b7
2017-01-12 09:53:44 -07:00
Etan Cohen
7a36073c14 Merge "[AWARE] Unhide Wi-Fi Aware API (baseline)" am: dfe8f5dc13 am: 2a4e3bef2c am: b32dfa4ef5
am: 3fc5b186fa

Change-Id: Ib668ed15ccf1f05c5ed31f700b69e1f3ab8b4cac
2017-01-11 23:28:20 +00:00
Etan Cohen
3fc5b186fa Merge "[AWARE] Unhide Wi-Fi Aware API (baseline)" am: dfe8f5dc13 am: 2a4e3bef2c
am: b32dfa4ef5

Change-Id: If2a6b632cd03984921572b190745865953a8e808
2017-01-11 23:22:51 +00:00
Etan Cohen
b32dfa4ef5 Merge "[AWARE] Unhide Wi-Fi Aware API (baseline)" am: dfe8f5dc13
am: 2a4e3bef2c

Change-Id: I6f894d92451032657678639c3021eef07289a6a2
2017-01-11 23:17:19 +00:00
Steve McKay
29c3f68cfa Add structured sort data to ContentResolver.query.
Update DocumentsProvider to override
    ContentProvider#query(Uri, String[], Bundle, CancellationSignal);
Added an otherwise unneeded import to pass doc check
    on DocumentsProvider.

Bug: 30927484
Change-Id: I295c21f53901d567455286f22439f21d22a8a25a
Test: Build and run. Test from DocsUi.
2017-01-11 15:01:50 -08:00
Makoto Onuki
7f53ac1504 Merge "Expose getApplicationInfo(UserHandle)" 2017-01-11 21:56:24 +00:00
Makoto Onuki
458e54f00f Merge "@hide RetentionPolicy.SOURCE annotation" 2017-01-11 21:14:20 +00:00
Zak Cohen
1a6acdbb86 Introduce new UI_MODE_TYPE_VR_HEADSET and qualifier.
Bug: 30989383
Test: Unit test for aapt2
Change-Id: I66dc65af6327b94fed74538bee08cada0b8be4fa
2017-01-11 11:44:47 -08:00
Etan Cohen
6a4b323f08 [AWARE] Unhide Wi-Fi Aware API (baseline)
Baseline Wi-Fi Aware API providing discovery and connectivity (data-path).

Bug: 30983968
Test: unit tests + integration (sl4a) tests passing.
Change-Id: Idd7c6a625f168717b083d5f13e291ce916571933
2017-01-11 11:13:26 -08:00
Makoto Onuki
db3b10a95e Update the javadoc on requestPinShortcut() about multiple...
requests in a row form the same app.

Bug 34175917
Test: Javadoc change only; presubmit test.

Change-Id: Ibf33010dbd9080c557112e15efcadd30d95b121f
2017-01-10 15:43:20 -08:00
Makoto Onuki
f5663b13c5 @hide RetentionPolicy.SOURCE annotation
Bug 34094103

Test: Hiding an annotation only; "m".
Change-Id: I7e0bec077a96024744977147c4b15cf2e3a1f309
2017-01-09 14:09:56 -08:00
Jeff Davidson
6192bff1fc Add bindServiceAsUser(..., Handler) to ContextWrapper.
This was added to Context/ContextImpl but is missing from
ContextWrapper, which causes it to fail unless you're using a
ContextImpl directly.

Bug: 33057511
Test: Build/manual test in associated change from same topic
Change-Id: I84913614dad2cc22a70a4191c2512a44b1dc8834
2017-01-09 10:57:35 -08:00
Makoto Onuki
4f6b884f8a Expose getApplicationInfo(UserHandle)
Test: The method already available; just making it public.
Bug 33293439

Change-Id: Ic18eb254c185784ea9f16e0a8de6c62d6c1fe7bd
2017-01-09 10:30:57 -08:00
Jeff Sharkey
8d729e8c14 Merge "Initial API shape for storage statistics." 2017-01-07 16:18:38 +00:00
Stefan Kuhne
643ba812eb Merge "Apps which do not support density cannot be resized" 2017-01-07 01:35:02 +00:00
Makoto Onuki
9fd9019cf1 Revert "ShortcutManager: Floating shortcuts shouldn't have target activities."
This reverts commit 106ff7a0a1.

Test: All the unit tests (ShortcutManagerTest1*) CtsShortcutHostTestCases and CtsShortcutManagerTestCases

Change-Id: Iadce2b3785cbf728daa60c4e2ff103e516d85896
2017-01-06 11:17:08 -08:00
skuhne@google.com
7e85eb0278 Apps which do not support density cannot be resized
This is to prevent apps which do not support density
(so essentially pre-Doughnut) from being resized and / or
windowed in free form mode.

These apps are rendered into a smaller sized buffer and
then scaled onto the screen. Using freeform window mode with
these apps uncovered many different problems.

Bug: 33843467
Test: Pre-N as well as Pre-Doughnut applications are presented
properly in free form mode. (Pre-Doughnut cannot be windowed /
resized, many M apps can).
Change-Id: I3c0eb3681486dc85ace15955432d79200743bce3
2017-01-06 08:39:41 -08:00
Jeff Sharkey
e8cece9f20 Initial API shape for storage statistics.
This API is designed to provide both UID-level stats and overall
summary data for a given storage device, as identified by UUID.

The use of UID-level granularity might appear a bit clunky, but it
matches other usage statistics (such as network and battery), and it
allows us to implement it using an extremely fast quota kernel
feature.

A future CL will wire up the implementation to installd.

Test: builds, boots
Bug: 32206268
Change-Id: I7b51877682d0370c2402c19346f57809f0e7ac53
2017-01-05 15:39:16 -07:00
John Reck
874d45597f Merge "Workaround for custom TypedArray injectors" 2017-01-05 19:00:00 +00:00
Narayan Kamath
8af18a6fa3 Merge "PackageParser: Add serialization mechanism for parse results." 2017-01-05 09:55:40 +00:00
John Reck
abd917d139 Workaround for custom TypedArray injectors
Fixes: 33814858
Works around a crash for apps that inject custom
TypedArrays, which is completely unsupported, but
given the ease with which the crash can be worked
just going with higher compatibility on this one.

Test: App referenced in bug launches

Change-Id: Iac9a9b4fefd08815544211ffa49b02259920381f
2017-01-04 19:06:52 -08:00
TreeHugger Robot
243d13bd5c Merge "Require APK Signature Scheme v2 for ephemeral APKs" 2017-01-04 20:52:33 +00:00