Skip to content

Commit 2bf227e

Browse files
committed
Android 10 compatibility. ActivityRecord class has moved from com.android.server.am to com.android.server.wm, realActivity variable was renamed to mActivityComponent
1 parent 1a1526c commit 2bf227e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/com/germainz/activityforcenewtask/XposedMod.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
5454
if (getIntField(param.thisObject, "launchedFromUid") == uid)
5555
return;
5656

57-
ComponentName componentName = (ComponentName) getObjectField(param.thisObject, "realActivity");
57+
ComponentName componentName = (ComponentName) getObjectField(param.thisObject, "mActivityComponent");
5858
String componentNameString = componentName.flattenToString();
5959
// Log if necessary.
6060
if (settingsHelper.isLogEnabled()) {
@@ -81,7 +81,7 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
8181
}
8282
};
8383

84-
Class ActivityRecord = findClass("com.android.server.am.ActivityRecord", lpparam.classLoader);
84+
Class ActivityRecord = findClass("com.android.server.wm.ActivityRecord", lpparam.classLoader);
8585
XposedBridge.hookAllConstructors(ActivityRecord, hook);
8686
}
8787

0 commit comments

Comments
 (0)