Merge changes I9706478e,I3fe2dea3,Ic65566c0 into qt-dev am: 1be371ddbd

am: c79afdb26f

Change-Id: I53585aebb068f273390a55fab77343d9193f1a72
This commit is contained in:
Joe Onorato
2019-04-05 20:14:54 -07:00
committed by android-build-merger
3 changed files with 38 additions and 0 deletions

View File

@@ -1050,6 +1050,35 @@ cc_library {
},
}
// This library is meant for vendor code that needs to output protobuf. It links
// against the static version of libprotobuf-cpp-lite, for which we can not guarantee
// binary compatibility.
cc_library {
name: "libplatformprotos-static",
defaults: ["libplatformprotos-defaults"],
host_supported: false,
// This is okay because this library is only built as a static library. The C++
// API is not guaranteed. The proto API is guaranteed to be stable via Metrics Council,
// but is not authorized to be used outside of debugging.
vendor_available: true,
target: {
android: {
proto: {
type: "lite",
},
static_libs: [
"libprotobuf-cpp-lite",
],
shared: {
enabled: false,
},
},
},
}
// This is the full proto version of libplatformprotos. It may only
// be used by test code that is not shipped on the device.
cc_library {

View File

@@ -55,6 +55,7 @@ ProtoFileReader::ProtoFileReader(int fd)
mSize(get_file_size(fd)),
mPos(0),
mOffset(0),
mMaxOffset(0),
mChunkSize(sizeof(mBuffer)) {
}

View File

@@ -44,6 +44,7 @@ import android.os.Environment;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.SELinux;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;
import android.service.restricted_image.RestrictedImageProto;
@@ -1091,6 +1092,13 @@ public class FaceService extends BiometricServiceBase {
return;
}
// Additionally, this flag allows turning off face for a device
// (either permanently through the build or on an individual device).
if (SystemProperties.getBoolean("ro.face.disable_debug_data", false)
|| SystemProperties.getBoolean("persist.face.disable_debug_data", false)) {
return;
}
final ProtoOutputStream proto = new ProtoOutputStream(fd);
final long setToken = proto.start(RestrictedImagesDumpProto.SETS);