Commit Graph

4078 Commits

Author SHA1 Message Date
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
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
Sudheer Shanka
b53a36b8cf Merge "Add an intent action ACTION_SHOW_APP_INFO." into nyc-dev 2016-04-13 17:47:07 +00:00
Bernard Chau
186f29b6d8 Includes both direct boot aware and unaware apps in Apps default view
The view should be showing a combined list of "downloaded"
+ "visible in launcher" apps. However, if FBE and work callenge are
enabled, after a reboot the direct boot unaware apps are filtered.

Reason is that PackageUserState#isMatch assumes at least one of the flags
are specified and expects system to derive the aware/unaware flags
according to the user's lock state if neither of them is specified.

Bug: 28004355
Change-Id: Ia05edb0530023597fd219eb5e59cd71752efd279
2016-04-13 18:00:06 +01:00
TreeHugger Robot
0a6a6dbe91 Merge "Added api to delete cache files for a given user" into nyc-dev 2016-04-13 03:13:49 +00:00
Suprabh Shukla
78c9eb8947 Added api to delete cache files for a given user
Added an api to delete application cache files for a specific user. This
allows settings to clear cache files for work profile apps as well.

Bug: b/25338468
Change-Id: I52d4944a7a03b6d63ad44dd6bb868aec62815eab
2016-04-12 18:23:56 -07:00
Makoto Onuki
1d616f0d88 Merge "ShortcutManager: Address API review feedback." into nyc-dev 2016-04-12 22:34:17 +00:00
Sunny Goyal
1fe7dfa66a Merge "Changing LauncherApps to resolve activity by component name" into nyc-dev 2016-04-12 20:55:32 +00:00
TreeHugger Robot
e341ddfa05 Merge "Document when usesCleartextTraffic is ignored." into nyc-dev 2016-04-12 19:18:15 +00:00
Chad Brubaker
2df5ba777a Document when usesCleartextTraffic is ignored.
In N and above when using an Android Network Security Config the
cleartext configuration from that is used and
android:usesCleartextTraffic in the manifest is ignored.

Bug:27596429
Change-Id: I50ec765cead6cfd6bbaec585723f99d72e0fd945
2016-04-12 11:07:51 -07:00
Makoto Onuki
b6d3523dfb ShortcutManager: Address API review feedback.
- "delete" -> "remove"
- add/deleteDynamicShortcut() now takes a list.
- Throttling default settings is now 2 calls / hour.

- Add categories to ShortcutInfo.
- getIconResourceId() is now public

Bug 27923857
Bug 27548047

Change-Id: I8457b30e4b2f7c63ab2988648b37178fd16ea45b
2016-04-12 10:35:20 -07:00
Sunny Goyal
45d3e97748 Changing LauncherApps to resolve activity by component name
This makes the behavior of resolveActivity similar to isActivityEnabled.
Not that starting this activity may still fail due to other reasons.

Bug: 27549770
Change-Id: I924d7aa2305c64fd319ca1e38058f9f956c0c256
2016-04-11 16:02:27 -07:00
Makoto Onuki
5ba0d3e3a3 ShortcutManager: First cut of CTS
Bug 27548047

Change-Id: Idd7a768ea4fee44c2cf6e3bd473cea9e67f5f7cd
2016-04-11 14:48:44 -07:00
Makoto Onuki
390a81302f Merge "Add UserHandle to ShortcutInfo, and simplify LauncherApps APIs." into nyc-dev 2016-04-11 16:45:10 +00:00
Clara Bayarri
738ab04fd9 Merge "Expose the Keyboard Shortcuts Helper in Activity" into nyc-dev 2016-04-11 09:43:16 +00:00
Jeff Sharkey
4288419787 Use inode numbers for CE storage.
Certain operations, such as clearing/destroying app data, or just
counting on-disk size, require us to know the CE storage directory
of a particular app.  To facilitate these operations, offer a method
to get the inode of a CE directory, and accept that inode number
for later operations.  Collect and store the inode number in
PackageUserState for future use when that user's CE storage is
still locked.  This design means it's safe to clear/destroy app
data in both CE/DE storage at the same time.

Move most installd-related methods to a uniform calling convention
that accepts a single parent PackageParser.Package, and internally
fans out to handle all "leaf" packages under that parent.

In previous releases, we started installing apps using a new
directory-based layout, where all app code, unpacked native libraries,
and optimized code is bundled together.  So now we only have a single
path to measure for code size.  This fixes several outstanding bugs
that were causing sizes to be miscounted for apps supporting multiple
architectures.

Fix a subtle bug in PackageSettings that would cause "notLaunched"
to be parsed incorrectly.

Bug: 27828915, 27197819
Change-Id: Ia582cf3550553292bde4bb4313367111332913ec
2016-04-10 23:26:09 -06:00
Makoto Onuki
abe8442951 Add UserHandle to ShortcutInfo, and simplify LauncherApps APIs.
- Also fixes the bitmap recycle bug in the service.

Fixes 28053541

Change-Id: I2b244feda0f85c60e2c15af427fcad95ad5e6da5
2016-04-08 13:28:18 -07:00
Adam Powell
52c39215db Chooser filtering and caller direct share targets
Let apps invoking the system chooser specify components to filter out
such as themselves; this will prevent duplicate nonsensical UX where
it doesn't make sense for an app to share to itself.

Similarly, let apps provide their own Direct Share targets for when
they do want to let users share via their own internal services in the
same UI. These options can be used together.

Also fix a bug where a lingering binder reference from a remote
ChooserTargetService that hasn't been GC'd in the remote process could
keep an active reference to a ChooserActivity instance.

Bug 28073484

Change-Id: Ib613b1153b49dfedf79574b1af7c45379eceec24
2016-04-08 08:40:38 -07:00
Vladislav Kaznacheev
e1efbceeb7 Merge "Hide unnecessary extra name constants in ClipDescription" into nyc-dev 2016-04-07 22:21:45 +00:00
Sudheer Shanka
80b6641f28 Add an intent action ACTION_SHOW_APP_INFO.
Bug: 27404193
Change-Id: I0ca43ba4cde47b7c0621cb3caf0d726ce8c70386
2016-04-07 13:58:11 -07:00
Jeff Sharkey
cff102508c Merge "Clarify version docs." into nyc-dev 2016-04-07 20:08:18 +00:00
Jeff Sharkey
e721615f43 Clarify version docs.
Change-Id: I64cc9e5e51f12d33e770e73734efd89df20c8504
2016-04-07 14:07:10 -06:00
Clara Bayarri
eb3c2d3e63 Expose the Keyboard Shortcuts Helper in Activity
This allows apps to trigger it from their own menus

Bug: 27811273
Change-Id: I028caa5a88bb0e1c51238db28bb496293b78f90b
2016-04-07 13:35:23 +01:00
Todd Kennedy
d9d438ac4e Only parse an APK once
During package installation, we were parsing the APK twice; once
in the context of the PackageInstaller and once in the context
of the PackageManager. Instead, the installer should just pass
the certificates to be used further in the process.

If the PackageManager doesn't receive certificates [or, if there's
an error using them], it will fallback to re-parsing the APK.

Bug: 27502465
Change-Id: I94ce551af54eaa9916228e933134debe50867d21
2016-04-06 15:16:43 -07:00
Dianne Hackborn
d273f0d659 Merge "More work on issue #26390151: Add new JobScheduler API..." into nyc-dev 2016-04-06 19:38:50 +00:00
Todd Kennedy
c2b2f6eeff Merge "Adjust javadoc for filter priority" into nyc-dev 2016-04-06 19:20:41 +00:00
Todd Kennedy
2c4078611a Adjust javadoc for filter priority
This clarifies the usage of setPriority() for receiver filters.
Should also adjust the XML description of android:priority to
better describe the new behaviour for activity filters

Bug: 26417683
Change-Id: I96b2d90d71640041e232c401cf6e6838dbdbfeab
2016-04-06 10:57:51 -07:00
Todd Kennedy
0f4bc2b800 Move cert tracing to PackageParser
Tracing for cert collection in PackageManagerService was only
catching one of a couple usages. Move tracing lower in the
call stack to ensure tracing exists for all calls.

Also added a new tag to differentiate between verifying v1 & v2
signatures.

Bug: 27502465
Change-Id: Ie29f326e44f32cdbea1572714689c82f07ca12ba
2016-04-06 10:25:24 -07:00
Vladislav Kaznacheev
5d196673b8 Hide unnecessary extra name constants in ClipDescription
Bug: 27530944
Change-Id: I6989a55ea4f5d16d7cfd2ba3ab9342f0be34113c
2016-04-05 17:12:25 -07:00
Dianne Hackborn
141f11c82a More work on issue #26390151: Add new JobScheduler API...
...for monitoring content providers

- Improve media provider change reporting so that observers can
  avoid spurious reports of the top-level content directory changing.
- Fix a bug where collected content changes while a job was running
  were not being properly propagated to the next job.

Change-Id: I29e3c2960e6fec75b16ee3ee6588d47342bf8c75
2016-04-05 15:58:42 -07:00
Rubin Xu
63d1ee45ee Merge "Split ACTION_MANAGED_PROFILE_AVAILABILITY_CHANGED into two." into nyc-dev 2016-04-05 14:52:02 +00:00
Alan Viverette
952802e2d1 Fix bad workaround docs in Resources.getDrawable()
The real solution is to use ContextCompat, but we can't reference support
library from framework. C'est la vie.

Bug: 27727320
Change-Id: Ib9bcd5f2bdce1996f02fd44877df9ba202b26edc
2016-04-04 15:33:41 -04:00
Rubin Xu
e95057ade1 Split ACTION_MANAGED_PROFILE_AVAILABILITY_CHANGED into two.
Add more comment to EXTRA_QUIET_MODE

Bug: 27532254
Change-Id: I68a217561afca8b87f523c62393cdad097d5b75d
2016-04-04 16:08:47 +01:00
Todd Kennedy
5585dd971e Fix intent filter priorities
There are now three rules that guard intent filter priorities:
1) Only privileged applications will be granted a >0 priority
   filter [previously, _all_ system applications could do this]
2) There are certain actions that are considered protected [eg
   ACTION_VIEW, ACTION_SEND, ...] and even privileged applications
   will NOT be granted a >0 priority filter. There is one, and
   only one, exception for the SetupWizard.
3) Updates will NOT be granted a priority greater than the priority
   defined on the system image.

Bug: 27450489
Change-Id: Ifcec4d7a59e684331399abc41eea1bd6876155a4
2016-04-01 12:48:51 -07:00
Russell Brenner
3ccb35421d Merge "Add new protection level for setup wizard" into nyc-dev 2016-04-01 16:22:49 +00:00
Todd Kennedy
02424676c6 Merge "Allow retrieving info /system components" into nyc-dev 2016-04-01 14:21:21 +00:00
Russell Brenner
b23346639b Add new protection level for setup wizard
Adds PROTECTION_LEVEL_SETUP, a privileged permission for use only by
the setup wizard.

Bug: 20016740

Change-Id: Ib95e349c54d5d12465bf43162975dfb628ef2434
2016-03-31 17:32:07 -07:00
Todd Kennedy
d6ee0ba579 Allow retrieving info /system components
Generally we return info for the latest installed package; which could
either be a built-in [i.e. on the /system partition] package or a user
updated package. In certain circumstances, we want to be able to get
the version on the /system partition regardless of whether or not the
user has updated it. We do this by passing MATCH_FACTORY_ONLY to
getPackageInfo().

Bug: 27469181
Change-Id: I8dd1d110e2d72e5c6f024812d0b5d15d8b217347
2016-03-31 15:53:45 -07:00
Sunny Goyal
56d3dd8af7 Merge "Chaning LauncherActivityInfo to return a density specific non-badged icon" into nyc-dev 2016-03-31 16:56:31 +00:00
Jeff Sharkey
2c0ae91f2d Merge changes Ifecff4f1,Ia302de46 into nyc-dev
* changes:
  Make preferred activities direct-boot aware.
  Make Parcelable classes final, API cleanup.
2016-03-31 06:48:55 +00:00
Jeff Sharkey
70168dde6e Make Parcelable classes final, API cleanup.
Remove some Context methods that leaked through.  Add lint rule to
recommend using List<? extends Parcelable> instead of Parcelable[].

Bug: 27932224, 27930145, 27932911
Change-Id: Ia302de46cdb0c5101fa175a09316df91aeefcf0d
2016-03-30 23:31:39 -06:00
Sunny Goyal
bc48d8c6a8 Chaning LauncherActivityInfo to return a density specific non-badged icon
Bug: 27877821
Change-Id: I57c39c197b2480d9620a1719ace076cc6c936652
2016-03-30 15:56:34 -07:00
Makoto Onuki
0e65d36607 Clean up javadoc.
Bug 27548047

Change-Id: I10410c969136db634bb98687710d011d159bca07
2016-03-30 10:15:55 -07:00
Makoto Onuki
ca0ee285bb Merge "ShortcutManager: Support secondary text field." into nyc-dev 2016-03-30 15:30:17 +00:00
David Brazdil
f5c444ffd4 Move OTA package update before fstrim, hide "Optimizing apps" dialog
This patch moves the updating of packages before performing fstrim,
which runs asynchronously anyway, and stops showing the UI dialog.

Bug: 27350503
Change-Id: I6fceda10d7696f9badb97978fb9dc7927d698a4b
2016-03-30 13:39:14 +01:00
Makoto Onuki
e3ae7ec14a ShortcutManager: Support secondary text field.
Bug 27548047

Change-Id: I2d184bab2c26e351b7326945fa0cacf826f16d1e
2016-03-29 16:42:12 -07:00