2857 Commits

Author SHA1 Message Date
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
Adrian Roos
ed529a5a78 am 500ec9ce: am 25fb7133: am 0b2f2122: am d3da8f71: am ecba937b: DO NOT MERGE - Fix keyguard pattern lockout bug
* commit '500ec9ce4b7856eca480c4c7dca8df1211614102':
  DO NOT MERGE - Fix keyguard pattern lockout bug
2014-03-18 13:41:20 -07:00
Adrian Roos
d3da8f711e am ecba937b: DO NOT MERGE - Fix keyguard pattern lockout bug
* commit 'ecba937b005b07d72eadfaf93a200e0b14af2980':
  DO NOT MERGE - Fix keyguard pattern lockout bug
2014-03-18 13:17:12 -07:00
Adrian Roos
ecba937b00 DO NOT MERGE - Fix keyguard pattern lockout bug
(cherry picked from commit 91c9561cbe665f91e1665f30362c409ae180b127)

Bug: 13302967
Change-Id: I35e7319f8767b2320dc11d9bfe8dc034e2a39b28
2014-03-18 18:33:14 +01:00
Craig Mautner
da09ae385a Show the keyguard if unsecure window on top
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
2014-03-14 16:20:00 -07:00
Craig Mautner
5df673d915 am f6f0946a: am 00c7d34c: am ff89d589: Merge commit \'3b9de0a4\' into manualmerge
* commit 'f6f0946addc5230634ac2a09115097531dc6094b':
  Show the keyguard if unsecure window on top
2014-03-14 21:59:39 +00:00
Craig Mautner
f6f0946add am 00c7d34c: am ff89d589: Merge commit \'3b9de0a4\' into manualmerge
* commit '00c7d34c463e9c3b4b6d5aca1e62b8caeb3fd7b2':
  Show the keyguard if unsecure window on top
2014-03-14 21:54:52 +00:00
Craig Mautner
ff89d589c7 Merge commit '3b9de0a4' into manualmerge
Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Change-Id: I5433912e9d97a20bec6c8e287450550daab6d89b
2014-03-13 21:09:35 -07:00
Craig Mautner
1066fc61a3 Resolved conflicts for merge of ad63d914 to jb-mr2-dev
Change-Id: Iea4cec4ce6f588c9f976ac5a1ff0208f1f91471b
2014-03-13 12:35:23 -07:00
Craig Mautner
ad63d91439 am 20a4f490: am 817f5586: am 3d958f81: am 468e8e98: am 1f52437d: Show the keyguard if unsecure window on top
* commit '20a4f490957407b9534fc453833de2fe2f276426':
  Show the keyguard if unsecure window on top
2014-03-13 11:01:13 -07:00
Craig Mautner
468e8e9873 am 1f52437d: Show the keyguard if unsecure window on top
* commit '1f52437de9aa6089a72c7c992f9e7291a6a96115':
  Show the keyguard if unsecure window on top
2014-03-13 10:47:49 -07:00
Craig Mautner
1f52437de9 Show the keyguard if unsecure window on top
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
2014-03-12 22:52:26 +00:00
Jeff Brown
9a3ed5bd3c am 70c27436: am daa1c969: am aaf23a9a: am c3f5d694: Merge "Hang off call by power button while screen is on"
* commit '70c274361ec6089c5ed9d1a62877d51b9ec1dcc8':
  Hang off call by power button while screen is on
2014-03-11 00:37:57 +00:00