summaryrefslogtreecommitdiffstats
path: root/services
Commit message (Collapse)AuthorAgeFilesLines
* add exception message to ApplicationErrorReportJacek Surazski2009-06-171-2/+9
| | | | useful signal for clustering
* Remove circular dependency in PackageManager. api freeStorage uses ↵Suchi Amalapurapu2009-06-175-6/+36
| | | | | | | | | | | | PendingIntent from android.app Create a new public IntentSender class that can be used by PackageManager instead. This new class uses IIntentSender internally and can only be created by PendingIntent for now. Provide a new getIntentSender api in PendingIntent to create an instance of this class. Move IIntentSender and IIntentReceiver from android.app to android.content Change imports of IIntentSender and IIntentReceiver to reflect the new package name The PackageManager api has been named as freeStorageWithIntent and will be renamed as freeStorage once the older api(which has been deprecated) will be removed shortly.
* Merge change 4438 into donutAndroid (Google) Code Review2009-06-171-7/+37
|\ | | | | | | | | * changes: Fix many of the ANRs introduced by scheduling classes.
| * Fix many of the ANRs introduced by scheduling classes.Dianne Hackborn2009-06-161-7/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We weren't bumping the oom_adj of processes receiving a registered broadcast. Previously this wasn't a problem, because those processes are allowed to have their oom_adj managed by whatever else is in them and if the registered receiver goes away no problem. But now this is also controlling the scheduling class, so we need to bump them up. This is probably good anyway, since the developer has the same assurance of their process not being killing in the middle of registered receivers like it had always been for manifest receivers. Also fixed a small issue where we were not recomputing the oom_adh after finished with a broadcast.
* | Hold the current transport instantiated all the time.Christopher Tate2009-06-161-22/+26
| | | | | | | | | | | | | | | | | | We no longer instantiate the transport just for the duration of handling a backup or restore operation. Instead, we hold the object forever (replacing it if instructed to do so). This makes it easier for transports to watch system state and help set backup timing policy. Also fixes up the IBackupTransport documentation a bit.
* | Allow privileged callers to schedule a backup pass for any app.Christopher Tate2009-06-161-2/+20
|/
* More bmgr work; fix clear-data signallingChristopher Tate2009-06-161-3/+29
| | | | | | The 'list sets' and 'restore token#' commands from bmgr now do what they are supposed to. At this point we see the restore target's data being cleared properly and its agent being launched and invoked for restore.
* Merge change 4287 into donutAndroid (Google) Code Review2009-06-151-15/+20
|\ | | | | | | | | * changes: Sketch out a 'bmgr' command line tool
| * Sketch out a 'bmgr' command line toolChristopher Tate2009-06-151-15/+20
| | | | | | | | | | Not finished, but eventually will allow adb shell access to the Backup Manager for testing purposes etc.
* | Implement permission test for activity, window, service manager.Dianne Hackborn2009-06-151-57/+95
|/ | | | | | This also includes some changes to the window manager permission checks. Almost all of these are to make it most testable (through an exception on a permission failure), though there is one permission check that needed to be added: updateOrientationFromAppTokens().
* Merge change 4112 into donutAndroid (Google) Code Review2009-06-121-30/+20
|\ | | | | | | | | * changes: Fix bug #1812041: activity manager crash with bad args.
| * Fix bug #1812041: activity manager crash with bad args.Dianne Hackborn2009-06-121-30/+20
| | | | | | | | | | | | | | There was old code that would kill the system process in some cases when there was a bad activity token. This is really no longer used, except in a few places where it allows apps to kill the system. So just get rid of it and make the world a better place.
* | Journal backup requests so that they won't be lost in a crashChristopher Tate2009-06-121-5/+94
|/ | | | | | | | | When an application requests a backup via dataChanged(), we now journal that fact on disk. The journal persists and is only removed following a successful backup pass. When the backup manager is started at boot time, it looks for any existing journal files and schedules a backup for the apps listed in them, on the expectation that the device shut down or crashed before a backup could be performed.
* Flesh out restore interface on manager; work up most of LocalTransportChristopher Tate2009-06-101-7/+39
|
* Merge change 3826 into donutAndroid (Google) Code Review2009-06-101-1/+1
|\ | | | | | | | | * changes: LocationManagerService: Fix logic error removing multiple dead receivers.
| * LocationManagerService: Fix logic error removing multiple dead receivers.Simon Schoar2009-06-101-1/+1
| | | | | | | | | | | | | | If multiple receivers are dead, only the first one will be added. found in http://code.google.com/p/android/issues/detail?id=2651 Signed-off-by: Mike Lockwood <lockwood@android.com>
* | The rest of the basic flow for restoreChristopher Tate2009-06-102-99/+211
| | | | | | | | | | Also moved the processOneBackup() implementation into the Thread class that runs the backup sequence.
* | resolution support fix/improvementMitsuru Oshima2009-06-101-5/+45
| | | | | | | | | | | | | | | | | | | | | | * adding compatibility menu * backup gravity * set expanable=true if the screen size is hvga * density. * added "supports any density" mode. I'll add sdk check later. * disallow to catch orientation change event if the app is not expandable. This was causing layout problem under non-expandable mode. I discussed this with Mike C and we agreed to do this approach for now. We'll revisit if this causes problem to a lot of applications.
* | Enable HierarchyViewer on debuggable builds, even if they're secure.Romain Guy2009-06-101-516/+522
| | | | | | | | That will let us (finally) use the tool on userdebug builds.
* | Merge change 3726 into donutAndroid (Google) Code Review2009-06-101-0/+4
|\ \ | | | | | | | | | | | | * changes: ActivityManager: Ensure that we clear the calling process identity around calls to Process.setProcessGroup().
| * | ActivityManager: Ensure that we clear the calling process identity around ↵San Mehat2009-06-101-0/+4
| |/ | | | | | | | | | | calls to Process.setProcessGroup(). Signed-off-by: San Mehat <san@google.com>
* | More restore plumbing, plus add suggested-backoff to transport APIChristopher Tate2009-06-101-43/+174
|/ | | | | | | | | | | Adds most of the code for a background-thread restore process, structured much like the backup thread. Broke some common functionality out into a helper function for doing a synchronous wait for a requested agent to attach. Added a method to IBackupTransport whereby the transport will be asked for an opinion on whether this is a good time for a backup to happen. It will reply with the results of its policymaking around backoff intervals, time-of-day selection, etc.
* Revamp IRestoreSession a bitChristopher Tate2009-06-081-0/+31
| | | | | | | | | We now supply an array of RestoreSet objects instead of wacky Bundle shenanigans. Also, pushed beginRestoreSession() out to the BackupManager concrete interface class so that SetupWizard can use it. (beginRestoreSession() is @hide, non-privileged apps cannot use it. It's also guarded by android.permission.BACKUP enforcement.)
* Merge change 3420 into donutAndroid (Google) Code Review2009-06-071-3/+0
|\ | | | | | | | | * changes: LocationManagerService: Remove some unneeded imports.
| * LocationManagerService: Remove some unneeded imports.Mike Lockwood2009-06-071-3/+0
| | | | | | | | Signed-off-by: Mike Lockwood <lockwood@android.com>
* | Add IRestoreSession interface for the restore flowChristopher Tate2009-06-071-25/+29
| | | | | | | | | | | | | | | | Restore is a fairly complicated, somewhat stateful process, so we introduce a new interface to encapsulate the various bits and pieces into a nicely separable component. In particular, this will make it much cleaner to open and interrogate an expensive-to-construct transport and then reuse it for the actual restore process itself.
* | Adjust IBackupTransport interfaceChristopher Tate2009-06-071-4/+10
|/ | | | | | | Instead of just passing a package name to performBackup, pass the whole PackageInfo struct, explicitly including the list of signatures for the package. No need to make each transport look this up individually when it's a necessary part of the backup payload for each app.
* Merge change 3017 into donutAndroid (Google) Code Review2009-06-051-0/+77
|\ | | | | | | | | * changes: Add the EAP related fields for WiFi configuration.
| * Add the EAP related fields for WiFi configuration.Chung-yih Wang2009-06-051-0/+77
| | | | | | | | | | | | -- added the EAP/802.1X related fields in WifiConfiguration for supporting EAP/802.1X authentication. -- hid the related fields for now.
* | Apply OOM adjustment while an app is undergoing backupChristopher Tate2009-06-051-3/+28
| |
* | Fix tracking of backup participants across package remove/updateChristopher Tate2009-06-051-1/+8
| |
* | Fix backup agent unbindChristopher Tate2009-06-041-40/+1
| | | | | | | | | | | | | | The handwritten binder transaction passing wasn't propagating the agent-destroy transaction to the client side. Oops. Also, remove obsolete run-one-agent code from the backup manager service.
* | More backup workChristopher Tate2009-06-032-61/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Put in some permission enforcement around agent connection notification and full-backup scheduling. * Full backup now applies to any package, not just backup participants who have declared their own android:backupAgent * The process of running the backup operation on the set of apps who have been queued for it is now done in a separate thread, with a notification mechanism from the main Backup Manager service to pass along new-agent binding knowledge. There's no longer one do-backup message on the primary Handler per target application. * The new backup thread sets up the desired transport now and passes along the newly backed-up data to it for each backup target. Two transports have been defined so far, GoogleTransport and AdbTransport; both are stubs at present. Note that at present the backup data output file seems to be properly created, but after doBackup() is called on the test app's agent it's still zero size.
* | Merge change 3094 into donutAndroid (Google) Code Review2009-06-031-0/+1
|\ \ | | | | | | | | | | | | * changes: Grant permissions to older package when deleting an updated system application. When a system app gets updated, the permissions are granted to the new pkg. Similary when this updated pkg(from data partition) gets removed, the older pkg from system partition is restored. but the permissions are'nt being granted explicitly and so the restore fails. This fix addresses specific bugs related to uninstall of updated system apps. These code paths will be revisited later but this fix is needed for OTA's that might fall back to older versions of system apps.
| * | Grant permissions to older package when deleting an updated system application.Suchi Amalapurapu2009-06-031-0/+1
| | | | | | | | | | | | | | | | | | | | | When a system app gets updated, the permissions are granted to the new pkg. Similary when this updated pkg(from data partition) gets removed, the older pkg from system partition is restored. but the permissions are'nt being granted explicitly and so the restore fails. This fix addresses specific bugs related to uninstall of updated system apps. These code paths will be revisited later but this fix is needed for OTA's that might fall back to older versions of system apps.
* | | * Moved supports-density tag under manifestMitsuru Oshima2009-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Refactored Compatibility code * Added CompatibilityInfo class * Removed getApplicationScale from Context * Added Resources#getCompatibilityInfo so that RootView can get the compatibility info w/o going through Context * Expandable support * Added expandable tag under manifest * Old application w/o expandable is given the default screen size ([320, 480] x density). * The non-expandable window is centered.
* | | Track activity foreground CPU usage for battery stats.Amith Yamasani2009-06-033-2/+48
|/ / | | | | | | | | | | | | Track the foreground CPU time of an activity so that we can tell if apps are spending more time in the background compared to foreground. Update power profile values for screen backlight and GPS. Fix some javadoc bugs (milliseconds vs. microseconds).
* | Adding internal method replacePreferredActivity.Satish Sampath2009-06-031-0/+37
| | | | | | | | | | | | | | | | | | | | This was required because we need a way to set the preferred activity for a particular intent filter based on user selection (in our case the ACTION_WEB_SEARCH intent filter for selecting the preferred search engine from the list of available search engines providers). The current addPreferredActivity call was not sufficient since it leaves the existing preferred activities in the list and does not remove them, which this call does.
* | TODO's from Teleca with modifications from wink.Wink Saville2009-06-011-22/+6
|/
* base: Rename WRITE_SDCARD -> WRITE_EXTERNAL_STORAGESan Mehat2009-06-011-1/+1
| | | | Signed-off-by: San Mehat <san@google.com>
* Retool the backup process to use a new 'BackupAgent' classChristopher Tate2009-05-313-95/+356
| | | | | | | | | | | | | | | Backups will be handled by launching the application in a special mode under which no activities or services will be started, only the BackupAgent subclass named in the app's android:backupAgent manifest property. This takes the place of the BackupService class used earlier during development. In the cases of *full* backup or restore, an application that does not supply its own BackupAgent will be launched in a restricted manner; in particular, it will be using the default Application class rather than any manifest-declared one. This ensures that the app is not running any code that may try to manipulate its data while the backup system reads/writes its data set.
* Enforce permissions for PhoneStateListener events.Jaikumar Ganesh2009-05-291-23/+35
| | | | | | | | PhoneStateListener events like LISTEN_CALL_STATE_CHANGED, have privacy information like phone numbers and hence, need to be protected with a permission. The permission READ_PHONE_STATE is used for this purpose. Use the permission trick to ensure backward compatability.
* Fix wifi multicast API for public use.Robert Greenwalt2009-05-281-4/+10
| | | | Applying API review comments and taking it public.
* Activity Manager changes the scheduling group of processes.Dianne Hackborn2009-05-262-3/+33
| | | | | | | | | | | | The algorithm for this is currently very simple: all persistent processes are always in the normal scheduling group, all other processes are normal if their oom_adj is as good or better than VISIBLE, otherwise they are in the background group. Note that this currently results in a fair number of log messages about not being able to change the group, since the system process does not have permission to do so. Once a kernel fix is in, these will go away and the code will start working.
* Sensors: Use a native_handle for the data channel instead of a single file ↵Mike Lockwood2009-05-232-20/+63
| | | | | | | | | descriptor. This eliminates the requirement that all sensors share a single file descriptor. This, along with concurrent changes in other projects, fixes bugs b/1614524 and b/1614481 Signed-off-by: Mike Lockwood <lockwood@android.com>
* Merge change 2364 into donutAndroid (Google) Code Review2009-05-221-0/+28
|\ | | | | | | | | * changes: Initial checkin for App Fuel Gauge infrastructure.
| * Initial checkin for App Fuel Gauge infrastructure.Amith Yamasani2009-05-221-0/+28
| | | | | | | | | | This adds the PowerProfile class and data file that provides power consumption numbers for different subsystems. Also added Audio/Video subsystems to track on a per UID basis.
* | Define TARGET_CPU_ABI for finding native code in .apksDianne Hackborn2009-05-221-20/+27
| |
* | location: Replace ILocationCollector interface with new ILocationProvider methodMike Lockwood2009-05-211-29/+8
|/ | | | | | | | | | | | This change replaces ILocationCollector with a more general mechanism that passes locations received from a provider to all other providers. The network location provider now uses this to implement the location collector. In the future, this could be used to inject network locations to the GPS as aiding data. This change also removes the now obsolete permission INSTALL_LOCATION_COLLECTOR. Signed-off-by: Mike Lockwood <lockwood@android.com>
* Hook up the backup data writer, and add a utility to read the backup data files.Joe Onorato2009-05-201-6/+15
|