diff options
author | Suchi Amalapurapu <asuchitra@google.com> | 2009-06-17 15:18:19 -0700 |
---|---|---|
committer | Suchi Amalapurapu <asuchitra@google.com> | 2009-06-19 10:25:37 -0700 |
commit | bc806f65edc33f6eda0f475ac84e5e037a013a90 (patch) | |
tree | 086604fbc605d4b416e85b565227ffb7e489d1d7 /services/java/com/android/server/PackageManagerService.java | |
parent | 2b1aed1021fb472de83c4c0143f2c4452244a0af (diff) | |
download | frameworks_base-bc806f65edc33f6eda0f475ac84e5e037a013a90.zip frameworks_base-bc806f65edc33f6eda0f475ac84e5e037a013a90.tar.gz frameworks_base-bc806f65edc33f6eda0f475ac84e5e037a013a90.tar.bz2 |
Remove deprecated api. Aptly rename freeStorageWithIntent to freeStorage.
Diffstat (limited to 'services/java/com/android/server/PackageManagerService.java')
-rw-r--r-- | services/java/com/android/server/PackageManagerService.java | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/services/java/com/android/server/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java index f18d6e0..fd3baca 100644 --- a/services/java/com/android/server/PackageManagerService.java +++ b/services/java/com/android/server/PackageManagerService.java @@ -26,8 +26,6 @@ import org.xmlpull.v1.XmlSerializer; import android.app.ActivityManagerNative; import android.app.IActivityManager; -import android.app.PendingIntent; -import android.app.PendingIntent.CanceledException; import android.content.ComponentName; import android.content.Context; import android.content.Intent; @@ -936,33 +934,7 @@ class PackageManagerService extends IPackageManager.Stub { }); } - public void freeStorage(final long freeStorageSize, final PendingIntent opFinishedIntent) { - mContext.enforceCallingOrSelfPermission( - android.Manifest.permission.CLEAR_APP_CACHE, null); - // Queue up an async operation since clearing cache may take a little while. - mHandler.post(new Runnable() { - public void run() { - mHandler.removeCallbacks(this); - int retCode = -1; - if (mInstaller != null) { - retCode = mInstaller.freeCache(freeStorageSize); - if (retCode < 0) { - Log.w(TAG, "Couldn't clear application caches"); - } - } - if(opFinishedIntent != null) { - try { - // Callback via pending intent - opFinishedIntent.send((retCode >= 0) ? 1 : 0); - } catch (CanceledException e1) { - Log.i(TAG, "Failed to send pending intent"); - } - } - } - }); - } - - public void freeStorageWithIntent(final long freeStorageSize, final IntentSender pi) { + public void freeStorage(final long freeStorageSize, final IntentSender pi) { mContext.enforceCallingOrSelfPermission( android.Manifest.permission.CLEAR_APP_CACHE, null); // Queue up an async operation since clearing cache may take a little while. |