diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2012-11-13 10:39:38 -0800 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2012-11-16 10:09:27 -0800 |
commit | 56f214d21ea696e8b5d721b64fa4958ab1bf6686 (patch) | |
tree | 750fcf7b8b26321152a2645bcfcf733c494639c5 /src/com/android/gallery3d/app/TrimVideo.java | |
parent | 99996e3b7d581a25d12cad8c00740221f2e1d922 (diff) | |
download | android_packages_apps_Snap-56f214d21ea696e8b5d721b64fa4958ab1bf6686.tar.gz android_packages_apps_Snap-56f214d21ea696e8b5d721b64fa4958ab1bf6686.tar.bz2 android_packages_apps_Snap-56f214d21ea696e8b5d721b64fa4958ab1bf6686.zip |
Video: Fix crash in trimming/muting video in GB.
Basically switched to use sherlock actionbar and protect various new methods
with API level check.
bug:7546257
Change-Id: Ic16f75126c619578a9e9c2520fa264687d89a2e6
Diffstat (limited to 'src/com/android/gallery3d/app/TrimVideo.java')
-rw-r--r-- | src/com/android/gallery3d/app/TrimVideo.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/gallery3d/app/TrimVideo.java b/src/com/android/gallery3d/app/TrimVideo.java index 9187ee80c..7a76be5dc 100644 --- a/src/com/android/gallery3d/app/TrimVideo.java +++ b/src/com/android/gallery3d/app/TrimVideo.java @@ -16,8 +16,6 @@ package com.android.gallery3d.app; -import android.app.ActionBar; -import android.app.Activity; import android.app.ProgressDialog; import android.content.ContentResolver; import android.content.ContentValues; @@ -39,6 +37,8 @@ import android.widget.TextView; import android.widget.Toast; import android.widget.VideoView; +import com.actionbarsherlock.app.ActionBar; +import com.actionbarsherlock.app.SherlockActivity; import com.android.gallery3d.R; import com.android.gallery3d.util.BucketNames; import com.android.gallery3d.util.SaveVideoFileInfo; @@ -49,7 +49,7 @@ import java.io.IOException; import java.sql.Date; import java.text.SimpleDateFormat; -public class TrimVideo extends Activity implements +public class TrimVideo extends SherlockActivity implements MediaPlayer.OnErrorListener, MediaPlayer.OnCompletionListener, ControllerOverlay.Listener { @@ -84,7 +84,7 @@ public class TrimVideo extends Activity implements requestWindowFeature(Window.FEATURE_ACTION_BAR); requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY); - ActionBar actionBar = getActionBar(); + ActionBar actionBar = getSupportActionBar(); int displayOptions = ActionBar.DISPLAY_SHOW_HOME; actionBar.setDisplayOptions(0, displayOptions); displayOptions = ActionBar.DISPLAY_SHOW_CUSTOM; @@ -268,7 +268,7 @@ public class TrimVideo extends Activity implements mProgress = null; // Show the result only when the activity not stopped. Intent intent = new Intent(android.content.Intent.ACTION_VIEW); - intent.setDataAndTypeAndNormalize(Uri.fromFile(mDstFileInfo.mFile), "video/*"); + intent.setDataAndType(Uri.fromFile(mDstFileInfo.mFile), "video/*"); intent.putExtra(MediaStore.EXTRA_FINISH_ON_COMPLETION, false); startActivity(intent); finish(); |