Merge "Make function names consistent in AidlConversionUtils" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
5ce749630c
@@ -31,7 +31,7 @@ import android.hardware.face.FaceEnrollCell;
|
||||
import android.hardware.face.FaceEnrollFrame;
|
||||
|
||||
/**
|
||||
* Utilities for converting between hardware and framework-defined AIDL models.
|
||||
* Utilities for converting from hardware to framework-defined AIDL models.
|
||||
*/
|
||||
final class AidlConversionUtils {
|
||||
// Prevent instantiation.
|
||||
@@ -128,17 +128,19 @@ final class AidlConversionUtils {
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static FaceAuthenticationFrame convert(@NonNull AuthenticationFrame frame) {
|
||||
return new FaceAuthenticationFrame(convert(frame.data));
|
||||
public static FaceAuthenticationFrame toFrameworkAuthenticationFrame(
|
||||
@NonNull AuthenticationFrame frame) {
|
||||
return new FaceAuthenticationFrame(toFrameworkBaseFrame(frame.data));
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static FaceEnrollFrame convert(@NonNull EnrollmentFrame frame) {
|
||||
return new FaceEnrollFrame(convert(frame.cell), frame.stage, convert(frame.data));
|
||||
public static FaceEnrollFrame toFrameworkEnrollmentFrame(@NonNull EnrollmentFrame frame) {
|
||||
return new FaceEnrollFrame(toFrameworkCell(frame.cell), frame.stage,
|
||||
toFrameworkBaseFrame(frame.data));
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static FaceDataFrame convert(@NonNull BaseFrame frame) {
|
||||
public static FaceDataFrame toFrameworkBaseFrame(@NonNull BaseFrame frame) {
|
||||
return new FaceDataFrame(
|
||||
toFrameworkAcquiredInfo(frame.acquiredInfo),
|
||||
frame.vendorCode,
|
||||
@@ -149,7 +151,7 @@ final class AidlConversionUtils {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static FaceEnrollCell convert(@Nullable Cell cell) {
|
||||
public static FaceEnrollCell toFrameworkCell(@Nullable Cell cell) {
|
||||
return cell == null ? null : new FaceEnrollCell(cell.x, cell.y, cell.z);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ public class Sensor {
|
||||
return;
|
||||
}
|
||||
((FaceAuthenticationClient) client).onAuthenticationFrame(
|
||||
AidlConversionUtils.convert(frame));
|
||||
AidlConversionUtils.toFrameworkAuthenticationFrame(frame));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -204,7 +204,8 @@ public class Sensor {
|
||||
+ Utils.getClientName(client));
|
||||
return;
|
||||
}
|
||||
((FaceEnrollClient) client).onEnrollmentFrame(AidlConversionUtils.convert(frame));
|
||||
((FaceEnrollClient) client).onEnrollmentFrame(
|
||||
AidlConversionUtils.toFrameworkEnrollmentFrame(frame));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import android.hardware.biometrics.fingerprint.AcquiredInfo;
|
||||
import android.hardware.biometrics.fingerprint.Error;
|
||||
|
||||
/**
|
||||
* Utilities for converting between hardware and framework-defined AIDL models.
|
||||
* Utilities for converting from hardware to framework-defined AIDL models.
|
||||
*/
|
||||
final class AidlConversionUtils {
|
||||
// Prevent instantiation.
|
||||
|
||||
Reference in New Issue
Block a user