2745 Commits

Author SHA1 Message Date
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
Jeff Brown
daa1c96954 am aaf23a9a: am c3f5d694: Merge "Hang off call by power button while screen is on"
* commit 'aaf23a9a653457cccf54293b2ff76196718c7a1a':
  Hang off call by power button while screen is on
2014-03-11 00:11:10 +00:00
Jeff Brown
2901e0442a am 9e3de5f7: am 6f9f8e7a: am 01b5e765: Merge "Declare KEYCODE_SLEEP and KEYCODE_WAKEUP." into klp-modular-dev
* commit '9e3de5f70d77f7152b25fec6c27b73d037c1376d':
  Declare KEYCODE_SLEEP and KEYCODE_WAKEUP.
2014-03-08 05:43:12 +00:00
Craig Mautner
93df07a1b7 Merge "Show the keyguard if unsecure window on top. DO NOT MERGE." into klp-dev 2014-03-07 22:30:26 +00:00
Jeff Brown
6212a49a94 Declare KEYCODE_SLEEP and KEYCODE_WAKEUP.
These new keys behave in similarly to KEYCODE_POWER but do not
simply toggle between awake and asleep states.

Sleep puts the device to sleep if it is awake.
Wakeup wakes up the device if it is asleep.

Bug: 12938999
Change-Id: I260fb918cc858882fe06fa880910df5763a76c5d
2014-03-07 14:02:55 -08:00
Jeff Brown
71c8fb92a1 am 2b27ef97: am c969450a: am 840c8474: Merge "Add config_supportAutoRotation." into klp-modular-dev
* commit '2b27ef979dba3808cdae6dce32fe27b59197e34c':
  Add config_supportAutoRotation.
2014-03-07 19:29:48 +00:00
Craig Mautner
2c82c08a54 Show the keyguard if unsecure window on top. DO NOT MERGE.
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.

Fixes bug 13225149.

Change-Id: Ib6f33cbcfb2f60d8957a9184729ecdec80c6a236
2014-03-07 09:09:27 -08:00
Craig Mautner
00156ec200 Merge commit 'c29ab2dd' into manualmerge
resolved conflicts for merge of c29ab2dd to master

Change-Id: I231bde04ed804097e546d6275d248310593dc3c5
2014-03-06 22:29:37 -08:00
Jeff Brown
840c84749a Merge "Add config_supportAutoRotation." into klp-modular-dev 2014-03-07 04:40:10 +00:00
Jeff Brown
bcdfc62ae3 Add config_supportAutoRotation.
On some products, it may not make sense to use the accelerometer
to perform auto-rotation.  In that case, the product's config.xml
framework resource overlay should set config_supportAutoRotation
to false.

Setting this to false also disables auto-rotation settings.

Bug: 13211999
Change-Id: If9d7d72f2a2c576b14a4ff0afb61ea52c42c3357
2014-03-06 19:57:59 -08:00
Craig Mautner
f453f3a168 Merge "Show the keyguard if unsecure window on top" into klp-modular-dev 2014-03-07 01:25:50 +00:00
Will Haldean Brown
568628dc2c Manually merge commit '2faf28cf' into master
Original commit message:

  Add swipe-to-dismiss support to PhoneWindow.

  This adds a new window feature -- FEATURE_SWIPE_TO_DISMISS -- and a
  theme attribute to activate that feature. When the feature is
  activated, a SwipeDismissLayout is inflated as the DecorView layout.
  SwipeDismissLayout intercepts touch events and steals ones that are
  large swipes to the right if its children don't. PhoneWindow
  registers handlers that listen for these swipe events, translate the
  window when necessary, and finish the activity at the end of the
  gesture.

Conflicts:
	core/java/android/view/Window.java
	core/res/res/values/attrs.xml

Change-Id: I943290b436864ca4a1bd401b88d696e08c921cdd
2014-03-04 15:25:43 -08:00
Will Haldean Brown
bd79652a9a Merge "Add swipe-to-dismiss support to PhoneWindow." into klp-modular-dev 2014-03-04 21:22:30 +00:00