summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-06-03 07:06:04 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-06-03 07:06:04 +0000
commit2efad9b15cf67ca6a77e1ef8c741aebdc9f9ee3c (patch)
tree60216556afa202c1d2f35d05e500d74fdc3bfb5a
parenta366838d383fe52fcfaae2ea64001d9065ecefd9 (diff)
parentfb30ac4fd54225f91107a685d32a35e01d17eb9e (diff)
downloadsetupdesign-2efad9b15cf67ca6a77e1ef8c741aebdc9f9ee3c.tar.gz
Change-Id: I9120c733b3cc54fb0705b7e0af0956bfd1bddf65
-rw-r--r--main/src/com/google/android/setupdesign/template/ListMixin.java20
-rw-r--r--main/src/com/google/android/setupdesign/view/IllustrationVideoView.java12
2 files changed, 23 insertions, 9 deletions
diff --git a/main/src/com/google/android/setupdesign/template/ListMixin.java b/main/src/com/google/android/setupdesign/template/ListMixin.java
index 6e2cb20..38928aa 100644
--- a/main/src/com/google/android/setupdesign/template/ListMixin.java
+++ b/main/src/com/google/android/setupdesign/template/ListMixin.java
@@ -187,15 +187,17 @@ public class ListMixin implements Mixin {
if (defaultDivider == null) {
defaultDivider = listView.getDivider();
}
- divider =
- DrawableLayoutDirectionHelper.createRelativeInsetDrawable(
- defaultDivider,
- dividerInsetStart /* start */,
- 0 /* top */,
- dividerInsetEnd /* end */,
- 0 /* bottom */,
- templateLayout);
- listView.setDivider(divider);
+ if (defaultDivider != null) {
+ divider =
+ DrawableLayoutDirectionHelper.createRelativeInsetDrawable(
+ defaultDivider,
+ dividerInsetStart /* start */,
+ 0 /* top */,
+ dividerInsetEnd /* end */,
+ 0 /* bottom */,
+ templateLayout);
+ listView.setDivider(divider);
+ }
}
}
diff --git a/main/src/com/google/android/setupdesign/view/IllustrationVideoView.java b/main/src/com/google/android/setupdesign/view/IllustrationVideoView.java
index 0654b02..2e4fd71 100644
--- a/main/src/com/google/android/setupdesign/view/IllustrationVideoView.java
+++ b/main/src/com/google/android/setupdesign/view/IllustrationVideoView.java
@@ -368,6 +368,18 @@ public class IllustrationVideoView extends TextureView
return false;
}
+ /**
+ * Seeks to specified time position.
+ *
+ * @param milliseconds the offset in milliseconds from the start to seek to
+ * @throws IllegalStateException if the internal player engine has not been initialized
+ */
+ public void seekTo(int milliseconds) {
+ if (mediaPlayer != null) {
+ mediaPlayer.seekTo(milliseconds);
+ }
+ }
+
@VisibleForTesting(otherwise = VisibleForTesting.PROTECTED)
public MediaPlayer getMediaPlayer() {
return mediaPlayer;