6494 Commits

Author SHA1 Message Date
Dianne Hackborn
5265466e8a Merge "New development permissions." 2012-02-24 18:40:37 -08:00
Dianne Hackborn
0aec3ea6de am 911b505f: am dc5fa185: am 133dc2d7: Merge "Fix issue #6048808: sometimes auto-correct is inactive" into ics-mr1
* commit '911b505f11c719906985f169a4f45930bdec8695':
  Fix issue #6048808: sometimes auto-correct is inactive
2012-02-24 15:44:55 -08:00
Dianne Hackborn
7663d80f6b Fix issue #6048808: sometimes auto-correct is inactive
My previous change to speed up the time the IME is dismissed was
fundamentally flawed.  That change basically switched the order
the application called the input method manager service from doing
startInput() and then windowGainedFocus(), to first windowGainedFocus()
and then startInput().

The problem is that the service relies on startInput() being done
first, since this is the mechanism to set up the new input focus,
and windowGainedFocus() is just updating the IME visibility state
after that is done.  However, by doing the startInput() first, that
means in the case where we are going to hide the IME we must first
wait for the IME to re-initialize editing on whatever input has
focus in the new window.

To address this, the change here tries to find a half-way point
between the two.  We now do startInput() after windowGainedFocus()
only when this will result in the window being hidden.

It is not as easy as that, though, because these are calls on to
the system service from the application.  So being able to do that
meant a fair amount of re-arranging of this part of the protocol
with the service.  Now windowGainedFocus() is called with all of
the information also needed for startInput(), and takes care of
performing both operations.  The client-side code is correspondingly
rearranged so that the guts of it where startInput() is called can
instead call the windowGainedFocus() entry if appropriate.

So...  in theory this is safer than the previous change, since it
should not be impacting the behavior as much.  In practice, however,
we are touching and re-arranging a lot more code, and "should" is
not a promise.

Change-Id: Icb58bef75ef4bf9979f3e2ba88cea20db2e2c3fb
2012-02-24 13:18:23 -08:00
Daniel Sandler
3f0c58eb70 Merge "New notification priority and related APIs." 2012-02-24 10:53:42 -08:00
Daniel Sandler
2561b0b10a New notification priority and related APIs.
This change introduces a few new bits of data on
Notification that will help the Notification Manager and
System UI route and display them more intelligently:

 -> priority: an integer in a predefined range that
    indicates the app's best guess as to the relative
    importance (to the user, right now) of that information

 -> kind: a tag (really, set of tags) indicating the general
    type of notification (realtime, asynchronous, etc)

 -> extras: a Bundle of additional key/value pairs
    associated with this notification (currently @hidden)

The notification manager takes these data into account when
assigning to each notification a score which is passed with
the notification on to the system UI, where it can be used to
affect presentation. For example:

  - Spammy apps (identified explicitly by the user or by
    some other means) will have their notifications scored
    very negatively by the notification manager, allowing
    the UI to suppress them
  - Notifications of higher score might be shown larger
    or in a different way
  - Very important notifications (indicated by a very high
    score) might interrupt the user during an otherwise
    important task (videochat, game, etc)

Implementation note: This replaces/extends the old internal
notion of "priority", which was mostly used to organize
ongoings and system notifications at the top of the panel.

Change-Id: Ie063dc75f198a68e2b5734a3aa0cacb5aba1ac39
2012-02-24 13:47:00 -05:00
Svetoslav Ganov
42d840b91d Merge "Fixing issues with the AccessibilityNodeInfo cache." 2012-02-23 19:04:41 -08:00
Svetoslav Ganov
57c7fd5a43 Fixing issues with the AccessibilityNodeInfo cache.
1. Before there were two caches one in the app process that
   kept track only the ids of infos that were given to a
   querying client and one in the querying client that
   holds the infos. This design requires precise sync
   between the caches. Doing that is somehow complicated
   since the app has cache for each window and it has
   to intercept all accessibility events from that window
   to manage the cache. Each app has to have a cache for
   each querying client. This approach would guarantee that
   no infos are fetched twice but due to its stateful nature
   and the two caches is tricky to implement and adds
   unnecessary complexity. Now there is only one cache in
   the client and the apps are stateless. The client is
   passing flags to the app that are a clue what nodes to
   prefetch. This approach may occasionally fetch a node
   twice but it is considerably simpler and stateless
   from the app perspective - there is only one cache.
   Fetching a node more than once does not cause much
   overhead compared to the IPC.

Change-Id: Ia02f6fe4f82cff9a9c2e21f4a36747de0f414c6f
2012-02-23 18:51:04 -08:00
Dianne Hackborn
e639da7baa New development permissions.
These are permissions that an application can request, but won't
normally be granted.  To have the permission granted, the user
must explicitly do so through a new "adb shell pm grant" command.

I put these permissions in the "development tools" permission
group.  Looking at the stuff there, I think all of the permissions
we already had in that group should be turned to development
permissions; I don't think any of them are protecting public APIs,
and they are really not things normal applications should use.

The support this, the protectionLevel of a permission has been
modified to consist of a base protection type with additional
flags.  The signatureOrSystem permission has thus been converted
to a signature base type with a new "system" flag; you can use
"system" and/or "dangerous" flags with signature permissions as
desired.

The permissions UI has been updated to understand these new types
of permissions and know when to display them.  Along with doing
that, it also now shows you which permissions are new when updating
an existing application.

This also starts laying the ground-work for "optional" permissions
(which development permissions are a certain specialized form of).
Completing that work requires some more features in the package
manager to understand generic optional permissions (having a
facility to not apply them when installing), along with the
appropriate UI for the app and user to manage those permissions.

Change-Id: I6571785c6bb5f6b291862b7a9be584885f88f3a5
2012-02-23 16:39:15 -08:00
Dianne Hackborn
b8678d76c3 resolved conflicts for merge of 210c1a26 to master
Change-Id: Ic44193e62215086c22225f2def5eee3159d26ae8
2012-02-23 10:54:06 -08:00
Craig Mautner
5489e4af19 Merge "- Consolidate all animations in a single place outside of layout loop. - Move mPolicy.startAnimationLw and mPolicy.finishAnimationLw into same method as mPolicy.animatingWindowLw. - Fix first parameter of performLayoutLockedInner(initial, ...) to pass true on initial pass." 2012-02-22 07:53:43 -08:00
Svetoslav Ganov
0d04e24553 Improving accessibility APIs used for UI automation.
1. UiTestAutomationBridge was accessing the root node in the
   active window by tracking the accessibility event stream
   and keeping the last active window changing event. Now
   the bridge is stateless and the root node is fetched by
   passing special window and view id with the request to
   the system.

2. AccessibilityNodeInfos that are cached were not finished,
   i.e. not sealed, causing exception when trying to access
   their children or rpedecessors.

3. AccessibilityManagerService was not properly restoring its
   state after the UI automation bridge disconnects from it.
   I particular the devices was still in explore by touch mode
   event if no services are enabled and the sutomation bridge
   is disconnected.

4. ViewRootImpl for the focused window now fires accessibility
   events when accessibility is enabled to allow accessibility
   services to determine the current user location.

5. Several missing null checks in ViewRootImpl are fixed since
   there were scenraios in which a NPE can occur.

6. Update the internal window content querying tests.

7. ViewRootImpl was firing one extra focus event.
bug:6009813
bug:6026952

Change-Id: Ib2e058d64538ecc268f9ef7a8f36ead047868a05
2012-02-21 17:09:09 -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
Craig Mautner
2f995a7eaa - Consolidate all animations in a single place outside of layout loop.
- Move mPolicy.startAnimationLw and mPolicy.finishAnimationLw into same method as mPolicy.animatingWindowLw.
- Fix first parameter of performLayoutLockedInner(initial, ...) to pass true on initial pass.

Change-Id: If1b47bb8a7e03cf427769c657e371abc0910b3e3
2012-02-21 09:53:21 -08:00
Todd Poynor
94d0024557 Power HAL PowerManagerService hookup
Use PowerHAL to set system awake/suspend state.

Change-Id: If58a6f548564ea141b68f304455997d9ff04eace
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-02-17 22:19:45 -08:00
Jeff Brown
ba217ef207 Merge "Ignore broken input channel when finishing input event." 2012-02-17 10:30:50 -08:00
Jeff Brown
9806a2307f Ignore broken input channel when finishing input event.
There are occasional races during application shut down where the
input dispatcher will close an input channel before the application
has finished its last event.  So just ignore EPIPE.

Also tweak the logging for failed input event injection to make
it clearer which pid was trying to perform the injection.

Bug: 6013004
Change-Id: I7bbb01441d41762b03eafd4d39dcf0323e1cadf3
2012-02-17 10:28:09 -08:00
Dianne Hackborn
b9ee4f4425 Merge "Revert "Don't wait for current activity to pause before resuming next."" 2012-02-16 18:01:31 -08:00
Dianne Hackborn
621e2fecb5 Revert "Don't wait for current activity to pause before resuming next."
This reverts commit cbb722ed06092a9e2be37150aa8bc635f0fe21da.
2012-02-16 17:07:33 -08:00
Amith Yamasani
3c3155abea Merge "Fix Power Control widget" 2012-02-16 15:48:14 -08:00
Amith Yamasani
67cf7d314b Fix Power Control widget
Some changes in AppWidgetService were interfering with widget permissions.

Added some hidden methods in Context to communicate the requesting user
information instead of using the calling uid.

Bug: 6019296
Change-Id: I5e519fd3fbbfa5b3fcc5c297b729c671dac8e7c7
2012-02-16 15:03:42 -08:00
John Grossman
c157673a59 Add the CommonTimeManagementService.
Add a small service to the high level core set of system services to
control the configuration of the native common time service.  This
service is responsible for controlling policy regarding when the
common time service should be allowed to run, which networks it is
allowed to run on, what priority it runs at in the master election
algorithm, and so on.

Change-Id: I1fcd834c0286aea0df9557520693a3f42de59d69
Signed-off-by: John Grossman <johngro@google.com>
2012-02-16 13:45:10 -08:00
Svetoslav Ganov
cb46d80d21 Merge "Adding shell commands for modifying content." 2012-02-16 13:06:29 -08:00
Jeff Brown
4a06c8008b Simplify Choreographer API.
Removed the listeners and schedule animation / draw methods.
Instead all requests are posted as one-shot callbacks, which is a
better match for how clients actually use the Choreographer.

Bug: 5721047
Change-Id: I113180b2713a300e4444d0d987f52b8157b7ac15
2012-02-15 15:06:01 -08:00
Svetoslav Ganov
25872aa3ef Adding shell commands for modifying content.
1. Added methods to the ActivityManagerService remote interface
   that allow accessing content providers outside of an application.
   These methods are guarded by an internal signature protected
   permission which is given to the shell user. This enables a
   shell program to access content providers.

2. Implemented a shell command that takes as input as standart
   fagls with values and manipulates content via the content provider
   mechanism.

Change-Id: I2943f8b59fbab33eb623458fa01ea61a077b9845
2012-02-15 14:55:47 -08:00
Amith Yamasani
ea555e2740 Merge "Mixed up uid and user-id." 2012-02-14 16:12:27 -08:00
Amith Yamasani
c600e21ffc Mixed up uid and user-id.
1000 is not a userId !

Potential fix for #5990664,#6008692

Change-Id: I528e742e494bc24beef7b59ccb315b7a5d4e84fe
2012-02-14 16:08:07 -08:00
Mike Lockwood
ef9d55a6b0 am 8f7cc7af: am b9be8eff: am ffc89899: Merge "Don\'t pulse LED on new notification unless notification has LED flag set" into ics-mr1
* commit '8f7cc7af66520e3bd5e59e8eadb6907e3e043661':
  Don't pulse LED on new notification unless notification has LED flag set
2012-02-14 13:08:01 -08:00
Robert Greenwalt
2384386f31 Stop using shared DUN APN when tethering stops.
Backported from master, including a bug fix and a cdma enhancement.

Even if other people are sharing the connection (ie, carrier wants
default and tethered traffic on the same APN) stop using a carrier-
described APN when the tethering stops.

bug:5972599
Change-Id: I25e4831855e6b62c0c3ab3a6f4d4846aaee6ac50
2012-02-14 11:44:09 -08:00
Mike Lockwood
ece18efb35 Don't pulse LED on new notification unless notification has LED flag set
Bug: 6006131

Change-Id: I719c7d68e310bfaca227f6286159b3993784926b
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-02-13 20:42:19 -08:00
Dianne Hackborn
07f941f026 Merge "Move BroadcastQueue out of the ActivityManager class." 2012-02-13 14:34:26 -08:00
Dianne Hackborn
ec5b5156e7 Merge "Fix issue where screen rotations would stop animating." 2012-02-13 13:30:53 -08:00
Dianne Hackborn
4dcece8e50 Fix issue where screen rotations would stop animating.
If we went through the update loop multiple times, and had finished
animating the first time, we would blow away that information the
second time and never kill the animation.

Also moved killing the animation back up to the animation step --
this involves destroying surfaces and such, and so really should
be done as part of the surface transaction.  We can also consider
the screen rotation animation object to be owned by the animation,
so it can destroy it when done.

Change-Id: If24356c509c66d046f2ddfd9ad5bfe12504d7716
2012-02-13 10:37:08 -08:00
Jeff Brown
62d1058cc9 Merge "Remove the input dispatcher throttle." 2012-02-13 10:26:33 -08:00
Dianne Hackborn
40c8db5a28 Move BroadcastQueue out of the ActivityManager class.
Change-Id: Ib468481588a1aa506ff00f3c4b1a6ecf672c7b99
2012-02-10 18:59:48 -08:00
Wink Saville
41b564f354 resolved conflicts for merge of e8b57fea to master
Change-Id: I2ccf2b4cb73faadd0c8608cc21dda5db888d2937
2012-02-10 16:11:18 -08:00
Mike Lockwood
c199e2c7e0 Merge changes Iefeba018,I1ce5b26d,Ie3f59793,Id3c5e1ec,I9063154a,Ib7bd88a3,I20963df8,I01060b08,I7dc29739,I5c55a051,Ia07aa3c4,I3194ea94,I0dc37cce,Ic3a7bb65,I0a7eaecf,Ifa7b0614,Ice952c8e,Ia5abdb9e,Ifcb310f9,If5f4ec97,I4767690f,I79824179,I6e0f981e,Id60ae7f6
* changes:
  EthernetDataTracker: Don't run DHCP or set network available until link is up
  Only send master volume or mute updates if the settings have changed
  Make AudioManager.adjustMasterVolume public and hidden
  Allow disabling network stats support in a resource overlay
  Restore persisted master volume if the media server restarts
  Don't allow changing master volume when muted
  Show the flags in package manager debugging.
  Modified the constructor of EndpointBase
  Add a getEndpointInfo accessor to AIDL-generated RPC proxy classes
  Defer persisting master data to avoid excessive database writes
  Add an option that disables the AUDIO_BECOMING_NOISY intent send when a headset is hotplugged.
  Remove reference counting and client death notification for master mute
  AudioService: Send broadcasts when master volume and mute state change
  Use the new get/putFlattenable methods on RpcData.
  Don't try to unmarshal void return types when there are out parameters being returned.
  AudioManager: Add wrapper methods for master volume support
  AudioManager: Add support for master mute
  NetworkTimeUpdateService: Schedule NTP on ethernet connect as well as wifi
  For events, require that the parameters be marked in.
  PhoneWindowManager: stifle warning that ITelephony service does not exist
  AudioManager: transparently convert volume settings for other streams to master volume if config_useMasterVolume is set.
  Support putting Flattenables in Lists.
  Was generating code that uses the wrong RpcData.
  store the hw addr in the extraInfo field of ethernet NetworkInfos
2012-02-10 15:26:36 -08:00
Svetoslav Ganov
0ee0969ffb Merge "UI automation service disconnected upon package change." 2012-02-10 15:13:26 -08:00
Svetoslav Ganov
9b666d0faa UI automation service disconnected upon package change.
1. The AccessibilityManagerService used to disable the IU
   automation service on package change. This behavior
   was incorrect since the automation service has to
   survive package installations.

bug:5975207

Change-Id: Idb5e76d02625c333a5842a6b5c5bc90c9b9634c9
2012-02-10 14:55:45 -08:00
Joe Onorato
20963df86f Show the flags in package manager debugging. 2012-02-10 14:44:07 -08:00
Jason Simmons
a07aa3c4c7 Add an option that disables the AUDIO_BECOMING_NOISY intent send when a headset is hotplugged.
HDMI audio hotplug is treated as a "headset" in the audio services.  When a headset is unplugged,
WiredAccessoryObserver sends an AUDIO_BECOMING_NOISY broadcast so that applications can take
appropriate action (e.g. pausing audio if headphones were unplugged).

However, on Tungsten, when you unplug HDMI audio, the Music2 service was getting the NOISY intent
and pausing the transmitter media player.  We could add Tungsten-specific code to Music2 to
disable this behavior, but it's probably better to disable this broadcast entirely because
applications on Tungsten probably shouldn't treat HDMI hotplug in the same way they treat
headphone hotplug on phones.
2012-02-10 14:44:07 -08:00
Mike Lockwood
a5abdb9e58 NetworkTimeUpdateService: Schedule NTP on ethernet connect as well as wifi
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 14:44:05 -08:00
Amith Yamasani
f0451db422 Merge "Multi-user - wallpaper service" 2012-02-10 14:34:52 -08:00
Amith Yamasani
37ce3a8af6 Multi-user - wallpaper service
- Allow each user to have their own wallpaper (live or static).
- Migrate old wallpaper on upgrade.
- Update SystemBackupAgent to backup/restore from primary user's
  new wallpaper directory.

Reduce dependency on Binder.getOrigCallingUser() by passing the
userId for bindService.

Change-Id: I19c8c3296d3d2efa7f28f951d4b84407489e2166
2012-02-10 14:34:07 -08:00
Joe Onorato
54a4a41a60 Make ActivityManagerService just kill apps when they crash on headless devices. 2012-02-10 12:52:54 -08:00
Mike Lockwood
c067c9c373 Add support for disabling wallpaper service
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 12:52:46 -08:00
Kazuhiro Ondo
afd8f1820e Add OEM specific USB mode enumeration based on ro.bootmode property
This patch is adding a capability so that OEM can override USB mode
in case the device is boot up with OEM specific mode. (i.e. modem
debug, factory test etc.)

Bug:5964042
Change-Id: Ic8e23d302563ce71eedb74ce94cca8c65838a4f7
2012-02-10 12:29:12 -08:00
Mike Lockwood
491f40ddf2 Fix merge problem
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 12:09:31 -08:00
Mike Lockwood
cba928cef7 SystemServer: Add support for disabling AudioService and MountService
Using the same convention in system_init.cpp, you can disable these
services by setting system properties:

	system_init.startaudioservice=0
	system_init.startmountservice=0

Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 12:02:04 -08:00
Mike Lockwood
11ca31729c Merge changes Id747dc81,I3a74bd36,I2395527c,I86aeb066,Ic33d5766,I7bef7390,I4b797dd8,Id3622e9e,I28087c63,Ia1c6d909,I95a766dd,I6c0236c5,Ib71287f4,I4bcbefdc,I22a7cb8d,Ie24dbeaf,I7dbc4b45,I21d524ea,Iaa5bf14e,I7db766c3,I93fcaca2,I1eb72044,I05ffbe7c,Ifdfe2ff8,Ia8f767a2
* changes:
  Fix problems dispatching media button events on headless devices
  Add headless mode for running the framework without the surface flinger
  SettingsProvider: Allow overridding default value for Setttings.Secure.DEVICE_PROVISIONED
  Load lockscreen.disabled setting on database create as well as upgrade
  SystemUI: Log an error instead of throwing an exception if navigation bar is enabled in tablet UI
  SettingsProvider: Add support for overriding lockscreen.disabled default value
  Allow overriding default STAY_ON_WHILE_PLUGGED_IN setting value in an overlay
  Disable output processing when opening serial port.
  Update aidl for new Broker API.
  aidl: All flattenable types now must also be parcelable.
  Update aidl to new APIs.
  Suport RpcData as a parcelable type.
  Modified AIDL to support authentication
  Fix disconnect from wired ethernet issues.
  Fix PresenterClass by adding a _listener field
  add presenters to aidl.
  Add SerialPort.sendBreak()
  Generate fallthrough for unhandled actions in RPC methods.
  PhoneWindowManager: Disable boot progress dialog on headless builds
  Support custom flattenable types for RPC.
  SystemServer: Don't start A2DP service if audio is not enabled
  Add RpcData as a built-in marshallable type.
  Add the full suite of RpcData types.
  Checkpoint adding @home RPC support to aidl
  ActivityManager: Make sure BOOT_COMPLETED Intent is sent when running headless
2012-02-10 11:50:10 -08:00
Mike Lockwood
1e11c6519a Merge "New Serial Manager API:" 2012-02-10 11:41:41 -08:00