Skip to content

Commit

Permalink
14.17.0にアップデート(バージョン適合の更新)
Browse files Browse the repository at this point in the history
ステータスバーを黒くする機能
  • Loading branch information
areteruhiro committed Oct 27, 2024
1 parent 4075c13 commit 8dfe9aa
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ android {
minSdk 28
targetSdk 34
versionCode 15
versionName "1.11.0"
versionName "1.11.1"
multiDexEnabled false
proguardFiles += 'proguard-rules.pro'
buildConfigField 'String', 'HOOK_TARGET_VERSION', '"141600311"'
buildConfigField 'String', 'HOOK_TARGET_VERSION', '"141700420"'
}

signingConfigs {
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/io/github/hiro/lime/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ public void handleInitPackageResources(@NonNull XC_InitPackageResources.InitPack

XModuleResources xModuleResources = XModuleResources.createInstance(modulePath, resparam.res);

/* 背景色の変更
/*
resparam.res.setReplacement(Constants.PACKAGE_NAME, "color", "setting_background", Color.parseColor("#000000")); // 背景デフォルトを白色に設定
XposedBridge.log("Replacing color 'background_default' with #FFFFFF");
resparam.res.setReplacement(Constants.PACKAGE_NAME, "color", "background_material_light", Color.parseColor("#000000")); // 背景ライトを白色に設定
XposedBridge.log("Replacing color 'background_material_light' with #FFFFFF");
*/
*/



Expand Down
6 changes: 0 additions & 6 deletions app/src/main/java/io/github/hiro/lime/hooks/Archived.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ private void deleteTalkIdFromFile(String talkId, Context moduleContext) {
}
}






private void hookSAMethod(XC_LoadPackage.LoadPackageParam loadPackageParam, SQLiteDatabase db, Context context) {

//ChatListViewModel
Expand Down Expand Up @@ -290,7 +285,6 @@ private void updateDatabase(SQLiteDatabase db, String query, Object... bindArgs)
private void updateIsArchived(SQLiteDatabase db, String chatId) {
String updateQuery = "UPDATE chat SET is_archived = 1 WHERE chat_id = ?";
updateDatabase(db, updateQuery, chatId);

String selectQuery = "SELECT is_archived FROM chat WHERE chat_id = ?";
String result = queryDatabase(db, selectQuery, chatId);
if (result != null) {
Expand Down
16 changes: 16 additions & 0 deletions app/src/main/java/io/github/hiro/lime/hooks/NaviColor.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

import de.robv.android.xposed.IXposedHookInitPackageResources;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.XposedHelpers;
import de.robv.android.xposed.callbacks.XC_InitPackageResources.InitPackageResourcesParam;
import de.robv.android.xposed.callbacks.XC_LoadPackage;
import io.github.hiro.lime.LimeOptions;
Expand All @@ -31,6 +34,19 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
}
}
});
XposedHelpers.findAndHookMethod("android.app.Activity", loadPackageParam.classLoader, "onCreate", Bundle.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
Activity activity = (Activity) param.thisObject;
Window window = activity.getWindow();

window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(Color.BLACK);
}
});


}

}

0 comments on commit 8dfe9aa

Please sign in to comment.