diff options
Diffstat (limited to 'cmds')
| -rw-r--r-- | cmds/am/src/com/android/commands/am/Am.java | 2 | ||||
| -rw-r--r-- | cmds/am/src/com/android/commands/am/Instrument.java | 5 | ||||
| -rw-r--r-- | cmds/app_process/Android.bp | 2 | ||||
| -rw-r--r-- | cmds/app_process/app_main.cpp | 5 | ||||
| -rw-r--r-- | cmds/bootanimation/BootAnimation.cpp | 16 | ||||
| -rw-r--r-- | cmds/bootanimation/BootAnimation.h | 1 | ||||
| -rw-r--r-- | cmds/idmap2/Android.bp | 1 |
7 files changed, 22 insertions, 10 deletions
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java index c5410a082322..b8d24e388d67 100644 --- a/cmds/am/src/com/android/commands/am/Am.java +++ b/cmds/am/src/com/android/commands/am/Am.java @@ -191,6 +191,8 @@ public class Am extends BaseCommand { instrument.noRestart = true; } else if (opt.equals("--always-check-signature")) { instrument.alwaysCheckSignature = true; + } else if (opt.equals("--instrument-sdk-sandbox")) { + instrument.instrumentSdkSandbox = true; } else { System.err.println("Error: Unknown option: " + opt); return; diff --git a/cmds/am/src/com/android/commands/am/Instrument.java b/cmds/am/src/com/android/commands/am/Instrument.java index a0562d964954..7ff4bc4bcf76 100644 --- a/cmds/am/src/com/android/commands/am/Instrument.java +++ b/cmds/am/src/com/android/commands/am/Instrument.java @@ -20,6 +20,7 @@ import static android.app.ActivityManager.INSTR_FLAG_ALWAYS_CHECK_SIGNATURE; import static android.app.ActivityManager.INSTR_FLAG_DISABLE_HIDDEN_API_CHECKS; import static android.app.ActivityManager.INSTR_FLAG_DISABLE_ISOLATED_STORAGE; import static android.app.ActivityManager.INSTR_FLAG_DISABLE_TEST_API_CHECKS; +import static android.app.ActivityManager.INSTR_FLAG_INSTRUMENT_SDK_SANDBOX; import static android.app.ActivityManager.INSTR_FLAG_NO_RESTART; import android.app.IActivityManager; @@ -97,6 +98,7 @@ public class Instrument { // Required public String componentNameArg; public boolean alwaysCheckSignature = false; + public boolean instrumentSdkSandbox = false; /** * Construct the instrument command runner. @@ -524,6 +526,9 @@ public class Instrument { if (alwaysCheckSignature) { flags |= INSTR_FLAG_ALWAYS_CHECK_SIGNATURE; } + if (instrumentSdkSandbox) { + flags |= INSTR_FLAG_INSTRUMENT_SDK_SANDBOX; + } if (!mAm.startInstrumentation(cn, profileFile, flags, args, watcher, connection, userId, abi)) { throw new AndroidException("INSTRUMENTATION_FAILED: " + cn.flattenToString()); diff --git a/cmds/app_process/Android.bp b/cmds/app_process/Android.bp index 6a685a79cc33..a1575173ded6 100644 --- a/cmds/app_process/Android.bp +++ b/cmds/app_process/Android.bp @@ -64,8 +64,6 @@ cc_binary { "libwilhelm", ], - header_libs: ["bionic_libc_platform_headers"], - compile_multilib: "both", cflags: [ diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp index 815f9455471c..12083b6fe20b 100644 --- a/cmds/app_process/app_main.cpp +++ b/cmds/app_process/app_main.cpp @@ -15,7 +15,6 @@ #include <android-base/macros.h> #include <binder/IPCThreadState.h> -#include <bionic/pac.h> #include <hwbinder/IPCThreadState.h> #include <utils/Log.h> #include <cutils/memory.h> @@ -183,10 +182,6 @@ int main(int argc, char* const argv[]) ALOGV("app_process main with argv: %s", argv_String.string()); } - // Because of applications that are using PAC instructions incorrectly, PAC - // is disabled in application processes for now. - ScopedDisablePAC x; - AppRuntime runtime(argv[0], computeArgBlockSize(argc, argv)); // Process command line arguments // ignore argv[0] diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index f9317eba4e27..968be3e20791 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -1425,12 +1425,17 @@ void BootAnimation::drawTexturedQuad(float xStart, float yStart, float width, fl void BootAnimation::initDynamicColors() { for (int i = 0; i < DYNAMIC_COLOR_COUNT; i++) { - parseColorDecimalString( - android::base::GetProperty("persist.bootanim.color" + std::to_string(i + 1), ""), + const auto syspropName = "persist.bootanim.color" + std::to_string(i + 1); + const auto syspropValue = android::base::GetProperty(syspropName, ""); + if (syspropValue != "") { + SLOGI("Loaded dynamic color: %s -> %s", syspropName.c_str(), syspropValue.c_str()); + mDynamicColorsApplied = true; + } + parseColorDecimalString(syspropValue, mAnimation->endColors[i], mAnimation->startColors[i]); } glUseProgram(mImageShader); - SLOGI("[BootAnimation] Dynamically coloring boot animation."); + SLOGI("Dynamically coloring boot animation. Sysprops loaded? %i", mDynamicColorsApplied); for (int i = 0; i < DYNAMIC_COLOR_COUNT; i++) { float *startColor = mAnimation->startColors[i]; float *endColor = mAnimation->endColors[i]; @@ -1465,6 +1470,11 @@ bool BootAnimation::playAnimation(const Animation& animation) { continue; //to next part } + if (animation.dynamicColoringEnabled && part.useDynamicColoring && !mDynamicColorsApplied) { + SLOGD("Trying to load dynamic color sysprops."); + initDynamicColors(); + } + // process the part not only while the count allows but also if already fading for (int r=0 ; !part.count || r<part.count || fadedFramesCount > 0 ; r++) { if (shouldStopPlayingPart(part, fadedFramesCount, lastDisplayedProgress)) break; diff --git a/cmds/bootanimation/BootAnimation.h b/cmds/bootanimation/BootAnimation.h index 4c378cbc48bd..a136ad0a90f2 100644 --- a/cmds/bootanimation/BootAnimation.h +++ b/cmds/bootanimation/BootAnimation.h @@ -228,6 +228,7 @@ private: bool mTimeIsAccurate; bool mTimeFormat12Hour; bool mShuttingDown; + bool mDynamicColorsApplied = false; String8 mZipFileName; SortedVector<String8> mLoadedFiles; sp<TimeCheckThread> mTimeCheckThread = nullptr; diff --git a/cmds/idmap2/Android.bp b/cmds/idmap2/Android.bp index c202f6f03b5b..6ef6845c75f2 100644 --- a/cmds/idmap2/Android.bp +++ b/cmds/idmap2/Android.bp @@ -52,6 +52,7 @@ cc_defaults { "-readability-braces-around-statements", "-readability-const-return-type", "-readability-convert-member-functions-to-static", + "-readability-duplicate-include", "-readability-else-after-return", "-readability-identifier-length", "-readability-named-parameter", |