1204 Commits

Author SHA1 Message Date
Jeff Brown
3631131e5f am 571d4cbe: Merge "Fix bugs in fallback key handling." into jb-dev
* commit '571d4cbeec4adad050b8e188770e7e7dedc558f1':
  Fix bugs in fallback key handling.
2012-05-10 09:25:36 -07:00
Brian Colonna
86f25564c4 am e2d47e63: Merge "Added FUL client-side debug" into jb-dev
* commit 'e2d47e63cf1c5c095eb54f7af2a4a02b46862ddd':
  Added FUL client-side debug
2012-05-10 09:24:51 -07:00
Uriel Rodriguez
49eea136f8 am 363b6052: Merge "changed pokeWakelock() callback to take time in milliseconds" into jb-dev
* commit '363b60527ce82b0f56434e70a8124e4d41e2b1e0':
  changed pokeWakelock() callback to take time in milliseconds
2012-05-10 09:24:46 -07:00
Jeff Brown
571d4cbeec Merge "Fix bugs in fallback key handling." into jb-dev 2012-05-09 17:35:07 -07:00
Brian Colonna
e2d47e63cf Merge "Added FUL client-side debug" into jb-dev 2012-05-09 16:16:45 -07:00
Uriel Rodriguez
dff307697d changed pokeWakelock() callback to take time in milliseconds
Changed the pokeWakelock() call back to take one argument - the duration to stay awake in ms.  This
change was needed in order to poke the wakelock for the duration of the watchdog timeout.  This
must be done in the service because the duration of the watchdog timeout is unknown at this point.

Moved pokeWakelock() from start() to handleServiceConnected() to make sure that this poke happens
before the poke in the service.  This poke is still needed to account for when devices are rotated.

Change-Id: I19d62df1489514de0588ebb937678358e70ffc95
2012-05-09 19:08:22 -04:00
Jeff Brown
fd23e3ed97 Fix bugs in fallback key handling.
If a fallback key is generated using a key plus a modifier,
then it's possible we might get a different fallback key
generated if the modifier has changed.  PhoneWindowManager
needs to remember which fallback is last generated for a
given key code so that it can apply the same fallback action.

When generating cancellation events, it's important to have
preserved the policyFlags of the original event.  Otherwise
we may not dispatch the cancellation properly.  For example,
some actions are not performed if the POLICY_FLAG_TRUSTED
is not specified.

Remember the metaState associated with a key event so we can
include it when canceled.

Tell the policy when a fallback is being cancelled so that it
can clean up its state.

After a SEARCH shortcut is invoked, clear the flag indicating
that a shortcut is pending.  This is to prevent SEARCH from
getting stuck down in the case where we might forget to send
the up.  (Shouldn't happen anymore after the prior fixes.)

Bug: 5616255
Change-Id: I68f0a9679c7af464eaf31c099f2aa50b53fecf1f
2012-05-09 13:34:28 -07:00
Brian Colonna
cfeda767c8 Added FUL client-side debug
This is to help track down bug 6409767 and will be removed when that
bug is fixed.

Change-Id: I51df2fd7d14ecd8f311fdf2ae993ba4943764011
2012-05-09 15:35:18 -04:00
Brian Colonna
a197cb2b52 am 2c214493: Merge "Added checks to make sure FUL functions are on UI thread" into jb-dev
* commit '2c21449357f8e53e578ec8835ddfeeee0368814b':
  Added checks to make sure FUL functions are on UI thread
2012-05-09 09:46:05 -07:00
Brian Colonna
2c21449357 Merge "Added checks to make sure FUL functions are on UI thread" into jb-dev 2012-05-09 09:44:05 -07:00
Brian Colonna
22001c1f96 Added checks to make sure FUL functions are on UI thread
There are three functions in FaceUnlock.java that have the requirement
that they are to be called on the UI thread.  I added checks to log
an error if they are ever called off of the UI thread.

Change-Id: I581968e8138b7561b7ad75a1ac6945bf218e2bcf
2012-05-09 11:16:04 -04:00
Adam Powell
4689b2843f am 1e5c3336: Merge "Fix measurement for dialog windows that do not have fixed width" into jb-dev
* commit '1e5c3336e8b16c0a46542f59df53f0fa31d82d6d':
  Fix measurement for dialog windows that do not have fixed width
2012-05-09 01:49:54 -07:00
Eric Laurent
776339fe4c am c8ade15d: Merge "Silent and Vibrate mode clean up" into jb-dev
* commit 'c8ade15dadd680c5e4b201f3b7b0823a13dedb3e':
  Silent and Vibrate mode clean up
2012-05-09 01:48:30 -07:00
Jeff Brown
e8e94a0743 am 41a4704b: Merge "Small tweaks to orientation." into jb-dev
* commit '41a4704b09f98723f4ddec895c9f2e651a5c0c8e':
  Small tweaks to orientation.
2012-05-09 01:45:49 -07:00
Adam Powell
b8e056a8e8 Fix measurement for dialog windows that do not have fixed width
Bug 6456773

Change-Id: I9d058f78c4b1c1759aaea2f215efee82a3489faa
2012-05-08 19:04:29 -07:00
Eric Laurent
bffc3d1bd3 Silent and Vibrate mode clean up
Clean up related to new Vibration policy.
The vibrate behavior is now only derived from:
 - presence of a vibrator on the device
 - current ringer mode selected: NORMAL, VIBRATE or SILENT
If no vibrator is present the ringer mode can only be NORMAL or SILENT.

The control of ringer mode via volume keys when volume keys control the "master"
stream type (RING on phones, MUSIC on tablets) is as follows:
If a vibrator is present:
 VOL- and volume equals 1: NORMAL => VIBRATE
 VOL- and volume equals 0 and not continuous press: VIBRATE => SILENT
 VOL+ and in SILENT mode: SILENT => VIBRATE
 VOL+ and in VIBRATE mode: VIBRATE => NORMAL, volume = 1
If no vibrator is present:
 VOL- and volume equals 0 and not continuous press: NORMAL => SILENT
 VOL+ and in SILENT mode: SILENT => NORMAL, volume = 0

VIBRATE_ON and VIBRATE_IN_SILENT settings are not stored/retreived any more.

AudioService checks and corrects ringer mode and stream volumes if necessary when reading from
DB at boot time.

Also:
 Added dump for stream volumes in AudioService.
 Added device names missing in AudioSystem for USB accessory and USB device.

Issue: 6036529
Issue: 6414950
Issue: 6448163

Change-Id: I77fb821ec63e4e566320cac2701b4ac466e86aef
2012-05-08 15:10:37 -07:00
Jeff Brown
41a4704b09 Merge "Small tweaks to orientation." into jb-dev 2012-05-07 18:55:20 -07:00
Jeff Brown
daf5d894ef Small tweaks to orientation.
Improved threshold for detecting external acceleration.

Bug: 5976859
Change-Id: Iaf2298fba8eda72d1cacbb2f3aea72f460a9262f
2012-05-07 18:30:18 -07:00
Jim Miller
8676726dcf am 06e8d664: Merge "Fix 6397736: Swipe up to search layout fixes" into jb-dev
* commit '06e8d6647db54aa76dda92a5a785737e66d262de':
  Fix 6397736: Swipe up to search layout fixes
2012-05-07 14:37:39 -07:00
Jim Miller
354619c1cc Fix 6397736: Swipe up to search layout fixes
This fixes several layout issues on phones and tablets with MultiWaveView.

It adds a new background scrim to be shown behind the MultiWaveView
on the navigation bar.

MultiWaveView is updated to handle gravity constraints which makes layouts
much more flexible across devices.

Change-Id: I64068f4eaa81ef6c464247049117d53432fcacbd
2012-05-06 22:39:18 -07:00
Jim Miller
360ca12bf2 am 516c25b3: Merge "Fix 6414061: Add new ACTION_ASSIST intent." into jb-dev
* commit '516c25b38a03decc8f9cbd41f4d9baa4f52f438f':
  Fix 6414061: Add new ACTION_ASSIST intent.
2012-05-04 14:16:16 -07:00
Jim Miller
0799440ab3 Fix 6414061: Add new ACTION_ASSIST intent.
Change-Id: I3d334f67723ac89f6001267e0f06ad76190b929f
2012-05-04 13:52:14 -07:00
Adam Powell
c420d268de am 1f2077c3: Merge "Fix AlertDialog positioning for dialogs spawned from DialogWhenLarge activities" into jb-dev
* commit '1f2077c3a0ae20caa4343dc9f66db959a939a054':
  Fix AlertDialog positioning for dialogs spawned from DialogWhenLarge activities
2012-05-03 11:00:18 -07:00
Adam Powell
1f2077c3a0 Merge "Fix AlertDialog positioning for dialogs spawned from DialogWhenLarge activities" into jb-dev 2012-05-03 10:57:22 -07:00
Adam Powell
8877cc3e6e Fix AlertDialog positioning for dialogs spawned from DialogWhenLarge
activities

Bug 6413342

Clear extra attributes in the base theme so that they properly overlay
a ContextThemeWrapper over a fixed-size dialog theme.

Change-Id: Ia0d49f0746ca01516afa1eaea7091e5da60d14ae
2012-05-02 18:35:23 -07:00
John Wang
3e1c4bd824 am 22930da7: Merge "Add unusable SIM message." into jb-dev
* commit '22930da77f7c2d0461474a162d0d25b9dca00875':
  Add unusable SIM message.
2012-05-02 17:40:23 -07:00
John Wang
22930da77f Merge "Add unusable SIM message." into jb-dev 2012-05-02 17:37:44 -07:00
John Wang
82b2cd0fe9 Add unusable SIM message.
Inform user "Unusable SIM card." when SIM is permanently disabled
due to too many wrong PUK inputs.

bug:5548405

Change-Id: Id82c7681f58f09709c630b4bc455facb549938ed
2012-05-02 17:14:50 -07:00
satok
c6b939789a am e849230f: Merge "DO NOT MERGE : Backport I5723f627ce323b0d12b Reduce window resizing during IME transition" into jb-dev
* commit 'e849230f444653e692024b4321044cb9f6188919':
  DO NOT MERGE : Backport I5723f627ce323b0d12b Reduce window resizing during IME transition
2012-05-02 01:43:17 -07:00
satok
e849230f44 Merge "DO NOT MERGE : Backport I5723f627ce323b0d12b Reduce window resizing during IME transition" into jb-dev 2012-05-02 01:41:23 -07:00
satok
1bc0a49e3c DO NOT MERGE : Backport I5723f627ce323b0d12b Reduce window resizing during IME transition
Bug: 5137498
Change-Id: Ieb8fd700d193eddaa31b0c5ebd8c7f7885586372
2012-05-02 17:30:45 +09:00
Jeff Brown
c3cca66404 am 0632b35b: Merge "Improve handling of built-in keyboard." into jb-dev
* commit '0632b35b6828cd4324b3d218c2e38f895e819aad':
  Improve handling of built-in keyboard.
2012-05-01 18:41:00 -07:00
Jeff Brown
0632b35b68 Merge "Improve handling of built-in keyboard." into jb-dev 2012-05-01 18:39:00 -07:00
Jeff Brown
daa3753a04 Improve handling of built-in keyboard.
The window manager policy made some incorrect assumptions about the
meaning of the Configuration.keyboard field.  We need to be more
careful about distinguishing between built-in and external keyboards.

Most of this change is to move the determination of the parts of
the Configuration related to input devices into the WindowManagerService
leveraging new features of the InputManagerService to good effect.

Then we plumb through the flag that indicates whether a device
is internal or external so that we can be more particular about
how the lid switch effects changes to the Configuration.

Bug: 6424373
Change-Id: I36a1c22ade35e578955465a25940a33f227b9763
2012-05-01 16:34:20 -07:00
Brian Colonna
6de7210c30 am f4197bf9: Merge "Fix 6395288: Added lock to avoid unbind race condition" into jb-dev
* commit 'f4197bf93532b333dbea13792c422b65b0ceebf3':
  Fix 6395288: Added lock to avoid unbind race condition
2012-05-01 12:56:55 -07:00
Brian Colonna
f4197bf935 Merge "Fix 6395288: Added lock to avoid unbind race condition" into jb-dev 2012-05-01 12:54:02 -07:00
Steven Ross
1b4538c77d am d9a00323: Merge "Don\'t show Face Unlock on initial boot fixes 6396685" into jb-dev
* commit 'd9a00323126cb4abae9e93089cf0a27ec8c7122d':
  Don't show Face Unlock on initial boot fixes 6396685
2012-05-01 12:54:01 -07:00
Steven Ross
d9a0032312 Merge "Don't show Face Unlock on initial boot fixes 6396685" into jb-dev 2012-05-01 12:49:28 -07:00
Jean-Michel Trivi
a43d2589b1 am 8ccfbddd: Merge "Optimize how AudioService receives media button events" into jb-dev
* commit '8ccfbdddabf3387a1ac9d46bd057bea64eb30ef3':
  Optimize how AudioService receives media button events
2012-05-01 08:59:19 -07:00
Jean-Michel Trivi
8ccfbdddab Merge "Optimize how AudioService receives media button events" into jb-dev 2012-05-01 08:57:18 -07:00
Jean-Baptiste Queru
a3c6d8cfd6 am 415b8125: am d805c677: Merge "Possible NullPointerException in restorePanelState"
* commit '415b812569cb78e560f9d3a2a4d8944680669318':
  Possible NullPointerException in restorePanelState
2012-05-01 06:47:18 -07:00
Steven Ross
78c629807c Don't show Face Unlock on initial boot fixes 6396685
Uses a static to keep track whether this is the first pass through the lockscreen
This will be true from when the process is instantiated until the lockscreen
is constructed for the first time, and then false afterwards.
When it is true, we suppress the biometric unlock (Face Unlock).
This avoids the problem of unpredictable and slow startup behavior for Face Unlock
on the first unlock after boot.

Change-Id: I70033af17ba3163d5fe07fc58096f01afaaaafd0
2012-05-01 09:12:22 -04:00
Jean-Michel Trivi
c68022258e Optimize how AudioService receives media button events
AudioService maintains a stack of registered media button event
  receivers.
This change modifies the broadcasters of ACTION_MEDIA_BUTTON intents
  let AudioService directly handle the corresponding key event instead
  of trapping the intent sent by PhoneWindowManager, KeyguardViewBase
  and PhoneFallbackEventHandler.
Because the key event may be sent through a PendingIntent,
  AudioService now also implements the OnFinished interface to be
  notified when the event was consumed so it can release the wake
  lock held if it was held when the key event needed to be sent
  (see where PassHeadsetKey was instanciated in PhoneWindowManager).

Change-Id: I2e8614df94af9d54edbf714ef443cc372d21827a
2012-04-30 17:46:19 -07:00
Jeff Brown
c5c33c363e Merge "Add support for using the lid switch to turn off the screen." into jb-dev 2012-04-30 17:15:57 -07:00
Jeff Brown
c458ce98ce Add support for using the lid switch to turn off the screen.
Added a config option to allow the lid switch to turn off the
screen.  This is a closer match to what a lid switch should be
doing.

Removed an old feature to bypass keyguard when keyboard is visible
because the way it was plumbed in made bad assumptions about
the meaning of the lid switch.  Also, the last product we shipped
that had a physical keyboard turned this config option off.
So away it goes.  We can bring it back someday if we really want it.
It's questionable how useful the feature is anyhow, since it only
works when the keyguard is unsecure and when the lid switch is
unlikely to be jostled in the user's pocket.

Fixed a bug where we would tell the power manager that the keyboard
was visible even if the lid switch did not control the keyboard.
This used to cause the power manager to try to set the keyboard
brightness, which doesn't work.

Bug: 6377115
Bug: 6406726
Change-Id: Ic84b71d09563d51c92cd1cf132fa8bdee6509103
2012-04-30 15:48:42 -07:00
Dianne Hackborn
5c58de3a52 Add system insets to windows.
This will be used to determine which parts of a window a completely
hidden by system UI elements (status bar, nav bar, system bar) so
that they can be clipped out from rendering.

Change-Id: I2c6c6ac67dbdfeed82d2c089ef806fb483165bd9
2012-04-30 12:11:43 -07:00
Brian Colonna
257f2ecc97 Fix 6395288: Added lock to avoid unbind race condition
If turning the power off while FUL was closing (due to a timeout or a
cancel for example), it would be possible for unbind() to get called
twice due to a race condition.  Turning the phone off calls unbind()
from the UI thread, while the other close comes from a binder thread
since it is coming from the service.

PATCH SET 1 attempted to solve the problem by adding a lock, but
having a lock around the bind is a bit scary.

PATCH SET 2 takes a new approach by having all calls coming from a
binder thread to be sent as messages to be handled on the UI thread.
Having all events occur on the UI thread removes the possibility of
race conditions and makes the code stronger by making everything
happen in a deterministic order.

This commit also cleans up the logcat logging a bit.  A couple of the
log messages are now printing without DEBUG being set to true.  This
is by no means spamming the log and they of course are only logged
when FUL is being used.  But it serves to give us some meaningful
information from bug reports that are currently showing nothing.  The
statements that are now logged would have made this particular bug
easy to track down.

Change-Id: I25a65c0808d88cb941439e5bf1f989dba8608be4
2012-04-30 13:32:39 -04:00
Daniel Sandler
f8d0494bf6 Merge "Allow nav bar height to vary between portrait and landscape." into jb-dev 2012-04-27 10:24:14 -07:00
Daniel Sandler
9f65c4c34a Allow nav bar height to vary between portrait and landscape.
Change-Id: I1d69e0f4a1772bff6534c5c591e1def26d163708
2012-04-27 10:24:01 -04:00
Eric Laurent
6d5176638c system and UI sounds volume policy
Implement a more consistent policy for system and UI sounds (key clicks, lock/unlock,
camera shutter, DTMF, low battery...):
- All system sounds are played over STREAM_SYSTEM stream type.
- The STREAM_SYSTEM volume that was previously fixed now tracks the volume of a "master"
stream type. This "master" stream type is STREAM_RING for phones and STREAM_MUSIC for
tablets which corresponds to the stream whose volume is modified by default by the volume
keys.
- The STREAM_SYSTEM volume ranges from -24dB to -6dB (-24dB to -12dB over headphones) when the
"master" stream volume ranges from its min to its max.
- DTMF tones are played over STREAM_DTMF that tracks the "master" stream volume in the same
manner with the following exception: when in call, DTMF stream tracks STREAM_VOICE_CALL volume.
- Camera shutter sound is played over STREAM_SYSTEM_ENFORCED stream that tracks the "master"
stream volume except in countries where regulation enforces this sound. In this case
its volume is fixed and cannot be muted.
- Low battery sound is played over STREAM_SYSTEM and therefore has a tunable volume and is
heard while in call.

Issue 6344620.
Issue 6069229.
Issue 6213100.

Change-Id: I53a237878ead596e706c5dbbb1420e62cde32bd7
2012-04-26 18:36:56 -07:00