Commit Graph

5533 Commits

Author SHA1 Message Date
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
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
Mihai Nita
451376062a Add APIs to access various locale lists.
This includes APIs to get / set the user locale list,
and getters for the curated list of supported locales,
localized assets, and pseudo-locales.

Change-Id: Ie5771d769cd4a01f6404fa82f6f4f9bcb9b83a9e
Bug: 25800339
2015-12-22 23:19:37 -08:00
Filip Gruszczynski
8cef7db8d6 Merge "Only use DecorContext with main activity windows." 2015-12-23 02:20:49 +00:00
Filip Gruszczynski
796b8c17d6 Only use DecorContext with main activity windows.
Bug: 26251921
Change-Id: Icd41eddd4f39b95a136ee366673fabbef9d4def0
2015-12-22 15:14:01 -08:00
Vladislav Kaznacheev
b23a757aa2 Bind DropPermissions life cycle to Activity
Move requestDropPermissions from DragEvent to Activity.
Permissions will be granted using UriPermissionOwner
 associated with this activity and revoked when the activity
 is destroyed (if DropPermissions.release is not called before that).

Change-Id: Ic8f8fc3f56f57e83b9bc34ae8c96d82c2c9c4e1d
2015-12-22 14:40:11 -08:00
Jason Monk
d40328e687 Color transforms for the tuner
Change-Id: I615be65e2b020acd5520f93c04f426c4006221c5
2015-12-21 09:37:00 -05:00
Jeff Sharkey
5217cacbd9 Make JobSchedulerService encryption aware.
When a user is started, but a persisted job component doesn't appear
in the normal resolution list, we avoid enqueuing the job.  Later
when the user is unlocked, we take another pass over the pending
jobs to see if they became available.

Load keyboard layouts from XML metadata regardless of crypto status,
since we don't need to spin up any remote code.

Add MATCH_SYSTEM_ONLY to make system logic easier to write when
looking for trusted components.

Sprinkle more annotations on ArrayUtils methods.

Bug: 26279465
Change-Id: Iec28e0bb46862b07d740b12a79f6360de68dab0f
2015-12-20 15:36:29 -07:00
Mihai Niță
085caa2bb2 Merge "Adding a locale picker with two-step selection: language, then region." 2015-12-18 21:55:32 +00:00
Andreas Gampe
a0c40fc602 Merge "Frameworks/base: Change android.util.Log multiline logging" 2015-12-18 21:27:18 +00:00
Mihai Nita
3b70b0fc25 Adding a locale picker with two-step selection: language, then region.
This is intended to replace the UI part of the LocalePicker, at
least for the main "Settings" application (under "Language & Input")
and for the "Setup Wizard".

The UI part in the old LocalePicker can be removed once all the
components that use it are migrated to the new one.

Bug: 25800339
Change-Id: I2f264cdb7b7fc586124dd58fad2c68060d5b7aa8
2015-12-18 21:13:55 +00:00
George Mount
69b495bdb8 Merge "Alt-up moves focus to the toolbar in action bar mode." 2015-12-18 15:46:31 +00:00
George Mount
5beb2617f9 Alt-up moves focus to the toolbar in action bar mode.
Bug 24811572

Change-Id: Ie065fa13ba76131e700e73984a99fc60a7aa513c
2015-12-18 07:44:50 -08:00
Andreas Gampe
8413db8c36 Frameworks/base: Change android.util.Log multiline logging
To avoid long stacktraces being truncated, add code to split up
large chunks along line breaks.

Introduce LineBreakBufferedWriter to chunk up log output. Add a
core test for it.

Change-Id: I34160fbce853c21329f7fa109a9c42506b2066af
2015-12-17 19:00:29 -08:00
Chris Banes
12a47ac41e Fix AlertDialog.setIcon() not working when called after show() pt.2
BUG: 26183328
Change-Id: I2bd8ff0315e04dd33fe720f0e5c32dec06747afc
2015-12-17 10:00:26 +00:00
Vladislav Kaznacheev
9149d2b117 Rename and simplify DropPermissionHolder
Rename DropPermissionHolder to DropPermissions and move
all server-side implementation details into a separate class.
Rename DragEvent.getDropPermissionHolder to
requestDropPermissions and make it take the permissions
implicitly.

Change-Id: Ia83f7cb8af07ce13ba9536d24b0f9d63331d8736
2015-12-16 17:10:36 -08:00
Alan Viverette
9084d22cb9 Check for null MenuHelper before setting presenter callback
Bug: 26219569
Change-Id: Ia19a1304aa10dac52b89d0ee85acdb5671a15777
2015-12-16 09:56:37 -05:00
Alan Viverette
db08925a8f Fix build
Change-Id: I3e1708a9e41155b9b00e0365e4392ae66202fdbb
2015-12-15 17:16:33 -05:00
Todd Kennedy
4f7b035e34 Merge "Fix ephemeral post-install launching" 2015-12-15 22:12:33 +00:00
Todd Kennedy
7440f177c3 Fix ephemeral post-install launching
Provide the ephemeral installer with some additional pieces of information:
1) instead of de-referencing the URL a second time, give the installer the
   exact package name
2) instead of relying on ephemeral apps to define verified links, give the
   installer a pending intent to launch when the ephemeral is installed
3) give the installer a pending intent to launch if the installer fails,
   for whatever reason, to install the ephemeral app

Bug: 25119046
Change-Id: I45f50481caee09d5d09451e4b2492e64b0faae82
2015-12-15 14:04:56 -08:00
Alan Viverette
6329523938 Merge "Postpone CascadingMenuPopup window creation until show()" 2015-12-15 21:56:20 +00:00
Alan Viverette
ecfdaa9157 Postpone CascadingMenuPopup window creation until show()
This ensures that addMenu() and setters can be called in any order
as long as they occur before the show() call.

Bug: 25853211
Change-Id: I9a643d37c60046326b7d97a38026c27ba247a1b0
2015-12-15 16:53:32 -05:00
Chris Banes
f928d4aa45 Merge "Fix AlertDialog.setIcon() not working when called after show()" 2015-12-15 18:13:02 +00:00
Wale Ogunwale
3e5f080528 Merge "Fixed bug with caption not showing for some apps that handle config changes" 2015-12-15 18:11:11 +00:00
Chris Banes
476da7720a Fix AlertDialog.setIcon() not working when called after show()
BUG: 26183328
Change-Id: I86a5a299c9afa105c62a709d2a60b8b2e5b590dc
2015-12-15 17:14:15 +00:00
Wale Ogunwale
eb6722c0bc Fixed bug with caption not showing for some apps that handle config changes
We currently decide when to show the decor caption onConfigurationChanged
However, if the app handles configuration changes or the threshold isn't
big enough for the configuration change to be reported to the app, we don't
display the caption in some cases when transitioning from fullscreen mode
to freeform mode.
We now also use the onMultiWindowModeChanged call to also determine if
the caption should be visible.

Change-Id: I237437f04ad90f904912ebac0253245f547b0e3e
2015-12-15 09:01:45 -08:00
Alan Viverette
35a57bc5e9 Merge "Only handle Context submenus as dialogs when parent is a dialog" 2015-12-15 15:10:45 +00:00
Bryce Lee
5a0fed6841 Allow access to deprecated LOCK_PATTERN_ENABLED flag. am: 4614596a39 am: 36393a5674 am: 4ab8b0696a
am: 0510ad1bc9

* commit '0510ad1bc9a2da4fa84f1a5417a218dba48563e3':
  Allow access to deprecated LOCK_PATTERN_ENABLED flag.
2015-12-15 01:17:28 +00:00
Bryce Lee
0510ad1bc9 Allow access to deprecated LOCK_PATTERN_ENABLED flag. am: 4614596a39 am: 36393a5674
am: 4ab8b0696a

* commit '4ab8b0696a4383b7dec2fc2dc4f17596bcd9216a':
  Allow access to deprecated LOCK_PATTERN_ENABLED flag.
2015-12-15 00:11:06 +00:00
Bryce Lee
4ab8b0696a Allow access to deprecated LOCK_PATTERN_ENABLED flag. am: 4614596a39
am: 36393a5674

* commit '36393a5674bf50b351b5961a194ce2814ca00140':
  Allow access to deprecated LOCK_PATTERN_ENABLED flag.
2015-12-14 23:57:38 +00:00
Bryce Lee
36393a5674 Allow access to deprecated LOCK_PATTERN_ENABLED flag.
am: 4614596a39

* commit '4614596a395b6c86fff3f35a07edda2e848d743c':
  Allow access to deprecated LOCK_PATTERN_ENABLED flag.
2015-12-14 23:43:54 +00:00
Bryce Lee
4614596a39 Allow access to deprecated LOCK_PATTERN_ENABLED flag.
It is possible that older platforms may have not cleared the lock pattern,
but instead only checked this flag to determine the lock pattern enabled
state. In such cases, upgrading to a platform with that only checks the
lock pattern can lead to the lock screen being re-enabled by accident.
These new methods allow this condition to be identified and resolved.

Bug: 26029690
Change-Id: I8f7ebc0e1915049afe49c219c87010aa38a16244
2015-12-14 14:39:10 -08:00