Loading cmds/dumpstate/dumpstate.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -1845,6 +1845,7 @@ int run_main(int argc, char* argv[]) { is_remote_mode = 1; do_fb = 0; } else if (ds.extra_options_ == "bugreportwear") { do_start_service = true; ds.update_progress_ = true; do_zip_file = 1; } else if (ds.extra_options_ == "bugreporttelephony") { Loading cmds/installd/InstalldNativeService.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,7 @@ static binder::Status ok() { } static binder::Status exception(uint32_t code, const std::string& msg) { LOG(ERROR) << msg << " (" << code << ")"; return binder::Status::fromExceptionCode(code, String8(msg.c_str())); } Loading cmds/installd/tests/installd_dexopt_test.cpp +10 −10 Original line number Diff line number Diff line Loading @@ -282,7 +282,7 @@ protected: profile_name_ptr, dm_path_ptr, compilation_reason_ptr); ASSERT_EQ(should_binder_call_succeed, result.isOk()); ASSERT_EQ(should_binder_call_succeed, result.isOk()) << result.toString8().c_str(); int expected_access = should_dex_be_compiled ? 0 : -1; std::string odex = GetSecondaryDexArtifact(path, "odex"); std::string vdex = GetSecondaryDexArtifact(path, "vdex"); Loading Loading @@ -310,7 +310,7 @@ protected: storage_flag, &out_secondary_dex_exists); ASSERT_EQ(should_binder_call_succeed, result.isOk()); ASSERT_EQ(should_binder_call_succeed, result.isOk()) << result.toString8().c_str(); ASSERT_EQ(should_dex_exist, out_secondary_dex_exists); int expected_access = should_dex_be_deleted ? -1 : 0; Loading Loading @@ -375,10 +375,10 @@ protected: bool prof_result; binder::Status prof_binder_result = service_->prepareAppProfile( package_name_, kTestUserId, kTestAppId, *profile_name_ptr, /*code path*/ "base.apk", package_name_, kTestUserId, kTestAppId, *profile_name_ptr, apk_path_, /*dex_metadata*/ nullptr, &prof_result); ASSERT_TRUE(prof_binder_result.isOk()); ASSERT_TRUE(prof_binder_result.isOk()) << prof_binder_result.toString8().c_str(); ASSERT_TRUE(prof_result); binder::Status result = service_->dexopt(apk_path_, Loading @@ -397,7 +397,7 @@ protected: profile_name_ptr, dm_path_ptr, compilation_reason_ptr); ASSERT_EQ(should_binder_call_succeed, result.isOk()); ASSERT_EQ(should_binder_call_succeed, result.isOk()) << result.toString8().c_str(); if (!should_binder_call_succeed) { return; Loading Loading @@ -662,7 +662,7 @@ class ProfileTest : public DexoptTest { bool result; binder::Status binder_result = service_->createProfileSnapshot( appid, package_name, kPrimaryProfile, apk_path_, &result); ASSERT_TRUE(binder_result.isOk()); ASSERT_TRUE(binder_result.isOk()) << binder_result.toString8().c_str(); ASSERT_EQ(expected_result, result); if (!expected_result) { Loading Loading @@ -704,7 +704,7 @@ class ProfileTest : public DexoptTest { bool result; binder::Status binder_result = service_->mergeProfiles( kTestAppUid, package_name, code_path, &result); ASSERT_TRUE(binder_result.isOk()); ASSERT_TRUE(binder_result.isOk()) << binder_result.toString8().c_str(); ASSERT_EQ(expected_result, result); if (!expected_result) { Loading @@ -731,9 +731,9 @@ class ProfileTest : public DexoptTest { bool expected_result) { bool result; binder::Status binder_result = service_->prepareAppProfile( package_name, kTestUserId, kTestAppId, profile_name, /*code path*/ "base.apk", package_name, kTestUserId, kTestAppId, profile_name, apk_path_, /*dex_metadata*/ nullptr, &result); ASSERT_TRUE(binder_result.isOk()); ASSERT_TRUE(binder_result.isOk()) << binder_result.toString8().c_str(); ASSERT_EQ(expected_result, result); if (!expected_result) { Loading Loading @@ -820,7 +820,7 @@ TEST_F(ProfileTest, ProfileSnapshotDestroySnapshot) { createProfileSnapshot(kTestAppId, package_name_, /*expected_result*/ true); binder::Status binder_result = service_->destroyProfileSnapshot(package_name_, kPrimaryProfile); ASSERT_TRUE(binder_result.isOk()); ASSERT_TRUE(binder_result.isOk()) << binder_result.toString8().c_str(); struct stat st; ASSERT_EQ(-1, stat(snap_profile_.c_str(), &st)); ASSERT_EQ(ENOENT, errno); Loading services/surfaceflinger/SurfaceFlinger.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -193,8 +193,8 @@ SurfaceFlinger::SurfaceFlinger() mHasPoweredOff(false), mNumLayers(0), mVrFlingerRequestsDisplay(false), mMainThreadId(std::this_thread::get_id()) { mMainThreadId(std::this_thread::get_id()), mCreateBufferQueue(&BufferQueue::createBufferQueue) { ALOGI("SurfaceFlinger is starting"); vsyncPhaseOffsetNs = getInt64< ISurfaceFlingerConfigs, Loading Loading @@ -2218,7 +2218,7 @@ void SurfaceFlinger::processDisplayChangesLocked() { sp<IGraphicBufferProducer> producer; sp<IGraphicBufferProducer> bqProducer; sp<IGraphicBufferConsumer> bqConsumer; BufferQueue::createBufferQueue(&bqProducer, &bqConsumer); mCreateBufferQueue(&bqProducer, &bqConsumer, false); int32_t hwcId = -1; if (state.isVirtualDisplay()) { Loading services/surfaceflinger/SurfaceFlinger.h +8 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,8 @@ class ColorLayer; class DisplayEventConnection; class EventControlThread; class EventThread; class IGraphicBufferConsumer; class IGraphicBufferProducer; class InjectVSyncSource; class Layer; class Surface; Loading Loading @@ -822,6 +824,12 @@ private: float mSaturation = 1.0f; bool mForceNativeColorMode = false; using CreateBufferQueueFunction = std::function<void(sp<IGraphicBufferProducer>* /* outProducer */, sp<IGraphicBufferConsumer>* /* outConsumer */, bool /* consumerIsSurfaceFlinger */)>; CreateBufferQueueFunction mCreateBufferQueue; SurfaceFlingerBE mBE; }; }; // namespace android Loading Loading
cmds/dumpstate/dumpstate.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -1845,6 +1845,7 @@ int run_main(int argc, char* argv[]) { is_remote_mode = 1; do_fb = 0; } else if (ds.extra_options_ == "bugreportwear") { do_start_service = true; ds.update_progress_ = true; do_zip_file = 1; } else if (ds.extra_options_ == "bugreporttelephony") { Loading
cmds/installd/InstalldNativeService.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,7 @@ static binder::Status ok() { } static binder::Status exception(uint32_t code, const std::string& msg) { LOG(ERROR) << msg << " (" << code << ")"; return binder::Status::fromExceptionCode(code, String8(msg.c_str())); } Loading
cmds/installd/tests/installd_dexopt_test.cpp +10 −10 Original line number Diff line number Diff line Loading @@ -282,7 +282,7 @@ protected: profile_name_ptr, dm_path_ptr, compilation_reason_ptr); ASSERT_EQ(should_binder_call_succeed, result.isOk()); ASSERT_EQ(should_binder_call_succeed, result.isOk()) << result.toString8().c_str(); int expected_access = should_dex_be_compiled ? 0 : -1; std::string odex = GetSecondaryDexArtifact(path, "odex"); std::string vdex = GetSecondaryDexArtifact(path, "vdex"); Loading Loading @@ -310,7 +310,7 @@ protected: storage_flag, &out_secondary_dex_exists); ASSERT_EQ(should_binder_call_succeed, result.isOk()); ASSERT_EQ(should_binder_call_succeed, result.isOk()) << result.toString8().c_str(); ASSERT_EQ(should_dex_exist, out_secondary_dex_exists); int expected_access = should_dex_be_deleted ? -1 : 0; Loading Loading @@ -375,10 +375,10 @@ protected: bool prof_result; binder::Status prof_binder_result = service_->prepareAppProfile( package_name_, kTestUserId, kTestAppId, *profile_name_ptr, /*code path*/ "base.apk", package_name_, kTestUserId, kTestAppId, *profile_name_ptr, apk_path_, /*dex_metadata*/ nullptr, &prof_result); ASSERT_TRUE(prof_binder_result.isOk()); ASSERT_TRUE(prof_binder_result.isOk()) << prof_binder_result.toString8().c_str(); ASSERT_TRUE(prof_result); binder::Status result = service_->dexopt(apk_path_, Loading @@ -397,7 +397,7 @@ protected: profile_name_ptr, dm_path_ptr, compilation_reason_ptr); ASSERT_EQ(should_binder_call_succeed, result.isOk()); ASSERT_EQ(should_binder_call_succeed, result.isOk()) << result.toString8().c_str(); if (!should_binder_call_succeed) { return; Loading Loading @@ -662,7 +662,7 @@ class ProfileTest : public DexoptTest { bool result; binder::Status binder_result = service_->createProfileSnapshot( appid, package_name, kPrimaryProfile, apk_path_, &result); ASSERT_TRUE(binder_result.isOk()); ASSERT_TRUE(binder_result.isOk()) << binder_result.toString8().c_str(); ASSERT_EQ(expected_result, result); if (!expected_result) { Loading Loading @@ -704,7 +704,7 @@ class ProfileTest : public DexoptTest { bool result; binder::Status binder_result = service_->mergeProfiles( kTestAppUid, package_name, code_path, &result); ASSERT_TRUE(binder_result.isOk()); ASSERT_TRUE(binder_result.isOk()) << binder_result.toString8().c_str(); ASSERT_EQ(expected_result, result); if (!expected_result) { Loading @@ -731,9 +731,9 @@ class ProfileTest : public DexoptTest { bool expected_result) { bool result; binder::Status binder_result = service_->prepareAppProfile( package_name, kTestUserId, kTestAppId, profile_name, /*code path*/ "base.apk", package_name, kTestUserId, kTestAppId, profile_name, apk_path_, /*dex_metadata*/ nullptr, &result); ASSERT_TRUE(binder_result.isOk()); ASSERT_TRUE(binder_result.isOk()) << binder_result.toString8().c_str(); ASSERT_EQ(expected_result, result); if (!expected_result) { Loading Loading @@ -820,7 +820,7 @@ TEST_F(ProfileTest, ProfileSnapshotDestroySnapshot) { createProfileSnapshot(kTestAppId, package_name_, /*expected_result*/ true); binder::Status binder_result = service_->destroyProfileSnapshot(package_name_, kPrimaryProfile); ASSERT_TRUE(binder_result.isOk()); ASSERT_TRUE(binder_result.isOk()) << binder_result.toString8().c_str(); struct stat st; ASSERT_EQ(-1, stat(snap_profile_.c_str(), &st)); ASSERT_EQ(ENOENT, errno); Loading
services/surfaceflinger/SurfaceFlinger.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -193,8 +193,8 @@ SurfaceFlinger::SurfaceFlinger() mHasPoweredOff(false), mNumLayers(0), mVrFlingerRequestsDisplay(false), mMainThreadId(std::this_thread::get_id()) { mMainThreadId(std::this_thread::get_id()), mCreateBufferQueue(&BufferQueue::createBufferQueue) { ALOGI("SurfaceFlinger is starting"); vsyncPhaseOffsetNs = getInt64< ISurfaceFlingerConfigs, Loading Loading @@ -2218,7 +2218,7 @@ void SurfaceFlinger::processDisplayChangesLocked() { sp<IGraphicBufferProducer> producer; sp<IGraphicBufferProducer> bqProducer; sp<IGraphicBufferConsumer> bqConsumer; BufferQueue::createBufferQueue(&bqProducer, &bqConsumer); mCreateBufferQueue(&bqProducer, &bqConsumer, false); int32_t hwcId = -1; if (state.isVirtualDisplay()) { Loading
services/surfaceflinger/SurfaceFlinger.h +8 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,8 @@ class ColorLayer; class DisplayEventConnection; class EventControlThread; class EventThread; class IGraphicBufferConsumer; class IGraphicBufferProducer; class InjectVSyncSource; class Layer; class Surface; Loading Loading @@ -822,6 +824,12 @@ private: float mSaturation = 1.0f; bool mForceNativeColorMode = false; using CreateBufferQueueFunction = std::function<void(sp<IGraphicBufferProducer>* /* outProducer */, sp<IGraphicBufferConsumer>* /* outConsumer */, bool /* consumerIsSurfaceFlinger */)>; CreateBufferQueueFunction mCreateBufferQueue; SurfaceFlingerBE mBE; }; }; // namespace android Loading