Commit Graph

5703 Commits

Author SHA1 Message Date
Christopher Tate
e9fd1fa31a Back up / restore runtime permission grants
Only user-originated grant actions are backed up/restored.  This
includes outright grants, one-time denials, and "never ask again"
type denials.

Bug 19870549

Change-Id: I78b4a8abb713dc5d74b93cb53217b212d57b26e4
2016-01-15 10:44:48 -08:00
Yohei Yukawa
f1fc5a0fe8 Merge changes Ib5ea8131,I571d6cc9
* changes:
  Add a new API IMM#dispatchKeyEventFromInputMethod().
  BaseInputConnection shouldn't rely on @hide APIs.
2016-01-15 01:23:09 +00:00
Winson
d8d896cefa Adding logging for history and paging.
Change-Id: Ibd9ff72858897c0a3680e81b94172e667e1291cc
2016-01-14 15:31:43 -08:00
Winson
3e87474145 Improving drag and drop animations.
- Expanding drop targets to indicate the size of the to-be docked window
- Fixing animation when dropping task
- Fixing drag view z order
- Fixes issue where the dock divider position in WM is not exact
- Requiring user to move the slop distance before accepting drops

Change-Id: I2f6eab504db7126c19e0c680629e89a39e7512e3
2016-01-14 15:23:20 -08:00
Philip P. Moltmann
cde1c2a717 Merge "Clean up API for PrinterInfo." 2016-01-14 22:51:39 +00:00
Philip P. Moltmann
c2ad22663b Clean up API for PrinterInfo.
- Make immutable
- Check parameters
- Check state while unparcelling

Change-Id: I13959845ca508936331488506380e894f49abf25
2016-01-14 12:48:31 -08:00
Daichi Hirono
cc1251b9b2 Merge "Change offset and size arguments of MtpDevice#getPartialObject to Java long." 2016-01-14 02:28:45 +00:00
Jorim Jaggi
fdbdb9f9c6 Merge changes I55d96ec3,I0ebc4639
* changes:
  Reenable task preloading in recents
  When creating docked stack, use SnapAlgorithm
2016-01-14 01:08:52 +00:00
Daichi Hirono
2dd48256e9 Change offset and size arguments of MtpDevice#getPartialObject to Java
long.

To represents full range of 32-bit unsigned integer, we should use
jlong instead of jint.

BUG=26284424

Change-Id: Id3fa9e3daa778c204ab8e38f821d454c709c317a
2016-01-14 09:42:59 +09:00
Jorim Jaggi
d434dcbfc9 When creating docked stack, use SnapAlgorithm
To make sure the bounds snapped to a snap position are
set from the very beginning.

Change-Id: I0ebc463926dd17e0deeefc211b097f28a6456b96
2016-01-13 16:19:56 -08:00
Alan Viverette
7a66ba9ddb Merge "Clean up lint warnings in popup menu presenter classes" 2016-01-13 18:56:24 +00:00
Alan Viverette
02cd0f9105 Clean up lint warnings in popup menu presenter classes
Change-Id: I6b4cce1c4788b408615af0c93575e02e75b4c3ca
2016-01-13 13:33:17 -05:00
Clara Bayarri
4fce66668e Merge "Request Keyboard Shortcuts for SysUI Dialog via Window" 2016-01-13 18:06:38 +00:00
Clara Bayarri
75e097965c Request Keyboard Shortcuts for SysUI Dialog via Window
Keyboard shortcuts are requested via WindowManager, and
the request pipes through to the view root and the window
callback.

Bug: 22405482
Change-Id: Ic0071e91c7b554be3ac9df71e9539ee8a60e822e
2016-01-13 16:56:56 +00:00
Clara Bayarri
8d35de8445 Fix missing MANAGE_USER error on calls to isDeviceSecure
A poorly placed clear identity was causing some crashes as
apps were required to have the MANAGE_USERS permission to
query if the current user is secured.

Change-Id: I1120b1e4405e78389fcbcb3e7d1dba8c80500da3
2016-01-13 13:21:03 +00:00
Clara Bayarri
a1771110d6 Create Work Challenge per-user condition
Change the current static condition to a per-user condition so we
can check and enable/disable the work challenge properly. Also add
an isAllowed API, as the Work Challenge can only be used when the
user's DPC targets N or above to maintain backwards compatibility.

Change-Id: I0cb8b475838816801868ffb24726407aa257b4de
2016-01-13 10:27:12 +00:00
Jeff Sharkey
fdeeeea6cf Follow installd changes, throw exceptions.
Start by passing down flags to work on both CE and DE storage areas;
a future change will refine this further.

Force consistent argument checking and null handling for all
installd callers.  Throw explicit exceptions instead of returning int
values that can accidentally be ignored.

Bug: 26466827
Change-Id: Iddb591f6b3c7786d210d3f132ff7f9886a97b749
2016-01-12 14:21:24 -07:00
Alan Viverette
b06271db81 Merge "Don't explicitly set the title's layout direction" 2016-01-12 17:48:42 +00:00
Jeff Sharkey
9229ee5959 Merge "Install non-EA providers once user is unlocked." 2016-01-12 03:16:22 +00:00
Jorim Jaggi
737af724eb Snap docked stack after screen rotation
- Move DividerSnapAlgorithm to com.android.internal, also move
some utility stuff into DividerUtils which is used from both
SystemUI and window manager
- When the screen rotation changes, rotate the stacks like before
but then also snap the docked stack to a valid snap position.

Change-Id: I9e1aa13f42f398a25c9016e6f20395ee212e405b
2016-01-11 23:05:56 +00:00
Jason Monk
057ee76e5c Fix build
Fix bad merge

Change-Id: I2cd1f32a7e50b8fa1f7f85c52fe34111f7cea577
2016-01-11 14:37:44 -05:00
Jason Monk
c06fbb1298 Move battery saver notification to QS
Remove the battery saver notification and instead create a detail
panel within QS that allows it to be turned on and off.

Change-Id: I54654d26183586fa171fda04877a840701f8ef33
2016-01-11 14:29:23 -05:00
Winson Chung
3dc52ed179 Revert "Snap docked stack after screen rotation"
This reverts commit e65d6bb207.

Change-Id: I245aa9be3ea98ff742e02b02f6f1d344bc2e8182
2016-01-11 17:53:17 +00:00
Jorim Jaggi
e65d6bb207 Snap docked stack after screen rotation
- Move DividerSnapAlgorithm to com.android.internal, also move
some utility stuff into DividerUtils which is used from both
SystemUI and window manager
- When the screen rotation changes, rotate the stacks like before
but then also snap the docked stack to a valid snap position.

Change-Id: Ifb0c65dfbdfca2343a76b12de982c0701fe0c3ab
2016-01-11 16:58:54 +00:00
Filip Gruszczynski
e8b3bb9af0 Merge "Load background drawable before passing to backdrop renderer." 2016-01-11 16:33:33 +00:00
Jeff Sharkey
67be718476 Fix IndentingPrintWriter after JDK switch.
We needed to overload more methods.  Verified that tests pass.

Bug: 26191999
Change-Id: I2b75890239d3febf3411c4b7bb4df92a6d61f056
2016-01-10 14:30:47 -07:00
Jeff Sharkey
2bd31dbd02 Install non-EA providers once user is unlocked.
When starting encryption-aware apps while the device is locked, we
can only spin up ContentProviders that have been marked as
encryption-aware.  Once the user is unlocked, we need to go back and
install non-encryption-aware providers in already running apps.

Fix bugs in getPackageInfo() where only one of the various MATCH_
flags was being consulted (!).  Move matching logic to single unified
location in PackageUserState so we have consistent behavior.

Fix another class of bugs where Safe Mode wasn't correctly filtering
package details (!).  These bugs are fixed by splicing in the new
MATCH_SYSTEM_ONLY flag as part of state-based flag mutation that was
added for encryption.

Bug: 25944787
Change-Id: I39c8da74b1f9ba944cc817176983f50ba322329c
2016-01-09 19:28:09 -07:00
Filip Gruszczynski
a40fd09fa9 Load background drawable before passing to backdrop renderer.
Background renderer always expects that the default background drawable
is available. We pass the drawable to the renderer in two places, so we
need to make sure to load the drawable before each.

Bug: 26345599
Change-Id: I238623ff870e26ba34bb02197611172e316d3083
2016-01-08 14:04:04 -08:00
Alan Viverette
891c9ee76e Don't explicitly set the title's layout direction
The decor view may not be attached to the ViewRootImpl yet, so we can't
resolve the layout direction. Also, cleans up an instanceof check for
clearing the foreground since every class now supports foreground.

Bug: 26459947
Change-Id: I261661338dbaad6cc971ec7ae6875f514ecfbcde
2016-01-08 13:43:15 -05:00
Jason Monk
9f172e650d Merge changes I875b962b,I99c4c290
* changes:
  Add API for System QS tiles to set status icons
  Cleanup the status bar flow.
2016-01-08 14:18:42 +00:00
Clara Bayarri
b1f69a9b78 Merge "Create a new Logging constant for Profile Challenge Settings" 2016-01-08 14:08:18 +00:00
Jason Monk
07473cea3a Cleanup the status bar flow.
- Don't round trip to the status bar manager to know the state
 - Manage the state of icons closer to where they are displayed
 - Move StatusBarIconList into SysUI because it isn't used elsewhere now

Change-Id: I99c4c290c18fc776914a43b1cde157f92bb36ac2
2016-01-08 08:54:13 -05:00
Filip Gruszczynski
411c06fbf9 Only allow activities to move to full screen stack.
We allowed activities to move to any stack, but that's too much
freedom. Instead we only allow them to move from freeform stack to a
fullscreen stack.

Change-Id: I04de9bbf18cf4431d7bd34d6c727de82802661ef
2016-01-07 16:58:13 -08:00
Yohei Yukawa
159dd47db3 BaseInputConnection shouldn't rely on @hide APIs.
This is a part of effort to reduce the number of dependencies on @hide
method in BaseInputConnection.

In a nutshell, IMM#notifyUserAction() and IMM#setFullscreenMode() are
something that IME developers should not care about, hence ideally
BaseInputConnection should not rely on them.

  IMM#setFullscreenMode():
    This @hide method is just for updating an internal state flag about
    whether the current IME is in full screen mode or not.

  IMM#notifyUserAction():
    This @hide methods is just for sending a signal to IMMS so that IME
    rotation list (for globe button) can be updated based on the user's
    action.

Depending on those @hide methods in BaseInputConnection is problematic
because:

  A. We cannot implement InputConnection without relying on
     BaseInputConnection, which forces developers to use Editable to
     maintain internal text representations.
  B. If BaseInputConnection#commitText is overridden,
     those @hide method calls can be missed.
  C. Currently some method calls of BaseInputConnection() even from
     application itself can trigger those @hide method calls.  Ideally
     those internal events can be dispatched only when those methods are
     called from the input method rather than the application itself.

With this CL, those @hide API calls will be moved from
BaseInputConnection to ControlledInputConnectionWrapper so that
developers can forget about them.

Note that BaseInputConnection#sendKeyEvent() still relies on @hide
internal details of IMM.  It should be addressed in a subsequent CL.

Bug: 24688781
Change-Id: I571d6cc9c6e461d8994aa7496e7e18be13766411
2016-01-07 16:52:33 -08:00
Hall Liu
33c32dd2ad Merge "Don't call pre- and post-handlers for state machine initialization" 2016-01-07 17:50:08 +00:00
Filip Gruszczynski
60db7c317d Merge "Use activity dimensions instead of display to calculate dialog size." 2016-01-07 17:08:56 +00:00
Alan Viverette
d01fafb7ff Merge "Avoid NPE when ActionMenuPresenter is intialized with null MenuBuilder" 2016-01-07 15:48:40 +00:00
Andrei Stingaceanu
c22ab7911a Keyboard shortcuts: minor naming refactor
Replace all occurrences of showKeyboardShortcuts* with
toggleKeyboardShortcuts* in order to be inline with
the current/desired behavior.

Change-Id: Ia076952ec40963b2727fd1f855b64859b94b1643
2016-01-07 12:42:46 +00:00
Clara Bayarri
a6d20ccd32 Create a new Logging constant for Profile Challenge Settings
Change-Id: I282ee30b47432e97545b004ea2ada56f3ecb84fa
2016-01-07 11:09:17 +00:00
Filip Gruszczynski
34dab0b3d9 Use activity dimensions instead of display to calculate dialog size.
This adjusts the code for measuring and laying out dialog windows, which
used display dimensions as a basis for calculating the dialog
dimensions. Because of this dialogs would be too large in multi window
mode, where the parent bounds are far smaller than full display. This
switches to using dimensions for configuration received from activity
manager.

Mind, this is still not working as needed, because the resources return
minimal size of the dialog as if it was displayed on a full display,
rather than within activity bounds.

The CL also introduces better logging tags in ViewRootImpl and
DecorView. These normal approach works reasonably well when there is a
single activity on the display. However, when multiple windows are
displayed, it becomes impossible to determine which view root/decor view
logged what. This adds a suffix, that allows to identify the owner.

Bug: 26251921

Change-Id: I515a1ff9a81ee5ad086773196db71915e88a25eb
2016-01-06 17:35:54 -08:00
Filip Gruszczynski
e5b386d2bb Merge "Don't depend on mContentParent to determine if content was set." 2016-01-07 00:40:55 +00:00
Filip Gruszczynski
f4bdaeb38d Don't depend on mContentParent to determine if content was set.
mContentParent might be set due to window preservation, rather than due
to client setting the content view. We should mark the content view as
set only when it's explicitly done.

Bug: 26345798
Change-Id: I749de9def8ff708592fa20abdb7da366ec52f24d
2016-01-06 14:34:00 -08:00
Jeff Sharkey
e06b4d1d9f Consistent naming for PackageManager methods.
When hidden PackageManager methods take a userId argument, they
should be named explicitly with the "AsUser" suffix.  This fixes
several lagging examples so that we can pave the way to safely
start passing flags to new methods without scary overloading.

Also fix spacing issues in various logging statements.

Change-Id: I1e42f7f66427410275df713bea04f6e0445fba28
2016-01-06 15:21:06 -07:00
Hall Liu
74d7d0f10b Don't call pre- and post-handlers for state machine initialization
Add check to onPreHandleMessage and onPostHandleMessage so that they
don't process the SM_INIT_CMD messages that are used internally by the
state machine.

Change-Id: I4061ed098d5c394d311714bbe13b738cb7209317
2016-01-06 13:59:31 -08:00
Julia Reynolds
ed150013e3 Merge "DND visual interruptions: prevent screen on." 2016-01-05 20:45:45 +00:00
Julia Reynolds
617215874d DND visual interruptions: prevent screen on.
Bug: 25423508
Change-Id: Ie935a2051e1ae774fbeaf624f3599b2b1bb8666d
2016-01-05 12:49:09 -05:00
Chris Banes
21b257717f Fix ToolbarActionBar invalidating destroyed Activities
BUG: 26375399
Change-Id: Ieae13890896b1082b51a81317760b4975aeb5dff
2016-01-04 20:52:23 +00:00
Jason Monk
d5a204f16e Better service management for QS 3rd party tiles
Better wrapper around the service that will handle rebinding
when it dies, binding when it becomes available, and forwarding
along all messages to the service once it binds.

Also better handling of too many services at a time.  Will only
ever bind to at most 3 tiles and will manage which ones are most
important to show based on pending clicks, last update, etc.

Change-Id: I5f4da0bc751f7eb25baa32e5c0bb9f1bc418f5bb
2016-01-04 14:46:11 -05:00
Alan Viverette
28a8468995 Avoid NPE when ActionMenuPresenter is intialized with null MenuBuilder
Also adds annotations to accurately reflect nullability.

Bug: 26318920
Change-Id: Ia3b170dd301edfc0088a11ee5764c24bab2f10aa
2016-01-04 13:43:23 -05:00
Pavlin Radoslavov
7016625473 Use GID "wakelock" to control access to kernel wakelock
* Added GID "wakelock" (3010) to the list of groups the System Server
   belongs to.

 * Added GID "wakelock" to the list of assigned groups for the
   "android.permission.BLUETOOTH_STACK" Android permission.

 * Grant CAP_BLOCK_SUSPEND to processes that belong to GID "wakelock"

Bug: 25864142
Change-Id: I8a9a5f11e4a9ecd1abf2d4f4b90ec89b3101332e
2015-12-28 19:32:48 +00:00