Merge "Send client relaunch event to WMCore." into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a688a7499d
@@ -98,6 +98,15 @@ public class ActivityClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Reports the activity starts local relaunch. */
|
||||||
|
public void activityLocalRelaunch(IBinder token) {
|
||||||
|
try {
|
||||||
|
getActivityClientController().activityLocalRelaunch(token);
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
e.rethrowFromSystemServer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Reports the activity has completed relaunched. */
|
/** Reports the activity has completed relaunched. */
|
||||||
public void activityRelaunched(IBinder token) {
|
public void activityRelaunched(IBinder token) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -5728,6 +5728,7 @@ public final class ActivityThread extends ClientTransactionHandler
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ActivityClient.getInstance().activityLocalRelaunch(r.token);
|
||||||
// Initialize a relaunch request.
|
// Initialize a relaunch request.
|
||||||
final MergedConfiguration mergedConfiguration = new MergedConfiguration(
|
final MergedConfiguration mergedConfiguration = new MergedConfiguration(
|
||||||
r.createdConfig != null
|
r.createdConfig != null
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ interface IActivityClientController {
|
|||||||
oneway void activityStopped(in IBinder token, in Bundle state,
|
oneway void activityStopped(in IBinder token, in Bundle state,
|
||||||
in PersistableBundle persistentState, in CharSequence description);
|
in PersistableBundle persistentState, in CharSequence description);
|
||||||
oneway void activityDestroyed(in IBinder token);
|
oneway void activityDestroyed(in IBinder token);
|
||||||
|
oneway void activityLocalRelaunch(in IBinder token);
|
||||||
oneway void activityRelaunched(in IBinder token);
|
oneway void activityRelaunched(in IBinder token);
|
||||||
|
|
||||||
oneway void reportSizeConfigurations(in IBinder token,
|
oneway void reportSizeConfigurations(in IBinder token,
|
||||||
|
|||||||
@@ -245,6 +245,18 @@ class ActivityClientController extends IActivityClientController.Stub {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void activityLocalRelaunch(IBinder token) {
|
||||||
|
final long origId = Binder.clearCallingIdentity();
|
||||||
|
synchronized (mGlobalLock) {
|
||||||
|
final ActivityRecord r = ActivityRecord.forTokenLocked(token);
|
||||||
|
if (r != null) {
|
||||||
|
r.startRelaunching();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Binder.restoreCallingIdentity(origId);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void activityRelaunched(IBinder token) {
|
public void activityRelaunched(IBinder token) {
|
||||||
final long origId = Binder.clearCallingIdentity();
|
final long origId = Binder.clearCallingIdentity();
|
||||||
|
|||||||
Reference in New Issue
Block a user