Remove a binder call from BiometricSensor#toString
Bug: 210927291 Test: logcat Change-Id: I44bc5eaccf654f208fc721b13dcd391c69e04683
This commit is contained in:
@@ -22,10 +22,8 @@ import android.annotation.IntDef;
|
||||
import android.annotation.NonNull;
|
||||
import android.content.Context;
|
||||
import android.hardware.biometrics.BiometricConstants;
|
||||
import android.hardware.biometrics.BiometricManager;
|
||||
import android.hardware.biometrics.IBiometricAuthenticator;
|
||||
import android.hardware.biometrics.IBiometricSensorReceiver;
|
||||
import android.hardware.biometrics.SensorPropertiesInternal;
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Slog;
|
||||
@@ -149,7 +147,7 @@ public abstract class BiometricSensor {
|
||||
* Returns the actual strength, taking any updated strengths into effect. Since more bits
|
||||
* means lower strength, the resulting strength is never stronger than the OEM's configured
|
||||
* strength.
|
||||
* @return a bitfield, see {@link BiometricManager.Authenticators}
|
||||
* @return a bitfield, see {@link android.hardware.biometrics.BiometricManager.Authenticators}
|
||||
*/
|
||||
@Authenticators.Types int getCurrentStrength() {
|
||||
return oemStrength | mUpdatedStrength;
|
||||
@@ -169,27 +167,19 @@ public abstract class BiometricSensor {
|
||||
* @param newStrength
|
||||
*/
|
||||
void updateStrength(@Authenticators.Types int newStrength) {
|
||||
String log = "updateStrength: Before(" + toString() + ")";
|
||||
String log = "updateStrength: Before(" + this + ")";
|
||||
mUpdatedStrength = newStrength;
|
||||
log += " After(" + toString() + ")";
|
||||
log += " After(" + this + ")";
|
||||
Slog.d(TAG, log);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
SensorPropertiesInternal properties = null;
|
||||
try {
|
||||
properties = impl.getSensorProperties(mContext.getOpPackageName());
|
||||
} catch (RemoteException e) {
|
||||
Slog.e(TAG, "Remote exception", e);
|
||||
}
|
||||
|
||||
return "ID(" + id + ")"
|
||||
+ ", oemStrength: " + oemStrength
|
||||
+ ", updatedStrength: " + mUpdatedStrength
|
||||
+ ", modality " + modality
|
||||
+ ", state: " + mSensorState
|
||||
+ ", cookie: " + mCookie
|
||||
+ ", props: " + properties;
|
||||
+ ", cookie: " + mCookie;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user