OSDN Git Service

Fixed crop intent.
authorRuben Brunk <rubenbrunk@google.com>
Thu, 25 Oct 2012 22:53:42 +0000 (15:53 -0700)
committerRuben Brunk <rubenbrunk@google.com>
Thu, 25 Oct 2012 23:24:49 +0000 (16:24 -0700)
Bug: 7415140
Bug: 7403813
Change-Id: I545162544f845d210d21185cddaca09b219fb091

AndroidManifest.xml
res/values/filtershow_strings.xml
src/com/android/gallery3d/filtershow/FilterShowActivity.java
src/com/android/gallery3d/ui/MenuExecutor.java

index 2d8ade7..b147aa1 100644 (file)
                 <data android:mimeType="image/*" />
             </intent-filter>
             <intent-filter android:label="@string/crop_label">
-                <action android:name="com.android.camera.action.CROP" />
+                <action android:name="com.android.camera.action.EDITOR_CROP" />
+                <data android:scheme="http" />
+                <data android:scheme="https" />
+                <data android:scheme="content" />
+                <data android:scheme="file" />
+                <data android:scheme="" />
                 <data android:mimeType="image/*" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <category android:name="android.intent.category.ALTERNATIVE" />
index b04413c..9153b6b 100644 (file)
 
 <resources>
 
-    <!--  Name for the image editor activity [CHAR LIMIT=NONE]-->
-    <string name="app_name">FilterShow</string>
     <!--  Title for the image editor activity [CHAR LIMIT=NONE]-->
-    <string name="title_activity_filter_show">FilterShowActivity</string>
+    <string name="title_activity_filter_show">Photo Editor</string>
 
     <!--  String shown when we cannot load the image when starting the activity [CHAR LIMIT=NONE] -->
     <string name="cannot_load_image">Cannot load the image!</string>
index 0a6bb2d..55a0103 100644 (file)
@@ -97,7 +97,7 @@ import java.util.Vector;
 public class FilterShowActivity extends Activity implements OnItemClickListener,
         OnShareTargetSelectedListener {
 
-    public static final String CROP_ACTION = "com.android.camera.action.CROP";
+    public static final String CROP_ACTION = "com.android.camera.action.EDITOR_CROP";
     public static final String TINY_PLANET_ACTION = "com.android.camera.action.TINY_PLANET";
     public static final String LAUNCH_FULLSCREEN = "launch-fullscreen";
     private final PanelController mPanelController = new PanelController();
index 5023828..f432333 100644 (file)
@@ -37,6 +37,7 @@ import com.android.gallery3d.data.DataManager;
 import com.android.gallery3d.data.MediaItem;
 import com.android.gallery3d.data.MediaObject;
 import com.android.gallery3d.data.Path;
+import com.android.gallery3d.filtershow.FilterShowActivity;
 import com.android.gallery3d.util.Future;
 import com.android.gallery3d.util.GalleryUtils;
 import com.android.gallery3d.util.ThreadPool.Job;
@@ -226,7 +227,8 @@ public class MenuExecutor {
                 }
                 return;
             case R.id.action_crop: {
-                Intent intent = getIntentBySingleSelectedPath(CropImage.ACTION_CROP);
+                Intent intent = getIntentBySingleSelectedPath(FilterShowActivity.CROP_ACTION)
+                        .setClass((Activity) mActivity, FilterShowActivity.class);
                 ((Activity) mActivity).startActivity(intent);
                 return;
             }