Merge "Clear mCurrentChallengeOwner when owner dies"
This commit is contained in:
committed by
Android (Google) Code Review
commit
aebe8ffa02
@@ -176,6 +176,9 @@ public abstract class ClientMonitor<T> extends LoggableMonitor implements IBinde
|
|||||||
|
|
||||||
// TODO(b/157790417): Move this to the scheduler
|
// TODO(b/157790417): Move this to the scheduler
|
||||||
void binderDiedInternal(boolean clearListener) {
|
void binderDiedInternal(boolean clearListener) {
|
||||||
|
Slog.e(TAG, "Binder died, owner: " + getOwnerString()
|
||||||
|
+ ", operation: " + this.getClass().getName());
|
||||||
|
|
||||||
if (isAlreadyDone()) {
|
if (isAlreadyDone()) {
|
||||||
Slog.w(TAG, "Binder died but client is finished, ignoring");
|
Slog.w(TAG, "Binder died but client is finished, ignoring");
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -510,8 +510,15 @@ class Face10 implements IHwBinder.DeathRecipient {
|
|||||||
if (mCurrentChallengeOwner != null) {
|
if (mCurrentChallengeOwner != null) {
|
||||||
Slog.w(TAG, "Current challenge owner: " + mCurrentChallengeOwner
|
Slog.w(TAG, "Current challenge owner: " + mCurrentChallengeOwner
|
||||||
+ ", interrupted by: " + opPackageName);
|
+ ", interrupted by: " + opPackageName);
|
||||||
|
final ClientMonitorCallbackConverter listener =
|
||||||
|
mCurrentChallengeOwner.getListener();
|
||||||
|
if (listener == null) {
|
||||||
|
Slog.w(TAG, "Null listener, skip sending interruption callback");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
mCurrentChallengeOwner.getListener().onChallengeInterrupted(mSensorId);
|
listener.onChallengeInterrupted(mSensorId);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Slog.e(TAG, "Unable to notify challenge interrupted", e);
|
Slog.e(TAG, "Unable to notify challenge interrupted", e);
|
||||||
}
|
}
|
||||||
@@ -524,7 +531,7 @@ class Face10 implements IHwBinder.DeathRecipient {
|
|||||||
@Override
|
@Override
|
||||||
public void onClientStarted(@NonNull ClientMonitor<?> clientMonitor) {
|
public void onClientStarted(@NonNull ClientMonitor<?> clientMonitor) {
|
||||||
if (client != clientMonitor) {
|
if (client != clientMonitor) {
|
||||||
Slog.e(TAG, "scheduleGenerateChallenge, mismatched client."
|
Slog.e(TAG, "scheduleGenerateChallenge onClientStarted, mismatched client."
|
||||||
+ " Expecting: " + client + ", received: " + clientMonitor);
|
+ " Expecting: " + client + ", received: " + clientMonitor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user