summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/InfoDropTarget.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2017-05-03 11:17:13 -0700
committerTony Wickham <twickham@google.com>2017-05-03 11:17:13 -0700
commitdebc046b898c4a3e62e3eddd26c89a732dd99b8b (patch)
tree1f75365fc8cdd5b2546e7125111b118f05307bb0 /src/com/android/launcher3/InfoDropTarget.java
parent0bc04a984147869bf27ed4047c0951a061fcbd42 (diff)
parente3c59256794448c67e01333a9f5036559b1bd502 (diff)
downloadandroid_packages_apps_Trebuchet-debc046b898c4a3e62e3eddd26c89a732dd99b8b.tar.gz
android_packages_apps_Trebuchet-debc046b898c4a3e62e3eddd26c89a732dd99b8b.tar.bz2
android_packages_apps_Trebuchet-debc046b898c4a3e62e3eddd26c89a732dd99b8b.zip
Merge commit 'e3c59256794448c67e01333a9f5036559b1bd502' into am-58d0617b-47f2-44b7-ac1f-c278ee055d1e
* commit 'e3c59256794448c67e01333a9f5036559b1bd502': Use source bounds/activity options for App Info System Shortcut Change-Id: Ic7e89e1f2de44198ab95308095b17447d27f0c0d
Diffstat (limited to 'src/com/android/launcher3/InfoDropTarget.java')
-rw-r--r--src/com/android/launcher3/InfoDropTarget.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/com/android/launcher3/InfoDropTarget.java b/src/com/android/launcher3/InfoDropTarget.java
index 7b3bded17..f088d1176 100644
--- a/src/com/android/launcher3/InfoDropTarget.java
+++ b/src/com/android/launcher3/InfoDropTarget.java
@@ -19,6 +19,8 @@ package com.android.launcher3;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
+import android.graphics.Rect;
+import android.os.Bundle;
import android.provider.Settings;
import android.util.AttributeSet;
import android.util.Log;
@@ -58,12 +60,16 @@ public class InfoDropTarget extends UninstallDropTarget {
*/
public static boolean startDetailsActivityForInfo(
ItemInfo info, Launcher launcher, DropTargetResultCallback callback) {
+ return startDetailsActivityForInfo(info, launcher, callback, null, null);
+ }
+
+ public static boolean startDetailsActivityForInfo(ItemInfo info, Launcher launcher,
+ DropTargetResultCallback callback, Rect sourceBounds, Bundle opts) {
if (info instanceof PromiseAppInfo) {
PromiseAppInfo promiseAppInfo = (PromiseAppInfo) info;
launcher.startActivity(promiseAppInfo.getMarketIntent());
return true;
}
-
boolean result = false;
ComponentName componentName = null;
if (info instanceof AppInfo) {
@@ -78,7 +84,7 @@ public class InfoDropTarget extends UninstallDropTarget {
if (componentName != null) {
try {
LauncherAppsCompat.getInstance(launcher)
- .showAppDetailsForProfile(componentName, info.user);
+ .showAppDetailsForProfile(componentName, info.user, sourceBounds, opts);
result = true;
} catch (SecurityException | ActivityNotFoundException e) {
Toast.makeText(launcher, R.string.activity_not_found, Toast.LENGTH_SHORT).show();