diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-03-20 18:51:38 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-03-21 11:11:03 -0700 |
commit | 1d0b093a6e384f5ade340c2b404b324bb6002c97 (patch) | |
tree | 0e59c958719f4c6a9f5e5a8b09fbfde634d67b00 /WallpaperPicker/src/com/android/launcher3/base | |
parent | 5319b2bb3ba25fa658f58c18130c91d9efb1f677 (diff) | |
download | android_packages_apps_Trebuchet-1d0b093a6e384f5ade340c2b404b324bb6002c97.tar.gz android_packages_apps_Trebuchet-1d0b093a6e384f5ade340c2b404b324bb6002c97.tar.bz2 android_packages_apps_Trebuchet-1d0b093a6e384f5ade340c2b404b324bb6002c97.zip |
Adding BaseActivity which can be overriden for custom behavior
Change-Id: I6707aa99f5d33dceede226a6367e24482f5157f6
Diffstat (limited to 'WallpaperPicker/src/com/android/launcher3/base')
-rw-r--r-- | WallpaperPicker/src/com/android/launcher3/base/BaseActivity.java | 21 |
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; + } +} |