Add a generic error message for missing vendor error strings.

The message is empty, instead of null, to prevent apps from crashing but it will be changed to a more meaninful string in a future change.

Fix: 196176475
Test: N/A
Change-Id: I7823084238a87cb1b8892b8550c472cd8b40f556
This commit is contained in:
Joe Bolinger
2021-08-13 15:36:56 -07:00
parent f5704ec276
commit 5d5d9eb812
2 changed files with 11 additions and 1 deletions

View File

@@ -790,6 +790,11 @@ public class FaceManager implements BiometricAuthenticator, BiometricFaceConstan
}
}
}
// This is used as a last resort in case a vendor string is missing
// It should not happen for anything other than FACE_ERROR_VENDOR, but
// warn and use the default if all else fails.
// TODO(b/196639965): update string
Slog.w(TAG, "Invalid error message: " + errMsg + ", " + vendorCode);
return "";
}

View File

@@ -1386,8 +1386,13 @@ public class FingerprintManager implements BiometricAuthenticator, BiometricFing
}
}
}
// This is used as a last resort in case a vendor string is missing
// It should not happen for anything other than FINGERPRINT_ERROR_VENDOR, but
// warn and use the default if all else fails.
// TODO(b/196639965): update string
Slog.w(TAG, "Invalid error message: " + errMsg + ", " + vendorCode);
return null;
return "";
}
/**