diff options
Diffstat (limited to 'src/com/android/launcher3/BaseActivity.java')
-rw-r--r-- | src/com/android/launcher3/BaseActivity.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/launcher3/BaseActivity.java b/src/com/android/launcher3/BaseActivity.java index 9f4f1f9c4..e1a3ad0d6 100644 --- a/src/com/android/launcher3/BaseActivity.java +++ b/src/com/android/launcher3/BaseActivity.java @@ -21,9 +21,12 @@ import android.content.Context; import android.content.ContextWrapper; import android.view.View.AccessibilityDelegate; +import com.android.launcher3.logging.UserEventDispatcher; + public abstract class BaseActivity extends Activity { protected DeviceProfile mDeviceProfile; + protected UserEventDispatcher mUserEventDispatcher; public DeviceProfile getDeviceProfile() { return mDeviceProfile; @@ -33,6 +36,13 @@ public abstract class BaseActivity extends Activity { return null; } + public final UserEventDispatcher getUserEventDispatcher() { + if (mUserEventDispatcher == null) { + mUserEventDispatcher = UserEventDispatcher.get(this); + } + return mUserEventDispatcher; + } + public static BaseActivity fromContext(Context context) { if (context instanceof BaseActivity) { return (BaseActivity) context; |