From 78b54a0780061da22be9e5cb1ff80d8d26bc5cdd Mon Sep 17 00:00:00 2001 From: "xin.li" Date: Sun, 29 Jan 2023 18:15:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=AD=BE=E5=90=8D=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 31 +++++++++++++++--- .../tvbox/osc/ui/activity/HomeActivity.java | 28 +++------------- .../github/tvbox/osc/ui/dialog/ApiDialog.java | 1 - hello_android.jks | Bin 0 -> 2683 bytes 4 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 hello_android.jks diff --git a/app/build.gradle b/app/build.gradle index 8588428..080cf70 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -27,7 +27,14 @@ android { packagingOptions { exclude 'META-INF/DEPENDENCIES' } - + signingConfigs { + sign { + storeFile file("../hello_android.jks") + storePassword('android') + keyAlias('android') + keyPassword('android') + } + } buildTypes { debug { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' @@ -36,6 +43,7 @@ android { ndk { abiFilters 'armeabi-v7a' } + signingConfig signingConfigs.sign } release { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' @@ -44,6 +52,7 @@ android { ndk { abiFilters 'armeabi-v7a' } + signingConfig signingConfigs.sign } } @@ -70,7 +79,22 @@ android { // universalApk true //generate an additional APK that contains all the ABIs // } // } - + applicationVariants.all { variant -> + def buildType = variant.buildType.name + def prefix = "TVBOX" + if (buildType == "release") { + variant.outputs.each { + def fromFile = it.outputFile + def intoFile = "D:/test/${prefix}/" + copy { + from fromFile + into intoFile + include('*release.apk') + rename('app-', "tvbox_v${android.defaultConfig.versionName}_") + } + } + } + } } dependencies { @@ -113,8 +137,7 @@ dependencies { } implementation 'com.lzy.net:okgo:3.0.4' implementation 'com.owen:tv-recyclerview:3.0.0' - - implementation 'com.github.getActivity:XXPermissions:13.6' + implementation 'com.github.getActivity:XXPermissions:16.2' implementation 'org.jsoup:jsoup:1.14.1' implementation 'com.github.hedzr:android-file-chooser:v1.2.0-final' implementation 'commons-io:commons-io:2.11.0' diff --git a/app/src/main/java/com/github/tvbox/osc/ui/activity/HomeActivity.java b/app/src/main/java/com/github/tvbox/osc/ui/activity/HomeActivity.java index 7793c9d..be45624 100644 --- a/app/src/main/java/com/github/tvbox/osc/ui/activity/HomeActivity.java +++ b/app/src/main/java/com/github/tvbox/osc/ui/activity/HomeActivity.java @@ -69,9 +69,7 @@ import java.io.File; import java.lang.reflect.Field; -import java.text.SimpleDateFormat; import java.util.ArrayList; -import java.util.Date; import java.util.List; import me.jessyan.autosize.utils.AutoSizeUtils; @@ -191,9 +189,7 @@ public void onItemClick(TvRecyclerView parent, View itemView, int position) { ((GridFragment) baseLazyFragment).forceRefresh(); } } - if (direction != View.FOCUS_DOWN) { - return false; - } + if (direction != View.FOCUS_DOWN) return false; BaseLazyFragment baseLazyFragment = fragments.get(sortFocused); if (!(baseLazyFragment instanceof GridFragment)) { return false; @@ -366,8 +362,7 @@ public void cancel() { }); } }); - if (!dialog.isShowing()) - dialog.show(); + if (!dialog.isShowing()) dialog.show(); }); } }, this); @@ -468,8 +463,7 @@ public void run() { @Override public boolean dispatchKeyEvent(KeyEvent event) { - if (topHide < 0) - return false; + if (topHide < 0) return false; if (event.getAction() == KeyEvent.ACTION_DOWN) { if (event.getKeyCode() == KeyEvent.KEYCODE_MENU) showSiteSwitch(); } else if (event.getAction() == KeyEvent.ACTION_UP) { @@ -506,13 +500,7 @@ public void onAnimationRepeat(Animator animation) { }); // Hide Top ======================================================= if (hide && topHide == 0) { - animatorSet.playTogether(ObjectAnimator.ofObject(viewObj, "marginTop", new IntEvaluator(), - AutoSizeUtils.mm2px(this.mContext, 20.0f), - AutoSizeUtils.mm2px(this.mContext, 0.0f)), - ObjectAnimator.ofObject(viewObj, "height", new IntEvaluator(), - AutoSizeUtils.mm2px(this.mContext, 50.0f), - AutoSizeUtils.mm2px(this.mContext, 1.0f)), - ObjectAnimator.ofFloat(this.topLayout, "alpha", 1.0f, 0.0f)); + animatorSet.playTogether(ObjectAnimator.ofObject(viewObj, "marginTop", new IntEvaluator(), AutoSizeUtils.mm2px(this.mContext, 20.0f), AutoSizeUtils.mm2px(this.mContext, 0.0f)), ObjectAnimator.ofObject(viewObj, "height", new IntEvaluator(), AutoSizeUtils.mm2px(this.mContext, 50.0f), AutoSizeUtils.mm2px(this.mContext, 1.0f)), ObjectAnimator.ofFloat(this.topLayout, "alpha", 1.0f, 0.0f)); animatorSet.setDuration(250); animatorSet.start(); tvName.setFocusable(false); @@ -523,13 +511,7 @@ public void onAnimationRepeat(Animator animation) { } // Show Top ======================================================= if (!hide && topHide == 1) { - animatorSet.playTogether(ObjectAnimator.ofObject(viewObj, "marginTop", new IntEvaluator(), - AutoSizeUtils.mm2px(this.mContext, 0.0f), - AutoSizeUtils.mm2px(this.mContext, 20.0f)), - ObjectAnimator.ofObject(viewObj, "height", new IntEvaluator(), - AutoSizeUtils.mm2px(this.mContext, 1.0f), - AutoSizeUtils.mm2px(this.mContext, 50.0f)), - ObjectAnimator.ofFloat(this.topLayout, "alpha", 0.0f, 1.0f)); + animatorSet.playTogether(ObjectAnimator.ofObject(viewObj, "marginTop", new IntEvaluator(), AutoSizeUtils.mm2px(this.mContext, 0.0f), AutoSizeUtils.mm2px(this.mContext, 20.0f)), ObjectAnimator.ofObject(viewObj, "height", new IntEvaluator(), AutoSizeUtils.mm2px(this.mContext, 1.0f), AutoSizeUtils.mm2px(this.mContext, 50.0f)), ObjectAnimator.ofFloat(this.topLayout, "alpha", 0.0f, 1.0f)); animatorSet.setDuration(250); animatorSet.start(); tvName.setFocusable(true); diff --git a/app/src/main/java/com/github/tvbox/osc/ui/dialog/ApiDialog.java b/app/src/main/java/com/github/tvbox/osc/ui/dialog/ApiDialog.java index cd4ed88..8560c4e 100644 --- a/app/src/main/java/com/github/tvbox/osc/ui/dialog/ApiDialog.java +++ b/app/src/main/java/com/github/tvbox/osc/ui/dialog/ApiDialog.java @@ -2,7 +2,6 @@ import android.app.Activity; import android.content.Context; -import android.view.View; import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; diff --git a/hello_android.jks b/hello_android.jks new file mode 100644 index 0000000000000000000000000000000000000000..7f7f10126813f904a32a789454648fa8790c5201 GIT binary patch literal 2683 zcma)+c{tRK7RP_Hk;xKe=-CN7CQw7AyLc>C;syh%mf2a{0vO?L<5jB1PYRb zo;u)L!wJ0cKSmn{>-3FYNre)i9~>BDnn$z!t$IDCA|z;Z#^e4$(B9!CW(4wV_+`Dp zut(z0=8#qPiP%OXULPxGp7*A?Tz9weJHHgI10*DDl{^UVZmPE!#^VQZ!z>hctYDN1 zDdipMsNv+aqZ5sba8T5k_r5}7&kZ7&PD;#Bd(3Y!@@OM9&!oXsRVpS$Fi=P_>JRDC z+)*BrE_OTZoqgd|Plft{pMwH5A~24ei+Fv5?|RyLycQ6RZ#AG#fHh0IuQM?r!?FA` zT?((3HLtOJ{yZg8`VXtl2s(537QX*9zZbG~_+@-luM1k@Gq}ws^;Y=X$e&L?sjZ~Y z3QDoFcfL#{!Ho>ah*&z%D?Yj*9ad;5hX7#6USLexIE&3lo)m&Q|d zLqyA5L7me-MP=e)PHczAy~=(eU1r0%6?n#i$)-Fpof*Wa$`0~W&F-%acnPp7m-GmO zqIh)D@Mi~BoH!Gi;28+}Xkk@?pS5&6reOCK6YY702!71PXfPttiNaV|S|!F^7#|4U8}sN80uB6Z|8a8~6Y>hW|E14+8DSGKP zu6(H5?=HJ%d((<4b6^x2F`ssBaLBndim`)CXf1T+nR}oWUCUY>Oyc%fx!;O#;+8ND zTJ6LtvX>#5g9`2y_Zy#l(bpkrk=9l0cQQm}zEaY0-V3KQf)2N$#McM4T{Dx&<#X|w zggvxS73u}s#>LuMQc$Z|ojA9aj&R@ls)qgM66`_zbl3m{q=6rhFkXx?fY6UepK7uSI@O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