summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSetup Wizard Team <android-setup-team-eng@google.com>2020-06-02 06:51:58 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-06-02 06:51:58 +0000
commitfb30ac4fd54225f91107a685d32a35e01d17eb9e (patch)
tree60216556afa202c1d2f35d05e500d74fdc3bfb5a
parente56df50248640174d7b80965903e93861c6d2ec8 (diff)
parentd4a805c41648d6d60df2c56eba1171c25e9143b1 (diff)
downloadsetupdesign-android11-mainline-networkstack-release.tar.gz
Original change: undetermined Change-Id: Id0bfae25853d780096aec1de46564c0b8d876650
-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;