Running state animations if launcher is visible

Change-Id: Ibc522edec4f86375ea75ac645b748fec43fceb31
diff --git a/src/com/android/launcher3/BaseActivity.java b/src/com/android/launcher3/BaseActivity.java
index e496495..a54c21c 100644
--- a/src/com/android/launcher3/BaseActivity.java
+++ b/src/com/android/launcher3/BaseActivity.java
@@ -31,6 +31,8 @@
     protected UserEventDispatcher mUserEventDispatcher;
     protected SystemUiController mSystemUiController;
 
+    private boolean mStarted;
+
     public DeviceProfile getDeviceProfile() {
         return mDeviceProfile;
     }
@@ -69,4 +71,20 @@
     public void onActivityResult(int requestCode, int resultCode, Intent data) {
         super.onActivityResult(requestCode, resultCode, data);
     }
+
+    @Override
+    protected void onStart() {
+        mStarted = true;
+        super.onStart();
+    }
+
+    @Override
+    protected void onStop() {
+        mStarted = false;
+        super.onStop();
+    }
+
+    public boolean isStarted() {
+        return mStarted;
+    }
 }