2741 Commits

Author SHA1 Message Date
Mike Lockwood
8dc16c27e2 Fix typo in GPS mode logic.
MS-Assisted support should not be required for using MS-Based mode.

Change-Id: Ia6ee219674de3e9cc13190b753f8776305a4fa90
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-29 11:39:55 -04:00
Kenny Root
f369a9b5f7 Remove stale temporary ASEC containers
When a temporary container is created, its existence should be
ephemeral. However, if there is an error that causes system_server to be
killed during the process of creating a finalized ASEC, delete the stale
containers on the next start-up of system_server.

Change-Id: I7be8f94638a824295474c9a95960594848cb726b
2010-07-28 14:48:58 -07:00
Kenny Root
56c02dc3d3 Merge "Fix getTempContainerId()" into gingerbread 2010-07-28 14:48:40 -07:00
Kenny Root
c78a807974 Fix getTempContainerId()
getTempContainerId() would always return "smdl2tmp1" unless you had
MAX_CONTAINERS number of SD card SDKs, because of an array sort that put
all the zeros at the beginning.

Switch from trying to find a hole in the series of numbers to just
getting a number that's one larger than the previous. This reduces the
algorithmic complexity and the memory requirements.

Bug: 2832580
Change-Id: I32dc75ef5a6645f594ea47b032d7402e8860ebcd
2010-07-28 14:45:14 -07:00
Jeff Brown
6d0fec2de3 Refactor input reader to support new device types more easily.
Refactored the input reader so that each raw input protocol is handled
by a separate subclass of the new InputMapper type.  This way, behaviors
pertaining to keyboard, trackballs, touchscreens, switches and other
devices are clearly distinguished for improved maintainability.

Added partial support for describing capabilities of input devices
(incomplete and untested for now, will be fleshed out in later commits).

Simplified EventHub interface somewhat since InputReader is taking over
more of the work.

Cleaned up some of the interactions between InputManager and
WindowManagerService related to reading input state.

Fixed swiping finger from screen edge into display area.

Added logging of device information to 'dumpsys window'.

Change-Id: I17faffc33e3aec3a0f33f0b37e81a70609378612
2010-07-28 14:16:15 -07:00
Joe Onorato
0c39b6c65b Merge "Add a missing break; to restore old functionality and not turn off the screen after 30secs regardless of system preference." into gingerbread 2010-07-28 09:53:12 -07:00
Mike Lockwood
c40d714ca5 Merge "Tethering: Use new ACTION_USB_STATE broadcast to monitor USB connected state" into gingerbread 2010-07-28 04:04:18 -07:00
Brad Fitzpatrick
b73045935c Merge "Cap the size of StrictMode buffering we do before calling DropBox." into gingerbread 2010-07-27 18:34:08 -07:00
Brad Fitzpatrick
e73eb53125 Cap the size of StrictMode buffering we do before calling DropBox.
Change-Id: I46ea767bd0153c745e9b7eff945dacf5130f8807
2010-07-27 16:54:39 -07:00
Andreas Huber
84047bc295 Add a missing break; to restore old functionality and not turn off the screen after 30secs regardless of system preference.
Change-Id: I6d160a1851e1f73bac3775d24cf70d46da59aa47
2010-07-27 16:49:10 -07:00
Dan Egnor
499bee34c4 Merge "Remove a log message Jason doesn't like" into gingerbread 2010-07-27 10:22:58 -07:00
Joe Onorato
76d9bf52f3 am 8c65ee2d: Merge "Add a method to let a properly permissioned app directly manipulate the user activity timeout. We should come up with a better API for this, but this is for a last minute power manager hack to turn off the screen sooner after a phone call ends." i
Merge commit '8c65ee2d509db7dcb50ce4530d52eb5bdca3f917' into gingerbread

* commit '8c65ee2d509db7dcb50ce4530d52eb5bdca3f917':
  Add a method to let a properly permissioned app directly
2010-07-27 09:14:42 -07:00
Dan Egnor
c13978afe3 Remove a log message Jason doesn't like
Bug: 2856942
Change-Id: Ifc5cfc076bfed0918bb203ed9c82a42092ac3939
2010-07-26 15:32:00 -07:00
Dianne Hackborn
14bfa398a4 Infrastructure to report running services to developer.
Change-Id: Id1aae61323e7b8357c5fcc4bc641aaa57f3b6fde
2010-07-24 20:07:17 -07:00
Dianne Hackborn
46730fc783 Fix handling of application disabled state.
Change-Id: I617b76e89eeb75437b384b92f1205bb00b15bb70
2010-07-24 16:34:00 -07:00
Joe Onorato
7999bff154 Add a method to let a properly permissioned app directly
manipulate the user activity timeout.  We should come up
with a better API for this, but this is for a last minute
power manager hack to turn off the screen sooner after a
phone call ends.

Change-Id: I76422f952e3e894c90b3311e7d889899c79cbbaa
2010-07-24 11:50:05 -04:00
Mathias Agopian
1bf797857e new SensorService
remove old sensor service and implement SensorManager
on top of the new (native) SensorManger API.

Change-Id: Iddb77d498755da3e11646473a44d651f12f40281
2010-07-19 17:57:29 -07:00
Mike Lockwood
f4d207b1c2 Don't throw an exception from isProviderEnabled and getLastKnownLocation
if the location provider does not exist.  Instead use the same behavior
as if the provider were disabled in settings
(return false for isProviderEnabled and null from getLastKnownLocation).
This eliminates for a lot of exception handling around some simple
queries to the location manager.

BUG: 2841014

Change-Id: I4fbe0c088e915c90969e13083201dd3e7f4029cb
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-17 08:21:33 -04:00
Jeff Brown
e33348ba54 Fix bug with phantom input windows.
Add dumpsys integration for the native input dispatcher.
Add some InputDevice API stubs.
Add an appendFormat helper method to String8 for printf style
string formatting mainly for debugging purposes.
Use generic ArrayList<WindowState> everywhere in WindowManagerService
to eliminate unnecessary casts all over.

Change-Id: I9d1e3bd90eb7222d10620200477f11b7bfd25e44
2010-07-16 00:02:48 -07:00
Kenny Root
02c8730c1b Add API to call to vold for mounting OBBs
* Unhide StorageService class; hide all the USB-related items

* Add application-visible API to StorageManager for OBB files

* Add class for parceling OBB info across binders (ObbInfo)

* Add a JNI glue class to libutils/ObbFile (ObbScanner)

* Add API to MountService to deal with calling into vold and checking
  permissions

Change-Id: I33ecf9606b8ff535f3a2ada83931da6bbef41cfd
2010-07-15 21:31:58 -07:00
Jeff Brown
c5ed5910c9 Add support for new input sources.
Added several new coordinate values to MotionEvents to capture
touch major/minor area, tool major/minor area and orientation.

Renamed NDK input constants per convention.

Added InputDevice class in Java which will eventually provide
useful information about available input devices.

Added APIs for manufacturing new MotionEvent objects with multiple
pointers and all necessary coordinate data.

Fixed a bug in the input dispatcher where it could get stuck with
a pointer down forever.

Fixed a bug in the WindowManager where the input window list could
end up containing stale removed windows.

Fixed a bug in the WindowManager where the input channel was being
removed only after the final animation transition had taken place
which caused spurious WINDOW DIED log messages to be printed.

Change-Id: Ie55084da319b20aad29b28a0499b8dd98bb5da68
2010-07-15 18:32:33 -07:00
Brad Fitzpatrick
ad13b9807b StrictMode: batch drop box writes for system apps
Change-Id: Iab49c15ecccefea1d36d86271e1ceb37d79e9449
2010-07-15 13:18:05 -07:00
Konstantin Lopyrev
6e0f65fd9c Adding focus change notification
Change-Id: I49709c97aaf63bcd44695d99c61dbbee228416f4
2010-07-14 15:31:39 -07:00
Konstantin Lopyrev
c1ca7f8c53 Merge "Making sure that the list of windows updates automatically in hierarchy viewer (View Server side)" into gingerbread 2010-07-13 13:10:48 -07:00
Konstantin Lopyrev
dc30101ff8 Making sure that the list of windows updates automatically in hierarchy viewer (View Server side)
Change-Id: I0f49ee8b6950ad167bd224093150050e19fd1dd7
2010-07-12 19:37:24 -07:00
Kenny Root
e059b2784f Allow things that can install packages to set Obb paths
Change-Id: I19b426cb3de1a5c9285badf8aea59989568914b4
2010-07-12 08:36:21 -07:00
Kenny Root
a5402dabec Merge "OBB API for PackageManager" into gingerbread 2010-07-07 18:14:25 -07:00
Kenny Root
93565c4b32 OBB API for PackageManager
Simple API for tracking .obb files associated with packages. Stores the
path in the PackageSettings. No verification of file content is done
now since the PackageManagerService can't read the SD card where these
files will likely live.

Change-Id: Ibeaf26ba0526b6d60f401137e58f46ee9faff39e
2010-07-07 09:57:51 -07:00
Jeff Brown
00fa7bdd69 More native input dispatch work.
Removed old input dispatch code.
Refactored the policy callbacks.
Pushed a tiny bit of the power manager state down to native.
Fixed long press on MENU.
Made the virtual key detection and cancelation a bit more precise.

Change-Id: I5d8c1062f7ea0ab3b54c6fadb058c4d5f5a9e02e
2010-07-03 19:23:01 -07:00
Christopher Tate
160edb3645 Add ability to guard a thread against setting its own prio to bg
The guard is compiled out by default because it adds overhead to
android.os.Process.setPriority().

Change-Id: Ibb2a648c6349b381abb7ae62a358888b04fba871
2010-06-30 18:25:01 -07:00
Christopher Tate
c27181c7f3 Remove memory monitoring from the system watchdog
This was originally written as an in-case-we-need-it facility, but was
never actually used in production.  It also soaked up a surprising amount
of cpu on occasion, as well as doing sketchy things like demoting the
system_server's primary looper thread to the background cgroup at times.

Change-Id: I9a81a8d1e9caea9e0a1277d97785fe96add438d7
2010-06-30 14:53:39 -07:00
Mike Lockwood
de6bd120c9 Merge "Notifications: Use new ACTION_USB_STATE broadcast to monitor USB connected state" into gingerbread 2010-06-29 05:24:45 -07:00
Mike Lockwood
606d591afe Merge "Add new Usb.ACTION_USB_STATE sticky broadcast for monitoring USB connect state" into gingerbread 2010-06-29 05:24:22 -07:00
Jeff Brown
349703effc Native input event dispatching.
Target identification is now fully native.
Fixed a couple of minor issues related to input injection.
Native input enabled by default, can be disabled by setting
WindowManagerPolicy.ENABLE_NATIVE_INPUT_DISPATCH to false.

Change-Id: I7edf66ed3e987cc9306ad4743ac57a116af452ff
2010-06-28 19:10:54 -07:00
Mike Lockwood
ac051ae7ac Tethering: Use new ACTION_USB_STATE broadcast to monitor USB connected state
Replaces use of battery status, which will not work on devices that do not
charge over USB.

Change-Id: I1e123bb534d46b890461ddfdee24f81da5798756
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-28 16:38:33 -04:00
Mike Lockwood
ff2544c6cb Notifications: Use new ACTION_USB_STATE broadcast to monitor USB connected state
Replaces use of UMS notifications, which will not work on devices without
USB mass storage support.

Change-Id: I2ea7f4d2dead91418935e97e2f442f5e3fc5e6dc
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-28 10:03:17 -04:00
Mike Lockwood
709981eeed Add new Usb.ACTION_USB_STATE sticky broadcast for monitoring USB connect state
This can be used instead of ACTION_USB_CONNECTED and ACTION_USB_DISCONNECTED
by clients that need to be informed of both USB connect and disconnect events

Change-Id: Ic26927af2e775c2694d18775f9d574c97b095dfd
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-28 10:02:05 -04:00
Irfan Sheriff
9005e7f429 Merge "Add setWifiApConfiguration interface" into gingerbread 2010-06-25 19:49:58 -07:00
Dianne Hackborn
50dc3bca5a Refactor ActivityManagerService activity stack.
Introdude a new ActivityStack class that holds all of the
state and management of a stack of activities.  Paves the way
for having multiple activity stacks, though at this point
there should be no change in functionality and the activity
manager is still assuming there is only one stack.

Change-Id: Iea4859a24c9269061043755ec58a615028d4183b
2010-06-25 13:07:21 -07:00
Irfan Sheriff
17b232b5b5 Add setWifiApConfiguration interface
Bug: 2538623
Change-Id: I779044173a2fa0e9b851ea92aeec5ca25eb9c86f
2010-06-24 20:03:38 -07:00
Dianne Hackborn
2529a45339 Merge "Make bad notifications crash their application." into gingerbread 2010-06-24 17:28:13 -07:00
Dianne Hackborn
9d39d0cb36 Make bad notifications crash their application.
Implement notification manager handling of bad notifications, to
call a new activity manager to have the owner's process crashed
(if there is one).

Change-Id: Ib15e8d0c598756f3b39c99cc2045c18e054daf6b
2010-06-24 17:27:28 -07:00
Dianne Hackborn
5340bffd8b am 5827d3ea: Merge "Properly note the current active restore set\'s token" into froyo
Merge commit '5827d3eaf3c53d1dc3ab0d638d935c219a5515a6' into gingerbread

* commit '5827d3eaf3c53d1dc3ab0d638d935c219a5515a6':
  Properly note the current active restore set's token
2010-06-24 16:01:39 -07:00
Christopher Tate
2950555aac Properly note the current active restore set's token
Bug: 2796780
Change-Id: Iad601ed96ae73cf34910a276350712e6af19bb4e
2010-06-24 15:58:01 -07:00
Dianne Hackborn
01e4cfc47d Some ActivityThread/ActivityManager cleanup.
- Move PackageInfo out of ActivityThread, renaming to LoadedApk.
- Rename some of the other PacakgeInfo inner classes to better
  represent what they are.
- Rename HistoryRecord to ActivityRecord.
- Introduce AppGlobals, to eventually let ActivityThread become
  package scoped.

Change-Id: Ib714c54ceb3cdbb525dce3db9505f31042e88cf0
2010-06-24 15:20:48 -07:00
Dianne Hackborn
baf42c625c Add APIs for finding heavy-weight apps.
Change-Id: I6c865cce404cac1a08eee056f963de5d276d5898
2010-06-24 11:38:47 -07:00
Mike Lockwood
2423607a32 Add a new UEventObserver subclass to broadcast an Intent whe USB state changes.
We now broadcast Usb.ACTION_USB_CONNECTED and Usb.ACTION_USB_DISCONNECTED
when USB is connected or disconnected.
The ACTION_USB_CONNECTED extras indicate the enabled/disabled state of
all USB functions.

Change-Id: I11495d039429dbe22bd738067296e39ae415befa
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-24 09:36:50 -04:00
Joe Onorato
4ca092c7f1 Merge "Fix bug 2772728 with the suggested fix. I wasn't able to reproduce it though." into gingerbread 2010-06-23 16:08:06 -07:00
Daniel Sandler
69a4817e3e Immersive activity API.
An Activity can declare itself to be "immersive" either by
setting android:immersive="true" in AndroidManifest or by
calling setImmersive(true).

Immersive activities "should" not be interrupted, for
example by Notifications with an associated
fullScreenIntent. (In the future we may even prevent any
non-system application from successfully calling
startActivity() if the foreground activity is immersive.)
Notifications with FLAG_HIGH_PRIORITY set will be shown to
the user in some less-obtrusive way if the frontmost
activity is immersive.

Change-Id: I8d0c25cc4e22371c27cbf2bb6372d2c95d57b2d7
2010-06-23 16:29:36 -04:00
Mike Lockwood
f602d362ba GPS: remove GpsEventThread from GpsLocationProvider
Rather than polling for events from the native code in an event thread,
we now require the GPS HAL libraries to call our callbacks from a thread
that is registered with the JVM to call directly into Java.
This eliminates a thread from our code and removes one step in the chain
of message passing from the GPS to the Location Manager client.

Change-Id: I2745a157690310ba9a699a8369f54a7366c6b1ba
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-22 09:26:41 -04:00