8108 Commits

Author SHA1 Message Date
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
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
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
7ed4f0c7f1 Fix typos in ALOG for pid vs tid
Change-Id: I6dc70f137d0ff8a86427ab8882a81886e1de0782
2012-02-09 16:33:17 -08:00
Dianne Hackborn
a0c283eac3 Add new feature for running services in "isolated" sandbox processes.
This reserves a range of uids (for each user) in which these processes
run.  These uids are not associated with an application, so they
effectively run with no permissions.  When a Service requests to
run in such a process through android:isolatedProcess="true", each
time it is brought up a new isolated process is started with its
own unique uid.

What we have so far gives us the basic infrastructure; more work
remains to further lock down what these uids have access to.

Change-Id: Ibfd27c75619cba61f528f46ede9113f98dc5f45b
2012-02-09 11:18:33 -08:00
Glenn Kasten
0765c448ab No newline or space at end of ALOG format string
Change-Id: I0bef580cbc818cb7c87aea23919d26f1446cec32
2012-02-08 17:21:49 -08:00
Marco Nelissen
de7408c94e Fix "dumpsys activity provider"
Change-Id: Ic0678a6edb539bb5648529dd9c38a382bc9cc3fb
2012-02-08 14:57:38 -08:00
Glenn Kasten
3773334fbd Move declaration of stream_type_t up earlier
stream_type_t is used by AudioFlinger class, so it should be declared there.
This way we don't have to peek into PlaybackThread to get the declaration.

Change-Id: Ie08bab1604699214d1e8df2d48d3fbfbbc436e96
2012-02-08 12:54:31 -08:00
Glenn Kasten
aae26c8de4 Rename type() to streamType()
This avoids possible confusion with thread's type().
Also remove redundant cast "(audio_stream_type_t)".

Change-Id: I320b9177b6c267a102d215f002228bcf988c437a
2012-02-08 12:52:00 -08:00
Dianne Hackborn
f6a7e1f7cd Merge "Don't wait for current activity to pause before resuming next." 2012-02-08 11:38:23 -08:00
Glenn Kasten
803a86a546 Combine duplicate code & document wp<> in mClients
Change-Id: Iea8cfe8e57563337fb2484a1246ef79d6ad3db18
2012-02-08 10:24:54 -08:00
Glenn Kasten
39d00cb442 Use audio_io_handle_t consistently instead of int
Other:
 - add a comment to nextUniqueId
 - made ThreadBase::mId const, since it is only assigned in constructor.

Change-Id: I4e8b7bec4e45badcde6274d574b8a9aabd046837
2012-02-08 10:06:32 -08:00
Glenn Kasten
f31d05007c Simplify destructors
Remove explicit clear() when the order doesn't matter.

Change-Id: I5931bc7ef5f681c7ce329aa9ec0a6e46d34a56c5
2012-02-08 09:49:14 -08:00
Glenn Kasten
6731333584 Effect UUID inputs passed by pointer are const
Change-Id: I1f5c338bcb7368e3dd8cd5f804b2e6d9fbe087f8
2012-02-08 09:21:39 -08:00
Glenn Kasten
a5a6580d17 Merge "Use pid_t not int" 2012-02-08 08:40:28 -08:00
Glenn Kasten
1b33107f37 Merge "Don't double destruct audio_track_cblk_t" 2012-02-08 08:40:15 -08:00
Glenn Kasten
cd330e7f38 Merge "AudioFlinger methods const and inline" 2012-02-08 08:39:39 -08:00
Glenn Kasten
cbe8b72247 Merge "Use virtual destructors" 2012-02-08 08:33:41 -08:00
Glenn Kasten
2277665266 Merge "Improve performance for sp<> on stack" 2012-02-08 07:45:15 -08:00
Glenn Kasten
01a802692f Merge "Use 0 not NULL for sp<> and wp<>" 2012-02-08 07:41:44 -08:00
Glenn Kasten
35624c1797 Merge "Use bool instead of int" 2012-02-08 07:40:23 -08:00
Glenn Kasten
16d64ad699 Merge "Declare more IAudioFlinger methods const" 2012-02-08 07:39:27 -08:00
Glenn Kasten
e0efd5f6c1 Merge "Remove dead code" 2012-02-08 07:38:42 -08:00
Guang Zhu
6ffa76077d Revert "Make NDC not block forever and handle restart."
Reverting because it seems to break `adb reboot`

This reverts commit 813af8d46467f41ed2d492917cbb9f9f45d2a3d7.

Change-Id: I75d827664a08799de15369c24c84cc3f49a8f297
2012-02-07 19:25:42 -08:00
Dianne Hackborn
cbb722ed06 Don't wait for current activity to pause before resuming next.
We can do this now that we ensure processes are not killed until
they have been stopped.  If the two activities are in the same
process, the ordering will still be correct because we schedule
the pause before the resume.

Change-Id: I209ba739b41e832d35db3edd34d1e7af354cc183
2012-02-07 18:33:49 -08:00
Robert Greenwalt
ec159352fe Merge "Make NDC not block forever and handle restart." 2012-02-07 16:19:56 -08:00
Robert Greenwalt
813af8d464 Make NDC not block forever and handle restart.
Need changes in core.

Still possible for netd to get wedged but system won't die because of it.
Leads the way to having forking netd - then only individual commands would
wedge, promoting stability.

bug:5864209
Change-Id: Ifcd37511c8239fe3df7e9070869b63a9c5649bd2
2012-02-07 15:59:49 -08:00
Jeff Sharkey
b5718c29ae Merge "Send broadcast when changing restrict background." 2012-02-07 15:50:02 -08:00
Dianne Hackborn
dc210ade0a Merge "Return information about whether overlays are disabled." 2012-02-07 13:46:46 -08:00
Jeff Sharkey
1f8ea2dcd1 Send broadcast when changing restrict background.
When changing global restrict background status, send connectivity
change broadcast, since it radically changes DISCONNECTED/BLOCKED
status system-wide.

Also reduce verbose stats logging.

Bug: 5854466
Change-Id: I3b612c520f50cc3000a3a569b7e0ab5f691cc2bd
2012-02-07 12:08:58 -08:00