diff options
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/ApplicationPackageManager.java | 13 | ||||
| -rw-r--r-- | core/java/android/content/pm/IPackageManager.aidl | 2 |
2 files changed, 8 insertions, 7 deletions
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java index b93771f..0d11e29 100644 --- a/core/java/android/app/ApplicationPackageManager.java +++ b/core/java/android/app/ApplicationPackageManager.java @@ -427,14 +427,17 @@ final class ApplicationPackageManager extends PackageManager { } } - @SuppressWarnings("unchecked") @Override public List<PackageInfo> getInstalledThemePackages() { - try { - return mPM.getInstalledThemePackages(); - } catch (RemoteException e) { - throw new RuntimeException("Package manager has died", e); + // Returns a list of theme APKs. + ArrayList<PackageInfo> finalList = new ArrayList<PackageInfo>(); + List<PackageInfo> installedPackagesList = getInstalledPackages(0); + for (PackageInfo pi : installedPackagesList) { + if (pi != null && pi.isThemeApk) { + finalList.add(pi); + } } + return finalList; } @SuppressWarnings("unchecked") diff --git a/core/java/android/content/pm/IPackageManager.aidl b/core/java/android/content/pm/IPackageManager.aidl index d24bf6e..d6a78ea 100644 --- a/core/java/android/content/pm/IPackageManager.aidl +++ b/core/java/android/content/pm/IPackageManager.aidl @@ -130,8 +130,6 @@ interface IPackageManager { */ ParceledListSlice getInstalledPackages(int flags, in String lastRead, in int userId); - List<PackageInfo> getInstalledThemePackages(); - /** * This implements getInstalledApplications via a "last returned row" * mechanism that is not exposed in the API. This is to get around the IPC |
