diff options
author | Tom Taylor <tomtaylor@google.com> | 2013-10-07 17:49:02 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-10-07 17:49:02 +0000 |
commit | 17c2d22085da5cf5284ccf7aab2df1bdacb70770 (patch) | |
tree | 9baaf763feda92b5d4234c815303e79d1078d9c3 | |
parent | 68d812972070fa0c116a794343a839affe241eaa (diff) | |
parent | 612ec565b9b76446bd3af6c074f7180d97fa9d7c (diff) | |
download | Mms-17c2d22085da5cf5284ccf7aab2df1bdacb70770.tar.gz |
Merge "Messaging app crashed after playing a slide show" into klp-dev
-rw-r--r-- | src/com/android/mms/ui/SlideshowActivity.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/com/android/mms/ui/SlideshowActivity.java b/src/com/android/mms/ui/SlideshowActivity.java index 1fb62473..a2874247 100644 --- a/src/com/android/mms/ui/SlideshowActivity.java +++ b/src/com/android/mms/ui/SlideshowActivity.java @@ -285,11 +285,13 @@ public class SlideshowActivity extends Activity implements EventListener { mSmilPlayer.stopWhenReload(); } if (mMediaController != null) { - // Must set the seek bar change listener null,otherwise if we rotate it - // during tap progress bar continuously,window will leak - SeekBar seeker = (SeekBar) mMediaController + // Must set the seek bar change listener null, otherwise if we rotate it + // while tapping progress bar continuously, window will leak. + View seekBar = mMediaController .findViewById(com.android.internal.R.id.mediacontroller_progress); - seeker.setOnSeekBarChangeListener(null); + if (seekBar instanceof SeekBar) { + ((SeekBar)seekBar).setOnSeekBarChangeListener(null); + } // Must do this so we don't leak a window. mMediaController.hide(); } |