Clear mCurrentChallengeOwner when owner dies
Fixes: 167523869
Test: 1) enter face settings
2) kill settings app (adb shell pkill -9 com.android.settings)
3) enter password on lockscreen
No crash observed
Change-Id: I20c9b2850e34c6e063e7cb25ee8e6934f0a86f29
This commit is contained in:
@@ -176,6 +176,9 @@ public abstract class ClientMonitor<T> extends LoggableMonitor implements IBinde
|
||||
|
||||
// TODO(b/157790417): Move this to the scheduler
|
||||
void binderDiedInternal(boolean clearListener) {
|
||||
Slog.e(TAG, "Binder died, owner: " + getOwnerString()
|
||||
+ ", operation: " + this.getClass().getName());
|
||||
|
||||
if (isAlreadyDone()) {
|
||||
Slog.w(TAG, "Binder died but client is finished, ignoring");
|
||||
return;
|
||||
|
||||
@@ -510,8 +510,15 @@ class Face10 implements IHwBinder.DeathRecipient {
|
||||
if (mCurrentChallengeOwner != null) {
|
||||
Slog.w(TAG, "Current challenge owner: " + mCurrentChallengeOwner
|
||||
+ ", interrupted by: " + opPackageName);
|
||||
final ClientMonitorCallbackConverter listener =
|
||||
mCurrentChallengeOwner.getListener();
|
||||
if (listener == null) {
|
||||
Slog.w(TAG, "Null listener, skip sending interruption callback");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
mCurrentChallengeOwner.getListener().onChallengeInterrupted(mSensorId);
|
||||
listener.onChallengeInterrupted(mSensorId);
|
||||
} catch (RemoteException e) {
|
||||
Slog.e(TAG, "Unable to notify challenge interrupted", e);
|
||||
}
|
||||
@@ -524,7 +531,7 @@ class Face10 implements IHwBinder.DeathRecipient {
|
||||
@Override
|
||||
public void onClientStarted(@NonNull ClientMonitor<?> clientMonitor) {
|
||||
if (client != clientMonitor) {
|
||||
Slog.e(TAG, "scheduleGenerateChallenge, mismatched client."
|
||||
Slog.e(TAG, "scheduleGenerateChallenge onClientStarted, mismatched client."
|
||||
+ " Expecting: " + client + ", received: " + clientMonitor);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user