Browse Source

[New] Increase limit of active notifications from a single app

[New] Increase/remove notification icons limit in status bar
[New] Disable forced dark mode
[New][MIUI 12] Collapse MIUI titles
[Improved][Navbar height, Additional navbar buttons margin] Increased value ranges
[Improved][Show additional app details] APK version code
[Fixed][Show seconds in status bar clock] Adding seconds twice
[Fixed][Back gesture area height and width] Support for gestures implementation from MIUI Launcher
[Fixed][Launcher gestures] Swipe up and down gestures; compatibility with latest MIUI Launcher versions
[Fixed][Fingerprint actions during calls] Longpress action
[Fixed][Separate volume controls] Muted state indication for notification slider in volume dialog when DND is active; resolves #116
Coronavirus anti-holiday is back! Now even more viral!
MIUI 12 compatibility
master v3.0.0
Mikanoshi 11 months ago
parent
commit
f0db977463
93 changed files with 1435 additions and 524 deletions
  1. +6
    -0
      .idea/compiler.xml
  2. +2
    -0
      .idea/gradle.xml
  3. +2
    -0
      .idea/inspectionProfiles/Project_Default.xml
  4. +25
    -0
      .idea/jarRepositories.xml
  5. +28
    -1
      CHANGELOG_EN
  6. +27
    -0
      CHANGELOG_RU
  7. +1
    -1
      README.html
  8. +8
    -5
      app/build.gradle
  9. BIN
      app/lib/framework.jar
  10. BIN
      app/lib/miui.jar
  11. BIN
      app/lib/miuisystem.jar
  12. +0
    -1
      app/proguard-rules.pro
  13. +4
    -4
      app/src/main/java/name/mikanoshi/customiuizer/InAppFragment.java
  14. +2
    -2
      app/src/main/java/name/mikanoshi/customiuizer/MainActivity.java
  15. +52
    -9
      app/src/main/java/name/mikanoshi/customiuizer/MainFragment.java
  16. +28
    -18
      app/src/main/java/name/mikanoshi/customiuizer/MainModule.java
  17. +29
    -23
      app/src/main/java/name/mikanoshi/customiuizer/PreferenceFragmentBase.java
  18. +1
    -1
      app/src/main/java/name/mikanoshi/customiuizer/SharedPrefsProvider.java
  19. +0
    -1
      app/src/main/java/name/mikanoshi/customiuizer/SnoozedFragment.java
  20. +31
    -18
      app/src/main/java/name/mikanoshi/customiuizer/crashreport/Dialog.java
  21. +39
    -35
      app/src/main/java/name/mikanoshi/customiuizer/mods/Controls.java
  22. +53
    -7
      app/src/main/java/name/mikanoshi/customiuizer/mods/GlobalActions.java
  23. +158
    -12
      app/src/main/java/name/mikanoshi/customiuizer/mods/Launcher.java
  24. +8
    -1
      app/src/main/java/name/mikanoshi/customiuizer/mods/PackagePermissions.java
  25. +309
    -121
      app/src/main/java/name/mikanoshi/customiuizer/mods/System.java
  26. +214
    -78
      app/src/main/java/name/mikanoshi/customiuizer/mods/Various.java
  27. +8
    -8
      app/src/main/java/name/mikanoshi/customiuizer/prefs/CheckBoxPreferenceEx.java
  28. +5
    -5
      app/src/main/java/name/mikanoshi/customiuizer/prefs/ListPreferenceEx.java
  29. +2
    -2
      app/src/main/java/name/mikanoshi/customiuizer/prefs/PreferenceCategoryEx.java
  30. +10
    -10
      app/src/main/java/name/mikanoshi/customiuizer/prefs/PreferenceEx.java
  31. +1
    -0
      app/src/main/java/name/mikanoshi/customiuizer/prefs/SeekBarPreference.java
  32. +3
    -3
      app/src/main/java/name/mikanoshi/customiuizer/prefs/SpinnerEx.java
  33. +2
    -2
      app/src/main/java/name/mikanoshi/customiuizer/prefs/SpinnerExFake.java
  34. +0
    -1
      app/src/main/java/name/mikanoshi/customiuizer/subs/AppSelector.java
  35. +2
    -2
      app/src/main/java/name/mikanoshi/customiuizer/subs/BTList.java
  36. +0
    -1
      app/src/main/java/name/mikanoshi/customiuizer/subs/MultiAction.java
  37. +6
    -0
      app/src/main/java/name/mikanoshi/customiuizer/subs/System.java
  38. +0
    -1
      app/src/main/java/name/mikanoshi/customiuizer/subs/System_PopupNotif.java
  39. +6
    -0
      app/src/main/java/name/mikanoshi/customiuizer/subs/Various.java
  40. +4
    -4
      app/src/main/java/name/mikanoshi/customiuizer/subs/WiFiList.java
  41. +8
    -8
      app/src/main/java/name/mikanoshi/customiuizer/utils/AppDataAdapter.java
  42. +7
    -7
      app/src/main/java/name/mikanoshi/customiuizer/utils/AudioVisualizer.java
  43. +3
    -3
      app/src/main/java/name/mikanoshi/customiuizer/utils/BitmapCachedLoader.java
  44. +5
    -5
      app/src/main/java/name/mikanoshi/customiuizer/utils/ColorCircle.java
  45. +1
    -1
      app/src/main/java/name/mikanoshi/customiuizer/utils/FilthGenerator.java
  46. +7
    -7
      app/src/main/java/name/mikanoshi/customiuizer/utils/FilthyParticle.java
  47. +1
    -1
      app/src/main/java/name/mikanoshi/customiuizer/utils/FlowerGenerator.java
  48. +2
    -3
      app/src/main/java/name/mikanoshi/customiuizer/utils/FlowerParticle.java
  49. +29
    -9
      app/src/main/java/name/mikanoshi/customiuizer/utils/Helpers.java
  50. +1
    -1
      app/src/main/java/name/mikanoshi/customiuizer/utils/IconGridAdapter.java
  51. +6
    -6
      app/src/main/java/name/mikanoshi/customiuizer/utils/LockedAppAdapter.java
  52. +3
    -3
      app/src/main/java/name/mikanoshi/customiuizer/utils/ModSearchAdapter.java
  53. +49
    -0
      app/src/main/java/name/mikanoshi/customiuizer/utils/NestedHeaderLayout.java
  54. +0
    -1
      app/src/main/java/name/mikanoshi/customiuizer/utils/PrefMap.java
  55. +3
    -3
      app/src/main/java/name/mikanoshi/customiuizer/utils/PreferenceAdapter.java
  56. +6
    -6
      app/src/main/java/name/mikanoshi/customiuizer/utils/PrivacyAppAdapter.java
  57. +7
    -7
      app/src/main/java/name/mikanoshi/customiuizer/utils/ResolveInfoAdapter.java
  58. +2
    -3
      app/src/main/java/name/mikanoshi/customiuizer/utils/ResourceHooks.java
  59. +1
    -1
      app/src/main/java/name/mikanoshi/customiuizer/utils/ShakeManager.java
  60. +1
    -1
      app/src/main/java/name/mikanoshi/customiuizer/utils/SnoozedAdapter.java
  61. +1
    -1
      app/src/main/java/name/mikanoshi/customiuizer/utils/SnowGenerator.java
  62. +2
    -2
      app/src/main/java/name/mikanoshi/customiuizer/utils/SnowParticle.java
  63. +1
    -1
      app/src/main/res/color-night-v8/color_selector.xml
  64. +1
    -1
      app/src/main/res/color/color_selector.xml
  65. BIN
      app/src/main/res/drawable-night-xxhdpi-v4/ic_appinfo12.png
  66. BIN
      app/src/main/res/drawable-night-xxhdpi-v4/ic_forceclose12.png
  67. BIN
      app/src/main/res/drawable-xxhdpi-v4/ic_appinfo12.png
  68. BIN
      app/src/main/res/drawable-xxhdpi-v4/ic_credentials.png
  69. BIN
      app/src/main/res/drawable-xxhdpi-v4/ic_forceclose12.png
  70. BIN
      app/src/main/res/drawable-xxhdpi-v4/microbe1.png
  71. BIN
      app/src/main/res/drawable-xxhdpi-v4/microbe2.png
  72. BIN
      app/src/main/res/drawable-xxhdpi-v4/microbe3.png
  73. BIN
      app/src/main/res/drawable-xxhdpi-v4/virus1.png
  74. BIN
      app/src/main/res/drawable-xxhdpi-v4/virus2.png
  75. BIN
      app/src/main/res/drawable-xxhdpi-v4/virus3.png
  76. +0
    -1
      app/src/main/res/layout/fragment_about.xml
  77. +31
    -0
      app/src/main/res/layout/prefs_main12.xml
  78. +42
    -42
      app/src/main/res/values-de/strings.xml
  79. +13
    -0
      app/src/main/res/values-es/strings.xml
  80. +2
    -0
      app/src/main/res/values-it/strings.xml
  81. +1
    -1
      app/src/main/res/values-night/colors.xml
  82. +16
    -3
      app/src/main/res/values-ru-rRU/strings.xml
  83. +17
    -4
      app/src/main/res/values-zh-rCN/strings.xml
  84. +32
    -0
      app/src/main/res/values/arrays.xml
  85. +1
    -1
      app/src/main/res/values/colors.xml
  86. +17
    -4
      app/src/main/res/values/strings.xml
  87. +3
    -3
      app/src/main/res/xml/prefs_controls.xml
  88. +20
    -0
      app/src/main/res/xml/prefs_system.xml
  89. +8
    -0
      app/src/main/res/xml/prefs_various.xml
  90. +1
    -1
      build.gradle
  91. +5
    -3
      gradle.properties
  92. +2
    -2
      gradle/wrapper/gradle-wrapper.properties
  93. +1
    -1
      last_build

+ 6
- 0
.idea/compiler.xml View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="1.8" />
</component>
</project>

+ 2
- 0
.idea/gradle.xml View File

@ -6,6 +6,7 @@
<GradleProjectSettings>
<option name="delegatedBuild" value="false" />
<option name="testRunner" value="PLATFORM" />
<option name="disableWrapperSourceDistributionNotification" value="true" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
@ -15,6 +16,7 @@
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>

+ 2
- 0
.idea/inspectionProfiles/Project_Default.xml View File

@ -2,6 +2,8 @@
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="AndroidLintClickableViewAccessibility" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="AndroidLintNonConstantResourceId" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="AndroidNonConstantResIdsInSwitch" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="BooleanMethodIsAlwaysInverted" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CatchMayIgnoreException" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="Convert2Diamond" enabled="false" level="WARNING" enabled_by_default="false" />


+ 25
- 0
.idea/jarRepositories.xml View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
</component>
</project>

+ 28
- 1
CHANGELOG_EN View File

@ -1,3 +1,30 @@
3.0.0
[New] Increase limit of active notifications from a single app
[New] Increase/remove notification icons limit in status bar
[New] Disable forced dark mode
[New][MIUI 12] Collapse MIUI titles
[Improved][Navbar height, Additional navbar buttons margin] Increased value ranges
[Improved][Show additional app details] APK version code
[Fixed][Show seconds in status bar clock] Adding seconds twice
[Fixed][Back gesture area height and width] Support for gestures implementation from MIUI Launcher
[Fixed][Launcher gestures] Swipe up and down gestures; compatibility with latest MIUI Launcher versions
[Fixed][Fingerprint actions during calls] Longpress action
[Fixed][Separate volume controls] Muted state indication for notification slider in volume dialog when DND is active
Coronavirus anti-holiday is back! Now even more viral!
MIUI 12 compatibility:
Fast access icon
Rotation animation
Custom lock screen shortcuts (launching without unlock)
Separate volume controls
Compact notifications
Extended notification menu
Shortcut/Clock/Calendar app in notification drawer
Display next alarm on lock screen
Hide top block on lock screen
More notification snooze options
Show additional app details
Horizontal gestures
2.2.1
[New] Disable emergency call button on lock screen
[Improved][Screenshot configuration] Option to select a custom save folder
@ -5,7 +32,7 @@
[Improved][Extended notification menu] Display all icons in one row in notification of minimal importance so they fit in when notification is collapsed
[Fixed][Colorize notification title] Don't apply to styled media notifications
[Fixed][Screen off timeout on lock screen] Was also affecting timeout outside lock screen
UI fixes
Module's UI fixes
2.2.0
[New] Use native recent apps list implementation instead of the one from MIUI Launcher


+ 27
- 0
CHANGELOG_RU View File

@ -1,3 +1,30 @@
3.0.0
[Новое] Увеличение лимита активных уведомлений от одного приложения
[Новое] Увеличение/отключение лимита на количество иконок уведомлений в строке состояния
[Новое] Отключение принудительного тёмного режима
[Новое][MIUI 12] Сворачивать заголовки MIUI
[Улучшено][Высота навбара, Отступ доп. кнопок навбара] Увеличен диапазон значений
[Улучшено][Доп. сведения о приложении] Версия кода APK
[Исправлено][Показывать секунды в строке состояния] Добавление секунд дважды
[Исправлено][Высота и ширина области срабатывания жеста Назад] Поддержка жестов из MIUI Launcher
[Исправлено][Жесты ланчера] Свайп вверх и вниз; совместимость с последними версиями MIUI Launcher
[Исправлено][Действия на отпечаток пальца при звонке] Действие на долгое нажатие
[Исправлено][Раздельные настройки громкости] Правильное отображение слайдера уведомлений в заглушённом состоянии в диалоге громкости при включенном режиме Не беспокоить
Коронавирусный анти-праздник снова с нами! Теперь ещё более вирусный!
Совместимость с MIUI 12:
Иконка быстрого доступа
Анимация при повороте
Пользовательские ярлыки на экране блокировки (запуск без разблокировки)
Раздельные настройки громкости
Компактные уведомления
Расширенное меню уведомления
Приложение быстрого доступа/Часов/Календаря в панели уведомлений
Показ будильника на экране блокировки
Скрыть верхний блок на экране блокировки
Увеличение числа отложенных интервалов уведомлений
Доп. сведения о приложении
Горизонтальные жесты
2.2.1
[Новое] Отключение кнопки экстренного вызова на экране блокировки
[Улучшено][Конфигурация снимков экрана] Опция для выбора произвольной папки сохранения


+ 1
- 1
README.html View File

@ -6,7 +6,7 @@
CustoMIUIzer module contains a variety of mods that will provide additional functionality for your MIUI device. You have to have (Ed)Xposed Framework installed to use these mods. For more info about Xposed refer to the <a href="http://forum.xda-developers.com/xposed/xposed-installer-versions-changelog-t2714053" target="_blank">original thread</a> or <a href="https://github.com/ElderDrivers/EdXposed" target="_blank">github repo of EdXposed (for Android 8-10)</a>.
<h2>Compatibility</h2>
Module was written, tested and is mainly intended for MIUI 10-11 on Android 9-10.<br>
Module was written, tested and is mainly intended for MIUI 10-12 on Android 9-10.<br>
Mods are not guaranteed to fully work on any other versions, especially lower MIUI versions.<br>
APK installation is limited to Android 7+.


+ 8
- 5
app/build.gradle View File

@ -1,6 +1,6 @@
apply plugin: 'com.android.application'
def acraVersion = '5.4.0'
def acraVersion = '5.7.0'
def keystorePropertiesFile = rootProject.file("../keystore.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
@ -22,20 +22,22 @@ android {
minSdkVersion 24
//noinspection OldTargetApi
targetSdkVersion 27
versionCode 54
versionName "2.2.1"
versionCode 55
versionName "3.0.0"
signingConfig signingConfigs.dev
}
buildTypes {
release {
debuggable false
minifyEnabled true
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.dev
}
debug {
debuggable true
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.dev
}
@ -57,11 +59,12 @@ android {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "ch.acra:acra-core:$acraVersion"
implementation 'com.android.billingclient:billing:2.2.0'
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.3.71'
implementation 'com.android.billingclient:billing:3.0.1'
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.3.72'
implementation 'com.github.jinatonic.confetti:confetti:1.1.2'
implementation files('libs/WeatherView-2.0.3.aar')
compileOnly 'de.robv.android.xposed:api:82'
compileOnly files('lib/miui.jar')
compileOnly files('lib/miuisystem.jar')
compileOnly files('lib/framework.jar')
}

BIN
app/lib/framework.jar View File


BIN
app/lib/miui.jar View File


BIN
app/lib/miuisystem.jar View File


+ 0
- 1
app/proguard-rules.pro View File

@ -1,6 +1,5 @@
-verbose
-dontobfuscate
-dontpreverify
-allowaccessmodification
-keepattributes Exceptions,LineNumberTable,Signature,SourceFile,EnclosingMethod,*Annotation*


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

@ -36,8 +36,8 @@ public class InAppFragment extends SubFragment implements PurchasesUpdatedListen
private int donated = 0;
private boolean hasNetwork = false;
private List<String> skuList = new ArrayList<>();
private SparseArray<SkuDetails> donations = new SparseArray<SkuDetails>();
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() {
@ -102,7 +102,7 @@ public class InAppFragment extends SubFragment implements PurchasesUpdatedListen
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()).setDeveloperPayload(purchase.getDeveloperPayload()).build();
ConsumeParams params = ConsumeParams.newBuilder().setPurchaseToken(purchase.getPurchaseToken()).build();
billingClient.consumeAsync(params, new ConsumeResponseListener() {
@Override
public void onConsumeResponse(BillingResult billingResult, String purchaseToken) {
@ -183,7 +183,7 @@ public class InAppFragment extends SubFragment implements PurchasesUpdatedListen
findPreference(purchase.getSku()).setEnabled(state != PurchaseState.PURCHASED);
if (state == PurchaseState.PURCHASED && !purchase.isAcknowledged()) {
AcknowledgePurchaseParams acknowledgePurchaseParams = AcknowledgePurchaseParams.newBuilder().setPurchaseToken(purchase.getPurchaseToken()).setDeveloperPayload(purchase.getDeveloperPayload()).build();
AcknowledgePurchaseParams acknowledgePurchaseParams = AcknowledgePurchaseParams.newBuilder().setPurchaseToken(purchase.getPurchaseToken()).build();
billingClient.acknowledgePurchase(acknowledgePurchaseParams, new AcknowledgePurchaseResponseListener() {
@Override
public void onAcknowledgePurchaseResponse(BillingResult billingResult) {


+ 2
- 2
app/src/main/java/name/mikanoshi/customiuizer/MainActivity.java View File

@ -128,7 +128,7 @@ public class MainActivity extends Activity {
weatherView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
weatherView.setPrecipType(PrecipType.CLEAR);
weatherView.setSpeed(0);
weatherView.setEmissionRate(0.5f);
weatherView.setEmissionRate(0.6f);
weatherView.setFadeOutPercent(1.0f);
weatherView.setAngle(0);
try {
@ -238,7 +238,7 @@ public class MainActivity extends Activity {
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU) {
PreferenceFragmentBase fragment = (PreferenceFragmentBase)getFragmentManager().findFragmentById(R.id.fragment_container);
if (fragment instanceof MainFragment && fragment.getView() != null) try {
if (fragment != null && fragment.getView() != null && !fragment.supressMenu) try {
fragment.getView().post(fragment::showImmersionMenu);
return true;
} catch (Throwable t) {}


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

@ -8,6 +8,7 @@ import android.content.DialogInterface;
import android.content.pm.PackageManager;
import android.content.res.AssetManager;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.os.Handler;
@ -17,7 +18,12 @@ import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceCategory;
import android.preference.PreferenceScreen;
import android.text.Editable;
import android.text.Layout;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.TextWatcher;
import android.text.style.AlignmentSpan;
import android.text.style.LineHeightSpan;
import android.view.ActionMode;
import android.view.KeyEvent;
import android.view.LayoutInflater;
@ -69,7 +75,7 @@ import name.mikanoshi.customiuizer.utils.ModSearchAdapter;
public class MainFragment extends PreferenceFragmentBase {
private CategorySelector catSelector = new CategorySelector();
private final CategorySelector catSelector = new CategorySelector();
public System prefSystem = new System();
public Launcher prefLauncher = new Launcher();
public Controls prefControls = new Controls();
@ -176,7 +182,7 @@ public class MainFragment extends PreferenceFragmentBase {
}
};
private Runnable showUpdateNotification = new Runnable() {
private final Runnable showUpdateNotification = new Runnable() {
@Override
public void run() {
if (getView() != null) try {
@ -186,7 +192,7 @@ public class MainFragment extends PreferenceFragmentBase {
}
};
private Runnable hideUpdateNotification = new Runnable() {
private final Runnable hideUpdateNotification = new Runnable() {
@Override
public void run() {
if (getView() != null) try {
@ -289,7 +295,7 @@ public class MainFragment extends PreferenceFragmentBase {
}
public View onInflateView(LayoutInflater inflater, ViewGroup group, Bundle bundle) {
return inflater.inflate(R.layout.prefs_main, group, false);
return inflater.inflate(Helpers.is12() ? R.layout.prefs_main12 : R.layout.prefs_main, group, false);
}
private void openActionMode(boolean isNew) {
@ -298,6 +304,34 @@ public class MainFragment extends PreferenceFragmentBase {
fixActionBar();
}
private static class SetLineOverlap implements LineHeightSpan {
private int originalBottom = 15;
private int originalDescent = 13;
private final Boolean overlap;
private Boolean overlapSaved = false;
SetLineOverlap(Boolean overlap) {
this.overlap = overlap;
}
@Override
public void chooseHeight(CharSequence text, int start, int end, int spanstartv, int v, Paint.FontMetricsInt fm) {
if (overlap) {
if (!overlapSaved) {
originalBottom = fm.bottom;
originalDescent = fm.descent;
overlapSaved = true;
}
fm.bottom += fm.top;
fm.descent += fm.top;
} else {
fm.bottom = originalBottom;
fm.descent = originalDescent;
overlapSaved = false;
}
}
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
@ -407,23 +441,32 @@ public class MainFragment extends PreferenceFragmentBase {
locales = (String[])getNonSystemLocales.invoke(am);
if (locales == null) locales = new String[] {};
} catch (Throwable t) {
locales = new String[] { "it", "ru-RU", "tr", "uk-UK", "zh-CN" };
locales = new String[] { "de", "es", "it", "pt-BR", "ru-RU", "tr", "uk-UK", "zh-CN" };
}
ArrayList<String> localesArr = new ArrayList<String>(Arrays.asList(locales));
ArrayList<String> localeNames = new ArrayList<String>();
ArrayList<SpannableString> localeNames = new ArrayList<SpannableString>();
localesArr.add(0, "en");
for (String locale: localesArr) try {
Locale loc = Locale.forLanguageTag(locale);
StringBuilder locStr = new StringBuilder(loc.getDisplayLanguage(loc));
locStr.setCharAt(0, Character.toUpperCase(locStr.charAt(0)));
localeNames.add(locStr.toString());
SpannableString locSpanString;
if (!locale.equals("en")) {
String locStrPct = locStr.toString() + "\n" + Helpers.l10nProgress.get(locale);
int fullTextLength = locStrPct.length();
locSpanString = new SpannableString(locStrPct);
locSpanString.setSpan(new AlignmentSpan.Standard(Layout.Alignment.ALIGN_OPPOSITE), locStr.toString().length(), fullTextLength, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
locSpanString.setSpan(new SetLineOverlap(true), 1, fullTextLength - 2, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
locSpanString.setSpan(new SetLineOverlap(false), fullTextLength - 1, fullTextLength, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
} else locSpanString = new SpannableString(locStr.toString());
localeNames.add(locSpanString);
} catch (Throwable t) {
localeNames.add(Locale.getDefault().getDisplayLanguage(Locale.getDefault()));
localeNames.add(new SpannableString(Locale.getDefault().getDisplayLanguage(Locale.getDefault())));
}
localesArr.add(0, "auto");
localeNames.add(0, getString(R.string.array_system_default));
localeNames.add(0, new SpannableString(getString(R.string.array_system_default)));
ListPreferenceEx locale = (ListPreferenceEx)findPreference("pref_key_miuizer_locale");
locale.setEntries(localeNames.toArray(new CharSequence[0]));


+ 28
- 18
app/src/main/java/name/mikanoshi/customiuizer/MainModule.java View File

@ -53,7 +53,7 @@ public class MainModule implements IXposedHookZygoteInit, IXposedHookLoadPackage
if (mPrefs.getInt("system_statusbarheight", 19) > 19) System.StatusBarHeightRes();
if (mPrefs.getInt("system_qsgridcolumns", 2) > 2 || mPrefs.getInt("system_qsgridrows", 1) > 1) System.QSGridRes();
if (mPrefs.getInt("system_qqsgridcolumns", 2) > 2) System.QQSGridRes();
if (mPrefs.getInt("controls_navbarheight", 26) > 26) Controls.NavbarHeightRes();
if (mPrefs.getInt("controls_navbarheight", 19) > 19) Controls.NavbarHeightRes();
if (mPrefs.getInt("launcher_horizmargin", 0) > 0) Launcher.HorizontalSpacingRes();
if (mPrefs.getInt("launcher_topmargin", 0) > 0) Launcher.TopSpacingRes();
if (mPrefs.getInt("launcher_bottommargin", 0) > 0) Launcher.BottomSpacingRes();
@ -80,7 +80,7 @@ public class MainModule implements IXposedHookZygoteInit, IXposedHookLoadPackage
if (mPrefs.getBoolean("system_statusbarcolor")) System.StatusBarBackgroundHook();
if (mPrefs.getBoolean("system_magnifier") && Helpers.isPiePlus()) System.TextMagnifierHook();
if (mPrefs.getBoolean("system_lockscreenshortcuts") || mPrefs.getInt("controls_powerdt_action", 1) > 1) System.LockScreenSecureLaunchHook();
if (mPrefs.getBoolean("system_notifmediaseekbar")) System.MediaNotificationSeekBarHook();
if (mPrefs.getBoolean("system_notifmediaseekbar") && !Helpers.is12()) System.MediaNotificationSeekBarHook();
if (mPrefs.getBoolean("system_disableanynotif") && !Helpers.isNougat()) System.DisableAnyNotificationBlockHook();
if (mPrefs.getBoolean("system_apksign")) System.NoSignatureVerifyHook();
if (mPrefs.getBoolean("system_nooverscroll")) System.NoOverscrollHook();
@ -161,6 +161,7 @@ public class MainModule implements IXposedHookZygoteInit, IXposedHookLoadPackage
if (mPrefs.getBoolean("system_vibration_amp")) System.MuffledVibrationHook(lpparam);
if (mPrefs.getBoolean("system_clearalltasks")) System.ClearAllTasksHook(lpparam);
if (mPrefs.getBoolean("system_snoozedmanager")) System.MoreSnoozeOptionsServiceHook(lpparam);
if (mPrefs.getBoolean("system_nodarkforce")) System.NoDarkForceHook(lpparam);
if (mPrefs.getBoolean("controls_powerflash")) Controls.PowerKeyHook(lpparam);
if (mPrefs.getBoolean("controls_fingerprintfailure")) Controls.FingerprintHapticFailureHook(lpparam);
if (mPrefs.getBoolean("controls_fingerprintscreen")) Controls.FingerprintScreenOnHook(lpparam);
@ -172,6 +173,7 @@ public class MainModule implements IXposedHookZygoteInit, IXposedHookLoadPackage
if (mPrefs.getStringAsInt("system_nolightuponcharges", 1) > 1) System.NoLightUpOnChargeHook(lpparam);
if (mPrefs.getStringAsInt("system_autogroupnotif", 1) > 1) System.AutoGroupNotificationsHook(lpparam);
if (mPrefs.getStringAsInt("system_vibration", 1) > 1) System.SelectiveVibrationHook(lpparam);
if (mPrefs.getStringAsInt("system_rotateanim", 1) > 1 && Helpers.is12()) System.RotationAnimatinoHook(lpparam);
if (mPrefs.getStringAsInt("controls_fingerprintsuccess", 1) > 1) Controls.FingerprintHapticSuccessHook(lpparam);
if (mPrefs.getStringAsInt("controls_volumemedia_up", 0) > 0 ||
mPrefs.getStringAsInt("controls_volumemedia_down", 0) > 0) Controls.VolumeMediaButtonsHook(lpparam);
@ -201,8 +203,8 @@ public class MainModule implements IXposedHookZygoteInit, IXposedHookLoadPackage
if (mPrefs.getInt("system_volumeblur_collapsed", 0) > 0 || mPrefs.getInt("system_volumeblur_expanded", 0) > 0) System.BlurVolumeDialogBackgroundHook(lpparam);
if (mPrefs.getInt("system_lstimeout", 9) > 9) System.LockScreenTimeoutHook(lpparam);
if (mPrefs.getInt("system_screenshot_floattime", 0) > 0) System.ScreenshotFloatTimeHook(lpparam);
if (mPrefs.getInt("controls_fsg_coverage", 60) != 60) Controls.BackGestureAreaHeightHook(lpparam);
if (mPrefs.getInt("controls_fsg_width", 100) > 100) Controls.BackGestureAreaWidthHook(lpparam);
if (mPrefs.getInt("controls_fsg_coverage", 60) != 60) Controls.BackGestureAreaHeightHook(lpparam, true);
if (mPrefs.getInt("controls_fsg_width", 100) > 100) Controls.BackGestureAreaWidthHook(lpparam, true);
if (mPrefs.getInt("controls_navbarleft_action", 1) > 1 ||
mPrefs.getInt("controls_navbarleftlong_action", 1) > 1 ||
mPrefs.getInt("controls_navbarright_action", 1) > 1 ||
@ -234,7 +236,7 @@ public class MainModule implements IXposedHookZygoteInit, IXposedHookLoadPackage
if (mPrefs.getBoolean("system_batteryindicator")) System.BatteryIndicatorHook(lpparam);
if (mPrefs.getBoolean("system_disableanynotif")) System.DisableAnyNotificationHook();
if (mPrefs.getBoolean("system_lockscreenshortcuts")) System.LockScreenShortcutHook(lpparam);
if (mPrefs.getBoolean("system_notifmediaseekbar")) System.MediaNotificationSeekBarSysUIHook(lpparam);
if (mPrefs.getBoolean("system_notifmediaseekbar") && !Helpers.is12()) System.MediaNotificationSeekBarSysUIHook(lpparam);
if (mPrefs.getBoolean("system_4gtolte")) System.Network4GtoLTEHook(lpparam);
if (mPrefs.getBoolean("system_showlux")) System.BrightnessLuxHook(lpparam);
if (mPrefs.getBoolean("system_showpct")) System.BrightnessPctHook(lpparam);
@ -254,6 +256,7 @@ public class MainModule implements IXposedHookZygoteInit, IXposedHookLoadPackage
if (mPrefs.getBoolean("system_taptounlock")) System.TapToUnlockHook(lpparam);
if (mPrefs.getBoolean("system_nosos")) System.NoSOSHook(lpparam);
if (mPrefs.getBoolean("system_usenativerecents")) System.UseNativeRecentsHook(lpparam);
if (mPrefs.getBoolean("system_morenotif")) System.MoreNotificationsHook(lpparam);
if (mPrefs.getBoolean("launcher_nounlockanim")) System.NoUnlockAnimationHook(lpparam);
if (mPrefs.getBoolean("system_statusbaricons_battery1")) System.HideIconsBattery1Hook(lpparam);
if (mPrefs.getBoolean("system_statusbaricons_battery2")) System.HideIconsBattery2Hook(lpparam);
@ -275,6 +278,7 @@ public class MainModule implements IXposedHookZygoteInit, IXposedHookLoadPackage
if (mPrefs.getStringAsInt("system_inactivebrightness", 1) > 1) System.InactiveBrightnessSliderHook(lpparam);
if (mPrefs.getStringAsInt("system_mobiletypeicon", 1) > 1) System.HideNetworkTypeHook(lpparam);
if (mPrefs.getStringAsInt("system_statusbaricons_bluetooth", 1) > 1) System.HideIconsBluetoothHook(lpparam);
if (mPrefs.getStringAsInt("system_maxsbicons", 0) != 0) System.MaxNotificationIconsHook(lpparam);
if (hideIconsActive) System.HideIconsHook(lpparam);
}
@ -293,7 +297,10 @@ public class MainModule implements IXposedHookZygoteInit, IXposedHookLoadPackage
}
if (pkg.equals("com.android.settings")) {
GlobalActions.miuizerSettingsInit(lpparam);
if (Helpers.is12())
GlobalActions.miuizerSettingsInit12(lpparam);
else
GlobalActions.miuizerSettingsInit(lpparam);
if (mPrefs.getBoolean("system_separatevolume")) System.NotificationVolumeSettingsHook(lpparam);
if (mPrefs.getBoolean("system_disableanynotif")) System.DisableAnyNotificationHook();
if (!mPrefs.getString("system_defaultusb", "none").equals("none")) System.USBConfigSettingsHook(lpparam);
@ -309,21 +316,21 @@ public class MainModule implements IXposedHookZygoteInit, IXposedHookLoadPackage
if (mPrefs.getBoolean("various_installappinfo")) Various.AppInfoDuringMiuiInstallHook(lpparam);
}
if (pkg.equals("com.miui.home") || pkg.equals("com.mi.android.globallauncher")) {
if (mPrefs.getBoolean("launcher_compat")) handleLoadLauncher(lpparam); else
Helpers.findAndHookMethod(Application.class, "attach", Context.class, new MethodHook() {
@Override
protected void after(MethodHookParam param) throws Throwable {
handleLoadLauncher(lpparam);
}
});
}
final boolean isLauncherPkg = pkg.equals("com.miui.home") || pkg.equals("com.mi.android.globallauncher");
final boolean isLauncherPerf = mPrefs.getBoolean("launcher_compat");
final boolean isStatusBarColor = mPrefs.getBoolean("system_statusbarcolor") && !mPrefs.getStringSet("system_statusbarcolor_apps").contains(pkg);
final int collapseTitlesOpt = mPrefs.getStringAsInt("various_collapsemiuititles", 1);
final boolean collapseTitles = collapseTitlesOpt > 1 && Helpers.is12();
if (isLauncherPkg && isLauncherPerf) handleLoadLauncher(lpparam);
if (mPrefs.getBoolean("system_statusbarcolor") && !mPrefs.getStringSet("system_statusbarcolor_apps").contains(pkg))
if ((isLauncherPkg && !isLauncherPerf) || isStatusBarColor || collapseTitles)
Helpers.findAndHookMethod(Application.class, "attach", Context.class, new MethodHook() {
@Override
protected void after(MethodHookParam param) throws Throwable {
System.StatusBarBackgroundCompatHook(lpparam);
if (isLauncherPkg && !isLauncherPerf) handleLoadLauncher(lpparam);
if (isStatusBarColor) System.StatusBarBackgroundCompatHook(lpparam);
if (collapseTitles) Various.CollapseMIUITitlesHook(lpparam, param, collapseTitlesOpt);
}
});
}
@ -359,8 +366,10 @@ public class MainModule implements IXposedHookZygoteInit, IXposedHookLoadPackage
mPrefs.getInt("system_recommended_second_action", 1) > 1 ||
mPrefs.getInt("system_recommended_third_action", 1) > 1 ||
mPrefs.getInt("system_recommended_fourth_action", 1) > 1) System.CustomRecommendedHook(lpparam, true);
if (mPrefs.getBoolean("system_removecleaner")) System.HideMemoryCleanHook(lpparam, true);
if (mPrefs.getInt("controls_fsg_coverage", 60) != 60) Controls.BackGestureAreaHeightHook(lpparam, false);
if (mPrefs.getInt("controls_fsg_width", 100) > 100) Controls.BackGestureAreaWidthHook(lpparam, false);
if (mPrefs.getBoolean("controls_fsg_horiz")) Launcher.FSGesturesHook(lpparam);
if (mPrefs.getBoolean("system_removecleaner")) System.HideMemoryCleanHook(lpparam, true);
if (mPrefs.getBoolean("launcher_fixstatusbarmode")) Launcher.FixStatusBarModeHook(lpparam);
if (mPrefs.getBoolean("launcher_fixanim")) Launcher.FixAnimHook(lpparam);
if (mPrefs.getBoolean("launcher_hideseekpoints")) Launcher.HideSeekPointsHook(lpparam);
@ -370,6 +379,7 @@ public class MainModule implements IXposedHookZygoteInit, IXposedHookLoadPackage
if (mPrefs.getBoolean("launcher_folderblur")) Launcher.FolderBlurHook(lpparam);
if (mPrefs.getBoolean("launcher_nounlockanim")) Launcher.NoUnlockAnimationHook(lpparam);
if (mPrefs.getBoolean("launcher_oldlaunchanim")) Launcher.UseOldLaunchAnimationHook(lpparam);
if (mPrefs.getBoolean("launcher_unlockgrids")) Launcher.UnlockGridsHook(lpparam);
if (mPrefs.getInt("launcher_bottommargin", 0) > 0) Launcher.BottomSpacingHook(lpparam);
}
//if (!mPrefs.getString("system_clock_app", "").equals("")) Launcher.ReplaceClockAppHook(lpparam);


+ 29
- 23
app/src/main/java/name/mikanoshi/customiuizer/PreferenceFragmentBase.java View File

@ -46,6 +46,7 @@ import java.util.Set;
import miui.app.ActionBar;
import miui.app.AlertDialog;
import miui.preference.PreferenceFragment;
import name.mikanoshi.customiuizer.mods.GlobalActions;
import name.mikanoshi.customiuizer.utils.Helpers;
@ -166,29 +167,34 @@ public class PreferenceFragmentBase extends PreferenceFragment {
}
private void setupImmersiveMenu() {
if (supressMenu) return;
ActionBar actionBar = getActionBar();
if (Helpers.is12()) {
if (actionBar != null) actionBar.setExpandState(ActionBar.STATE_COLLAPSE, false);
}
if (supressMenu) return;
if (actionBar != null) actionBar.showSplitActionBar(false, false);
setImmersionMenuEnabled(true);
if (getView() != null)
if (getView().findViewById(R.id.update_alert) == null) {
Button more = getView().findViewById(getResources().getIdentifier("more", "id", "miui"));
if (more == null) return;
float density = getResources().getDisplayMetrics().density;
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, FrameLayout.LayoutParams.WRAP_CONTENT);
lp.gravity = Gravity.END | Gravity.TOP;
ImageView alert = new ImageView(getContext());
alert.setImageResource(R.drawable.alert);
alert.setAdjustViewBounds(true);
alert.setMaxWidth(Math.round(16 * density));
alert.setMaxHeight(Math.round(16 * density));
alert.setLayoutParams(lp);
alert.setId(R.id.update_alert);
alert.setVisibility(View.GONE);
((ViewGroup)more.getParent()).addView(alert);
}
View view = getView();
if (view != null)
if (view.findViewById(R.id.update_alert) == null) {
Button more = view.findViewById(getResources().getIdentifier("more", "id", "miui"));
if (more == null) return;
float density = getResources().getDisplayMetrics().density;
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, FrameLayout.LayoutParams.WRAP_CONTENT);
lp.gravity = Gravity.END | Gravity.TOP;
ImageView alert = new ImageView(getContext());
alert.setImageResource(R.drawable.alert);
alert.setAdjustViewBounds(true);
alert.setMaxWidth(Math.round(16 * density));
alert.setMaxHeight(Math.round(16 * density));
alert.setLayoutParams(lp);
alert.setId(R.id.update_alert);
alert.setVisibility(View.GONE);
((ViewGroup)more.getParent()).addView(alert);
}
}
void fixActionBar() {
@ -219,10 +225,10 @@ public class PreferenceFragmentBase extends PreferenceFragment {
}
} else showBack = !(this instanceof SnoozedFragment);
getActionBar().setTitle(R.string.app_name);
getActionBar().setDisplayHomeAsUpEnabled(showBack);
getActionBar().setBackgroundDrawable(new ColorDrawable(Helpers.getSystemBackgroundColor(getValidContext())));
ActionBar actionBar = getActionBar();
actionBar.setTitle(R.string.app_name);
actionBar.setDisplayHomeAsUpEnabled(showBack);
actionBar.setBackgroundDrawable(new ColorDrawable(Helpers.getSystemBackgroundColor(getValidContext())));
}
public void onCreate(Bundle savedInstanceState, int pref_defaults) {


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

@ -22,7 +22,7 @@ import name.mikanoshi.customiuizer.utils.Helpers;
public class SharedPrefsProvider extends ContentProvider {
public static final String AUTHORITY = "name.mikanoshi.customiuizer.provider.sharedprefs";
private static UriMatcher uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
private static final UriMatcher uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
SharedPreferences prefs;


+ 0
- 1
app/src/main/java/name/mikanoshi/customiuizer/SnoozedFragment.java View File

@ -49,7 +49,6 @@ public class SnoozedFragment extends PreferenceFragmentBase {
BroadcastReceiver updateReceiver = new BroadcastReceiver() {
@Override
@SuppressWarnings("ConstantConditions")
public void onReceive(Context context, Intent intent) {
handler.removeCallbacks(fetchFailed);
HashMap<String, ArrayList<SnoozeData>> tmpList = new HashMap<String, ArrayList<SnoozeData>>();


+ 31
- 18
app/src/main/java/name/mikanoshi/customiuizer/crashreport/Dialog.java View File

@ -13,6 +13,8 @@ import java.lang.reflect.Field;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Objects;
import java.util.zip.GZIPOutputStream;
@ -33,7 +35,6 @@ import android.content.DialogInterface;
import android.content.DialogInterface.OnCancelListener;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
@ -72,13 +73,13 @@ public class Dialog extends Activity {
private CrashReportData crashData;
private CoreConfiguration config;
private File reportFile;
private StringBuilder debugLog = new StringBuilder();
private final StringBuilder debugLog = new StringBuilder();
private EditText desc;
String errorText = null;
private boolean isNetworkAvailable() {
ConnectivityManager connectivityManager = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
NetworkInfo activeNetworkInfo = connectivityManager == null ? null : connectivityManager.getActiveNetworkInfo();
return activeNetworkInfo != null && activeNetworkInfo.isConnected();
}
@ -301,8 +302,9 @@ public class Dialog extends Activity {
errorLogFile = sdcardLog;
} else if (errorLog != null) {
errorLogFile = new File(errorLog);
debugLog.append("Log found: ").append(errorLog).append("\n");
} else debugLog.append("No Xposed log found!\n");
if (errorLogFile.exists() && errorLogFile.canRead())
debugLog.append("Log found in installer: ").append(errorLog).append("\n");
}
if (errorLogFile != null)
try (BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(errorLogFile)))) {
@ -312,7 +314,7 @@ public class Dialog extends Activity {
xposedLog = sb.toString();
} catch (Throwable t) {
debugLog.append("Error reading log: ").append(t.getMessage()).append("\n");
}
} else debugLog.append("No accessble Xposed log found!\n");
if (sdcardLog.exists()) sdcardLog.delete();
} catch (Throwable t) {}
@ -360,17 +362,28 @@ public class Dialog extends Activity {
} catch (Throwable t) {}
} catch (Throwable t) {}
final String[] xposedPropFiles = new String[]{
"/system/framework/edconfig.jar", // EdXposed
"/system/xposed.prop", // Classic
"/magisk/xposed/system/xposed.prop",
"/magisk/PurifyXposed/system/xposed.prop",
"/su/xposed/system/xposed.prop",
"/vendor/xposed.prop",
"/xposed/xposed.prop",
"/xposed.prop",
"/su/xposed/xposed.prop"
};
final ArrayList<String> xposedPropFiles = new ArrayList<String>(Arrays.asList(
"/system/framework/edconfig.jar", // EdXposed
"/system/xposed.prop", // Classic
"/magisk/xposed/system/xposed.prop",
"/magisk/PurifyXposed/system/xposed.prop",
"/su/xposed/system/xposed.prop",
"/vendor/xposed.prop",
"/xposed/xposed.prop",
"/xposed.prop",
"/su/xposed/xposed.prop"
));
File[] files = new File("/system/framework").listFiles();
if (files != null && files.length > 0)
for (File file: files) try {
long fsize = file.length();
if (fsize < 128) {
xposedPropFiles.add(file.getAbsolutePath());
break;
}
} catch (Throwable ignore) {}
for (String prop: xposedPropFiles) {
File propFile = new File(prop);
if (propFile.exists() && propFile.canRead()) {
@ -531,7 +544,7 @@ public class Dialog extends Activity {
InputMethodManager inputManager = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
View currentFocusedView = getCurrentFocus();
if (currentFocusedView != null)
inputManager.hideSoftInputFromWindow(currentFocusedView.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
inputManager.hideSoftInputFromWindow(currentFocusedView.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
} catch (Throwable t) {
Log.e("miuizer", t.getMessage());
}


+ 39
- 35
app/src/main/java/name/mikanoshi/customiuizer/mods/Controls.java View File

@ -69,7 +69,7 @@ public class Controls {
context.sendBroadcast(intent);
}
private static BroadcastReceiver mScreenOnReceiver = new BroadcastReceiver() {
private static final BroadcastReceiver mScreenOnReceiver = new BroadcastReceiver() {
public void onReceive(final Context context, Intent intent) {
if (isTorchEnabled(context)) setTorch(context, false);
if (Helpers.mWakeLock != null && Helpers.mWakeLock.isHeld()) Helpers.mWakeLock.release();
@ -580,12 +580,13 @@ public class Controls {
@SuppressLint("StaticFieldLeak")
private static Context miuiPWMContext;
private static Handler miuiPWMHandler;
private static boolean hasDoubleTap = false;
private static boolean wasScreenOn = false;
private static boolean wasFingerprintUsed = false;
private static boolean isFingerprintPressed = false;
private static boolean isFingerprintLongPressed = false;
private static boolean isFingerprintLongPressHandled = false;
private static Runnable singlePressFingerprint = new Runnable() {
private static final Runnable singlePressFingerprint = new Runnable() {
@Override
public void run() {
if (miuiPWMContext == null || miuiPWMHandler == null) return;
@ -593,7 +594,7 @@ public class Controls {
if (!handleCallAction(2)) GlobalActions.handleAction(miuiPWMContext, "pref_key_controls_fingerprint1");
}
};
private static Runnable longPressFingerprint = new Runnable() {
private static final Runnable longPressFingerprint = new Runnable() {
@Override
public void run() {
if (isFingerprintPressed) {
@ -654,6 +655,12 @@ public class Controls {
miuiPWMHandler = (Handler)XposedHelpers.getObjectField(param.thisObject, "mHandler");
if (miuiPWMContext == null || miuiPWMHandler == null) return;
boolean isInCall = false;
if (miuiPWMContext != null) {
TelecomManager tm = (TelecomManager)miuiPWMContext.getSystemService(Context.TELECOM_SERVICE);
isInCall = tm != null && tm.isInCall();
}
KeyEvent keyEvent = (KeyEvent)param.args[0];
if (keyEvent.getKeyCode() != KeyEvent.KEYCODE_DPAD_CENTER || keyEvent.getAction() != KeyEvent.ACTION_DOWN) return;
@ -661,10 +668,23 @@ public class Controls {
wasScreenOn = (boolean)XposedHelpers.callMethod(param.thisObject, "isScreenOn");
wasFingerprintUsed = Settings.System.getInt(miuiPWMContext.getContentResolver(), "is_fingerprint_active", 0) == 1;
if (wasScreenOn && !wasFingerprintUsed)
if (MainModule.mPrefs.getInt("controls_fingerprintlong_action", 1) > 1) {
hasDoubleTap = false;
if (wasScreenOn && !wasFingerprintUsed) {
int delay = MainModule.mPrefs.getInt("controls_fingerprintlong_delay", 0);
miuiPWMHandler.postDelayed(longPressFingerprint, delay < 200 ? ViewConfiguration.getLongPressTimeout() : delay);
if (isInCall) {
int accept = MainModule.mPrefs.getStringAsInt("controls_fingerprint_accept", 1);
int reject = MainModule.mPrefs.getStringAsInt("controls_fingerprint_reject", 1);
int hangup = MainModule.mPrefs.getStringAsInt("controls_fingerprint_hangup", 1);
hasDoubleTap = accept == 3 || reject == 3 || hangup == 3;
if (accept == 4 || reject == 4 || hangup == 4)
miuiPWMHandler.postDelayed(longPressFingerprint, delay < 200 ? ViewConfiguration.getLongPressTimeout() : delay);
} else {
int dtaction = MainModule.mPrefs.getInt("controls_fingerprint2_action", 1);
hasDoubleTap = dtaction > 1;
if (MainModule.mPrefs.getInt("controls_fingerprintlong_action", 1) > 1)
miuiPWMHandler.postDelayed(longPressFingerprint, delay < 200 ? ViewConfiguration.getLongPressTimeout() : delay);
}
}
if (XposedHelpers.getAdditionalInstanceField(param.thisObject, "touchTime") == null)
@ -682,12 +702,6 @@ public class Controls {
}
}
boolean isInCall = false;
if (miuiPWMContext != null) {
TelecomManager tm = (TelecomManager)miuiPWMContext.getSystemService(Context.TELECOM_SERVICE);
isInCall = tm != null && tm.isInCall();
}
KeyEvent keyEvent = (KeyEvent)param.args[0];
if (keyEvent.getKeyCode() != KeyEvent.KEYCODE_DPAD_CENTER || keyEvent.getAction() != KeyEvent.ACTION_UP) return;
@ -701,16 +715,6 @@ public class Controls {
int delay = MainModule.mPrefs.getInt("controls_fingerprint2_delay", 50);
int dttimeout = delay < 200 ? ViewConfiguration.getDoubleTapTimeout() : delay;
if (wasScreenOn && !wasFingerprintUsed) {
boolean hasDoubleTap;
if (isInCall) {
int accept = MainModule.mPrefs.getStringAsInt("controls_fingerprint_accept", 1);
int reject = MainModule.mPrefs.getStringAsInt("controls_fingerprint_reject", 1);
int hangup = MainModule.mPrefs.getStringAsInt("controls_fingerprint_hangup", 1);
hasDoubleTap = accept == 3 || reject == 3 || hangup == 3;
} else {
int dtaction = MainModule.mPrefs.getInt("controls_fingerprint2_action", 1);
hasDoubleTap = dtaction > 1;
}
if (hasDoubleTap && currentTouchTime - lastTouchTime < dttimeout) {
mHandler.removeCallbacks(singlePressFingerprint);
mHandler.removeCallbacks(longPressFingerprint);
@ -787,7 +791,7 @@ public class Controls {
private static Object basePWMObject;
private static Method markShortcutTriggered;
private static Runnable mBackLongPressAction = new Runnable() {
private static final Runnable mBackLongPressAction = new Runnable() {
@Override
public void run() {
try {
@ -799,7 +803,7 @@ public class Controls {
}
}
};
private static Runnable mHomeLongPressAction = new Runnable() {
private static final Runnable mHomeLongPressAction = new Runnable() {
@Override
public void run() {
try {
@ -811,7 +815,7 @@ public class Controls {
}
}
};
private static Runnable mMenuLongPressAction = new Runnable() {
private static final Runnable mMenuLongPressAction = new Runnable() {
@Override
public void run() {
try {
@ -888,8 +892,8 @@ public class Controls {
}
public static void NavbarHeightRes() {
int opt = MainModule.mPrefs.getInt("controls_navbarheight", 26);
int heightDpi = opt == 26 ? 47 : opt;
int opt = MainModule.mPrefs.getInt("controls_navbarheight", 19);
int heightDpi = opt == 19 ? 47 : opt;
MainModule.resHooks.setDensityReplacement("*", "dimen", "navigation_bar_height", heightDpi);
MainModule.resHooks.setDensityReplacement("*", "dimen", "navigation_bar_height_landscape", heightDpi);
MainModule.resHooks.setDensityReplacement("*", "dimen", "navigation_bar_width", heightDpi);
@ -951,8 +955,8 @@ public class Controls {
});
}
public static void BackGestureAreaHeightHook(LoadPackageParam lpparam) {
Helpers.findAndHookMethod("com.android.systemui.fsgesture.GestureStubView", lpparam.classLoader, "getGestureStubWindowParam", new MethodHook() {
public static void BackGestureAreaHeightHook(LoadPackageParam lpparam, boolean isNative) {
if (!Helpers.findAndHookMethodSilently(isNative ? "com.android.systemui.fsgesture.GestureStubView" : "com.miui.home.recents.GestureStubView", lpparam.classLoader, "getGestureStubWindowParam", new MethodHook() {
@Override
protected void after(final MethodHookParam param) throws Throwable {
WindowManager.LayoutParams lp = (WindowManager.LayoutParams)param.getResult();
@ -960,11 +964,11 @@ public class Controls {
lp.height = Math.round(lp.height / 60.0f * pct);
param.setResult(lp);
}
});
})) if (isNative) Helpers.log("BackGestureAreaHeightHook", "Cannot hook GestureStubView");
}
public static void BackGestureAreaWidthHook(LoadPackageParam lpparam) {
Helpers.findAndHookMethod("com.android.systemui.fsgesture.GestureStubView", lpparam.classLoader, "initScreenSizeAndDensity", int.class, new MethodHook() {
public static void BackGestureAreaWidthHook(LoadPackageParam lpparam, boolean isNative) {
if (!Helpers.findAndHookMethodSilently(isNative ? "com.android.systemui.fsgesture.GestureStubView" : "com.miui.home.recents.GestureStubView", lpparam.classLoader, "initScreenSizeAndDensity", int.class, new MethodHook() {
@Override
protected void after(final MethodHookParam param) throws Throwable {
int pct = MainModule.mPrefs.getInt("controls_fsg_width", 100);
@ -976,9 +980,9 @@ public class Controls {
XposedHelpers.setIntField(param.thisObject, "mGestureStubDefaultSize", mGestureStubDefaultSize);
XposedHelpers.setIntField(param.thisObject, "mGestureStubSize", mGestureStubSize);
}
});
})) if (isNative) Helpers.log("BackGestureAreaWidthHook", "Cannot hook GestureStubView1");
Helpers.findAndHookMethod("com.android.systemui.fsgesture.GestureStubView", lpparam.classLoader, "setSize", int.class, new MethodHook() {
if (!Helpers.findAndHookMethodSilently(isNative ? "com.android.systemui.fsgesture.GestureStubView" : "com.miui.home.recents.GestureStubView", lpparam.classLoader, "setSize", int.class, new MethodHook() {
@Override
protected void before(final MethodHookParam param) throws Throwable {
int pct = MainModule.mPrefs.getInt("controls_fsg_width", 100);
@ -987,7 +991,7 @@ public class Controls {
if ((int)param.args[0] == mGestureStubDefaultSize) return;
param.args[0] = Math.round((int)param.args[0] * pct / 100f);
}
});
})) if (isNative) Helpers.log("BackGestureAreaWidthHook", "Cannot hook GestureStubView2");
}
public static void HideNavBarHook(LoadPackageParam lpparam) {


+ 53
- 7
app/src/main/java/name/mikanoshi/customiuizer/mods/GlobalActions.java View File

@ -136,7 +136,7 @@ public class GlobalActions {
}
}
private static BroadcastReceiver mSBReceiver = new BroadcastReceiver() {
private static final BroadcastReceiver mSBReceiver = new BroadcastReceiver() {
@SuppressLint("WrongConstant")
public void onReceive(final Context context, Intent intent) {
try {
@ -306,8 +306,7 @@ public class GlobalActions {
}
};
private static BroadcastReceiver mGlobalReceiver = new BroadcastReceiver() {
@SuppressWarnings("ConstantConditions")
private static final BroadcastReceiver mGlobalReceiver = new BroadcastReceiver() {
@SuppressLint({"MissingPermission", "WrongConstant", "NewApi"})
public void onReceive(final Context context, Intent intent) {
try {
@ -706,6 +705,56 @@ public class GlobalActions {
}
});
}
public static void miuizerSettingsInit12(LoadPackageParam lpparam) {
Method[] methods = XposedHelpers.findMethodsByExactParameters(findClass("com.android.settings.MiuiSettings", lpparam.classLoader), void.class, List.class);
for (Method method: methods)
if (Modifier.isPublic(method.getModifiers()))
Helpers.hookMethod(method, new MethodHook() {
@Override
@SuppressWarnings("unchecked")
protected void after(final MethodHookParam param) throws Throwable {
if (param.args[0] == null) return;
Context mContext = ((Activity)param.thisObject).getBaseContext();
int opt = Integer.parseInt(Helpers.getSharedStringPref(mContext, "pref_key_miuizer_settingsiconpos", "2"));
if (opt == 0) return;
Resources modRes = Helpers.getModuleRes(mContext);
Class<?> headerCls = XposedHelpers.findClassIfExists("com.android.settingslib.miuisettings.preference.PreferenceActivity$Header", lpparam.classLoader);
if (headerCls == null) return;
Object header = XposedHelpers.newInstance(headerCls);
XposedHelpers.setLongField(header, "id", 666);
XposedHelpers.setObjectField(header, "intent", new Intent().setClassName(Helpers.modulePkg, GateWaySettings.class.getCanonicalName()));
XposedHelpers.setIntField(header, "iconRes", settingsIconResId);
XposedHelpers.setObjectField(header, "title", modRes.getString(R.string.app_name));
Bundle bundle = new Bundle();
ArrayList<UserHandle> users = new ArrayList<UserHandle>();
users.add((UserHandle)XposedHelpers.newInstance(UserHandle.class, 0));
bundle.putParcelableArrayList("header_user", users);
XposedHelpers.setObjectField(header, "extras", bundle);
int security = mContext.getResources().getIdentifier("security_status", "id", mContext.getPackageName());
int themes = mContext.getResources().getIdentifier("theme_settings", "id", mContext.getPackageName());
int special = mContext.getResources().getIdentifier("other_special_feature_settings", "id", mContext.getPackageName());
List<Object> headers = (List<Object>)param.args[0];
int position = 0;
for (Object head: headers) {
position++;
long id = XposedHelpers.getLongField(head, "id");
if (opt == 1 && id == security) { headers.add(position, header); return; }
if (opt == 2 && id == themes) { headers.add(position, header); return; }
if (opt == 3 && id == special) { headers.add(position, header); return; }
}
if (headers.size() > 25 )
headers.add(25, header);
else
headers.add(header);
}
});
}
public static void setupSystemHelpers() {
Helpers.findAndHookMethod(Application.class, "onCreate", new MethodHook() {
@ -858,7 +907,6 @@ public class GlobalActions {
intentfilter.addAction(ACTION_PREFIX + "SimulateMenu");
final Object thisObject = param.thisObject;
mContext.registerReceiver(new BroadcastReceiver() {
@SuppressWarnings("RedundantCast")
public void onReceive(final Context context, Intent intent) {
String action = intent.getAction();
if (action == null) return;
@ -876,7 +924,7 @@ public class GlobalActions {
} catch (Throwable t1) {
try {
Handler mHandler = (Handler)XposedHelpers.getObjectField(thisObject, "mHandler");
mHandler.sendMessageDelayed(mHandler.obtainMessage(1, "show_menu"), (long)ViewConfiguration.getLongPressTimeout());
mHandler.sendMessageDelayed(mHandler.obtainMessage(1, "show_menu"), ViewConfiguration.getLongPressTimeout());
} catch (Throwable t2) {
XposedBridge.log(t2);
}
@ -1330,7 +1378,6 @@ public class GlobalActions {
// }
// }
@SuppressWarnings("ConstantConditions")
public static boolean isMediaActionsAllowed(Context mContext) {
AudioManager am = (AudioManager)mContext.getSystemService(Context.AUDIO_SERVICE);
boolean isMusicActive = am.isMusicActive();
@ -1344,7 +1391,6 @@ public class GlobalActions {
return isAllowed;
}
@SuppressWarnings("ConstantConditions")
public static void sendDownUpKeyEvent(Context mContext, int keyCode, boolean vibrate) {
AudioManager am = (AudioManager)mContext.getSystemService(Context.AUDIO_SERVICE);
am.dispatchMediaKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, keyCode));


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

@ -4,6 +4,7 @@ import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.ActivityOptions;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.content.res.Resources;
@ -59,6 +60,7 @@ public class Launcher {
// private static GestureDetector mDetector;
private static GestureDetector mDetectorHorizontal;
@SuppressWarnings("ResultOfMethodCallIgnored")
public static void HomescreenSwipesHook(final LoadPackageParam lpparam) {
// // Detect vertical swipes
// Helpers.findAndHookMethod("com.miui.home.launcher.ForceTouchLayer", lpparam.classLoader, "onInterceptTouchEvent", MotionEvent.class, new MethodHook() {
@ -110,12 +112,87 @@ public class Launcher {
}
});
if (!Helpers.findAndHookMethodSilently("com.miui.home.launcher.DeviceConfig", lpparam.classLoader, "isGlobalSearchEnable", Context.class, new MethodHook() {
Helpers.findAndHookMethod("com.miui.home.launcher.Launcher", lpparam.classLoader, "onCreate", Bundle.class, new MethodHook() {
@Override
protected void after(final MethodHookParam param) throws Throwable {
final Activity act = (Activity)param.thisObject;
Handler mHandler = (Handler)XposedHelpers.getObjectField(act, "mHandler");
new Helpers.SharedPrefObserver(act, mHandler) {
@Override
public void onChange(Uri uri) {
try {
String type = uri.getPathSegments().get(1);
String key = uri.getPathSegments().get(2);
if (key.contains("pref_key_launcher_swipedown"))
switch (type) {
case "string":
MainModule.mPrefs.put(key, Helpers.getSharedStringPref(act, key, ""));
break;
case "integer":
MainModule.mPrefs.put(key, Helpers.getSharedIntPref(act, key, 1));
break;
case "boolean":
MainModule.mPrefs.put(key, Helpers.getSharedBoolPref(act, key, false));
break;
}
} catch (Throwable t) {
XposedBridge.log(t);
}
}
};
}
});
Helpers.findAndHookMethodSilently("com.miui.home.launcher.uioverrides.StatusBarSwipeController", lpparam.classLoader, "canInterceptTouch", MotionEvent.class, new MethodHook() {
@Override
protected void before(final MethodHookParam param) throws Throwable {
if (MainModule.mPrefs.getInt("launcher_swipedown_action", 1) > 1) param.setResult(false);
}
});
// content_center, global_search, notification_bar
Helpers.findAndHookMethodSilently("com.miui.home.launcher.allapps.LauncherMode", lpparam.classLoader, "getPullDownGesture", Context.class, new MethodHook() {
@Override
protected void after(final MethodHookParam param) throws Throwable {
if (Helpers.getSharedIntPref((Context)param.args[0], "pref_key_launcher_swipedown_action", 1) > 1) param.setResult("no_action");
}
});
// content_center, global_search
Helpers.findAndHookMethodSilently("com.miui.home.launcher.allapps.LauncherMode", lpparam.classLoader, "getSlideUpGesture", Context.class, new MethodHook() {
@Override
protected void before(final MethodHookParam param) throws Throwable {
if (Helpers.getSharedIntPref((Context)param.args[0], "pref_key_launcher_swipeup_action", 1) > 1) param.setResult("no_action");
}
});
if (Helpers.findAndHookMethodSilently("com.miui.home.launcher.DeviceConfig", lpparam.classLoader, "isGlobalSearchEnable", Context.class, new MethodHook() {
@Override
protected void before(final MethodHookParam param) throws Throwable {
if (Helpers.getSharedIntPref((Context)param.args[0], "pref_key_launcher_swipeup_action", 1) > 1) param.setResult(false);
}
})) if (!Helpers.findAndHookMethodSilently("com.miui.home.launcher.DeviceConfig", lpparam.classLoader, "allowedSlidingUpToStartGolbalSearch", Context.class, new MethodHook() {
})) {
Helpers.findAndHookMethodSilently("com.miui.home.launcher.search.SearchEdgeLayout", lpparam.classLoader, "isTopSearchEnable", new MethodHook() {
@Override
protected void before(final MethodHookParam param) throws Throwable {
View view = (View)param.thisObject;
if (Helpers.getSharedIntPref(view.getContext(), "pref_key_launcher_swipedown_action", 1) > 1) param.setResult(false);
}
});
Helpers.findAndHookMethodSilently("com.miui.home.launcher.search.SearchEdgeLayout", lpparam.classLoader, "isBottomGlobalSearchEnable", new MethodHook() {
@Override
protected void before(final MethodHookParam param) throws Throwable {
View view = (View)param.thisObject;
if (Helpers.getSharedIntPref(view.getContext(), "pref_key_launcher_swipeup_action", 1) > 1) param.setResult(false);
}
});
Helpers.findAndHookMethodSilently("com.miui.home.launcher.DeviceConfig", lpparam.classLoader, "isGlobalSearchBottomEffectEnable", Context.class, new MethodHook() {
@Override
protected void before(final MethodHookParam param) throws Throwable {
if (Helpers.getSharedIntPref((Context)param.args[0], "pref_key_launcher_swipeup_action", 1) > 1) param.setResult(false);
}
});
} else if (!Helpers.findAndHookMethodSilently("com.miui.home.launcher.DeviceConfig", lpparam.classLoader, "allowedSlidingUpToStartGolbalSearch", Context.class, new MethodHook() {
@Override
protected void before(final MethodHookParam param) throws Throwable {
if (Helpers.getSharedIntPref((Context)param.args[0], "pref_key_launcher_swipeup_action", 1) > 1) param.setResult(false);
@ -195,8 +272,8 @@ public class Launcher {
// Listener for horizontal swipes on hotseats
private static class SwipeListenerHorizontal extends GestureDetector.SimpleOnGestureListener {
private int SWIPE_MIN_DISTANCE_HORIZ;
private int SWIPE_THRESHOLD_VELOCITY;
private final int SWIPE_MIN_DISTANCE_HORIZ;
private final int SWIPE_THRESHOLD_VELOCITY;
final Context helperContext;
@ -256,7 +333,6 @@ public class Launcher {
}
private static Class<?> wallpaperUtilsCls = null;
@SuppressWarnings("ConstantConditions")
private static void applyFolderShade(View folder) {
int opt = Integer.parseInt(Helpers.getSharedStringPref(folder.getContext(), "pref_key_launcher_foldershade", "1"));
int level = Helpers.getSharedIntPref(folder.getContext(), "pref_key_launcher_foldershade_level", 40);
@ -462,8 +538,45 @@ public class Launcher {
});
}
@SuppressWarnings("ResultOfMethodCallIgnored")
public static void FSGesturesHook(LoadPackageParam lpparam) {
Helpers.findAndHookMethod("com.miui.home.launcher.DeviceConfig", lpparam.classLoader, "usingFsGesture", XC_MethodReplacement.returnConstant(true));
Helpers.findAndHookMethodSilently("com.miui.home.recents.BaseRecentsImpl", lpparam.classLoader, "createAndAddNavStubView", new MethodHook() {
@Override
protected void before(MethodHookParam param) throws Throwable {
boolean fsg = (boolean)XposedHelpers.getAdditionalStaticField(XposedHelpers.findClass("com.miui.home.recents.BaseRecentsImpl", lpparam.classLoader), "REAL_FORCE_FSG_NAV_BAR");
if (!fsg) param.setResult(null);
}
});
Helpers.findAndHookMethodSilently("com.miui.home.recents.BaseRecentsImpl", lpparam.classLoader, "updateFsgWindowState", new MethodHook() {
@Override
protected void after(MethodHookParam param) throws Throwable {
boolean fsg = (boolean)XposedHelpers.getAdditionalStaticField(XposedHelpers.findClass("com.miui.home.recents.BaseRecentsImpl", lpparam.classLoader), "REAL_FORCE_FSG_NAV_BAR");
if (fsg) return;
Object mNavStubView = XposedHelpers.getObjectField(param.thisObject, "mNavStubView");
Object mWindowManager = XposedHelpers.getObjectField(param.thisObject, "mWindowManager");
if (mWindowManager != null && mNavStubView != null) {
XposedHelpers.callMethod(mWindowManager, "removeView", mNavStubView);
XposedHelpers.setObjectField(param.thisObject, "mNavStubView", null);
}
}
});
Helpers.findAndHookMethodSilently("com.miui.launcher.utils.MiuiSettingsUtils", lpparam.classLoader, "getGlobalBoolean", ContentResolver.class, String.class, new MethodHook() {
@Override
protected void after(MethodHookParam param) throws Throwable {
if (!"force_fsg_nav_bar".equals(param.args[1])) return;
for (StackTraceElement el: Thread.currentThread().getStackTrace())
if ("com.miui.home.recents.BaseRecentsImpl".equals(el.getClassName())) {
XposedHelpers.setAdditionalStaticField(XposedHelpers.findClass("com.miui.home.recents.BaseRecentsImpl", lpparam.classLoader), "REAL_FORCE_FSG_NAV_BAR", param.getResult());
param.setResult(true);
return;
}
}
});
}
public static void FixStatusBarModeHook(LoadPackageParam lpparam) {