Commit Graph

4008 Commits

Author SHA1 Message Date
Makoto Onuki
45c1827c37 Merge "Improve ShortcutSrvice" into nyc-dev 2016-03-17 23:33:04 +00:00
Jeff Sharkey
a0a58a2fd5 Merge "Refactoring FBE APIs based on council feedback." into nyc-dev 2016-03-17 22:00:26 +00:00
Makoto Onuki
aa8b94aa79 Improve ShortcutSrvice
- Delayed save
- Reset logic update

Bug 27548047

Change-Id: Ibd52f90a7986991974301b7ff1f1d8520f9ef0d9
2016-03-17 14:37:14 -07:00
Jeff Sharkey
8a372a0a28 Refactoring FBE APIs based on council feedback.
Mostly consists of removing the word "encryption" from most APIs,
since we can't actually make promises about the data being encrypted.

Bug: 27531029
Change-Id: Iace9d7c4e64716abf86ed11847c40f3947e1d625
2016-03-17 14:49:08 -06:00
Makoto Onuki
fb3f3f5b28 Merge "Support multi-launcher" into nyc-dev 2016-03-17 17:27:10 +00:00
Todd Kennedy
ce71deefca Merge "update "dont kill" api" into nyc-dev 2016-03-17 15:58:24 +00:00
Benjamin Franz
f9124ecad9 Merge "Flush package restriction changes for a user." into nyc-dev 2016-03-16 23:51:44 +00:00
Makoto Onuki
1b21124d12 Merge "Add "pm set-home-activity"" into nyc-dev 2016-03-16 23:14:04 +00:00
Todd Kennedy
24ca5c6d7d update "dont kill" api
* update the name to be more consumer friendly
* expose it as a system api [so zapp can use it]

Change-Id: I11062e360bfd709dd5568409934fec539f64b863
2016-03-16 15:42:01 -07:00
Makoto Onuki
4828a59d68 Add "pm set-home-activity"
This is needed to change the default launcher on CTS for
ShortcutManager.

- When the default set with DPM.addPersistentPreferredActivity() is
still stronger.

- Ideally we should unify the code with HomeSettings, but I couldn't
find a good way to do this.

- I didn't make it to work to set the default for any intents
because building an intent filter from a command line would be
painful.

Bug 27548047

Change-Id: I66b153c20c7796147f77214b483112629f9d80c5
2016-03-16 15:21:56 -07:00
Jeff Sharkey
237db27c58 Remove references to Google packages.
Bug: 26441633
Change-Id: Iba6566215e2b6d224fd3b9c11d086f5c2db87dca
2016-03-16 14:54:09 -06:00
Jeff Sharkey
d136e51a99 Defuse Bundles parsed by the system process.
It's easy for apps to throw custom Parcelables into Bundles, but
if the system tries peeking inside one of these Bundles, it triggers
a BadParcelableException.  If that Bundle was passed away from the
Binder thread that delivered it into the system, we end up with a
nasty runtime restart.

This change mitigates this trouble by "defusing" any Bundles parsed by
the system server.  That is, if it encounters BadParcelableException
while unpacking a Bundle, it logs and delivers an empty Bundle as
the result.

Simultaneously, to help catch the system process sticking its
fingers into Bundles that are destined for other processes, a Bundle
now tracks if it's "defusable."  For example, any Intents delivered
through ActivityThread are marked as being defusable, since they've
arrived at their final destination.  Any other Bundles are considered
to be "in transit" and we log if the system tries unparceling them.

Merges several Parcel boolean fields into a flags int.  Add better
docs to several classes.

Bug: 27581063
Change-Id: I28cf3e7439503b5dc9a429bafae5eb48f21f0d93
2016-03-16 14:45:26 -06:00
Ashutosh Joshi
ac329d3e34 Merge "Exposing Context Hub service." into nyc-dev 2016-03-16 17:21:33 +00:00
Tony Mak
4dc008cda2 Fix NotificationListenerService fail to mirror work notification
1. Instead of getting application info in runtime, just retrieve the
   one in the context to avoid cross user operation.

2. Functions in PackageManager that retrieve badged icon now return
   badged icon if the targer user is managed profile instead of checking
   whether target user is a managed profile of the user in mContext.

3. Relax the restriction of getUserInfo, if the caller is asking a user
   in the same profile group or having the manage user permission, we let
   it go.

Bug: 26469166

Change-Id: Ia1ffc5743f7d94bd489cdb7571eaed51499ebdd9
2016-03-16 10:49:02 +00:00
Tomasz Mikolajewski
fe023137d0 Update docs for ACTION_QUICK_VIEW.
Bug: 27531273
Change-Id: I917ca16c14db20e6a2773018e00a61ff5fcf7ecd
2016-03-16 02:08:53 +00:00
Sudheer Shanka
bbb3ff2b2a Flush package restriction changes for a user.
Change-Id: I7c4481f820b6b368487d00de6c783e64cec99f4b
2016-03-16 01:42:23 +00:00
Makoto Onuki
de66737ae9 Support multi-launcher
Each launcher can have its won set of pinned shortcuts.
- Shortcuts pinned by others should look like not pined to this
  launcher.  This affects how ShortcutQueryFLAG_GET_PINNED works,
  as well as what ShortcutInfo.isPinned() returns.

- When pinning a shortcut, it should be a visible one to itself --
  a non-dynamic shortcut that's pinned by another launcher but
  not by the caller is not visible, so this launcher cannot pin it
  either.

- Also clean up the dynamic shortcut adding.

Bug 27548047

Change-Id: Ia478a2ea19b7d35557ec6ea42384c79a84d6b8de
2016-03-15 16:55:04 -07:00
Peng Xu
9ff7d22354 Exposing Context Hub service.
Adding the Context hub service. This is the service that exposes
the context hub HAL to the system. The API exposed is a System API.

Change-Id: I854141714ecd21f6386e6b15b7bc9a997483ccf6
2016-03-15 15:18:56 -07:00
Makoto Onuki
4dbe0ded4a Fix launcher side callback
- Fix crash in work profile case
- Calculate shortcuts for each caller
- Add tests

Bug 27548047

Change-Id: I1a5b6a96956abac75d01eb5cc1cec9a9e8e379a3
2016-03-15 12:38:41 -07:00
Alan Viverette
f068cff176 Merge "Push flags from top-level TypedValue into ComplexColor changing configs" into nyc-dev 2016-03-15 14:36:11 +00:00
Makoto Onuki
49f6fbcd1f Merge "Implement the launcher side permission." into nyc-dev 2016-03-14 22:12:16 +00:00
Makoto Onuki
2d5b465fa9 Implement the launcher side permission.
Only the default launcher can call the LauncherApps shortcut APIs.

Bug 27548047

Change-Id: I6d597fcad80c5201a2f93b8cbecd567fc79926d8
2016-03-14 15:00:58 -07:00
Alan Viverette
0b9295d067 Push flags from top-level TypedValue into ComplexColor changing configs
Previously a ComplexColor that was defined within varying configs would
not push the flags into its changing configs, so it wouldn't get reloaded.

This implementation follows the Drawable implementation, where the base
changing configs are stored in the superclass.

Bug: 27573177
Change-Id: I1da5ee6ab998d8296f8860c1a99d3e1399438543
2016-03-14 21:49:14 +00:00
Todd Kennedy
791a154648 Merge "Fix API" into nyc-dev 2016-03-14 21:31:44 +00:00
Todd Kennedy
948b702f39 Fix API
change name and allow passing in a boolean

Change-Id: I29b9765fedbd6b49878bb75df782012ad87a6866
2016-03-14 14:29:52 -07:00
Wale Ogunwale
0fbdab8397 Merge "Added more info to FLAG_ACTIVITY_LAUNCH_ADJACENT documentation" into nyc-dev 2016-03-14 19:27:39 +00:00
Wale Ogunwale
6bdf257d43 Added more info to FLAG_ACTIVITY_LAUNCH_ADJACENT documentation
Developers need to add FLAG_ACTIVITY_MULTIPLE_TASK flag if they don't
want an existing instance of their activity to be used.

Bug: 27604971
Change-Id: I80791ba9b8a68e4ffcf7a5b9a963f27239071037
2016-03-14 19:26:37 +00:00
Jeff Sharkey
815c6a8716 Merge "Offer to cache ContentResolver-related Bundles." into nyc-dev 2016-03-14 18:36:32 +00:00
Jeff Sharkey
8731408b11 Offer to cache ContentResolver-related Bundles.
There are a handful of core system services that collect data from
third-party ContentProviders by spinning them up and then caching the
results locally in memory.  However, if those apps are killed due to
low-memory pressure, they lose that cached data and have to collect
it again from scratch.  It's impossible for those apps to maintain a
correct cache when not running, since they'll miss out on Uri change
notifications.

To work around this, this change introducing a narrowly-scoped
caching mechanism that maps from Uris to Bundles.  The cache is
isolated per-user and per-calling-package, and internally it's
optimized to keep the Uri notification flow as fast as possible.
Each Bundle is invalidated whenever a notification event for a Uri
key is sent, or when the package hosting the provider is changed.

This change also wires up DocumentsUI to use this new mechanism,
which improves cold-start performance from 3300ms to 1800ms.  The
more DocumentsProviders a system has, the more pronounced this
benefit is.  Use BOOT_COMPLETED to build the cache at boot.

Add more permission docs, send a missing extra in DATA_CLEARED
broadcast.

Bug: 18406595
Change-Id: If3eae14bb3c69a8b83a65f530e081efc3b34d4bc
2016-03-14 11:45:50 -06:00
Polina Bondarenko
7020aa66bf Merge "Renamed HARDWARE_PROPERTIES_SERVICE to hardware_properties." into nyc-dev 2016-03-14 17:41:57 +00:00
Alan Viverette
781fbf28c7 Merge "Ensure all Java-side usages of config flags are using Java flags" into nyc-dev 2016-03-14 15:01:51 +00:00
Alan Viverette
ac85f90466 Ensure all Java-side usages of config flags are using Java flags
Previously we were using native config flags in some places that expected
Java flags, and vice-versa. All usages of config flags are now annotated
to ensure we're using the right type.

Cleans up annotations on most methods that were touched.

Bug: 21161798
Change-Id: Ifd87dfb12199fc8258915d8a510e03ddb681ca89
2016-03-11 15:15:51 -05:00
Todd Kennedy
b0f6e311ce Merge "Allow app downgrades" into nyc-dev 2016-03-11 19:38:35 +00:00
Todd Kennedy
c84d1ab11a Allow app downgrades
only system apps can do this

Change-Id: If0947f13f5c447f9396690bfda3ad40b07fbbb6b
2016-03-11 11:37:17 -08:00
Todd Kennedy
1374af2c7b Merge "Add minSdk to dumpsys" into nyc-dev 2016-03-11 19:26:37 +00:00
Todd Kennedy
89d60189cd Add minSdk to dumpsys
Bug: 27526333
Change-Id: I0148275013ebab899bcb63c07d71a840539c1863
2016-03-11 11:18:32 -08:00
Makoto Onuki
7a6a05f0cc Test for ShortcutManager.updateShortcuts(), also
... fix bugs

Bug 27548047

Change-Id: Ia55d35521912dcba2fb1bb9c20588a83d1a2d004
2016-03-10 18:01:06 -08:00
Adam Lesinski
58f1018c56 Merge "Cache per-Activity Resources objects" into nyc-dev 2016-03-10 20:50:40 +00:00
Adam Lesinski
082614c6a5 Cache per-Activity Resources objects
Each Activity has a Resources object whose underlying state changes
when a configuration change occurs, both global and for that activity only (multi-window).
Views and other clients of the Resources object can safely cache it knowing that
they always have a reference to the most up-to-date resources.

This applies to Resources.Theme objects as well.

Bug:26854894
Change-Id: Ifd3da5a1086e17f747dfc265a447fe92a3a5c692
2016-03-10 11:30:18 -08:00
Kenny Guy
ab750d283a Merge "Update docs to make suspend then uninstall clear." into nyc-dev 2016-03-10 19:19:08 +00:00
Todd Kennedy
23ca16865a Merge "fix docs" into nyc-dev 2016-03-10 18:11:31 +00:00
Todd Kennedy
1ed6b87634 fix docs
No code change; just doc clarification per API Review Council suggestions

Bug: 27531045
Change-Id: Ib1eef9635d68d44be596888b46de0650883d118c
2016-03-10 10:07:00 -08:00
Jesse Hall
39ceeb5472 Refer to hasSystemFeature(String, int) in Vulkan feature docs
Bug: 27531286
Change-Id: Ifb32ae519fc8118923d6216e1d574cbbf83dfd23
2016-03-10 09:04:26 -08:00
Kenny Guy
871f3ebb56 Update docs to make suspend then uninstall clear.
Update docs to say suspending then unintalling an
app unsuspends the app. Point out admin can block
uninstall if they want.

Bug: 26935242
Change-Id: I4390fa20c9d8954b36ff80fc449b62891eee598c
2016-03-10 14:04:43 +00:00
Joe Onorato
04a72a2a51 Merge "Add an API for apps to get their System Health / Battery Stats data." into nyc-dev 2016-03-10 00:52:03 +00:00
Joe Onorato
713fec85b8 Add an API for apps to get their System Health / Battery Stats data.
Change-Id: Ib27e1be469b826f6d83d73ce6024102bbdb1d47a
2016-03-09 15:47:24 -08:00
Todd Kennedy
f96eee36df Merge "remove splits" into nyc-dev 2016-03-09 23:43:21 +00:00
Todd Kennedy
eb9b05392a remove splits
Individual splits can now be removed for an application. The
application will be terminated if it's running when a split is
removed.

To remove a split, either use either "uninstall":
    $ adb shell cmd package uninstall <PACKAGE> <SPLIT>

or "install-remove":
    $ adb shell cmd package install-create -r -p <PACKAGE>
    $ adb shell cmd package install-remove <SESSION> <SPLIT>
    $ adb shell cmd package install-commit <SESSION>

For "install-remove" you must use '-r' and '-p' when creating
the session.

Bug: 27547051
Change-Id: I4d71a19ad45e39f6622d9ab6791ea8c4230a79e0
2016-03-09 15:34:00 -08:00
Polina Bondarenko
8333c7327f Renamed HARDWARE_PROPERTIES_SERVICE to hardware_properties.
Bug: 27531271
Change-Id: I7a86c6e320fa7fd803db3927c4cdfeeb019762ca
2016-03-09 19:02:41 +01:00
Makoto Onuki
5504622fb0 ShortcutManager: add remaining APIs.
- Icons are now persisted. (under /data/system_ce, as PNGs)
- the "load icon" APIs in LauncherApps are supported.
- Implement updateShortcuts()

- Addressed all the comments on the previous CL
- @hide the newly added constructor for PersistableBundle

- Enhance incoming shortcut validation
- A lot of internal clean-up.

Bug 27548047

Change-Id: I8e3c1ccd3e0a997a6d271c84d81170f0c022b60e
2016-03-08 18:37:32 -08:00