Commit Graph

4121 Commits

Author SHA1 Message Date
Makoto Onuki
5b9d876ef5 Merge "ShortcutManaegr: bug fixes" into nyc-mr1-dev 2016-05-04 21:28:17 +00:00
Makoto Onuki
8569452603 ShortcutManaegr: bug fixes
Fixes 28590035
Fixes 28586105

Change-Id: Ia11d29e4996ad5b47b279a3c04d9586695cdc0a5
2016-05-04 13:00:41 -07:00
TreeHugger Robot
221c6e6db7 Merge "Fix ClipData JavaDoc and behavior that contradicts JavaDoc" into nyc-dev 2016-05-04 17:07:13 +00:00
Vladislav Kaznacheev
f67661cc7a Fix ClipData JavaDoc and behavior that contradicts JavaDoc
1. Expand JavaDoc for ClipData.addItem to clarify how MIME types are affected.
2. Add "text/uri-list" to MIME type list only for non-content URIs (as JavaDoc explicitly says).

Bug: 28564003
Change-Id: I074daf34310323725690a9ba2c7dff0542ed6349
2016-05-03 16:48:24 -07:00
TreeHugger Robot
77843a4213 Merge "Fix typos in ClipData JavaDoc" into nyc-dev 2016-05-03 19:28:32 +00:00
Vladislav Kaznacheev
7e4669c5a6 Fix typos in ClipData JavaDoc
Also removed the obsolete text regarding iconic representation
and fixed some whitespace.

Bug: 28536304
Change-Id: I55ca681b86a121018903a41fff228e7c6126c7e7
2016-05-03 10:09:06 -07:00
Makoto Onuki
7d164d35a4 Merge "ShortcutManager: finishing touches" into nyc-dev 2016-05-03 16:27:46 +00:00
Svetoslav Ganov
d4d1512b64 Merge "Disable unused features" into nyc-dev 2016-05-03 01:37:01 +00:00
Svet Ganov
a7532cfa46 Disable unused features
The multi-package APKs feature was not validated and is now disabled.
Also the ephemeral work was postponed which requires disabling of the
ephemeral cookie APIs.

bug:28514747

Change-Id: Iab7f11c503a76bcc414408dfebdf200843db814e
2016-05-02 18:36:13 -07:00
Raph Levien
4d826831b5 Merge "Make LocaleList constructor non-nullable" into nyc-dev 2016-05-03 00:15:24 +00:00
Todd Kennedy
6e2e7f585b use 'int' for min sdk version
per api council

Change-Id: Id3c1191534f61a0d511a6e9932f50ee613830999
2016-05-02 15:07:32 -07:00
Raph Levien
10ea92aefa Make LocaleList constructor non-nullable
This commit makes the LocaleList constructor require non-null
arguments in all cases, and fixes all uses of LocaleList that could
previously pass a null to use getEmptyLocaleList() instead (which is
preferred anyway becaues it avoids an allocation.

Bug: 28460668
Change-Id: I4b8b3cfa82914412731c2b79003951c46cb2afa1
2016-05-02 12:57:56 -07:00
Makoto Onuki
4d36b3a8c5 ShortcutManager: finishing touches
- Change back the throttling quota to 10 calls / day
- Foreground apps are no longer throttled, and when an app comes to
foreground the call counter will be reset.
- When the system locale changes, reset throttling for all packages
for all users.
  See LocalService.onSystemLocaleChangedNoLock() for how it's performed.
  Because the reset must happen before any other apps have a chance to
  publish shortcuts, the logic is not straightforward.

- Added an internal API to reset the throttling upon inline-reply
from a notification.

- Stop supporting icons from "content:" URIs
- Improved javadoc on several APIs.

Also internal refactor needed to this:
- ShortcutUser.getAllPackages()/getAllLaunchers() are no longer
accessible to outer code to prevent accidentally adding/removing the
content.  Outer code should use forAllPackages() / forAllLaunchers().

Bug 27923857

Change-Id: I002511193d1d33718163bb1dabe77610bde58198
2016-05-02 12:02:19 -07:00
Todd Kennedy
4e4fca43b0 Merge "Restrict updates of system packages" into nyc-dev 2016-05-02 14:44:20 +00:00
Wale Ogunwale
8f6c925ae7 Set ActivityInfo.resizeMode to RESIZE_MODE_RESIZEABLE by default
Previous assumption was ActivityInfo was completely initialized in
PackageParser, but that isn't the case with the ResolverActivity
whose ActivityInfo in populated in PackageManagerService.
This was causing the device to exist multi-window mode since
the default ActivityInfo.resizeMode was 0 (RESIZE_MODE_UNRESIZEABLE).

Bug: 28378995
Change-Id: I46e58d434f2a0274c461a8ff00b59ed3d2a1dd52
2016-04-29 16:46:47 -07:00
Todd Kennedy
fdd241a1e0 Restrict updates of system packages
By declaring a <restrict-update> tag in its manifest, a system package
can restrict its update to be the singular package that has the same
given hash. An update's hash is the SHA-512 across all its APKs [i.e.
for splits, the SHA-512 is calculated over the concatenation of the
base plus all splits].

The restriction only applies to system packages.

Bug: 28398205
Change-Id: Iec493fc8ef27edee53f1d437cb0caaa78782f329
2016-04-29 14:23:43 -07:00
Dianne Hackborn
1a2f993ba5 Merge "Fix issue #28431297: Crash in system process" into nyc-dev 2016-04-28 01:07:26 +00:00
Chris Tate
07318065b2 Merge "Make sure FIRST_LAUNCH is after PACKAGE_ADDED" into nyc-dev 2016-04-28 00:41:02 +00:00
Dianne Hackborn
e761777323 Fix issue #28431297: Crash in system process
Don't allow null URIs to get put into the notification path.

Change-Id: I4f68f438960c8a90c7b417feaa2e19968a3a200a
2016-04-27 17:03:52 -07:00
Christopher Tate
5cf5578a45 Make sure FIRST_LAUNCH is after PACKAGE_ADDED
If an app undergoes restore during install, it is considered 'started'
and the FIRST_LAUNCH broadcast needs to go out.  However, this must not
take place until after the restore operation has fully completed, in
order to avoid publishing the app's existence while it may still be in
an incoherent state.  We now make this broadcast part of POST_INSTALL
in the restore case.

Bundled apps are in the 'started' state regardless, so no FIRST_LAUNCH
broadcast is ever sent for them -- this CL does not change that
existing behavior even in the case of setup-time data restore of
factory-installed packages.

Bug 28173625

Change-Id: Ibcc3758576662dc447b75476173a0d008a9fe4da
2016-04-27 15:07:26 -07:00
Adam Powell
4be84bb10c Don't lose content change during rollback for loader already started
Framework edition

If a loader is already started when we try to rollback a content
change, force a new load instead of simply setting the flag to refresh
next time.

Bug 28406183

https://code.google.com/p/android/issues/detail?id=208278

Change-Id: If11d79088d30dd2dc48cf1b3d2882f3712b6cddb
2016-04-27 13:45:38 -07:00
Raph Levien
78dd08d5dd Merge "Give guidance on alternatives to deprecated locale field" into nyc-dev 2016-04-27 19:42:23 +00:00
Raph Levien
b163870d46 Give guidance on alternatives to deprecated locale field
The deprecation message for the "locale" field should clearly state
what to do instead when only the primary locale is needed.

Bug: 27532422
Change-Id: I3e83cc1e9054d4e199d7e34b1a42b7bcd6c77f62
2016-04-27 11:02:12 -07:00
TreeHugger Robot
97ef0e77af Merge "Don't override pre-release target sdk" into nyc-dev 2016-04-27 00:53:19 +00:00
Todd Kennedy
b107271813 Don't override pre-release target sdk
If a package targets a pre-release SDK [eg a letter version] it should not
be allowed to be upgraded by a release SDK [eg a number version]. If one
absolutely must upgrade to a release SDK, use the "--force-sdk" option
during install.

Bug: 28345311
Change-Id: Ic9fb209968e7c5da2c80c5ca4c0f44f5125f610a
2016-04-26 16:25:43 -07:00
Ruben Brunk
f84b3e0e2f Merge "Add manifest attribute for VR activities." into nyc-dev 2016-04-26 22:05:30 +00:00
David Brazdil
90e269917e Change app selection policy for post-OTA verification
Changes the policy for selecting packages which will be pre-verified
during post-OTA boot animation.

For Nx to Ny, an app is pre-verified if used in the foreground in the
last 7 days, or if its APK was loaded by other apps.

For M to N (or early N builds without detailed stats), an app is
pre-verified if it has any recorded use in the last 7 days.

Bug: 27902702
Bug: 27350503
Change-Id: I2b38daf017ecd0e5aa5ed596ed9351cffa03dbcb
2016-04-26 12:51:53 +01:00
Ruben Brunk
f56c9f432b Add manifest attribute for VR activities.
- Allow jank-free VR->VR activity transitions, even during
  long activity transitions.

Bug: 28115931
Change-Id: I1e3fd1a5245bac3433ea6282cb1c7a71f0e0266f
2016-04-25 13:32:03 -07:00
Rubin Xu
0c9c09ccff Merge "Regenerate ApplicationInfo if package suspend state is changed." into nyc-dev 2016-04-25 10:12:02 +00:00
Svet Ganov
ae0e03a9e0 Cleanup of the PackageInstaller API - Frameworks
The PackageInstaller app manages side-loading apps as well
as permission management. It should be updatable, hence
should rely on system APIs to talk to the platform. This
is the first step of defining an API boundary.

Change-Id: I9814eafd0b22ae03b4b847a7007cdbf14c9e5466
2016-04-22 14:18:32 -07:00
Svetoslav Ganov
5a91b61523 Merge "Disallow disable of the system shared libs." into nyc-dev 2016-04-22 21:03:30 +00:00
Andrei Stingaceanu
1a83df8ba7 Merge "Keyboard shortcuts: dismiss when activities start via shortcut" into nyc-dev 2016-04-22 16:46:31 +00:00
Andrei Stingaceanu
0bf096f1b4 Keyboard shortcuts: dismiss when activities start via shortcut
* introduced a new intent DISMISS_KEYBOARD_SHORTCUTS and
and new public API in Activity (which sends a broadcast
to KeyboardShortcutsReceiver) which applications can
use to dismiss the keyboard shortcuts.

* plumbing and implementation for a new call to dismiss
keyboard shortcuts from PhoneWindowManager and used it:
** when starting activities invoked via Search+key
** when starting activities invoked via META
** when starting activities via application launch keys

* removed unused variable in
Activity#onProvideKeyboardShortcuts

Note that for apps started via touch (aka non-shortcut)
like tapping the Settings gear icon from the notification
bar the menu is not automatically dismissed.

Bug: 28012198
Change-Id: I83a8d4f342bb8a08115a648648834d0d2bac19fd
2016-04-22 16:57:25 +01:00
Brian Carlstrom
ca82e616d3 Add reasons to notifyPackageUse calls
This is so we can record more specific times in PackageUsage.
If file with only one timestamp per package is found, the value is
copied to all usage slots.

Bug: 27902702
Change-Id: I8affe43c735e54620a9204433aad367cfddfded7
2016-04-22 14:39:53 +01:00
Rubin Xu
b40667eccd Merge "Remove MANAGED_PROFILE_AVAILABILITY_CHANGED broadcast" into nyc-dev 2016-04-22 09:25:03 +00:00
Trevor Johns
59c9a93fc2 Merge changes from topic 'merge_docs_nyc-dev' into nyc-dev
* changes:
  Remove links to createAndInitializeUser() and createUser()
  Resolve merge conflicts of a5060ee to nyc-dev
2016-04-20 18:35:57 +00:00
Rubin Xu
bf67c9c116 Regenerate ApplicationInfo if package suspend state is changed.
Bug: 28184597
Change-Id: Ie3d50630b8946299128d599f77dce31150bc7a6c
2016-04-20 17:09:38 +01:00
Chris Craik
6ed4e35e49 Merge "Document startService cost" into nyc-dev 2016-04-19 21:08:14 +00:00
Todd Kennedy
f720a9d91e Always perform has code check
Move code checking from the package parser and into the block
where we implement policy.

Bug: 28132476
Change-Id: Ie5cacacbf80289ff8d85acc5b57e58ea7216859c
2016-04-19 12:40:54 -07:00
Trevor Johns
682c24e228 Resolve merge conflicts of a5060ee to nyc-dev
This undoes the automerger skip which occured in
commit e740c84dc3 and
replays it as a standard (NOT -s ours) merge.

Change-Id: If5a47be26f73d6a0735c425cd66310a3e2a89086
2016-04-19 02:03:59 -07:00
Chris Craik
1e35352763 Document startService cost
bug:27998068

Change-Id: Iab66c21856a08678e29a1e5cf26a5f71a22027da
2016-04-18 12:28:22 -07:00
Craig Donner
e54b4397d3 Merge "Replace CTS with CDD in comment for FEATURE_VR_MODE_HIGH_PERFORMANCE" into nyc-dev 2016-04-18 17:09:55 +00:00
Narayan Kamath
a09b4d2a61 Remove unnecessary allocation+unboxing of objects.
Transforming String->int can be done with 0 allocations
using Integer.parseInt.

bug: 28078871
Change-Id: I8d9f322d7154728849dde61ef282046032858d60
2016-04-18 09:55:59 +01:00
Makoto Onuki
be73a8068f ShortcutManager: Categories should be Set, not List.
Bug 27923857

Change-Id: Ife859da8e66478174f6c4463316886a23e5aa4e0
2016-04-15 17:15:29 -07:00
Todd Kennedy
d022ac21eb Fix parse flags
Setting PARSE_IS_SYSTEM to the parse flags happens long after the
APK is actually parsed. So, we fail to pick up the boot aware and
protected storage attributes. Instead, always pull them from the
manifest, but, remove the flags if the package is not actually a
system package.

Also, we were incorrectly skipping certificate verification if
the flag PARSE_IS_SYSTEM was set. However, this flag is used for
_any_ system package -- whether it's physically on /system or if
it's an unbundled update. Instead, we should only skip this step
if the flag PARSE_IS_SYSTEM_DIR. We can implicitly trust any
APK actually stored in /system.

On a different note ... At some point, we will break apart the
parse flags into actual parse flags [i.e. those that change
physically parsing an APK] and policy flags [i.e. those that
change the interpretation of the APK contents].

Bug: 28116074
Bug: 28088617
Change-Id: I85246b0cb18fb5647df3618107910e288137fbc7
2016-04-15 17:04:14 +00:00
Rubin Xu
19c2a57c24 Remove MANAGED_PROFILE_AVAILABILITY_CHANGED broadcast
Bug: 27532254
Change-Id: Iaca17355d3ec75fa09c36a5353f40d678cc2c812
2016-04-15 15:17:53 +01:00
Craig Donner
8819c9d2ff Replace CTS with CDD in comment for FEATURE_VR_MODE_HIGH_PERFORMANCE
Bug: 27532416
Change-Id: I303d63d5b70434019acd77e8d82abcbabb1a85c1
2016-04-14 19:27:50 -07:00
Bernard Chau
25c43b78d1 Merge "Includes both direct boot aware and unaware apps in Apps default view" into nyc-dev 2016-04-14 09:40:00 +00:00
Svetoslav Ganov
a9c2500a68 Disallow disable of the system shared libs.
bug:28173410

Change-Id: If731f2d90312a083bb940f83431ba3eccf213947
2016-04-13 19:31:40 -07:00
Sudheer Shanka
b53a36b8cf Merge "Add an intent action ACTION_SHOW_APP_INFO." into nyc-dev 2016-04-13 17:47:07 +00:00