When a tablet rotates, FUL must be stopped and restarted in a new
position. 90 degree rotations cause a configuration change, causing
FUL to be automatically reconstructed in the new location. However,
a 180 degree rotation is not a configuration change, so FUL was not
restarting. A 180 degree rotation happens more often than one might
think. If you set the tablet down and later picked it up in the
opposite orientation, FUL would not work prior to this fix.
This change adds a rotation watcher to KeyguardFaceUnlockView. It
watches for 180 degree rotations and stops and restarts FUL
accordingly.
The rotation watcher callback must be unregistered when
KeyguardFaceUnlockView is recreated (as during 90 degree rotation
changes), otherwise the number of rotation watcher callbacks will keep
growing and they will never go away. This is a problem not just
because there are many callbacks hanging around, but also because the
old callbacks end up trying to access biometric unlock views that no
longer exist, resulting in crashes. So, a simple function was added
to the window manager to unregister a rotation watcher.
Change-Id: Ie1ef20a9a22b8f4e39918987dff2b8ad444fcfd1
Extend RemoteControlClient class to support reporting the
current playback position, and the playback speed.
Define listener for an application to receive new playback
position to seek to (use of listener to be implemented).
Update IRemoteControlDisplay implementations to new interface.
bug 8120740
Change-Id: I2654daeca1ac49713d325df8226dceb85943c020
As options menu invalidations in PhoneWindow are deferred, it was
possible for a call to open the overflow menu (which involves an extra
chance to prepare the menu) to happen before the pending menu
invalidation was handled. Process any pending menu invalidations
before attempting to show the overflow menu in response to one of
these events.
Bug 7209308
Change-Id: Id50f7f6ad5d3a631745207fa0bad8c356690e16c
Add a boolean configuration option config_useFixedVolume indicating if
stream volumes or master volume can be modified.
If the option is true, the AudioManager volume and mute APIs will be no ops and the
volumes will be maxed out.
To be consistent:
- the ringer mode is forced to normal and cannot be modified
- volume panel is never displayed
- volume settings are not available
- ringer mode global action is not displayed.
The default for this option if false.
This is useful for a class of devices intended for connection to a digital
audio output only, where the volume is directly controlled on the audio sink.
Bug 8161458
Change-Id: I2571d5ee79952ef0914d8fd1985816467a80adcd
The emergency call button area overlaps the carrier text area,
which is only noticeable when pressed/highlighted.
Smoothly hide the carrier text when the emergency call button is
pressed.
Bug:8424348
Change-Id: I78ba97739d58cc7f974e36dca81cfcd42703d3fe
Now that we can have multiple IRemoteControlDisplays, create a
persistent one in KeyguardUpdateMonitor so we can more efficiently
show and hide the music controls in keyguard.
Update after review: get the current state from KeyguardUpdateMonitor
*before* the first call to showApprpriateWidgetPage(). This fixes
a flash that was sometimes seen when transitioning between orientations.
Fixes bug 7517659
Change-Id: I1b7b6f4222a99891ec06d6b6fd779dd0b86cc367
Otherwise hitting "Forgot Pattern" traps you in account mode.
Avoid the known case where account is not backup (if permanently
locked).
Bug: 8381295
Change-Id: Ifda28eec6d0609e822b210831ff0ea0ec6cb22b1
This fixes a bug where keyguard was created without setting
the preferred orientation. The result is it would temporarily
assume the orientation of the device after being hidden.
The fix sets the flag when the keyguard view hierarchy is created
rather than when visibility changes.
Fixes bug 8124979
Change-Id: Ic54a185e4f51f79f2bb7fbc5ffc6992641e89132
Update the album art bitmap size to the sent to the IRemoteControlDisplay of
Keyguard on layout size changes.
Change-Id: I178eba8cbff3d4ffb5232318469c43d95da2f11f
- remove userActivity() from KeyguardService interface and call it
on PowerManager directly
- Split IKeyguardResult into two parts: IKeyguardShowCallback and
IKeyguardExitCallback.
- Misc other changes from the review.
Change-Id: I3f679cfa5d3f8bc742f2b2259ac354045e89a87b
This fixes a bug on userdebug builds where dexopt hadn't completed
before the service is needed. The resulting crash prevented dexopt
from completing, resulting in a reboot loop and perpetual issue starting
the service.
The solution is to hold off on creating keyguard until the system is ready.
It also moves the creation of the AccessibilityManagerService singleton back
into the system process.
Fixes bug 8287106
Change-Id: I96e15c084d38c255fd8f6bca6f21a0785b82ec74
Switch the action bar to always use the overlay layout, and
make it smarter to do the right thing depending on whether the
action bar is in overlay mode or not.
This allows apps to use the system UI magic flags without
having to worry about whether the action bar is configured
in overlay mode or note -- just select a stable layout and it
will automatically go into overlay mode.
In the future this should also allow us to simplify the action
bar code, since it is all sitting on one common implementation.
For example, much of the logic in ActionBarImpl can be moved
to the root action bar layout, and that layout can be optimized
to do custom layout with all of the known elements it has.
Also fixed a little bug in the performance tests.
Change-Id: Iec0c0c0699754f0d1ce37402d786b4966e052a56
This is in preparation to moving keyguard into its own process.
Moved keyguard source and resources into new .apk.
Got basic test app working. Still need to implement MockPatternUtils
and means to pass it into KeyguardService with local binder interface.
Added new ACCESS_KEYGUARD_SECURE_STORAGE permission.
Temporarily disabled USER_PRESENT broadcast.
Remove unintentional whitespace changes in PhoneWindowManager, etc.
Checkpoint basic working version.
Move to systemui process.
Synchronize with TOT.
Sync with recent user API changes.
Fix bug with returing interface instead of stub for IKeyguardResult. Create KeyguardServiceDelegate to allow
for runtime-selectable local or remote interface.
More keyguard crash robustness.
Keyguard crash recovery working. Currently fails safe (locked).
Fix selector view which was still using frameworks resources.
Remove more references to internal framework variables. Use aliases for those we should move but
currently have dependencies.
Allow runtime switching between service and local mode.
Fix layout issue on tablets where orientation was reading the incorrect constant
from the framework. Remove more framework dependencies.
Fix PIN keyboard input.
Remove unnecessary copy of orientation attrs.
Remove unused user selector widget and attempt to get multi user working again.
Fix multi-user avatar icon by grabbing it from UserManager rather than directly since
keyguard can no longer read it.
Merge with AppWidget userId changes in master.
Change-Id: I254d6fc6423ae40f6d7fef50aead4caa701e5ad2
This is part 1 of two commits. This commit moves all keyguard
source and resources to a new com.android.keyguard package.
The second part of this change applies an overlay that makes
it work.
Change-Id: I360e9ac7783c6cb289c992733818b9535df185b9
The window manager now maintains and reports a new formal
"overscan insets" for each window, much like the existing
content and visible insets. This is used to correctly
position the various UI elements in the various combination
of layout options. In particular, this allows us to have
an activity that is using fitSystemWindows to have the content
of its UI extend out to the visible content part of the screen
while still positioning its fixed UI elements inside the
standard content rect (and the entire window extending all
the way into the overscan area to fill the screen as desired).
Okay, maybe that is not written so clearly. Well, it made
my head hurt too, so suffer!
The key thing is that windows now need to know about three
rectangles: the overall rectangle of the window, the rectangle
inside of the overscan area, and the rectangle inside of the
content area. The FLAG_LAYOUT_IN_OVERSCAN option controls
whether the second rectangle is pushed out to fill the entire
overscan area.
Also did some improvements to debug dumping in the window
manager.
Change-Id: Ib2368c4aff5709d00662c799507c37b6826929fd
Allow fullscreen windows to specify crossfade or jumpcut animations
that override the default rotation animation. Only if the incoming
and outgoing topmost windows are fullscreen and both specify the
same animation to use.
Fixes bug 8182773.
Change-Id: I6b3c0020d7bd2cdfba5c66189e114ec62cd54fcf
Keyguard currently relies on being in the system process to grab the
given user's widgets. When we split keyguard into a new process,
it will need to have access to user-specific info to instantiate a
specific user's widgets. In order to accomplish this, we add an
explicit userid to each binder call as well as new permission
check to allow keyguard access.
This also fixes a potential race condition of having an incorrect user id
due to an async call to change the user. Every binder call now has a specific
user id. The user id is either the calling process user's id or an explicit
one passed by applications like keyguard. It is created once when an
AppWidgetManager is instantiated and remains for the lifetime of the object.
Fixed bug where widgets sometimes didn't show up for secondary users.
Moved permission check in AppWidgetService into getImplForUser()
Refactored to use userid from context associated AppWidgetManager instance.
Clean up AppWidgetHost to use userId from Context.
Remove redundant userId check in checkPermission since it's handled by
ActivityManager.handleIncomingUser()
Removed redundant userid check.
Upload after rebase...
Change-Id: Iae3e20f2b342c323bb58768b3d22051510f8268b
Introduce another new rectangle in window layout, the
restricted overscan region. This is for windows that can
be in the restricted region (that is, full screen but with
hard restrictions like the nav bar) but whose content can
be adjusted for the overscan constraints.
In other words, normal application windows now always extend
into the overscan region, and we push their content inside
of it.
Change-Id: Ibccf3d7f144912d49de3fc497c1ec2e8e0b7f714
The window manager now keeps track of the overscan of
each display, with an API to set it. The overscan impacts
how it positions windows in the display. There is a new set
of APIs for windows to say they would like to go into the
overscan region. There is a call into the window manager to
set the overscan region for a display, and it now has a
concept of display settings that it stores presistently.
Also added a new "wm" command, moving the window manager
specific commands from the "am" command to there and adding
a new now to set the overscan region.
Change-Id: Id2c8092db64fd0a982274fedac7658d82f30f9ff
If starting window is added to arrays like mViews in
WindowManagerImpl.java, but not accepted by WindowManagerService,
we leak starting windows. To avoid leaking, remove the view
from WindowManager.
Change-Id: I4d98b883e9dfaf5e71bdece385643ba1b59b2633
- Following disable and reenable of the WindowOrientationListener
the state was the same as before. State should be reset to default.
- Provide a Handler to the sensor task to deliver events on the
same Thread that WindowManagerPolicy operates on.
- Expand lock protection to all of WindowOrientationListener.
- Move WindowOrientationListener to policy package.
- Make SensorEventListenerImpl non-static.
Fixes bug 7964531.
Change-Id: I17cecf3d0b6d125cb3e4d7350c3adb3f62b684bd
The ActionBarContextView popup window was set to use the "layout in screen"
and "inset decor" flags even though it's not a fullscreen window. This was
causing the popup window to be created by taking up all the available space.
Because the views inside the popup window are wrap_content, this would cause
part of the window to not be drawn and since the window is, correctly,
marked opaque, we would get random graphics corruption on screen (the user
would see the content of the tiles on a tiled renderer such as QCOM's.)
This change simply removes the two unnecessary flags from the popup window,
forcing it to be created and laid out at the exact size it needs. It will
be properly positioned by the window manager underneath the status bar.
An interesting side effect is that the window is now smaller than before
(since it doesn't extend underneath the status bar) which saves a bit of
memory.
The popup window also contains an unncessary black background behind the
action bar context view. This helps in a way because it allows us to
create an opaque window but it increases the required bandwidth to draw
that window. Given the benefits for SF it's probably best we keep the
window the way it is for now.
Change-Id: I4aeeb42a6232ff6b71811e766846d45635eb3365
Improve handling of vibration op, so that apps are
better blamed (there is now a hidden vibrator API that
supplies the app to blame, and the system now uses this
when vibrating on behalf of an app).
Add operation for retrieving neighboring cell information.
Add a new op for calling a phone number. This required
plumbing information about the launching package name through
the activity manager, which required changing the internal
startActivity class, which required hitting a ton of code that
uses those internal APIs.
Change-Id: I3f8015634fdb296558f07fe654fb8d53e5c94d07
When launching an assist, we have a new API allowing the
current foreground activity/application to provide additional
arbitrary contextual information that is stuffed in the
assist intent before it is launched.
Change-Id: I0b2a6f5a266dc42cc0175327fa76774f814af3b4
This change adds APIs support for implementing UI tests. Such tests do
not rely on internal application structure and can span across application
boundaries. UI automation APIs are encapsulated in the UiAutomation object
that is provided by an Instrumentation object. It is initialized by the
system and can be used for both introspecting the screen and performing
interactions simulating a user. UI test are normal instrumentation tests
and are executed on the device.
UiAutomation uses the accessibility APIs to introspect the screen and
a special delegate object to perform privileged operations such as
injecting input events. Since instrumentation tests are invoked by a shell
command, the shell program launching the tests creates a delegate object and
passes it as an argument to started instrumentation. This delegate
allows the APK that runs the tests to access some privileged operations
protected by a signature level permissions which are explicitly granted
to the shell user.
The UiAutomation object also supports running tests in the legacy way
where the tests are run as a Java shell program. This enables existing
UiAutomator tests to keep working while the new ones should be implemented
using the new APIs. The UiAutomation object exposes lower level APIs which
allow simulation of arbitrary user interactions and writing complete UI test
cases. Clients, such as UiAutomator, are encouraged to implement higher-
level APIs which minimize development effort and can be used as a helper
library by the test developer.
The benefit of this change is decoupling UiAutomator from the system
since the former was calling hidden APIs which required that it is
bundled in the system image. This prevented UiAutomator from being
evolved separately from the system. Also UiAutomator was creating
additional API surface in the system image. Another benefit of the new
design is that now test cases have access to a context and can use
public platform APIs in addition to the UiAutomator ones. Further,
third-parties can develop their own higher level test APIs on top
of the lower level ones exposes by UiAutomation.
bug:8028258
Also this change adds the fully qualified resource name of the view's
id in the emitted AccessibilityNodeInfo if a special flag is set while
configuring the accessibility service. Also added is API for looking
up node infos by this id. The id resource name is relatively more stable
compared to the generaed id number which may change from one build to
another. This API facilitate reuing the already defined ids for UI
automation.
bug:7678973
Change-Id: I589ad14790320dec8a33095953926c2a2dd0228b