Loading Android.mk +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ LOCAL_PACKAGE_NAME := Gallery2 LOCAL_OVERRIDES_PACKAGES := Gallery Gallery3D GalleryNew3D LOCAL_SDK_VERSION := current #LOCAL_SDK_VERSION := current LOCAL_JNI_SHARED_LIBRARIES := libjni_eglfence libjni_filtershow_filters librsjni libjni_jpegstream Loading proguard.flags +4 −0 Original line number Diff line number Diff line # Disable the warnings of using dynamic method call in common library. -dontnote com.android.gallery3d.common.* #Avoid the library class dependency error -dontwarn android.view.inputmethod.InputMethodManager -dontwarn android.content.res.Resources # Keep all classes extended from com.android.gallery3d.common.Entry # Since we annotate on the fields and use reflection to create SQL # according to those field. Loading res/values/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1121,4 +1121,5 @@ CHAR LIMIT = NONE] --> <!-- The tips of trimming video --> <string name="fail_trim">Sorry, this video file can not be trimmed</string> <string name="can_not_trim">Only mp4 and 3gp file can be trimmed</string> </resources> src/com/android/gallery3d/app/PhotoPage.java +10 −2 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.content.Intent; import android.content.pm.PackageManager; import android.content.res.Configuration; import android.graphics.Rect; import android.media.MediaFile; import android.net.Uri; import android.nfc.NfcAdapter; import android.nfc.NfcAdapter.CreateBeamUrisCallback; Loading Loading @@ -1057,8 +1058,15 @@ public abstract class PhotoPage extends ActivityState implements Intent intent = new Intent(mActivity, TrimVideo.class); intent.setData(manager.getContentUri(path)); // We need the file path to wrap this into a RandomAccessFile. String str = android.media.MediaFile.getMimeTypeForFile(current.getFilePath()); if("video/mp4".equals(str) || "video/mpeg4".equals(str) || "video/3gpp".equals(str) || "video/3gpp2".equals(str)) { intent.putExtra(KEY_MEDIA_ITEM_PATH, current.getFilePath()); mActivity.startActivityForResult(intent, REQUEST_TRIM); } else { Toast.makeText(mActivity,mActivity.getString(R.string.can_not_trim), Toast.LENGTH_SHORT).show(); } return true; } case R.id.action_mute: { Loading Loading
Android.mk +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ LOCAL_PACKAGE_NAME := Gallery2 LOCAL_OVERRIDES_PACKAGES := Gallery Gallery3D GalleryNew3D LOCAL_SDK_VERSION := current #LOCAL_SDK_VERSION := current LOCAL_JNI_SHARED_LIBRARIES := libjni_eglfence libjni_filtershow_filters librsjni libjni_jpegstream Loading
proguard.flags +4 −0 Original line number Diff line number Diff line # Disable the warnings of using dynamic method call in common library. -dontnote com.android.gallery3d.common.* #Avoid the library class dependency error -dontwarn android.view.inputmethod.InputMethodManager -dontwarn android.content.res.Resources # Keep all classes extended from com.android.gallery3d.common.Entry # Since we annotate on the fields and use reflection to create SQL # according to those field. Loading
res/values/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1121,4 +1121,5 @@ CHAR LIMIT = NONE] --> <!-- The tips of trimming video --> <string name="fail_trim">Sorry, this video file can not be trimmed</string> <string name="can_not_trim">Only mp4 and 3gp file can be trimmed</string> </resources>
src/com/android/gallery3d/app/PhotoPage.java +10 −2 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.content.Intent; import android.content.pm.PackageManager; import android.content.res.Configuration; import android.graphics.Rect; import android.media.MediaFile; import android.net.Uri; import android.nfc.NfcAdapter; import android.nfc.NfcAdapter.CreateBeamUrisCallback; Loading Loading @@ -1057,8 +1058,15 @@ public abstract class PhotoPage extends ActivityState implements Intent intent = new Intent(mActivity, TrimVideo.class); intent.setData(manager.getContentUri(path)); // We need the file path to wrap this into a RandomAccessFile. String str = android.media.MediaFile.getMimeTypeForFile(current.getFilePath()); if("video/mp4".equals(str) || "video/mpeg4".equals(str) || "video/3gpp".equals(str) || "video/3gpp2".equals(str)) { intent.putExtra(KEY_MEDIA_ITEM_PATH, current.getFilePath()); mActivity.startActivityForResult(intent, REQUEST_TRIM); } else { Toast.makeText(mActivity,mActivity.getString(R.string.can_not_trim), Toast.LENGTH_SHORT).show(); } return true; } case R.id.action_mute: { Loading