Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e049eb8 authored by Todd Kennedy's avatar Todd Kennedy Committed by Android (Google) Code Review
Browse files

Merge "Add new API to retrieve app names in a batch" into oc-mr1-dev

parents 7269de21 9da8b8a7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -41019,6 +41019,7 @@ package android.test.mock {
    method public android.content.Intent getLaunchIntentForPackage(java.lang.String);
    method public android.content.Intent getLeanbackLaunchIntentForPackage(java.lang.String);
    method public java.lang.String getNameForUid(int);
    method public java.lang.String[] getNamesForUids(int[]);
    method public int[] getPackageGids(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
    method public int[] getPackageGids(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.content.pm.PackageInfo getPackageInfo(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
+1 −0
Original line number Diff line number Diff line
@@ -44703,6 +44703,7 @@ package android.test.mock {
    method public android.content.Intent getLaunchIntentForPackage(java.lang.String);
    method public android.content.Intent getLeanbackLaunchIntentForPackage(java.lang.String);
    method public java.lang.String getNameForUid(int);
    method public java.lang.String[] getNamesForUids(int[]);
    method public int[] getPackageGids(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
    method public int[] getPackageGids(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.content.pm.PackageInfo getPackageInfo(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
+1 −0
Original line number Diff line number Diff line
@@ -41273,6 +41273,7 @@ package android.test.mock {
    method public android.content.Intent getLaunchIntentForPackage(java.lang.String);
    method public android.content.Intent getLeanbackLaunchIntentForPackage(java.lang.String);
    method public java.lang.String getNameForUid(int);
    method public java.lang.String[] getNamesForUids(int[]);
    method public int[] getPackageGids(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
    method public int[] getPackageGids(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
    method public android.content.pm.PackageInfo getPackageInfo(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
+13 −3
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
import android.content.pm.ChangedPackages;
import android.content.pm.ComponentInfo;
import android.content.pm.InstantAppInfo;
import android.content.pm.FeatureInfo;
import android.content.pm.IOnPermissionsChangeListener;
import android.content.pm.IPackageDataObserver;
@@ -40,6 +39,7 @@ import android.content.pm.IPackageInstallObserver;
import android.content.pm.IPackageManager;
import android.content.pm.IPackageMoveObserver;
import android.content.pm.IPackageStatsObserver;
import android.content.pm.InstantAppInfo;
import android.content.pm.InstrumentationInfo;
import android.content.pm.IntentFilterVerificationInfo;
import android.content.pm.KeySet;
@@ -88,13 +88,14 @@ import android.util.LauncherIcons;
import android.util.Log;
import android.view.Display;

import dalvik.system.VMRuntime;

import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.os.SomeArgs;
import com.android.internal.util.Preconditions;
import com.android.internal.util.UserIcons;

import dalvik.system.VMRuntime;

import libcore.util.EmptyArray;

import java.lang.ref.WeakReference;
@@ -705,6 +706,15 @@ public class ApplicationPackageManager extends PackageManager {
        }
    }

    @Override
    public String[] getNamesForUids(int[] uids) {
        try {
            return mPM.getNamesForUids(uids);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    @Override
    public int getUidForSharedUser(String sharedUserName)
            throws NameNotFoundException {
+6 −0
Original line number Diff line number Diff line
@@ -61,6 +61,12 @@ import android.content.IntentSender;
 *  {@hide}
 */
interface IPackageManager {
    // Since these transactions are also called from native code, these must be kept in sync with
    // the ones in frameworks/native/include/binder/IPackageManager.h
    // =============== Beginning of transactions used on native side as well ======================
    String[] getNamesForUids(in int[] uids);
    // =============== End of transactions used on native side as well ============================

    void checkPackageStartable(String packageName, int userId);
    boolean isPackageAvailable(String packageName, int userId);
    PackageInfo getPackageInfo(String packageName, int flags, int userId);
Loading