Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LatinIME
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
keyboard
LatinIME
Commits
ad46c9e0
Commit
ad46c9e0
authored
11 years ago
by
Tadashi G. Takaoka
Browse files
Options
Downloads
Patches
Plain Diff
Catch error while playing welcome video
Bug: 8159728 Change-Id: Ic8eea7993f12395d6eca6db8d5529803251a9fee
parent
71c1e50f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
java/res/layout/setup_welcome_video.xml
+3
-3
3 additions, 3 deletions
java/res/layout/setup_welcome_video.xml
java/src/com/android/inputmethod/latin/setup/SetupActivity.java
+11
-0
11 additions, 0 deletions
...rc/com/android/inputmethod/latin/setup/SetupActivity.java
with
14 additions
and
3 deletions
java/res/layout/setup_welcome_video.xml
+
3
−
3
View file @
ad46c9e0
...
@@ -22,7 +22,9 @@
...
@@ -22,7 +22,9 @@
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
android:paddingTop=
"@dimen/setup_welcome_video_vertical_margin"
android:paddingBottom=
"@dimen/setup_welcome_video_vertical_margin"
>
<View
<View
android:layout_weight=
"@integer/setup_welcome_video_left_padding_weight_in_screen"
android:layout_weight=
"@integer/setup_welcome_video_left_padding_weight_in_screen"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
...
@@ -31,8 +33,6 @@
...
@@ -31,8 +33,6 @@
android:id=
"@+id/setup_welcome_video"
android:id=
"@+id/setup_welcome_video"
android:background=
"@color/setup_background"
android:background=
"@color/setup_background"
android:layout_weight=
"@integer/setup_welcome_video_weight_in_screen"
android:layout_weight=
"@integer/setup_welcome_video_weight_in_screen"
android:layout_marginTop=
"@dimen/setup_welcome_video_vertical_margin"
android:layout_marginBottom=
"@dimen/setup_welcome_video_vertical_margin"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
/>
android:layout_height=
"wrap_content"
/>
<View
<View
...
...
This diff is collapsed.
Click to expand it.
java/src/com/android/inputmethod/latin/setup/SetupActivity.java
+
11
−
0
View file @
ad46c9e0
...
@@ -26,6 +26,7 @@ import android.net.Uri;
...
@@ -26,6 +26,7 @@ import android.net.Uri;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.os.Message
;
import
android.os.Message
;
import
android.provider.Settings
;
import
android.provider.Settings
;
import
android.util.Log
;
import
android.view.View
;
import
android.view.View
;
import
android.view.inputmethod.InputMethodInfo
;
import
android.view.inputmethod.InputMethodInfo
;
import
android.view.inputmethod.InputMethodManager
;
import
android.view.inputmethod.InputMethodManager
;
...
@@ -44,6 +45,8 @@ import java.util.ArrayList;
...
@@ -44,6 +45,8 @@ import java.util.ArrayList;
// TODO: Use Fragment to implement welcome screen and setup steps.
// TODO: Use Fragment to implement welcome screen and setup steps.
public
final
class
SetupActivity
extends
Activity
implements
View
.
OnClickListener
{
public
final
class
SetupActivity
extends
Activity
implements
View
.
OnClickListener
{
private
static
final
String
TAG
=
SetupActivity
.
class
.
getSimpleName
();
private
View
mWelcomeScreen
;
private
View
mWelcomeScreen
;
private
View
mSetupScreen
;
private
View
mSetupScreen
;
private
Uri
mWelcomeVideoUri
;
private
Uri
mWelcomeVideoUri
;
...
@@ -198,6 +201,14 @@ public final class SetupActivity extends Activity implements View.OnClickListene
...
@@ -198,6 +201,14 @@ public final class SetupActivity extends Activity implements View.OnClickListene
mWelcomeVideoView
.
setBackgroundResource
(
0
);
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
=
findViewById
(
R
.
id
.
setup_start_label
);
mActionStart
.
setOnClickListener
(
this
);
mActionStart
.
setOnClickListener
(
this
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment