public final UserEventDispatcher getUserEventDispatcher() {
if (mUserEventDispatcher == null) {
mUserEventDispatcher = UserEventDispatcher.newInstance(this,
- isInMultiWindowModeCompat());
+ mDeviceProfile.isLandscape, isInMultiWindowModeCompat());
}
return mUserEventDispatcher;
}
private static final boolean IS_VERBOSE =
ProviderConfig.IS_DOGFOOD_BUILD && Utilities.isPropertyEnabled(LogConfig.USEREVENT);
- public static UserEventDispatcher newInstance(Context context, boolean isInMultiWindowMode) {
+ public static UserEventDispatcher newInstance(Context context, boolean isInLandscapeMode,
+ boolean isInMultiWindowMode) {
UserEventDispatcher ued = Utilities.getOverrideObject(UserEventDispatcher.class,
context.getApplicationContext(), R.string.user_event_dispatcher_class);
+ ued.mIsInLandscapeMode = isInLandscapeMode;
ued.mIsInMultiWindowMode = isInMultiWindowMode;
return ued;
}
private long mElapsedSessionMillis;
private long mActionDurationMillis;
private boolean mIsInMultiWindowMode;
+ private boolean mIsInLandscapeMode;
// Used for filling in predictedRank on {@link Target}s.
private List<ComponentKey> mPredictedApps;
}
public void dispatchUserEvent(LauncherEvent ev, Intent intent) {
+ ev.isInLandscapeMode = mIsInLandscapeMode;
ev.isInMultiWindowMode = mIsInMultiWindowMode;
ev.elapsedContainerMillis = SystemClock.uptimeMillis() - mElapsedContainerMillis;
ev.elapsedSessionMillis = SystemClock.uptimeMillis() - mElapsedSessionMillis;
ev.elapsedContainerMillis,
ev.elapsedSessionMillis,
ev.actionDurationMillis);
+ log += "\n isInLandscapeMode " + ev.isInLandscapeMode;
log += "\n isInMultiWindowMode " + ev.isInMultiWindowMode;
Log.d(TAG, log);
}