OSDN Git Service

Fix issues with how the gestures pad was hidden when leaving Home.
authorRomain Guy <romainguy@android.com>
Wed, 10 Jun 2009 09:48:37 +0000 (02:48 -0700)
committerRomain Guy <romainguy@android.com>
Wed, 10 Jun 2009 09:48:37 +0000 (02:48 -0700)
res/layout/gestures.xml
src/com/android/launcher/Launcher.java

index d2beaa8..846c063 100644 (file)
@@ -46,7 +46,7 @@
             android:shadowColor="#FF000000"
             android:shadowRadius="2.0"
 
-            android:drawablePadding="6dip"
+            android:drawablePadding="8dip"
             android:textAppearance="?android:attr/textAppearanceLarge"
             android:ellipsize="end"
             android:maxLines="2"
@@ -62,7 +62,7 @@
             android:shadowColor="#FF000000"
             android:shadowRadius="2.0"
 
-            android:drawablePadding="6dip"
+            android:drawablePadding="8dip"
             android:textAppearance="?android:attr/textAppearanceLarge"
             android:ellipsize="end"
             android:maxLines="2"
index 0c54382..51b720b 100644 (file)
@@ -230,6 +230,7 @@ public final class Launcher extends Activity implements View.OnClickListener, On
     private Launcher.GesturesProcessor mGesturesProcessor;
     private Gesture mCurrentGesture;
     private GesturesAction mGesturesAction;
+    private boolean mHideGesturesPanel;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -337,6 +338,8 @@ public final class Launcher extends Activity implements View.OnClickListener, On
 
     @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        mWaitingForResult = false;
+
         // The pattern used here is that a user PICKs a specific application,
         // which, depending on the target, might need to CREATE the actual target.
 
@@ -389,7 +392,6 @@ public final class Launcher extends Activity implements View.OnClickListener, On
                 mAppWidgetHost.deleteAppWidgetId(appWidgetId);
             }
         }
-        mWaitingForResult = false;
     }
 
     @Override
@@ -417,7 +419,10 @@ public final class Launcher extends Activity implements View.OnClickListener, On
     @Override
     protected void onStop() {
         super.onStop();
-        hideGesturesPanel();
+        if (mHideGesturesPanel) {
+            mHideGesturesPanel = false;
+            hideGesturesPanel();
+        }
     }
 
     @Override
@@ -1689,6 +1694,7 @@ public final class Launcher extends Activity implements View.OnClickListener, On
     }
 
     void startActivitySafely(Intent intent) {
+        mHideGesturesPanel = true;
         intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
         try {
             startActivity(intent);