aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2013-04-30 09:31:20 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-04-30 09:31:20 +0000
commit1187ef9a9747ff2ed71101156f3f560eaa32772c (patch)
tree8ba32a088d2cc60a57fe68b7ca5bf0b3483aec33 /java/src
parent37bbaea8a15038406214fa8c9098cfcf4b2e2d9b (diff)
parentad46c9e0e08da6072c5342eb8ff361b5369c7174 (diff)
downloadlatinime-1187ef9a9747ff2ed71101156f3f560eaa32772c.tar.gz
latinime-1187ef9a9747ff2ed71101156f3f560eaa32772c.tar.xz
latinime-1187ef9a9747ff2ed71101156f3f560eaa32772c.zip
Merge "Catch error while playing welcome video"
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/setup/SetupActivity.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/setup/SetupActivity.java b/java/src/com/android/inputmethod/latin/setup/SetupActivity.java
index 651fea6ab..044180bd6 100644
--- a/java/src/com/android/inputmethod/latin/setup/SetupActivity.java
+++ b/java/src/com/android/inputmethod/latin/setup/SetupActivity.java
@@ -26,6 +26,7 @@ import android.net.Uri;
import android.os.Bundle;
import android.os.Message;
import android.provider.Settings;
+import android.util.Log;
import android.view.View;
import android.view.inputmethod.InputMethodInfo;
import android.view.inputmethod.InputMethodManager;
@@ -44,6 +45,8 @@ import java.util.ArrayList;
// TODO: Use Fragment to implement welcome screen and setup steps.
public final class SetupActivity extends Activity implements View.OnClickListener {
+ private static final String TAG = SetupActivity.class.getSimpleName();
+
private View mWelcomeScreen;
private View mSetupScreen;
private Uri mWelcomeVideoUri;
@@ -198,6 +201,14 @@ public final class SetupActivity extends Activity implements View.OnClickListene
mWelcomeVideoView.setBackgroundResource(0);
}
});
+ mWelcomeVideoView.setOnErrorListener(new MediaPlayer.OnErrorListener() {
+ @Override
+ public boolean onError(final MediaPlayer mp, final int what, final int extra) {
+ Log.e(TAG, "Playing welcome video causes error: what=" + what + " extra=" + extra);
+ mWelcomeVideoView.setVisibility(View.GONE);
+ return true;
+ }
+ });
mActionStart = findViewById(R.id.setup_start_label);
mActionStart.setOnClickListener(this);