Loading cmds/installd/run_dex2oat.cpp +2 −19 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ void RunDex2Oat::Initialize(const UniqueFile& output_oat, bool generate_compact_dex, bool use_jitzygote_image, const char* compilation_reason) { PrepareBootImageAndBootClasspathFlags(use_jitzygote_image); PrepareBootImageFlags(use_jitzygote_image); PrepareInputFileFlags(output_oat, output_vdex, output_image, input_dex, input_vdex, dex_metadata, profile, swap_fd, class_loader_context, Loading @@ -112,7 +112,7 @@ void RunDex2Oat::Initialize(const UniqueFile& output_oat, RunDex2Oat::~RunDex2Oat() {} void RunDex2Oat::PrepareBootImageAndBootClasspathFlags(bool use_jitzygote_image) { void RunDex2Oat::PrepareBootImageFlags(bool use_jitzygote_image) { std::string boot_image; if (use_jitzygote_image) { boot_image = StringPrintf("--boot-image=%s", kJitZygoteImage); Loading @@ -120,23 +120,6 @@ void RunDex2Oat::PrepareBootImageAndBootClasspathFlags(bool use_jitzygote_image) boot_image = MapPropertyToArg("dalvik.vm.boot-image", "--boot-image=%s"); } AddArg(boot_image); // If DEX2OATBOOTCLASSPATH is not in the environment, dex2oat is going to query // BOOTCLASSPATH. char* dex2oat_bootclasspath = getenv("DEX2OATBOOTCLASSPATH"); if (dex2oat_bootclasspath != nullptr) { AddRuntimeArg(StringPrintf("-Xbootclasspath:%s", dex2oat_bootclasspath)); } std::string updatable_bcp_packages = MapPropertyToArg("dalvik.vm.dex2oat-updatable-bcp-packages-file", "--updatable-bcp-packages-file=%s"); if (updatable_bcp_packages.empty()) { // Make dex2oat fail by providing non-existent file name. updatable_bcp_packages = "--updatable-bcp-packages-file=/nonx/updatable-bcp-packages.txt"; } AddArg(updatable_bcp_packages); } void RunDex2Oat::PrepareInputFileFlags(const UniqueFile& output_oat, Loading cmds/installd/run_dex2oat.h +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ class RunDex2Oat { void Exec(int exit_code); protected: void PrepareBootImageAndBootClasspathFlags(bool use_jitzygote_image); void PrepareBootImageFlags(bool use_jitzygote_image); void PrepareInputFileFlags(const UniqueFile& output_oat, const UniqueFile& output_vdex, const UniqueFile& output_image, Loading cmds/installd/run_dex2oat_test.cpp +0 −24 Original line number Diff line number Diff line Loading @@ -175,8 +175,6 @@ class RunDex2OatTest : public testing::Test { default_expected_flags_["--swap-fd"] = FLAG_UNUSED; default_expected_flags_["--class-loader-context"] = FLAG_UNUSED; default_expected_flags_["--class-loader-context-fds"] = FLAG_UNUSED; default_expected_flags_["--updatable-bcp-packages-file"] = "=/nonx/updatable-bcp-packages.txt"; // Arch default_expected_flags_["--instruction-set"] = "=arm64"; Loading Loading @@ -320,28 +318,6 @@ TEST_F(RunDex2OatTest, WithOnlyClassLoaderContextFds) { VerifyExpectedFlags(); } TEST_F(RunDex2OatTest, DEX2OATBOOTCLASSPATH) { ASSERT_EQ(nullptr, getenv("DEX2OATBOOTCLASSPATH")); ASSERT_EQ(0, setenv("DEX2OATBOOTCLASSPATH", "foobar", /*override=*/ false)) << "Failed to setenv: " << strerror(errno); CallRunDex2Oat(RunDex2OatArgs::MakeDefaultTestArgs()); SetExpectedFlagUsed("-Xbootclasspath", ":foobar"); VerifyExpectedFlags(); ASSERT_EQ(0, unsetenv("DEX2OATBOOTCLASSPATH")) << "Failed to setenv: " << strerror(errno); } TEST_F(RunDex2OatTest, UpdatableBootClassPath) { setSystemProperty("dalvik.vm.dex2oat-updatable-bcp-packages-file", "/path/to/file"); CallRunDex2Oat(RunDex2OatArgs::MakeDefaultTestArgs()); SetExpectedFlagUsed("--updatable-bcp-packages-file", "=/path/to/file"); VerifyExpectedFlags(); } TEST_F(RunDex2OatTest, DoNotGenerateCompactDex) { auto args = RunDex2OatArgs::MakeDefaultTestArgs(); args->generate_compact_dex = false; Loading include/android/surface_control.h +8 −10 Original line number Diff line number Diff line Loading @@ -455,10 +455,10 @@ void ASurfaceTransaction_setHdrMetadata_cta861_3(ASurfaceTransaction* transactio __INTRODUCED_IN(29); /** * Same as ASurfaceTransaction_setFrameRateWithSeamlessness(transaction, surface_control, * frameRate, compatibility, true). * Same as ASurfaceTransaction_setFrameRateWithChangeStrategy(transaction, surface_control, * frameRate, compatibility, ANATIVEWINDOW_CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS). * * See ASurfaceTransaction_setFrameRateWithSeamlessness(). * See ASurfaceTransaction_setFrameRateWithChangeStrategy(). * * Available since API level 30. */ Loading Loading @@ -486,17 +486,15 @@ void ASurfaceTransaction_setFrameRate(ASurfaceTransaction* transaction, * influence the system's choice of display frame rate. To specify a compatibility use the * ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_* enum. * * \param shouldBeSeamless Whether display refresh rate transitions should be seamless. A * seamless transition is one that doesn't have any visual interruptions, such as a black * screen for a second or two. True indicates that any frame rate changes caused by this * request should be seamless. False indicates that non-seamless refresh rates are also * acceptable. * \param changeFrameRateStrategy Whether display refresh rate transitions should be seamless. * A seamless transition is one that doesn't have any visual interruptions, such as a black * screen for a second or two. See the ANATIVEWINDOW_CHANGE_FRAME_RATE_* values. * * Available since API level 31. */ void ASurfaceTransaction_setFrameRateWithSeamlessness(ASurfaceTransaction* transaction, void ASurfaceTransaction_setFrameRateWithChangeStrategy(ASurfaceTransaction* transaction, ASurfaceControl* surface_control, float frameRate, int8_t compatibility, bool shouldBeSeamless) int8_t compatibility, int8_t changeFrameRateStrategy) __INTRODUCED_IN(31); __END_DECLS Loading include/input/Input.h +14 −0 Original line number Diff line number Diff line Loading @@ -265,6 +265,20 @@ enum class MotionClassification : uint8_t { */ const char* motionClassificationToString(MotionClassification classification); /** * Portion of FrameMetrics timeline of interest to input code. */ enum GraphicsTimeline : size_t { /** Time when the app sent the buffer to SurfaceFlinger. */ GPU_COMPLETED_TIME = 0, /** Time when the frame was presented on the display */ PRESENT_TIME = 1, /** Total size of the 'GraphicsTimeline' array. Must always be last. */ SIZE = 2 }; /** * Generator of unique numbers used to identify input events. * Loading Loading
cmds/installd/run_dex2oat.cpp +2 −19 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ void RunDex2Oat::Initialize(const UniqueFile& output_oat, bool generate_compact_dex, bool use_jitzygote_image, const char* compilation_reason) { PrepareBootImageAndBootClasspathFlags(use_jitzygote_image); PrepareBootImageFlags(use_jitzygote_image); PrepareInputFileFlags(output_oat, output_vdex, output_image, input_dex, input_vdex, dex_metadata, profile, swap_fd, class_loader_context, Loading @@ -112,7 +112,7 @@ void RunDex2Oat::Initialize(const UniqueFile& output_oat, RunDex2Oat::~RunDex2Oat() {} void RunDex2Oat::PrepareBootImageAndBootClasspathFlags(bool use_jitzygote_image) { void RunDex2Oat::PrepareBootImageFlags(bool use_jitzygote_image) { std::string boot_image; if (use_jitzygote_image) { boot_image = StringPrintf("--boot-image=%s", kJitZygoteImage); Loading @@ -120,23 +120,6 @@ void RunDex2Oat::PrepareBootImageAndBootClasspathFlags(bool use_jitzygote_image) boot_image = MapPropertyToArg("dalvik.vm.boot-image", "--boot-image=%s"); } AddArg(boot_image); // If DEX2OATBOOTCLASSPATH is not in the environment, dex2oat is going to query // BOOTCLASSPATH. char* dex2oat_bootclasspath = getenv("DEX2OATBOOTCLASSPATH"); if (dex2oat_bootclasspath != nullptr) { AddRuntimeArg(StringPrintf("-Xbootclasspath:%s", dex2oat_bootclasspath)); } std::string updatable_bcp_packages = MapPropertyToArg("dalvik.vm.dex2oat-updatable-bcp-packages-file", "--updatable-bcp-packages-file=%s"); if (updatable_bcp_packages.empty()) { // Make dex2oat fail by providing non-existent file name. updatable_bcp_packages = "--updatable-bcp-packages-file=/nonx/updatable-bcp-packages.txt"; } AddArg(updatable_bcp_packages); } void RunDex2Oat::PrepareInputFileFlags(const UniqueFile& output_oat, Loading
cmds/installd/run_dex2oat.h +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ class RunDex2Oat { void Exec(int exit_code); protected: void PrepareBootImageAndBootClasspathFlags(bool use_jitzygote_image); void PrepareBootImageFlags(bool use_jitzygote_image); void PrepareInputFileFlags(const UniqueFile& output_oat, const UniqueFile& output_vdex, const UniqueFile& output_image, Loading
cmds/installd/run_dex2oat_test.cpp +0 −24 Original line number Diff line number Diff line Loading @@ -175,8 +175,6 @@ class RunDex2OatTest : public testing::Test { default_expected_flags_["--swap-fd"] = FLAG_UNUSED; default_expected_flags_["--class-loader-context"] = FLAG_UNUSED; default_expected_flags_["--class-loader-context-fds"] = FLAG_UNUSED; default_expected_flags_["--updatable-bcp-packages-file"] = "=/nonx/updatable-bcp-packages.txt"; // Arch default_expected_flags_["--instruction-set"] = "=arm64"; Loading Loading @@ -320,28 +318,6 @@ TEST_F(RunDex2OatTest, WithOnlyClassLoaderContextFds) { VerifyExpectedFlags(); } TEST_F(RunDex2OatTest, DEX2OATBOOTCLASSPATH) { ASSERT_EQ(nullptr, getenv("DEX2OATBOOTCLASSPATH")); ASSERT_EQ(0, setenv("DEX2OATBOOTCLASSPATH", "foobar", /*override=*/ false)) << "Failed to setenv: " << strerror(errno); CallRunDex2Oat(RunDex2OatArgs::MakeDefaultTestArgs()); SetExpectedFlagUsed("-Xbootclasspath", ":foobar"); VerifyExpectedFlags(); ASSERT_EQ(0, unsetenv("DEX2OATBOOTCLASSPATH")) << "Failed to setenv: " << strerror(errno); } TEST_F(RunDex2OatTest, UpdatableBootClassPath) { setSystemProperty("dalvik.vm.dex2oat-updatable-bcp-packages-file", "/path/to/file"); CallRunDex2Oat(RunDex2OatArgs::MakeDefaultTestArgs()); SetExpectedFlagUsed("--updatable-bcp-packages-file", "=/path/to/file"); VerifyExpectedFlags(); } TEST_F(RunDex2OatTest, DoNotGenerateCompactDex) { auto args = RunDex2OatArgs::MakeDefaultTestArgs(); args->generate_compact_dex = false; Loading
include/android/surface_control.h +8 −10 Original line number Diff line number Diff line Loading @@ -455,10 +455,10 @@ void ASurfaceTransaction_setHdrMetadata_cta861_3(ASurfaceTransaction* transactio __INTRODUCED_IN(29); /** * Same as ASurfaceTransaction_setFrameRateWithSeamlessness(transaction, surface_control, * frameRate, compatibility, true). * Same as ASurfaceTransaction_setFrameRateWithChangeStrategy(transaction, surface_control, * frameRate, compatibility, ANATIVEWINDOW_CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS). * * See ASurfaceTransaction_setFrameRateWithSeamlessness(). * See ASurfaceTransaction_setFrameRateWithChangeStrategy(). * * Available since API level 30. */ Loading Loading @@ -486,17 +486,15 @@ void ASurfaceTransaction_setFrameRate(ASurfaceTransaction* transaction, * influence the system's choice of display frame rate. To specify a compatibility use the * ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_* enum. * * \param shouldBeSeamless Whether display refresh rate transitions should be seamless. A * seamless transition is one that doesn't have any visual interruptions, such as a black * screen for a second or two. True indicates that any frame rate changes caused by this * request should be seamless. False indicates that non-seamless refresh rates are also * acceptable. * \param changeFrameRateStrategy Whether display refresh rate transitions should be seamless. * A seamless transition is one that doesn't have any visual interruptions, such as a black * screen for a second or two. See the ANATIVEWINDOW_CHANGE_FRAME_RATE_* values. * * Available since API level 31. */ void ASurfaceTransaction_setFrameRateWithSeamlessness(ASurfaceTransaction* transaction, void ASurfaceTransaction_setFrameRateWithChangeStrategy(ASurfaceTransaction* transaction, ASurfaceControl* surface_control, float frameRate, int8_t compatibility, bool shouldBeSeamless) int8_t compatibility, int8_t changeFrameRateStrategy) __INTRODUCED_IN(31); __END_DECLS Loading
include/input/Input.h +14 −0 Original line number Diff line number Diff line Loading @@ -265,6 +265,20 @@ enum class MotionClassification : uint8_t { */ const char* motionClassificationToString(MotionClassification classification); /** * Portion of FrameMetrics timeline of interest to input code. */ enum GraphicsTimeline : size_t { /** Time when the app sent the buffer to SurfaceFlinger. */ GPU_COMPLETED_TIME = 0, /** Time when the frame was presented on the display */ PRESENT_TIME = 1, /** Total size of the 'GraphicsTimeline' array. Must always be last. */ SIZE = 2 }; /** * Generator of unique numbers used to identify input events. * Loading