Make sure the dock rect in PWM takes the nav bar height
into account when translucent. This forms the basis of
many other window calculations, and has multiple downstream
effects.
Fixing this exposed the fact that the Keyguard was not allowed
to fall into the LAYOUT_HIDE_NAV codepath (since it's not an app
window) - so add TYPE_KEYGUARD to that path.
Bug:11157555
Change-Id: I6b1fc4da973a246b80ec108a561e06f6d8a6a92b
Instead of a custom onDraw in order to stay 100% in sync with abrupt
layout changes.
Also use the unrestricted layout bottom to avoid unnecessary
fitSystemWindows churn.
Bug:11162351
Change-Id: If9bb9a52d503e348d642bf1238f75c4a418ad805
Layout IMEs below the nav bar, offset by bottom padding and
associated guard rectangle with a black background to ensure
they do not appear as islands during transitions.
This makes it safe to remove the SystemUI forced opaque transition
when showing an IME, making the overall transition less expensive,
quicker and smoother overall.
Bug:11058746
Change-Id: I460912ee7c117480c57b947ed31eca330819f32c
The requirement that a window that is invisible will not be drawn is
incorrect. In particular the test fails before a surface has even been
added (mHasSurface == false) or shown (mPolicyVisibility == false).
This was causing the screen to turn on before Keyguard had been drawn
and exposing surfaces that would have normally remained hidden.
Also, don't pass null into KeyguardServiceDelegate.onShown() or we
will immediately turn the screen on before Keyguard is drawn.
Fixes bug 11062635.
Change-Id: I964c7ef186d0a94678020b9c27ca6b79e5433350
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
Recently removed when they went private, but that was wrong:
they still affect layout.
Bug:11128955
Change-Id: Ic94230732a6b2ff3dcaa79b03e181a4e46585902
They can affect the system decor state, cropping to their
current requested state is too aggressive.
Bug:11079003
Change-Id: Ifec576d41cdefd1b851463d4b12311f1a8e27b3d
Specifically, ignore any flags that alter the visibility of the navigation
bar and transparency.
BUG: 11082573
Change-Id: I17264dc55a1c6c3cb9b9cf92d5121799cecee5b8
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
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
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
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
* 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
- 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
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
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
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
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
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
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
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
Fetching current user id from activity causes a deadlock when
holding the window manager lock.
Fixes bug 10555852.
Change-Id: Ib7911ef28b81aaf7f02cce311be193b36677a26d