1390 Commits

Author SHA1 Message Date
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
Masanori Ogino
c362f0cd50 Lid switch state is incorrect
InputManager#getSwitchState() returns AKEY_STATE_UP(0=OPEN)
and AKEY_STATE_DOWN(1=CLOSE).
mLidOpen is opposite from a real lid status.

Change-Id: I40aa4e0defb95d82b6144ff6b7514f721bf9030f
2012-05-01 13:02:06 -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
Brian Colonna
6bc7591640 Merge "Changes to biometric sensor interface in lockscreen" into jb-dev 2012-04-26 14:41:18 -07:00
Brian Colonna
ea8441e22a Changes to biometric sensor interface in lockscreen
This cleans up the biometric sensor interface - the interface between
lockscreen and Face Unlock.  Not only does it document the interface,
but it also makes two noteworthy changes to the interface:

1) Instead of calling mBiometricUnlock.start() with a parameter to
tell it whether to suppress itself, lockscreen makes all of the
decisions about whether the biometric unlock should be started or not
and only calls start() if it should be started.  Passing a parmeter to
tell a function to not start itself was strange, but it was a
necessary intermediate step in the process of fixing this interface.

2) Instead of calling mBiometricUnlock.initializeView() with a top
view that the biometric unlock should attach to, lockscreen now
provides the biometric unlock with the actual view it is allowed to
work in.  This keeps lockscreen in control of where the biometric
sensor is allowed to display.

A few things were also cleaned up within the Face Unlock
implementation of the biometric interface:

1) Changes needed to match the requirements of the improved biometric
sensor interface, including moving the functions into an order that
makes more sense.

2) The bind() function was only being called from start(), which has
turned into only a couple of lines of code, so the bind() code has
been just put inline into the start() function, which mirrors the
stop() function which has the unbind() code in it.

3) The showArea() function was really just one line of code with a
check.  It was being called from two places.  The showArea() code is
now just written inline in those two places, which makes the code
much easier to follow.

4) Renamed occurrences of FaceLock to Face Unlock.

Change-Id: Ie95ce21dcc77170381af9ce320f2675dfe249741
2012-04-26 17:31:29 -04:00
Amith Yamasani
2efb6a94ca Don't unregister receiver twice.
Bug: 6008202
Change-Id: I3a9c76b74c1451b634341806d9c93768925737cd
2012-04-25 18:18:30 -07:00
Dianne Hackborn
908e71ed7c Merge "Fix issue #5983781: opening a post from status tab..." 2012-04-24 18:57:59 -07:00
Dianne Hackborn
560144e2da Fix issue #5983781: opening a post from status tab...
...has no cross-activity transition

We apparently no longer want to skip the activity transition when
it is starting from behind the status bar.

Change-Id: I1feb0cf0303f8b89d9089b38b217eac440382059
2012-04-24 18:44:32 -07:00
Jim Miller
e898ac59db Fix 6299832: Add search target swipe action to navigation bar on phones
This adds a feature to swipe upward on the navigation bar to invoke
voice search on phones.

Change-Id: I462076fd43b1c66c5bf624f00b297c6d3414a19a
2012-04-24 17:25:46 -07:00
Daniel Sandler
03c63ebebb Merge "Update SystemUI for sw600dp devices." 2012-04-23 04:48:35 -07:00
Daniel Sandler
4a066c5c77 Update SystemUI for sw600dp devices.
Devices between 600 and 719dp will now use the two-bar
(phone) SystemUI layout, or something like it, derived from
PhoneStatusBar. Devices above 720dp will use the system bar
from TabletStatusBar.

However, this distinction is not to be made based on dp, at
least, not by the SystemUI; the goal is to drive most of
this switch from the window manager. Therefore most of
SystemUI's sw600dp resources have been folded into the main
set of resources (renaming them to avoid collisions where
appropriate). This allows SystemUI to choose which set of
resources to use entirely by switching status bar
components, entirely independent of Configuration.

(For some resources, particularly around recents, it seemed
more expeditious to keep relying on the device
configuration, so those resources have been bumped up to
sw720dp.)

Bug: 6297838
Change-Id: I3f5414a6a718bdc83f51930d6878cdf97df48c9c
2012-04-21 00:19:47 -04:00
Dianne Hackborn
19caadc08f You can now long press on the power off menu to reboot to safe mode.
Change-Id: I3aa575285058cf5a3d89486d6b944f6ea13d645c
2012-04-20 17:50:26 -07:00
Brian Colonna
c169366f2c Moved biometric sensor selected check into LPKV
This change moves all of the mBiometricUnlock.installedAndSelected()
checks from inside the biometric sensor implementation to
LockPatternKeyguardView.  There are several reasons for this change:

1) Instead of constructing a BiometricUnlock object and asking it if
it's enabled, LPKV can check this for itself and not even bother
constructing it if it's not enabled.

2) Since mBiometricUnlock will not be constructed if biometric unlock
isn't enabled, LPKV can simply do null checks to see if it should call
biometric unlock functions.  So it serves the dual-purpose of ensuring
there will be no null-pointer exceptions with regards to using the
biometric unlock.

3) This greatly reduces the chance of bugs being introduced into
non-biometric unlock methods because no biometric unlock calls will be
attempted if biometric unlock is not enabled.  Previously, the calls
would be made and then the biometric unlock would check if it was
enabled and return, which was not only bug-prone, but also
inefficient.

4) This simplifies the biometric unlock interface by removing an
unnecessary function call.

5) The biometric unlock implementations do not have to check if they
are installed every time they do something, which greatly cleans up
biometric unlock implementations.  It makes much more sense for the
biometric unlock functions to be able to assume that they aren't
being called unless they should be.

6) Eventually when there is more than one possible biometric unlock
method, it will make much more sense for LPKV to be in charge of
what is constructed and what isn't.

Change-Id: I5437ac05d8ceb2b182fe372cd6c75ad944ade28f
2012-04-19 22:07:30 -04:00
Brian Colonna
8c44c181de Merge "Fix: refreshBatteryInfo was uncovering backup" 2012-04-19 18:22:17 -07:00
Brian Colonna
f6d61c64fb Fix: refreshBatteryInfo was uncovering backup
The onRefreshBatteryInfo() function hides the biometric sensor area so
the biometric sensor isn't shown when the screen turns on during a
plug/unplug.  However, sometimes the function is called when there
is no plug/unplug.  This fix makes it only hide the biometric sensor
area (thus exposing the backup lock) on plug/unplug.

Note that this does not fix b/5465535 although it may help reduce its
frequency.

Change-Id: Iccff382c23d71257593dc1595ed8fec57adaf5bd
2012-04-18 22:42:42 -04:00
Dianne Hackborn
7f58b95f7c Fix to custom scale animations.
These now do something reasonable when performing transitions
across two activities that are both on top of the wallpaper.

Fixed computation of the pivot point of the animations.

Fixed issue where the recents panel was considered a status
bar element for purposes of deciding if the animating elements
are obscured by the status bar, which would result in us not
running the animation correctly.

Change-Id: I4b9b588b80243463e6f087a9703ee886ee281630
2012-04-18 14:58:03 -07:00
Steven Ross
fe444b48ba Always showing FaceUnlock view before bind fixes 6330358
Sets the view to visible directly on the UI thread when feasible
this includes all cases where FaceUnlock is bound.
The delay in processing a message was causing the bug.
This additionally replaces the call in the keyguardview show
with one when the facelockareaview is initialized.

Change-Id: I8511f175d68023372e11d6e76fa1c44df6ac8a3d
2012-04-17 16:36:55 -04:00