WEB开发网
开发学院手机开发Android 开发 Android PendingIntent与Intent的区别的理解 阅读

Android PendingIntent与Intent的区别的理解

 2010-11-05 00:55:40 来源:WEB开发网   
核心提示:public void freeStorageAndNotify(final long freeStorageSize, final IPackageDataObserver observer) {mContext.enforceCallingOrSelfPermission(android.Manifest.perm

public void freeStorageAndNotify(final long freeStorageSize, final IPackageDataObserver observer) {

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) {

Slog.w(TAG, "Couldn't clear application caches");

}

} //end if mInstaller

if (observer != null) {

try {

observer.onRemoveCompleted(null, (retCode >= 0));

} catch (RemoteException e) {

Slog.w(TAG, "RemoveException when invoking call back");

}

}

}

});

}

上一页  1 2 3 

Tags:Android PendingIntent Intent

编辑录入:coldstar [复制链接] [打 印]
赞助商链接