2572 Commits

Author SHA1 Message Date
Adam Powell
9121107248 am b43a22e3: am 79782d7c: Merge "Close context menu dialogs if the menu becomes empty" into klp-dev
* commit 'b43a22e3c870183855cd1c9ba4f9e152ed6d6af7':
  Close context menu dialogs if the menu becomes empty
2013-10-08 15:41:58 -07:00
Adam Powell
fd71db8445 Close context menu dialogs if the menu becomes empty
If a view triggers showContextMenu while a context menu is already
shown but contributes no items to the menu the menu dialog would
become empty. Simply close the dialog if this happens.

Bug 11063885

Change-Id: I9e7c96073318c94eda5f1e1c4beb596b3d9da781
2013-10-08 15:20:29 -07:00
John Spurlock
09a41c5033 am 5736b6d3: am 2bef87cc: am 4268600f: Merge "Translucent sysui flags affect layout." into klp-dev
* commit '5736b6d3d343f7505b09fc4487ca8411b257bf35':
  Translucent sysui flags affect layout.
2013-10-08 11:43:27 -07:00
John Spurlock
5736b6d3d3 am 2bef87cc: am 4268600f: Merge "Translucent sysui flags affect layout." into klp-dev
* commit '2bef87ccc67a0916bf8b9fddd90f4763c0ada3fe':
  Translucent sysui flags affect layout.
2013-10-08 11:38:39 -07:00
John Spurlock
4268600f39 Merge "Translucent sysui flags affect layout." into klp-dev 2013-10-08 18:34:57 +00:00
John Spurlock
7f4820ae4e Translucent sysui flags affect layout.
Recently removed when they went private, but that was wrong:
they still affect layout.

Bug:11128955
Change-Id: Ic94230732a6b2ff3dcaa79b03e181a4e46585902
2013-10-08 12:54:35 -04:00
John Spurlock
ca5688efac am 62544134: am c0ee1ff4: am e60b7bf7: Merge "Don\'t crop top-most windows at rest." into klp-dev
* commit '62544134749558a67715618f20df64adbf7a1d45':
  Don't crop top-most windows at rest.
2013-10-08 09:47:51 -07:00
John Spurlock
6254413474 am c0ee1ff4: am e60b7bf7: Merge "Don\'t crop top-most windows at rest." into klp-dev
* commit 'c0ee1ff48a7f9e350d5621a37a8d3b1c515a6ca0':
  Don't crop top-most windows at rest.
2013-10-08 09:42:38 -07:00
John Spurlock
65567d4e6c Don't crop top-most windows at rest.
They can affect the system decor state, cropping to their
current requested state is too aggressive.

Bug:11079003
Change-Id: Ifec576d41cdefd1b851463d4b12311f1a8e27b3d
2013-10-08 11:49:47 -04:00
Alan Viverette
516f953a82 resolved conflicts for merge of e4ccb864 to master
Change-Id: I50c41c712c4eb4f68b22777efb2e5d5370536b22
2013-10-07 18:05:09 -07:00
Alan Viverette
e4ccb864e8 am 1bdbdfbe: am 6930d380: Merge "Ignore certain WindowManager flags when touch exploration is enabled" into klp-dev
* commit '1bdbdfbe6a48113bff2069c8eaf9835f9fd8c9bb':
  Ignore certain WindowManager flags when touch exploration is enabled
2013-10-07 17:54:42 -07:00
Alan Viverette
5a0f4eccfb Ignore certain WindowManager flags when touch exploration is enabled
Specifically, ignore any flags that alter the visibility of the navigation
bar and transparency.

BUG: 11082573
Change-Id: I17264dc55a1c6c3cb9b9cf92d5121799cecee5b8
2013-10-07 15:12:57 -07:00
John Spurlock
13431ad822 am 4818db0f: am b88ede00: am d5102f19: Merge "Transparent system ui flags -> Translucent WM flags." into klp-dev
* commit '4818db0fc5dec465a2cdb76c0faff4750a3a3fff':
  Transparent system ui flags -> Translucent WM flags.
2013-10-06 19:22:46 -07:00
John Spurlock
4818db0fc5 am b88ede00: am d5102f19: Merge "Transparent system ui flags -> Translucent WM flags." into klp-dev
* commit 'b88ede00ac12fb359b490a5167cd595ebde7e805':
  Transparent system ui flags -> Translucent WM flags.
2013-10-06 19:19:18 -07:00
John Spurlock
bd95740648 Transparent system ui flags -> Translucent WM flags.
Migrate View.SYSTEM_UI_FLAG_TRANSPARENT_(STATUS/NAVIGATION) to
WindowManager.LayoutParams.FLAG_TRANSLUCENT_(STATUS|NAVIGATION).

Add associated public attrs for both new window flags:
  windowTranslucentStatus
  windowTranslucentNavigation

Introduce convenient four new themes that set translucent decor:
  Theme.Holo.NoActionBar.TranslucentDecor
  Theme.Holo.Light.NoActionBar.TranslucentDecor
  Theme.DeviceDefault.NoActionBar.TranslucentDecor
  Theme.DeviceDefault.Light.NoActionBar.TranslucentDecor

Update PhoneWindowManager mechanism to plumb these values back to
SystemUI to drive bar mode state.

The new translucent flags come from the top fullscreen window, not
the focused window, so translucency does not change when opening
dialogs.

Imply some window-level system-ui visibility if one or both of these
new flags are present, specifically:
  FLAG_TRANSLUCENT_STATUS implies LAYOUT_STABLE, LAYOUT_FULLSCREEN
  FLAG_TRANSLUCENT_NAVIGATION implies LAYOUT STABLE, LAYOUT_HIDE_NAV

Rename all associated variable & resource names to use the term
translucent instead of transparent. (Retain the term semi-transparent
for the transient bar style).

Recents activity allowed to inherit translucent decor state via the
new PRIVATE_FLAG_INHERIT_TRANSLUCENT_DECOR.  Compensating changes
to use the full screen area more appropriately.

Update keyguard to use new WM flags.

Update docs and various api artifacts.

Sanity-check fixes:
 - Toasts and alerts given stable layout.
 - Suppress nu-gradient when in transient (hidey) mode.
 - New translucent flags use top-fullscreen window, dialogs don't clear.

Bug:10674960
Bug:11062108
Bug:10987178
Bug:10786445
Bug:10781433
Change-Id: If667a55bea4cf5e008549524b9899197fab55ebe
2013-10-06 16:03:53 -04:00
John Spurlock
e9335bab10 am 12585551: am c4b27478: am 8e0ca288: Window decor rect should not include the nav bar if hidden.
* commit '12585551f4ccf08906519b9e8e9b29a5b5de93b0':
  Window decor rect should not include the nav bar if hidden.
2013-10-04 09:10:48 -07:00
John Spurlock
b7ba2630bd am bee8af82: am c3752cfb: am e660ecc4: Merge "Store decor rects per window for transition cropping." into klp-dev
* commit 'bee8af8207938fb0d29b38d915be1803edc64d69':
  Store decor rects per window for transition cropping.
2013-10-04 09:10:17 -07:00
Adam Lesinski
38dc2ad85e am b2db2fbc: am 6d90862f: am d65825ab: Merge "Private flags are masked in correct variable" into klp-dev
* commit 'b2db2fbce33dbcfa52ccb20267ad4897c558c34f':
  Private flags are masked in correct variable
2013-10-03 16:43:17 -07:00
John Spurlock
12585551f4 am c4b27478: am 8e0ca288: Window decor rect should not include the nav bar if hidden.
* commit 'c4b274782793e33d58cb119b3c294bbb31daea14':
  Window decor rect should not include the nav bar if hidden.
2013-10-03 15:39:15 -07:00
John Spurlock
bee8af8207 am c3752cfb: am e660ecc4: Merge "Store decor rects per window for transition cropping." into klp-dev
* commit 'c3752cfb6d5381795433ccdbcd8f84cada832790':
  Store decor rects per window for transition cropping.
2013-10-03 15:38:52 -07:00
Adam Lesinski
b2db2fbce3 am 6d90862f: am d65825ab: Merge "Private flags are masked in correct variable" into klp-dev
* commit '6d90862f2387d24c28e9d1c8f080cb9a4ff15011':
  Private flags are masked in correct variable
2013-10-03 15:38:44 -07:00
John Spurlock
8e0ca288fe Window decor rect should not include the nav bar if hidden.
Bug:11059726
Change-Id: Ia445af030ac34da8e361d909978caa3f2793cfda
2013-10-03 11:46:06 -04:00
John Spurlock
e660ecc436 Merge "Store decor rects per window for transition cropping." into klp-dev 2013-10-03 02:28:58 +00:00
Adam Lesinski
95c42974f7 Private flags are masked in correct variable
Newly added private flags were being masked in the public flag variable
as opposed to the correct privateFlags variable.

bug:11033280
bug:11043194
Change-Id: Idda3a70a083457f3f1b7d4b46d231f4a7e704cf0
2013-10-02 16:18:55 -07:00
John Spurlock
4664623c30 Store decor rects per window for transition cropping.
Instead of keeping a single global system decor rect around
in WindowManagerService, calculate and store policy-defined
system-decor frame for each window.

The per-window decor rect is useful for smooth transitions, since it
determines window cropping during transition animations.

Bug:10938001
Change-Id: Ice6652aa5946027c45c0b7ab4e46473a0f8e3f90
2013-10-02 18:12:16 -04:00
Adam Lesinski
49e43291b2 am 234c6c8a: am ff7cba54: am 42e9b631: Merge "Make room for new public flags" into klp-dev
* commit '234c6c8aafa4abc440d5bf38aac058b96ba1434c':
  Make room for new public flags
2013-10-02 09:44:23 -07:00
Adam Lesinski
234c6c8aaf am ff7cba54: am 42e9b631: Merge "Make room for new public flags" into klp-dev
* commit 'ff7cba54fc87509c94567d19c672693329868f7e':
  Make room for new public flags
2013-10-02 09:37:13 -07:00
Adam Lesinski
6a591f5859 Make room for new public flags
Moved two hidden flags to private

bug:11033280
Change-Id: Icca867b073aff643eefdaf84df68de86bb6b05ac
2013-10-01 18:48:20 -07:00
Jim Miller
d273cae2c4 resolved conflicts for merge of fb2e3c8d to master
Change-Id: Ic9fe2674e0eb82d071f9b547b6089acacf705576
2013-10-01 15:42:45 -07:00
Jim Miller
a192253bf2 am fb2e3c8d: Merge "Fix permissions on WindowManagerService.showAssistant()" into klp-dev
* commit 'fb2e3c8d47c162166a029a97d68ad3bedff89cce':
  Fix permissions on WindowManagerService.showAssistant()
2013-09-30 17:10:11 -07:00
Jim Miller
6c9df5054a Fix permissions on WindowManagerService.showAssistant()
Since binder call permissions are not transitive by design,
the proper way to fix this is to have the call talk directly
to keyguard from the navigation bar.

Fixes bug 9409008

Change-Id: Ibd90a79bb638c969b514455a2ad93c6ff668222d
2013-09-27 16:29:36 -07:00
Fabrice Di Meglio
eeff63a5c3 Update TimePicker widget and its related dialog
- the old TimePicker widget is still there for obvious layout compatibility reasons
- add a new delegate implementation for having a new UI based on a radial picker
- use the new delegate only for the TimePickerDialog (which does not need to be
the same)
- added support for Theming and light/dark Themes
- added support for I18N (hour formatting and time separator and also position of
AM/PM indicator coming from Unicode CLDR)
- added support for RTL
- verified support for Keyboard
- verified that CTS tests for TimePicker are passing (for both the legacy and the
new widgets)

Also added a new HapticFeedbackConstants.CLOCK_TICK and its related code for
enabling ticks vibration.

Change-Id: Ib9b53a152bd9e97383dc391ef8c26da91217298f
2013-09-27 12:09:41 -07:00
Jim Miller
4bf2c790b9 am 04b0840b: Merge "Accessibility improvements in keyguard - add accessibility descriptions to camera and search light - add new onClick handler to simplify launching search and camera - plumb camera launch through KeyguardService interface" into klp-dev
* commit '04b0840b2e5367547fdd92f4e2c68cde16486062':
  Accessibility improvements in keyguard - add accessibility descriptions to camera and search light - add new onClick handler to simplify launching search and camera - plumb camera launch through KeyguardService interface
2013-09-25 15:44:15 -07:00
Jim Miller
138f25d756 Accessibility improvements in keyguard
- add accessibility descriptions to camera and search light
- add new onClick handler to simplify launching search and camera
- plumb camera launch through KeyguardService interface

Fixes bug 10914360

Change-Id: Ic85eda9afadba7381be78b477180f7204030cd17
2013-09-25 15:01:19 -07:00
John Spurlock
d4c2b67ea6 am 560d2e46: Merge "Include starting windows in the sysui vis calculation." into klp-dev
* commit '560d2e463ed282badd1d069d60d98b59af3b880f':
  Include starting windows in the sysui vis calculation.
2013-09-20 09:27:59 -07:00
John Spurlock
79da83347a Include starting windows in the sysui vis calculation.
Sysui vis needs to be recomputed in the same code path as showing/
hiding the system bar (code path = finishPostLayoutPolicyLw) so
it can perform the new fade in/fade out to transparent modes at
the correct time.

Turns out no new state tracking is required, we already keep track
of this window as mTopFullscreenOpaqueWindowState.

So prefer mFocusedWindow when computing sysui vis as before,
but if null fallback to mTopFullscreenOpaqueWindowState.

Bug:10561554
Change-Id: I492766989a67fdac4f030451dcf00f6741a556c0
2013-09-20 12:04:47 -04:00
Jim Miller
f3d1ef00c5 am af638c4f: Merge "Add camera affordance to navigation bar on phones" into klp-dev
* commit 'af638c4f9daa74b4c8e0905f07e11290f6845abe':
  Add camera affordance to navigation bar on phones
2013-09-19 18:36:57 -07:00
Jim Miller
caf24fc2c4 Add camera affordance to navigation bar on phones
This adds a camera button on phones that can be used to show
and launch the camera.

- Minor refactoring of touch event dispatch in PagedView.
- Disables usability hints when keyguard loads.
- Only add a touch handler for camera icon once during layout.
- Update after review.
- Updated with latest UX camera and camera background assets

Change-Id: I09cd5cb0e501fd0f4659bea96d00c92b07f805c4
2013-09-19 17:14:59 -07:00
John Spurlock
74d2136477 am c8d19b89: Merge "Update transient navigation confirmation wording & behavior" into klp-dev
* commit 'c8d19b894ebe659d9508a9a4763388d8573c6d76':
  Update transient navigation confirmation wording & behavior
2013-09-16 16:08:09 -07:00
John Spurlock
d67ec25a9c Update transient navigation confirmation wording & behavior
1. Decrease transient navigation confirmation annoyance.

  - Only use the power-key as a signal if we detect a screen-off
    screen-on within a short threshold value.

 - Auto-confirm if user performs the indicated gesture.

 - Remember confirmation across reboots.

2. Update wording to new final wording.  Remove now obsolete
short + long versions.  Decrease message font temporarily
until the new platform toast redesign is finalized.

3. Remove pre-ship ImmersiveModeTesting debug helper.

Bug:10602929
Change-Id: I0bff826391058c7b282eeb61817b93b79de84893
2013-09-16 17:12:17 -04:00
John Spurlock
3739e91176 am 6421aa06: Merge "Fix glitch launching new windows from transparent launcher." into klp-dev
* commit '6421aa061a66312466bfa659e7fcad14c8f18834':
  Fix glitch launching new windows from transparent launcher.
2013-09-16 08:57:27 -07:00
John Spurlock
eda1f69844 Fix glitch launching new windows from transparent launcher.
Part 1 of 2: Ignore remembered sysui visibility transparent flag
value when computing global content frame.

Since this fixes a visible window layout glitch, get this in asap.

Bug:10561554
Change-Id: Ia3fd69ee65eb3f34fb3a684b697c98e37fabc0b0
2013-09-16 11:38:44 -04:00
John Spurlock
d17b576d5e am fa055694: Merge "Promote lights-out to a bar transition mode." into klp-dev
* commit 'fa0556943ee386e83d190f1de86d73d81e08cc8a':
  Promote lights-out to a bar transition mode.
2013-09-14 14:32:04 -07:00
John Spurlock
7edfbca5d0 Promote lights-out to a bar transition mode.
Move all visual application of the legacy lights-out behind
a new mode managed by BarTransitions for better coordination.

Remove unused "hidden" state in NavigationBarView.

Improve window state (showing/hiding/hidden) calculation,
affecting whether or not sysui thinks it should animate.
Removes invalid interim mode changes causing needless
flashing during some transitions.

Consider WINDOW_STATE_HIDING a state in which we ought to animate,
since at least part of the window is visible throughout.

Make the status/nav bar transition helper classes real boys.

Animate KeyButtonView drawing alpha transition, cancel existing
animations when resetting to avoid needless and unsightly "recovery".

Bug:10746803
Change-Id: Ibd883da9041d071b6a4ff5b42cf96efba7696e9c
2013-09-14 16:58:57 -04:00
Adam Powell
179ba0c04b am a2906cb4: Merge "Show alternate menu panel on devices with menu key" into klp-dev
* commit 'a2906cb4d9355b7a08e7fdec1924c2dbc7fda622':
  Show alternate menu panel on devices with menu key
2013-09-12 11:13:58 -07:00
Adam Powell
a2906cb4d9 Merge "Show alternate menu panel on devices with menu key" into klp-dev 2013-09-12 18:12:05 +00:00
Amith Yamasani
390322a330 am 4d73951a: am c286ae17: Merge "GlobalAction dialog ref not set to null"
* commit '4d73951a90d7b9b81146487df5a9d772351d29c1':
  GlobalAction dialog ref not set to null
2013-09-12 09:49:56 -07:00
Adam Powell
5fcf5b9fd3 Show alternate menu panel on devices with menu key
Provide a softer transition to the overflow-everywhere world for
devices with menu keys. The panel menu will still be used on these
devices in response to a menu key press even in the presence of an
action bar with overflow.

Fix a few lingering bugs around dispatching the open-overflow
transition that caused problems with this along the way.

Change-Id: I9d77c70f6d15c47160ac06292984101d619c44e6
2013-09-11 19:17:38 -07:00
Dianne Hackborn
95d785346b Fix issue #10688644: Java crash in com.android.phone:
java.lang.SecurityException: Operation not allowed

There was a situation I wasn't taking into account -- components
declared by the system has a special ability to run in the processes
of other uids.  This means that if that code loaded into another
process tries to do anything needing an app op verification, it will
fail, because it will say it is calling as the system package name but
it is not actually coming from the system uid.

To fix this, we add a new Context.getOpPackageName() to go along-side
getBasePackageName().  This is a special call for use by all app ops
verification, which will be initialized with either the base package
name, the actual package name, or now the default package name of the
process if we are creating a context for system code being loaded into
a non-system process.

I had to update all of the code doing app ops checks to switch to this
method to get the calling package name.

Also improve the security exception throw to have a more descriptive
error message.

Change-Id: Ic04f77b3938585b02fccabbc12d2f0dc62b9ef25
2013-09-11 09:59:47 -07:00
Craig Mautner
d625ab2afb Fix deadlock by keeping local copy of currentUserId
Fetching current user id from activity causes a deadlock when
holding the window manager lock.

Fixes bug 10555852.

Change-Id: Ib7911ef28b81aaf7f02cce311be193b36677a26d
2013-09-06 15:43:23 -07:00