summaryrefslogtreecommitdiff
path: root/core/java/android/app/ApplicationContext.java
Commit message (Collapse)AuthorAgeFilesLines
* Rename ApplicationContext to ContextImpl.Dianne Hackborn2010-02-041-2946/+0
| | | | I've been wanting to do this for a long long time.
* Apps on sdcard: Add new broadcastsSuchi Amalapurapu2010-02-021-21/+50
| | | | | | | | | | | | | Add new broadcasts ACTION_MEDIA_RESOURCES_AVAILABLE and ACTION_MEDIA_RESOURCES_UNAVAILABLE that get broadcast by PackageManagerService when sdcard gets mounted/unmounted by MountService so that packages on sdcard get recognized by various system services as being installed/available or removed/unavailable by the system. The broadcasts are sent before the actual package cleanup which includes mounting/unmounting the packages and we force a gc right after so that any lingering file references to resources on sdcard get released.
* StorageManager: API_CHANGE: Move StorageManager into android.storageSan Mehat2010-02-021-1/+1
| | | | Signed-off-by: San Mehat <san@google.com>
* Context: API_CHANGE: Add support for retrieving StorageManagerSan Mehat2010-02-021-0/+18
| | | | Signed-off-by: San Mehat <san@google.com>
* Apps on SD card project.Oscar Montemayor2010-01-291-0/+72
| | | | | | | Refactored recommendAppInstallLocation(..) method in PackageManager by making it an instance method. Since PackageManager has only abstarct instance methods, moved implementation to ApplicationContext.ApplicationPackageManager class, in line with the rest of the method implementations. Tah way, chage is consistent with best coding practices. Also MockPackageManager received the additional method.
* First pass at new device policy and administration APIs.Dianne Hackborn2010-01-171-0/+13
| | | | | | | | This adds new DevicAdmin, DevicePolicyManager, and DeviceAdminInfo classes. See the java docs for each on documentation on them. Basically: a DeviceAdmin is what you derive from to administer a device; DevicePolicyManager is what you use to apply and check your policy requirements and perform other administration tasks.
* resolved conflicts for merge of ad2fa35d to masterTom Taylor2009-12-221-1/+1
|\ | | | | | | Change-Id: Ia4362cd48ac0689b91003943a4cd9660da72ff90
| * Update imports to android-commonTom Taylor2009-12-211-1/+1
| | | | | | | | | | Several files were moved to android-common. Update all the references to import those files from the new location.
* | Encrypted File Systems Project. Installer modifications.Oscar Montemayor2009-11-241-11/+27
|/ | | | Started to modify isntaller for data redirection to a secure location.
* Rename [I]DropBox[Service] to [I]DropBoxManager[Service].Dan Egnor2009-11-121-9/+9
| | | | Un-hide the DropBoxManager interface, and update the public API accordingly.
* Instead of a raw AIDL interface, give DropBox a JavaDan Egnor2009-10-281-1/+18
| | | | | | | | interface (android.os.DropBox); move the Binder interface behind the scenes. Make DropBoxEntry into DropBox.Entry. Make it possible to get a dropbox from an (Application)Context with the usual getSystemService(DROPBOX_SERVICE) type thing. Update the tests accordingly.
* Introduce BluetoothAdapter.getDefaultAdapter().Nick Pelly2009-10-081-18/+0
| | | | | | | | | | | | | This is the main entry point to the Bluetooth APIs, and returns the default local Bluetooth adapter. It replaces context.getSystemService(Context.BLUETOOTH_SERVICE). This was never in a public SDK release. DrNo: eastham Bug: 2158765 Joke: Why can't you play cards in the jungle? Because there's too many cheetas! Change-Id: Ieed8be009ee5aba621cb69090ee8c8a9c19c840d
* Check if rename of backed up file fails before persisting new changes.Suchi Amalapurapu2009-09-301-0/+1
| | | | | | | | | If not these system services will end up with inconsistent settings files when the device runs out of storage. Delete mangled settings file in PackageManager if the current write fails so that we don't end up overwriting the backed up version with the mangled version Include null check when retrieving fwd locked resource for an existing package
* The touch screen is probably a feature.Dianne Hackborn2009-09-261-0/+9
| | | | | | Also extend the feature APIs a bit. Change-Id: I99e932d7f4e61edb0e20f75c55e9831e4b59a14d
* - make an AccountManager per context, not one per processFred Quintana2009-09-221-5/+5
| | | | - enhance the comment for addOnAccountsUpdatedListener()
* Add API to send an ordered sticky broadcast.Dianne Hackborn2009-09-191-0/+32
| | | | Change-Id: Ida7081204e226db0cd07ff618c08e308a909ec0c
* Fix issue #2093608: Calendar widget takes a few seconds to launchDianne Hackborn2009-09-171-0/+21
| | | | | | | | | | | Avert your eyes! The key change here is that RemoteViews can now call a Context API to start its pending intent, which inside of the activity manager we can use to determine to cancel the timeout delay for external entities to disrupt the home screen. Change-Id: If097cf7478cbed7a3c04a304050bd7fd5703d197
* Add platform infrastructure for features.Dianne Hackborn2009-08-271-0/+10
| | | | | | | | | | | | | | This introduces a new mechanism to define features associated with a platform, query the current device for the available features, and enforce that apps requiring features that aren't available can't be installed. Also now allows uses-library to specify that a library is optional, so the lack of such a library will not prevent the app from being installed (but if it does exist it will be correctly linked into the app). Change-Id: I5b369b46cfa0b3d37c9e08fd14ef1098a978e67b
* Bluetooth: API change.Nick Pelly2009-08-181-17/+12
| | | | | | | | | | | | | | | Split BluetoothDevice into BluetoothDevice and BluetoothAdapter. BluetoothAdapter: Represents the local BT adapter. Operations on the local adapter (start a scan, etc). BluetoothDevice: Represents a remote BT device. Operations on remote devices (pair, connect, etc). IBluetoothDevice.aidl -> Bluetooth.aidl BluetoothDeviceService.java -> BluetoothDeviceService.java TODO: Javadoc
* Add new API to compare certs of two UIDs.Dianne Hackborn2009-08-121-0/+9
|
* Very primitive wallpapers in a surface.Dianne Hackborn2009-08-081-4/+4
| | | | | | | | | | | | | | This is all of the basic pieces: - The WallpaperService now creates a surface with the window manager for its contents. - There is a simple service that displays a bitmap. - The wallpaper manager takes care of starting and stopping the service. - The window manager knows about wallpaper windows and how to layer them with the windows that want to be shown on top of wallpaper. Lots and lots of issues remain, but at this point you can actually write a wallpaper service, select it in the UI, and see it behind an activity.
* First bit of wallpaper work.Dianne Hackborn2009-08-051-147/+25
| | | | | | | This is mostly refactoring, adding a new WallpaperManager class that takes care of the old wallpaper APIs on Context, so we don't need to pollute Context with various new wallpaper APIs as they are needed. Also adds the first little definition of a wallpaper service, which is not yet used or useful.
* Only restore the bits for wallpapers that aren't built in.Joe Onorato2009-07-291-4/+7
|
* am 11ea3347: Allow for screen density drawables in compatibility mode.Dianne Hackborn2009-07-241-3/+14
|\ | | | | | | | | | | | | Merge commit '11ea33471e1a14a8594f0b2cd012d86340dd3bd8' * commit '11ea33471e1a14a8594f0b2cd012d86340dd3bd8': Allow for screen density drawables in compatibility mode.
| * Allow for screen density drawables in compatibility mode.Dianne Hackborn2009-07-241-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows us to use drawables that match the current screen density even when being loaded in compatibility mode. In this case, the bitmap is loaded in the screen density, and the bitmap and nine-patch drawables take care of accounting for the density difference. This should be safe for existing applications, for the most part, since they shouldn't really be pulling the bitmap out of the drawable. For the small rare chance of them breaking, it worth getting the correct graphics. Also this will only happen when there is actually a resource of the matching density, and no existing apps should have resources for anything besides the default density (though of course all of the framework resources will be available in the native density). As part of this, the bitmap density API has been changed to a single integer provider the DPI unit density.
* | am ba3ba579: * Use cached resources for widgetsMitsuru Oshima2009-07-121-14/+17
|\| | | | | | | | | | | | | Merge commit 'ba3ba57921dedaaef669719c0359c0caf60e008b' * commit 'ba3ba57921dedaaef669719c0359c0caf60e008b': * Use cached resources for widgets
| * * Use cached resources for widgetsMitsuru Oshima2009-07-111-14/+17
| |
* | am 569076c9: widgets scaling fix. Use container\'s compatibility info and ↵Mitsuru Oshima2009-07-061-2/+18
|\| | | | | | | | | | | | | | | | | display metrics when container and widgets disagree. Merge commit '569076c9f6bdadb4d3285a26e069634a839b5b87' * commit '569076c9f6bdadb4d3285a26e069634a839b5b87': widgets scaling fix. Use container's compatibility info and display metrics when container and widgets disagree.
| * widgets scaling fix. Use container's compatibility info and display metrics ↵Mitsuru Oshima2009-07-061-2/+18
| | | | | | | | when container and widgets disagree.
* | am 870e09fc: Fixes #1963229. Introduces Context#isRestricted().Romain Guy2009-07-061-0/+7
|\| | | | | | | | | | | | | Merge commit '870e09fcd2dfdc12ac318962efd28b0420c562bb' * commit '870e09fcd2dfdc12ac318962efd28b0420c562bb': Fixes #1963229. Introduces Context#isRestricted().
| * Fixes #1963229. Introduces Context#isRestricted().Romain Guy2009-07-061-0/+7
| | | | | | | | | | | | | | A restricted Context is a special type of Context that prevents specific features from being used. For instance, android:onClick, used by View, can be dangerous when used from within apps widgets. By using a restricted Context to inflate apps widgets, widgets providers are prevented from using android:onClick.
* | am 9c1b1872: Merge change 4908 into donutAndroid (Google) Code Review2009-06-221-5/+0
|\| | | | | | | | | | | | | Merge commit '9c1b1872faf028bcd70fb3e17eeb29d86ce6bd9a' * commit '9c1b1872faf028bcd70fb3e17eeb29d86ce6bd9a': Remove checks for Activity Context when creating SearchManager
| * Remove checks for Activity Context when creating SearchManagerBjorn Bringert2009-06-221-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since https://android-git.corp.google.com/g/3880 all activities create a SearchManager object, to handle saving and restoring the search dialog. This broke ActivityUnitTestCase, since ApplicationContext.getSearchManager() threw an exception in non-activity contexts. This change removes the activity context check from getSearchManager(). Since SearchManager is now just a thin wrapper for SearchManagerService, there shouldn't be anything activity-specific in it. Fixes http://b/issue?id=1926254
* | am bc806f65: Remove deprecated api. Aptly rename freeStorageWithIntent to ↵Suchi Amalapurapu2009-06-191-10/+1
|\| | | | | | | | | | | | | | | | | freeStorage. Merge commit 'bc806f65edc33f6eda0f475ac84e5e037a013a90' * commit 'bc806f65edc33f6eda0f475ac84e5e037a013a90': Remove deprecated api. Aptly rename freeStorageWithIntent to freeStorage.
| * Remove deprecated api. Aptly rename freeStorageWithIntent to freeStorage.Suchi Amalapurapu2009-06-191-10/+1
| |
* | am 63e7155c: Merge change 4696 into donutAndroid (Google) Code Review2009-06-181-0/+8
|\| | | | | | | | | | | | | Merge commit '63e7155c7d1d0c3f0027400aa09e9a45f648a80d' * commit '63e7155c7d1d0c3f0027400aa09e9a45f648a80d': Fix targetSdkVersion, make resize mode a flag, delayed dexopt, easy ApplicationInfo.
| * Fix targetSdkVersion, make resize mode a flag, delayed dexopt, easy ↵Dianne Hackborn2009-06-181-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ApplicationInfo. - Fix a bug where targetSdkVersion could not be set if minSdkVersion. Stupid, stupid. Also make sure to fail if minSdkVersion is for a code name. Really stupid. - Change the API for resize compatibility mode to be a bit in the flags field, instead of a separate boolean. - Implement delayed dexopting, to avoid the looong full dexopt during boot. This is only enabled for "eng" builds. When in this mode, the activity manager will make sure that a dexopt has been done before loading an .apk into a process, and will try to avoid displaying ANRs if they are due to the dexopt causing some operation to take longer than it normally would (though I make no guarantees about this totally working). - Add API to Context to get the ApplicationInfo for its package, for easy access to things like targetSdkVersion.
* | am c14b9ccd: Extend Intent/Uri conversion for use by BrowserDianne Hackborn2009-06-171-15/+4
|\| | | | | | | | | | | | | Merge commit 'c14b9ccdf13163cae5ce5d21bcf377010b37594b' * commit 'c14b9ccdf13163cae5ce5d21bcf377010b37594b': Extend Intent/Uri conversion for use by Browser
| * Extend Intent/Uri conversion for use by BrowserDianne Hackborn2009-06-171-15/+4
| | | | | | | | | | | | | | | | | | | | | | | | This introduces a new Uri form of Intent with an "intent:" scheme, and a corresponding update to the parser to handle these, so that the browser can use this generic facility for starting activities based on the links that are clicked and allow for web pages to link to arbitrary intents. There is also a new "package" field on Intent which allows you to limit the components it finds to a given package. This replaces the new method that was added to PackageManger for doing this when resolving activities, and implements it for all Intent queries against the package manager.
* | Merge commit '0781df94' into manualmergeSuchi Amalapurapu2009-06-171-3/+14
|\| | | | | | | | | | | Conflicts: Android.mk api/current.xml
| * Remove circular dependency in PackageManager. api freeStorage uses ↵Suchi Amalapurapu2009-06-171-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | am 78f0f8cb: Merge changes 3953,3954 into donutAndroid (Google) Code Review2009-06-121-1/+5
|\| | | | | | | | | | | | | | | Merge commit '78f0f8cb2efe9410127c39201e240f6d438eb53c' * commit '78f0f8cb2efe9410127c39201e240f6d438eb53c': Make the file backup helper not crash if a file you requested Fix SharedPrefsBackupHelper so it doesn't hard code the paths to the files.
| * Fix SharedPrefsBackupHelper so it doesn't hard code the paths to the files.Joe Onorato2009-06-111-1/+5
| | | | | | | | This took quite a bit of refactoring.
* | am 9189cabb: * Moved supports-density tag under manifest * Refactored ↵Mitsuru Oshima2009-06-031-15/+1
|\| | | | | | | | | | | | | | | | | 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. Merge commit '9189cabb0b6c6c28232fe6f412b7ba7a37352a6a' * commit '9189cabb0b6c6c28232fe6f412b7ba7a37352a6a': * Moved supports-density tag under manifest
| * * Moved supports-density tag under manifestMitsuru Oshima2009-06-031-15/+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.
* | am 8dbe612d: Adding internal method replacePreferredActivity.Satish Sampath2009-06-031-0/+10
|\| | | | | | | | | | | | | Merge commit '8dbe612dc60526d635e57257b58627b33a099678' * commit '8dbe612dc60526d635e57257b58627b33a099678': Adding internal method replacePreferredActivity.
| * Adding internal method replacePreferredActivity.Satish Sampath2009-06-031-0/+10
| | | | | | | | | | | | | | | | | | | | 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.
* | am eae850ce: Allow intent resolution to be constrained by package name.Mihai Preda2009-05-151-30/+31
|\| | | | | | | | | | | | | Merge commit 'eae850cefe7e149f396c9e8ca1f34ec02b20a3f0' * commit 'eae850cefe7e149f396c9e8ca1f34ec02b20a3f0': Allow intent resolution to be constrained by package name.
| * Allow intent resolution to be constrained by package name.Mihai Preda2009-05-151-30/+31
| |
* | resolved conflicts w/ 75986cf9bc57ef11ad70f36fb77fbbf5d63af6ec merge....svetoslavganov2009-05-151-10/+13
|\|