summaryrefslogtreecommitdiffstats
path: root/WallpaperPicker/src/com/android/launcher3/base/BaseActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'WallpaperPicker/src/com/android/launcher3/base/BaseActivity.java')
-rw-r--r--WallpaperPicker/src/com/android/launcher3/base/BaseActivity.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/WallpaperPicker/src/com/android/launcher3/base/BaseActivity.java b/WallpaperPicker/src/com/android/launcher3/base/BaseActivity.java
new file mode 100644
index 000000000..f8541188f
--- /dev/null
+++ b/WallpaperPicker/src/com/android/launcher3/base/BaseActivity.java
@@ -0,0 +1,21 @@
+package com.android.launcher3.base;
+
+import android.app.Activity;
+import android.content.Context;
+
+/**
+ * A wrapper over {@link Activity} which allows to override some methods.
+ * The base implementation can change from an Activity to a Fragment (or any other custom
+ * implementation), Callers should not assume that the base class extends Context, instead use
+ * either {@link #getContext} or {@link #getActivity}
+ */
+public class BaseActivity extends Activity {
+
+ public Context getContext() {
+ return this;
+ }
+
+ public Activity getActivity() {
+ return this;
+ }
+}