2476 Commits

Author SHA1 Message Date
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
Dianne Hackborn
891d3fbb15 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: I25f29af5b6518aba695b64a75977ae240b742118
2013-01-09 18:31:37 -08:00
Jim Miller
995c25bbcb Merge "split active user animation across switch." 2013-01-08 14:45:11 -08:00
Chris Wren
f41c61bc15 split active user animation across switch.
Bug: 7626087
Change-Id: If743a4be498c624d2c4ec91989648e8be754ee4b
2013-01-08 16:35:13 -05:00
Craig Mautner
4b71aa1f8a Move app transition constants
Move app transition constants from WindowManagerPolicy to
AppTransition.

Change-Id: I8ae6c4d0da1db826c44eb4ea0c6b85016b50b1a3
2013-01-07 23:38:57 -08:00
Jim Miller
8ca2fc10ce Remove unused keyguard code
This change removes the old keyguard code because it's obsolete and doesn't run
anymore.

Change-Id: I8ed93f507378a17cf834d2ee9284c098eb8efffe
2013-01-02 17:07:56 -08:00
Craig Mautner
a2303750fb Merge changes I1dfe21e5,Ia0218bf8
* changes:
  Clean up warnings.
  Minor refactorings.
2012-12-19 16:40:18 -08:00
Craig Mautner
0bf6ec9e37 Clean up warnings.
Change-Id: I1dfe21e5f64364c90565b594e28074cabe7daa64
2012-12-18 10:03:21 -08:00
Amith Yamasani
5d8961e756 am 507ea24b: am ffdc7aed: Merge "avoid crashing system serer process"
* commit '507ea24b8f881f8af42393a0512c88cf7397edb9':
  avoid crashing system serer process
2012-12-15 15:10:30 -08:00
Amith Yamasani
507ea24b8f am ffdc7aed: Merge "avoid crashing system serer process"
* commit 'ffdc7aed5ec8f38706ddfad02d3df05493351083':
  avoid crashing system serer process
2012-12-15 14:57:40 -08:00
Svetoslav Ganov
545252f4fd Refactoring of the screen magnification feature.
1. This patch takes care of the case where a magnified window is covering an unmagnigied
   one. One example is a dialog that covers the IME window.

bug:7634430

2. Ensuring that the UI automator tool can connect and correctly dump the screen.

bug:7694696

3. Removed the partial implementation for multi display magnification. It adds
   unnecessary complexity since it cannot be implemented without support for
   input from multiple screens. We will revisit when necessary.

4. Moved the magnified border window as a surface in the window manager.

5. Moved the mediator APIs on the window manager and the policy methods on the
   WindowManagerPolicy.

6. Implemented batch event processing for the accessibility input filter.

Change-Id: I4ebf68b94fb07201e124794f69611ece388ec116
2012-12-14 16:27:27 -08:00
Amith Yamasani
ffdc7aed5e Merge "avoid crashing system serer process" 2012-12-14 09:04:30 -08:00
Craig Mautner
ae44659f30 Call adjustWallpaperWindowsLocked once per pass.
Also refactor a few methods and improve logging.

Change-Id: Ic54a1ff99f6de732b31cda5c06d36e8de01a269c
2012-12-12 10:09:19 -08:00
Jim Miller
0386410ead am 5b09fcc7: am 946f6ab4: am 9819a617: Merge "Fix password field focus in keyguard" into jb-mr1.1-dev
* commit '5b09fcc71664383ba73eb2074e52141d5e6abf9e':
  Fix password field focus in keyguard
2012-12-06 23:22:27 -08:00
Winson Chung
f90b03771d am f882bc33: am a1bc0979: am 0db59a85: Revert "Saving and restoring current page when rotating in lockscreen. (Bug 7568412)"
* commit 'f882bc336794909b4c145462cfedc8e28a8494ec':
  Revert "Saving and restoring current page when rotating in lockscreen. (Bug 7568412)"
2012-12-06 23:22:23 -08:00
Jim Miller
5b09fcc716 am 946f6ab4: am 9819a617: Merge "Fix password field focus in keyguard" into jb-mr1.1-dev
* commit '946f6ab44048138c03f9bcf93451322b4397f8f9':
  Fix password field focus in keyguard
2012-12-06 18:59:24 -08:00
Winson Chung
f882bc3367 am a1bc0979: am 0db59a85: Revert "Saving and restoring current page when rotating in lockscreen. (Bug 7568412)"
* commit 'a1bc0979a8cd7389ef4f7f4800fc58cd987ffee2':
  Revert "Saving and restoring current page when rotating in lockscreen. (Bug 7568412)"
2012-12-06 18:59:19 -08:00
Jeff Sharkey
4bef5ac8c7 Merge "Wire KEYCODE_SYSRQ up to take screenshot." 2012-12-06 09:35:40 -08:00
Jeff Sharkey
2991fa35a5 Wire KEYCODE_SYSRQ up to take screenshot.
Change-Id: If7eee811d43ac88c7d206c61f264c3e5f63aa5b3
2012-12-05 18:07:05 -08:00
Jim Miller
9819a61745 Merge "Fix password field focus in keyguard" into jb-mr1.1-dev 2012-12-05 16:37:52 -08:00
Winson Chung
0db59a856f Revert "Saving and restoring current page when rotating in lockscreen. (Bug 7568412)"
This reverts commit 6cbc2e81742039969e081a9eed02060fb8789e25.
2012-12-05 16:04:23 -08:00
Jim Miller
42df15e93d Fix password field focus in keyguard
This fixes a bug introduced in Change-Id: I34b7db402401a824f463d35d7546c05dc2979243 where
the top-most view was allowed to capture focus in order to ensure the device handled volume
key events.

This resolves the issue by restoring previous behavior and ensures we still handle media keys,
regardless of focus.

Fixes bug 7676996

Change-Id: Id2d1200be81640e4b4b7b5e3a0af099d6fc2d259
2012-12-05 15:15:00 -08:00
Amith Yamasani
c1493e1a01 am 368ee53f: am f663cad2: am 6c58b155: Merge "Make 3rd party lockscreen widgets work on secondary users" into jb-mr1.1-dev
* commit '368ee53f25cdff7ea89293d2cc81e95816919369':
  Make 3rd party lockscreen widgets work on secondary users
2012-12-05 13:00:41 -08:00
Winson Chung
a5c40b774c am 46a1a4b2: am 8f90249d: am ca83e1d5: Merge "Saving and restoring current page when rotating in lockscreen. (Bug 7568412)" into jb-mr1.1-dev
* commit '46a1a4b2febc504a1ceb5429ac329264b158929c':
  Saving and restoring current page when rotating in lockscreen. (Bug 7568412)
2012-12-05 12:23:27 -08:00
Amith Yamasani
368ee53f25 am f663cad2: am 6c58b155: Merge "Make 3rd party lockscreen widgets work on secondary users" into jb-mr1.1-dev
* commit 'f663cad2248d5d38957f8e1408cd794c0de90202':
  Make 3rd party lockscreen widgets work on secondary users
2012-12-05 06:06:02 -08:00
Amith Yamasani
6c58b155c3 Merge "Make 3rd party lockscreen widgets work on secondary users" into jb-mr1.1-dev 2012-12-05 05:45:00 -08:00
Jim Miller
e81f55bae8 am eac4be7e: am 4fa27f31: am 80a90efc: Merge "Fix ring volume issue by addressing focus regression in keyguard." into jb-mr1.1-dev
* commit 'eac4be7ef28a9dfba9e6cc6d0501b4bd2146041a':
  Fix ring volume issue by addressing focus regression in keyguard.
2012-12-04 21:53:44 -08:00
Winson Chung
46a1a4b2fe am 8f90249d: am ca83e1d5: Merge "Saving and restoring current page when rotating in lockscreen. (Bug 7568412)" into jb-mr1.1-dev
* commit '8f90249de422b10f5661ac437dd57fc034ee6933':
  Saving and restoring current page when rotating in lockscreen. (Bug 7568412)
2012-12-04 16:35:02 -08:00
Amith Yamasani
94022e8997 Make 3rd party lockscreen widgets work on secondary users
If you install a lockscreen widget app on a secondary user, lockscreen fails to find it.
There were several places where the correct context and userId were required under the
covers - AppWidgetHost, AppWidgetHostView and RemoteViewsAdapter.

Set the user id in the required places and use it to query the package information.

Bug: 7662835
Change-Id: Ife482c8ab2a2e601650b7cfe2660e88d3b8f2050
2012-12-04 16:25:38 -08:00
Winson Chung
ca83e1d541 Merge "Saving and restoring current page when rotating in lockscreen. (Bug 7568412)" into jb-mr1.1-dev 2012-12-04 14:38:54 -08:00
Jim Miller
eac4be7ef2 am 4fa27f31: am 80a90efc: Merge "Fix ring volume issue by addressing focus regression in keyguard." into jb-mr1.1-dev
* commit '4fa27f314038620fd3c50170d2f8caebeb6005bb':
  Fix ring volume issue by addressing focus regression in keyguard.
2012-12-04 12:33:49 -08:00
Jim Miller
80a90efcbf Merge "Fix ring volume issue by addressing focus regression in keyguard." into jb-mr1.1-dev 2012-12-04 12:29:16 -08:00
Jim Miller
147f9568af Fix ring volume issue by addressing focus regression in keyguard.
This fixes a regression where ring volume can be changed in keyguard.
Because KeyguardHostView is now being re-created in onScreenTurnedOff(),
it loses focus and the volume keys get handled by the fallback handler.

The fix is to ensure at least one child under KeyguardHostView has focus
whenever we re-create it.

Fixes bug 7546960

Change-Id: I34b7db402401a824f463d35d7546c05dc2979243
2012-12-03 18:48:52 -08:00