Fixes
This commit is contained in:
parent
b32afc0787
commit
2cb0911a18
|
|
@ -1,14 +1,14 @@
|
|||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
compileSdkVersion 28
|
||||
buildToolsVersion "29.0.3"
|
||||
defaultConfig {
|
||||
applicationId "org.meowcat.edxposed.manager"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 27
|
||||
versionCode 45406
|
||||
versionName "4.5.4.2"
|
||||
versionCode 45408
|
||||
versionName "4.5.4.4"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
|
|
@ -17,6 +17,7 @@ android {
|
|||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
debug {
|
||||
applicationIdSuffix ".debug"
|
||||
minifyEnabled false
|
||||
shrinkResources false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package org.meowcat.edxposed.manager.util;
|
||||
package android.os;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
|
@ -171,4 +171,4 @@ public class FileUtils {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -81,46 +81,47 @@ public class EdDownloadActivity extends BaseActivity {
|
|||
}
|
||||
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
private class JSONParser extends AsyncTask<Void, Void, Boolean> {
|
||||
private class JSONParser extends AsyncTask<Void, Void, String> {
|
||||
|
||||
private String newApkVersion = null;
|
||||
private String newApkLink = null;
|
||||
private String newApkChangelog = null;
|
||||
|
||||
@Override
|
||||
protected Boolean doInBackground(Void... params) {
|
||||
protected String doInBackground(Void... params) {
|
||||
try {
|
||||
String originalJson = JSONUtils.getFileContent(JSONUtils.JSON_LINK);
|
||||
return JSONUtils.getFileContent(JSONUtils.JSON_LINK);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(XposedApp.TAG, "AdvancedInstallerFragment -> " + e.getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
final JSONUtils.XposedJson xposedJson = new Gson().fromJson(originalJson, JSONUtils.XposedJson.class);
|
||||
@Override
|
||||
protected void onPostExecute(String result) {
|
||||
super.onPostExecute(result);
|
||||
if (result == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
final JSONUtils.XposedJson xposedJson = new Gson().fromJson(result, JSONUtils.XposedJson.class);
|
||||
|
||||
List<XposedTab> tabs = Stream.of(xposedJson.tabs)
|
||||
.filter(value -> value.sdks.contains(Build.VERSION.SDK_INT)).toList();
|
||||
|
||||
for (XposedTab tab : tabs) {
|
||||
tabsAdapter.addFragment(tab.name, BaseAdvancedInstaller.newInstance(tab));
|
||||
tabsAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
newApkVersion = xposedJson.apk.version;
|
||||
newApkLink = xposedJson.apk.link;
|
||||
newApkChangelog = xposedJson.apk.changelog;
|
||||
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e(XposedApp.TAG, "AdvancedInstallerFragment -> " + e.getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Boolean result) {
|
||||
super.onPostExecute(result);
|
||||
|
||||
try {
|
||||
tabsAdapter.notifyDataSetChanged();
|
||||
|
||||
if (newApkVersion == null) return;
|
||||
if (newApkVersion == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
SharedPreferences prefs;
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import android.content.DialogInterface;
|
|||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.os.FileUtils;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.LinearLayout;
|
||||
|
|
@ -24,7 +25,6 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
|||
import com.takisoft.preferencex.PreferenceFragmentCompat;
|
||||
import com.topjohnwu.superuser.Shell;
|
||||
|
||||
import org.meowcat.edxposed.manager.util.FileUtils;
|
||||
import org.meowcat.edxposed.manager.util.RepoLoader;
|
||||
|
||||
import java.io.File;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import android.content.pm.PackageManager;
|
|||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.FileUtils;
|
||||
import android.text.Html;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
|
|
@ -22,8 +23,6 @@ import androidx.fragment.app.Fragment;
|
|||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import org.meowcat.edxposed.manager.util.FileUtils;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import android.content.res.Resources;
|
|||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.FileUtils;
|
||||
import android.os.Handler;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.DisplayMetrics;
|
||||
|
|
@ -22,7 +23,6 @@ import androidx.appcompat.app.AppCompatActivity;
|
|||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
|
||||
import org.meowcat.edxposed.manager.receivers.PackageChangeReceiver;
|
||||
import org.meowcat.edxposed.manager.util.FileUtils;
|
||||
import org.meowcat.edxposed.manager.util.ModuleUtil;
|
||||
import org.meowcat.edxposed.manager.util.NotificationUtil;
|
||||
import org.meowcat.edxposed.manager.util.RepoLoader;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import android.content.Context;
|
|||
import android.content.Intent;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.net.Uri;
|
||||
import android.os.FileUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
|
@ -19,7 +20,6 @@ import org.meowcat.edxposed.manager.BuildConfig;
|
|||
import org.meowcat.edxposed.manager.R;
|
||||
import org.meowcat.edxposed.manager.XposedApp;
|
||||
import org.meowcat.edxposed.manager.util.CompileUtil;
|
||||
import org.meowcat.edxposed.manager.util.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import android.content.pm.PackageManager.NameNotFoundException;
|
|||
import android.content.pm.ResolveInfo;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.os.FileUtils;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
android:paddingStart="16dp"
|
||||
android:paddingTop="11dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false"
|
||||
android:paddingBottom="11dp">
|
||||
|
||||
<LinearLayout
|
||||
|
|
@ -66,6 +68,7 @@
|
|||
<org.meowcat.edxposed.manager.widget.DownloadView
|
||||
android:id="@+id/downloadView"
|
||||
android:layout_width="match_parent"
|
||||
android:clipChildren="false"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
android:id="@+id/container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
android:padding="6dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp">
|
||||
|
|
@ -128,7 +129,7 @@
|
|||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<Button
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnInstall"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -169,7 +170,7 @@
|
|||
app:srcCompat="@drawable/ic_info"
|
||||
tools:ignore="ContentDescription,RtlHardcoded" />
|
||||
|
||||
<Button
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnUninstall"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@
|
|||
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">@bool/lightSystemUI
|
||||
</item>
|
||||
<item name="android:navigationBarColor">@color/navigationBarColor</item>
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
|
||||
<item name="alertDialogTheme">@style/ThemeOverlay.MaterialComponents.MaterialAlertDialog
|
||||
</item>
|
||||
</style>
|
||||
|
||||
<style name="AppearanceFoundation.Caption" parent="TextAppearance.AppCompat.Caption">
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<intent
|
||||
android:action="android.intent.action.MAIN"
|
||||
android:targetClass="org.meowcat.edxposed.manager.ModulesActivity"
|
||||
android:targetPackage="org.meowcat.edxposed.manager"></intent>
|
||||
android:targetPackage="org.meowcat.edxposed.manager" />
|
||||
</shortcut>
|
||||
|
||||
<shortcut
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
<intent
|
||||
android:action="android.intent.action.MAIN"
|
||||
android:targetClass="org.meowcat.edxposed.manager.DownloadActivity"
|
||||
android:targetPackage="org.meowcat.edxposed.manager"></intent>
|
||||
android:targetPackage="org.meowcat.edxposed.manager" />
|
||||
</shortcut>
|
||||
|
||||
</shortcuts>
|
||||
|
|
@ -7,7 +7,7 @@ buildscript {
|
|||
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.6.0'
|
||||
classpath 'com.android.tools.build:gradle:3.6.1'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
|
|
|||
Loading…
Reference in New Issue