2669 Commits

Author SHA1 Message Date
Jeff Brown
861aa0073a am 26c6a50f: Rename isScreenOn() to isInteractive().
* commit '26c6a50f037c6af9c41b3f96269fe194748605ce':
  Rename isScreenOn() to isInteractive().
2014-04-11 09:24:24 +00:00
Jeff Brown
26c6a50f03 Rename isScreenOn() to isInteractive().
Fix build break due to an earlier merge.

Change-Id: I6e6583b251da9e027a4ade45cb4bb77e9d4ee624
2014-04-11 02:15:54 -07:00
Jeff Brown
858737d08d resolved conflicts for merge of 4e5c089e to master-lockscreen-dev
Change-Id: I456ff6be1e39b65f3e0efeb7fb1924e71d11f6b1
2014-04-11 01:47:08 -07:00
Jeff Brown
4e5c089ef3 resolved conflicts for merge of 337e764d to master
Change-Id: I8168dbf42b68c2f7b5ccb300e0080dddc627af26
2014-04-11 01:33:20 -07:00
Jeff Brown
337e764deb am f24687e2: Merge "Plumb display power state through display manager." into klp-modular-dev
* commit 'f24687e2731811fd0e3803b691fd47a659f89329':
  Plumb display power state through display manager.
2014-04-11 03:49:37 +00:00
Jeff Brown
037c33eae7 Plumb display power state through display manager.
Declare a new method, Display.getState() to retrieve the actual
power state of a display.

Improved documentation for Intent.ACTION_SCREEN_ON and
Intent.ACTION_SCREEN_OFF to clarify what they really mean in
terms of the interactive state of the device.

Deprecated PowerManager.isScreenOn() and replaced it with
PowerManager.isInteractive() with a more suggestive name and
better documentation.

Redirect display power state changes to go through the display
manager first and only then head over to the power manager for
legacy compatibility.

Eliminated the bright here and woke here policy flags since they
were unused.  Simplified the input dispatch policy somewhat.

Ensure that screen wake locks are respected up until the point
when dozing really begins.

Fixed a regression in DreamService where onDreamingStarted
might be called before onWindowAttached.

Bug: 13133142
Bug: 13472578
Bug: 13929355
Bug: 13760290
Change-Id: Iabef96921dd554ce3768fb18619cefc3230b5fb0
2014-04-10 20:46:14 -07:00
Adrian Roos
3850211afb Protect WindowManager's PRIVATE_FLAG_KEYGUARD
Enforce that only status bar can use the new keyguard flag.

Bug: 13635952
Change-Id: I807ffbb1e431fa187f22d030331374eb61dedcf3
2014-04-09 21:07:04 +02:00
Jorim Jaggi
5de6bf4210 Make FLAG_SHOW_ON_LOCKSCREEN work again.
Bug: 13635952
Change-Id: I50c5184c41e10e90e6547d810b2be9eed103e074
2014-04-09 18:58:21 +02:00
Jorim Jaggi
afd4a5531a Force status bar showing when Keyguard is showing.
Bug: 13635952
Change-Id: I5015f17010c853f70f5622b774b2c5b4e1d8332f
2014-04-08 19:04:42 +02:00
George Mount
c3bf3bb913 am 6fd0ef7f: Merge "Add Transitions useful for Activity transitions."
* commit '6fd0ef7f7367ce6e2272e9c517793d502fe7f8da':
  Add Transitions useful for Activity transitions.
2014-04-07 16:22:49 +00:00
George Mount
f4360efb52 am dde10d07: Merge "Implement "Back" for Activity Transitions."
* commit 'dde10d073f819e78c0b26d7f37ed10f01b45125c':
  Implement "Back" for Activity Transitions.
2014-04-07 16:22:46 +00:00
George Mount
d6107a3170 Add Transitions useful for Activity transitions.
Slide: transition in and out of the edge of the scene.
Explode: transition to the scene borders

Moved capability from Fade to Visibility.

Change-Id: Ibeb0d8f751c990edc467570d9665fbe251af2703
2014-04-07 09:14:09 -07:00
George Mount
cb4b7d999e Implement "Back" for Activity Transitions.
Change-Id: Iceaf888f57f2c7598f9291687ac9ad76d55bd82c
2014-04-07 09:00:13 -07:00
Alan Viverette
506a1eb436 am 43c290f0: Tint more icons, fix dialog styles and headers
* commit '43c290f05cae0a600243d2e1ad52a07e4ca5e003':
  Tint more icons, fix dialog styles and headers
2014-04-04 18:26:37 +00:00
Alan Viverette
43c290f05c Tint more icons, fix dialog styles and headers
BUG: 13795227
Change-Id: I4cf217748196512a5245468684246299205319f2
2014-04-04 11:20:06 -07:00
Jorim Jaggi
ae6ffcc3c7 Merge "Wait for Keyguard to be drawn after boot." into master-lockscreen-dev 2014-04-02 21:22:59 +00:00
Jorim Jaggi
cff0acb6b1 Wait for Keyguard to be drawn after boot.
The old logic with waiting for the Keyguard to be drawn assumed that
it is in an own window, and just checked for the visibility. This is
no longer possible as the Keyguard is in the status bar, and the status
bar might have been drawn without the Keyguard. So we have to wait
explicitely until Keyguard told PhoneWindowManager that it has now been
drawn and we can turn on the screen.

In addition, the starting logic of SystemUI is moved into
SystemUIApplication such the we can make sure that the status bar
already exists when the callbacks from PhoneWindowManager reach
KeyguardService. This simplifies the logic a lot.

Bug: 13635952
Change-Id: Ifd6ba795647edcf3501641e39052e4d04bc826fb
2014-04-02 22:11:19 +02:00
Craig Mautner
b67c41d281 am 74ee938d: resolved conflicts for merge of ffb22827 to master
* commit '74ee938dcc5e1ab0309dd87278e26f604c756b26':
  Fix FLAG_DISMISS_KEYGUARD not working
2014-04-01 22:27:00 +00:00
Craig Mautner
74ee938dcc resolved conflicts for merge of ffb22827 to master
Change-Id: Ia01028203dfe87df91c828d681289e92b9371e3c
2014-04-01 15:20:16 -07:00
Craig Mautner
ffb22827d7 am 2b6fe299: am c70f15fe: am 2fc798a2: resolved conflicts for merge of 8c6e6e73 to klp-dev
* commit '2b6fe2990de78cfb64a27c19e5351cffe3ccb7d6':
  Fix FLAG_DISMISS_KEYGUARD not working
2014-04-01 21:56:55 +00:00
Craig Mautner
2b6fe2990d am c70f15fe: am 2fc798a2: resolved conflicts for merge of 8c6e6e73 to klp-dev
* commit 'c70f15fe298655de02c2e72023fafe6fc33d2a55':
  Fix FLAG_DISMISS_KEYGUARD not working
2014-04-01 21:48:04 +00:00
Michael Kolb
dd54a9f867 am 4bb047fa: Fix build after bad merge resolution
* commit '4bb047fa5e6d43a027bfe1dfe23b3541e3910a31':
  Fix build after bad merge resolution
2014-04-01 21:47:55 +00:00
Michael Kolb
4bb047fa5e Fix build after bad merge resolution
Change-Id: I4af3aae1114d31847fc13d56ab03af8c7ef74577
2014-04-01 14:38:57 -07:00
Michael Kolb
2ece6e434a am 7fbde1e8: resolved conflict for merge of 2c73e08d to master
* commit '7fbde1e83703f800c98c1ef7c543f3146cfa43ef':
  Add outset to decor view measuring
2014-04-01 21:13:31 +00:00
Michael Kolb
7fbde1e837 resolved conflict for merge of 2c73e08d to master
Change-Id: Iee2e1f773469db0ba26b153193945a6c246af151
2014-04-01 14:06:11 -07:00
Craig Mautner
2fc798a227 resolved conflicts for merge of 8c6e6e73 to klp-dev
Change-Id: I9fc9bc3d935e9e730ebca767d848b1c66203f3b4
2014-04-01 13:57:37 -07:00
Michael Kolb
2c73e08d36 am 17bbd976: Merge "Add outset to decor view measuring" into klp-modular-dev
* commit '17bbd976c0971f25447b2ce66117f08029dc2fa9':
  Add outset to decor view measuring
2014-04-01 20:46:38 +00:00
Craig Mautner
d4d2aa519f am efbe7cc0: am d1c82f8f: am 1cb3c1d3: am fc80fbe3: am 7bd0b652: am 4bdab6bb: Fix FLAG_DISMISS_KEYGUARD not working
* commit 'efbe7cc0ff5c85cc7956bb3099402c7ebbe20591':
  Fix FLAG_DISMISS_KEYGUARD not working
2014-04-01 19:49:36 +00:00
Craig Mautner
efbe7cc0ff am d1c82f8f: am 1cb3c1d3: am fc80fbe3: am 7bd0b652: am 4bdab6bb: Fix FLAG_DISMISS_KEYGUARD not working
* commit 'd1c82f8fc22216e9b544e3a3b521bcad05bc113d':
  Fix FLAG_DISMISS_KEYGUARD not working
2014-04-01 19:43:41 +00:00
Craig Mautner
7bd0b65233 am 4bdab6bb: Fix FLAG_DISMISS_KEYGUARD not working
* commit '4bdab6bb4c55661d4915518b1190e30c4633c6a5':
  Fix FLAG_DISMISS_KEYGUARD not working
2014-04-01 19:18:36 +00:00
Craig Mautner
4bdab6bb4c Fix FLAG_DISMISS_KEYGUARD not working
Fixes bug 13672528.

Change-Id: I0292aee51d5d8755bbae926e5f0e6af1e22107dc
2014-04-01 12:10:54 -07:00
Michael Kolb
5de886a158 Add outset to decor view measuring
Change-Id: Ib0e68311ff8ed1fccf9219b28c42ee43c5952050
2014-03-31 16:49:55 -07:00
Jorim Jaggi
5cf17879a3 Reuse KeyguardViewMediator for new Keyguard implementation.
This change reuses KeyguardViewMediator for the new Keyguard
implementation in status bar. KeyguardViewManager is replaced by
StatusBarKeyguardManager which handles adding the view, setting the
state etc. StatusBarWindowManager is introduced to managed the window
of the status bar, which has the logic of both the old Keyguard window
and the old status bar window. In the current implementation, Keyguard
gets displayed like it would be in the bouncer state, but that's likely
to change in the future. Also, setHidden in IKeyguardService is also
renamed to setOccluded, as the word hidden interferes with the
terminology when dismissing the Keyguard.

Bug: 13635952
Change-Id: I1c5d5a49d810d8532089f464cb2efe35e577f517
2014-03-31 20:58:31 +02:00
Jorim Jaggi
8ae65aecc8 Address comments for I059d80d8b9b9818a778ab685f4672ea2694def63
Bug: 13635952
Change-Id: I5d2bd44b3588621f26d94baab161e4e2444197a8
2014-03-31 12:15:18 +00:00
Jorim Jaggi
bd490ad59f Merge "Make Keyguard a library and make StatusBar the new Keyguard." into master-lockscreen-dev 2014-03-31 12:05:54 +00:00
Wink Saville
562ea3fc7b am 80b4e098: am 44b43a51: am 1e4cad81: Merge "GlobalActions: Fix Airplane Mode on/off issue"
* commit '80b4e09849048a78e08911eff9907cae618eba35':
  GlobalActions: Fix Airplane Mode on/off issue
2014-03-30 15:23:30 +00:00
Wink Saville
80b4e09849 am 44b43a51: am 1e4cad81: Merge "GlobalActions: Fix Airplane Mode on/off issue"
* commit '44b43a51c7d7e5c2cbe1d9912ee4a21686fa1a58':
  GlobalActions: Fix Airplane Mode on/off issue
2014-03-30 15:17:38 +00:00
nagarw
c3b7e6fd44 GlobalActions: Fix Airplane Mode on/off issue
Issue: Unable to turn off Airplane mode from power button
       after phone reboot

Fix: Initialize mHasTelephony before the PhoneStateListener is
     registered to the TelephonyManager so that correct value
     of mHasTelephony is reflected when onServiceStateChanged
     callback is called.

Bug: 13697360
Change-Id: Ide8afd9c16ea90b98b5912dbff440c5fd67b178d
2014-03-28 16:54:58 -07:00
Jorim Jaggi
380ecb81db Make Keyguard a library and make StatusBar the new Keyguard.
This change achieves a couple of things:
- Let Keyguard be a library, so we can use it in SystemUI.
- Introduce FLAG_KEYGUARD for windows and deprecate TYPE_KEYGUARD. Make
all the TYPE_KEYGUARD behaviour dependant on the flag.
- Implement a new KeyguardService in SystemUI, and bind that service
from PhoneWindowManager.
- Introduce BaseStatusBar.setKeyguardState and inflate
KeyguardSimpleHostView there and use FLAG_KEYGUARD for the window, such
that the status bar window essentially gets the Keyguard.

Bug: 13635952
Change-Id: I059d80d8b9b9818a778ab685f4672ea2694def63
2014-03-28 22:35:03 +01:00
Craig Mautner
c89283c586 am d0955068: am 74e19f57: am 6f955df8: am 550b44d1: am f4644189: am 4cf6286c: am 02c7ba73: am 41bb0637: am 76e85eec: am 3bc9971d: am 95d6e32b: am 86f9a93e: Merge "Allow FLAG_SHOW_WHEN_LOCKED to apply to dialogs" into jb-mr1-dev
* commit 'd09550687360544f0659e37f393ba2f5b04b55a4':
  Allow FLAG_SHOW_WHEN_LOCKED to apply to dialogs
2014-03-25 20:15:49 +00:00
Craig Mautner
d095506873 am 74e19f57: am 6f955df8: am 550b44d1: am f4644189: am 4cf6286c: am 02c7ba73: am 41bb0637: am 76e85eec: am 3bc9971d: am 95d6e32b: am 86f9a93e: Merge "Allow FLAG_SHOW_WHEN_LOCKED to apply to dialogs" into jb-mr1-dev
* commit '74e19f572a598ce907661ed2f5127319f8d7c635':
  Allow FLAG_SHOW_WHEN_LOCKED to apply to dialogs
2014-03-25 20:11:08 +00:00
Craig Mautner
6f955df8e6 am 550b44d1: am f4644189: am 4cf6286c: am 02c7ba73: am 41bb0637: am 76e85eec: am 3bc9971d: am 95d6e32b: am 86f9a93e: Merge "Allow FLAG_SHOW_WHEN_LOCKED to apply to dialogs" into jb-mr1-dev
* commit '550b44d1884c5f65187dbc8bf8d4e6090f302a7b':
  Allow FLAG_SHOW_WHEN_LOCKED to apply to dialogs
2014-03-25 17:48:38 +00:00
Craig Mautner
4cf6286c3c am 02c7ba73: am 41bb0637: am 76e85eec: am 3bc9971d: am 95d6e32b: am 86f9a93e: Merge "Allow FLAG_SHOW_WHEN_LOCKED to apply to dialogs" into jb-mr1-dev
* commit '02c7ba73e8733def289535b6d13dc6a504a0443f':
  Allow FLAG_SHOW_WHEN_LOCKED to apply to dialogs
2014-03-25 10:29:48 -07:00
Craig Mautner
02c7ba73e8 am 41bb0637: am 76e85eec: am 3bc9971d: am 95d6e32b: am 86f9a93e: Merge "Allow FLAG_SHOW_WHEN_LOCKED to apply to dialogs" into jb-mr1-dev
* commit '41bb0637ca430808ab40a0300467ea58ae0a05c3':
  Allow FLAG_SHOW_WHEN_LOCKED to apply to dialogs
2014-03-25 10:22:56 -07:00
Craig Mautner
95d6e32bc3 am 86f9a93e: Merge "Allow FLAG_SHOW_WHEN_LOCKED to apply to dialogs" into jb-mr1-dev
* commit '86f9a93e20bf33b9f5152592f4781bd253be8643':
  Allow FLAG_SHOW_WHEN_LOCKED to apply to dialogs
2014-03-25 09:48:27 -07:00
Alan Viverette
52b999f072 Implement APIs for obtaining, caching themed Drawables
When Drawables are inflated during preload (or otherwise without a theme)
they cache their themeable attributes in their constant state as an array
keyed on attribute index. Drawables inflated with a theme will simply
resolve theme attributes as part of normal inflation, and they will not
cache any themeable attributes.

Drawables obtained from Resources are pulled from theme-specific cache
when possible. If an unthemed Drawable exists in the preload cache, a
new constant state will be obtained for the Drawable and the theme will
be applied by resolving the cached themeable attributes and overwriting
their respective constant state properties. If no cached version exists,
a new Drawable is inflated against the desired theme.

Constant states from themed drawables may be cached if the applied theme
is "pure" and was loaded from a style resource without any subsequent
modifications.

This CL does not handle applying themes to several Drawable types, but it
fully supports BitmapDrawable, GradientDrawable, NinePatchDrawable,
ColorDrawable, and TouchFeedbackDrawable.

BUG: 12611005
Change-Id: I4e794fbb62f7a371715f4ebdf946ee5f9a5ad1c9
2014-03-24 18:00:26 -07:00
Craig Mautner
0392442de8 Allow FLAG_SHOW_WHEN_LOCKED to apply to dialogs
Previous fix to keep non-show-when-locked windows hid dialogs from
activities that had asked to be show-when-locked. That was too
restrictive.

Fixes bug 13225149.

Change-Id: I39ae9d7cbcc9b5109257f732d027bda3a2de65e4
2014-03-22 17:15:52 -07:00
Craig Mautner
2bc789bf1a Allow FLAG_SHOW_WHEN_LOCKED to apply to dialogs
Previous fix to keep non-show-when-locked windows hid dialogs from
activities that had asked to be show-when-locked. That was too
restrictive.

Fixes bug 13225149.

Change-Id: I39ae9d7cbcc9b5109257f732d027bda3a2de65e4
2014-03-21 09:31:35 -07:00
Svetoslav
8e3feb15c5 Added accessibility APIs for introspecting interactive windows.
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
2014-03-20 16:52:59 +00:00
John Spurlock
1af30c7ac4 Add stream-level suppression to vibrate/audio services.
- 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
2014-03-19 15:32:51 -04:00