diff options
author | Jon Miranda <jonmiranda@google.com> | 2017-03-28 12:14:13 -0700 |
---|---|---|
committer | Jon Miranda <jonmiranda@google.com> | 2017-03-28 12:14:13 -0700 |
commit | fcaff64c931c5a9a7e0d6a2782173b9717553cc9 (patch) | |
tree | acc07c9d058ca0ea03f20dae4db5bc99a958b2db /src/com/android/launcher3/logging | |
parent | bea3a6ba7e7abd2460216459b4690fa6f5e6c4b3 (diff) | |
parent | 8eb0de133154666cd20d0244953ee755b626b44a (diff) | |
download | android_packages_apps_Trebuchet-fcaff64c931c5a9a7e0d6a2782173b9717553cc9.tar.gz android_packages_apps_Trebuchet-fcaff64c931c5a9a7e0d6a2782173b9717553cc9.tar.bz2 android_packages_apps_Trebuchet-fcaff64c931c5a9a7e0d6a2782173b9717553cc9.zip |
Resolve merge conflicts of 8eb0de133 to ub-launcher3-master
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I1e888f6941435befe6f1819de74dea985909ddf0
Diffstat (limited to 'src/com/android/launcher3/logging')
-rw-r--r-- | src/com/android/launcher3/logging/UserEventDispatcher.java | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/com/android/launcher3/logging/UserEventDispatcher.java b/src/com/android/launcher3/logging/UserEventDispatcher.java index 04ca24741..7899846d8 100644 --- a/src/com/android/launcher3/logging/UserEventDispatcher.java +++ b/src/com/android/launcher3/logging/UserEventDispatcher.java @@ -62,17 +62,11 @@ public class UserEventDispatcher { private static final boolean IS_VERBOSE = FeatureFlags.IS_DOGFOOD_BUILD && Utilities.isPropertyEnabled(LogConfig.USEREVENT); - private static UserEventDispatcher sInstance; - private static final Object LOCK = new Object(); - - public static UserEventDispatcher get(Context context) { - synchronized (LOCK) { - if (sInstance == null) { - sInstance = Utilities.getOverrideObject(UserEventDispatcher.class, - context.getApplicationContext(), R.string.user_event_dispatcher_class); - } - return sInstance; - } + public static UserEventDispatcher newInstance(Context context, boolean isInMultiWindowMode) { + UserEventDispatcher ued = Utilities.getOverrideObject(UserEventDispatcher.class, + context.getApplicationContext(), R.string.user_event_dispatcher_class); + ued.mIsInMultiWindowMode = isInMultiWindowMode; + return ued; } /** @@ -117,6 +111,7 @@ public class UserEventDispatcher { private long mElapsedContainerMillis; private long mElapsedSessionMillis; private long mActionDurationMillis; + private boolean mIsInMultiWindowMode; // Used for filling in predictedRank on {@link Target}s. private List<ComponentKey> mPredictedApps; @@ -301,6 +296,7 @@ public class UserEventDispatcher { } public void dispatchUserEvent(LauncherEvent ev, Intent intent) { + ev.isInMultiWindowMode = mIsInMultiWindowMode; ev.elapsedContainerMillis = SystemClock.uptimeMillis() - mElapsedContainerMillis; ev.elapsedSessionMillis = SystemClock.uptimeMillis() - mElapsedSessionMillis; @@ -319,6 +315,7 @@ public class UserEventDispatcher { ev.elapsedContainerMillis, ev.elapsedSessionMillis, ev.actionDurationMillis); + log += "\n isInMultiWindowMode " + ev.isInMultiWindowMode; Log.d(TAG, log); } |