9156 Commits

Author SHA1 Message Date
Mathias Agopian
509e23e8a4 Merge "fix a typo causing sensor event to be sorted in reverse chronological order" 2012-04-20 14:20:22 -07:00
Dianne Hackborn
e1a996e99d Merge "Move handling of package changes to a background thread." 2012-04-20 13:44:43 -07:00
Jeff Brown
f44e39493c When ANR happens, only remove ANR'd window.
The system bar uses input event injection to inject BACK keys
into the application.  If the receiving application ANRs, we
used to clear the touch state unconditionally.  Doing so would
prevent the system bar from receiving the ACTION_UP event so
the back button would continue to appear pressed until pressed
again.

Now we are more careful to only remove the specific ANR'd
window from the touch state.  Other windows should continue
to receive touch events as usual.

Change-Id: If86bfc323e2c7aed82ca1334bc67da649953168f
2012-04-20 11:33:27 -07:00
Henrik Engström
9771a3144c Fix for too many binder calls in packagemanager
The packagemanager uses a ParceledListSlice to send back its lists
of installed packages and apps. The list slice has a method append
which, in addition to adding the item to the list, also returns true
if the list has passed a size limit (about 1/4 of the total possible
IPC parcel size) to let the caller know that he should send the
slice. However, when used by the pm, it has an extra ! that makes it
send whenever it ISN'T over this limit instead (and conversely, not
send if it is under). This causes a lot more calls than needed since
it sends tiny one item slices instead of larger ones. This patch
removes the extra ! making it behave correctly.

Change-Id: I8db46d380a25406b55f3214aee1505e81949acc5
2012-04-20 12:49:13 +02:00
Dianne Hackborn
d0d7503fd3 Move handling of package changes to a background thread.
Helps get rid of some jank when installing applications.

Change-Id: I97d0022f82d67796e334d37086e5911dd6ca6b62
2012-04-19 23:12:09 -07:00
Svetoslav Ganov
e30df7744c Merge "Adding an opt-in mechanism for gesture detection in AccessibilityService." 2012-04-19 22:09:27 -07:00
Svetoslav Ganov
fefd20e927 Adding an opt-in mechanism for gesture detection in AccessibilityService.
1. An accessibility service has to explicitly opt in to be notified
   for gestures by the system. There is only one accessibility service
   that handles gestures and in case it does not handle a gesture
   the system performs default handling. This default handling ensures
   that we have gesture navigation even if no accessibility service
   would like to participate/customize the interaction model.

bug:5932640

Change-Id: Id8194293bd94097b455e9388b68134a45dc3b8fa
2012-04-19 22:08:42 -07:00
Winson Chung
dd184f9fb1 Merge "Adding callback for widget size changed, and potentially other extra info" 2012-04-19 18:45:37 -07:00
Mathias Agopian
f48206f877 fix a typo causing sensor event to be sorted in reverse chronological order
Change-Id: I041c64616d88ed1abb5efc90ed9eb0d9baeb4832
2012-04-19 18:18:24 -07:00
Adam Cohen
e8724c82ab Adding callback for widget size changed, and potentially other extra info
Change-Id: I57738c92b6a0ba68ae66b19a533559470c64e6f1
2012-04-19 18:01:46 -07:00
p13451
dbad287b62 Issue: Foreground activity performs [Resume] and [Pause] when any process died in sleep mode.
Step to Reproduce
1)	Turn off device’s screen. (Sleep mode)
2)	Kill any process.
A.	Engineer Version: kill [PID]
B.	User Version: am force-stop [Package Name]
3)	Foreground activity proceed [Resume] and [Pause] consecutively.

Reason: Since ICS version, activity goes to stopped status when screen turns off.
stopIfSleepingLocked( ) makes activity to stopped status but, pauseIfSleepingLocked( ) was used in GB
and, activity keep paused status and, this problem did not occur.
This change give effect to resuming activity when any process was killed.
Because, resume is proceed without exception for activity status.
The exception only filtered for [ActivityState.PAUSED] in sleep or shutdown mode.
and, resume complete flow when activity status was [ActivityState.STOPPED].

Solution for this issue:
We think that exception’s condition have to change if stopped activity status is intended in sleep mode.
According to activity life cycle, activity can not resume from stop status.

Also check [ActivityState.STOPPING]. :)

Change-Id: Icca3366ac30ffa3b18f6e2393e4d7309089ef26a
2012-04-20 09:21:08 +09:00
Jeff Sharkey
875f064316 Merge "Move SystemUI out of system UID." 2012-04-19 15:59:20 -07:00
Jeff Brown
00710e906b Make InputDevice.SOURCE_STYLUS meaningful.
Bug: 5424551
Change-Id: I415cb1842422e050cc41b17f5a1f13b4fab17a44
2012-04-19 15:21:08 -07:00
Dianne Hackborn
661f362a2c Merge "Add new API to find smallest/largest screen size." 2012-04-19 15:01:36 -07:00
Dianne Hackborn
68c33ca7ce Add new API to find smallest/largest screen size.
Change-Id: I790801fceaf84ee2e3b1c9d32828285ad3231d0e
2012-04-19 14:55:13 -07:00
Jeff Sharkey
4b49657c7f Log when /cache files are deleted.
Bug: 6362988
Change-Id: Ib8497453c45612be5b83035eeaf3abe6d716ccbf
2012-04-19 14:17:47 -07:00
Jeff Sharkey
35be756030 Move SystemUI out of system UID.
Add permissions for various things it pokes.  Create new permission
to control launching non-exported activities from recents.  Hidden
API to relax WallpaperService checks.

Change-Id: I547fdcd7c213dd153ae101533ce7c56cd8f86a0d
2012-04-19 11:54:34 -07:00
Jeff Brown
0d7da09466 Merge "Don't load keyboard layout overlay for virtual keyboard." 2012-04-19 11:32:24 -07:00
Jeff Brown
61c0824058 Don't load keyboard layout overlay for virtual keyboard.
Bug: 6110399
Change-Id: I07c85cf991790ed8766b097acc39295a8065a5ea
2012-04-19 11:25:09 -07:00
Irfan Sheriff
f40a02f85f Merge "Fix build" 2012-04-19 10:27:58 -07:00
Irfan Sheriff
54ac7a5102 Fix build
Change-Id: I1968e0d7d25f613fa6cf72f82d79f17224e3d5ab
2012-04-19 10:26:34 -07:00
Craig Mautner
76eb1032d8 Merge "Defer the Surface.show until animation phase." 2012-04-19 10:07:35 -07:00
Craig Mautner
de6198ebd7 Defer the Surface.show until animation phase.
This fixes a rotation bug introduced by delaying rendering animation
into the Surface. Now instead of delaying the rendering we delay the
show by eliminating a point where we were showing the Surface too soon.

Change-Id: I63ad3b494963111ffc96569093c8d43517c5408b
2012-04-19 09:59:31 -07:00
Irfan Sheriff
66e69db6d9 Merge "Add user control to turn on/off nsd" 2012-04-19 09:57:02 -07:00
Irfan Sheriff
3ef889bf56 Add user control to turn on/off nsd
Change-Id: Ide3cc20adb21ac6dffaf6b9b9136d77a129afa3b
2012-04-19 09:52:09 -07:00
Daniel Sandler
0da673f02e Notifications may now be disabled on a per-package basis.
When a package's ability to post notifications is disabled,
all outstanding notifications from that package are
immediately canceled, and the score of any future
notification from that package is set so low that the
notification manager won't even send it to the status bar.

No UI for this yet, but you can try it out:

  adb shell service call notification 8 s16 $PKG i32 (1|0)

Bug: 5547401

Change-Id: Ieccac5746b40f60debd902a45d1dedbc91dcdc89
2012-04-19 11:39:49 -04:00
Dianne Hackborn
08ce91a1a4 am 7eda9de1: am 2fe57183: am 30eec832: Merge "Transparent activity orientation problem when previous landsacpe fullscreen activity not yet destroyed."
* commit '7eda9de1a638e4ed1ce5dc65fecd673400b9f3c0':
  Transparent activity orientation problem when previous landsacpe fullscreen activity not yet destroyed.
2012-04-18 20:45:45 -07: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
Svetoslav Ganov
f01d3dd710 Merge "Adding some more gestures and actions for accessibility." 2012-04-18 14:14:37 -07:00
Craig Mautner
f35ea5d25b Merge "Delay rendering into Surface until draw completed." 2012-04-18 14:12:22 -07:00
Craig Mautner
9546e457fc Delay rendering into Surface until draw completed.
Hold off on updating surface with animation until the Surface draw has
completed. Previously we were calling Surface.setAlpha/setLayer/
setMatrix prior to the app drawing into the surface. This fixes a bug
that caused a flash of the target animation image before the animation
had begun.

Change-Id: Id9142e09b0b22d631dc002eba4dc787455dea03a
2012-04-18 14:04:38 -07:00
Svetoslav Ganov
005b83b0c6 Adding some more gestures and actions for accessibility.
1. Added more gesture for accessibility. After a meeting
   with the access-eng team we have decided that the current
   set of gestures may be smaller than needed considering
   that we will use four gestures for home, back, recents,
   and notifications.

2. Adding actions for going back, home, opening the recents,
   and opening the notifications.

3. Added preliminary mapping from some of the new gestures
   to the new actions.

4. Fixed a bug in the accessibility interaction controller
   which was trying to create a handled on the main looper
   thread which may be null if the queried UI is in the
   system process. Now the context looper of the root view
   is used.

5. Fixed a bug of using an incorrect constant.

6. Added a missing locking in a couple of places.

7. Fixed view comparison for accessibilityt since it was
   not anisymmetric.

bug:5932640
bug:5605641

Change-Id: Icc983bf4eafefa42b65920b3782ed8a25518e94f
2012-04-18 13:43:55 -07:00
Jeff Sharkey
e7d9cd363d Merge "Add ALLOW_METERED column to DownloadManager." 2012-04-18 12:22:49 -07:00
Jeff Sharkey
15ec7d6d7f Add ALLOW_METERED column to DownloadManager.
Also allow isActiveNetworkMetered() to inspect networks without
requiring ACCESS_WIFI_STATE.

Bug: 3001465
Change-Id: Ibc23577d4ad941e4f93db417be6b046881dcbfb1
2012-04-18 10:12:09 -07:00
Amith Yamasani
3cdfcdc1c4 Merge "Fix an NPE when launching an activity that's not found." 2012-04-18 10:04:28 -07:00
Amith Yamasani
95a6a96e1c Fix an NPE when launching an activity that's not found.
Bug: 6356194
Change-Id: I66aeeda3ecab36a4aa32fb78c1d0559a73cd9a7a
2012-04-18 09:54:43 -07:00
p13451
0445bc6e4e Transparent activity orientation problem when previous landsacpe fullscreen activity not yet destroyed.
After terminating landsacpe fullscreen activity,
when user launch transparent activity via portrait home app, transparent activity is shown as landscape mode.

At this time AppWindowToken of previous acitivity has not been deleted, because Activity.onDestory() has not been returned yet.
In this case, getOrientationFromAppTokensLocked() returned ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE.

Ignore hidden application is terminated on the top.
See also http://code.google.com/p/android/issues/detail?id=28927

Change-Id: I51239431120ec6ba8f8ff76871efb2347b9810ca
2012-04-18 15:13:26 +09:00
Jeff Brown
6947fd0f96 Merge "Fix build." 2012-04-17 19:53:47 -07:00
Jeff Brown
426f905b84 Fix build.
Change-Id: I277042c91b34af59e70941fd5b458581310b1c22
2012-04-17 19:52:56 -07:00
Jeff Brown
6957b60378 Merge "Add Dvorak keyboard layout." 2012-04-17 19:21:34 -07:00
Jeff Brown
4a3862f6b0 Add Dvorak keyboard layout.
Added support for mapping both scan codes and HID usages to
KeyLayoutMap and KeyCharacterMap.  Keyboard overlays can
now influence how key events are mapped to key codes.

Bug: 6110399
Change-Id: I6619fd2d3e1337c55928f89869dbc45b535c7ccf
2012-04-17 18:50:05 -07:00
Jeff Brown
420489ca1f Merge "Support loading keyboard layout overlays from resources." 2012-04-17 17:59:03 -07:00
Jeff Brown
6ec6f79e1a Support loading keyboard layout overlays from resources.
Added the concept of a keyboard layout overlay, which is
a key character map file that has "type OVERLAY".

Added support for loading keyboard layout overlays from
resources dynamically.  The layouts are reloaded whenever they
are changed in the Settings application or an application
is installed.  This is somewhat more aggressive than necessary
so we might want to optimize it later.

Before system-ready, the input system uses just the generic
keyboard layouts that are included on the device system image.
After system-ready, it considers the user's selected keyboard
layout overlay and attempts to load it as necessary.  We need to
wait until system-ready before doing this because we need to
be in a state where it is safe to start applications or access
their resources.

Bug: 6110399
Change-Id: Iae0886d3356649b0d2440aa00910a888cedd8323
2012-04-17 17:56:32 -07:00
Craig Mautner
a51a9564fd Add call-stack reporting methods into Debug
Added two public methods to Debug. These methods return a String
indicating the caller (getCaller()) or callers (getCallers(int depth))
of the calling method. The String indicates the class, method and line
number of the caller(s). Similar to using Throwable.fillInStackTrace()
but much more concise.

Change-Id: I53d0085aa50e4501d28e8eb3ad5b91ef700ac218
2012-04-17 17:25:50 -07:00
Craig Mautner
c843642fbb Merge changes I4752bdf1,I37690cf2
* changes:
  Move Surface operations into existing transaction.
  Clear orientation variable until rotation is done.
2012-04-17 13:18:45 -07:00
Amith Yamasani
d95ce04bdc Merge "Make sure persistent processes are not replicated for secondary users." 2012-04-17 11:55:54 -07:00
Craig Mautner
acaf9cca86 Move Surface operations into existing transaction.
Several Surface operations - notably setPosition, setSize, and show -
had been moved outside of a Surface.openTransaction/closeTransaction
window. This corrects that problem.

In addition, before animations were separated from layout the Surface
frame was computed prior to returning from relayoutWindow(). After
separation the frame was being computed during animation. This checkin
restores the frame calculation in layout.

Fixes bug 6343291.

Change-Id: I4752bdf1fed0f2b46c5eb9508825c9b1b0fd702f
2012-04-17 11:55:00 -07:00
Jeff Brown
0192e966ff Merge "Add persistence for selected keyboard layout." 2012-04-17 11:52:29 -07:00
Jeff Brown
a3bc565882 Add persistence for selected keyboard layout.
Bug: 6110399
Change-Id: I99544bf05e9755385bee478b5f047ccec2e5cae3
2012-04-17 11:42:25 -07:00
Amith Yamasani
a4a54e2a5f Make sure persistent processes are not replicated for secondary users.
An intent is launched in a singleton process if the process is persistent
and the resolved activity/service/etc is not requested to run in a different
process.

Change-Id: I1463e73a76bc8bde4185f9cf4395edb47515841d
2012-04-17 11:41:30 -07:00