Browse Source

[New] Allow configuring battery saver and access to Wi-Fi for system apps

[Fixed][Remove unlock animation] Compatibility with latest MIUI Launcher versions
Detect that LSPosed framework is installed
master
Mikanoshi 3 months ago
parent
commit
476a59a2a6
14 changed files with 107 additions and 373 deletions
  1. +5
    -0
      CHANGELOG_EN
  2. +5
    -0
      CHANGELOG_RU
  3. +2
    -3
      app/build.gradle
  4. +1
    -0
      app/src/main/AndroidManifest.xml
  5. +0
    -288
      app/src/main/java/name/mikanoshi/customiuizer/InAppFragment.java
  6. +9
    -9
      app/src/main/java/name/mikanoshi/customiuizer/MainFragment.java
  7. +5
    -0
      app/src/main/java/name/mikanoshi/customiuizer/MainModule.java
  8. +1
    -1
      app/src/main/java/name/mikanoshi/customiuizer/mods/Launcher.java
  9. +44
    -0
      app/src/main/java/name/mikanoshi/customiuizer/mods/Various.java
  10. +26
    -70
      app/src/main/java/name/mikanoshi/customiuizer/utils/Helpers.java
  11. +0
    -1
      app/src/main/res/values-ru-rRU/strings.xml
  12. +1
    -1
      app/src/main/res/values/strings.xml
  13. +2
    -0
      app/src/main/res/xml/prefs_main.xml
  14. +6
    -0
      app/src/main/res/xml/prefs_various.xml

+ 5
- 0
CHANGELOG_EN View File

@ -1,3 +1,8 @@
3.1.7
[New] Allow configuring battery saver and access to Wi-Fi for system apps
[Fixed][Remove unlock animation] Compatibility with latest MIUI Launcher versions
Detect that LSPosed framework is installed
3.1.6
[New] Configure allowed communications in airplane mode
[New] Allow 3rd-party apps to set lock screen wallpaper


+ 5
- 0
CHANGELOG_RU View File

@ -1,3 +1,8 @@
3.1.7
[Новое] Разрешить настраивать контроль активности и доступ к Wi-Fi для системных приложений
[Исправлено][Убрать анимацию разблокировки] Совместимость с последними версиями Рабочего стола MIUI
Определять установленный LSPosed фреймворк
3.1.6
[Новое] Настройка разрешённых коммуникаций в режиме полёта
[Новое] Установка обоев для экрана блокировки сторонними приложениями


+ 2
- 3
app/build.gradle View File

@ -22,8 +22,8 @@ android {
minSdkVersion 24
//noinspection ExpiredTargetSdkVersion
targetSdkVersion 27
versionCode 68
versionName "3.1.6"
versionCode 69
versionName "3.1.7"
signingConfig signingConfigs.dev
resConfigs 'ru-rRU', 'uk-rUK', 'zh-rCN', 'pt-rBR', 'de', 'es', 'it', 'tr'
}
@ -60,7 +60,6 @@ android {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "ch.acra:acra-core:$acraVersion"
implementation 'com.android.billingclient:billing:3.0.2'
//noinspection DifferentStdlibGradleVersion
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.21'
implementation 'com.github.jinatonic.confetti:confetti:1.1.2'


+ 1
- 0
app/src/main/AndroidManifest.xml View File

@ -33,6 +33,7 @@
<application
android:allowBackup="false"
android:backupAgent="name.mikanoshi.customiuizer.utils.PrefBackupAgent"
android:hasFragileUserData="true"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher"


+ 0
- 288
app/src/main/java/name/mikanoshi/customiuizer/InAppFragment.java View File

@ -1,288 +0,0 @@
package name.mikanoshi.customiuizer;
import android.app.Activity;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.Network;
import android.net.NetworkInfo;
import android.os.Bundle;
import android.preference.Preference;
import android.util.Log;
import android.util.SparseArray;
import android.widget.TextView;
import android.widget.Toast;
import com.android.billingclient.api.AcknowledgePurchaseParams;
import com.android.billingclient.api.AcknowledgePurchaseResponseListener;
import com.android.billingclient.api.BillingClient;
import com.android.billingclient.api.BillingClient.BillingResponseCode;
import com.android.billingclient.api.BillingClient.SkuType;
import com.android.billingclient.api.BillingClientStateListener;
import com.android.billingclient.api.BillingFlowParams;
import com.android.billingclient.api.BillingResult;
import com.android.billingclient.api.ConsumeParams;
import com.android.billingclient.api.ConsumeResponseListener;
import com.android.billingclient.api.Purchase;
import com.android.billingclient.api.Purchase.PurchaseState;
import com.android.billingclient.api.PurchasesUpdatedListener;
import com.android.billingclient.api.SkuDetails;
import com.android.billingclient.api.SkuDetailsParams;
import com.android.billingclient.api.SkuDetailsResponseListener;
import java.util.ArrayList;
import java.util.List;
public class InAppFragment extends SubFragment implements PurchasesUpdatedListener {
private int donated = 0;
private boolean hasNetwork = false;
private final List<String> skuList = new ArrayList<>();
private final SparseArray<SkuDetails> donations = new SparseArray<SkuDetails>();
private BillingClient billingClient;
boolean mIsServiceConnected = false;
BillingClientStateListener billingClientState = new BillingClientStateListener() {
@Override
public void onBillingSetupFinished(BillingResult billingResult) {
if (checkBillingError(billingResult)) return;
mIsServiceConnected = true;
updatePurchases();
updateDetails();
}
@Override
public void onBillingServiceDisconnected() {
mIsServiceConnected = false;
}
};
private int skuToInt(String sku) {
return Integer.parseInt(sku.replace("donate", ""));
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
final Activity act = getActivity();
skuList.add("donate1");
skuList.add("donate2");
skuList.add("donate3");
skuList.add("donate5");
skuList.add("donate10");
skuList.add("donate15");
skuList.add("donate50");
skuList.add("donate100");
for (String sku: skuList) {
Preference pref = findPreference(sku);
if (pref == null) continue;
pref.setTitle(getResources().getString(R.string.support_donate, skuToInt(sku)));
pref.setSummary("...");
pref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
SkuDetails details = donations.get(skuToInt(preference.getKey()));
if (details == null) return false;
BillingFlowParams flowParams = BillingFlowParams.newBuilder().setSkuDetails(details).build();
BillingResult result = billingClient.launchBillingFlow(act, flowParams);
checkBillingError(result);
return true;
}
});
}
Preference reset = findPreference("reset");
if (reset != null) {
reset.setTitle("Reset");
reset.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
Purchase.PurchasesResult result = billingClient.queryPurchases(SkuType.INAPP);
List<Purchase> purchases = result.getPurchasesList();
if (purchases == null || purchases.size() == 0) return false;
for (Purchase purchase : purchases) {
if (purchase.getPurchaseState() != PurchaseState.PURCHASED) continue;
ConsumeParams params = ConsumeParams.newBuilder().setPurchaseToken(purchase.getPurchaseToken()).build();
billingClient.consumeAsync(params, new ConsumeResponseListener() {
@Override
public void onConsumeResponse(BillingResult billingResult, String purchaseToken) {
checkBillingError(billingResult);
}
});
}
Toast.makeText(getActivity(), "All donations were reset!", Toast.LENGTH_SHORT).show();
return true;
}
});
if (!BuildConfig.DEBUG) getPreferenceScreen().removePreference(reset);
}
new Thread(new Runnable() {
public void run() {
try {
Thread.sleep(animDur);
Activity act = getActivity();
if (act != null && !act.isFinishing())
act.runOnUiThread(new Runnable() {
@Override
public void run() {
billingClient = BillingClient.newBuilder(act).enablePendingPurchases().setListener(InAppFragment.this).build();
billingClient.startConnection(billingClientState);
}
});
} catch (Throwable e) {
e.printStackTrace();
}
}
}).start();
}
@Override
public void onDestroy() {
if (billingClient != null) billingClient.endConnection();
super.onDestroy();
}
@Override
public void onPause() {
unregisterNetReceiver();
super.onPause();
}
@Override
public void onResume() {
super.onResume();
if (mIsServiceConnected) {
updatePurchases();
updateDetails();
}
registerNetReceiver();
}
boolean checkBillingError(BillingResult billingResult) {
Activity act = getActivity();
if (act == null || act.isFinishing()) return false;
int resp = billingResult.getResponseCode();
if (resp == BillingResponseCode.OK) return false;
if (resp == BillingResponseCode.SERVICE_UNAVAILABLE) return true;
if (resp == BillingResponseCode.USER_CANCELED)
Toast.makeText(getActivity(), R.string.billing_canceled, Toast.LENGTH_SHORT).show();
else
Toast.makeText(getActivity(), R.string.billing_error, Toast.LENGTH_LONG).show();
Log.e("miuizer", "[Billing error " + billingResult.getResponseCode() + "] " + billingResult.getDebugMessage());
return true;
}
void processPurchases(BillingResult billingResult, List<Purchase> purchases) {
if (billingResult.getResponseCode() == BillingResponseCode.OK && purchases != null) {
for (String sku: skuList) findPreference(sku).setEnabled(true);
for (Purchase purchase: purchases) {
int state = purchase.getPurchaseState();
if (state == PurchaseState.PURCHASED)
donated = Math.max(donated, skuToInt(purchase.getSku()));
findPreference(purchase.getSku()).setEnabled(state != PurchaseState.PURCHASED);
if (state == PurchaseState.PURCHASED && !purchase.isAcknowledged()) {
AcknowledgePurchaseParams acknowledgePurchaseParams = AcknowledgePurchaseParams.newBuilder().setPurchaseToken(purchase.getPurchaseToken()).build();
billingClient.acknowledgePurchase(acknowledgePurchaseParams, new AcknowledgePurchaseResponseListener() {
@Override
public void onAcknowledgePurchaseResponse(BillingResult billingResult) {
Log.e("miuizer", billingResult.getResponseCode() == BillingResponseCode.OK ? "Donation acknowledged!" : "[Ack error " + billingResult.getResponseCode() + "] " + billingResult.getDebugMessage());
}
});
}
if (getView() != null) {
TextView donateMsg = getView().findViewById(R.id.donate_msg);
if (donated == 0)
donateMsg.setText(R.string.support_donate_summ);
else if (donated < 5)
donateMsg.setText(R.string.donate_level1);
else if (donated <= 15)
donateMsg.setText(R.string.donate_level2);
else if (donated <= 100)
donateMsg.setText(R.string.donate_level3);
}
}
} else if (billingResult.getResponseCode() == BillingResponseCode.USER_CANCELED) {
if (getActivity() != null) Toast.makeText(getActivity(), R.string.billing_canceled, Toast.LENGTH_SHORT).show();
} else {
checkBillingError(billingResult);
}
}
@Override
public void onPurchasesUpdated(BillingResult billingResult, List<Purchase> purchases) {
processPurchases(billingResult, purchases);
}
void updatePurchases() {
Purchase.PurchasesResult result = billingClient.queryPurchases(SkuType.INAPP);
processPurchases(result.getBillingResult(), result.getPurchasesList());
}
void updateDetails() {
SkuDetailsParams.Builder params = SkuDetailsParams.newBuilder();
params.setSkusList(skuList).setType(SkuType.INAPP);
billingClient.querySkuDetailsAsync(params.build(), new SkuDetailsResponseListener() {
@Override
public void onSkuDetailsResponse(BillingResult billingResult, List<SkuDetails> skuDetailsList) {
if (skuDetailsList == null) return;
if (checkBillingError(billingResult)) {
for (String sku: skuList) findPreference(sku).setEnabled(false);
return;
}
donations.clear();
for (SkuDetails skuDetail: skuDetailsList) try {
int sku = skuToInt(skuDetail.getSku());
donations.append(sku, skuDetail);
Preference pref = findPreference(skuDetail.getSku());
if (!"USD".equals(skuDetail.getPriceCurrencyCode()))
pref.setTitle(getResources().getString(R.string.support_donate, sku) + " (" + skuDetail.getPrice() + ")");
pref.setSummary(skuDetail.getDescription());
} catch (Throwable t) {
t.printStackTrace();
}
}
});
}
private final ConnectivityManager.NetworkCallback networkCallback = new ConnectivityManager.NetworkCallback() {
@Override
public void onAvailable(Network network) {
if (hasNetwork) return;
hasNetwork = true;
if (mIsServiceConnected) {
Activity act = getActivity();
if (act != null && !act.isFinishing())
act.runOnUiThread(new Runnable() {
@Override
public void run() {
updatePurchases();
updateDetails();
}
});
}
}
@Override
public void onLost(Network network) {
if (!hasNetwork) return;
hasNetwork = false;
}
};
void registerNetReceiver() {
ConnectivityManager connectMgr = (ConnectivityManager)getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);
if (connectMgr == null) return;
NetworkInfo activeNetwork = connectMgr.getActiveNetworkInfo();
hasNetwork = activeNetwork != null && activeNetwork.isConnected();
connectMgr.registerDefaultNetworkCallback(networkCallback);
}
void unregisterNetReceiver() {
ConnectivityManager connectMgr = (ConnectivityManager)getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);
if (connectMgr != null) connectMgr.unregisterNetworkCallback(networkCallback);
}
}

+ 9
- 9
app/src/main/java/name/mikanoshi/customiuizer/MainFragment.java View File

@ -535,15 +535,15 @@ public class MainFragment extends PreferenceFragmentBase {
}
});
findPreference("pref_key_payinapp").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference pref) {
Bundle args = new Bundle();
args.putInt("baseResId", R.layout.fragment_inapp);
openSubFragment(new InAppFragment(), args, Helpers.SettingsType.Preference, Helpers.ActionBarType.HomeUp, R.string.support_donate_title, R.xml.prefs_inapp);
return true;
}
});
// findPreference("pref_key_payinapp").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
// @Override
// public boolean onPreferenceClick(Preference pref) {
// Bundle args = new Bundle();
// args.putInt("baseResId", R.layout.fragment_inapp);
// openSubFragment(new InAppFragment(), args, Helpers.SettingsType.Preference, Helpers.ActionBarType.HomeUp, R.string.support_donate_title, R.xml.prefs_inapp);
// return true;
// }
// });
findPreference("pref_key_paycrypto").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override


+ 5
- 0
app/src/main/java/name/mikanoshi/customiuizer/MainModule.java View File

@ -324,11 +324,16 @@ public class MainModule implements IXposedHookZygoteInit, IXposedHookLoadPackage
if (pkg.equals("com.miui.securitycenter")) {
if (mPrefs.getBoolean("various_appdetails")) Various.AppInfoHook(lpparam);
if (mPrefs.getBoolean("various_disableapp")) Various.AppsDisableHook(lpparam);
if (mPrefs.getBoolean("various_restrictapp")) Various.AppsRestrictHook(lpparam);
if (mPrefs.getBoolean("system_unblockthird")) System.UnblockThirdLaunchersHook(lpparam);
if (mPrefs.getBoolean("system_applock_scramblepin")) System.ScrambleAppLockPINHook(lpparam);
if (mPrefs.getStringAsInt("various_appsort", 0) > 0) Various.AppsDefaultSortHook(lpparam);
}
if (pkg.equals("com.miui.powerkeeper")) {
if (mPrefs.getBoolean("various_restrictapp")) Various.AppsRestrictPowerHook(lpparam);
}
if (pkg.equals("com.android.settings")) {
GlobalActions.miuizerSettingsRes();
if (Helpers.is12())


+ 1
- 1
app/src/main/java/name/mikanoshi/customiuizer/mods/Launcher.java View File

@ -1375,7 +1375,7 @@ public class Launcher {
public static void NoUnlockAnimationHook(LoadPackageParam lpparam) {
if (!Helpers.findAndHookMethodSilently("com.miui.home.launcher.common.Utilities", lpparam.classLoader, "notShowUserPresentAnimation", Context.class, XC_MethodReplacement.returnConstant(true)))
Helpers.findAndHookMethod("com.miui.launcher.utils.MiuiSettingsUtils", lpparam.classLoader, "isSystemAnimationOpen", Context.class, XC_MethodReplacement.returnConstant(false));
Helpers.hookAllMethods("com.miui.launcher.utils.MiuiSettingsUtils", lpparam.classLoader, "isSystemAnimationOpen", XC_MethodReplacement.returnConstant(false));
}
public static void UseOldLaunchAnimationHook(LoadPackageParam lpparam) {


+ 44
- 0
app/src/main/java/name/mikanoshi/customiuizer/mods/Various.java View File

@ -58,6 +58,7 @@ import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
@ -401,6 +402,49 @@ public class Various {
});
}
public static void AppsRestrictHook(LoadPackageParam lpparam) {
Method[] mGetAppInfo = XposedHelpers.findMethodsByExactParameters(findClass("com.miui.appmanager.AppManageUtils", lpparam.classLoader), ApplicationInfo.class, Object.class, String.class, int.class, int.class);
if (mGetAppInfo.length == 0)
Helpers.log("AppsRestrictHook", "Cannot find getAppInfo method!");
else
Helpers.hookMethod(mGetAppInfo[0], new MethodHook() {
@Override
protected void after(final MethodHookParam param) throws Throwable {
if ((int)param.args[2] == 128 && (int)param.args[3] == 0) {
ApplicationInfo appInfo = (ApplicationInfo)param.getResult();
appInfo.flags &= ~ApplicationInfo.FLAG_SYSTEM;
param.setResult(appInfo);
}
}
});
Helpers.findAndHookMethod("com.miui.networkassistant.ui.fragment.ShowAppDetailFragment", lpparam.classLoader, "initFirewallData", new MethodHook() {
@Override
protected void before(final MethodHookParam param) throws Throwable {
Object mAppInfo = XposedHelpers.getObjectField(param.thisObject, "mAppInfo");
if (mAppInfo != null) XposedHelpers.setBooleanField(mAppInfo, "isSystemApp", false);
}
});
Helpers.hookAllMethods("com.miui.networkassistant.service.FirewallService", lpparam.classLoader, "setSystemAppWifiRuleAllow", XC_MethodReplacement.DO_NOTHING);
}
@SuppressWarnings("unchecked")
public static void AppsRestrictPowerHook(LoadPackageParam lpparam) {
Helpers.findAndHookMethod("com.miui.powerkeeper.provider.PowerKeeperConfigureManager", lpparam.classLoader, "pkgHasIcon", String.class, XC_MethodReplacement.returnConstant(true));
Helpers.findAndHookMethod("com.miui.powerkeeper.provider.PreSetGroup", lpparam.classLoader, "initGroup", new MethodHook() {
@Override
protected void after(final MethodHookParam param) throws Throwable {
HashMap<String, Integer> mGroupHeadUidMap = (HashMap<String, Integer>)XposedHelpers.getStaticObjectField(findClass("com.miui.powerkeeper.provider.PreSetGroup", lpparam.classLoader), "mGroupHeadUidMap");
mGroupHeadUidMap.clear();
}
});
Helpers.findAndHookMethod("com.miui.powerkeeper.provider.PreSetApp", lpparam.classLoader, "isPreSetApp", String.class, XC_MethodReplacement.returnConstant(false));
Helpers.hookAllMethods("com.miui.powerkeeper.utils.Utils", lpparam.classLoader, "pkgHasIcon", XC_MethodReplacement.returnConstant(true));
}
public static void AlarmCompatHook() {
Helpers.findAndHookMethod(Settings.System.class, "getStringForUser", ContentResolver.class, String.class, int.class, new MethodHook() {
@Override


+ 26
- 70
app/src/main/java/name/mikanoshi/customiuizer/utils/Helpers.java View File

@ -157,28 +157,31 @@ public class Helpers {
public static boolean showNewMods = true;
public static boolean miuizerModuleActive = false;
public static final HashSet<String> newMods = new HashSet<String>(Arrays.asList(
"pref_key_system_cleanmirror",
"pref_key_system_lswallpaper",
"pref_key_system_airplanemodeconfig",
"pref_key_system_betterpopups_center",
"pref_key_controls_fsg_horiz_apps",
"pref_key_launcher_pinch",
"pref_key_launcher_spread"
"pref_key_various_restrictapp"
));
public static final HashMap<String, String> l10nProgress = new HashMap<String, String>() {{
put("de", "88.4");
put("de", "88.2");
put("es", "100");
put("it", "100");
put("pt-rBR", "96.8");
put("pt-rBR", "96.6");
put("ru-rRU", "100");
put("tr", "88.4");
put("uk-rUK", "89.3");
put("zh-rCN", "100");
put("tr", "88.2");
put("uk-rUK", "89.2");
put("zh-rCN", "99.8");
put("fr", "25.1");
put("id", "13.4");
put("id", "13.3");
put("sk", "4.3");
}};
public static final HashSet<String> xposedManagers = new HashSet<String>(Arrays.asList(
"org.lsposed.manager",
"io.github.lsposed.manager",
"org.meowcat.edxposed.manager",
"com.solohsu.android.edxp.manager",
"de.robv.android.xposed.installer",
"me.weishu.exp"
));
public static final ArrayList<String> shortcutIcons = new ArrayList<String>();
public static Holidays currentHoliday = Holidays.NONE;
@ -344,28 +347,8 @@ public class Helpers {
public static boolean isXposedInstallerInstalled(Context context) {
PackageManager pm = context.getPackageManager();
try {
pm.getPackageInfo("io.github.lsposed.manager", PackageManager.GET_ACTIVITIES);
return true;
} catch (PackageManager.NameNotFoundException e) {}
try {
pm.getPackageInfo("org.meowcat.edxposed.manager", PackageManager.GET_ACTIVITIES);
return true;
} catch (PackageManager.NameNotFoundException e) {}
try {
pm.getPackageInfo("com.solohsu.android.edxp.manager", PackageManager.GET_ACTIVITIES);
return true;
} catch (PackageManager.NameNotFoundException e) {}
try {
pm.getPackageInfo("de.robv.android.xposed.installer", PackageManager.GET_ACTIVITIES);
return true;
} catch (PackageManager.NameNotFoundException e) {}
try {
pm.getPackageInfo("me.weishu.exp", PackageManager.GET_ACTIVITIES);
for (String manager: xposedManagers) try {
pm.getPackageInfo(manager, PackageManager.GET_ACTIVITIES);
return true;
} catch (PackageManager.NameNotFoundException e) {}
@ -412,43 +395,16 @@ public class Helpers {
}
public static boolean openXposedApp(Context context) {
Intent intent = context.getPackageManager().getLaunchIntentForPackage("io.github.lsposed.manager");
if (intent != null) intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
try {
for (String manager: xposedManagers) try {
Intent intent = context.getPackageManager().getLaunchIntentForPackage(manager);
if (intent == null) continue;
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
context.startActivity(intent);
return true;
} catch (Throwable e0) {
intent = context.getPackageManager().getLaunchIntentForPackage("org.meowcat.edxposed.manager");
if (intent != null) intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
try {
context.startActivity(intent);
return true;
} catch (Throwable e1) {
intent = context.getPackageManager().getLaunchIntentForPackage("com.solohsu.android.edxp.manager");
if (intent != null) intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
try {
context.startActivity(intent);
return true;
} catch (Throwable e2) {
intent = context.getPackageManager().getLaunchIntentForPackage("de.robv.android.xposed.installer");
if (intent != null) intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
try {
context.startActivity(intent);
return true;
} catch (Throwable e3) {
intent = context.getPackageManager().getLaunchIntentForPackage("me.weishu.exp");
if (intent != null) intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
try {
context.startActivity(intent);
return true;
} catch (Throwable e4) {
Toast.makeText(context, R.string.xposed_not_found, Toast.LENGTH_LONG).show();
}
}
}
}
return false;
}
} catch (Throwable ignore) {}
Toast.makeText(context, R.string.xposed_not_found, Toast.LENGTH_LONG).show();
return false;
}
public static String getNewEdXposedPath() {


+ 0
- 1
app/src/main/res/values-ru-rRU/strings.xml View File

@ -280,7 +280,6 @@
<string name="support_donate_crypto_title">Криптовалюты</string>
<string name="support_donate_crypto_summ">Деньги будущего :)</string>
<string name="support_donate_other_title">Устаревшие валюты</string>
<string name="support_donate_other_summ">Webmoney, QIWI</string>
<string name="donate_level1">Спасибо за пожертвование!</string>
<string name="donate_level2">Спасибо за щедрое пожертвование!</string>


+ 1
- 1
app/src/main/res/values/strings.xml View File

@ -948,7 +948,7 @@
<string name="support_donate_crypto_title">Cryptocurrencies</string>
<string name="support_donate_crypto_summ">Money of the future :)</string>
<string name="support_donate_other_title">Outdated currencies</string>
<string name="support_donate_other_summ" translatable="false">Webmoney, QIWI</string>
<string name="support_donate_other_summ" translatable="false">Paypal, Webmoney, QIWI</string>
<string name="donate_level1">Thanks for your donation!</string>
<string name="donate_level2">Thanks for your generous donation!</string>


+ 2
- 0
app/src/main/res/xml/prefs_main.xml View File

@ -97,10 +97,12 @@
android:title="@string/support_donate_other_title"
android:summary="@string/support_donate_other_summ"
android:key="pref_key_payother" />
<!--
<name.mikanoshi.customiuizer.prefs.PreferenceEx
android:title="@string/support_donate_inapp_title"
android:summary="@string/support_donate_inapp_summ"
android:key="pref_key_payinapp" />
-->
</PreferenceCategory>
</PreferenceScreen>

+ 6
- 0
app/src/main/res/xml/prefs_various.xml View File

@ -70,6 +70,12 @@
<PreferenceCategory
android:title="@string/settings" />
<name.mikanoshi.customiuizer.prefs.CheckBoxPreferenceEx
android:key="pref_key_various_restrictapp"
android:summary="@string/various_restrictapp_summ"
android:title="@string/various_restrictapp_title"
android:defaultValue="false" />
<name.mikanoshi.customiuizer.prefs.CheckBoxPreferenceEx
android:key="pref_key_various_disableapp"
android:summary="@string/various_disableapp_summ"


Loading…
Cancel
Save