OSDN Git Service

Add method to determine if first run activity has been shown (issue 13680732)
authorAdam Cohen <adamcohen@google.com>
Fri, 28 Mar 2014 21:22:31 +0000 (14:22 -0700)
committerAdam Cohen <adamcohen@google.com>
Fri, 28 Mar 2014 21:51:17 +0000 (14:51 -0700)
Change-Id: Ia0da4148fd0365c6ae9c3a5a4cff7118959f6382

src/com/android/launcher3/Launcher.java

index 9456e66..2ad7667 100644 (file)
@@ -4454,6 +4454,10 @@ public class Launcher extends Activity
                 !mSharedPrefs.getBoolean(FIRST_RUN_ACTIVITY_DISPLAYED, false);
     }
 
+    protected boolean hasRunFirstRunActivity() {
+        return mSharedPrefs.getBoolean(FIRST_RUN_ACTIVITY_DISPLAYED, false);
+    }
+
     public boolean showFirstRunActivity() {
         if (shouldRunFirstRunActivity() &&
                 hasFirstRunActivity()) {
@@ -4542,7 +4546,6 @@ public class Launcher extends Activity
         if (mSearchDropTargetBar != null) mSearchDropTargetBar.hideSearchBar(false);
     }
 
-
     public ItemInfo createAppDragInfo(Intent appLaunchIntent) {
         ResolveInfo ri = getPackageManager().resolveActivity(appLaunchIntent, 0);
         if (ri == null) {