summaryrefslogtreecommitdiffstats
path: root/services/java
Commit message (Collapse)AuthorAgeFilesLines
* Don't throw an exception from isProviderEnabled and getLastKnownLocationMike Lockwood2010-07-171-6/+2
| | | | | | | | | | | | | 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>
* Fix bug with phantom input windows.Jeff Brown2010-07-162-96/+80
| | | | | | | | | | | 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
* Add API to call to vold for mounting OBBsKenny Root2010-07-151-3/+153
| | | | | | | | | | | | | | | * 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
* Add support for new input sources.Jeff Brown2010-07-152-24/+39
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* StrictMode: batch drop box writes for system appsBrad Fitzpatrick2010-07-151-37/+135
| | | | Change-Id: Iab49c15ecccefea1d36d86271e1ceb37d79e9449
* Adding focus change notificationKonstantin Lopyrev2010-07-142-8/+50
| | | | Change-Id: I49709c97aaf63bcd44695d99c61dbbee228416f4
* Merge "Making sure that the list of windows updates automatically in ↵Konstantin Lopyrev2010-07-132-50/+193
|\ | | | | | | hierarchy viewer (View Server side)" into gingerbread
| * Making sure that the list of windows updates automatically in hierarchy ↵Konstantin Lopyrev2010-07-122-50/+193
| | | | | | | | | | | | viewer (View Server side) Change-Id: I0f49ee8b6950ad167bd224093150050e19fd1dd7
* | Allow things that can install packages to set Obb pathsKenny Root2010-07-121-1/+3
|/ | | | Change-Id: I19b426cb3de1a5c9285badf8aea59989568914b4
* Merge "OBB API for PackageManager" into gingerbreadKenny Root2010-07-071-0/+31
|\
| * OBB API for PackageManagerKenny Root2010-07-071-0/+31
| | | | | | | | | | | | | | | | | | 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
* | More native input dispatch work.Jeff Brown2010-07-035-4450/+122
|/ | | | | | | | | | 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
* Add ability to guard a thread against setting its own prio to bgChristopher Tate2010-06-303-1/+5
| | | | | | | The guard is compiled out by default because it adds overhead to android.os.Process.setPriority(). Change-Id: Ibb2a648c6349b381abb7ae62a358888b04fba871
* Remove memory monitoring from the system watchdogChristopher Tate2010-06-303-542/+3
| | | | | | | | | 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
* Merge "Notifications: Use new ACTION_USB_STATE broadcast to monitor USB ↵Mike Lockwood2010-06-291-20/+13
|\ | | | | | | connected state" into gingerbread
| * Notifications: Use new ACTION_USB_STATE broadcast to monitor USB connected stateMike Lockwood2010-06-281-20/+13
| | | | | | | | | | | | | | | | 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>
* | Merge "Add new Usb.ACTION_USB_STATE sticky broadcast for monitoring USB ↵Mike Lockwood2010-06-291-11/+21
|\ \ | |/ | | | | connect state" into gingerbread
| * Add new Usb.ACTION_USB_STATE sticky broadcast for monitoring USB connect stateMike Lockwood2010-06-281-11/+21
| | | | | | | | | | | | | | | | 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>
* | Native input event dispatching.Jeff Brown2010-06-286-584/+725
|/ | | | | | | | | 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
* Merge "Add setWifiApConfiguration interface" into gingerbreadIrfan Sheriff2010-06-251-3/+5
|\
| * Add setWifiApConfiguration interfaceIrfan Sheriff2010-06-241-3/+5
| | | | | | | | | | Bug: 2538623 Change-Id: I779044173a2fa0e9b851ea92aeec5ca25eb9c86f
* | Refactor ActivityManagerService activity stack.Dianne Hackborn2010-06-254-3605/+3766
| | | | | | | | | | | | | | | | | | | | 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
* | Merge "Make bad notifications crash their application." into gingerbreadDianne Hackborn2010-06-243-8/+82
|\ \
| * | Make bad notifications crash their application.Dianne Hackborn2010-06-243-8/+82
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am 5827d3ea: Merge "Properly note the current active restore set\'s token" ↵Dianne Hackborn2010-06-241-1/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | into froyo Merge commit '5827d3eaf3c53d1dc3ab0d638d935c219a5515a6' into gingerbread * commit '5827d3eaf3c53d1dc3ab0d638d935c219a5515a6': Properly note the current active restore set's token
| * | Properly note the current active restore set's tokenChristopher Tate2010-06-241-1/+1
| | | | | | | | | | | | | | | Bug: 2796780 Change-Id: Iad601ed96ae73cf34910a276350712e6af19bb4e
* | | Some ActivityThread/ActivityManager cleanup.Dianne Hackborn2010-06-249-264/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | | Add APIs for finding heavy-weight apps.Dianne Hackborn2010-06-241-0/+3
| |/ |/| | | | | Change-Id: I6c865cce404cac1a08eee056f963de5d276d5898
* | Add a new UEventObserver subclass to broadcast an Intent whe USB state changes.Mike Lockwood2010-06-242-1/+209
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge "Fix bug 2772728 with the suggested fix. I wasn't able to reproduce ↵Joe Onorato2010-06-231-0/+1
|\ \ | | | | | | | | | it though." into gingerbread
| * | Fix bug 2772728 with the suggested fix. I wasn't able to reproduce it though.Joe Onorato2010-06-161-0/+1
| | | | | | | | | | | | Change-Id: Ic3e3a7c679a74b822a3567faeb353950af3cfbca
* | | Immersive activity API.Daniel Sandler2010-06-232-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | GPS: remove GpsEventThread from GpsLocationProviderMike Lockwood2010-06-221-53/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | More native input event dispatching.Jeff Brown2010-06-213-255/+476
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added ANRs handling. Added event injection. Fixed a NPE ActivityManagerServer writing ANRs to the drop box. Fixed HOME key interception. Fixed trackball reporting. Fixed pointer rotation in landscape mode. Change-Id: I50340f559f22899ab924e220a78119ffc79469b7
* | | Fix NPE during ANRs.Brad Fitzpatrick2010-06-211-1/+1
| | | | | | | | | | | | | | | | | | BUG=2780838 Change-Id: I0d5e9a2323130ca14d1f0df684c8abe4f4dad05a
* | | am 57f4503e: Work on issue # 2778549: Idle FRF72 is awake 18 mins more than ↵Dianne Hackborn2010-06-171-11/+57
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | ERE27 in 13hr test Merge commit '57f4503e1a129d6a648f2378d36a060998a577a0' into gingerbread * commit '57f4503e1a129d6a648f2378d36a060998a577a0': Work on issue # 2778549: Idle FRF72 is awake 18 mins more than ERE27 in 13hr test
| * | Work on issue # 2778549: Idle FRF72 is awake 18 mins more than ERE27 in 13hr ↵Dianne Hackborn2010-06-171-11/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test Modify UIModeManager to not get location updates every thirty minutes. Instead it gets one once a day, and requests a new update when airplane mode is turned off or the time zone changes. Change-Id: I8044c27b5cd77709e4b872e2e8edd352f23e4af1
* | | Various improvements to battery stats collectionDianne Hackborn2010-06-162-31/+21
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now clear the battery stats when unplugging after the battery is full. This allows us to use the "total" stats as a new "since last charged" stat. Total is gone. I never used it, it was worthless. Since last charged is a lot more interesting. The battery history now collects a lot more stats, and keeps control over how much it can collect. Printing is now more descriptive. The kinds of stats have been renamed to SINCE_UNPLUGGED and SINCE_DISCHARGED. The other two stats are still there, but no longer printed; a future change will eliminate them completely along with all of their state. Change-Id: I4e9fcfcf8c30510092c76a8594f6021e9502fbc1
* | StrictMode: implement the log-to-DropBox optionBrad Fitzpatrick2010-06-141-4/+35
| | | | | | | | Change-Id: I51d12e264155078f953028241f8c5cbdc47262e8
* | am 46b9ac0a: Native input dispatch rewrite work in progress.Jeff Brown2010-06-134-54/+1042
|\ \ | | | | | | | | | | | | | | | | | | Merge commit '46b9ac0ae2162309774a7478cd9d4e578747bfc2' into gingerbread * commit '46b9ac0ae2162309774a7478cd9d4e578747bfc2': Native input dispatch rewrite work in progress.
| * | Native input dispatch rewrite work in progress.Jeff Brown2010-06-134-54/+1042
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old dispatch mechanism has been left in place and continues to be used by default for now. To enable native input dispatch, edit the ENABLE_NATIVE_DISPATCH constant in WindowManagerPolicy. Includes part of the new input event NDK API. Some details TBD. To wire up input dispatch, as the ViewRoot adds a window to the window session it receives an InputChannel object as an output argument. The InputChannel encapsulates the file descriptors for a shared memory region and two pipe end-points. The ViewRoot then provides the InputChannel to the InputQueue. Behind the scenes, InputQueue simply attaches handlers to the native PollLoop object that underlies the MessageQueue. This way MessageQueue doesn't need to know anything about input dispatch per-se, it just exposes (in native code) a PollLoop that other components can use to monitor file descriptor state changes. There can be zero or more targets for any given input event. Each input target is specified by its input channel and some parameters including flags, an X/Y coordinate offset, and the dispatch timeout. An input target can request either synchronous dispatch (for foreground apps) or asynchronous dispatch (fire-and-forget for wallpapers and "outside" targets). Currently, finding the appropriate input targets for an event requires a call back into the WindowManagerServer from native code. In the future this will be refactored to avoid most of these callbacks except as required to handle pending focus transitions. End-to-end event dispatch mostly works! To do: event injection, rate limiting, ANRs, testing, optimization, etc. Change-Id: I8c36b2b9e0a2d27392040ecda0f51b636456de25
* | | More StrictMode work, handling violations in ActivityManagerService.Brad Fitzpatrick2010-06-113-20/+22
| | | | | | | | | | | | | | | | | | Also starts to do duplicate-suppression. Change-Id: I0502f6ab6c45fa319298de4874ecfe44b7829d21
* | | Dont persist config on failureIrfan Sheriff2010-06-111-2/+3
|/ / | | | | | | | | | | | | | | | | | | If soft AP bring up does not go through successfully, dont persist the config. This has the benefit of recovering from the case where things fail on "=" and "," for SSID since the IOCTL parsing in driver on broadcom cannot handle it at this time. Change-Id: Iaa60fd05972db434500753dcb59092995dab07b1
* | Adjust activity manager process OOM adj.Dianne Hackborn2010-06-112-51/+93
| | | | | | | | | | | | | | | | | | | | | | | | Modify OOM adj classes a bit, to take into account the new heavy weight app type, and give "foreground services" their own category to have a bettery chance to manager them when things go wrong. Also add some new code to battery stats to keep a history of changes to the battery level. Change-Id: I29f5ab6938777e1a7eafd7d8c38b5e564cc9f96a
* | am f4a502a2: Merge "Don\'t adjust lights if screen or button brightness is ↵Mike Lockwood2010-06-101-2/+8
|\ \ | |/ | | | | | | | | | | | | | | changed when the screen is off." into froyo Merge commit 'f4a502a235e9f9ea0bcd2d5ca4981dc6e1a619c4' into kraken * commit 'f4a502a235e9f9ea0bcd2d5ca4981dc6e1a619c4': Don't adjust lights if screen or button brightness is changed when the screen is off.
| * Merge "Don't adjust lights if screen or button brightness is changed when ↵Mike Lockwood2010-06-101-2/+8
| |\ | | | | | | | | | the screen is off." into froyo
| | * Don't adjust lights if screen or button brightness is changed when the ↵Mike Lockwood2010-06-101-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | screen is off. Change-Id: I798a240374c3a739e1f1eaf36fa9fdef8416f2a2 BUG: 2758292 Signed-off-by: Mike Lockwood <lockwood@android.com>
* | | Introduce "StrictMode"Brad Fitzpatrick2010-06-102-0/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a new public API for developers to opt-in to strict rules about what they're allowed to do on certain threads. (this is the public face of the @hide dalvik.system.BlockGuard, added recently...) In practice this will be used for developers to opt-in to declaring that they don't want to be allowed to do various operations (such as disk I/O or network operations) on their main UI threads. (these operations are often accidental, or even when they are fast come with a good chance of being slow or very slow in some cases....) Implementation wise, this is just a thread-local integer that has a bitmask of the things that aren't allowed, and more bits for saying what the violation penalty is. The penalties, of which multiple can be chosen, include: * logging * dropbox uploading for analysis/reporting * annoying dialog * full-on crashing These are all only very roughly implemented at this point, but all parts now minimally work end-to-end now, so this is a good checkpoint commit before this gets too large. Future CLs will polish all the above 4 penalties, including checksumming of stacktraces and minimizing penalties for duplicate violations. Change-Id: Icbe61a2e950119519e7364030b10c3c28d243abe
* | | am 8f2ca788: Merge "Fix bug 2757693 - Multi-touch coordinates can jump when ↵Adam Powell2010-06-101-0/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | a finger goes down." into froyo Merge commit '8f2ca788f369892370477212cf9e7a67721a8c16' into kraken * commit '8f2ca788f369892370477212cf9e7a67721a8c16': Fix bug 2757693 - Multi-touch coordinates can jump when a finger goes down.
| * | Merge "Fix bug 2757693 - Multi-touch coordinates can jump when a finger goes ↵Adam Powell2010-06-101-0/+2
| |\ \ | | | | | | | | | | | | down." into froyo