From 4c3915a0f73e51d0c70d93fe5b9ed125d5739b93 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Mon, 31 Jan 2011 16:36:32 -0800 Subject: Do not check features in PackageManagerService PackageManagerService shouldn't check features that a package declares that it uses because this will cause problems in the future when we add more features that older phones didn't explicitly declare. We must rely on markets to know about phones and filter them for us to avoid this situation. Bug: 3409434 Change-Id: I419a5b936be3572b83a485081a6c81b2f1c8741c --- .../com/android/server/PackageManagerService.java | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'services') diff --git a/services/java/com/android/server/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java index d75aef6..f3b5f4b 100644 --- a/services/java/com/android/server/PackageManagerService.java +++ b/services/java/com/android/server/PackageManagerService.java @@ -2924,26 +2924,6 @@ class PackageManagerService extends IPackageManager.Stub { } } - if (pkg.reqFeatures != null) { - int N = pkg.reqFeatures.size(); - for (int i = 0; i < N; i++) { - FeatureInfo fi = pkg.reqFeatures.get(i); - if ((fi.flags & FeatureInfo.FLAG_REQUIRED) == 0) { - // Don't care. - continue; - } - - if (fi.name != null) { - if (mAvailableFeatures.get(fi.name) == null) { - Slog.e(TAG, "Package " + pkg.packageName - + " requires unavailable feature " + fi.name + "; failing!"); - mLastScanError = PackageManager.INSTALL_FAILED_MISSING_FEATURE; - return null; - } - } - } - } - if (pkg.mSharedUserId != null) { suid = mSettings.getSharedUserLP(pkg.mSharedUserId, pkg.applicationInfo.flags, true); -- cgit v1.1