Fix notification intent in Android 12 (#1168)

This commit is contained in:
LoveSy 2021-09-24 19:53:03 +08:00 committed by GitHub
parent d8041f04ee
commit 5485257ec6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -21,6 +21,7 @@
-keepclassmembers class ** implements android.content.ContextWrapper {
public int getUserId();
public android.os.UserHandle getUser();
}
-assumenosideeffects class android.util.Log {
public static *** v(...);

View File

@ -6,6 +6,7 @@ import android.content.ContentResolver;
import android.content.ContextWrapper;
import android.content.pm.ApplicationInfo;
import android.content.res.Resources;
import android.os.UserHandle;
import android.util.Log;
import androidx.annotation.Nullable;
@ -13,6 +14,8 @@ import androidx.annotation.Nullable;
import org.lsposed.lspd.service.ConfigFileManager;
import org.lsposed.lspd.service.PackageService;
import hidden.HiddenApiBridge;
public class FakeContext extends ContextWrapper {
static ApplicationInfo systemApplicationInfo = null;
static Resources.Theme theme = null;
@ -51,6 +54,10 @@ public class FakeContext extends ContextWrapper {
return 0;
}
public UserHandle getUser() {
return HiddenApiBridge.UserHandle(0);
}
@Override
public Resources.Theme getTheme() {
if (theme == null) theme = getResources().newTheme();