Skip to content

Commit

Permalink
fix: systemui - notification center - Collapse into history notificat…
Browse files Browse the repository at this point in the history
…ions is prohibited
  • Loading branch information
Sevtinge committed May 27, 2024
1 parent 63c77da commit 1709b51
Showing 1 changed file with 29 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,35 @@ protected void before(MethodHookParam param) {
}
);

findAndHookMethod("com.android.systemui.statusbar.notification.collection.coordinator.FoldCoordinator",
"access$shouldIgnoreEntry",
"com.android.systemui.statusbar.notification.collection.coordinator.FoldCoordinator",
"com.android.systemui.statusbar.notification.collection.NotificationEntry",
new MethodHook() {
@Override
protected void after(MethodHookParam param) {
// Object mSbn = XposedHelpers.getObjectField(param.args[1], "mSbn");
// String getPackageName = (String) XposedHelpers.callMethod(mSbn, "getPackageName");
// logE(TAG, "after: " + param.getResult() + " pkg: " + getPackageName);
param.setResult(true);
try {
findAndHookMethod("com.android.systemui.statusbar.notification.collection.coordinator.FoldCoordinator",
"access$shouldIgnoreEntry",
"com.android.systemui.statusbar.notification.collection.coordinator.FoldCoordinator",
"com.android.systemui.statusbar.notification.collection.NotificationEntry",
new MethodHook() {
@Override
protected void after(MethodHookParam param) {
// Object mSbn = XposedHelpers.getObjectField(param.args[1], "mSbn");
// String getPackageName = (String) XposedHelpers.callMethod(mSbn, "getPackageName");
// logE(TAG, "after: " + param.getResult() + " pkg: " + getPackageName);
param.setResult(true);
}
}
}
);
);
}catch (Throwable ignore){
findAndHookMethod("com.android.systemui.statusbar.notification.NotificationUtil",
"shouldIgnoreEntry",
"com.android.systemui.statusbar.notification.collection.NotificationEntry",
new MethodHook() {
@Override
protected void after(MethodHookParam param) {
// Object mSbn = XposedHelpers.getObjectField(param.args[1], "mSbn");
// String getPackageName = (String) XposedHelpers.callMethod(mSbn, "getPackageName");
// logE(TAG, "after: " + param.getResult() + " pkg: " + getPackageName);
param.setResult(true);
}
}
);
}
}
}

0 comments on commit 1709b51

Please sign in to comment.