Loading cmds/dumpstate/dumpstate.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -2481,6 +2481,13 @@ Dumpstate::RunStatus Dumpstate::RunInternal(int32_t calling_uid, // bugreport is not shared but made available for manual retrieval. return status; } if (options_->screenshot_fd.get() != -1) { bool copy_succeeded = android::os::CopyFileToFd(screenshot_path_, options_->screenshot_fd.get()); if (copy_succeeded) { android::os::UnlinkAndLogOnError(screenshot_path_); } } } /* vibrate a few but shortly times to let user know it's finished */ Loading Loading @@ -2566,9 +2573,9 @@ Dumpstate::RunStatus Dumpstate::CopyBugreportIfUserConsented() { return HandleUserConsentDenied(); } if (consent_result == UserConsentResult::APPROVED) { bool copy_succeeded = android::os::CopyFileToFd(ds.path_, ds.options_->bugreport_fd.get()); if (copy_succeeded && remove(ds.path_.c_str())) { MYLOGE("remove(%s): %s", ds.path_.c_str(), strerror(errno)); bool copy_succeeded = android::os::CopyFileToFd(path_, options_->bugreport_fd.get()); if (copy_succeeded) { android::os::UnlinkAndLogOnError(path_); } return copy_succeeded ? Dumpstate::RunStatus::OK : Dumpstate::RunStatus::ERROR; } else if (consent_result == UserConsentResult::UNAVAILABLE) { Loading cmds/dumpstate/dumpstate.h +0 −1 Original line number Diff line number Diff line Loading @@ -347,7 +347,6 @@ class Dumpstate { // File descriptor to output zip file. android::base::unique_fd bugreport_fd; // File descriptor to screenshot file. // TODO(b/111441001): Use this fd. android::base::unique_fd screenshot_fd; // TODO: rename to MODE. // Extra options passed as system property. Loading include/input/InputWindow.h +1 −0 Original line number Diff line number Diff line Loading @@ -163,6 +163,7 @@ struct InputWindowInfo { int32_t ownerUid; int32_t inputFeatures; int32_t displayId; int32_t portalToDisplayId = ADISPLAY_ID_NONE; InputApplicationInfo applicationInfo; void addTouchableRegion(const Rect& region); Loading libs/input/InputWindow.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ status_t InputWindowInfo::write(Parcel& output) const { output.writeInt32(ownerUid); output.writeInt32(inputFeatures); output.writeInt32(displayId); output.writeInt32(portalToDisplayId); applicationInfo.write(output); output.write(touchableRegion); Loading Loading @@ -136,6 +137,7 @@ InputWindowInfo InputWindowInfo::read(const Parcel& from) { ret.ownerUid = from.readInt32(); ret.inputFeatures = from.readInt32(); ret.displayId = from.readInt32(); ret.portalToDisplayId = from.readInt32(); ret.applicationInfo = InputApplicationInfo::read(from); from.read(ret.touchableRegion); Loading libs/input/tests/InputWindow_test.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ TEST(InputWindowInfo, Parcelling) { i.ownerUid = 24; i.inputFeatures = 29; i.displayId = 34; i.portalToDisplayId = 2; Parcel p; i.write(p); Loading Loading @@ -90,6 +91,7 @@ TEST(InputWindowInfo, Parcelling) { ASSERT_EQ(i.ownerUid, i2.ownerUid); ASSERT_EQ(i.inputFeatures, i2.inputFeatures); ASSERT_EQ(i.displayId, i2.displayId); ASSERT_EQ(i.portalToDisplayId, i2.portalToDisplayId); } } // namespace test Loading Loading
cmds/dumpstate/dumpstate.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -2481,6 +2481,13 @@ Dumpstate::RunStatus Dumpstate::RunInternal(int32_t calling_uid, // bugreport is not shared but made available for manual retrieval. return status; } if (options_->screenshot_fd.get() != -1) { bool copy_succeeded = android::os::CopyFileToFd(screenshot_path_, options_->screenshot_fd.get()); if (copy_succeeded) { android::os::UnlinkAndLogOnError(screenshot_path_); } } } /* vibrate a few but shortly times to let user know it's finished */ Loading Loading @@ -2566,9 +2573,9 @@ Dumpstate::RunStatus Dumpstate::CopyBugreportIfUserConsented() { return HandleUserConsentDenied(); } if (consent_result == UserConsentResult::APPROVED) { bool copy_succeeded = android::os::CopyFileToFd(ds.path_, ds.options_->bugreport_fd.get()); if (copy_succeeded && remove(ds.path_.c_str())) { MYLOGE("remove(%s): %s", ds.path_.c_str(), strerror(errno)); bool copy_succeeded = android::os::CopyFileToFd(path_, options_->bugreport_fd.get()); if (copy_succeeded) { android::os::UnlinkAndLogOnError(path_); } return copy_succeeded ? Dumpstate::RunStatus::OK : Dumpstate::RunStatus::ERROR; } else if (consent_result == UserConsentResult::UNAVAILABLE) { Loading
cmds/dumpstate/dumpstate.h +0 −1 Original line number Diff line number Diff line Loading @@ -347,7 +347,6 @@ class Dumpstate { // File descriptor to output zip file. android::base::unique_fd bugreport_fd; // File descriptor to screenshot file. // TODO(b/111441001): Use this fd. android::base::unique_fd screenshot_fd; // TODO: rename to MODE. // Extra options passed as system property. Loading
include/input/InputWindow.h +1 −0 Original line number Diff line number Diff line Loading @@ -163,6 +163,7 @@ struct InputWindowInfo { int32_t ownerUid; int32_t inputFeatures; int32_t displayId; int32_t portalToDisplayId = ADISPLAY_ID_NONE; InputApplicationInfo applicationInfo; void addTouchableRegion(const Rect& region); Loading
libs/input/InputWindow.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ status_t InputWindowInfo::write(Parcel& output) const { output.writeInt32(ownerUid); output.writeInt32(inputFeatures); output.writeInt32(displayId); output.writeInt32(portalToDisplayId); applicationInfo.write(output); output.write(touchableRegion); Loading Loading @@ -136,6 +137,7 @@ InputWindowInfo InputWindowInfo::read(const Parcel& from) { ret.ownerUid = from.readInt32(); ret.inputFeatures = from.readInt32(); ret.displayId = from.readInt32(); ret.portalToDisplayId = from.readInt32(); ret.applicationInfo = InputApplicationInfo::read(from); from.read(ret.touchableRegion); Loading
libs/input/tests/InputWindow_test.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ TEST(InputWindowInfo, Parcelling) { i.ownerUid = 24; i.inputFeatures = 29; i.displayId = 34; i.portalToDisplayId = 2; Parcel p; i.write(p); Loading Loading @@ -90,6 +91,7 @@ TEST(InputWindowInfo, Parcelling) { ASSERT_EQ(i.ownerUid, i2.ownerUid); ASSERT_EQ(i.inputFeatures, i2.inputFeatures); ASSERT_EQ(i.displayId, i2.displayId); ASSERT_EQ(i.portalToDisplayId, i2.portalToDisplayId); } } // namespace test Loading