Loading cmds/bootanimation/BootAnimation.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -417,7 +417,7 @@ status_t BootAnimation::readyToRun() { // this guest property specifies multi-display IDs to show the boot animation // multiple ids can be set with comma (,) as separator, for example: // setprop persist.boot.animation.displays 19260422155234049,19261083906282754 Vector<uint64_t> physicalDisplayIds; Vector<PhysicalDisplayId> physicalDisplayIds; char displayValue[PROPERTY_VALUE_MAX] = ""; property_get(DISPLAYS_PROP_NAME, displayValue, ""); bool isValid = displayValue[0] != '\0'; Loading @@ -435,7 +435,7 @@ status_t BootAnimation::readyToRun() { } if (isValid) { std::istringstream stream(displayValue); for (PhysicalDisplayId id; stream >> id; ) { for (PhysicalDisplayId id; stream >> id.value; ) { physicalDisplayIds.add(id); if (stream.peek() == ',') stream.ignore(); Loading cmds/screencap/screencap.cpp +4 −5 Original line number Diff line number Diff line Loading @@ -51,12 +51,11 @@ static void usage(const char* pname, PhysicalDisplayId displayId) "usage: %s [-hp] [-d display-id] [FILENAME]\n" " -h: this message\n" " -p: save the file as a png.\n" " -d: specify the physical display ID to capture (default: %" ANDROID_PHYSICAL_DISPLAY_ID_FORMAT ")\n" " -d: specify the physical display ID to capture (default: %s)\n" " see \"dumpsys SurfaceFlinger --display-id\" for valid display IDs.\n" "If FILENAME ends with .png it will be saved as a png.\n" "If FILENAME is not given, the results will be printed to stdout.\n", pname, displayId); pname, to_string(displayId).c_str()); } static int32_t flinger2bitmapFormat(PixelFormat f) Loading Loading @@ -137,7 +136,7 @@ int main(int argc, char** argv) png = true; break; case 'd': displayId = atoll(optarg); displayId = PhysicalDisplayId(atoll(optarg)); break; case '?': case 'h': Loading Loading @@ -183,7 +182,7 @@ int main(int argc, char** argv) ProcessState::self()->startThreadPool(); ScreenCaptureResults captureResults; status_t result = ScreenshotClient::captureDisplay(*displayId, captureResults); status_t result = ScreenshotClient::captureDisplay(displayId->value, captureResults); if (result != NO_ERROR) { close(fd); return 1; Loading core/jni/android_view_DisplayEventReceiver.cpp +6 −7 Original line number Diff line number Diff line Loading @@ -95,8 +95,8 @@ void NativeDisplayEventReceiver::dispatchVsync(nsecs_t timestamp, PhysicalDispla ScopedLocalRef<jobject> receiverObj(env, jniGetReferent(env, mReceiverWeakGlobal)); if (receiverObj.get()) { ALOGV("receiver %p ~ Invoking vsync handler.", this); env->CallVoidMethod(receiverObj.get(), gDisplayEventReceiverClassInfo.dispatchVsync, timestamp, displayId, count); env->CallVoidMethod(receiverObj.get(), gDisplayEventReceiverClassInfo.dispatchVsync, timestamp, displayId.value, count); ALOGV("receiver %p ~ Returned from vsync handler.", this); } Loading @@ -110,8 +110,8 @@ void NativeDisplayEventReceiver::dispatchHotplug(nsecs_t timestamp, PhysicalDisp ScopedLocalRef<jobject> receiverObj(env, jniGetReferent(env, mReceiverWeakGlobal)); if (receiverObj.get()) { ALOGV("receiver %p ~ Invoking hotplug handler.", this); env->CallVoidMethod(receiverObj.get(), gDisplayEventReceiverClassInfo.dispatchHotplug, timestamp, displayId, connected); env->CallVoidMethod(receiverObj.get(), gDisplayEventReceiverClassInfo.dispatchHotplug, timestamp, displayId.value, connected); ALOGV("receiver %p ~ Returned from hotplug handler.", this); } Loading @@ -126,9 +126,8 @@ void NativeDisplayEventReceiver::dispatchConfigChanged( jniGetReferent(env, mReceiverWeakGlobal)); if (receiverObj.get()) { ALOGV("receiver %p ~ Invoking config changed handler.", this); env->CallVoidMethod(receiverObj.get(), gDisplayEventReceiverClassInfo.dispatchConfigChanged, timestamp, displayId, configId); env->CallVoidMethod(receiverObj.get(), gDisplayEventReceiverClassInfo.dispatchConfigChanged, timestamp, displayId.value, configId); ALOGV("receiver %p ~ Returned from config changed handler.", this); } Loading core/jni/android_view_SurfaceControl.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -703,7 +703,7 @@ static jlongArray nativeGetPhysicalDisplayIds(JNIEnv* env, jclass clazz) { jlong* values = env->GetLongArrayElements(array, 0); for (size_t i = 0; i < displayIds.size(); ++i) { values[i] = static_cast<jlong>(displayIds[i]); values[i] = static_cast<jlong>(displayIds[i].value); } env->ReleaseLongArrayElements(array, values, 0); Loading @@ -711,7 +711,8 @@ static jlongArray nativeGetPhysicalDisplayIds(JNIEnv* env, jclass clazz) { } static jobject nativeGetPhysicalDisplayToken(JNIEnv* env, jclass clazz, jlong physicalDisplayId) { sp<IBinder> token = SurfaceComposerClient::getPhysicalDisplayToken(physicalDisplayId); sp<IBinder> token = SurfaceComposerClient::getPhysicalDisplayToken(PhysicalDisplayId(physicalDisplayId)); return javaObjectForIBinder(env, token); } Loading Loading
cmds/bootanimation/BootAnimation.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -417,7 +417,7 @@ status_t BootAnimation::readyToRun() { // this guest property specifies multi-display IDs to show the boot animation // multiple ids can be set with comma (,) as separator, for example: // setprop persist.boot.animation.displays 19260422155234049,19261083906282754 Vector<uint64_t> physicalDisplayIds; Vector<PhysicalDisplayId> physicalDisplayIds; char displayValue[PROPERTY_VALUE_MAX] = ""; property_get(DISPLAYS_PROP_NAME, displayValue, ""); bool isValid = displayValue[0] != '\0'; Loading @@ -435,7 +435,7 @@ status_t BootAnimation::readyToRun() { } if (isValid) { std::istringstream stream(displayValue); for (PhysicalDisplayId id; stream >> id; ) { for (PhysicalDisplayId id; stream >> id.value; ) { physicalDisplayIds.add(id); if (stream.peek() == ',') stream.ignore(); Loading
cmds/screencap/screencap.cpp +4 −5 Original line number Diff line number Diff line Loading @@ -51,12 +51,11 @@ static void usage(const char* pname, PhysicalDisplayId displayId) "usage: %s [-hp] [-d display-id] [FILENAME]\n" " -h: this message\n" " -p: save the file as a png.\n" " -d: specify the physical display ID to capture (default: %" ANDROID_PHYSICAL_DISPLAY_ID_FORMAT ")\n" " -d: specify the physical display ID to capture (default: %s)\n" " see \"dumpsys SurfaceFlinger --display-id\" for valid display IDs.\n" "If FILENAME ends with .png it will be saved as a png.\n" "If FILENAME is not given, the results will be printed to stdout.\n", pname, displayId); pname, to_string(displayId).c_str()); } static int32_t flinger2bitmapFormat(PixelFormat f) Loading Loading @@ -137,7 +136,7 @@ int main(int argc, char** argv) png = true; break; case 'd': displayId = atoll(optarg); displayId = PhysicalDisplayId(atoll(optarg)); break; case '?': case 'h': Loading Loading @@ -183,7 +182,7 @@ int main(int argc, char** argv) ProcessState::self()->startThreadPool(); ScreenCaptureResults captureResults; status_t result = ScreenshotClient::captureDisplay(*displayId, captureResults); status_t result = ScreenshotClient::captureDisplay(displayId->value, captureResults); if (result != NO_ERROR) { close(fd); return 1; Loading
core/jni/android_view_DisplayEventReceiver.cpp +6 −7 Original line number Diff line number Diff line Loading @@ -95,8 +95,8 @@ void NativeDisplayEventReceiver::dispatchVsync(nsecs_t timestamp, PhysicalDispla ScopedLocalRef<jobject> receiverObj(env, jniGetReferent(env, mReceiverWeakGlobal)); if (receiverObj.get()) { ALOGV("receiver %p ~ Invoking vsync handler.", this); env->CallVoidMethod(receiverObj.get(), gDisplayEventReceiverClassInfo.dispatchVsync, timestamp, displayId, count); env->CallVoidMethod(receiverObj.get(), gDisplayEventReceiverClassInfo.dispatchVsync, timestamp, displayId.value, count); ALOGV("receiver %p ~ Returned from vsync handler.", this); } Loading @@ -110,8 +110,8 @@ void NativeDisplayEventReceiver::dispatchHotplug(nsecs_t timestamp, PhysicalDisp ScopedLocalRef<jobject> receiverObj(env, jniGetReferent(env, mReceiverWeakGlobal)); if (receiverObj.get()) { ALOGV("receiver %p ~ Invoking hotplug handler.", this); env->CallVoidMethod(receiverObj.get(), gDisplayEventReceiverClassInfo.dispatchHotplug, timestamp, displayId, connected); env->CallVoidMethod(receiverObj.get(), gDisplayEventReceiverClassInfo.dispatchHotplug, timestamp, displayId.value, connected); ALOGV("receiver %p ~ Returned from hotplug handler.", this); } Loading @@ -126,9 +126,8 @@ void NativeDisplayEventReceiver::dispatchConfigChanged( jniGetReferent(env, mReceiverWeakGlobal)); if (receiverObj.get()) { ALOGV("receiver %p ~ Invoking config changed handler.", this); env->CallVoidMethod(receiverObj.get(), gDisplayEventReceiverClassInfo.dispatchConfigChanged, timestamp, displayId, configId); env->CallVoidMethod(receiverObj.get(), gDisplayEventReceiverClassInfo.dispatchConfigChanged, timestamp, displayId.value, configId); ALOGV("receiver %p ~ Returned from config changed handler.", this); } Loading
core/jni/android_view_SurfaceControl.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -703,7 +703,7 @@ static jlongArray nativeGetPhysicalDisplayIds(JNIEnv* env, jclass clazz) { jlong* values = env->GetLongArrayElements(array, 0); for (size_t i = 0; i < displayIds.size(); ++i) { values[i] = static_cast<jlong>(displayIds[i]); values[i] = static_cast<jlong>(displayIds[i].value); } env->ReleaseLongArrayElements(array, values, 0); Loading @@ -711,7 +711,8 @@ static jlongArray nativeGetPhysicalDisplayIds(JNIEnv* env, jclass clazz) { } static jobject nativeGetPhysicalDisplayToken(JNIEnv* env, jclass clazz, jlong physicalDisplayId) { sp<IBinder> token = SurfaceComposerClient::getPhysicalDisplayToken(physicalDisplayId); sp<IBinder> token = SurfaceComposerClient::getPhysicalDisplayToken(PhysicalDisplayId(physicalDisplayId)); return javaObjectForIBinder(env, token); } Loading