9181 Commits

Author SHA1 Message Date
satok
d81e950265 Fix the issue on the inconsistent condition of InputMethodSubtype
Bug: 6510104
Change-Id: I67790e5f59d0d05340b74eca1029c60f381061b8
2012-05-21 18:30:14 +09:00
satok
5d4d23ebdf Merge "Consolidate the initialization of InputMethodManagerService not to use resource values until system ready" into jb-dev 2012-05-20 19:59:50 -07:00
Jeff Brown
cf39bdf3df Add support for switching between multiple keyboard layouts.
Also show a notification when an external keyboard is connected
and does not have a keyboard layout selected yet.

Bug: 6405203
Change-Id: Id0ac6d83b3b381f8a236b2244a04c9acb203db3c
2012-05-20 14:56:22 -07:00
Craig Mautner
255632d160 Merge "Prevent dim surface from flashing." into jb-dev 2012-05-18 17:32:48 -07:00
Craig Mautner
067ca32a52 Prevent dim surface from flashing.
This fix keeps the dim surface below the highest shown layer. If
two shown layers were both dim it was ambiguous where the dim surface
would appear causing dialogs to first be dimmed and then flash when
the dim was put behind them.

Fixes bug 6497476.

Change-Id: I360cf2d23d58fc4c03edbbed16d79c08c29e48b9
2012-05-18 17:19:51 -07:00
Dianne Hackborn
5320eb8938 Fix activity resolver, issues #6519130 and #6507239
6519130: Starting ResolverActivity with no arguments crashes system_server
6507239: ResolverActivity may bypass signature permissions

Change-Id: I64534f781bc6b7eb45e85dbe3a55d351ee28e85c
2012-05-18 15:04:53 -07:00
Jeff Sharkey
787c9ec558 Merge "Transition from DEV network stats to XT." into jb-dev 2012-05-18 11:40:42 -07:00
satok
0a1bcf4e0d Consolidate the initialization of InputMethodManagerService not to use resource values until system ready
Bug: 6477193
InputMethodManagerService have used the resource value of "isDefault" in the constructor. We should wait to use that value until system ready.
Change-Id: I682fc109c303d8c7fd33d494c59e8e28d6dc6fa5
2012-05-18 16:00:40 +09:00
Nick Pelly
1ca4399706 Merge "Enforce the minTime parameter in LocationManager#requestLocationUpdates" into jb-dev 2012-05-17 20:57:56 -07:00
Dianne Hackborn
abe3927701 Merge "Fix issue #6515427: Add android.hardware.television and fix..." into jb-dev 2012-05-17 18:18:27 -07:00
Dianne Hackborn
0cf2c8a533 Fix issue #6515427: Add android.hardware.television and fix...
...logic for notouch in Configuration

Added new TELEVISION feature.

We now force the configuration to "television" if the TELEVISION
feature is set, and "notouch" if the TOUCHSCREEN feature is not set.

Also cleaned up documentation, deprecated some configurations that
are not used.

Change-Id: If1c7a284b580a8a66bda2a75f0c7fa841b3dc9b7
2012-05-17 18:11:14 -07:00
Kenny Root
ae9d040f71 Merge "Wait for ASECs to be scanned before proceeding" into jb-dev 2012-05-17 16:42:09 -07:00
Christopher Tate
27cb3f8c44 Merge "Eliminate "backup enabled but not provisioned" failure modes" into jb-dev 2012-05-17 16:41:53 -07:00
Jeff Brown
dc9445ba4c Merge "Add support for grouping keyboard layouts by collection." into jb-dev 2012-05-17 16:33:40 -07:00
Kenny Root
51a573c767 Wait for ASECs to be scanned before proceeding
Move MountService up the list, then pause waiting for MountService to
finish scanning ASECs before the services that require those packages to
be ready.

Additionally, don't automatically mark all ASEC apps as FLAG_EXTERNAL on
reboot. This prevents AppWidgets and other things from being used with
ASECs which are on internal storage.

Bug: 6445613
Change-Id: I3e0b3e244fec966814d7a5ea93de5d337aea79bd
2012-05-17 16:06:54 -07:00
Christopher Tate
97ea122c65 Eliminate "backup enabled but not provisioned" failure modes
Previously, the setup app was responsible for telling the backup
manager through a side band that the user had passed through the
backup/restore-related portion of the setup flow.  Now that the
flow has been streamlined and certain mandatory portions of it
are no longer relevant, we can ditch the whole idea of the backup
manager's internal "provisioned" state.  This makes setup and the
setup "wizard" applications less fragile as well as eliminating
the possibility of unrecoverable "backup was never provisioned"
failure modes.

Now, the only check the backup manager has to do is against the
full "device is provisioned" flag, just like all of the other
components on the phone that only become usable after the setup
process has exited [such as phone calls].

Bug 6493520

Change-Id: I13ec8dd8baa1e74ed8569b0326219a98a7f632a9
2012-05-17 16:02:15 -07:00
Jeff Brown
d9fec5d317 Add support for grouping keyboard layouts by collection.
Bug: 6405203
Change-Id: Id818b27ec09928150795d594a96df186a6e39168
2012-05-17 16:01:54 -07:00
Nick Pelly
f1be6861da Enforce the minTime parameter in LocationManager#requestLocationUpdates
There is a long history in Android, on both GED and non GED devices
of GPS providers ignoring the minTime parameter making location updates
every second. The problem is usually poor GPS drivers that claim to
do scheduling but then do not.

By making the minTime parameter strict (instead of a hint) we can add
a CTS test to ensure that udpates to not occur too frequently. I believe
this is the desired behavior from apps. If apps want to take advantage
of more frequent updates when another application asks for those updates
then it can use the passive provider.

The CTS test for GPS has already been submitted (as part of CTS Verifier).

Bug: 6424983
Change-Id: I163b9e44ea7ab71530b86fc2282614e0150e90f1
2012-05-17 14:56:54 -07:00
Irfan Sheriff
f82e7693ca Merge "handleAirplaneModeToggled cleanup" into jb-dev 2012-05-17 14:19:46 -07:00
Irfan Sheriff
42d73bba66 handleAirplaneModeToggled cleanup
Addressing a cosmetic comment from the previous CL

Bug: 6504534
Change-Id: I04981f8b541611cb93110e8b88cd7751027060cc
2012-05-17 14:14:44 -07:00
Irfan Sheriff
ce66556a34 Merge "Fix persisting wifi state on setWifiEnabled() call" into jb-dev 2012-05-17 14:10:35 -07:00
Irfan Sheriff
f03d62007c Fix persisting wifi state on setWifiEnabled() call
When somebody makes a quick setWifiEnabled calls in back to back succession,
we were missing setting the last state because we were only doing that
when wifi was in a particular state from a state machine's perspective.

This was done to handle the interaction b/w airplane and wifi and was
done in the wrong way. That part is now moved to the code which detects
airplane mode changes.

In the longer term, I want to move the whole persisting code as part of
wifi state machine which is more aware of the exact states wifi is in.

Bug: 6504534
Change-Id: I452f3f4efdeb84458dcfd280269e09ffa3844f05
2012-05-17 14:05:56 -07:00
Craig Mautner
d51a68b3d2 Merge "Eliminate deferred surface destruction." into jb-dev 2012-05-17 13:11:50 -07:00
Jeff Sharkey
70c70530bd Transition from DEV network stats to XT.
When XT stats are available, transition to prefer them over DEV,
since they aren't subject to hardware driver bugs.  Only switches at
the first atomic XT bucket, and adds a Settings.Secure flag to force
back to DEV if needed.  Includes tests to cover transition.

Fix tests where device overlay would change which network types
reflected data usage.  Test both history and summary APIs.  Fixed
collection timestamps to reflect full buckets.

Bug: 6504744
Change-Id: Idd7f3b2fdb064c36547c85c51c214fd938c59b7e
2012-05-17 10:10:39 -07:00
Craig Mautner
bf08af3323 Eliminate deferred surface destruction.
Removing the code that delays a surface destruction when
WindowManager.FLAG_KEEP_SURFACE_WHILE_ANIMATING is set. The lock
screen that continued to animate after destroySurfaceLocked is no
longer used and this code was causing problems.

Also mDrawState was being set to NO_SURFACE in destroySurfaceLocked
even if the surface ended up not being destroyed. Later when it was
reused the false value of mDrawState was messing things up.

The screen lock bug referenced below no longer levaes the user stuck
with a black lockscreen. However it occasionally powers back up in the
launcher screen rather than the lock screen.

Fixes bug 6485955.

Change-Id: I684104c7e7c39c161a5118aa890889fbae92e635
2012-05-16 20:07:22 -07:00
Kenny Root
11e123f768 Merge "Check system app before removal" into jb-dev 2012-05-16 18:59:04 -07:00
Svetoslav Ganov
824aa860cd Merge "Accessibility service needs to request permission to be bound to." into jb-dev 2012-05-16 17:52:59 -07:00
Jeff Brown
f3ae4e178c Merge "Tolerate missing power HAL module." into jb-dev 2012-05-16 16:25:12 -07:00
Svetoslav Ganov
53e184d34e Accessibility service needs to request permission to be bound to.
1. Every accessibility services targeting JellyBean or higher has
   to request a special permission for the system to bind to it.

Change-Id: I6e579326bdf3597f148d6c67317455701ec8af68
2012-05-16 15:57:15 -07:00
Kenny Root
87b5d7b26e Check system app before removal
Mae sure we check to see whether an app is really deleted or just
skipped.

Bug: 6494869
Change-Id: I918f16e4ccda87f7f6f67855c7a7aef435c64e20
2012-05-16 15:40:00 -07:00
Irfan Sheriff
4441a369ab Merge "Add logging to capture wifi enable" into jb-dev 2012-05-16 13:52:29 -07:00
Adam Cohen
e0bb6fe333 Merge "Cap widget bitmap usage by screen size (issue 6464700)" into jb-dev 2012-05-16 13:43:27 -07:00
Irfan Sheriff
bd21b78f0f Add logging to capture wifi enable
Bug: 6504534
Change-Id: I3c3a803ce5bc53f1bdae697a23b95d63db82717c
2012-05-16 13:42:46 -07:00
Jeff Brown
d232afa003 Tolerate missing power HAL module.
Bug: 6492793
Change-Id: I092605456e734e3f91ee098a197f208c738a619c
2012-05-16 13:39:46 -07:00
JP Abgrall
286298896b Merge "Revert "services: input events: enable debugging in EventHub (touch screen issues)"" into jb-dev 2012-05-16 13:24:10 -07:00
Robert Greenwalt
8b18354fd4 Merge "Add some logging to NDC." into jb-dev 2012-05-16 12:19:50 -07:00
JP Abgrall
25a465bb44 Revert "services: input events: enable debugging in EventHub (touch screen issues)"
This reverts commit df0a89daa8018f9dec53d8d766e5a045347ffc93

Get rid of the debugging for the release.
2012-05-16 10:33:49 -07:00
Daniel Sandler
fe0806a3b6 Removing a notification that isn't there isn't a big deal.
You shouldn't do it, but there's no need to fault your
process.

Bug: 6396830
Change-Id: I47c20b9829e4e8bb98862f33c3c52be1b5987f37
2012-05-16 12:43:02 -04:00
Dianne Hackborn
80fea051ba Merge "Fix some issues with updating the offsets of a window." into jb-dev 2012-05-15 18:15:47 -07:00
Dianne Hackborn
3e52fc2515 Fix some issues with updating the offsets of a window.
- Apply the correct crop rect at this point.
- Apply the correct position by taking into account the frame left/top.
- Don't directly apply the new values if the window is currently
  animating, since we need to go through the whole animation step
  to determine what the correct position is (taking into account
  any transformations).

Change-Id: I15d79354d9779867c49c7c0880faccdead7b021d
2012-05-15 17:58:02 -07:00
Robert Greenwalt
b5aff3fde3 Add some logging to NDC.
bug:6492166
Change-Id: Ib7c7a0927d3e920f6c041f7252f3f24c8e597bc7
2012-05-15 17:26:57 -07:00
Dianne Hackborn
e302a16235 A few odds and ends.
- Add documentation on "television" UI mode.
- Tweak new documentation and implementation around propagating
  URI grants through choosers.
- Add new activity launch flag for closing system dialogs.

Change-Id: I978c05f0dc3d16e1c55d43631828b9efa6335b19
2012-05-15 14:58:32 -07:00
Dianne Hackborn
bea7afc52c Merge "Fix issue #6284404: ArrayIndexOutOfBoundsException in..." into jb-dev 2012-05-15 13:57:06 -07:00
Svetoslav Ganov
0bef72450b Merge "Implement the global accessibility action to expand notifications." into jb-dev 2012-05-15 13:41:25 -07:00
Svetoslav Ganov
5c89f44ea1 Implement the global accessibility action to expand notifications.
bug:6468852

Change-Id: Id4494a07b1ed96773e22dcfdd5991afe3ee98004
2012-05-15 13:28:14 -07:00
Dianne Hackborn
03fcc333cf Fix issue #6284404: ArrayIndexOutOfBoundsException in...
...FragmentManagerImpl.restoreAllState

This was a bug related to the difference between the pre- and post-HC
behavior of onSaveInstanceState().  Prior to HC, state was saved
before calling onPause().  Starting with HC, it is saved between
onPause() and onStop().  To maintain compatibility with existing
applications, there is a check in ActivityThread for pre-HC to in
that case emulate the behavior of old applications, still calling
onSaveInstanceState() before onPause() but using the state later.

One of the special cases we had to deal with in the old model of
saving state before pausing was restarting an activity that is
already paused.

Consider, for example: you have two activities on screen, the one on
top not fullscreen so you can see the one behind.  The top activity
is resumed, the behind activity is paused.  In the pre-HC world, the
behind activity would have already had its state saved.

Now you rotate the screen, and we need to restart the activities.
We need to destroy the behind activity and create a new instance,
but the new instance has to end up in the paused state.  To
accompish this, we restart it with a flag saying that it should
end up paused.  For the pre-HC world, since it ends up paused,
we need to make sure we still have its instance state kept around
in case we need it because we can't regenerate it (since it is
already paused).

So that is what the changed code here is doing.  It goes through
the normal create/start/resume steps, but holds on to the current
saved state so that it isn't lost when resume clears it, and then
puts the activity back to paused and stuffs that old saved state
back in to it.

The problem is that this code was doing it for every application,
even HC apps.  So we end up in a bad state, when a HC app has its
saved state sitting there as if it had been saved, even though it
is only paused.  Now if we go to restart the activity again, instead
of asking it for a new saved state (as we should for a HC app as
part of stopping it), we just re-use the existing saved state again.

Now this wouldn't generally be a huge problem.  Worst case, when we
restart the activity yet again we are just instantiating it from
the same saved state as we used last time, dropping whatever changes
may have happened in-between.  Who cares?  All it has been doing is
sitting there in the background, visible to the user, but not something
they can interact with.  If the activity made changes to its
fragments, those changes will be lost, and we will restore it from
the older state.

However...  if one of those fragements is a retained fragment, this
will *not* appear in the saved state, but actually be retained across
each activity instance.  And now we have a problem: if the retained
fragments are changed during this time, the next activity instance
will be created from the most recent state for the retained fragments,
but the older state for everyting else.  If these are inconsistent...
wham, dead app.

To fix this, just don't keep the saved state for HC apps.

Also includes a small optimization to ActivityStack to not push
the home screen to the front redundantly.

Change-Id: Ic3900b12940de25cdd7c5fb9a2a28fb1f4c6cd1a
2012-05-15 13:13:33 -07:00
Svetoslav Ganov
d1ff736d01 Keeping the screen on during gesture detection.
1. During gesture detection we are not injecting the events we receive
   since we do not want the accessibility focus to move as a result of
   the hover event of the gesture. Because of that it was possible that
   we consume all events since the user performs only gesture to navigate
   resulting in the screen being off while the user is actively interacting
   with the device. Now we are poking the user activity in the power
   manager to keep the screen on.

bug:6485171

Change-Id: I06a09c5297f01bef5e20d471cee76fa7aae0c4fe
2012-05-15 12:51:43 -07:00
Amith Yamasani
bfc1be1101 Fix a problem in finish affinity in Activity Manager.
Finishing tasks with an activity affinity was failing if the
activity was found at index 0. This fixes the loop condition.

Change-Id: If2e0d294e3e4493bca8b7efd40f24adaf2eb0b6f
2012-05-15 11:12:17 -07:00
Dianne Hackborn
a827843f9b Merge "Fix issue #6020164: Settings crashed on orientation change..." into jb-dev 2012-05-14 17:31:53 -07:00
Dianne Hackborn
b61a02657b Fix issue #6020164: Settings crashed on orientation change...
...while listening to TTS example

This was a nice one.  What was happening is that immediately upon
being created, the activity was starting another activity in a
different process.  The second activity would never show, just
immediately exit.  However the original activity had time to
pause and get into stopping itself before the second activity had
come back to the activity manager to say it was going away, resulting
in the activity manager asking the original activity to resume.

At this point the activity manager's state is that the second
activity is finishing and gone, and the original activity is
resumed.  However in the app process the original activity is
still working on stopping itself, and it eventually completes
this and tells the activity manager.  The activity manager now
changes its state to STOPPED, even though it is actually resumed
and that is the last thing it told it to be, and it is now
proceeding to set itself in that state.

This would result later in the activity manager sending an
unnecessary state change to the application.  In the case of
the screen here, we next do a rotation change, the activity
manager thinks the current state is STOPPED not RESUMED, so it
tells the application to relaunch the activity in a new config
but not in the resumed state.  Now it does the whole "start a
new temporary activity" thing again, at which point it tries
to pause the original activity again, and we have an unbalanced
onPause() call to the app and it falls over.

Change-Id: I38b680746f4c61ae30e7ce831e1de187adf60902
2012-05-14 17:19:18 -07:00