Hello,

I am trying to understand why I get this error:

E/AndroidRuntime(15894): java.lang.NoSuchMethodError:
android.content.pm.IPackageManager.clearApplicationUserData

when such method is defined in IPackageManager.aidl in Eclair source
and I stub the class so compile is ok.

Is there something else I need to do to enable access to this
function?

Here is the piece of code from a system apk:

IPackageManager pm =
IPackageManager.Stub.asInterface(ServiceManager.getService("package"));

List<PackageInfo> packages =
pm.getInstalledPackages(PackageManager.GET_ACTIVITIES |
PackageManager.GET_SERVICES);

// for each package found through PackageManager
for (PackageInfo pkgInfo : packages){
     pm.clearApplicationUserData(pkgInfo.packageName, null);
}

Thanks,
Alvin

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to