1. The old introspection model was allowing querying only the active window
which is the one the user is touching or the focused one if no window is
touched. This was limiting as auto completion drop downs were not inspectable,
there was not way to know when the IME toggles, non-focusable windows were
not inspectable if the user taps them as until a screen-reader starts
introspecting the users finger is up, accessibility focus was limited to
only one window and the user couldn't use gestures to visit the whole UI,
and other things I can't remember right now.
The new APIs allow getting all interactive windows, i.e. ones that a
sighted user can interact with. This prevents an accessibility service
from interacting with content a sighter user cannot. The list of windows
can be obtained from an accessibility service or the host window from an
accessibility node info. Introspecting windows obey the same rules for
introspecting node, i.e. the service has to declare this capability
in its manifest.
When some windows change accessibility services receive a new type
of event. Initially the types of windows is very limited. We provide
the bounds in screen, layer, and some other properties which are
enough for a client to determined the spacial and hierarchical
relationship of the windows.
2. Update the documentation in AccessibilityService for newer event types.
3. LongArray was not removing elements properly.
4. Composite accessibility node ids were not properly constructed as they
are composed of two ints, each taking 32 bits. However, the values for
undefined were -1 so composing a 64 long from -1, -1 prevents from getting
back these values when unpacking.
5. Some apps were generating inconsistent AccessibilityNodeInfo tree. Added
a check that enforces such trees to be well formed on dev builds.
6. Removed an necessary code for piping the touch exploration state to
the policy as it should just use the AccessibilityManager from context.
7. When view's visibility changed it was not firing an event to notify
clients it disappeared/appeared. Also ViewGroup was sending accessibility
events for changes if the view is included for accessibility but this is
wrong as there may be a service that want all nodes, hence events from them.
The accessibility manager service takes care of delivering events from
not important for accessibility nodes only to services that want such.
8. Several places were asking for prefetching of sibling but not predecessor
nodes which resulted in prefetching of unconnected subtrees.
9. The local AccessibilityManager implementation was relying on the backing
service being ready when it is created but it can be fetched from a context
before that. If that happens the local manager was in a broken state forever.
Now it is more robust and starts working properly once the backing service
is up. Several places were lacking locking.
bug:13331285
Change-Id: Ie51166d4875d5f3def8d29d77973da4b9251f5c8
- Add new audio restriction layer to app-ops. Restrictions add
additional constraints to audio operations at a stream-level.
Restrictions do not affect the persistable state, and are purely
additive: that is, they can only impose additional contstraints, not
enable something that has already been disabled. Restrictions
also support a whitelisted set of exempt package names.
- Add new audio stream-level checks to app-ops.
- Implement a provisional OP_PLAY_AUDIO suppression to three
java entry points MediaPlayer, AudioTrack, & SoundPool.
- Enhance vibrator api to take stream information as an optional
hint - the constants correspond to AudioManager stream types.
OP_VIBRATE now supports the stream-level restriction check.
- Simplify Vibrator subclasses by adding default implementations
for two .vibrate calls.
- Migrate NoMan's zen-mode control to use the new app-ops
stream-level restriction mechanism.
Change-Id: Ifae8952647202f728cf1c73e881452660c704678
When traversing windows save the fact that windows above the topmost
fullscreen window do not hide the lockscreen. If there is such a
window don't show it.
(cherry picked from commit ab55e524b89c13082193940a5bf8480a2c2522d9)
Fixes bug 13225149.
Change-Id: Ib6f33cbcfb2f60d8957a9184729ecdec80c6a236
These new keys behave in similarly to KEYCODE_POWER but do not
simply toggle between awake and asleep states.
Sleep puts the device to sleep if it is awake.
Wakeup wakes up the device if it is asleep.
Bug: 12938999
Change-Id: I260fb918cc858882fe06fa880910df5763a76c5d
On some products, it may not make sense to use the accelerometer
to perform auto-rotation. In that case, the product's config.xml
framework resource overlay should set config_supportAutoRotation
to false.
Setting this to false also disables auto-rotation settings.
Bug: 13211999
Change-Id: If9d7d72f2a2c576b14a4ff0afb61ea52c42c3357
Original commit message:
Add swipe-to-dismiss support to PhoneWindow.
This adds a new window feature -- FEATURE_SWIPE_TO_DISMISS -- and a
theme attribute to activate that feature. When the feature is
activated, a SwipeDismissLayout is inflated as the DecorView layout.
SwipeDismissLayout intercepts touch events and steals ones that are
large swipes to the right if its children don't. PhoneWindow
registers handlers that listen for these swipe events, translate the
window when necessary, and finish the activity at the end of the
gesture.
Conflicts:
core/java/android/view/Window.java
core/res/res/values/attrs.xml
Change-Id: I943290b436864ca4a1bd401b88d696e08c921cdd
This adds a new window feature -- FEATURE_SWIPE_TO_DISMISS -- and a
theme attribute to activate that feature. When the feature is
activated, a SwipeDismissLayout is inflated as the DecorView layout.
SwipeDismissLayout intercepts touch events and steals ones that are
large swipes to the right if its children don't. PhoneWindow registers
handlers that listen for these swipe events, translate the window when
necessary, and finish the activity at the end of the gesture.
Change-Id: I512e758f3c3ffd3b353dba3b911c0e80a88d6f5f
Remove private WM flag (used only by the volume panel) to force
the clearable system UI flags clear.
Instead, always lay out the volume panel as if the bars are visible,
as we do for system dialogs - and don't clear the flags.
Reverts part of I25f29af5b6518aba695b64a75977ae240b742118
Bug:11986621
Change-Id: I842729d729d2a6eb2a687d0b930ddb160c6a1b57
User 0 owns the window (system_server) but should be allowed
to display on a user's behalf.
Use the corresponding private flag for this system window, since
we cannot classify it by type (TYPE_TOAST) in policy.
Bug:12015090
Change-Id: I33aedb4624288415a5e1ae937676b693024546a9
When traversing windows save the fact that windows above the topmost
fullscreen window do not hide the lockscreen. If there is such a
window don't show it.
Fixes bug 13225149.
Change-Id: Ib6f33cbcfb2f60d8957a9184729ecdec80c6a236
This reverts commit 206e30cd93afe3eb72ec94178324417db5424ed2
along with removing the additional startActivity* methods
and replaces them with ActivityOptions makeSceneTransitionAnimation
methods.
Change-Id: I52bec31ae3c4cea6d549810ae5a7acd8aea176d8
Shared element transitions are enabled by default
when the Window has a TransitionManager.
Shared element location and size are captured and
transferred to the target Activity.
ActionBar is treated as a shared element.
Change-Id: I0f22ea4e5cbe80254e848444e3f235cb742684f4
Hide managed profiles from lockscreen user switcher on tablets.
Hide managed profiles from power menu user switcher on phones.
Add flag to enable multi user ui turned off by default.
Change-Id: I4c69a6f7b0f39c249fc85fd940318df1ddab073f
A task is scheduled for deletion after the final activity has
been removed and has animated away. But if another activity is then
added to the task the deletion flag must be reset.
Also added improved debugging.
Fixes bug 12987986.
Change-Id: I207ea6e9592a9e036d67aa5d1465b4acc5bdd120
When a doze component has been specified in a config.xml resource
overlay, the power manager will try to start a preconfigured dream
whenever it would have otherwise gone to sleep and turned the
screen off. The dream should render whatever it intends to show
then call startDozing() to tell the power manager to put the display
into a low power "doze" state and allow the application processor
to be suspended. The dream may wake up periodically using the
alarm manager or other features to update the contents of the display.
Added several new config.xml resources related to dreams and dozing.
In particular for dozing there are two new resources that pertain to
decoupling auto-suspend mode and interactive mode from the display
state. This is a requirement to enable the application processor
and other components to be suspended while dozing. Most devices
do not support these features today.
Consolidated the power manager's NAPPING and DREAMING states into one
to simplify the logic. The NAPPING state was mostly superfluous
and simply indicated that the power manager should attempt to start
a new dream. This state is now tracked in the mSandmanSummoned field.
Added a new DOZING state which is analoguous to DREAMING. The normal
state transition is now: AWAKE -> DREAMING -> DOZING -> ASLEEP.
The PowerManager.goToSleep() method now enters the DOZING state instead
of immediately going to sleep.
While in the doze state, the screen remains on. However, we actually
tell the rest of the system that the screen is off. This is somewhat
unfortunate but much of the system makes inappropriate assumptions
about what it means for the screen to be on or off. In particular,
screen on is usually taken to indicate an interactive state where
the user is present but that's not at all true for dozing (and is
only sometimes true while dreaming). We will probably need to add
some more precise externally visible states at some point.
The DozeHardware interface encapsulates a generic microcontroller
interface to allow a doze dream for off-loading rendering or other
functions while dozing. If the device possesses an MCU HAL for dozing
then it is exposed to the DreamService here.
Removed a number of catch blocks in DreamService that caught Throwable
and attempted to cause the dream to finish itself. We actually just
want to let the process crash. Cleanup will happen automatically if
needed. Catching these exceptions results in mysterious undefined
behavior and broken dreams.
Bug: 12494706
Change-Id: Ie78336b37dde7250d1ce65b3d367879e3bfb2b8b
Instead of keeping track of confirmations per-package, track
a global confirmation per-user. If the panic signal is received,
reshow the cling at most once per-user per-reboot.
Ensure the nav bar becomes visible after the panic signal.
Usually this happens as a side effect of showing the keyguard.
However, in the case where there is no keyguard (Security = None)
show the transient nav bar temporarily as a hint.
Also listen to the correct observer uri to pick up confirmation
setting changes.
Bug:12242125
Change-Id: Ic95e2a8630ec3802b8ef462fcaa92366b9343a3f
Specifically, the ability to force immersive-mode-like behavior
on the status bar, the navigation bar (or both) on a
package-by-package basis - and to disable immersive mode
confirmations for specific packages.
Change-Id: I2df7092a91eceeb815367ef917dd7289f4f2b27e
First pass at API for cross-Activity Scene transitions.
Remaining work:
Transition back
Automatically capture hero element info
Transfer of surface texture to synchronize between Activities
Possibly use scene names to indicate preferred transition
Change-Id: I59d07de1fae694a46b92b1c82525daa301ec1377
With an existing ActivityContainer a caller can now create an
ActivityView which consists of a new VirtualDisplay immediately
attached to the ActivityContainer.
Change-Id: Id70333dcbef55d524a87df8f8c92d72ca5579364
Enable power button end call and screen is off. User use power button
to turn on screen will end call. Should turn on screen and not end call
Change-Id: Idf34f7724dbf1796205332c5c7ef663102f8a30c
Signed-off-by: shower <shower929@gmail.com>
User 0 owns the window (system_server) but should be allowed
to display on a user's behalf.
Use the corresponding private flag for this system window, since
we cannot classify it by type (TYPE_TOAST) in policy.
Bug:12015090
Change-Id: I33aedb4624288415a5e1ae937676b693024546a9
* Add theme attributes for specifying a top-level TransitionManager
for an activity window.
* Add window feature for automatic content transitions. This
automatically assigns/creates a Scene for setContentView calls.
* Add named transitions. This allows apps to define APIs for
handshake-agreements about which exit/entrance transitions to play.
* Add new transition type for ActivityOptions. This lets the system
use ActivityOptions to communicate transition specifics and
arguments to the called activity.
* Have ActivityManager pass appropriate ActivityOptions through to the
called Activity. Have the called activity call back into the caller
to let it know which transition of a possible requested set was
chosen.
Still to do:
* Define and pass arguments for transitions. This will require
defining a Parcelable version of TransitionValues and deciding how
much leeway apps should have for these things.
* Determine how to appropriately filter the ActivityOptions bundle so
that only appropriate data reaches the target.
* Determine if generalizing the auto-Scenes functionality to
ViewGroups is appropriate.
Change-Id: I10684b926129ab2fbc1adec9ef31767237acae79