* Unify VideoControl chrome with in-page fullscreen layout. Left-align the top action row with WebVideoFull, keep crop at the end so shared icons stay put, and show zoom/settings/touch-lock/brightness/volume for YouTube embeds while still hiding download and the Soul seek bar. Co-authored-by: Cursor <cursoragent@cursor.com> * Fix VideoControl title/back row and add Show Soul icons. Put the title on its own left-aligned row with Back and the action icons sharing the row beneath it, restore Rotate alignment for HTML/YouTube player modes, and add the Show Soul icons control at the bottom-left with Audio track to its right. Co-authored-by: Cursor <cursoragent@cursor.com> * Fix Rotate field binding and put Back in the icon row. The crop reorder had reused the register that later became VideoControl.I, so Rotate pointed at Crop (blank first slot / missing on YouTube). Save Rotate immediately, place Back as the first child of the top icon row, and left-align the title with that row. Co-authored-by: Cursor <cursoragent@cursor.com> * Fix Show Soul icons crash and nudge HTML PiP title. VideoControl$29 could not call private setIconShow (IllegalAccessError); expose it and restore a small 12dp title inset so the label is not flush left of Back. Co-authored-by: Cursor <cursoragent@cursor.com> * Fix SettingVideoSub VerifyError on subtitle settings open. G0 passed VideoSubLayout2 to UiTextSize.setSp; call VideoSubLayout2.setTextSize instead so the class verifies and launches. Co-authored-by: Cursor <cursoragent@cursor.com> * Hide Show Soul icons on Touch lock and Download when Soul icons off. Match WebVideoFull: Touch lock hides w0; setIconShow/setIconDown gate the Download button on PrefPdf.u. Co-authored-by: Cursor <cursoragent@cursor.com> * Align VideoControl bottom-left controls with YouTube fullscreen spacing. Use 0 bottom margin on the play/Show Soul/Audio row and 52dp on the Brightness/volume row so PiP matches non-PiP YouTube tap positions. Co-authored-by: Cursor <cursoragent@cursor.com> * Anchor Brightness/Show Soul/Audio to YT-style 80dp bottom align. Seekbar-relative margins barely moved them; match WebVideoFull wv_align_2. Co-authored-by: Cursor <cursoragent@cursor.com> * Fix VideoControl VerifyError from clobbering title register. Align-id temps reused v14 while it still held the AppCompatTextView. Co-authored-by: Cursor <cursoragent@cursor.com> * Fix PiP align spacer and top-bar offsets vs YouTube fullscreen. GONE collapsed the 64dp align height; icon row used BELOW+E1 instead of g1. Co-authored-by: Cursor <cursoragent@cursor.com> * Put VideoControl play/rew/ff on the same align row as Show Soul. Play was still anchored to the seekbar while Brightness/Show Soul used the YouTube-style align, so PiP transport sat too low. Emulator dumpsys now matches WebVideoFull pixel-for-pixel for align/play/show/brightness/volume. Co-authored-by: Cursor <cursoragent@cursor.com> * Keep HTML fullscreen align_2 spacer visible like YouTube/PiP. wv_align_2 only got its 64dp height when T==2 (YouTube), so Show Soul and Brightness sat on a collapsed align in plain HTML fullscreen. Co-authored-by: Cursor <cursoragent@cursor.com> * Raise volume/subtitles/download to the HTML PiP control row. Anchor those buttons to align_2 with a 52dp bottom margin in WebVideoFull and VideoControl so every fullscreen context matches HTML PiP height. Co-authored-by: Cursor <cursoragent@cursor.com> * Put download/subtitles back under volume in reversed order. Keep volume on the raised PiP row; stack download under it and subtitles to its left. Use INVISIBLE for a hidden download so the LEFT_OF chain holds. Co-authored-by: Cursor <cursoragent@cursor.com> * Anchor non-PiP download to align_2 like VideoControl/PiP. HTML FS left download on align_1 whose spacer stays GONE, so it sat lower than the PiP under-volume row; use the visible align_2 spacer. Co-authored-by: Cursor <cursoragent@cursor.com> * Put HTML/YouTube play/rew/ff on the align_2 Show Soul row. Match VideoControl: align_1 height still changes with l0(), which pulled playback controls off the shared chrome row in some HTML/fullscreen modes. Co-authored-by: Cursor <cursoragent@cursor.com> * Show HTML FS play/rew/ff and move VC subtitles below download. HTML fullscreen never set V, so Soul transport stayed GONE; show it for non-YouTube. Subtitles LEFT_OF download overlapped FF in VideoControl. Co-authored-by: Cursor <cursoragent@cursor.com> * Keep the 64dp video-align spacer in landscape too. Landscape used to swap in a 12dp spacer, which dropped non-PiP HTML play/rew/ff below the PiP/Show Soul row. Co-authored-by: Cursor <cursoragent@cursor.com> * Pin HTML and PiP play/rew/ff to the same bottom margin. ABOVE-align still tracked spacer height, so landscape non-PiP transport could sit a row lower than PiP. Both now use ALIGN_PARENT_BOTTOM at 144dp (80+64). Co-authored-by: Cursor <cursoragent@cursor.com> * Lower PiP play/rew/ff to the non-PiP transport row. Use 92dp (80+12) from the bottom in both UIs so PiP matches non-PiP instead of raising non-PiP to the Show Soul row. Co-authored-by: Cursor <cursoragent@cursor.com> * Put PiP subtitles left of download again. Play/rew/ff sit on the lower row, so LEFT_OF no longer overlaps fast-forward. Co-authored-by: Cursor <cursoragent@cursor.com> * Drop intermediate video-control layout leftovers. Revert unused l0 always-64dp (nothing ABOVE-anchors align_1 anymore), remove redundant P visibility in setIconShow, and clear no-op bottomMargin=0 / stale share-row comments. Co-authored-by: Cursor <cursoragent@cursor.com> * Add Controls timeout to video settings for HTML, YouTube, and PiP. Let users pick the chrome auto-hide delay (3 seconds by default) or disable fade-out, matching the PDF controls-timeout pattern. Co-authored-by: Cursor <cursoragent@cursor.com> * Fix video controls timeout stuck off before prefs load. PrefVideo.H defaulted to 0, so applyControlTimeout disabled auto-hide during construction. Default to 3s, set show time before enabling, and re-arm the fade timer. Co-authored-by: Cursor <cursoragent@cursor.com> * Fix applyControlTimeout null check so auto-hide actually arms. if-nez returned early for every non-null fade view, so the Controls timeout pref never took effect. Co-authored-by: Cursor <cursoragent@cursor.com> * Re-apply controls timeout when returning to PiP video player. VideoActivity skipped the resume path WebVideoFull uses after SettingVideo, so PiP kept the old delay until restart. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
84 lines
2.4 KiB
Java
84 lines
2.4 KiB
Java
package com.mycompany.app.pref;
|
|
|
|
import android.content.Context;
|
|
import android.text.TextUtils;
|
|
import com.mycompany.app.main.MainApp;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public class PrefVideo extends PrefCore {
|
|
public static int A;
|
|
public static int B;
|
|
public static int C;
|
|
public static int D;
|
|
public static int E;
|
|
public static int F;
|
|
public static int G;
|
|
/** Seconds; 0 = disabled. Default 3 so apply before prefs load still auto-hides. */
|
|
public static int H = 3;
|
|
public static String i;
|
|
public static boolean j;
|
|
public static boolean k;
|
|
public static boolean l;
|
|
public static boolean m;
|
|
public static boolean n;
|
|
public static int o;
|
|
public static boolean p;
|
|
public static boolean q;
|
|
public static boolean r;
|
|
public static boolean s;
|
|
public static int t;
|
|
public static boolean u;
|
|
public static int v;
|
|
public static int w;
|
|
public static boolean x;
|
|
public static boolean y;
|
|
public static boolean z;
|
|
|
|
public PrefVideo(Context context) {
|
|
super(context, "PrefVideo");
|
|
}
|
|
|
|
public static PrefVideo r(Context context) {
|
|
MainApp p2 = MainApp.p(context);
|
|
if (p2 == null) {
|
|
return new PrefVideo(null);
|
|
}
|
|
boolean isEmpty = TextUtils.isEmpty(i);
|
|
PrefVideo prefVideo = p2.Z;
|
|
if (prefVideo == null) {
|
|
synchronized (PrefVideo.class) {
|
|
try {
|
|
if (p2.Z == null) {
|
|
p2.Z = new PrefVideo(context);
|
|
isEmpty = false;
|
|
}
|
|
} finally {
|
|
}
|
|
}
|
|
} else if (TextUtils.isEmpty(prefVideo.d)) {
|
|
synchronized (PrefVideo.class) {
|
|
p2.Z.i(context, "PrefVideo");
|
|
}
|
|
isEmpty = false;
|
|
}
|
|
if (isEmpty || p2.Z.j()) {
|
|
p2.Z.k();
|
|
}
|
|
return p2.Z;
|
|
}
|
|
|
|
public static void applyControlTimeout(com.mycompany.app.view.MyFadeRelative fade) {
|
|
// Smali must use if-eqz for null (if-nez inverted and skipped all work).
|
|
if (fade == null) {
|
|
return;
|
|
}
|
|
int seconds = H;
|
|
if (seconds <= 0) {
|
|
fade.setAutoHide(false);
|
|
return;
|
|
}
|
|
fade.setShowTime(seconds * 1000);
|
|
fade.setAutoHide(true);
|
|
// setAutoHide no-ops when already enabled; re-arm with the updated delay.
|
|
fade.h();
|
|
}
|