2308 Commits

Author SHA1 Message Date
Jean-Michel Trivi
6a5702041f Merge "RemoteControlClient receives playback position change requests" into jb-mr2-dev 2013-04-03 21:11:12 +00:00
Justin Koh
ddd168d65f Merge "Add global key configuration file" into jb-mr2-dev 2013-04-03 01:11:53 +00:00
Justin Koh
d378ad74c6 Add global key configuration file
Add global key configuration file. A global key is one that is handled by
PhoneWindowManager before dispatching and sent to a given component via
broadcast instead of going to the foreground app.
Bug: 8510681

Change-Id: Ic6a8e559680d005613ed22874b27eb78bbfc4499
2013-04-02 18:09:27 -07:00
Jim Miller
c801b21b42 Change time format for default clock in keyguard
This changes the default clock format from "kk:mm" to "HH:mm"

Fixes bug 8447801

Change-Id: I25f0c406dbecba8288773c9d13d0092485274af5
2013-04-02 16:03:02 -07:00
Jean-Michel Trivi
3261b537c5 RemoteControlClient receives playback position change requests
RemoteControlClient defines two listener interfaces for playback
  position, one to let the framework query the current playback
  position, the other to request playback to seek to a given
  position.

Updated IRemoteControlDisplay interface to support passing info
  about whether the user of RemoteControlClient can provide a
  playback position, and receive a new one.
Updated implementations of IRemoteControlDisplay to new
  interface.

Bug 8120740

Change-Id: I1a5a969da4d0f8c9ad27f691919dd08f8653982b
2013-04-01 18:14:30 -07:00
Brian Colonna
b1b9a8ac07 FUL now restarts when flipping tablet 180 (bug 7484464)
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
2013-03-29 18:35:43 -04:00
Jean-Michel Trivi
bc43b4c2f2 RemoteControlClient can report current position, speed
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
2013-03-29 09:47:48 -07:00
Elliott Hughes
94eaab4a5d am 3ae30483: am a19647d3: Merge "Correct executable bit for source files [Take 2]"
* commit '3ae30483777708ff3a4f59a4fa75c6a76213cc30':
  Correct executable bit for source files [Take 2]
2013-03-28 14:29:21 -07:00
Adam Powell
5c8f9b50be Fix an action bar menu order of operations bug
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
2013-03-27 12:24:58 -07:00
Chirayu Desai
3e4a3ea2ff Correct executable bit for source files [Take 2]
Change Ieb51bafb46c895a21d2e83696f5a901ba752b2c5 left out some
files, this fixes them.

Change-Id: Ia949a8581668836ea0251602e048f09c852f5169
2013-03-27 16:52:35 +05:30
Eric Laurent
83a017b6b7 audio service: add config option for fixed volume
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
2013-03-21 18:43:00 -07:00
John Spurlock
62a4858b79 Merge "Hide carrier string when emergency call button pressed." into jb-mr2-dev 2013-03-21 10:52:25 +00:00
Jim Miller
c81a5d6321 Fix bad merge in KeyguardHostView
This restores the fix detailed in Change-Id: I866d4b42493df3a6449d8eabc3ea140dc39dac57

Change-Id: Ibe75afd7a612cf96a56e5815a198c2047c7ff5bd
2013-03-20 17:26:53 -07:00
John Spurlock
95a6fdfe96 Hide carrier string when emergency call button pressed.
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
2013-03-20 15:38:18 -04:00
Jim Miller
8f09fd2e31 Use persistent IRCD in KeyguardUpdateMonitor to show/hide music
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
2013-03-19 16:59:29 -07:00
John Spurlock
03eca85906 Enable back button in keyguard security account mode.
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
2013-03-14 15:23:35 -04:00
Jim Miller
6d4dac7423 Merge "Fix bug where Keyguard's emergencydialer wasn't being launched with a userid." into jb-mr2-dev 2013-03-14 00:00:15 +00:00
Jim Miller
450a3a1697 Fix bug where Keyguard's emergencydialer wasn't being launched with a userid.
Fixes bug 8374423

Change-Id: Iafbcefa431105202b68b3444cb1b42271fe0ccda
2013-03-12 18:54:44 -07:00
Jim Miller
8e26cd8687 Prevent momentary switch of keyguard to landscape
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
2013-03-12 18:45:28 -07:00
Jean-Michel Trivi
9e589b941b Keyguard remote control display artwork size
Update the album art bitmap size to the sent to the IRemoteControlDisplay of
 Keyguard on layout size changes.

Change-Id: I178eba8cbff3d4ffb5232318469c43d95da2f11f
2013-03-08 14:30:10 -08:00
Dianne Hackborn
d6a3e485b5 Merge "Unify normal and overlay action bar layouts." into jb-mr2-dev 2013-02-28 22:14:48 +00:00
Dianne Hackborn
df7221ced3 Unify normal and overlay action bar layouts.
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
2013-02-27 18:27:42 -08:00
Dianne Hackborn
c7288579c7 am 7f3a53a4: am 7b69e401: Merge "Fix starting window memory leak"
* commit '7f3a53a447d40db36f8f0c2b4c8c7305c5dd4429':
  Fix starting window memory leak
2013-02-27 20:09:27 +00:00
Dianne Hackborn
c4aad01cbb Formalize overscan metrics.
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
2013-02-22 19:14:37 -08:00
Craig Mautner
3c1743705c Create rotation animation modes.
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
2013-02-22 10:44:52 -08:00
Jim Miller
a75a883fe9 Add explicit userId to AppWidget binder calls
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
2013-02-20 15:41:14 -08:00
Dianne Hackborn
313440842b Overscan improvement: all apps extend to overscan area.
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
2013-02-19 19:28:11 -08:00
Michael Jurka
f9b9ead5d4 Merge "Fix bug with clock when keyguard widgets disabled" 2013-02-19 22:10:48 +00:00
Dianne Hackborn
c652de8141 Implement display overscan support.
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
2013-02-19 12:08:58 -08:00
Michael Jurka
fc2dbb2f3a Fix bug with clock when keyguard widgets disabled
Clock widget no longer alternates between
bold and non-bold versions

Bug: 7662061

Change-Id: I866d4b42493df3a6449d8eabc3ea140dc39dac57
2013-02-15 14:20:05 +01:00
Mathias Jeppsson
d1443e9944 Fix starting window memory leak
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
2013-02-13 11:14:23 +01:00
Craig Mautner
005f6f6077 Merge "Reset SensorEventListener when listener reenabled." 2013-02-11 17:47:14 +00:00
Craig Mautner
eee29c445c Reset SensorEventListener when listener reenabled.
- 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
2013-02-11 09:46:08 -08:00
Alan Viverette
b428b0fc5b Delay accessibility announcements in the keyguard.
Prevents interruption of announcements when magnification is enabled.

Bug: 7895569
Change-Id: I87ae1ee41ade2b59a0f1da8046c5bd23d0637da2
2013-02-07 12:19:15 -08:00
Dianne Hackborn
c2293025a2 App ops: track system windows, monitoring changes.
Change-Id: I273e82bdad66ada3bf0f7ec9176bc304b9ee1ee8
2013-02-06 23:59:56 -08:00
Romain Guy
15a4620b18 Fix graphics corruption in WiFi password dialogs
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
2013-02-04 18:49:38 -08:00
Dianne Hackborn
f265ea9d83 App ops: vibration, neighboring cells, dialing, etc.
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
2013-02-01 15:14:29 -08:00
Svetoslav Ganov
d0fd54648c Merge "Adding UI test automation APIs." 2013-01-29 03:16:40 +00:00
Michael Wright
a1deeba325 Merge "Add plumbing for Recent Apps keycode" 2013-01-28 22:32:45 +00:00
Dianne Hackborn
f9c5e0fe83 Add new API to propagate contextual data to the assist action
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
2013-01-23 14:39:13 -08:00
Michael Wright
c9ebea79b4 Add plumbing for Recent Apps keycode
Change-Id: Id1bd8deced1be924cf9b3bbbf19e689b6b759061
2013-01-22 21:26:18 -08:00
Svetoslav Ganov
80943d8daa Adding UI test automation APIs.
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
2013-01-22 17:56:53 -08:00
Amith Yamasani
d4fe37bee7 Merge "Rename bindService to bindServiceAsUser to follow convention." 2013-01-16 23:26:30 +00:00
Amith Yamasani
27b89e6658 Rename bindService to bindServiceAsUser to follow convention.
This is for the multi-user version of bindService, not the original.

Change-Id: Ib2de35941196accf387b1a276a77e6f9af805ec0
2013-01-16 12:30:11 -08:00
Chris Wren
56018e577e port system ui over to new ICU date formatting API.
Bug: 7288134
Change-Id: Icea2ff96fd91c6db66b3aad6f6653b21203351b1
2013-01-15 17:14:48 -05:00
Christopher Tate
58f41ecfa5 Migrate BUGREPORT_IN_POWER_MENU from Secure to Global settings
Bug 7273591

Change-Id: I5790f9d18ddf22282144be1c2d96dd4d706caa14
2013-01-11 15:40:36 -08:00
Jeff Sharkey
ab82e35a59 Merge "Examine widget hierarchy to find clocks." 2013-01-11 10:56:40 -08:00
Jeff Sharkey
06c5f8a768 Examine widget hierarchy to find clocks.
When switching to a widget, examine its hierarchy to determine if it
contains TextClocks that show hour and minute for the local timezone.
If so, hide the status bar clock.  Doesn't fix closing walls.

Bug: 7667638
Change-Id: I1e2c40345c9e5eb0193efd70838c7ca9f779190b
2013-01-11 10:49:19 -08:00
Dianne Hackborn
9e6575bc52 am 854458f4: am 0287ca3c: am e62fa825: Merge from master: fix issue #7966357: Super lights out mode vs. volume dialog
* commit '854458f4d52937f9a1385559d759bd8019eb3294':
  Merge from master: fix issue #7966357: Super lights out mode vs. volume dialog
2013-01-09 19:01:26 -08:00
Dianne Hackborn
e62fa82579 Merge from master: fix issue #7966357: Super lights out mode vs. volume dialog
The volume panel now forces us out of the UI modes while it
is up.

Change-Id: If39fa33b1c52579bf5d376ce4722408cee3ca951
2013-01-09 18:51:51 -08:00