diff options
Diffstat (limited to 'src/com/android/launcher3/compat/LauncherAppsCompatV16.java')
-rw-r--r-- | src/com/android/launcher3/compat/LauncherAppsCompatV16.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/com/android/launcher3/compat/LauncherAppsCompatV16.java b/src/com/android/launcher3/compat/LauncherAppsCompatV16.java index de9f3a032..c47f223f3 100644 --- a/src/com/android/launcher3/compat/LauncherAppsCompatV16.java +++ b/src/com/android/launcher3/compat/LauncherAppsCompatV16.java @@ -27,14 +27,21 @@ import android.content.pm.PackageManager.NameNotFoundException; import android.content.pm.PackageInfo; import android.content.pm.ResolveInfo; import android.graphics.Rect; +import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.UserHandle; +import android.provider.Settings; import java.util.ArrayList; import java.util.Collections; import java.util.List; +/** + * Version of {@link LauncherAppsCompat} for devices with API level 16. + * Devices Pre-L don't support multiple profiles in one launcher so + * user parameters are ignored and all methods operate on the current user. + */ public class LauncherAppsCompatV16 extends LauncherAppsCompat { private PackageManager mPm; @@ -81,6 +88,15 @@ public class LauncherAppsCompatV16 extends LauncherAppsCompat { mContext.startActivity(launchIntent, opts); } + public void showAppDetailsForProfile(ComponentName component, UserHandleCompat user) { + String packageName = component.getPackageName(); + Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, + Uri.fromParts("package", packageName, null)); + intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | + Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); + mContext.startActivity(intent, null); + } + public synchronized void addOnAppsChangedCallback(OnAppsChangedCallbackCompat callback) { if (callback != null && !mCallbacks.contains(callback)) { mCallbacks.add(callback); |