8244 Commits

Author SHA1 Message Date
Jeff Brown
3241b6b7bd Remove batching and streaming from the input dispatcher.
Don't worry, these features will be moving to a different part of
the pipeline.  We're just getting them out of the way for now so
we can make deeper changes to how the input dispatcher works.

This is part of a series of changes to improve input system pipelining.

Bug: 5963420

Change-Id: If97de923c8165776882eef23f5204cc448dad0fc
2012-02-13 10:28:39 -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
9288155154 Merge "resolved conflicts for merge of e8b57fea to master" 2012-02-10 16:57:39 -08:00
Wink Saville
41b564f354 resolved conflicts for merge of e8b57fea to master
Change-Id: I2ccf2b4cb73faadd0c8608cc21dda5db888d2937
2012-02-10 16:11:18 -08:00
Glenn Kasten
ad8d175b40 mAudioHwDevs and related cleanup
Inline AudioFlinger::initCheck and remove unnecessary lock.

Remove redundant check of mAudioHwDevs.size().

No need to lock mHardwareLock for each device separately
during initialization.

Use size_t not int to loop through Vector, since size() returns size_t.

Add missing hardware lock for get_mic_mute() and get_input_buffer_size().

Add comments.

Change-Id: Iafae78ef78bbf65f703d99fcc27c2f4ff221aedc
2012-02-10 15:36:46 -08:00
Glenn Kasten
da639f5438 Merge "Simplify ThreadBase::exit() aka requestExitAndWait" 2012-02-10 15:32:16 -08:00
Glenn Kasten
6f5f9ce713 Merge "Disable HQ resamplers for now until qualified" 2012-02-10 15:31:54 -08:00
Glenn Kasten
d335c1cc4f Merge "Move header declarations around for clarity" 2012-02-10 15:31:07 -08:00
Glenn Kasten
3ebf95bb52 Merge "Camel case readability & private disconnect(bool)" 2012-02-10 15:30:15 -08:00
Glenn Kasten
2a67e1a6c0 Merge "Remove aliasing" 2012-02-10 15:29:35 -08:00
Glenn Kasten
5bb3090a18 Merge "Use mul from audioutils" 2012-02-10 15:28:57 -08:00
Glenn Kasten
52ee635039 Merge "Mark fields const if only set in constructor" 2012-02-10 15:28:45 -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
Wink Saville
812c2ff631 am 197fe269: Merge "Add OEM specific USB mode enumeration based on ro.bootmode property" into ics-mr1
* commit '197fe26940022be75384f4038dd789f446d33122':
  Add OEM specific USB mode enumeration based on ro.bootmode property
2012-02-10 15:14:40 -08:00
Svetoslav Ganov
0ee0969ffb Merge "UI automation service disconnected upon package change." 2012-02-10 15:13:26 -08:00
Glenn Kasten
761286f65b Simplify ThreadBase::exit() aka requestExitAndWait
We can remove mExiting and use Thread::exitPending() instead.

The local sp<> on "this" in exit() is not needed, since the caller must
also hold an sp<> in order to be calling us. (Unless it was using a raw
pointer, but that would be dangerous for other reasons.)

Add comment explaining the mLock in exit().

Change-Id: I319e5107533a1a7cdbd13c292685f3e2be60f6c4
2012-02-10 15:02:44 -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
Glenn Kasten
1137be1a68 Follow raw pointer and sp<> conventions
Unconditional delete for raw pointers.
Use "if (sp != 0)" not "if (sp.get() != 0)" or "if (sp != NULL)".
Use "if (raw != NULL)" not "if (raw)".

Change-Id: I531a8da7c37149261ed2f34b862ec4896a4b785b
2012-02-10 13:48:44 -08:00
Glenn Kasten
5dd4754f58 Merge "No newline or space at end of ALOG format string" 2012-02-10 13:36:24 -08:00
Glenn Kasten
c1513f42ee Merge "Move declaration of stream_type_t up earlier" 2012-02-10 13:33:31 -08:00
Glenn Kasten
80d0a9db55 Merge "Fix typos in ALOG for pid vs tid" 2012-02-10 13:33:02 -08:00
Glenn Kasten
9fd2d6b1a6 Merge "Rename type() to streamType()" 2012-02-10 13:30:24 -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
a21e945502 BatteryService: Don't fail to register native methods if kernel power supply driver is missing
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 12:00:32 -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
Dianne Hackborn
d262744b7e Merge "Some cruft removal." 2012-02-10 11:14:39 -08:00
Dianne Hackborn
21fbd1f7da Some cruft removal.
Change-Id: If4a94bfd4a033748eb13e8f3ff25e24382746778
2012-02-10 10:54:15 -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
93fcaca2aa SystemServer: Don't start A2DP service if audio is not enabled
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 10:51:21 -08:00
Mike Lockwood
a8f767a239 ActivityManager: Make sure BOOT_COMPLETED Intent is sent when running headless
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 10:51:20 -08:00
Mike Lockwood
b01e8bf57b New Serial Manager API:
SerialManager: provides access to serial ports
SerialPort: for reading and writing data to and from serial ports

IO with both array based and direct ByteBuffers is supported.

Accessing serial ports requires android.permission.SERIAL_PORT permission

Each platform must configure list of supported serial ports in the
config_serialPorts resource overlay
(this is needed to prevent apps from accidentally accessing the bluetooth
or other system UARTs).

In addition, the platform uevent.rc file must set the owner to the
/dev/tty* files to "system" so the framework can access the port.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 10:51:19 -08:00
Marco Nelissen
c62242a55a Merge "Fix "dumpsys activity provider"" 2012-02-10 07:13:23 -08:00
satok
59d46b0665 Merge "Add an api to switch to the next IME and subtype" 2012-02-10 02:22:57 -08:00
satok
688bd47fcc Add an api to switch to the next IME and subtype
Bug: 5975302

Change-Id: I48aa4220159c65f456d61a324efcdf0a1ceec91c
2012-02-10 16:44:12 +09:00
Glenn Kasten
32d41d56e3 Disable HQ resamplers for now until qualified
This saves about 6500 bytes.

Change-Id: I87102fe561c95c19c9e615dea3de914f96639257
2012-02-09 18:14:44 -08:00
Dianne Hackborn
a573f6a1d9 Some hardening of isolated processes by restricting access to services.
Services now must explicitly opt in to being accessed by isolated
processes.  Currently only the activity manager and surface flinger
allow this.  Activity manager is needed so that we can actually
bring up the process; SurfaceFlinger is needed to be able to get the
display information for creating the Configuration.  The SurfaceFlinger
should be safe because the app doesn't have access to the window
manager so can't actually get a surface to do anything with.

The activity manager now protects most of its entry points against
isolated processes.

Change-Id: I0dad8cb2c873575c4c7659c3c2a7eda8e98f46b0
2012-02-09 18:06:01 -08:00
Glenn Kasten
00931bbfd2 Move header declarations around for clarity
Put IAudioFlinger methods in binder opcode order.
Move hardware call state closer to where it is used.
getMode() and btNrecIsOff() are private.

Change-Id: Ie50340b396c39c763f2b155cbc08da8a0d0f2424
2012-02-09 17:29:26 -08:00
Glenn Kasten
8ce220e359 Mark fields const if only set in constructor
Change-Id: Iacd06bb9efaf708cf965033be1f2297b58f7f75c
2012-02-09 17:00:15 -08:00