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
- 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
And decouple it from the status bar opaque-on-interaction logic.
It's still important to track nav bar interaction for hideybar
suspension purposes.
Also fix a sysui NPE that can occur when restarting SystemUI
(vs the shell).
Bug:10606136
Change-Id: I66a15e02cff352e26b25aebc1c42fb58c042effa
Even if the bars are transparent / invisible.
Refactor the PSB bar mode override logic to take the IME hint into
account. Bars are overriden to opaque when hint is showing.
Initialize bar state to showing, fix bug that would mark state
as hidden pre-show (on shell restart).
Bug:10505132
Bug:9499956
Change-Id: I21e830e90c7e9812b4192ca65c3c0cd7a6b72798
Previously it was constrained to displayInfo.appWidth/appHeight
which comes from PWM.getNonDecorDisplayWidth/Height, which includes
the nav bar.
Also adjust window layout to entire screen.
This allows wallpaper to extend into the navigation bar region,
important if the nav bar is hidden or transparent.
Bug:10505328
Change-Id: Ia6057b9c57b476a48f3b2d8b6368fd631e944a3e
1. Migrate transparent transitions to the new optimized
background color animations.
2. Ensure sysui animation transparent -> opaque has enough
time to run before window manager crops off the content area.
3. Lose the individual alpha on each status bar icon if the bars
are not opaque. Animate the alpha if visible, make sure they
play together.
4. Documentation typo fix found in AnimatorSet.
Bug:10344949
Change-Id: I615668ce3c552d3df15dbba5cdeeca67549a0220
1. If app clears transient flag w/ a gesture, the touch-outside
listener would always win, causing an unsightly hide + immediate
reshow. Instead, give the app some time to clear the flag, then
perform a smooth transition in place.
2. When the transient bars are hidden, we do not know ahead of time
which background will be used on reshow (if transient bars are
revealed, the background is semi-transparent, if transient bars
are cleared, the background is opaque). Window manager is responsible
for showing windows, but sysui is responsible for setting the view
background. Therefore, we need some level of coordination between
the two in this case. Introduce two new non-public sysui flags
that represent the window manager's request to reshow the hidden
bars, but do not reshow until sysui acknowledges (by clearing the flag).
This gives sysui whatever time is necessary to prepare itself for
reshow, avoiding unsightly blip from opaque -> transparent during
the enter animation.
3. When both system bars are hidden, any low-profile changes are
moot. Avoid unsightly low-profile animations during bar reshow
by suppressing the flag in this case.
4. Improve transient bar home -> launcher transition by cancelling
the -> opaque animation. This also fixes a bug where hitting
home from the transient bar would leave you with a semi-transparent
bar in a non-transient state.
Bug:10284800
Change-Id: I238210561d8d5f70c1a517283b986c9105a1ec75
Also factor common bar-management code into a separate helper
class called BarController instead of continuing to pollute
PhoneWindowManager with duplicate logic.
Bug:10345412
Change-Id: I880900e61daa6c2c53b169e4885e68ebc62ecb6c
Ensure the nav bar is hidden, then wait about the same amount
of time before showing the prompt.
Bug:10312565
Change-Id: Ifbbbc55edf2e40844296e3e96fcc5b491f1b246f
Show the confirmation toast when hiding the transient
navigation bar only the first time per app, per reboot.
Hitting the power key while the transient nav is hidden
is taken as a signal of possible user confusion, so reshow
the prompt the next time.
This requires the confirmation prompt to live in policy
(not sysui). It arguably should have been here in the first
place, since the transient bar state/policy was here, and
sysui should not have not been able to fail to display
the prompt correctly.
Also take this opportunity to remove a hack wrt positioning
the confirmation properly while the nav bar is transitioning.
Toasts now support LAYOUT_HIDE_NAVIGATION if applied to the
toast's view.
Bug: 10246225
Change-Id: Ieb6355e4ca975c0758918a39e3c2ec13da81c7f4
- This enables keyboard navigation for window without focus.
- FLAG_LOCAL_FOCUS_MODE puts window into local focus mode.
- Application needs to put window in local focus mode, control focus, and
inject events to make dpad navigation work.
- Window in local focus mode does not interact with window manager or ime
regarding focus related events.
- Also renamed ViewRootImpl.dispatchKey to dispatchInputEvent to allow both key and touch events injection.
Change-Id: I8e8561f29e0dade3797fb7ae3ee7690e6b7f8895
Fix several problems in the way that the overscan was plumbed in
which could result in information not being delivered to applications.
There was also a violation of certain invariants regarding the
immutability of returned DisplayInfo objects.
Bug: 10213771
Change-Id: I21184a14305e44278b5e81353bf95d511e8517fb
Two new public sysui flags for views to request transparent
bars:
View.SYSTEM_UI_FLAG_TRANSPARENT_STATUS
View.SYSTEM_UI_FLAG_TRANSPARENT_NAVIGATION
This first change simply introduces the flags at the framework
level, and makes the requisite layout tweaks to WM.
As part of this change, expunge the term "hideybars" from the
codebase. The flag to declare support for transient bars is called:
View.SYSTEM_UI_FLAG_ALLOW_TRANSIENT
Final visuals/transitions between opaque/transparent bars will be
done as a subsequent change. Right now the transparent style is
identical to the transient bars.
Change-Id: I5ead9c5e7b77f212df5b2a5f6e770596cd2226f3
Devices can be configured to remain in their default landscape or
portrait orientation by setting config_forceDefaultOrientation true
in overlay/.../values/config.xml.
Activities that desire to run in the non-default orientation are
supported by creating a logical display within the physical display.
Transitions to and from the activity perform a crossfade rather than
the normal rotation animation.
Also, improve SurfaceTrace debug output.
Fixes bug 9695710.
Change-Id: I053e136cd2b9ae200028595f245b6ada5927cfe9
This was the victim of an earlier refactoring. Have the
ActionBarOverlayLayout draw this directly over the content so that it
can stay properly in sync with any animations and also remove an extra
couple of views from the decor layout.
Some apps now expect the broken behavior in default themes. Protect
them from themselves until they bump their targetSdkVersion.
Public bug https://code.google.com/p/android/issues/detail?id=58280
Change-Id: I4284503577e322f3e68d4a7fabda8441d3749b98
Provide system bar window visibility (showing/hiding) to sysui,
information it did not have before.
Use this new info to disable shade interaction when bars are hiding.
Bug: 8682123
Change-Id: I4105b789866f847582af1c68a703240d773fa71e
Swipe gestures now need only travel a status bar's length
to trigger. Name distance threshold variable appropriately
to avoid future confusion.
Bug: 10045892
Change-Id: I70fcf218e97c85e2653560bf2e2242d9c36537fd
Because windows of TYPE_SYTEM_ERROR lie in a layer above the
Navigation Bar they cannot be allowed to extend into the Navigation
Bar area or it will block touches to the Home button.
Fixes bug 9626315
Change-Id: Ib5e4a2d2954cb79adc98d69e3c43108cb1389cc9
The mNavigationBarCanMove variable was not reset when the dimensions
were restored using 'adb shell wm size reset'. This change restores
the correct value to it.
Fixes bug 9885741.
Change-Id: I6c9d3107fbc8a1e7acc0249691f4542cd8c07e93
- This window type can be used for Presentation created on top of virtual
private display.
- There can be PRIVATE_PRESENTATION specific policy / behavior, but for now,
there is nothing special.
Change-Id: I9fde0f0376e57fcc60000d3a3f8657a21ef58993
Look up the actual user id (package manager does not understand
UserHandle.USER_CURRENT) and return metadata during resolution
for subsequent checking.
Bug: 9738229
Change-Id: Ib060bacc84473b27a1fb2e717651dc84f018d6f9