summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Workspace.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2015-05-28 17:33:40 -0700
committerWinson Chung <winsonc@google.com>2015-06-02 16:58:30 -0700
commit8f1eff7b6cc8621888ee46605c32e601f80a890b (patch)
treee146630fbd97be40814eb573a8b5aac5c0e0d00d /src/com/android/launcher3/Workspace.java
parent316490e636aad788fcfbfc2e04dd4f0e145bdd00 (diff)
downloadandroid_packages_apps_Trebuchet-8f1eff7b6cc8621888ee46605c32e601f80a890b.tar.gz
android_packages_apps_Trebuchet-8f1eff7b6cc8621888ee46605c32e601f80a890b.tar.bz2
android_packages_apps_Trebuchet-8f1eff7b6cc8621888ee46605c32e601f80a890b.zip
Adding context for app launches.
Bug: 21492784 Change-Id: I1b28ac8f44498e1d9770e770b074f19c721c3f10
Diffstat (limited to 'src/com/android/launcher3/Workspace.java')
-rw-r--r--src/com/android/launcher3/Workspace.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 6d5affb59..193a0af6f 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -28,6 +28,7 @@ import android.appwidget.AppWidgetHostView;
import android.appwidget.AppWidgetProviderInfo;
import android.content.ComponentName;
import android.content.Context;
+import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.content.res.TypedArray;
@@ -42,6 +43,7 @@ import android.graphics.Region.Op;
import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
import android.os.Build;
+import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Parcelable;
@@ -86,7 +88,7 @@ import java.util.concurrent.atomic.AtomicInteger;
public class Workspace extends PagedView
implements DropTarget, DragSource, DragScroller, View.OnTouchListener,
DragController.DragListener, LauncherTransitionable, ViewGroup.OnHierarchyChangeListener,
- Insettable, UninstallSource, AccessibilityDragSource {
+ Insettable, UninstallSource, AccessibilityDragSource, Stats.LaunchSourceProvider {
private static final String TAG = "Launcher.Workspace";
private static boolean ENFORCE_DRAG_EVENT_ORDER = false;
@@ -4461,6 +4463,12 @@ public class Workspace extends PagedView
mLauncher.getDragLayer().getLocationInDragLayer(this, loc);
}
+ @Override
+ public void fillInLaunchSourceData(Bundle sourceData) {
+ sourceData.putString(Stats.SOURCE_EXTRA_CONTAINER, Stats.CONTAINER_HOMESCREEN);
+ sourceData.putInt(Stats.SOURCE_EXTRA_CONTAINER_PAGE, getCurrentPage());
+ }
+
/**
* Used as a workaround to ensure that the AppWidgetService receives the
* PACKAGE_ADDED broadcast before updating widgets.