Skip to content

Commit

Permalink
[Android 12]: fix crash of atms
Browse files Browse the repository at this point in the history
Signed-off-by: tiann <twsxtd@gmail.com>
  • Loading branch information
tiann committed Feb 24, 2021
1 parent 212db8e commit 4f385db
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
9 changes: 9 additions & 0 deletions VirtualApp/lib/src/main/java/android/app/ActivityOptions.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package android.app;

/**
* @author weishu
* @date 2021/2/24.
*/

class ActivityOptions {
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ public abstract void handlePauseActivity(IBinder token, boolean finished, boolea
*/
public abstract void handleResumeActivity(IBinder token, boolean finalStateRequest,
boolean isForward, String reason);

// Android 12
public abstract void handleResumeActivity(ActivityThread.ActivityClientRecord record, boolean finalStateRequest,
boolean isForward, String reason);

/**
* Stop the activity.
* @param token Target activity token.
Expand Down Expand Up @@ -127,6 +132,11 @@ public abstract Activity handleLaunchActivity(ActivityThread.ActivityClientRecor
public abstract void handleStartActivity(ActivityThread.ActivityClientRecord r,
PendingTransactionActions pendingActions);

// Android 12
/** Perform activity start. */
public abstract void handleStartActivity(ActivityThread.ActivityClientRecord r,
PendingTransactionActions pendingActions, ActivityOptions options);

// Android 11
public abstract void handleStartActivity(IBinder binder,
PendingTransactionActions pendingActions);
Expand Down Expand Up @@ -184,6 +194,9 @@ public abstract void handleRelaunchActivity(ActivityThread.ActivityClientRecord

public abstract void handleTopResumedActivityChanged(IBinder arg1, boolean arg2, String arg3);

public abstract void handleTopResumedActivityChanged(ActivityThread.ActivityClientRecord record, boolean arg2, String arg3);


/** Count how many activities are launching. */
public abstract void countLaunchingActivities(int num);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ public void handleResumeActivity(IBinder token, boolean finalStateRequest, boole
originalHandler.handleResumeActivity(token, finalStateRequest, isForward, reason);
}

@Override
public void handleResumeActivity(ActivityClientRecord record, boolean finalStateRequest, boolean isForward, String reason) {
originalHandler.handleResumeActivity(record, finalStateRequest, isForward, reason);
}

@Override
public void handleStopActivity(IBinder token, boolean show, int configChanges, PendingTransactionActions pendingActions, boolean finalStateRequest, String reason) {
originalHandler.handleStopActivity(token, show, configChanges, pendingActions, finalStateRequest, reason);
Expand Down Expand Up @@ -181,6 +186,11 @@ public Activity handleLaunchActivity(ActivityClientRecord r, PendingTransactionA
return originalHandler.handleLaunchActivity(r, pendingActions, customIntent);
}

@Override
public void handleStartActivity(ActivityClientRecord r, PendingTransactionActions pendingActions, ActivityOptions options) {
originalHandler.handleStartActivity(r, pendingActions, options);
}

@Override
public void handleStartActivity(ActivityClientRecord r, PendingTransactionActions pendingActions) {
originalHandler.handleStartActivity(r, pendingActions);
Expand Down Expand Up @@ -247,6 +257,11 @@ public void handleTopResumedActivityChanged(IBinder arg1, boolean arg2, String a
originalHandler.handleTopResumedActivityChanged(arg1, arg2, arg3);
}

@Override
public void handleTopResumedActivityChanged(ActivityClientRecord record, boolean arg2, String arg3) {
originalHandler.handleTopResumedActivityChanged(record, arg2, arg3);
}

@Override
public void countLaunchingActivities(int num) {
originalHandler.countLaunchingActivities(num);
Expand Down

0 comments on commit 4f385db

Please sign in to comment.