1110 Commits

Author SHA1 Message Date
Dianne Hackborn
9801435820 Fix so that status bar doesn't resize when hiding nav bar.
The status bar now extends behind the nav bar, and uses
fitsSystemWindows to ensure its content is not covered.  We
always report a stable content insets (as if the nav bar is
visible) even if the nav bar is hidden, so the content doesn't
jump when transitioing.  This does mean that if you only hide
the nav bar (and not the status bar), when in landscape you
will end up with a status bar whose right side still leaves
room for the nav bar.  But why the hell would you want to do
that?

Also improve documentation on setSystemUiVisibility().

Change-Id: I8087d875f1214ef0085a91b5ed5c2f35ff2fc1b3
2012-04-05 18:31:41 -07:00
Dianne Hackborn
f87d19621d Clean up status bar, system bar, navigation bar management.
The status bar and navigation bar are two completely separate
elements, with their own semantics.  The system bar now classifies
itself as a navigation bar, since that is really how it behaves.

This required rewriting the HDMI resizing code, so that it is
all done by PhoneWindowManager since that is what is responsible
for the size of the navigation bar (and thus now system bar).  This
actually gets rid of a fair amount of code, and means we can also
do the same thing for a pure navigation bar.

Likewise the system bar now has the navigation bar ability to be
hidden when requested by system UI flags.  To get the behavior
we want on Xoom, we only allow the nav bar to be hidden when it
will help provide a better aspect ratio for showing widescreen
videos.

Finally the nav/system bar now animates when hidden and shown.

Change-Id: Ie927154b68376a0b61802f99171ff56b8da92e7a
2012-04-04 16:00:45 -07:00
Dianne Hackborn
3a3a6cfd8e Add new feature to let apps layout over status bar / system bar.
The main change is a few new flags you can supply to
View.setSystemUiVisibility().  One is a new visibility mode,
SYSTEM_UI_FLAG_FULLSCREEN, which is basically the same as
the global FLAG_FULLSCREEN option for windows, but driven as
part of the system UI state.

There are also three new flags for telling the framework that you
would like to have your application's UI ignore screen
decorations -- SYSTEM_UI_FLAG_LAYOUT_NO_NAVIGATION for going
behind the navigation bar and SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
for ignoring full screen decorations (that is the status bar).

In combination with this you can use SYSTEM_UI_FLAG_LAYOUT_STABLE
to have the framework report consistent insets to your application.

When using NO_NAVIGATION, when the user taps the screen we now
also automatically clear ONLY_CONTENT, so that we atomically show
both UI elements.  This should make it easy for apps like video
players that want to move between fully full-screen and regular
modes.

The ActionBar has also been extended when in overlay mode so
that it will adjust the system window insets to also account
for its space, and allow it to be hidden using the new
SYSTEM_UI_FLAG_FULLSCREEN.

Change-Id: Ic8db1adec49a0f420bfe40c1d92eb21307856d0b
2012-03-30 15:22:04 -07:00
Michael Jurka
50c69b5d8a Merge "Preload recents on phones with hard nav keys" 2012-03-30 05:02:57 -07:00
Michael Jurka
7f2668c846 Preload recents on phones with hard nav keys
Also refactor recents code across Phone/Tablet

Change-Id: Id557c5cb0f7d9378f81c40b20511a5d98bf4078e
2012-03-29 06:28:42 -07:00
Jeff Brown
c97ed10ba8 Merge "Ensure pointer location view is attached to the policy thread." 2012-03-29 03:05:57 -07:00
Jeff Brown
70825161b5 Ensure pointer location view is attached to the policy thread.
Previously we created the PointerLocationView on whatever thread
happened to trigger the call to updateSettings().  There was
also some messiness around having to add or remove the view
while not holding mLock.

Now, just post the work to the policy handler.

This also makes it possible for us to use invalidate() instead
of postInvalidate() in PointerLocationView, which is more efficient.

Change-Id: I0646d7aeecffdc22f6ac56ae3ef951e7a12e2b93
2012-03-29 03:01:10 -07:00
Amith Yamasani
52f1d752f9 Show the current user in power menu
Shows a little indicator next to the current user in the power menu
when multi-user is enabled.

Fixed a bug where Settings was sometimes being launched in the wrong
process when there are 2 instances running.

Change-Id: Iaf2a00f6d1871fd2a88d8982439e445423bb2896
2012-03-28 18:19:29 -07:00
Amith Yamasani
135936072b User management and switching
Broadcast intents that get sent out when users are added/removed/switched.

More work on generating user-specific information in package manager queries.
APIs to update user name and query a user by id.
Removed Package.mSetStopped and mSetEnabled, since they're not user specific.

User removal:
- Cleanup ActivityManager, PackageManager, WallpaperManager, AppWidgetService
  and AccountManager.
- Shutdown processes belonging to the user.

Don't show vibrate option in long-press power if there's no vibrator.

Lock the screen when switching users, to force unlocking.

Change-Id: Ib23a721cb75285eef5fd6ba8c7272462764038fa
2012-03-27 11:23:01 -07:00
Christopher Tate
e90585f89d Add a config resource to disable key-chord screenshotting
The key chord screenshot mechanism introduces significant latency into
processing of volume-key input; enough to be quite noticeable and
annoying on some kinds of device.  This patch introduces a new config
resource entry ("config_enableScreenshotChord"), true by default, so
that products on which this functionality is inapplicable can avoid
its runtime overhead.

Bug 6039047

Change-Id: I968ddf9046741da35988310b7893fae2c0369beb
2012-03-22 15:09:25 -07:00
Jim Miller
d16a4f2967 am d5b5db73: am b7a6f5d7: am 928d3470: Fix 5960562: Show emergency button on PukUnlock screen
* commit 'd5b5db73fcb49a4ca04e9cefc5f5293faba5895e':
  Fix 5960562: Show emergency button on PukUnlock screen
2012-03-20 19:36:33 -07:00
Jim Miller
928d34704b Fix 5960562: Show emergency button on PukUnlock screen
This fixes an issue where the device doesn't show the emergency button
on the SIM PUK unlock screen. The problem was introduced in I3127bfd5
where we allowed the button to be conditionally shown.

Change-Id: I3e2aae2bce89399a2564c3f8a726a8db99cdec86
2012-03-20 15:30:43 -07:00
Jim Miller
b030476d19 Fix 6021938: Improved target support in lock screen
This adds the ability to enable or disable target icons based on the drawable
resource of the target.

It also fixes a bug where we'd show the camera while displaying
the PIN/PUK unlock screen or when it's disabled by DevicePolicyAdmin.

Minor simplification and cleanup KeyguardUpdateMonitor callbacks.

Change-Id: I33fad56a2203bc8b7bcd0300c20478711a56713a
2012-03-19 14:18:13 -07:00
Dianne Hackborn
a4972e951b Add new "options" argument to all startActivity APIs.
This will be used to allow new features to be requested...  such as,
say, a special kind of animation.  Right now there are no options
defined.

Change-Id: I4eb6f27275cdd4bf186f6da316ab93a2372ad4b7
2012-03-14 12:57:14 -07:00
Siva Velusamy
92a8b22e74 ActivityManager: add option to allow OpenGL trace.
This patch adds an option to enable tracing of OpenGL functions.
OpenGL tracing can be enabled by passing "--opengl-trace" option
to am start.  This option requires either a device in debug mode,
or that the application itself has debug permission set.

Change-Id: I77788bfe97c9108943b1f947ce81afe8293d78a0
2012-03-12 12:18:53 -07:00
Jim Miller
fbc46dc3c2 Fix 6028595: Fix reboot loop in AccountUnlock due to null callback
This fixes a bug where the device would get into a reboot loop due to having
a null callback.  The problem was that a recent change caused the callback
to be used indirectly by the constructor before being set.

The solution is to pass the callback to the KeyguardViewBase constructor
which ensures it's ready by the time we call getCallback().

Change-Id: I2598fc5338be99977980e4dea41a096fb2a7ef7e
2012-03-01 16:15:27 -08:00
Wu-cheng Li
75e1ce6335 Use SINGLE_TOP and CLEAR_TOP when starting camera from lock scren.
Add these flags so there is no need to press back key twice to
exit the camera if users slide to camera twice.

bug:6070281

Change-Id: Iadf6ab2798cf9381bc9dc761920f46b022fb6bb8
2012-02-29 21:41:54 +08:00
Michael Jurka
7a3489552c Add shortcut for voice search
On phones with soft nav bar, make long press on
home launch a voice search intent

Change-Id: I69840a96a08524a76e33a306b799222c879db095
2012-02-28 14:37:35 -08:00
Dianne Hackborn
b8678d76c3 resolved conflicts for merge of 210c1a26 to master
Change-Id: Ic44193e62215086c22225f2def5eee3159d26ae8
2012-02-23 10:54:06 -08:00
Adam Powell
40eec4c0f1 Fix the size of DialogWhenLarge windows
Change-Id: I8c9588e958d8fb9c45b1cdb235cced48ba508dd3
2012-02-21 15:32:26 -08:00
Dianne Hackborn
01011c3d7c Fix issue #6037252: Screen shifts after all apps are upgraded
Two things: (1) make sure the boot message is always positioned within
the entire unrestricted display, and (2) allow the dim background to go
on top of the nav bar when being used for the boot message (this latter
is really a hack that should be more generally fixed in the future).

Change-Id: I7261b044eb802a39cadff931b50a679ff18781d6
2012-02-21 13:54:21 -08:00
Mike Lockwood
ce952c8e13 AudioManager: Add support for master mute
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 14:44:05 -08:00
Mike Lockwood
f5f4ec9791 PhoneWindowManager: stifle warning that ITelephony service does not exist
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 14:44:04 -08:00
Mike Lockwood
d747dc8179 Fix problems dispatching media button events on headless devices
Signed-off-by: Mike Lockwood <lockwood@android.com>

Conflicts:

	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
2012-02-10 10:51:24 -08:00
Mike Lockwood
3a74bd36f8 Add headless mode for running the framework without the surface flinger
Enabled by setting system property ro.config.headless to 1
This will allow the framework to run without starting activities,
system UI and the keyguard.
Framework can still run services, content providers and broadcast receivers.

Signed-off-by: Mike Lockwood <lockwood@android.com>

Conflicts:

	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
	services/java/com/android/server/PowerManagerService.java
	services/java/com/android/server/am/ActivityManagerService.java
2012-02-10 10:51:24 -08:00
Mike Lockwood
aa5bf14e21 PhoneWindowManager: Disable boot progress dialog on headless builds
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 10:51:21 -08:00
Craig Mautner
61ac6bb250 Extract code from performLayoutAndPlaceSurfacesInnerLocked() into multiple methods.
Change-Id: I80152c38741ce73b92da9483cfed84efbac34f89
2012-02-06 16:52:16 -08:00
Amith Yamasani
742a671273 Multi-user - 1st major checkin
Switching activity stacks
Cache ContentProvider per user
Long-press power to switch users (on phone)

Added ServiceMap for separating services by user
Launch PendingIntents on the correct user's uid
Fix task switching from Recents list
AppWidgetService is mostly working.

Commands added to pm and am to allow creating and switching profiles.

Change-Id: I15810e8cfbe50a04bd3323a7ef5a8ff4230870ed
2012-02-03 12:01:47 -08:00
Jim Miller
118bb2bd86 Fix 5906830: Don't crash on lock screens that lack a clock.
This fixes a crash seen in SIM unlock screen where the
layout doesn't have a clock to update.

Change-Id: Ic1473b60f6d32f3feae9e7aa4510f6e435fa9a73
2012-01-27 17:59:49 -08:00
Jim Miller
ce4a0c6f16 Fix 5906830: Update the clock earlier when lock screen comes back from suspend.
This attempts to fix an issue where sometimes the time shown on lock
screen was really old.  The code now sets the time immediately when the
screen turns on.

Change-Id: Ic4649ea342499aea82f997ba488bc2cb45987739
2012-01-27 17:15:18 -08:00
Jim Miller
fb9e364380 Merge "Fix 5620754: don't show pattern unlock after SIM unlock if not enabled." 2012-01-26 14:30:49 -08:00
Jim Miller
93708af132 Fix 5620754: don't show pattern unlock after SIM unlock if not enabled.
This fixes a bug where the device would show pattern unlock after the user
entered the SIM PUK unlock code.  The code now correctly determines that
the device isn't secure and thus shouldn't show the unlock screen.

Change-Id: I49fd749592154a4c5840038b92d54ca7ca086074
2012-01-25 18:26:12 -08:00
Jim Miller
3868cee0b9 Fix 5907237: dismiss keyguard after the camera app launches.
This fixes a bug where either the home screen or the last app run shows
briefly while we wait for the camera app to launch.  Instead, we have
ActivityManager dismiss keyguard once the camera app is up and running.

Change-Id: I1c2986ad84024dce675216a76c19c937c3e2828d
2012-01-24 16:59:54 -08:00
Dianne Hackborn
8c190f76fc am 29cd79c7: am c986d6f0: Merge "Fix issue #5906017: Missing menu entries in portrait when in compatibility mode" into ics-mr1
* commit '29cd79c7b0fecd2753fc27405794c0d5b5314302':
  Fix issue #5906017: Missing menu entries in portrait when in compatibility mode
2012-01-24 11:37:24 -08:00
Dianne Hackborn
a486a53a02 Fix issue #5906017: Missing menu entries in portrait when in compatibility mode
This was a bug only when the status bar was hidden, the screen space for
the nav bar would not be correctly removed for all frames used in layout
computation.

This code really $*#&^!! needs to be cleaned up, the whole "status bar
is the system bar when on a tablet so it should take space from apps,
but status bar doesn't do that on phones but on phones there is a nav
bar that does the same thing" thing is whacked.

Proof that evolution DOESN'T WORK!!!!!!!!!!

Change-Id: I24e4994328480820cb638e7a40aa0b65b7ae2003
2012-01-23 18:02:46 -08:00
Jim Miller
d3fe9abfb9 am ab9601cd: am 230a7092: Merge "Fix 5863053: Add method to lock screen immediately." into ics-mr1
* commit 'ab9601cdbb95ae94088750eff9a926a572c1a4d6':
  Fix 5863053: Add method to lock screen immediately.
2012-01-20 15:48:21 -08:00
Dianne Hackborn
cfbf7dedad Fix issue #5823276 again: home repaints after full-screen app is exited
Don't consider a window as a candidate for the top fullscreen window
if it is not going to be a candiate for layout.

This fix does not include the change to ignore app tokens that are
hidden.  This causes problems in some dialogs that stay hidden until
their app is ready to display, but need to perform a series of relayouts
during that time to get to the right size.  Dropping this part of
the change still (mostly?) seems to allow us to avoid the bad states.

Change-Id: Ic052cb1499d3287f47e9ffeac5cd2470ee5a308c
2012-01-20 11:01:01 -08:00
Justin Ho
170997a519 DO NOT MERGE Revert "Fix issue #5823276: home repaints after full-screen app is exited"
This reverts commit 01b02a734d2988c22b00f5df6346ad03d8bf52b6.

Change-Id: I848c01fc44eb9a51ead1116b2647ed838ec1825f
2012-01-19 15:41:33 -08:00
Jim Miller
230a709285 Merge "Fix 5863053: Add method to lock screen immediately." into ics-mr1 2012-01-18 16:44:52 -08:00
Jim Miller
93c518e4f8 Fix 5863053: Add method to lock screen immediately.
This fixes a bug where the device fails to lock when DevicePolicyManagerService
requests the device to be locked and the screen was off because the user hit
the power button.

The change allows DPMS to directly invoke screen lock, bypasssing the screen state.

Change-Id: Iecdda6fc61e9c519119de495be23c69c3b983921
2012-01-17 18:11:05 -08:00
Dianne Hackborn
f88d1493aa am 10065177: am 2e282f35: Merge "Fix issue #5823276: home repaints after full-screen app is exited" into ics-mr1
* commit '100651779fde99f7ae2a10719d688b51115f08e9':
  Fix issue #5823276: home repaints after full-screen app is exited
2012-01-13 13:01:48 -08:00
Dianne Hackborn
2e282f35b0 Merge "Fix issue #5823276: home repaints after full-screen app is exited" into ics-mr1 2012-01-13 12:56:40 -08:00
Guang Zhu
191713a51f Move where prop dev.bootcomplete is set
Currently test harnesses depends on this flag to determine when
the system is fully booted, and start dismissing keyguard, launch
tests etc. However, the flag is usually set when the boot animation
is still running, and typically about 5 seconds before keyguard is
up etc. Moving to to when BOOT_COMPLETE broadcast is sent makes it
work more reliable.

We also discussed about using sys.boot_completed instead,
unfortunately this flag is not in all platform and we still have
backwards compatibility to maintain in order to drive unbundled
tests.

Change-Id: I99b084cd70d8e4bcfe490ddeca868136d32712e2
2012-01-12 17:39:40 -08:00
Dianne Hackborn
01b02a734d Fix issue #5823276: home repaints after full-screen app is exited
Don't consider a window as a candidate for the top fullscreen window
if it is not going to be a candiate for layout.

Also don't consider windows a candidate for layout if their app token
is hidden.  This fixes a transient state where we are preparing to
unhide the window but have not done so yet.

Change-Id: Ife5299ffa003c1df1a4f787b7a2809cbf614ec16
2012-01-12 14:05:03 -08:00
Jim Miller
0b92eb4b8c am 1aff11be: am 7a286d83: Merge "Fix 5620754: don\'t show pattern screen after SIM PUK unlock" into ics-mr1
* commit '1aff11be4585d6ddff784d7e74188963050805fa':
  Fix 5620754: don't show pattern screen after SIM PUK unlock
2012-01-12 13:37:58 -08:00
Jim Miller
7a286d8391 Merge "Fix 5620754: don't show pattern screen after SIM PUK unlock" into ics-mr1 2012-01-12 12:28:59 -08:00
Brian Colonna
8a1131d789 Merge "DO NOT MERGE cherry-picked FU framework tablet commits" into ics-mr1 2012-01-12 06:33:49 -08:00
Jim Miller
28a0767751 Fix 5620754: don't show pattern screen after SIM PUK unlock
This fixes a bug introduced in testing 34a62348. The code now
properly invokes the callbacks before returning.

Change-Id: I637a8a792838379f0c8b42ef634da82787fcd961
2012-01-10 18:35:21 -08:00
Jim Miller
5437c220e2 am d3872f55: am 62fad768: Merge "Fix 4560303: Add setting to lock later when power button pressed" into ics-mr1
* commit 'd3872f55045b7ce7be7dd7ae5fff37d7988bdcb2':
  Fix 4560303: Add setting to lock later when power button pressed
2012-01-10 10:34:51 -08:00
Jim Miller
a4edd151c5 Fix 4560303: Add setting to lock later when power button pressed
This adds a feature to delay locking the device when the power button
is pressed.  This fixes a use case where the user wants to turn off
the display (e.g. to save power) but doesn't want to lock the device.

For the case of a secure device (user has a pin/password/pattern),
this will lock the device immediately or not based on the setting.

For the non-secure case, this always "locks" the device to provide easy
access to the camera while preventing unwanted input.

Change-Id: Ie328485c3f7559e26896d761cbf0e69d3f4df4e2
2012-01-09 17:30:58 -08:00