Fix widgets interaction before June patch

This commit is contained in:
Suphon Thanakornpakapong
2022-06-22 17:49:14 +07:00
parent 45f73a9c7b
commit c471e08b94
11 changed files with 106 additions and 5 deletions

1
hidden-api/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

36
hidden-api/build.gradle Normal file
View File

@@ -0,0 +1,36 @@
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
}
android {
namespace 'app.lawnchair.hidden_api'
compileSdk 32
defaultConfig {
minSdk 26
targetSdk 32
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
annotationProcessor 'dev.rikka.tools.refine:annotation-processor:3.1.1'
compileOnly 'dev.rikka.tools.refine:annotation:3.1.1'
}

View File

21
hidden-api/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>

View File

@@ -0,0 +1,4 @@
package android.app;
public interface IActivityTaskManager {
}

View File

@@ -0,0 +1,17 @@
package android.app;
import android.os.IBinder;
import android.os.RemoteException;
import android.view.RemoteAnimationAdapter;
import dev.rikka.tools.refine.RefineAs;
@RefineAs(IActivityTaskManager.class)
public interface IActivityTaskManagerHidden {
void registerRemoteAnimationForNextActivityStart(
String packageName, RemoteAnimationAdapter adapter, IBinder launchCookie) throws RemoteException;
void registerRemoteAnimationForNextActivityStart(
String packageName, RemoteAnimationAdapter adapter) throws RemoteException;
}

View File

@@ -0,0 +1,4 @@
package android.view;
public class RemoteAnimationAdapter {
}