diff --git a/Android.bp b/Android.bp index df6fdaa5fdf6..b9271245e608 100644 --- a/Android.bp +++ b/Android.bp @@ -242,6 +242,8 @@ java_library { "com.android.sysprop.init", "com.android.sysprop.localization", "PlatformProperties", + "vendor.lineage.livedisplay-V2.0-java", + "vendor.lineage.livedisplay-V2.1-java", ], sdk_version: "core_platform", installable: false, @@ -288,6 +290,14 @@ java_defaults { "staledataclass-annotation-processor", "error_prone_android_framework", ], + // Exports needed for staledataclass-annotation-processor, see b/139342589. + javacflags: [ + "-J--add-modules=jdk.compiler", + "-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", + "-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", + "-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", + "-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", + ], required: [ // TODO(b/120066492): remove default_television.xml when the build system // propagates "required" properly. diff --git a/CleanSpec.mk b/CleanSpec.mk index 02e8eecbb721..e8ab07d64603 100644 --- a/CleanSpec.mk +++ b/CleanSpec.mk @@ -78,6 +78,7 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/symbols/system/lib/libhwui.so) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/libhwui.so) $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/os/storage/*) $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/content/IClipboard.P) +$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/pocket/*) $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/telephony/java/com/android/internal/telephony/ITelephonyRegistry.P) $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates) $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/docs/api-stubs*) diff --git a/apct-tests/perftests/core/AndroidManifest.xml b/apct-tests/perftests/core/AndroidManifest.xml index e0c11cf0e3d5..91c9c3080dd5 100644 --- a/apct-tests/perftests/core/AndroidManifest.xml +++ b/apct-tests/perftests/core/AndroidManifest.xml @@ -14,6 +14,7 @@ + diff --git a/apex/jobscheduler/framework/java/android/app/AlarmManager.java b/apex/jobscheduler/framework/java/android/app/AlarmManager.java index 7393bcde13b6..2619f42805af 100644 --- a/apex/jobscheduler/framework/java/android/app/AlarmManager.java +++ b/apex/jobscheduler/framework/java/android/app/AlarmManager.java @@ -936,6 +936,13 @@ private void setImpl(@AlarmType int type, long triggerAtMillis, long windowMilli long intervalMillis, int flags, PendingIntent operation, final OnAlarmListener listener, String listenerTag, Executor targetExecutor, WorkSource workSource, AlarmClockInfo alarmClock) { + + if (mPackageName.equals("com.google.android.gms")) { + if (windowMillis == WINDOW_EXACT && !canScheduleExactAlarms()) { + windowMillis = WINDOW_HEURISTIC; + } + } + if (triggerAtMillis < 0) { /* NOTYET if (mAlwaysExact) { diff --git a/apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java b/apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java index caf7e7f4a4ed..1b1d2252dae1 100644 --- a/apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java +++ b/apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java @@ -73,7 +73,7 @@ void addPowerSaveTempWhitelistAppDirect(int uid, long duration, boolean isAppOnWhitelist(int appid); - int[] getPowerSaveWhitelistUserAppIds(); + int[] getPowerSaveWhitelistAppIds(); int[] getPowerSaveTempWhitelistAppIds(); diff --git a/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java b/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java index 2eb86c1b720f..dd2f936c0494 100644 --- a/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java +++ b/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java @@ -2089,14 +2089,14 @@ public boolean isAppOnWhitelist(int appid) { } /** - * Returns the array of app ids whitelisted by user. Take care not to + * Returns the array of whitelisted app ids. Take care not to * modify this, as it is a reference to the original copy. But the reference * can change when the list changes, so it needs to be re-acquired when * {@link PowerManager#ACTION_POWER_SAVE_WHITELIST_CHANGED} is sent. */ @Override - public int[] getPowerSaveWhitelistUserAppIds() { - return DeviceIdleController.this.getPowerSaveWhitelistUserAppIds(); + public int[] getPowerSaveWhitelistAppIds() { + return DeviceIdleController.this.getAppIdWhitelistInternal(); } @Override diff --git a/apex/jobscheduler/service/java/com/android/server/alarm/AlarmManagerService.java b/apex/jobscheduler/service/java/com/android/server/alarm/AlarmManagerService.java index 0de0a1cf9c8e..553670afca90 100644 --- a/apex/jobscheduler/service/java/com/android/server/alarm/AlarmManagerService.java +++ b/apex/jobscheduler/service/java/com/android/server/alarm/AlarmManagerService.java @@ -112,6 +112,7 @@ import android.text.format.DateFormat; import android.util.ArrayMap; import android.util.ArraySet; +import android.util.EventLog; import android.util.IndentingPrintWriter; import android.util.Log; import android.util.LongArrayQueue; @@ -2299,7 +2300,11 @@ void setImpl(int type, long triggerAtTime, long windowLength, long interval, + " reached for uid: " + UserHandle.formatUid(callingUid) + ", callingPackage: " + callingPackage; Slog.w(TAG, errorMsg); - throw new IllegalStateException(errorMsg); + if (callingUid != Process.SYSTEM_UID) { + throw new IllegalStateException(errorMsg); + } else { + EventLog.writeEvent(0x534e4554, "234441463", -1, errorMsg); + } } setImplLocked(type, triggerAtTime, triggerElapsed, windowLength, interval, operation, directReceiver, listenerTag, flags, workSource, alarmClock, callingUid, @@ -5722,7 +5727,7 @@ private void decrementAlarmCount(int uid, int decrement) { } } if (oldCount < decrement) { - Slog.wtf(TAG, "Attempt to decrement existing alarm count " + oldCount + " by " + Slog.w(TAG, "Attempt to decrement existing alarm count " + oldCount + " by " + decrement + " for uid " + uid); } } diff --git a/apex/jobscheduler/service/java/com/android/server/job/controllers/DeviceIdleJobsController.java b/apex/jobscheduler/service/java/com/android/server/job/controllers/DeviceIdleJobsController.java index f6de109d7ec9..2e20339b90b0 100644 --- a/apex/jobscheduler/service/java/com/android/server/job/controllers/DeviceIdleJobsController.java +++ b/apex/jobscheduler/service/java/com/android/server/job/controllers/DeviceIdleJobsController.java @@ -89,7 +89,7 @@ public void onReceive(Context context, Intent intent) { case PowerManager.ACTION_POWER_SAVE_WHITELIST_CHANGED: synchronized (mLock) { mDeviceIdleWhitelistAppIds = - mLocalDeviceIdleController.getPowerSaveWhitelistUserAppIds(); + mLocalDeviceIdleController.getPowerSaveWhitelistAppIds(); if (DEBUG) { Slog.d(TAG, "Got whitelist " + Arrays.toString(mDeviceIdleWhitelistAppIds)); @@ -132,7 +132,7 @@ public DeviceIdleJobsController(JobSchedulerService service) { mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); mLocalDeviceIdleController = LocalServices.getService(DeviceIdleInternal.class); - mDeviceIdleWhitelistAppIds = mLocalDeviceIdleController.getPowerSaveWhitelistUserAppIds(); + mDeviceIdleWhitelistAppIds = mLocalDeviceIdleController.getPowerSaveWhitelistAppIds(); mPowerSaveTempWhitelistAppIds = mLocalDeviceIdleController.getPowerSaveTempWhitelistAppIds(); mDeviceIdleUpdateFunctor = new DeviceIdleUpdateFunctor(); @@ -191,7 +191,7 @@ public void setUidActiveLocked(int uid, boolean active) { } /** - * Checks if the given job's scheduling app id exists in the device idle user whitelist. + * Checks if the given job's scheduling app id exists in the device idle whitelist. */ boolean isWhitelistedLocked(JobStatus job) { return Arrays.binarySearch(mDeviceIdleWhitelistAppIds, diff --git a/api/Android.mk b/api/Android.mk new file mode 100644 index 000000000000..ce5f995033c5 --- /dev/null +++ b/api/Android.mk @@ -0,0 +1,2 @@ +.PHONY: checkapi +checkapi: frameworks-base-api-current-compat frameworks-base-api-system-current-compat frameworks-base-api-module-lib-current-compat diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp index 12083b6fe20b..ffcf9fae31cd 100644 --- a/cmds/app_process/app_main.cpp +++ b/cmds/app_process/app_main.cpp @@ -85,8 +85,10 @@ class AppRuntime : public AndroidRuntime AndroidRuntime* ar = AndroidRuntime::getRuntime(); ar->callMain(mClassName, mClass, mArgs); - IPCThreadState::self()->stopProcess(); - hardware::IPCThreadState::self()->stopProcess(); + if (mClassName != "com.android.internal.os.ExecInit") { + IPCThreadState::self()->stopProcess(); + hardware::IPCThreadState::self()->stopProcess(); + } } virtual void onZygoteInit() @@ -334,7 +336,7 @@ int main(int argc, char* const argv[]) if (zygote) { runtime.start("com.android.internal.os.ZygoteInit", args, zygote); - } else if (className) { + } else if (!className.isEmpty()) { runtime.start("com.android.internal.os.RuntimeInit", args, zygote); } else { fprintf(stderr, "Error: no class name or --zygote supplied.\n"); diff --git a/cmds/bootanimation/Android.bp b/cmds/bootanimation/Android.bp index 3534624a58a2..b2b66c27f795 100644 --- a/cmds/bootanimation/Android.bp +++ b/cmds/bootanimation/Android.bp @@ -71,7 +71,7 @@ cc_library_shared { "libui", "libjnigraphics", "libEGL", - "libGLESv2", + "libGLESv1_CM", "libgui", ], } diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index 50c8e933d25f..238f64f9eba8 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -52,8 +52,9 @@ #include #include #include -#include -#include + +#include +#include #include #include "BootAnimation.h" @@ -108,93 +109,6 @@ static const char DISPLAYS_PROP_NAME[] = "persist.service.bootanim.displays"; static const char CLOCK_ENABLED_PROP_NAME[] = "persist.sys.bootanim.clock.enabled"; static const int ANIM_ENTRY_NAME_MAX = ANIM_PATH_MAX + 1; static constexpr size_t TEXT_POS_LEN_MAX = 16; -static const int DYNAMIC_COLOR_COUNT = 4; -static const char U_TEXTURE[] = "uTexture"; -static const char U_FADE[] = "uFade"; -static const char U_CROP_AREA[] = "uCropArea"; -static const char U_START_COLOR_PREFIX[] = "uStartColor"; -static const char U_END_COLOR_PREFIX[] = "uEndColor"; -static const char U_COLOR_PROGRESS[] = "uColorProgress"; -static const char A_UV[] = "aUv"; -static const char A_POSITION[] = "aPosition"; -static const char VERTEX_SHADER_SOURCE[] = R"( - precision mediump float; - attribute vec4 aPosition; - attribute highp vec2 aUv; - varying highp vec2 vUv; - void main() { - gl_Position = aPosition; - vUv = aUv; - })"; -static const char IMAGE_FRAG_DYNAMIC_COLORING_SHADER_SOURCE[] = R"( - precision mediump float; - const float cWhiteMaskThreshold = 0.05; - uniform sampler2D uTexture; - uniform float uFade; - uniform float uColorProgress; - uniform vec4 uStartColor0; - uniform vec4 uStartColor1; - uniform vec4 uStartColor2; - uniform vec4 uStartColor3; - uniform vec4 uEndColor0; - uniform vec4 uEndColor1; - uniform vec4 uEndColor2; - uniform vec4 uEndColor3; - varying highp vec2 vUv; - void main() { - vec4 mask = texture2D(uTexture, vUv); - float r = mask.r; - float g = mask.g; - float b = mask.b; - float a = mask.a; - // If all channels have values, render pixel as a shade of white. - float useWhiteMask = step(cWhiteMaskThreshold, r) - * step(cWhiteMaskThreshold, g) - * step(cWhiteMaskThreshold, b) - * step(cWhiteMaskThreshold, a); - vec4 color = r * mix(uStartColor0, uEndColor0, uColorProgress) - + g * mix(uStartColor1, uEndColor1, uColorProgress) - + b * mix(uStartColor2, uEndColor2, uColorProgress) - + a * mix(uStartColor3, uEndColor3, uColorProgress); - color = mix(color, vec4(vec3((r + g + b + a) * 0.25), 1.0), useWhiteMask); - gl_FragColor = vec4(color.x, color.y, color.z, (1.0 - uFade)) * color.a; - })"; -static const char IMAGE_FRAG_SHADER_SOURCE[] = R"( - precision mediump float; - uniform sampler2D uTexture; - uniform float uFade; - varying highp vec2 vUv; - void main() { - vec4 color = texture2D(uTexture, vUv); - gl_FragColor = vec4(color.x, color.y, color.z, (1.0 - uFade)) * color.a; - })"; -static const char TEXT_FRAG_SHADER_SOURCE[] = R"( - precision mediump float; - uniform sampler2D uTexture; - uniform vec4 uCropArea; - varying highp vec2 vUv; - void main() { - vec2 uv = vec2(mix(uCropArea.x, uCropArea.z, vUv.x), - mix(uCropArea.y, uCropArea.w, vUv.y)); - gl_FragColor = texture2D(uTexture, uv); - })"; - -static GLfloat quadPositions[] = { - -0.5f, -0.5f, - +0.5f, -0.5f, - +0.5f, +0.5f, - +0.5f, +0.5f, - -0.5f, +0.5f, - -0.5f, -0.5f -}; -static GLfloat quadUVs[] = { - 0.0f, 1.0f, - 1.0f, 1.0f, - 1.0f, 0.0f, - 1.0f, 0.0f, - 0.0f, 0.0f, - 0.0f, 1.0f -}; // --------------------------------------------------------------------------- @@ -250,8 +164,7 @@ void BootAnimation::binderDied(const wp&) { requestExit(); } -static void* decodeImage(const void* encodedData, size_t dataLength, AndroidBitmapInfo* outInfo, - bool premultiplyAlpha) { +static void* decodeImage(const void* encodedData, size_t dataLength, AndroidBitmapInfo* outInfo) { AImageDecoder* decoder = nullptr; AImageDecoder_createFromBuffer(encodedData, dataLength, &decoder); if (!decoder) { @@ -265,10 +178,6 @@ static void* decodeImage(const void* encodedData, size_t dataLength, AndroidBitm outInfo->stride = AImageDecoder_getMinimumStride(decoder); outInfo->flags = 0; - if (!premultiplyAlpha) { - AImageDecoder_setUnpremultipliedRequired(decoder, true); - } - const size_t size = outInfo->stride * outInfo->height; void* pixels = malloc(size); int result = AImageDecoder_decodeImage(decoder, pixels, outInfo->stride, size); @@ -282,14 +191,13 @@ static void* decodeImage(const void* encodedData, size_t dataLength, AndroidBitm } status_t BootAnimation::initTexture(Texture* texture, AssetManager& assets, - const char* name, bool premultiplyAlpha) { + const char* name) { Asset* asset = assets.open(name, Asset::ACCESS_BUFFER); if (asset == nullptr) return NO_INIT; AndroidBitmapInfo bitmapInfo; - void* pixels = decodeImage(asset->getBuffer(false), asset->getLength(), &bitmapInfo, - premultiplyAlpha); + void* pixels = decodeImage(asset->getBuffer(false), asset->getLength(), &bitmapInfo); auto pixelDeleter = std::unique_ptr{ pixels, free }; asset->close(); @@ -302,6 +210,7 @@ status_t BootAnimation::initTexture(Texture* texture, AssetManager& assets, const int w = bitmapInfo.width; const int h = bitmapInfo.height; + GLint crop[4] = { 0, h, w, -h }; texture->w = w; texture->h = h; @@ -329,19 +238,18 @@ status_t BootAnimation::initTexture(Texture* texture, AssetManager& assets, break; } - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop); + glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); return NO_ERROR; } -status_t BootAnimation::initTexture(FileMap* map, int* width, int* height, - bool premultiplyAlpha) { +status_t BootAnimation::initTexture(FileMap* map, int* width, int* height) { AndroidBitmapInfo bitmapInfo; - void* pixels = decodeImage(map->getDataPtr(), map->getDataLength(), &bitmapInfo, - premultiplyAlpha); + void* pixels = decodeImage(map->getDataPtr(), map->getDataLength(), &bitmapInfo); auto pixelDeleter = std::unique_ptr{ pixels, free }; // FileMap memory is never released until application exit. @@ -356,6 +264,7 @@ status_t BootAnimation::initTexture(FileMap* map, int* width, int* height, const int w = bitmapInfo.width; const int h = bitmapInfo.height; + GLint crop[4] = { 0, h, w, -h }; int tw = 1 << (31 - __builtin_clz(w)); int th = 1 << (31 - __builtin_clz(h)); if (tw < w) tw <<= 1; @@ -389,10 +298,7 @@ status_t BootAnimation::initTexture(FileMap* map, int* width, int* height, break; } - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop); *width = w; *height = h; @@ -564,9 +470,7 @@ status_t BootAnimation::readyToRun() { eglInitialize(display, nullptr, nullptr); EGLConfig config = getEglConfig(display); EGLSurface surface = eglCreateWindowSurface(display, config, s.get(), nullptr); - // Initialize egl context with client version number 2.0. - EGLint contextAttributes[] = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE}; - EGLContext context = eglCreateContext(display, config, nullptr, contextAttributes); + EGLContext context = eglCreateContext(display, config, nullptr, nullptr); EGLint w, h; eglQuerySurface(display, surface, EGL_WIDTH, &w); eglQuerySurface(display, surface, EGL_HEIGHT, &h); @@ -577,8 +481,8 @@ status_t BootAnimation::readyToRun() { mDisplay = display; mContext = context; mSurface = surface; - mInitWidth = mWidth = w; - mInitHeight = mHeight = h; + mWidth = w; + mHeight = h; mFlingerSurfaceControl = control; mFlingerSurface = s; mTargetInset = -1; @@ -599,6 +503,11 @@ status_t BootAnimation::readyToRun() { void BootAnimation::projectSceneToWindow() { glViewport(0, 0, mWidth, mHeight); glScissor(0, 0, mWidth, mHeight); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrthof(0, static_cast(mWidth), 0, static_cast(mHeight), -1, 1); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); } void BootAnimation::resizeSurface(int newWidth, int newHeight) { @@ -611,7 +520,6 @@ void BootAnimation::resizeSurface(int newWidth, int newHeight) { eglMakeCurrent(mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglDestroySurface(mDisplay, mSurface); - mFlingerSurfaceControl->updateDefaultBufferSize(newWidth, newHeight); const auto limitedSize = limitSurfaceSize(newWidth, newHeight); mWidth = limitedSize.width; mHeight = limitedSize.height; @@ -692,80 +600,11 @@ void BootAnimation::findBootAnimationFile() { } } -GLuint compileShader(GLenum shaderType, const GLchar *source) { - GLuint shader = glCreateShader(shaderType); - glShaderSource(shader, 1, &source, 0); - glCompileShader(shader); - GLint isCompiled = 0; - glGetShaderiv(shader, GL_COMPILE_STATUS, &isCompiled); - if (isCompiled == GL_FALSE) { - SLOGE("Compile shader failed. Shader type: %d", shaderType); - GLint maxLength = 0; - glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &maxLength); - std::vector errorLog(maxLength); - glGetShaderInfoLog(shader, maxLength, &maxLength, &errorLog[0]); - SLOGE("Shader compilation error: %s", &errorLog[0]); - return 0; - } - return shader; -} - -GLuint linkShader(GLuint vertexShader, GLuint fragmentShader) { - GLuint program = glCreateProgram(); - glAttachShader(program, vertexShader); - glAttachShader(program, fragmentShader); - glLinkProgram(program); - GLint isLinked = 0; - glGetProgramiv(program, GL_LINK_STATUS, (int *)&isLinked); - if (isLinked == GL_FALSE) { - SLOGE("Linking shader failed. Shader handles: vert %d, frag %d", - vertexShader, fragmentShader); - return 0; - } - return program; -} - -void BootAnimation::initShaders() { - bool dynamicColoringEnabled = mAnimation != nullptr && mAnimation->dynamicColoringEnabled; - GLuint vertexShader = compileShader(GL_VERTEX_SHADER, (const GLchar *)VERTEX_SHADER_SOURCE); - GLuint imageFragmentShader = - compileShader(GL_FRAGMENT_SHADER, dynamicColoringEnabled - ? (const GLchar *)IMAGE_FRAG_DYNAMIC_COLORING_SHADER_SOURCE - : (const GLchar *)IMAGE_FRAG_SHADER_SOURCE); - GLuint textFragmentShader = - compileShader(GL_FRAGMENT_SHADER, (const GLchar *)TEXT_FRAG_SHADER_SOURCE); - - // Initialize image shader. - mImageShader = linkShader(vertexShader, imageFragmentShader); - GLint positionLocation = glGetAttribLocation(mImageShader, A_POSITION); - GLint uvLocation = glGetAttribLocation(mImageShader, A_UV); - mImageTextureLocation = glGetUniformLocation(mImageShader, U_TEXTURE); - mImageFadeLocation = glGetUniformLocation(mImageShader, U_FADE); - glEnableVertexAttribArray(positionLocation); - glVertexAttribPointer(positionLocation, 2, GL_FLOAT, GL_FALSE, 0, quadPositions); - glVertexAttribPointer(uvLocation, 2, GL_FLOAT, GL_FALSE, 0, quadUVs); - glEnableVertexAttribArray(uvLocation); - - // Initialize text shader. - mTextShader = linkShader(vertexShader, textFragmentShader); - positionLocation = glGetAttribLocation(mTextShader, A_POSITION); - uvLocation = glGetAttribLocation(mTextShader, A_UV); - mTextTextureLocation = glGetUniformLocation(mTextShader, U_TEXTURE); - mTextCropAreaLocation = glGetUniformLocation(mTextShader, U_CROP_AREA); - glEnableVertexAttribArray(positionLocation); - glVertexAttribPointer(positionLocation, 2, GL_FLOAT, GL_FALSE, 0, quadPositions); - glVertexAttribPointer(uvLocation, 2, GL_FLOAT, GL_FALSE, 0, quadUVs); - glEnableVertexAttribArray(uvLocation); -} - bool BootAnimation::threadLoop() { bool result; - initShaders(); - // We have no bootanimation file, so we use the stock android logo // animation. if (mZipFileName.isEmpty()) { - ALOGD("No animation file"); result = android(); } else { result = movie(); @@ -784,8 +623,6 @@ bool BootAnimation::threadLoop() { } bool BootAnimation::android() { - glActiveTexture(GL_TEXTURE0); - SLOGD("%sAnimationShownTiming start time: %" PRId64 "ms", mShuttingDown ? "Shutdown" : "Boot", elapsedRealtime()); initTexture(&mAndroid[0], mAssets, "images/android-logo-mask.png"); @@ -794,16 +631,19 @@ bool BootAnimation::android() { mCallbacks->init({}); // clear screen + glShadeModel(GL_FLAT); glDisable(GL_DITHER); glDisable(GL_SCISSOR_TEST); - glUseProgram(mImageShader); - glClearColor(0,0,0,1); glClear(GL_COLOR_BUFFER_BIT); eglSwapBuffers(mDisplay, mSurface); + glEnable(GL_TEXTURE_2D); + glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + // Blend state glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); const nsecs_t startTime = systemTime(); do { @@ -826,12 +666,12 @@ bool BootAnimation::android() { glEnable(GL_SCISSOR_TEST); glDisable(GL_BLEND); glBindTexture(GL_TEXTURE_2D, mAndroid[1].name); - drawTexturedQuad(x, yc, mAndroid[1].w, mAndroid[1].h); - drawTexturedQuad(x + mAndroid[1].w, yc, mAndroid[1].w, mAndroid[1].h); + glDrawTexiOES(x, yc, 0, mAndroid[1].w, mAndroid[1].h); + glDrawTexiOES(x + mAndroid[1].w, yc, 0, mAndroid[1].w, mAndroid[1].h); glEnable(GL_BLEND); glBindTexture(GL_TEXTURE_2D, mAndroid[0].name); - drawTexturedQuad(xc, yc, mAndroid[0].w, mAndroid[0].h); + glDrawTexiOES(xc, yc, 0, mAndroid[0].w, mAndroid[0].h); EGLBoolean res = eglSwapBuffers(mDisplay, mSurface); if (res == EGL_FALSE) @@ -926,20 +766,6 @@ static bool parseColor(const char str[7], float color[3]) { return true; } -// Parse a color represented as a signed decimal int string. -// E.g. "-2757722" (whose hex 2's complement is 0xFFD5EBA6). -// If the input color string is empty, set color with values in defaultColor. -static void parseColorDecimalString(const std::string& colorString, - float color[3], float defaultColor[3]) { - if (colorString == "") { - memcpy(color, defaultColor, sizeof(float) * 3); - return; - } - int colorInt = atoi(colorString.c_str()); - color[0] = ((float)((colorInt >> 16) & 0xFF)) / 0xFF; // r - color[1] = ((float)((colorInt >> 8) & 0xFF)) / 0xFF; // g - color[2] = ((float)(colorInt & 0xFF)) / 0xFF; // b -} static bool readFile(ZipFileRO* zip, const char* name, String8& outString) { ZipEntryRO entry = zip->findEntryByName(name); @@ -972,10 +798,10 @@ status_t BootAnimation::initFont(Font* font, const char* fallback) { status = initTexture(font->map, &font->texture.w, &font->texture.h); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); } else if (fallback != nullptr) { status = initTexture(&font->texture, mAssets, fallback); } else { @@ -990,11 +816,40 @@ status_t BootAnimation::initFont(Font* font, const char* fallback) { return status; } +void BootAnimation::fadeFrame(const int frameLeft, const int frameBottom, const int frameWidth, + const int frameHeight, const Animation::Part& part, + const int fadedFramesCount) { + glEnable(GL_BLEND); + glEnableClientState(GL_VERTEX_ARRAY); + glDisable(GL_TEXTURE_2D); + // avoid creating a hole due to mixing result alpha with GL_REPLACE texture + glBlendFuncSeparateOES(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ZERO, GL_ONE); + + const float alpha = static_cast(fadedFramesCount) / part.framesToFadeCount; + glColor4f(part.backgroundColor[0], part.backgroundColor[1], part.backgroundColor[2], alpha); + + const float frameStartX = static_cast(frameLeft); + const float frameStartY = static_cast(frameBottom); + const float frameEndX = frameStartX + frameWidth; + const float frameEndY = frameStartY + frameHeight; + const GLfloat frameRect[] = { + frameStartX, frameStartY, + frameEndX, frameStartY, + frameEndX, frameEndY, + frameStartX, frameEndY + }; + glVertexPointer(2, GL_FLOAT, 0, frameRect); + glDrawArrays(GL_TRIANGLE_FAN, 0, 4); + + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_TEXTURE_2D); + glDisableClientState(GL_VERTEX_ARRAY); + glDisable(GL_BLEND); +} + void BootAnimation::drawText(const char* str, const Font& font, bool bold, int* x, int* y) { glEnable(GL_BLEND); // Allow us to draw on top of the animation glBindTexture(GL_TEXTURE_2D, font.texture.name); - glUseProgram(mTextShader); - glUniform1i(mTextTextureLocation, 0); const int len = strlen(str); const int strWidth = font.char_width * len; @@ -1010,6 +865,8 @@ void BootAnimation::drawText(const char* str, const Font& font, bool bold, int* *y = mHeight + *y - font.char_height; } + int cropRect[4] = { 0, 0, font.char_width, -font.char_height }; + for (int i = 0; i < len; i++) { char c = str[i]; @@ -1021,13 +878,13 @@ void BootAnimation::drawText(const char* str, const Font& font, bool bold, int* const int charPos = (c - FONT_BEGIN_CHAR); // Position in the list of valid characters const int row = charPos / FONT_NUM_COLS; const int col = charPos % FONT_NUM_COLS; - // Bold fonts are expected in the second half of each row. - float v0 = (row + (bold ? 0.5f : 0.0f)) / FONT_NUM_ROWS; - float u0 = ((float)col) / FONT_NUM_COLS; - float v1 = v0 + 1.0f / FONT_NUM_ROWS / 2; - float u1 = u0 + 1.0f / FONT_NUM_COLS; - glUniform4f(mTextCropAreaLocation, u0, v0, u1, v1); - drawTexturedQuad(*x, *y, font.char_width, font.char_height); + cropRect[0] = col * font.char_width; // Left of column + cropRect[1] = row * font.char_height * 2; // Top of row + // Move down to bottom of regular (one char_heigh) or bold (two char_heigh) line + cropRect[1] += bold ? 2 * font.char_height : font.char_height; + glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, cropRect); + + glDrawTexiOES(*x, *y, 0, font.char_width, font.char_height); *x += font.char_width; } @@ -1081,8 +938,6 @@ bool BootAnimation::parseAnimationDesc(Animation& animation) { return false; } char const* s = desString.string(); - std::string dynamicColoringPartName = ""; - bool postDynamicColoring = false; // Parse the description file for (;;) { @@ -1097,19 +952,11 @@ bool BootAnimation::parseAnimationDesc(Animation& animation) { int pause = 0; int progress = 0; int framesToFadeCount = 0; - int colorTransitionStart = 0; - int colorTransitionEnd = 0; char path[ANIM_ENTRY_NAME_MAX]; char color[7] = "000000"; // default to black if unspecified char clockPos1[TEXT_POS_LEN_MAX + 1] = ""; char clockPos2[TEXT_POS_LEN_MAX + 1] = ""; - char dynamicColoringPartNameBuffer[ANIM_ENTRY_NAME_MAX]; char pathType; - // start colors default to black if unspecified - char start_color_0[7] = "000000"; - char start_color_1[7] = "000000"; - char start_color_2[7] = "000000"; - char start_color_3[7] = "000000"; int nextReadPos; @@ -1124,18 +971,6 @@ bool BootAnimation::parseAnimationDesc(Animation& animation) { } else { animation.progressEnabled = false; } - } else if (sscanf(l, "dynamic_colors %" STRTO(ANIM_PATH_MAX) "s #%6s #%6s #%6s #%6s %d %d", - dynamicColoringPartNameBuffer, - start_color_0, start_color_1, start_color_2, start_color_3, - &colorTransitionStart, &colorTransitionEnd)) { - animation.dynamicColoringEnabled = true; - parseColor(start_color_0, animation.startColors[0]); - parseColor(start_color_1, animation.startColors[1]); - parseColor(start_color_2, animation.startColors[2]); - parseColor(start_color_3, animation.startColors[3]); - animation.colorTransitionStart = colorTransitionStart; - animation.colorTransitionEnd = colorTransitionEnd; - dynamicColoringPartName = std::string(dynamicColoringPartNameBuffer); } else if (sscanf(l, "%c %d %d %" STRTO(ANIM_PATH_MAX) "s%n", &pathType, &count, &pause, path, &nextReadPos) >= 4) { if (pathType == 'f') { @@ -1148,16 +983,6 @@ bool BootAnimation::parseAnimationDesc(Animation& animation) { // "clockPos1=%s, clockPos2=%s", // pathType, count, pause, path, framesToFadeCount, color, clockPos1, clockPos2); Animation::Part part; - if (path == dynamicColoringPartName) { - // Part is specified to use dynamic coloring. - part.useDynamicColoring = true; - part.postDynamicColoring = false; - postDynamicColoring = true; - } else { - // Part does not use dynamic coloring. - part.useDynamicColoring = false; - part.postDynamicColoring = postDynamicColoring; - } part.playUntilComplete = pathType == 'c'; part.framesToFadeCount = framesToFadeCount; part.count = count; @@ -1343,16 +1168,19 @@ bool BootAnimation::movie() { // Blend required to draw time on top of animation frames. glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glShadeModel(GL_FLAT); glDisable(GL_DITHER); glDisable(GL_SCISSOR_TEST); glDisable(GL_BLEND); - glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, 0); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glEnable(GL_TEXTURE_2D); + glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + bool clockFontInitialized = false; if (mClockEnabled) { clockFontInitialized = @@ -1367,10 +1195,6 @@ bool BootAnimation::movie() { mTimeCheckThread->run("BootAnimation::TimeCheckThread", PRIORITY_NORMAL); } - if (mAnimation->dynamicColoringEnabled) { - initDynamicColors(); - } - playAnimation(*mAnimation); if (mTimeCheckThread != nullptr) { @@ -1396,60 +1220,6 @@ bool BootAnimation::shouldStopPlayingPart(const Animation::Part& part, (lastDisplayedProgress == 0 || lastDisplayedProgress == 100); } -// Linear mapping from range to range -float mapLinear(float x, float a1, float a2, float b1, float b2) { - return b1 + ( x - a1 ) * ( b2 - b1 ) / ( a2 - a1 ); -} - -void BootAnimation::drawTexturedQuad(float xStart, float yStart, float width, float height) { - // Map coordinates from screen space to world space. - float x0 = mapLinear(xStart, 0, mWidth, -1, 1); - float y0 = mapLinear(yStart, 0, mHeight, -1, 1); - float x1 = mapLinear(xStart + width, 0, mWidth, -1, 1); - float y1 = mapLinear(yStart + height, 0, mHeight, -1, 1); - // Update quad vertex positions. - quadPositions[0] = x0; - quadPositions[1] = y0; - quadPositions[2] = x1; - quadPositions[3] = y0; - quadPositions[4] = x1; - quadPositions[5] = y1; - quadPositions[6] = x1; - quadPositions[7] = y1; - quadPositions[8] = x0; - quadPositions[9] = y1; - quadPositions[10] = x0; - quadPositions[11] = y0; - glDrawArrays(GL_TRIANGLES, 0, - sizeof(quadPositions) / sizeof(quadPositions[0]) / 2); -} - -void BootAnimation::initDynamicColors() { - for (int i = 0; i < DYNAMIC_COLOR_COUNT; i++) { - 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("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]; - glUniform4f(glGetUniformLocation(mImageShader, - (U_START_COLOR_PREFIX + std::to_string(i)).c_str()), - startColor[0], startColor[1], startColor[2], 1 /* alpha */); - glUniform4f(glGetUniformLocation(mImageShader, - (U_END_COLOR_PREFIX + std::to_string(i)).c_str()), - endColor[0], endColor[1], endColor[2], 1 /* alpha */); - } - mImageColorProgressLocation = glGetUniformLocation(mImageShader, U_COLOR_PROGRESS); -} - bool BootAnimation::playAnimation(const Animation& animation) { const size_t pcount = animation.parts.size(); nsecs_t frameDuration = s2ns(1) / animation.fps; @@ -1459,11 +1229,10 @@ bool BootAnimation::playAnimation(const Animation& animation) { int fadedFramesCount = 0; int lastDisplayedProgress = 0; - int colorTransitionStart = animation.colorTransitionStart; - int colorTransitionEnd = animation.colorTransitionEnd; for (size_t i=0 ; i 0 ; r++) { if (shouldStopPlayingPart(part, fadedFramesCount, lastDisplayedProgress)) break; - // It's possible that the sysprops were not loaded yet at this boot phase. - // If that's the case, then we should keep trying until they are available. - if (animation.dynamicColoringEnabled && !mDynamicColorsApplied - && (part.useDynamicColoring || part.postDynamicColoring)) { - SLOGD("Trying to load dynamic color sysprops."); - initDynamicColors(); - if (mDynamicColorsApplied) { - // Sysprops were loaded. Next step is to adjust the animation if we loaded - // the colors after the animation should have started. - const int transitionLength = colorTransitionEnd - colorTransitionStart; - if (part.postDynamicColoring) { - colorTransitionStart = 0; - colorTransitionEnd = fmin(transitionLength, fcount - 1); - } - } - } - mCallbacks->playPart(i, part, r); glClearColor( @@ -1502,10 +1254,6 @@ bool BootAnimation::playAnimation(const Animation& animation) { part.backgroundColor[2], 1.0f); - ALOGD("Playing files = %s/%s, Requested repeat = %d, playUntilComplete = %s", - animation.fileName.string(), part.path.string(), part.count, - part.playUntilComplete ? "true" : "false"); - // For the last animation, if we have progress indicator from // the system, display it. int currentProgress = android::base::GetIntProperty(PROGRESS_PROP_NAME, 0); @@ -1515,24 +1263,10 @@ bool BootAnimation::playAnimation(const Animation& animation) { for (size_t j=0 ; j(mWidth) / mInitWidth; - const double ratio_h = static_cast(mHeight) / mInitHeight; - const int animationX = (mWidth - animation.width * ratio_w) / 2; - const int animationY = (mHeight - animation.height * ratio_h) / 2; + const int animationX = (mWidth - animation.width) / 2; + const int animationY = (mHeight - animation.height) / 2; const Animation::Frame& frame(part.frames[j]); nsecs_t lastFrame = systemTime(); @@ -1540,42 +1274,44 @@ bool BootAnimation::playAnimation(const Animation& animation) { if (r > 0) { glBindTexture(GL_TEXTURE_2D, frame.tid); } else { - glGenTextures(1, &frame.tid); - glBindTexture(GL_TEXTURE_2D, frame.tid); + if (part.count != 1) { + glGenTextures(1, &frame.tid); + glBindTexture(GL_TEXTURE_2D, frame.tid); + glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + } int w, h; - // Set decoding option to alpha unpremultiplied so that the R, G, B channels - // of transparent pixels are preserved. - initTexture(frame.map, &w, &h, false /* don't premultiply alpha */); + initTexture(frame.map, &w, &h); } - const int trimWidth = frame.trimWidth * ratio_w; - const int trimHeight = frame.trimHeight * ratio_h; - const int trimX = frame.trimX * ratio_w; - const int trimY = frame.trimY * ratio_h; - const int xc = animationX + trimX; - const int yc = animationY + trimY; - glClear(GL_COLOR_BUFFER_BIT); + const int xc = animationX + frame.trimX; + const int yc = animationY + frame.trimY; + Region clearReg(Rect(mWidth, mHeight)); + clearReg.subtractSelf(Rect(xc, yc, xc+frame.trimWidth, yc+frame.trimHeight)); + if (!clearReg.isEmpty()) { + Region::const_iterator head(clearReg.begin()); + Region::const_iterator tail(clearReg.end()); + glEnable(GL_SCISSOR_TEST); + while (head != tail) { + const Rect& r2(*head++); + glScissor(r2.left, mHeight - r2.bottom, r2.width(), r2.height()); + glClear(GL_COLOR_BUFFER_BIT); + } + glDisable(GL_SCISSOR_TEST); + } // specify the y center as ceiling((mHeight - frame.trimHeight) / 2) // which is equivalent to mHeight - (yc + frame.trimHeight) - const int frameDrawY = mHeight - (yc + trimHeight); + const int frameDrawY = mHeight - (yc + frame.trimHeight); + glDrawTexiOES(xc, frameDrawY, 0, frame.trimWidth, frame.trimHeight); - float fade = 0; // if the part hasn't been stopped yet then continue fading if necessary if (exitPending() && part.hasFadingPhase()) { - fade = static_cast(++fadedFramesCount) / part.framesToFadeCount; + fadeFrame(xc, frameDrawY, frame.trimWidth, frame.trimHeight, part, + ++fadedFramesCount); if (fadedFramesCount >= part.framesToFadeCount) { fadedFramesCount = MAX_FADED_FRAMES_COUNT; // no more fading } } - glUseProgram(mImageShader); - glUniform1i(mImageTextureLocation, 0); - glUniform1f(mImageFadeLocation, fade); - if (animation.dynamicColoringEnabled) { - glUniform1f(mImageColorProgressLocation, colorProgress); - } - glEnable(GL_BLEND); - drawTexturedQuad(xc, frameDrawY, trimWidth, trimHeight); - glDisable(GL_BLEND); if (mClockEnabled && mTimeIsAccurate && validClock(part)) { drawClock(animation.clockFont, part.clockPosX, part.clockPosY); @@ -1644,9 +1380,6 @@ bool BootAnimation::playAnimation(const Animation& animation) { } } - ALOGD("%sAnimationShownTiming End time: %" PRId64 "ms", mShuttingDown ? "Shutdown" : "Boot", - elapsedRealtime()); - return true; } @@ -1722,8 +1455,6 @@ BootAnimation::Animation* BootAnimation::loadAnimation(const String8& fn) { return nullptr; } - ALOGD("%s is loaded successfully", fn.string()); - Animation *animation = new Animation; animation->fileName = fn; animation->zip = zip; diff --git a/cmds/bootanimation/BootAnimation.h b/cmds/bootanimation/BootAnimation.h index 86582053b4e1..8138266b937b 100644 --- a/cmds/bootanimation/BootAnimation.h +++ b/cmds/bootanimation/BootAnimation.h @@ -31,7 +31,7 @@ #include #include -#include +#include namespace android { @@ -53,7 +53,7 @@ class BootAnimation : public Thread, public IBinder::DeathRecipient }; struct Font { - FileMap* map = nullptr; + FileMap* map; Texture texture; int char_width; int char_height; @@ -62,7 +62,7 @@ class BootAnimation : public Thread, public IBinder::DeathRecipient struct Animation { struct Frame { String8 name; - FileMap* map = nullptr; + FileMap* map; int trimX; int trimY; int trimWidth; @@ -90,10 +90,6 @@ class BootAnimation : public Thread, public IBinder::DeathRecipient uint8_t* audioData; int audioLength; Animation* animation; - // Controls if dynamic coloring is enabled for this part. - bool useDynamicColoring = false; - // Defines if this part is played after the dynamic coloring part. - bool postDynamicColoring = false; bool hasFadingPhase() const { return !playUntilComplete && framesToFadeCount > 0; @@ -109,12 +105,6 @@ class BootAnimation : public Thread, public IBinder::DeathRecipient ZipFileRO* zip; Font clockFont; Font progressFont; - // Controls if dynamic coloring is enabled for the whole animation. - bool dynamicColoringEnabled = false; - int colorTransitionStart = 0; // Start frame of dynamic color transition. - int colorTransitionEnd = 0; // End frame of dynamic color transition. - float startColors[4][3]; // Start colors of dynamic color transition. - float endColors[4][3]; // End colors of dynamic color transition. }; // All callbacks will be called from this class's internal thread. @@ -173,12 +163,9 @@ class BootAnimation : public Thread, public IBinder::DeathRecipient int displayEventCallback(int fd, int events, void* data); void processDisplayEvents(); - status_t initTexture(Texture* texture, AssetManager& asset, const char* name, - bool premultiplyAlpha = true); - status_t initTexture(FileMap* map, int* width, int* height, - bool premultiplyAlpha = true); + status_t initTexture(Texture* texture, AssetManager& asset, const char* name); + status_t initTexture(FileMap* map, int* width, int* height); status_t initFont(Font* font, const char* fallback); - void initShaders(); bool android(); bool movie(); void drawText(const char* str, const Font& font, bool bold, int* x, int* y); @@ -186,7 +173,6 @@ class BootAnimation : public Thread, public IBinder::DeathRecipient void drawProgress(int percent, const Font& font, const int xPos, const int yPos); void fadeFrame(int frameLeft, int frameBottom, int frameWidth, int frameHeight, const Animation::Part& part, int fadedFramesCount); - void drawTexturedQuad(float xStart, float yStart, float width, float height); bool validClock(const Animation::Part& part); Animation* loadAnimation(const String8&); bool playAnimation(const Animation&); @@ -206,15 +192,12 @@ class BootAnimation : public Thread, public IBinder::DeathRecipient void checkExit(); void handleViewport(nsecs_t timestep); - void initDynamicColors(); sp mSession; AssetManager mAssets; Texture mAndroid[2]; int mWidth; int mHeight; - int mInitWidth; - int mInitHeight; int mMaxWidth = 0; int mMaxHeight = 0; int mCurrentInset; @@ -230,19 +213,11 @@ class BootAnimation : public Thread, public IBinder::DeathRecipient bool mTimeIsAccurate; bool mTimeFormat12Hour; bool mShuttingDown; - bool mDynamicColorsApplied = false; String8 mZipFileName; SortedVector mLoadedFiles; sp mTimeCheckThread = nullptr; sp mCallbacks; Animation* mAnimation = nullptr; - GLuint mImageShader; - GLuint mTextShader; - GLuint mImageFadeLocation; - GLuint mImageTextureLocation; - GLuint mTextCropAreaLocation; - GLuint mTextTextureLocation; - GLuint mImageColorProgressLocation; }; // --------------------------------------------------------------------------- diff --git a/cmds/bootanimation/OWNERS b/cmds/bootanimation/OWNERS deleted file mode 100644 index b6fb007bea52..000000000000 --- a/cmds/bootanimation/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -dupin@google.com -shanh@google.com -jreck@google.com diff --git a/config/boot-image-profile-extra.txt b/config/boot-image-profile-extra.txt new file mode 100644 index 000000000000..e3b187e0a66d --- /dev/null +++ b/config/boot-image-profile-extra.txt @@ -0,0 +1,21 @@ +# +# Copyright (C) 2022 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# A list of methods that are found to be latency sensitive. We have this manual +# due to current limitations of our boot image profiling, where knowing what +# methods are latency sensitive is difficult. For example, this method is executed +# in the system server, not on the UI thread of an app. +HSPLandroid/graphics/Color;->luminance()F diff --git a/config/preloaded-classes b/config/preloaded-classes index f2530519247f..40388c2c5da8 100644 --- a/config/preloaded-classes +++ b/config/preloaded-classes @@ -14588,7 +14588,6 @@ java.util.concurrent.SynchronousQueue$TransferStack java.util.concurrent.SynchronousQueue$Transferer java.util.concurrent.SynchronousQueue java.util.concurrent.ThreadFactory -java.util.concurrent.ThreadLocalRandom java.util.concurrent.ThreadPoolExecutor$AbortPolicy java.util.concurrent.ThreadPoolExecutor$DiscardPolicy java.util.concurrent.ThreadPoolExecutor$Worker diff --git a/config/preloaded-classes-denylist b/config/preloaded-classes-denylist index da4b25519e80..02f2df6167a5 100644 --- a/config/preloaded-classes-denylist +++ b/config/preloaded-classes-denylist @@ -8,3 +8,4 @@ gov.nist.core.net.DefaultNetworkLayer android.net.rtp.AudioGroup android.net.rtp.AudioStream android.net.rtp.RtpStream +java.util.concurrent.ThreadLocalRandom diff --git a/core/api/system-current.txt b/core/api/system-current.txt index ec4ad8b704c3..0126199add0c 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -5956,7 +5956,7 @@ package android.location { method public int getEphemerisSource(); method @FloatRange public double getIonoDelayMeters(); method @IntRange(from=0, to=1023) public int getIssueOfDataClock(); - method @IntRange(from=0, to=255) public int getIssueOfDataEphemeris(); + method @IntRange(from=0, to=1023) public int getIssueOfDataEphemeris(); method @Nullable public android.location.SatellitePvt.PositionEcef getPositionEcef(); method @IntRange(from=0) public long getTimeOfClockSeconds(); method @IntRange(from=0) public long getTimeOfEphemerisSeconds(); @@ -5984,7 +5984,7 @@ package android.location { method @NonNull public android.location.SatellitePvt.Builder setEphemerisSource(int); method @NonNull public android.location.SatellitePvt.Builder setIonoDelayMeters(@FloatRange(from=0.0f, to=100.0f) double); method @NonNull public android.location.SatellitePvt.Builder setIssueOfDataClock(@IntRange(from=0, to=1023) int); - method @NonNull public android.location.SatellitePvt.Builder setIssueOfDataEphemeris(@IntRange(from=0, to=255) int); + method @NonNull public android.location.SatellitePvt.Builder setIssueOfDataEphemeris(@IntRange(from=0, to=1023) int); method @NonNull public android.location.SatellitePvt.Builder setPositionEcef(@NonNull android.location.SatellitePvt.PositionEcef); method @NonNull public android.location.SatellitePvt.Builder setTimeOfClockSeconds(@IntRange(from=0) long); method @NonNull public android.location.SatellitePvt.Builder setTimeOfEphemerisSeconds(@IntRange(from=0) long); diff --git a/core/java/android/accounts/Account.java b/core/java/android/accounts/Account.java index e6cdcc0ee742..0d6a07938e95 100644 --- a/core/java/android/accounts/Account.java +++ b/core/java/android/accounts/Account.java @@ -31,7 +31,6 @@ import com.android.internal.annotations.GuardedBy; -import java.util.Objects; import java.util.Set; /** @@ -87,12 +86,6 @@ public Account(String name, String type, String accessId) { if (TextUtils.isEmpty(type)) { throw new IllegalArgumentException("the type must not be empty: " + type); } - if (name.length() > 200) { - throw new IllegalArgumentException("account name is longer than 200 characters"); - } - if (type.length() > 200) { - throw new IllegalArgumentException("account type is longer than 200 characters"); - } this.name = name; this.type = type; this.accessId = accessId; diff --git a/core/java/android/app/ActivityOptions.java b/core/java/android/app/ActivityOptions.java index 2eebc01ccc04..0ba1614ab6c5 100644 --- a/core/java/android/app/ActivityOptions.java +++ b/core/java/android/app/ActivityOptions.java @@ -1441,6 +1441,11 @@ public RemoteTransition getRemoteTransition() { return mRemoteTransition; } + /** @hide */ + public void setRemoteTransition(@Nullable RemoteTransition remoteTransition) { + mRemoteTransition = remoteTransition; + } + /** @hide */ public static ActivityOptions fromBundle(Bundle bOptions) { return bOptions != null ? new ActivityOptions(bOptions) : null; diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index ae8809d8ac29..968b2a30f7a0 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -3835,7 +3835,7 @@ private void reportSizeConfigurations(ActivityClientRecord r) { return; } Configuration[] configurations = r.activity.getResources().getSizeConfigurations(); - if (configurations == null) { + if (configurations == null || r.activity.mFinished) { return; } r.mSizeConfigurations = new SizeConfigurationBuckets(configurations); @@ -7062,11 +7062,6 @@ public final IContentProvider acquireProvider( } } if (holder == null) { - if (UserManager.get(c).isUserUnlocked(userId)) { - Slog.e(TAG, "Failed to find provider info for " + auth); - } else { - Slog.w(TAG, "Failed to find provider info for " + auth + " (user not unlocked)"); - } return null; } diff --git a/core/java/android/app/AppLockData.aidl b/core/java/android/app/AppLockData.aidl new file mode 100644 index 000000000000..073d1efd2505 --- /dev/null +++ b/core/java/android/app/AppLockData.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2022 FlamingoOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.app; + +parcelable AppLockData; \ No newline at end of file diff --git a/core/java/android/app/AppLockData.java b/core/java/android/app/AppLockData.java new file mode 100644 index 000000000000..19a72c4034fd --- /dev/null +++ b/core/java/android/app/AppLockData.java @@ -0,0 +1,89 @@ +/* + * Copyright (C) 2022 FlamingoOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.app; + +import android.annotation.NonNull; +import android.annotation.Nullable; +import android.os.Parcel; +import android.os.Parcelable; + +/** + * Class to hold package level information about an + * application protected with app lock. + * + * @hide + */ +public final class AppLockData implements Parcelable { + + public static final Parcelable.Creator CREATOR = + new Parcelable.Creator() { + + @Override + public AppLockData createFromParcel(Parcel in) { + return new AppLockData(in); + } + + @Override + public AppLockData[] newArray(int size) { + return new AppLockData[size]; + } + }; + + private final String mPackageName; + private final boolean mShouldRedactNotification; + + /** @hide */ + public AppLockData( + @NonNull final String packageName, + final boolean shouldRedactNotification + ) { + mPackageName = packageName; + mShouldRedactNotification = shouldRedactNotification; + } + + private AppLockData(final Parcel in) { + mPackageName = in.readString(); + mShouldRedactNotification = in.readBoolean(); + } + + @NonNull + public String getPackageName() { + return mPackageName; + } + + public boolean getShouldRedactNotification() { + return mShouldRedactNotification; + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(final Parcel parcel, final int flags) { + parcel.writeString(mPackageName); + parcel.writeBoolean(mShouldRedactNotification); + } + + @Override + @NonNull + public String toString() { + return "AppLockData[ packageName = " + mPackageName + + ", shouldRedactNotification = " + mShouldRedactNotification + " ]"; + } +} \ No newline at end of file diff --git a/core/java/android/app/AppLockManager.java b/core/java/android/app/AppLockManager.java new file mode 100644 index 000000000000..cfb22d57f9db --- /dev/null +++ b/core/java/android/app/AppLockManager.java @@ -0,0 +1,217 @@ +/* + * Copyright (C) 2022 FlamingoOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.app; + +import android.Manifest; +import android.annotation.NonNull; +import android.annotation.SystemApi; +import android.annotation.SystemService; +import android.annotation.RequiresPermission; +import android.annotation.UserHandleAware; +import android.content.Context; +import android.os.RemoteException; + +import java.util.List; + +/** + * @hide + */ +@SystemApi +@SystemService(Context.APP_LOCK_SERVICE) +public final class AppLockManager { + + /** @hide */ + public static final long DEFAULT_TIMEOUT = 10 * 1000; + + /** @hide */ + public static final boolean DEFAULT_BIOMETRICS_ALLOWED = true; + + /** + * Intent action for starting credential activity in SystemUI. + * @hide + */ + public static final String ACTION_UNLOCK_APP = "android.app.action.UNLOCK_APP"; + + /** + * Intent extra to indicate whether usage of biometrics is allowed. + * @hide + */ + public static final String EXTRA_ALLOW_BIOMETRICS = "android.app.AppLockManager.ALLOW_BIOMETRICS"; + + /** + * Intent extra for the name of the application to unlock. + * @hide + */ + public static final String EXTRA_PACKAGE_LABEL = "android.app.AppLockManager.PACKAGE_LABEL"; + + private final Context mContext; + private final IAppLockManagerService mService; + + /** @hide */ + AppLockManager(Context context, IAppLockManagerService service) { + mContext = context; + mService = service; + } + + /** + * Add an application to be protected. Package should be an user + * installed application or a system app whitelisted in + * {@link config_appLockAllowedSystemApps}. + * Caller must hold {@link android.permission.MANAGE_APP_LOCK}. + * + * @param packageName the package name of the app to add. + */ + @UserHandleAware + @RequiresPermission(Manifest.permission.MANAGE_APP_LOCK) + public void addPackage(@NonNull String packageName) { + try { + mService.addPackage(packageName, mContext.getUserId()); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * Remove an application from the protected packages list. + * Caller must hold {@link android.permission.MANAGE_APP_LOCK}. + * + * @param packageName the package name of the app to remove. + */ + @UserHandleAware + @RequiresPermission(Manifest.permission.MANAGE_APP_LOCK) + public void removePackage(@NonNull String packageName) { + try { + mService.removePackage(packageName, mContext.getUserId()); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * Get the current auto lock timeout. + * + * @param userId the user id given by the caller. + * @return the timeout in milliseconds if configuration for + * current user exists, -1 otherwise. + */ + @UserHandleAware + public long getTimeout() { + try { + return mService.getTimeout(mContext.getUserId()); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * Set auto lock timeout. + * Caller must hold {@link android.permission.MANAGE_APP_LOCK}. + * + * @param timeout the timeout in milliseconds. Must be >= 5. + * @param userId the user id given by the caller. + */ + @UserHandleAware + @RequiresPermission(Manifest.permission.MANAGE_APP_LOCK) + public void setTimeout(long timeout) { + try { + mService.setTimeout(timeout, mContext.getUserId()); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * Get all the packages protected with app lock. + * Caller must hold {@link android.permission.MANAGE_APP_LOCK}. + * + * @return a unique list of {@link AppLockData} of the protected apps. + * @hide + */ + @UserHandleAware + @NonNull + @RequiresPermission(Manifest.permission.MANAGE_APP_LOCK) + public List getPackageData() { + try { + return mService.getPackageData(mContext.getUserId()); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * Set whether notification content should be redacted for a package + * in locked state. Caller must hold {@link android.permission.MANAGE_APP_LOCK}. + * + * @param packageName the package name. + * @param secure true to hide notification content. + */ + @UserHandleAware + @RequiresPermission(Manifest.permission.MANAGE_APP_LOCK) + public void setShouldRedactNotification(@NonNull String packageName, boolean secure) { + try { + mService.setShouldRedactNotification(packageName, secure, mContext.getUserId()); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * Set whether to allow unlocking with biometrics. + * Caller must hold {@link android.permission.MANAGE_APP_LOCK}. + * + * @param biometricsAllowed whether to use biometrics. + */ + @UserHandleAware + @RequiresPermission(Manifest.permission.MANAGE_APP_LOCK) + public void setBiometricsAllowed(boolean biometricsAllowed) { + try { + mService.setBiometricsAllowed(biometricsAllowed, mContext.getUserId()); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * Check whether biometrics is allowed for unlocking. + * + * @return true if biometrics will be used for unlocking, false otheriwse. + */ + @UserHandleAware + public boolean isBiometricsAllowed() { + try { + return mService.isBiometricsAllowed(mContext.getUserId()); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * Unlock a package following authentication with credentials. + * Caller must hold {@link android.permission.MANAGE_APP_LOCK}. + * + * @param packageName the name of the package to unlock. + */ + @UserHandleAware + @RequiresPermission(Manifest.permission.MANAGE_APP_LOCK) + public void unlockPackage(@NonNull String packageName) { + try { + mService.unlockPackage(packageName, mContext.getUserId()); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } +} \ No newline at end of file diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java index d641a3b469a6..e09bde87f011 100644 --- a/core/java/android/app/ApplicationPackageManager.java +++ b/core/java/android/app/ApplicationPackageManager.java @@ -29,6 +29,7 @@ import static android.content.pm.Checksum.TYPE_WHOLE_SHA256; import static android.content.pm.Checksum.TYPE_WHOLE_SHA512; +import android.Manifest; import android.annotation.CallbackExecutor; import android.annotation.DrawableRes; import android.annotation.NonNull; @@ -120,6 +121,7 @@ import com.android.internal.annotations.Immutable; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.os.SomeArgs; +import com.android.internal.util.PropImitationHooks; import com.android.internal.util.UserIcons; import dalvik.system.VMRuntime; @@ -808,7 +810,8 @@ public Boolean recompute(HasSystemFeatureQuery query) { @Override public boolean hasSystemFeature(String name, int version) { - return mHasSystemFeatureCache.query(new HasSystemFeatureQuery(name, version)); + return PropImitationHooks.hasSystemFeature(name, + mHasSystemFeatureCache.query(new HasSystemFeatureQuery(name, version))); } /** @hide */ @@ -823,7 +826,20 @@ public static void invalidateHasSystemFeatureCache() { @Override public int checkPermission(String permName, String pkgName) { - return PermissionManager.checkPackageNamePermission(permName, pkgName, getUserId()); + int res = PermissionManager.checkPackageNamePermission(permName, pkgName, getUserId()); + if (res != PERMISSION_GRANTED) { + // some Microsoft apps crash when INTERNET permission check fails, see + // com.microsoft.aad.adal.AuthenticationContext.checkInternetPermission() and + // com.microsoft.identity.client.PublicClientApplication.checkInternetPermission() + if (Manifest.permission.INTERNET.equals(permName) + // don't rely on Context.getPackageName(), may be different from process package name + && pkgName.equals(ActivityThread.currentPackageName()) + && pkgName.startsWith("com.microsoft")) + { + return PERMISSION_GRANTED; + } + } + return res; } @Override diff --git a/core/java/android/app/ConfigurationController.java b/core/java/android/app/ConfigurationController.java index 1a77b65c8ef6..4d619cdae377 100644 --- a/core/java/android/app/ConfigurationController.java +++ b/core/java/android/app/ConfigurationController.java @@ -28,6 +28,9 @@ import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.HardwareRenderer; +import android.graphics.Typeface; +import android.inputmethodservice.InputMethodService; +import android.os.Build; import android.os.LocaleList; import android.os.Trace; import android.util.DisplayMetrics; @@ -185,6 +188,7 @@ void handleConfigurationChanged(@Nullable Configuration config, final Application app = mActivityThread.getApplication(); final Resources appResources = app.getResources(); + Typeface.updateDefaultFont(appResources); mResourcesManager.applyConfigurationToResources(config, compat); updateLocaleListFromAppContext(app.getApplicationContext()); diff --git a/core/java/android/app/IActivityManager.aidl b/core/java/android/app/IActivityManager.aidl index 8367441b1b95..c7df9c33a8f5 100644 --- a/core/java/android/app/IActivityManager.aidl +++ b/core/java/android/app/IActivityManager.aidl @@ -760,4 +760,9 @@ interface IActivityManager { *

*/ int getBackgroundRestrictionExemptionReason(int uid); + + /** + * Should disable touch if three fingers to screen shot is active? + */ + boolean isSwipeToScreenshotGestureActive(); } diff --git a/core/java/android/app/IAppLockManagerService.aidl b/core/java/android/app/IAppLockManagerService.aidl new file mode 100644 index 000000000000..f1b25a206686 --- /dev/null +++ b/core/java/android/app/IAppLockManagerService.aidl @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2022 FlamingoOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.app; + +import android.app.AppLockData; + +/** + * Interface for managing app lock. + * @hide + */ +interface IAppLockManagerService { + + void addPackage(in String packageName, in int userId); + + void removePackage(in String packageName, in int userId); + + long getTimeout(in int userId); + + void setTimeout(in long timeout, in int userId); + + List getPackageData(in int userId); + + void setShouldRedactNotification(in String packageName, in boolean secure, in int userId); + + void setBiometricsAllowed(in boolean biometricsAllowed, in int userId); + + boolean isBiometricsAllowed(in int userId); + + void unlockPackage(in String packageName, in int userId); +} \ No newline at end of file diff --git a/core/java/android/app/INotificationManager.aidl b/core/java/android/app/INotificationManager.aidl index da6a551175e3..a24d61eb1f4e 100644 --- a/core/java/android/app/INotificationManager.aidl +++ b/core/java/android/app/INotificationManager.aidl @@ -236,4 +236,7 @@ interface INotificationManager void migrateNotificationFilter(in INotificationListener token, int defaultTypes, in List disallowedPkgs); void setToastRateLimitingEnabled(boolean enable); + + void forceShowLedLight(int color); + void forcePulseLedLight(int color, int onTime, int offTime); } diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java index 8984c4292023..9da6b5ba5aba 100644 --- a/core/java/android/app/Instrumentation.java +++ b/core/java/android/app/Instrumentation.java @@ -56,6 +56,7 @@ import android.view.WindowManagerGlobal; import com.android.internal.content.ReferrerIntent; +import com.android.internal.util.PropImitationHooks; import java.io.File; import java.lang.annotation.Retention; @@ -1231,6 +1232,7 @@ public Application newApplication(ClassLoader cl, String className, Context cont Application app = getFactory(context.getPackageName()) .instantiateApplication(cl, className); app.attach(context); + PropImitationHooks.setProps(app); return app; } @@ -1248,6 +1250,7 @@ static public Application newApplication(Class clazz, Context context) ClassNotFoundException { Application app = (Application)clazz.newInstance(); app.attach(context); + PropImitationHooks.setProps(app); return app; } diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java index 0849a6f67dbc..aa59da82ded1 100644 --- a/core/java/android/app/LoadedApk.java +++ b/core/java/android/app/LoadedApk.java @@ -1432,7 +1432,7 @@ private Application makeApplicationInner(boolean forceDefaultAppClass, try { final java.lang.ClassLoader cl = getClassLoader(); - if (!mPackageName.equals("android")) { + if (!ActivityThread.isSystem()) { Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "initializeJavaContextClassLoader"); initializeJavaContextClassLoader(); diff --git a/core/java/android/app/NotificationChannel.java b/core/java/android/app/NotificationChannel.java index c9cc1a179102..5572a15522fa 100644 --- a/core/java/android/app/NotificationChannel.java +++ b/core/java/android/app/NotificationChannel.java @@ -137,6 +137,8 @@ public final class NotificationChannel implements Parcelable { private static final String ATT_IMPORTANCE = "importance"; private static final String ATT_LIGHTS = "lights"; private static final String ATT_LIGHT_COLOR = "light_color"; + private static final String ATT_ON_TIME = "light_on_time"; + private static final String ATT_OFF_TIME = "light_off_time"; private static final String ATT_VIBRATION = "vibration"; private static final String ATT_VIBRATION_ENABLED = "vibration_enabled"; private static final String ATT_SOUND = "sound"; @@ -221,6 +223,8 @@ public final class NotificationChannel implements Parcelable { public static final int ALLOW_BUBBLE_OFF = 0; private static final int DEFAULT_LIGHT_COLOR = 0; + private static final int DEFAULT_ON_TIME = 0; + private static final int DEFAULT_OFF_TIME = 0; private static final int DEFAULT_VISIBILITY = NotificationManager.VISIBILITY_NO_OVERRIDE; private static final int DEFAULT_IMPORTANCE = @@ -240,6 +244,8 @@ public final class NotificationChannel implements Parcelable { private Uri mSound = Settings.System.DEFAULT_NOTIFICATION_URI; private boolean mLights; private int mLightColor = DEFAULT_LIGHT_COLOR; + private int mLightOnTime = DEFAULT_ON_TIME; + private int mLightOffTime = DEFAULT_OFF_TIME; private long[] mVibration; // Bitwise representation of fields that have been changed by the user, preventing the app from // making changes to these fields. @@ -319,6 +325,8 @@ protected NotificationChannel(Parcel in) { } mAudioAttributes = in.readInt() > 0 ? AudioAttributes.CREATOR.createFromParcel(in) : null; mLightColor = in.readInt(); + mLightOnTime = in.readInt(); + mLightOffTime = in.readInt(); mBlockableSystem = in.readBoolean(); mAllowBubbles = in.readInt(); mOriginalImportance = in.readInt(); @@ -379,6 +387,8 @@ public void writeToParcel(Parcel dest, int flags) { dest.writeInt(0); } dest.writeInt(mLightColor); + dest.writeInt(mLightOnTime); + dest.writeInt(mLightOffTime); dest.writeBoolean(mBlockableSystem); dest.writeInt(mAllowBubbles); dest.writeInt(mOriginalImportance); @@ -551,6 +561,30 @@ public void setLightColor(int argb) { this.mLightColor = argb; } + /** + * Sets the notification light ON time for notifications posted to this channel, if lights are + * {@link #enableLights(boolean) enabled} on this channel and the device supports that feature. + * + * Only modifiable before the channel is submitted to + * {@link NotificationManager#notify(String, int, Notification)}. + * @hide + */ + public void setLightOnTime(int time) { + this.mLightOnTime = time; + } + + /** + * Sets the notification light OFF time for notifications posted to this channel, if lights are + * {@link #enableLights(boolean) enabled} on this channel and the device supports that feature. + * + * Only modifiable before the channel is submitted to + * {@link NotificationManager#notify(String, int, Notification)}. + * @hide + */ + public void setLightOffTime(int time) { + this.mLightOffTime = time; + } + /** * Sets whether notification posted to this channel should vibrate. The vibration pattern can * be set with {@link #setVibrationPattern(long[])}. @@ -733,6 +767,24 @@ public int getLightColor() { return mLightColor; } + /** + * Returns the notification light ON time for notifications posted to this channel. Irrelevant + * unless {@link #shouldShowLights()}. + * @hide + */ + public int getLightOnTime() { + return mLightOnTime; + } + + /** + * Returns the notification light OFF time for notifications posted to this channel. Irrelevant + * unless {@link #shouldShowLights()}. + * @hide + */ + public int getLightOffTime() { + return mLightOffTime; + } + /** * Returns whether notifications posted to this channel always vibrate. */ @@ -946,6 +998,8 @@ private void populateFromXml(TypedXmlPullParser parser, boolean forRestore, enableLights(safeBool(parser, ATT_LIGHTS, false)); setLightColor(safeInt(parser, ATT_LIGHT_COLOR, DEFAULT_LIGHT_COLOR)); + setLightOnTime(safeInt(parser, ATT_ON_TIME, DEFAULT_ON_TIME)); + setLightOffTime(safeInt(parser, ATT_OFF_TIME, DEFAULT_OFF_TIME)); setVibrationPattern(safeLongArray(parser, ATT_VIBRATION, null)); enableVibration(safeBool(parser, ATT_VIBRATION_ENABLED, false)); setShowBadge(safeBool(parser, ATT_SHOW_BADGE, false)); @@ -1052,6 +1106,12 @@ private void writeXml(TypedXmlSerializer out, boolean forBackup, @Nullable Conte if (getLightColor() != DEFAULT_LIGHT_COLOR) { out.attributeInt(null, ATT_LIGHT_COLOR, getLightColor()); } + if (getLightOnTime() != DEFAULT_ON_TIME) { + out.attribute(null, ATT_ON_TIME, Integer.toString(getLightOnTime())); + } + if (getLightOffTime() != DEFAULT_OFF_TIME) { + out.attribute(null, ATT_OFF_TIME, Integer.toString(getLightOffTime())); + } if (shouldVibrate()) { out.attributeBoolean(null, ATT_VIBRATION_ENABLED, shouldVibrate()); } @@ -1134,6 +1194,8 @@ public JSONObject toJson() throws JSONException { } record.put(ATT_LIGHTS, Boolean.toString(shouldShowLights())); record.put(ATT_LIGHT_COLOR, Integer.toString(getLightColor())); + record.put(ATT_ON_TIME, Integer.toString(getLightOnTime())); + record.put(ATT_OFF_TIME, Integer.toString(getLightOffTime())); record.put(ATT_VIBRATION_ENABLED, Boolean.toString(shouldVibrate())); record.put(ATT_USER_LOCKED, Integer.toString(getUserLockedFields())); record.put(ATT_FG_SERVICE_SHOWN, Boolean.toString(isFgServiceShown())); @@ -1227,6 +1289,8 @@ public boolean equals(@Nullable Object o) { && getLockscreenVisibility() == that.getLockscreenVisibility() && mLights == that.mLights && getLightColor() == that.getLightColor() + && getLightOnTime() == that.getLightOnTime() + && getLightOffTime()== that.getLightOffTime() && getUserLockedFields() == that.getUserLockedFields() && isFgServiceShown() == that.isFgServiceShown() && mVibrationEnabled == that.mVibrationEnabled @@ -1253,7 +1317,7 @@ && isDemoted() == that.isDemoted() @Override public int hashCode() { int result = Objects.hash(getId(), getName(), mDesc, getImportance(), mBypassDnd, - getLockscreenVisibility(), getSound(), mLights, getLightColor(), + getLockscreenVisibility(), getSound(), mLights, getLightColor(),getLightOnTime(),getLightOffTime(), getUserLockedFields(), isFgServiceShown(), mVibrationEnabled, mShowBadge, isDeleted(), getDeletedTimeMs(), getGroup(), getAudioAttributes(), isBlockable(), mAllowBubbles, @@ -1291,6 +1355,8 @@ private String getFieldsString() { + ", mSound=" + mSound + ", mLights=" + mLights + ", mLightColor=" + mLightColor + + ", mLightOnTime=" + mLightOnTime + + ", mLightOffTime=" + mLightOffTime + ", mVibration=" + Arrays.toString(mVibration) + ", mUserLockedFields=" + Integer.toHexString(mUserLockedFields) + ", mFgServiceShown=" + mFgServiceShown diff --git a/core/java/android/app/NotificationManager.java b/core/java/android/app/NotificationManager.java index 392f52a08fb5..df7c1a1efe4f 100644 --- a/core/java/android/app/NotificationManager.java +++ b/core/java/android/app/NotificationManager.java @@ -2632,4 +2632,24 @@ public static int zenModeFromInterruptionFilter(int interruptionFilter, int defV default: return defValue; } } + + /** @hide */ + public void forceShowLedLight(int color) { + final INotificationManager service = getService(); + try { + service.forceShowLedLight(color); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** @hide */ + public void forcePulseLedLight(int color, int onTime, int offTime) { + final INotificationManager service = getService(); + try { + service.forcePulseLedLight(color, onTime, offTime); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } } diff --git a/core/java/android/app/PendingIntent.java b/core/java/android/app/PendingIntent.java index bc78df59ff12..b9fb3c07e2de 100644 --- a/core/java/android/app/PendingIntent.java +++ b/core/java/android/app/PendingIntent.java @@ -53,6 +53,7 @@ import android.os.UserHandle; import android.util.AndroidException; import android.util.ArraySet; +import android.util.Log; import android.util.Pair; import android.util.proto.ProtoOutputStream; @@ -381,7 +382,7 @@ public static void setOnMarshaledListener(OnMarshaledListener listener) { sOnMarshaledListener.set(listener); } - private static void checkFlags(int flags, String packageName) { + private static int checkFlags(int flags, String packageName) { final boolean flagImmutableSet = (flags & PendingIntent.FLAG_IMMUTABLE) != 0; final boolean flagMutableSet = (flags & PendingIntent.FLAG_MUTABLE) != 0; @@ -398,8 +399,11 @@ private static void checkFlags(int flags, String packageName) { + " using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality" + " depends on the PendingIntent being mutable, e.g. if it needs to" + " be used with inline replies or bubbles."; - throw new IllegalArgumentException(msg); + // secure-by-default instead of crash-by-default for better compatibility + Log.e(TAG, msg); + return flags | PendingIntent.FLAG_IMMUTABLE; } + return flags; } /** @@ -481,7 +485,7 @@ public static PendingIntent getActivityAsUser(Context context, int requestCode, @NonNull Intent intent, int flags, Bundle options, UserHandle user) { String packageName = context.getPackageName(); String resolvedType = intent.resolveTypeIfNeeded(context.getContentResolver()); - checkFlags(flags, packageName); + flags = checkFlags(flags, packageName); try { intent.migrateExtraStreamToClipData(context); intent.prepareToLeaveProcess(context); @@ -616,7 +620,7 @@ public static PendingIntent getActivitiesAsUser(Context context, int requestCode intents[i].prepareToLeaveProcess(context); resolvedTypes[i] = intents[i].resolveTypeIfNeeded(context.getContentResolver()); } - checkFlags(flags, packageName); + flags = checkFlags(flags, packageName); try { IIntentSender target = ActivityManager.getService().getIntentSenderWithFeature( @@ -668,7 +672,7 @@ public static PendingIntent getBroadcastAsUser(Context context, int requestCode, Intent intent, int flags, UserHandle userHandle) { String packageName = context.getPackageName(); String resolvedType = intent.resolveTypeIfNeeded(context.getContentResolver()); - checkFlags(flags, packageName); + flags = checkFlags(flags, packageName); try { intent.prepareToLeaveProcess(context); IIntentSender target = @@ -747,7 +751,7 @@ private static PendingIntent buildServicePendingIntent(Context context, int requ Intent intent, int flags, int serviceKind) { String packageName = context.getPackageName(); String resolvedType = intent.resolveTypeIfNeeded(context.getContentResolver()); - checkFlags(flags, packageName); + flags = checkFlags(flags, packageName); try { intent.prepareToLeaveProcess(context); IIntentSender target = diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java index 40192836e0a7..c26d3b6d1c6c 100644 --- a/core/java/android/app/SystemServiceRegistry.java +++ b/core/java/android/app/SystemServiceRegistry.java @@ -196,6 +196,8 @@ import android.permission.PermissionCheckerManager; import android.permission.PermissionControllerManager; import android.permission.PermissionManager; +import android.pocket.IPocketService; +import android.pocket.PocketManager; import android.print.IPrintManager; import android.print.PrintManager; import android.safetycenter.SafetyCenterFrameworkInitializer; @@ -214,7 +216,6 @@ import android.telephony.TelephonyFrameworkInitializer; import android.telephony.TelephonyRegistryManager; import android.transparency.BinaryTransparencyManager; -import android.util.ArrayMap; import android.util.Log; import android.util.Slog; import android.uwb.UwbFrameworkInitializer; @@ -247,6 +248,7 @@ import com.android.internal.policy.PhoneLayoutInflater; import com.android.internal.util.Preconditions; +import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -266,10 +268,10 @@ public final class SystemServiceRegistry { // Service registry information. // This information is never changed once static initialization has completed. private static final Map, String> SYSTEM_SERVICE_NAMES = - new ArrayMap, String>(); + new HashMap, String>(); private static final Map> SYSTEM_SERVICE_FETCHERS = - new ArrayMap>(); - private static final Map SYSTEM_SERVICE_CLASS_NAMES = new ArrayMap<>(); + new HashMap>(); + private static final Map SYSTEM_SERVICE_CLASS_NAMES = new HashMap<>(); private static int sServiceCacheSize; @@ -955,6 +957,15 @@ public TvInteractiveAppManager createService(ContextImpl ctx) return new TvInteractiveAppManager(service, ctx.getUserId()); }}); + registerService(Context.POCKET_SERVICE, PocketManager.class, + new CachedServiceFetcher() { + @Override + public PocketManager createService(ContextImpl ctx) { + IBinder binder = ServiceManager.getService(Context.POCKET_SERVICE); + IPocketService service = IPocketService.Stub.asInterface(binder); + return new PocketManager(ctx.getOuterContext(), service); + }}); + registerService(Context.TV_INPUT_SERVICE, TvInputManager.class, new CachedServiceFetcher() { @Override @@ -1011,7 +1022,7 @@ public PersistentDataBlockManager createService() throws ServiceNotFoundExceptio new StaticServiceFetcher() { @Override public OemLockManager createService() throws ServiceNotFoundException { - IBinder b = ServiceManager.getServiceOrThrow(Context.OEM_LOCK_SERVICE); + IBinder b = ServiceManager.getService(Context.OEM_LOCK_SERVICE); IOemLockService oemLockService = IOemLockService.Stub.asInterface(b); if (oemLockService != null) { return new OemLockManager(oemLockService); @@ -1527,6 +1538,17 @@ public AmbientContextManager createService(ContextImpl ctx) return new AmbientContextManager(ctx.getOuterContext(), manager); }}); + registerService(Context.APP_LOCK_SERVICE, AppLockManager.class, + new CachedServiceFetcher() { + @Override + public AppLockManager createService(ContextImpl ctx) + throws ServiceNotFoundException { + IBinder binder = ServiceManager.getServiceOrThrow( + Context.APP_LOCK_SERVICE); + return new AppLockManager(ctx, + IAppLockManagerService.Stub.asInterface(binder)); + }}); + sInitializing = true; try { // Note: the following functions need to be @SystemApis, once they become mainline diff --git a/core/java/android/app/WallpaperColors.java b/core/java/android/app/WallpaperColors.java index 067a4c3c047e..7504a91c94ba 100644 --- a/core/java/android/app/WallpaperColors.java +++ b/core/java/android/app/WallpaperColors.java @@ -99,9 +99,9 @@ public final class WallpaperColors implements Parcelable { private static final float MIN_COLOR_OCCURRENCE = 0.05f; // Decides when dark theme is optimal for this wallpaper - private static final float DARK_THEME_MEAN_LUMINANCE = 0.3f; + private static final float DARK_THEME_MEAN_LUMINANCE = 30.0f; // Minimum mean luminosity that an image needs to have to support dark text - private static final float BRIGHT_IMAGE_MEAN_LUMINANCE = 0.7f; + private static final float BRIGHT_IMAGE_MEAN_LUMINANCE = 70.0f; // We also check if the image has dark pixels in it, // to avoid bright images with some dark spots. private static final float DARK_PIXEL_CONTRAST = 5.5f; @@ -253,9 +253,9 @@ public WallpaperColors(@NonNull Color primaryColor, @Nullable Color secondaryCol this(primaryColor, secondaryColor, tertiaryColor, 0); // Calculate dark theme support based on primary color. - final float[] tmpHsl = new float[3]; - ColorUtils.colorToHSL(primaryColor.toArgb(), tmpHsl); - final float luminance = tmpHsl[2]; + final double[] tmpLab = new double[3]; + ColorUtils.colorToLAB(primaryColor.toArgb(), tmpLab); + final double luminance = tmpLab[0]; if (luminance < DARK_THEME_MEAN_LUMINANCE) { mColorHints |= HINT_SUPPORTS_DARK_THEME; } @@ -549,10 +549,10 @@ private static int calculateDarkHints(Bitmap source, float dimAmount) { // This bitmap was already resized to fit the maximum allowed area. // Let's just loop through the pixels, no sweat! - float[] tmpHsl = new float[3]; + double[] tmpLab = new double[3]; for (int i = 0; i < pixels.length; i++) { int pixelColor = pixels[i]; - ColorUtils.colorToHSL(pixelColor, tmpHsl); + ColorUtils.colorToLAB(pixelColor, tmpLab); final int alpha = Color.alpha(pixelColor); // Apply composite colors where the foreground is a black layer with an alpha value of diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java index e022ca306674..a19f05d5ec69 100644 --- a/core/java/android/app/WallpaperManager.java +++ b/core/java/android/app/WallpaperManager.java @@ -685,7 +685,7 @@ private Bitmap getCurrentWallpaperLocked(Context context, int userId, boolean ha cmProxy.doColorManagement(decoder, info); } })); - } catch (OutOfMemoryError | IOException e) { + } catch (OutOfMemoryError | IOException | ArrayIndexOutOfBoundsException e) { Log.w(TAG, "Can't decode file", e); } } diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index 34c91c360dbe..64f3c3928cc3 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -3553,7 +3553,7 @@ public void onInstallUpdateError( * Maximum supported password length. Kind-of arbitrary. * @hide */ - public static final int MAX_PASSWORD_LENGTH = 16; + public static final int MAX_PASSWORD_LENGTH = 64; /** * Service Action: Service implemented by a device owner or profile owner supervision app to diff --git a/core/java/android/app/admin/SystemUpdateInfo.java b/core/java/android/app/admin/SystemUpdateInfo.java index b88bf76c96ca..0a22e4c66972 100644 --- a/core/java/android/app/admin/SystemUpdateInfo.java +++ b/core/java/android/app/admin/SystemUpdateInfo.java @@ -132,7 +132,7 @@ public void writeToXml(TypedXmlSerializer out, String tag) throws IOException { out.startTag(null, tag); out.attributeLong(null, ATTR_RECEIVED_TIME, mReceivedTime); out.attributeInt(null, ATTR_SECURITY_PATCH_STATE, mSecurityPatchState); - out.attribute(null, ATTR_ORIGINAL_BUILD , Build.FINGERPRINT); + out.attribute(null, ATTR_ORIGINAL_BUILD , String.valueOf(Build.TIME)); out.endTag(null, tag); } @@ -141,7 +141,7 @@ public void writeToXml(TypedXmlSerializer out, String tag) throws IOException { public static SystemUpdateInfo readFromXml(TypedXmlPullParser parser) { // If an OTA has been applied (build fingerprint has changed), discard stale info. final String buildFingerprint = parser.getAttributeValue(null, ATTR_ORIGINAL_BUILD ); - if (!Build.FINGERPRINT.equals(buildFingerprint)) { + if (!String.valueOf(Build.TIME).equals(buildFingerprint)) { return null; } try { diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index fce23cf6819a..d2418775fc47 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -38,6 +38,7 @@ import android.annotation.UserIdInt; import android.app.Activity; import android.app.ActivityManager; +import android.app.AppLockManager; import android.app.BroadcastOptions; import android.app.GameManager; import android.app.IApplicationThread; @@ -6048,6 +6049,23 @@ public abstract boolean startInstrumentation(@NonNull ComponentName className, @SystemApi public static final String AMBIENT_CONTEXT_SERVICE = "ambient_context"; + /** + * Use with {@link #getSystemService} to retrieve a + * {@link android.os.PocketManager} for accessing and listening to device pocket state. + * + * @hide + * @see #getSystemService + * @see android.os.PocketManager + */ + public static final String POCKET_SERVICE = "pocket"; + + /** + * {@link AppLockManager}. + * + * @see #getSystemService(String) + */ + public static final String APP_LOCK_SERVICE = "app_lock"; + /** * Determine whether the given permission is allowed for a particular * process and user ID running in the system. diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index 44dc28d2b0fa..620bfe0778e5 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -3627,11 +3627,7 @@ private boolean parseBaseApplication(Package owner, Resources res, ai.privateFlags |= ApplicationInfo.PRIVATE_FLAG_ALLOW_CLEAR_USER_DATA_ON_FAILED_RESTORE; } - if (sa.getBoolean( - R.styleable.AndroidManifestApplication_allowAudioPlaybackCapture, - owner.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.Q)) { - ai.privateFlags |= ApplicationInfo.PRIVATE_FLAG_ALLOW_AUDIO_PLAYBACK_CAPTURE; - } + ai.privateFlags |= ApplicationInfo.PRIVATE_FLAG_ALLOW_AUDIO_PLAYBACK_CAPTURE; if (sa.getBoolean( R.styleable.AndroidManifestApplication_requestLegacyExternalStorage, @@ -4709,10 +4705,8 @@ private void setActivityResizeMode(ActivityInfo aInfo, TypedArray sa, Package ow * ratio set. */ private void setMaxAspectRatio(Package owner) { - // Default to (1.86) 16.7:9 aspect ratio for pre-O apps and unset for O and greater. - // NOTE: 16.7:9 was the max aspect ratio Android devices can support pre-O per the CDD. - float maxAspectRatio = owner.applicationInfo.targetSdkVersion < O - ? DEFAULT_PRE_O_MAX_ASPECT_RATIO : 0; + // Start at an unlimited aspect ratio unless we get a more restrictive one + float maxAspectRatio = 0; if (owner.applicationInfo.maxAspectRatio != 0) { // Use the application max aspect ration as default if set. diff --git a/core/java/android/content/pm/parsing/ApkLiteParseUtils.java b/core/java/android/content/pm/parsing/ApkLiteParseUtils.java index 20a4fdf658c6..10d6f2d6d04b 100644 --- a/core/java/android/content/pm/parsing/ApkLiteParseUtils.java +++ b/core/java/android/content/pm/parsing/ApkLiteParseUtils.java @@ -542,14 +542,17 @@ private static ParseResult parseApkLite(ParseInput input, String codePa int minVer = DEFAULT_MIN_SDK_VERSION; String minCode = null; + boolean minAssigned = false; int targetVer = DEFAULT_TARGET_SDK_VERSION; String targetCode = null; if (!TextUtils.isEmpty(minSdkVersionString)) { try { minVer = Integer.parseInt(minSdkVersionString); + minAssigned = true; } catch (NumberFormatException ignored) { minCode = minSdkVersionString; + minAssigned = !TextUtils.isEmpty(minCode); } } @@ -558,7 +561,7 @@ private static ParseResult parseApkLite(ParseInput input, String codePa targetVer = Integer.parseInt(targetSdkVersionString); } catch (NumberFormatException ignored) { targetCode = targetSdkVersionString; - if (minCode == null) { + if (!minAssigned) { minCode = targetCode; } } diff --git a/core/java/android/content/res/ColorStateList.java b/core/java/android/content/res/ColorStateList.java index 5031faa81afa..d46c5c4bac42 100644 --- a/core/java/android/content/res/ColorStateList.java +++ b/core/java/android/content/res/ColorStateList.java @@ -34,8 +34,10 @@ import android.util.Xml; import com.android.internal.R; -import com.android.internal.graphics.ColorUtils; -import com.android.internal.graphics.cam.Cam; +import com.android.internal.graphics.color.CieLab; +import com.android.internal.graphics.color.CieXyzAbs; +import com.android.internal.graphics.color.Zcam; +import com.android.internal.graphics.color.ZcamGamut; import com.android.internal.util.ArrayUtils; import com.android.internal.util.GrowingArrayUtils; @@ -556,8 +558,9 @@ private int modulateColor(int baseColor, float alphaMod, float lStar) { final int alpha = MathUtils.constrain((int) (baseAlpha * alphaMod + 0.5f), 0, 255); if (validLStar) { - final Cam baseCam = ColorUtils.colorToCAM(baseColor); - baseColor = ColorUtils.CAMToColor(baseCam.getHue(), baseCam.getChroma(), lStar); + final Zcam baseZcam = new Zcam(new CieXyzAbs(baseColor)); + baseZcam.lightness = CieLab.lToZcamJz(lStar); + baseColor = ZcamGamut.clipToRgb8(baseZcam); } return (baseColor & 0xFFFFFF) | (alpha << 24); diff --git a/core/java/android/content/res/ThemedResourceCache.java b/core/java/android/content/res/ThemedResourceCache.java index 3270944ce7e3..e0701b90d6fa 100644 --- a/core/java/android/content/res/ThemedResourceCache.java +++ b/core/java/android/content/res/ThemedResourceCache.java @@ -22,10 +22,10 @@ import android.content.pm.ActivityInfo.Config; import android.content.res.Resources.Theme; import android.content.res.Resources.ThemeKey; -import android.util.ArrayMap; import android.util.LongSparseArray; import java.lang.ref.WeakReference; +import java.util.HashMap; /** * Data structure used for caching data against themes. @@ -34,7 +34,7 @@ */ abstract class ThemedResourceCache { @UnsupportedAppUsage - private ArrayMap>> mThemedEntries; + private HashMap>> mThemedEntries; private LongSparseArray> mUnthemedEntries; private LongSparseArray> mNullThemedEntries; @@ -154,7 +154,7 @@ private LongSparseArray> getThemedLocked(@Nullable Theme t, boo if (mThemedEntries == null) { if (create) { - mThemedEntries = new ArrayMap<>(1); + mThemedEntries = new HashMap<>(1); } else { return null; } @@ -199,11 +199,8 @@ private LongSparseArray> getUnthemedLocked(boolean create) { private boolean prune(@Config int configChanges) { synchronized (this) { if (mThemedEntries != null) { - for (int i = mThemedEntries.size() - 1; i >= 0; i--) { - if (pruneEntriesLocked(mThemedEntries.valueAt(i), configChanges)) { - mThemedEntries.removeAt(i); - } - } + mThemedEntries.entrySet() + .removeIf(entry -> pruneEntriesLocked(entry.getValue(), configChanges)); } pruneEntriesLocked(mNullThemedEntries, configChanges); diff --git a/core/java/android/database/sqlite/SQLiteDatabase.java b/core/java/android/database/sqlite/SQLiteDatabase.java index 0d0615a28af3..9fd1b0bde06d 100644 --- a/core/java/android/database/sqlite/SQLiteDatabase.java +++ b/core/java/android/database/sqlite/SQLiteDatabase.java @@ -740,7 +740,10 @@ private void beginTransaction(SQLiteTransactionListener transactionListener, SQLiteSession.TRANSACTION_MODE_IMMEDIATE, transactionListener, getThreadDefaultConnectionFlags(false /*readOnly*/), null); - } finally { + } catch (SQLiteDatabaseCorruptException ex) { + onCorruption(); + throw ex; + }finally { releaseReference(); } } @@ -753,6 +756,9 @@ public void endTransaction() { acquireReference(); try { getThreadSession().endTransaction(null); + } catch (SQLiteDatabaseCorruptException ex) { + onCorruption(); + throw ex; } finally { releaseReference(); } @@ -870,6 +876,9 @@ private boolean yieldIfContendedHelper(boolean throwIfUnsafe, long sleepAfterYie acquireReference(); try { return getThreadSession().yieldTransaction(sleepAfterYieldDelay, throwIfUnsafe, null); + } catch (SQLiteDatabaseCorruptException ex) { + onCorruption(); + throw ex; } finally { releaseReference(); } @@ -2647,33 +2656,17 @@ public List> getAttachedDbs() { public boolean isDatabaseIntegrityOk() { acquireReference(); try { - List> attachedDbs = null; + SQLiteStatement prog = null; try { - attachedDbs = getAttachedDbs(); - if (attachedDbs == null) { - throw new IllegalStateException("databaselist for: " + getPath() + " couldn't " + - "be retrieved. probably because the database is closed"); - } - } catch (SQLiteException e) { - // can't get attachedDb list. do integrity check on the main database - attachedDbs = new ArrayList>(); - attachedDbs.add(new Pair("main", getPath())); - } - - for (int i = 0; i < attachedDbs.size(); i++) { - Pair p = attachedDbs.get(i); - SQLiteStatement prog = null; - try { - prog = compileStatement("PRAGMA " + p.first + ".integrity_check(1);"); - String rslt = prog.simpleQueryForString(); - if (!rslt.equalsIgnoreCase("ok")) { - // integrity_checker failed on main or attached databases - Log.e(TAG, "PRAGMA integrity_check on " + p.second + " returned: " + rslt); - return false; - } - } finally { - if (prog != null) prog.close(); + prog = compileStatement("PRAGMA integrity_check(1);"); + String rslt = prog.simpleQueryForString(); + if (!rslt.equalsIgnoreCase("ok")) { + // integrity_checker failed on main or attached databases + Log.e(TAG, "PRAGMA integrity_check returned: " + rslt); + return false; } + } finally { + if (prog != null) prog.close(); } } finally { releaseReference(); diff --git a/core/java/android/debug/AdbManagerInternal.java b/core/java/android/debug/AdbManagerInternal.java index d730129507d7..e448706fabfe 100644 --- a/core/java/android/debug/AdbManagerInternal.java +++ b/core/java/android/debug/AdbManagerInternal.java @@ -54,6 +54,12 @@ public abstract class AdbManagerInternal { */ public abstract File getAdbTempKeysFile(); + /** + * Notify the AdbManager that the key files have changed and any in-memory state should be + * reloaded. + */ + public abstract void notifyKeyFilesUpdated(); + /** * Starts adbd for a transport. */ diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java index 3bdd39f5d7d7..4d8a2634c146 100644 --- a/core/java/android/hardware/Camera.java +++ b/core/java/android/hardware/Camera.java @@ -45,6 +45,7 @@ import android.os.Process; import android.os.RemoteException; import android.os.ServiceManager; +import android.os.SystemProperties; import android.renderscript.Allocation; import android.renderscript.Element; import android.renderscript.RSIllegalArgumentException; @@ -62,6 +63,7 @@ import java.io.IOException; import java.lang.ref.WeakReference; import java.util.ArrayList; +import java.util.Arrays; import java.util.LinkedHashMap; import java.util.List; @@ -171,6 +173,10 @@ public class Camera { private static final int CAMERA_MSG_RAW_IMAGE_NOTIFY = 0x200; private static final int CAMERA_MSG_PREVIEW_METADATA = 0x400; private static final int CAMERA_MSG_FOCUS_MOVE = 0x800; + /* ### QC ADD-ONS: START */ + private static final int CAMERA_MSG_STATS_DATA = 0x1000; + private static final int CAMERA_MSG_META_DATA = 0x2000; + /* ### QC ADD-ONS: END */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) private long mNativeContext; // accessed by native methods @@ -202,6 +208,17 @@ public class Camera { private boolean mShutterSoundEnabledFromApp = true; private static final int NO_ERROR = 0; + private static final int EACCESS = -13; + private static final int ENODEV = -19; + private static final int EBUSY = -16; + private static final int EINVAL = -22; + private static final int ENOSYS = -38; + private static final int EUSERS = -87; + private static final int EOPNOTSUPP = -95; + /* ### QC ADD-ONS: START */ + private CameraDataCallback mCameraDataCallback; + private CameraMetaDataCallback mCameraMetaDataCallback; + /* ### QC ADD-ONS: END */ /** * Broadcast Action: A new picture is taken by the camera, and the entry of @@ -264,6 +281,23 @@ public class Camera { */ private static final int CAMERA_FACE_DETECTION_SW = 1; + /** + * @hide + */ + public static boolean shouldExposeAuxCamera() { + /** + * Force to expose only two cameras + * if the package name does not falls in this bucket + */ + String packageName = ActivityThread.currentOpPackageName(); + List packageList = Arrays.asList( + SystemProperties.get("vendor.camera.aux.packagelist", packageName).split(",")); + List packageBlacklist = Arrays.asList( + SystemProperties.get("vendor.camera.aux.packageexcludelist", "").split(",")); + + return packageList.contains(packageName) && !packageBlacklist.contains(packageName); + } + /** * Returns the number of physical cameras available on this device. * The return value of this method might change dynamically if the device @@ -279,7 +313,20 @@ public class Camera { * @return total number of accessible camera devices, or 0 if there are no * cameras or an error was encountered enumerating them. */ - public native static int getNumberOfCameras(); + public static int getNumberOfCameras() { + int numberOfCameras = _getNumberOfCameras(); + if (!shouldExposeAuxCamera() && numberOfCameras > 2) { + numberOfCameras = 2; + } + return numberOfCameras; + } + + /** + * Returns the number of physical cameras available on this device. + * + * @hide + */ + public native static int _getNumberOfCameras(); /** * Returns the information about a particular camera. @@ -290,6 +337,9 @@ public class Camera { * low-level failure). */ public static void getCameraInfo(int cameraId, CameraInfo cameraInfo) { + if (cameraId >= getNumberOfCameras()) { + throw new RuntimeException("Unknown camera ID"); + } _getCameraInfo(cameraId, cameraInfo); IBinder b = ServiceManager.getService(Context.AUDIO_SERVICE); IAudioService audioService = IAudioService.Stub.asInterface(b); @@ -323,6 +373,17 @@ public static class CameraInfo { */ public static final int CAMERA_FACING_FRONT = 1; + /* ### QC ADD-ONS: START TBD*/ + /** @hide + * camera is in ZSL mode. + */ + public static final int CAMERA_SUPPORT_MODE_ZSL = 2; + + /** @hide + * camera is in non-ZSL mode. + */ + public static final int CAMERA_SUPPORT_MODE_NONZSL = 3; + /* ### QC ADD-ONS: END */ /** * The direction that the camera faces. It should be * CAMERA_FACING_BACK or CAMERA_FACING_FRONT. @@ -474,6 +535,10 @@ private int cameraInit(int cameraId) { mPostviewCallback = null; mUsingPreviewAllocation = false; mZoomListener = null; + /* ### QC ADD-ONS: START */ + mCameraDataCallback = null; + mCameraMetaDataCallback = null; + /* ### QC ADD-ONS: END */ Looper looper; if ((looper = Looper.myLooper()) != null) { @@ -490,6 +555,9 @@ private int cameraInit(int cameraId) { /** used by Camera#open, Camera#open(int) */ Camera(int cameraId) { + if (cameraId >= getNumberOfCameras()) { + throw new RuntimeException("Unknown camera ID"); + } int err = cameraInit(cameraId); if (checkInitErrors(err)) { if (err == -EACCES) { @@ -1213,7 +1281,23 @@ public void handleMessage(Message msg) { mAutoFocusMoveCallback.onAutoFocusMoving(msg.arg1 == 0 ? false : true, mCamera); } return; + /* ### QC ADD-ONS: START */ + case CAMERA_MSG_STATS_DATA: + int statsdata[] = new int[257]; + for(int i =0; i<257; i++ ) { + statsdata[i] = byteToInt( (byte[])msg.obj, i*4); + } + if (mCameraDataCallback != null) { + mCameraDataCallback.onCameraData(statsdata, mCamera); + } + return; + case CAMERA_MSG_META_DATA: + if (mCameraMetaDataCallback != null) { + mCameraMetaDataCallback.onCameraMetaData((byte[])msg.obj, mCamera); + } + return; + /* ### QC ADD-ONS: END */ default: Log.e(TAG, "Unknown message type " + msg.what); return; @@ -1724,7 +1808,11 @@ private void updateAppOpsPlayAudio() { } catch (RemoteException e) { Log.e(TAG, "Audio service is unavailable for queries"); } - _enableShutterSound(false); + try { + _enableShutterSound(false); + } catch (Exception e) { + Log.e(TAG, "Couldn't disable shutter sound"); + } } else { enableShutterSound(mShutterSoundEnabledFromApp); } @@ -1732,6 +1820,20 @@ private void updateAppOpsPlayAudio() { } } + /** + * Send a vendor-specific camera command + * + * @hide + */ + public final void sendVendorCommand(int cmd, int arg1, int arg2) { + if (cmd < 1000) { + throw new IllegalArgumentException("Command numbers must be at least 1000"); + } + _sendVendorCommand(cmd, arg1, arg2); + } + + private native final void _sendVendorCommand(int cmd, int arg1, int arg2); + /** * Callback interface for zoom changes during a smooth zoom operation. * @@ -1954,6 +2056,23 @@ public Face() { * as a set. Either they are all valid, or none of them are. */ public Point mouth = null; + + /** + * {@hide} + */ + public int smileDegree = 0; + /** + * {@hide} + */ + public int smileScore = 0; + /** + * {@hide} + */ + public int blinkDetected = 0; + /** + * {@hide} + */ + public int faceRecognised = 0; } /** @@ -2078,6 +2197,27 @@ public Parameters getParameters() { return p; } + /** @hide + * Returns the current cct value of white balance. + * + * If it's in AWB mode, cct is determined by stats/awb module. + * + * If it's in Manual WB mode, it actually returns cct value + * set by user via {@link #setParameters(Camera.Parameters)}. + */ + public int getWBCurrentCCT() { + Parameters p = new Parameters(); + String s = native_getParameters(); + p.unflatten(s); + + int cct = 0; + if (p.getWBCurrentCCT() != null) { + cct = Integer.parseInt(p.getWBCurrentCCT()); + } + + return cct; + } + /** * Returns an empty {@link Parameters} for testing purpose. * @@ -2091,6 +2231,157 @@ public static Parameters getEmptyParameters() { return camera.new Parameters(); } + /* ### QC ADD-ONS: START */ + private static int byteToInt(byte[] b, int offset) { + int value = 0; + for (int i = 0; i < 4; i++) { + int shift = (4 - 1 - i) * 8; + value += (b[(3-i) + offset] & 0x000000FF) << shift; + } + return value; + } + /** @hide + * Handles the callback for when Camera Data is available. + * data is read from the camera. + */ + public interface CameraDataCallback { + /** + * Callback for when camera data is available. + * + * @param data a int array of the camera data + * @param camera the Camera service object + */ + void onCameraData(int[] data, Camera camera); + }; + + /** @hide + * Set camera histogram mode and registers a callback function to run. + * Only valid after startPreview() has been called. + * + * @param cb the callback to run + */ + public final void setHistogramMode(CameraDataCallback cb) + { + mCameraDataCallback = cb; + native_setHistogramMode(cb!=null); + } + private native final void native_setHistogramMode(boolean mode); + + /** @hide + * Set camera histogram command to send data. + * + */ + public final void sendHistogramData() + { + native_sendHistogramData(); + } + private native final void native_sendHistogramData(); + + /** @hide + * Handles the callback for when Camera Meta Data is available. + * Meta data is read from the camera. + */ + public interface CameraMetaDataCallback { + /** + * Callback for when camera meta data is available. + * + * @param data a byte array of the camera meta data + * @param camera the Camera service object + */ + void onCameraMetaData(byte[] data, Camera camera); + }; + + /** @hide + * Set camera meta data and registers a callback function to run. + * Only valid after startPreview() has been called. + * + * @param cb the callback to run + */ + public final void setMetadataCb(CameraMetaDataCallback cb) + { + mCameraMetaDataCallback = cb; + native_setMetadataCb(cb!=null); + } + private native final void native_setMetadataCb(boolean mode); + + /** @hide + * Set camera face detection command to send meta data. + */ + public final void sendMetaData() + { + native_sendMetaData(); + } + private native final void native_sendMetaData(); + + /** @hide + * Configure longshot mode. Available only in ZSL. + * + * @param enable enable/disable this mode + */ + public final void setLongshot(boolean enable) + { + native_setLongshot(enable); + } + private native final void native_setLongshot(boolean enable); + + /** @hide + * Handles the Touch Co-ordinate. + */ + public class Coordinate { + /** + * Sets the x,y co-ordinates for a touch event + * + * @param x the x co-ordinate (pixels) + * @param y the y co-ordinate (pixels) + */ + public Coordinate(int x, int y) { + xCoordinate = x; + yCoordinate = y; + } + /** + * Compares {@code obj} to this co-ordinate. + * + * @param obj the object to compare this co-ordinate with. + * @return {@code true} if the xCoordinate and yCoordinate of {@code obj} is the + * same as those of this coordinate. {@code false} otherwise. + */ + @Override + public boolean equals(Object obj) { + if (!(obj instanceof Coordinate)) { + return false; + } + Coordinate c = (Coordinate) obj; + return xCoordinate == c.xCoordinate && yCoordinate == c.yCoordinate; + } + + /** x co-ordinate for the touch event*/ + public int xCoordinate; + + /** y co-ordinate for the touch event */ + public int yCoordinate; + }; + + /** @hide + * Returns the current focus position. + * + * If it's in AF mode, it's the lens position after af is done. + * + * If it's in Manual Focus mode, it actually returns the value + * set by user via {@link #setParameters(Camera.Parameters)}. + */ + public int getCurrentFocusPosition() { + Parameters p = new Parameters(); + String s = native_getParameters(); + p.unflatten(s); + + int focus_pos = -1; + if (p.getCurrentFocusPosition() != null) { + focus_pos = Integer.parseInt(p.getCurrentFocusPosition()); + } + return focus_pos; + } + + /* ### QC ADD-ONS: END */ /** * Returns a copied {@link Parameters}; for shim use only. * @@ -2352,6 +2643,10 @@ public class Parameters { public static final String WHITE_BALANCE_CLOUDY_DAYLIGHT = "cloudy-daylight"; public static final String WHITE_BALANCE_TWILIGHT = "twilight"; public static final String WHITE_BALANCE_SHADE = "shade"; + /** @hide + * wb manual cct mode. + */ + public static final String WHITE_BALANCE_MANUAL_CCT = "manual-cct"; // Values for color effect settings. public static final String EFFECT_NONE = "none"; @@ -2399,6 +2694,11 @@ public class Parameters { */ public static final String FLASH_MODE_TORCH = "torch"; + /** @hide + * Scene mode is off. + */ + public static final String SCENE_MODE_ASD = "asd"; + /** * Scene mode is off. */ @@ -2475,6 +2775,14 @@ public class Parameters { * Capture the naturally warm color of scenes lit by candles. */ public static final String SCENE_MODE_CANDLELIGHT = "candlelight"; + /** @hide + * SCENE_MODE_BACKLIGHT + **/ + public static final String SCENE_MODE_BACKLIGHT = "backlight"; + /** @hide + * SCENE_MODE_FLOWERS + **/ + public static final String SCENE_MODE_FLOWERS = "flowers"; /** * Applications are looking for a barcode. Camera driver will be @@ -2517,6 +2825,13 @@ public class Parameters { */ public static final String FOCUS_MODE_FIXED = "fixed"; + /** @hide + * Normal focus mode. Applications should call + * {@link #autoFocus(AutoFocusCallback)} to start the focus in this + * mode. + */ + public static final String FOCUS_MODE_NORMAL = "normal"; + /** * Extended depth of field (EDOF). Focusing is done digitally and * continuously. Applications should not call {@link @@ -2569,6 +2884,11 @@ public class Parameters { */ public static final String FOCUS_MODE_CONTINUOUS_PICTURE = "continuous-picture"; + /** @hide + * manual focus mode + */ + public static final String FOCUS_MODE_MANUAL_POSITION = "manual"; + // Indices for focus distance array. /** * The array index of near focus distance for use with @@ -2605,11 +2925,15 @@ public class Parameters { // Formats for setPreviewFormat and setPictureFormat. private static final String PIXEL_FORMAT_YUV422SP = "yuv422sp"; private static final String PIXEL_FORMAT_YUV420SP = "yuv420sp"; + private static final String PIXEL_FORMAT_YUV420SP_ADRENO = "yuv420sp-adreno"; private static final String PIXEL_FORMAT_YUV422I = "yuv422i-yuyv"; private static final String PIXEL_FORMAT_YUV420P = "yuv420p"; private static final String PIXEL_FORMAT_RGB565 = "rgb565"; private static final String PIXEL_FORMAT_JPEG = "jpeg"; private static final String PIXEL_FORMAT_BAYER_RGGB = "bayer-rggb"; + private static final String PIXEL_FORMAT_RAW = "raw"; + private static final String PIXEL_FORMAT_YV12 = "yv12"; + private static final String PIXEL_FORMAT_NV12 = "nv12"; /** * Order matters: Keys that are {@link #set(String, String) set} later @@ -3429,8 +3753,11 @@ public void setGpsProcessingMethod(String processing_method) { * parameters. */ public void removeGpsData() { + remove(KEY_QC_GPS_LATITUDE_REF); remove(KEY_GPS_LATITUDE); + remove(KEY_QC_GPS_LONGITUDE_REF); remove(KEY_GPS_LONGITUDE); + remove(KEY_QC_GPS_ALTITUDE_REF); remove(KEY_GPS_ALTITUDE); remove(KEY_GPS_TIMESTAMP); remove(KEY_GPS_PROCESSING_METHOD); @@ -3600,6 +3927,7 @@ public String getSceneMode() { * @see #getSceneMode() */ public void setSceneMode(String value) { + if(getSupportedSceneModes() == null) return; set(KEY_SCENE_MODE, value); } @@ -3637,6 +3965,7 @@ public String getFlashMode() { * @see #getFlashMode() */ public void setFlashMode(String value) { + if(getSupportedFlashModes() == null) return; set(KEY_FLASH_MODE, value); } @@ -4321,6 +4650,7 @@ private void splitInt(String str, int[] output) { splitter.setString(str); int index = 0; for (String s : splitter) { + s = s.replaceAll("\\s",""); output[index++] = Integer.parseInt(s); } } @@ -4391,7 +4721,7 @@ private Size strToSize(String str) { // Example string: "(10000,26623),(10000,30000)". Return null if the // passing string is null or the size is 0. private ArrayList splitRange(String str) { - if (str == null || str.charAt(0) != '(' + if (str == null || str.isEmpty() || str.charAt(0) != '(' || str.charAt(str.length() - 1) != ')') { Log.e(TAG, "Invalid range list string=" + str); return null; @@ -4417,7 +4747,7 @@ private ArrayList splitRange(String str) { // the passing string is null or the size is 0 or (0,0,0,0,0). @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) private ArrayList splitArea(String str) { - if (str == null || str.charAt(0) != '(' + if (str == null || str.isEmpty() || str.charAt(0) != '(' || str.charAt(str.length() - 1) != ')') { Log.e(TAG, "Invalid area string=" + str); return null; @@ -4454,5 +4784,1231 @@ private boolean same(String s1, String s2) { if (s1 != null && s1.equals(s2)) return true; return false; } + /* ### QC ADD-ONS: START */ + + /* ### QC ADDED PARAMETER KEYS*/ + private static final String KEY_QC_HFR_SIZE = "hfr-size"; + private static final String KEY_QC_PREVIEW_FRAME_RATE_MODE = "preview-frame-rate-mode"; + private static final String KEY_QC_PREVIEW_FRAME_RATE_AUTO_MODE = "frame-rate-auto"; + private static final String KEY_QC_PREVIEW_FRAME_RATE_FIXED_MODE = "frame-rate-fixed"; + private static final String KEY_QC_GPS_LATITUDE_REF = "gps-latitude-ref"; + private static final String KEY_QC_GPS_LONGITUDE_REF = "gps-longitude-ref"; + private static final String KEY_QC_GPS_ALTITUDE_REF = "gps-altitude-ref"; + private static final String KEY_QC_GPS_STATUS = "gps-status"; + private static final String KEY_QC_EXIF_DATETIME = "exif-datetime"; + private static final String KEY_QC_TOUCH_AF_AEC = "touch-af-aec"; + private static final String KEY_QC_TOUCH_INDEX_AEC = "touch-index-aec"; + private static final String KEY_QC_TOUCH_INDEX_AF = "touch-index-af"; + private static final String KEY_QC_MANUAL_FOCUS_POSITION = "manual-focus-position"; + private static final String KEY_QC_MANUAL_FOCUS_POS_TYPE = "manual-focus-pos-type"; + private static final String KEY_QC_SCENE_DETECT = "scene-detect"; + private static final String KEY_QC_ISO_MODE = "iso"; + private static final String KEY_QC_EXPOSURE_TIME = "exposure-time"; + private static final String KEY_QC_MIN_EXPOSURE_TIME = "min-exposure-time"; + private static final String KEY_QC_MAX_EXPOSURE_TIME = "max-exposure-time"; + private static final String KEY_QC_LENSSHADE = "lensshade"; + private static final String KEY_QC_HISTOGRAM = "histogram"; + private static final String KEY_QC_SKIN_TONE_ENHANCEMENT = "skinToneEnhancement"; + private static final String KEY_QC_AUTO_EXPOSURE = "auto-exposure"; + private static final String KEY_QC_SHARPNESS = "sharpness"; + private static final String KEY_QC_MAX_SHARPNESS = "max-sharpness"; + private static final String KEY_QC_CONTRAST = "contrast"; + private static final String KEY_QC_MAX_CONTRAST = "max-contrast"; + private static final String KEY_QC_SATURATION = "saturation"; + private static final String KEY_QC_MAX_SATURATION = "max-saturation"; + private static final String KEY_QC_DENOISE = "denoise"; + private static final String KEY_QC_CONTINUOUS_AF = "continuous-af"; + private static final String KEY_QC_SELECTABLE_ZONE_AF = "selectable-zone-af"; + private static final String KEY_QC_FACE_DETECTION = "face-detection"; + private static final String KEY_QC_MEMORY_COLOR_ENHANCEMENT = "mce"; + private static final String KEY_QC_REDEYE_REDUCTION = "redeye-reduction"; + private static final String KEY_QC_ZSL = "zsl"; + private static final String KEY_QC_CAMERA_MODE = "camera-mode"; + private static final String KEY_QC_VIDEO_HIGH_FRAME_RATE = "video-hfr"; + private static final String KEY_QC_VIDEO_HDR = "video-hdr"; + private static final String KEY_QC_POWER_MODE = "power-mode"; + private static final String KEY_QC_POWER_MODE_SUPPORTED = "power-mode-supported"; + private static final String KEY_QC_WB_MANUAL_CCT = "wb-manual-cct"; + private static final String KEY_QC_MIN_WB_CCT = "min-wb-cct"; + private static final String KEY_QC_MAX_WB_CCT = "max-wb-cct"; + private static final String KEY_QC_AUTO_HDR_ENABLE = "auto-hdr-enable"; + private static final String KEY_QC_VIDEO_ROTATION = "video-rotation"; + + /** @hide + * KEY_QC_AE_BRACKET_HDR + **/ + public static final String KEY_QC_AE_BRACKET_HDR = "ae-bracket-hdr"; + + /* ### QC ADDED PARAMETER VALUES*/ + + // Values for touch af/aec settings. + /** @hide + * TOUCH_AF_AEC_OFF + **/ + public static final String TOUCH_AF_AEC_OFF = "touch-off"; + /** @hide + * TOUCH_AF_AEC_ON + **/ + public static final String TOUCH_AF_AEC_ON = "touch-on"; + + // Values for auto exposure settings. + /** @hide + * Auto exposure frame-avg + **/ + public static final String AUTO_EXPOSURE_FRAME_AVG = "frame-average"; + /** @hide + * Auto exposure center weighted + **/ + public static final String AUTO_EXPOSURE_CENTER_WEIGHTED = "center-weighted"; + /** @hide + * Auto exposure spot metering + **/ + public static final String AUTO_EXPOSURE_SPOT_METERING = "spot-metering"; + + //Values for ISO settings + /** @hide + * ISO_AUTO + **/ + public static final String ISO_AUTO = "auto"; + /** @hide + * ISO_HJR + **/ + public static final String ISO_HJR = "ISO_HJR"; + /** @hide + * ISO_100 + **/ + public static final String ISO_100 = "ISO100"; + /** @hide + * ISO_200 + **/ + public static final String ISO_200 = "ISO200"; + /** @hide + * ISO_400 + **/ + public static final String ISO_400 = "ISO400"; + /** @hide + * ISO_800 + **/ + public static final String ISO_800 = "ISO800"; + /** @hide + * ISO_1600 + **/ + public static final String ISO_1600 = "ISO1600"; + + /** @hide + * ISO_3200 + **/ + public static final String ISO_3200 = "ISO3200"; + + //Values for Lens Shading + /** @hide + * LENSSHADE_ENABLE + **/ + public static final String LENSSHADE_ENABLE = "enable"; + /** @hide + * LENSSHADE_DISABLE + **/ + public static final String LENSSHADE_DISABLE= "disable"; + + //Values for Histogram + /** @hide + * Histogram enable + **/ + public static final String HISTOGRAM_ENABLE = "enable"; + /** @hide + * Histogram disable + **/ + public static final String HISTOGRAM_DISABLE= "disable"; + + //Values for Skin Tone Enhancement + /** @hide + * SKIN_TONE_ENHANCEMENT_ENABLE + **/ + public static final String SKIN_TONE_ENHANCEMENT_ENABLE = "enable"; + /** @hide + * SKIN_TONE_ENHANCEMENT_DISABLE + **/ + public static final String SKIN_TONE_ENHANCEMENT_DISABLE= "disable"; + + // Values for MCE settings. + /** @hide + * MCE_ENaBLE + **/ + public static final String MCE_ENABLE = "enable"; + /** @hide + * MCE_DISABLE + **/ + public static final String MCE_DISABLE = "disable"; + + // Values for ZSL settings. + /** @hide + * ZSL_ON + **/ + public static final String ZSL_ON = "on"; + /** @hide + * ZSL_OFF + **/ + public static final String ZSL_OFF = "off"; + + // Values for HDR Bracketing settings. + + /** @hide + * AEC bracketing off + **/ + public static final String AE_BRACKET_HDR_OFF = "Off"; + /** @hide + * AEC bracketing hdr + **/ + public static final String AE_BRACKET_HDR = "HDR"; + /** @hide + * AEC bracketing aec-bracket + **/ + public static final String AE_BRACKET = "AE-Bracket"; + + // Values for Power mode. + /** @hide + * LOW_POWER + **/ + public static final String LOW_POWER = "Low_Power"; + /** @hide + * NORMAL_POWER + **/ + public static final String NORMAL_POWER = "Normal_Power"; + + // Values for HFR settings. + /** @hide + * VIDEO_HFR_OFF + **/ + public static final String VIDEO_HFR_OFF = "off"; + /** @hide + * VIDEO_HFR_2X + **/ + public static final String VIDEO_HFR_2X = "60"; + /** @hide + * VIDEO_HFR_3X + **/ + public static final String VIDEO_HFR_3X = "90"; + /** @hide + * VIDEO_HFR_4X + **/ + public static final String VIDEO_HFR_4X = "120"; + + // Values for auto scene detection settings. + /** @hide + * SCENE_DETECT_OFF + **/ + public static final String SCENE_DETECT_OFF = "off"; + /** @hide + * SCENE_DETECT_ON + **/ + public static final String SCENE_DETECT_ON = "on"; + + //Values for Continuous AF + + /** @hide + * CAF off + **/ + public static final String CONTINUOUS_AF_OFF = "caf-off"; + /** @hide + * CAF on + **/ + public static final String CONTINUOUS_AF_ON = "caf-on"; + /** @hide + * Denoise off + **/ + public static final String DENOISE_OFF = "denoise-off"; + /** @hide + * Denoise on + **/ + public static final String DENOISE_ON = "denoise-on"; + + // Values for Redeye Reduction settings. + /** @hide + * REDEYE_REDUCTION_ENABLE + **/ + public static final String REDEYE_REDUCTION_ENABLE = "enable"; + /** @hide + * REDEYE_REDUCTION_DISABLE + **/ + public static final String REDEYE_REDUCTION_DISABLE = "disable"; + + // Values for selectable zone af settings. + /** @hide + * SELECTABLE_ZONE_AF_AUTO + **/ + public static final String SELECTABLE_ZONE_AF_AUTO = "auto"; + /** @hide + * SELECTABLE_ZONE_AF_SPOTMETERING + **/ + public static final String SELECTABLE_ZONE_AF_SPOTMETERING = "spot-metering"; + /** @hide + * SELECTABLE_ZONE_AF_CENTER_WEIGHTED + **/ + public static final String SELECTABLE_ZONE_AF_CENTER_WEIGHTED = "center-weighted"; + /** @hide + * SELECTABLE_ZONE_AF_FRAME_AVERAGE + **/ + public static final String SELECTABLE_ZONE_AF_FRAME_AVERAGE = "frame-average"; + + // Values for Face Detection settings. + /** @hide + * Face Detection off + **/ + public static final String FACE_DETECTION_OFF = "off"; + /** @hide + * Face Detction on + **/ + public static final String FACE_DETECTION_ON = "on"; + + // Values for video rotation settings. + + /** @hide + * VIDEO_ROTATION_0 + **/ + public static final String VIDEO_ROTATION_0 = "0"; + /** @hide + * VIDEO_ROTATION_90 + **/ + public static final String VIDEO_ROTATION_90 = "90"; + /** @hide + * VIDEO_ROTATION_180 + **/ + public static final String VIDEO_ROTATION_180 = "180"; + /** @hide + * VIDEO_ROTATION_270 + **/ + public static final String VIDEO_ROTATION_270 = "270"; + + /* ### QC ADDED PARAMETER APIS*/ + /** @hide + * Gets the supported preview sizes in high frame rate recording mode. + * + * @return a list of Size object. This method will always return a list + * with at least one element. + */ + public List getSupportedHfrSizes() { + String str = get(KEY_QC_HFR_SIZE + SUPPORTED_VALUES_SUFFIX); + return splitSize(str); + } + + /** @hide + * Gets the supported Touch AF/AEC setting. + * + * @return a List of TOUCH_AF_AEC_XXX string constants. null if TOUCH AF/AEC + * setting is not supported. + * + */ + public List getSupportedTouchAfAec() { + String str = get(KEY_QC_TOUCH_AF_AEC + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** + * Gets the supported Touch AF/AEC setting. + * + * @return a List of TOUCH_AF_AEC_XXX string constants. null if TOUCH AF/AEC + * setting is not supported. + * + */ + + /** @hide + * Gets the supported frame rate modes. + * + * @return a List of FRAME_RATE_XXX_MODE string constant. null if this + * setting is not supported. + */ + public List getSupportedPreviewFrameRateModes() { + String str = get(KEY_QC_PREVIEW_FRAME_RATE_MODE + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported auto scene detection modes. + * + * @return a List of SCENE_DETECT_XXX string constant. null if scene detection + * setting is not supported. + * + */ + public List getSupportedSceneDetectModes() { + String str = get(KEY_QC_SCENE_DETECT + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported ISO values. + * + * @return a List of FLASH_MODE_XXX string constants. null if flash mode + * setting is not supported. + */ + public List getSupportedIsoValues() { + String str = get(KEY_QC_ISO_MODE + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported Lensshade modes. + * + * @return a List of LENS_MODE_XXX string constants. null if lens mode + * setting is not supported. + */ + public List getSupportedLensShadeModes() { + String str = get(KEY_QC_LENSSHADE + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported Histogram modes. + * + * @return a List of HISTOGRAM_XXX string constants. null if histogram mode + * setting is not supported. + */ + public List getSupportedHistogramModes() { + String str = get(KEY_QC_HISTOGRAM + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported Skin Tone Enhancement modes. + * + * @return a List of SKIN_TONE_ENHANCEMENT_XXX string constants. null if skin tone enhancement + * setting is not supported. + */ + public List getSupportedSkinToneEnhancementModes() { + String str = get(KEY_QC_SKIN_TONE_ENHANCEMENT + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported auto exposure setting. + * + * @return a List of AUTO_EXPOSURE_XXX string constants. null if auto exposure + * setting is not supported. + */ + public List getSupportedAutoexposure() { + String str = get(KEY_QC_AUTO_EXPOSURE + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported MCE modes. + * + * @return a List of MCE_ENABLE/DISABLE string constants. null if MCE mode + * setting is not supported. + */ + public List getSupportedMemColorEnhanceModes() { + String str = get(KEY_QC_MEMORY_COLOR_ENHANCEMENT + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported ZSL modes. + * + * @return a List of ZSL_OFF/OFF string constants. null if ZSL mode + * setting is not supported. + */ + public List getSupportedZSLModes() { + String str = get(KEY_QC_ZSL + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported Video HDR modes. + * + * @return a List of Video HDR_OFF/OFF string constants. null if + * Video HDR mode setting is not supported. + */ + public List getSupportedVideoHDRModes() { + String str = get(KEY_QC_VIDEO_HDR + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported HFR modes. + * + * @return a List of VIDEO_HFR_XXX string constants. null if hfr mode + * setting is not supported. + */ + public List getSupportedVideoHighFrameRateModes() { + String str = get(KEY_QC_VIDEO_HIGH_FRAME_RATE + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported Continuous AF modes. + * + * @return a List of CONTINUOUS_AF_XXX string constant. null if continuous AF + * setting is not supported. + * + */ + public List getSupportedContinuousAfModes() { + String str = get(KEY_QC_CONTINUOUS_AF + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported DENOISE modes. + * + * @return a List of DENOISE_XXX string constant. null if DENOISE + * setting is not supported. + * + */ + public List getSupportedDenoiseModes() { + String str = get(KEY_QC_DENOISE + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported selectable zone af setting. + * + * @return a List of SELECTABLE_ZONE_AF_XXX string constants. null if selectable zone af + * setting is not supported. + */ + public List getSupportedSelectableZoneAf() { + String str = get(KEY_QC_SELECTABLE_ZONE_AF + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported face detection modes. + * + * @return a List of FACE_DETECTION_XXX string constant. null if face detection + * setting is not supported. + * + */ + public List getSupportedFaceDetectionModes() { + String str = get(KEY_QC_FACE_DETECTION + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported redeye reduction modes. + * + * @return a List of REDEYE_REDUCTION_XXX string constant. null if redeye reduction + * setting is not supported. + * + */ + public List getSupportedRedeyeReductionModes() { + String str = get(KEY_QC_REDEYE_REDUCTION + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Sets GPS altitude reference. This will be stored in JPEG EXIF header. + * @param altRef reference GPS altitude in meters. + */ + public void setGpsAltitudeRef(double altRef) { + set(KEY_QC_GPS_ALTITUDE_REF, Double.toString(altRef)); + } + + /** @hide + * Sets GPS Status. This will be stored in JPEG EXIF header. + * + * @param status GPS status (UTC in seconds since January 1, + * 1970). + */ + public void setGpsStatus(double status) { + set(KEY_QC_GPS_STATUS, Double.toString(status)); + } + + /** @hide + * Sets the touch co-ordinate for Touch AEC. + * + * @param x the x co-ordinate of the touch event + * @param y the y co-ordinate of the touch event + * + */ + public void setTouchIndexAec(int x, int y) { + String v = Integer.toString(x) + "x" + Integer.toString(y); + set(KEY_QC_TOUCH_INDEX_AEC, v); + } + + /** @hide + * Returns the touch co-ordinates of the touch event. + * + * @return a Index object with the x and y co-ordinated + * for the touch event + * + */ + public Coordinate getTouchIndexAec() { + String pair = get(KEY_QC_TOUCH_INDEX_AEC); + return strToCoordinate(pair); + } + + /** @hide + * Sets the touch co-ordinate for Touch AF. + * + * @param x the x co-ordinate of the touch event + * @param y the y co-ordinate of the touch event + * + */ + public void setTouchIndexAf(int x, int y) { + String v = Integer.toString(x) + "x" + Integer.toString(y); + set(KEY_QC_TOUCH_INDEX_AF, v); + } + + /** @hide + * Returns the touch co-ordinates of the touch event. + * + * @return a Index object with the x and y co-ordinated + * for the touch event + * + */ + public Coordinate getTouchIndexAf() { + String pair = get(KEY_QC_TOUCH_INDEX_AF); + return strToCoordinate(pair); + } + /** @hide + * Set Sharpness Level + * + * @param sharpness level + */ + public void setSharpness(int sharpness){ + if((sharpness < 0) || (sharpness > getMaxSharpness()) ) + throw new IllegalArgumentException( + "Invalid Sharpness " + sharpness); + + set(KEY_QC_SHARPNESS, String.valueOf(sharpness)); + } + + /** @hide + * Set Contrast Level + * + * @param contrast level + */ + public void setContrast(int contrast){ + if((contrast < 0 ) || (contrast > getMaxContrast())) + throw new IllegalArgumentException( + "Invalid Contrast " + contrast); + + set(KEY_QC_CONTRAST, String.valueOf(contrast)); + } + + /** @hide + * Set Saturation Level + * + * @param saturation level + */ + public void setSaturation(int saturation){ + if((saturation < 0 ) || (saturation > getMaxSaturation())) + throw new IllegalArgumentException( + "Invalid Saturation " + saturation); + + set(KEY_QC_SATURATION, String.valueOf(saturation)); + } + + /** @hide + * @return true if full size video snapshot is supported. + */ + public boolean isPowerModeSupported() { + String str = get(KEY_QC_POWER_MODE_SUPPORTED); + return TRUE.equals(str); + } + + /** @hide + * Get Sharpness level + * + * @return sharpness level + */ + public int getSharpness(){ + return getInt(KEY_QC_SHARPNESS); + } + + /** @hide + * Get Max Sharpness Level + * + * @return max sharpness level + */ + public int getMaxSharpness(){ + return getInt(KEY_QC_MAX_SHARPNESS); + } + + /** @hide + * Get Contrast level + * + * @return contrast level + */ + public int getContrast(){ + return getInt(KEY_QC_CONTRAST); + } + + /** @hide + * Get Max Contrast Level + * + * @return max contrast level + */ + public int getMaxContrast(){ + return getInt(KEY_QC_MAX_CONTRAST); + } + + /** @hide + * Get Saturation level + * + * @return saturation level + */ + public int getSaturation(){ + return getInt(KEY_QC_SATURATION); + } + + /** @hide + * Get Max Saturation Level + * + * @return max contrast level + */ + public int getMaxSaturation(){ + return getInt(KEY_QC_MAX_SATURATION); + } + + /** @hide + * Sets GPS latitude reference coordinate. This will be stored in JPEG EXIF + * header. + * @param latRef GPS latitude reference coordinate. + */ + public void setGpsLatitudeRef(String latRef) { + set(KEY_QC_GPS_LATITUDE_REF, latRef); + } + + /** @hide + * Sets GPS longitude reference coordinate. This will be stored in JPEG EXIF + * header. + * @param lonRef GPS longitude reference coordinate. + */ + public void setGpsLongitudeRef(String lonRef) { + set(KEY_QC_GPS_LONGITUDE_REF, lonRef); + } + + /** @hide + * Sets system timestamp. This will be stored in JPEG EXIF header. + * + * @param dateTime current timestamp (UTC in seconds since January 1, + * 1970). + */ + public void setExifDateTime(String dateTime) { + set(KEY_QC_EXIF_DATETIME, dateTime); + } + + /** @hide + * Gets the current Touch AF/AEC setting. + * + * @return one of TOUCH_AF_AEC_XXX string constant. null if Touch AF/AEC + * setting is not supported. + * + */ + public String getTouchAfAec() { + return get(KEY_QC_TOUCH_AF_AEC); + } + + /** @hide + * Sets the current TOUCH AF/AEC setting. + * + * @param value TOUCH_AF_AEC_XXX string constants. + * + */ + public void setTouchAfAec(String value) { + set(KEY_QC_TOUCH_AF_AEC, value); + } + + /** @hide + * Gets the current redeye reduction setting. + * + * @return one of REDEYE_REDUCTION_XXX string constant. null if redeye reduction + * setting is not supported. + * + */ + public String getRedeyeReductionMode() { + return get(KEY_QC_REDEYE_REDUCTION); + } + + /** @hide + * Sets the redeye reduction. Other parameters may be changed after changing + * redeye reduction. After setting redeye reduction, + * applications should call getParameters to know if some parameters are + * changed. + * + * @param value REDEYE_REDUCTION_XXX string constants. + * + */ + public void setRedeyeReductionMode(String value) { + set(KEY_QC_REDEYE_REDUCTION, value); + } + + /** @hide + * Gets the frame rate mode setting. + * + * @return one of FRAME_RATE_XXX_MODE string constant. null if this + * setting is not supported. + */ + public String getPreviewFrameRateMode() { + return get(KEY_QC_PREVIEW_FRAME_RATE_MODE); + } + + /** @hide + * Sets the frame rate mode. + * + * @param value FRAME_RATE_XXX_MODE string constants. + */ + public void setPreviewFrameRateMode(String value) { + set(KEY_QC_PREVIEW_FRAME_RATE_MODE, value); + } + + /** @hide + * Gets the current auto scene detection setting. + * + * @return one of SCENE_DETECT_XXX string constant. null if auto scene detection + * setting is not supported. + * + */ + public String getSceneDetectMode() { + return get(KEY_QC_SCENE_DETECT); + } + + /** @hide + * Sets the auto scene detect. Other parameters may be changed after changing + * scene detect. After setting auto scene detection, + * applications should call getParameters to know if some parameters are + * changed. + * + * @param value SCENE_DETECT_XXX string constants. + * + */ + public void setSceneDetectMode(String value) { + set(KEY_QC_SCENE_DETECT, value); + } + + /** @hide + * Gets the current hdr bracketing mode setting. + * + * @return current hdr bracketing mode. + * @see #KEY_AE_BRACKET_OFF + * @see #KEY_AE_BRACKET_HDR + * @see #KEY_AE_BRACKET_BRACKATING + */ + public String getAEBracket() { + return get(KEY_QC_AE_BRACKET_HDR); + } + + /** @hide + * Sets the Power mode. + * + * @param value Power mode. + * @see #getPowerMode() + */ + public void setPowerMode(String value) { + set(KEY_QC_POWER_MODE, value); + } + + /** @hide + * Gets the current power mode setting. + * + * @return current power mode. null if power mode setting is not + * supported. + * @see #POWER_MODE_LOW + * @see #POWER_MODE_NORMAL + */ + public String getPowerMode() { + return get(KEY_QC_POWER_MODE); + } + + /** @hide + * Set HDR-Bracketing Level + * + * @param value HDR-Bracketing + */ + public void setAEBracket(String value){ + set(KEY_QC_AE_BRACKET_HDR, value); + } + + /** @hide + * Gets the current ISO setting. + * + * @return one of ISO_XXX string constant. null if ISO + * setting is not supported. + */ + public String getISOValue() { + return get(KEY_QC_ISO_MODE); + } + + /** @hide + * Sets the ISO. + * + * @param iso ISO_XXX string constant. + */ + public void setISOValue(String iso) { + set(KEY_QC_ISO_MODE, iso); + } + + /** @hide + * Sets the exposure time. + * + * @param value exposure time. + */ + public void setExposureTime(int value) { + set(KEY_QC_EXPOSURE_TIME, Integer.toString(value)); + } + + /** @hide + * Gets the current exposure time. + * + * @return exposure time. + */ + public String getExposureTime() { + return get(KEY_QC_EXPOSURE_TIME); + } + + /** @hide + * Gets the min supported exposure time. + * + * @return min supported exposure time. + */ + public String getMinExposureTime() { + return get(KEY_QC_MIN_EXPOSURE_TIME); + } + + /** @hide + * Gets the max supported exposure time. + * + * @return max supported exposure time. + */ + public String getMaxExposureTime() { + return get(KEY_QC_MAX_EXPOSURE_TIME); + } + + /** @hide + * Gets the current LensShade Mode. + * + * @return LensShade Mode + */ + public String getLensShade() { + return get(KEY_QC_LENSSHADE); + } + + /** @hide + * Sets the current LensShade Mode. + * + * @return LensShade Mode + */ + public void setLensShade(String lensshade) { + set(KEY_QC_LENSSHADE, lensshade); + } + + /** @hide + * Gets the current auto exposure setting. + * + * @return one of AUTO_EXPOSURE_XXX string constant. null if auto exposure + * setting is not supported. + */ + public String getAutoExposure() { + return get(KEY_QC_AUTO_EXPOSURE); + } + + /** @hide + * Sets the current auto exposure setting. + * + * @param value AUTO_EXPOSURE_XXX string constants. + */ + public void setAutoExposure(String value) { + set(KEY_QC_AUTO_EXPOSURE, value); + } + + /** @hide + * Gets the current MCE Mode. + * + * @return MCE value + */ + public String getMemColorEnhance() { + return get(KEY_QC_MEMORY_COLOR_ENHANCEMENT); + } + + /** @hide + * Sets the current MCE Mode. + * + * @return MCE Mode + */ + public void setMemColorEnhance(String mce) { + set(KEY_QC_MEMORY_COLOR_ENHANCEMENT, mce); + } + + /** @hide + * Set white balance manual cct value. + * + * @param cct user CCT setting. + */ + public void setWBManualCCT(int cct) { + set(KEY_QC_WB_MANUAL_CCT, Integer.toString(cct)); + } + + /** @hide + * Gets the WB min supported CCT. + * + * @return min cct value. + */ + public String getWBMinCCT() { + return get(KEY_QC_MIN_WB_CCT); + } + + /** @hide + * Gets the WB max supported CCT. + * + * @return max cct value. + */ + public String getMaxWBCCT() { + return get(KEY_QC_MAX_WB_CCT); + } + + /** @hide + * Gets the current WB CCT. + * + * @return CCT value + */ + public String getWBCurrentCCT() { + return get(KEY_QC_WB_MANUAL_CCT); + } + + /** @hide + * Gets the current ZSL Mode. + * + * @return ZSL mode value + */ + public String getZSLMode() { + return get(KEY_QC_ZSL); + } + + /** @hide + * Sets the current ZSL Mode. ZSL mode is set as a 0th bit in KEY_CAMERA_MODE. + * + * @return null + */ + public void setZSLMode(String zsl) { + set(KEY_QC_ZSL, zsl); + } + + /** @hide + * Sets the current Auto HDR Mode. + * @ auto_hdr auto hdr string for enable/disable + * @return null + */ + public void setAutoHDRMode(String auto_hdr){ + set(KEY_QC_AUTO_HDR_ENABLE,auto_hdr); + } + + /** @hide + * Gets the current Camera Mode Flag. Camera mode includes a + * flag(byte) which indicates different camera modes. + * For now support for ZSL added at bit0 + * + * @return Camera Mode. + */ + public String getCameraMode() { + return get(KEY_QC_CAMERA_MODE); + } + + /** @hide + * Sets the current Camera Mode. + * + * @return null + */ + public void setCameraMode(int cameraMode) { + set(KEY_QC_CAMERA_MODE, cameraMode); + } + + private static final int MANUAL_FOCUS_POS_TYPE_INDEX = 0; + private static final int MANUAL_FOCUS_POS_TYPE_DAC = 1; + /** @hide + * Set focus position. + * + * @param pos user setting of focus position. + */ + public void setFocusPosition(int type, int pos) { + set(KEY_QC_MANUAL_FOCUS_POS_TYPE, Integer.toString(type)); + set(KEY_QC_MANUAL_FOCUS_POSITION, Integer.toString(pos)); + } + + /** @hide + * Gets the current focus position. + * + * @return current focus position + */ + public String getCurrentFocusPosition() { + return get(KEY_QC_MANUAL_FOCUS_POSITION); + } + + + /** @hide + * Gets the current HFR Mode. + * + * @return VIDEO_HFR_XXX string constants + */ + public String getVideoHighFrameRate() { + return get(KEY_QC_VIDEO_HIGH_FRAME_RATE); + } + + /** @hide + * Sets the current HFR Mode. + * + * @param hfr VIDEO_HFR_XXX string constants + */ + public void setVideoHighFrameRate(String hfr) { + set(KEY_QC_VIDEO_HIGH_FRAME_RATE, hfr); + } + + /** @hide + * Gets the current Video HDR Mode. + * + * @return Video HDR mode value + */ + public String getVideoHDRMode() { + return get(KEY_QC_VIDEO_HDR); + } + + /** @hide + * Sets the current Video HDR Mode. + * + * @return null + */ + public void setVideoHDRMode(String videohdr) { + set(KEY_QC_VIDEO_HDR, videohdr); + } + + /** @hide + * Gets the current DENOISE setting. + * + * @return one of DENOISE_XXX string constant. null if Denoise + * setting is not supported. + * + */ + public String getDenoise() { + return get(KEY_QC_DENOISE); + } + + /** @hide + * Gets the current Continuous AF setting. + * + * @return one of CONTINUOUS_AF_XXX string constant. null if continuous AF + * setting is not supported. + * + */ + public String getContinuousAf() { + return get(KEY_QC_CONTINUOUS_AF); + } + + /** @hide + * Sets the current Denoise mode. + * @param value DENOISE_XXX string constants. + * + */ + + public void setDenoise(String value) { + set(KEY_QC_DENOISE, value); + } + + /** @hide + * Sets the current Continuous AF mode. + * @param value CONTINUOUS_AF_XXX string constants. + * + */ + public void setContinuousAf(String value) { + set(KEY_QC_CONTINUOUS_AF, value); + } + + /** @hide + * Gets the current selectable zone af setting. + * + * @return one of SELECTABLE_ZONE_AF_XXX string constant. null if selectable zone af + * setting is not supported. + */ + public String getSelectableZoneAf() { + return get(KEY_QC_SELECTABLE_ZONE_AF); + } + + /** @hide + * Sets the current selectable zone af setting. + * + * @param value SELECTABLE_ZONE_AF_XXX string constants. + */ + public void setSelectableZoneAf(String value) { + set(KEY_QC_SELECTABLE_ZONE_AF, value); + } + + /** @hide + * Gets the current face detection setting. + * + * @return one of FACE_DETECTION_XXX string constant. null if face detection + * setting is not supported. + * + */ + public String getFaceDetectionMode() { + return get(KEY_QC_FACE_DETECTION); + } + + /** @hide + * Sets the auto scene detect. Other settings like Touch AF/AEC might be + * changed after setting face detection. + * + * @param value FACE_DETECTION_XXX string constants. + * + */ + public void setFaceDetectionMode(String value) { + set(KEY_QC_FACE_DETECTION, value); + } + + /** @hide + * Gets the current video rotation setting. + * + * @return one of VIDEO_QC_ROTATION_XXX string constant. null if video rotation + * setting is not supported. + */ + public String getVideoRotation() { + return get(KEY_QC_VIDEO_ROTATION); + } + + /** @hide + * Sets the current video rotation setting. + * + * @param value VIDEO_QC_ROTATION_XXX string constants. + */ + public void setVideoRotation(String value) { + set(KEY_QC_VIDEO_ROTATION, value); + } + /** @hide + * Gets the supported video rotation modes. + * + * @return a List of VIDEO_QC_ROTATION_XXX string constant. null if this + * setting is not supported. + */ + public List getSupportedVideoRotationValues() { + String str = get(KEY_QC_VIDEO_ROTATION + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + // Splits a comma delimited string to an ArrayList of Coordinate. + // Return null if the passing string is null or the Coordinate is 0. + private ArrayList splitCoordinate(String str) { + if (str == null) return null; + TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(','); + splitter.setString(str); + ArrayList coordinateList = new ArrayList(); + for (String s : splitter) { + Coordinate coordinate = strToCoordinate(s); + if (coordinate != null) coordinateList.add(coordinate); + } + if (coordinateList.size() == 0) return null; + return coordinateList; + } + + // Parses a string (ex: "500x500") to Coordinate object. + // Return null if the passing string is null. + private Coordinate strToCoordinate(String str) { + if (str == null) return null; + + int pos = str.indexOf('x'); + if (pos != -1) { + String x = str.substring(0, pos); + String y = str.substring(pos + 1); + return new Coordinate(Integer.parseInt(x), + Integer.parseInt(y)); + } + Log.e(TAG, "Invalid Coordinate parameter string=" + str); + return null; + } + /* ### QC ADD-ONS: END */ }; } diff --git a/core/java/android/hardware/SystemSensorManager.java b/core/java/android/hardware/SystemSensorManager.java index 18d86d69206f..1c4898a4c8d0 100644 --- a/core/java/android/hardware/SystemSensorManager.java +++ b/core/java/android/hardware/SystemSensorManager.java @@ -882,6 +882,7 @@ protected void dispatchSensorEvent(int handle, float[] values, int inAccuracy, } // Indicate if the discontinuity count changed + t.firstEventAfterDiscontinuity = false; if (t.sensor.getType() == Sensor.TYPE_HEAD_TRACKER) { final int lastCount = mSensorDiscontinuityCounts.get(handle); final int curCount = Float.floatToIntBits(values[6]); diff --git a/core/java/android/hardware/camera2/CameraDevice.java b/core/java/android/hardware/camera2/CameraDevice.java index 0f1b39c01289..c26b9eae801f 100644 --- a/core/java/android/hardware/camera2/CameraDevice.java +++ b/core/java/android/hardware/camera2/CameraDevice.java @@ -1307,6 +1307,10 @@ public abstract CaptureRequest.Builder createReprocessCaptureRequest( @Override public abstract void close(); + /** @hide */ + public abstract void setVendorStreamConfigMode(int index) + throws CameraAccessException; + /** * Checks whether a particular {@link SessionConfiguration} is supported by the camera device. * diff --git a/core/java/android/hardware/camera2/CameraManager.java b/core/java/android/hardware/camera2/CameraManager.java index d6d3a97687b5..18b8e367ddc7 100644 --- a/core/java/android/hardware/camera2/CameraManager.java +++ b/core/java/android/hardware/camera2/CameraManager.java @@ -23,9 +23,11 @@ import android.annotation.SystemApi; import android.annotation.SystemService; import android.annotation.TestApi; +import android.app.ActivityThread; import android.content.Context; import android.content.pm.PackageManager; import android.graphics.Point; +import android.hardware.Camera; import android.hardware.CameraStatus; import android.hardware.ICameraService; import android.hardware.ICameraServiceListener; @@ -49,6 +51,7 @@ import android.os.ServiceManager; import android.os.ServiceSpecificException; import android.os.SystemProperties; +import android.text.TextUtils; import android.util.ArrayMap; import android.util.ArraySet; import android.util.Log; @@ -1648,8 +1651,10 @@ private void connectCameraServiceLocked() { private String[] extractCameraIdListLocked() { String[] cameraIds = null; + boolean exposeAuxCamera = Camera.shouldExposeAuxCamera(); + int size = exposeAuxCamera ? mDeviceStatus.size() : 2; int idCount = 0; - for (int i = 0; i < mDeviceStatus.size(); i++) { + for (int i = 0; i < size; i++) { int status = mDeviceStatus.valueAt(i); if (status == ICameraServiceListener.STATUS_NOT_PRESENT || status == ICameraServiceListener.STATUS_ENUMERATING) continue; @@ -1657,7 +1662,7 @@ private String[] extractCameraIdListLocked() { } cameraIds = new String[idCount]; idCount = 0; - for (int i = 0; i < mDeviceStatus.size(); i++) { + for (int i = 0; i < size; i++) { int status = mDeviceStatus.valueAt(i); if (status == ICameraServiceListener.STATUS_NOT_PRESENT || status == ICameraServiceListener.STATUS_ENUMERATING) continue; @@ -1922,6 +1927,14 @@ public void setTorchMode(String cameraId, boolean enabled) throws CameraAccessEx throw new IllegalArgumentException("cameraId was null"); } + /* Force to expose only two cameras + * if the package name does not falls in this bucket + */ + boolean exposeAuxCamera = Camera.shouldExposeAuxCamera(); + if (exposeAuxCamera == false && (Integer.parseInt(cameraId) >= 2)) { + throw new IllegalArgumentException("invalid cameraId"); + } + ICameraService cameraService = getCameraService(); if (cameraService == null) { throw new CameraAccessException(CameraAccessException.CAMERA_DISCONNECTED, @@ -2189,6 +2202,11 @@ private void updateCallbackLocked(AvailabilityCallback callback, Executor execut } private void onStatusChangedLocked(int status, String id) { + if (!Camera.shouldExposeAuxCamera() && Integer.parseInt(id) >= 2) { + Log.w(TAG, "[soar.cts] ignore the status update of camera: " + id); + return; + } + if (DEBUG) { Log.v(TAG, String.format("Camera id %s has status changed to 0x%x", id, status)); @@ -2320,6 +2338,16 @@ private void onTorchStatusChangedLocked(int status, String id) { String.format("Camera id %s has torch status changed to 0x%x", id, status)); } + /* Force to ignore the aux or composite camera torch status update + * if the package name does not falls in this bucket + */ + boolean exposeAuxCamera = Camera.shouldExposeAuxCamera(); + if (exposeAuxCamera == false && Integer.parseInt(id) >= 2) { + Log.w(TAG, "ignore the torch status update of camera: " + id); + return; + } + + if (!validTorchStatus(status)) { Log.e(TAG, String.format("Ignoring invalid device %s torch status 0x%x", id, status)); diff --git a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java index 9a9163c724ff..c5bb3e2ec80c 100644 --- a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java +++ b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java @@ -15,6 +15,7 @@ */ package android.hardware.camera2.impl; +import android.app.ActivityThread; import android.hardware.camera2.CameraAccessException; import android.hardware.camera2.CameraCaptureSession; import android.hardware.camera2.CameraDevice; @@ -28,6 +29,7 @@ import android.os.Binder; import android.os.Handler; import android.os.SystemClock; +import android.os.SystemProperties; import android.util.Log; import android.view.Surface; @@ -131,6 +133,18 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession Log.e(TAG, mIdString + "Failed to create capture session; configuration failed"); mConfigureSuccess = false; } + + setSkipUnconfigure(); + } + + private void setSkipUnconfigure() { + String packageName = ActivityThread.currentOpPackageName(); + List packageList = Arrays.asList(SystemProperties.get( + "vendor.camera.skip_unconfigure.packagelist", packageName).split(",")); + + if (packageList.contains(packageName)) { + mSkipUnconfigure = true; + } } @Override @@ -222,7 +236,8 @@ private void checkCaptureRequest(CaptureRequest request) { } else if (request.isReprocess() && !isReprocessable()) { throw new IllegalArgumentException("this capture session cannot handle reprocess " + "requests"); - } else if (request.isReprocess() && request.getReprocessableSessionId() != mId) { + } else if (!mDeviceImpl.isPrivilegedApp() && + request.isReprocess() && request.getReprocessableSessionId() != mId) { throw new IllegalArgumentException("capture request was created for another session"); } } diff --git a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java index 3cb0c93d8409..e32b15453918 100644 --- a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java +++ b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java @@ -16,10 +16,13 @@ package android.hardware.camera2.impl; +import static android.hardware.camera2.CameraAccessException.CAMERA_IN_USE; + import static com.android.internal.util.function.pooled.PooledLambda.obtainRunnable; import android.annotation.NonNull; import android.content.Context; +import android.app.ActivityThread; import android.graphics.ImageFormat; import android.hardware.ICameraService; import android.hardware.camera2.CameraAccessException; @@ -53,6 +56,8 @@ import android.os.RemoteException; import android.os.ServiceSpecificException; import android.os.SystemClock; +import android.os.SystemProperties; +import android.text.TextUtils; import android.util.Log; import android.util.Range; import android.util.Size; @@ -84,7 +89,7 @@ public class CameraDeviceImpl extends CameraDevice private final boolean DEBUG = false; private static final int REQUEST_ID_NONE = -1; - + private int customOpMode = 0; // TODO: guard every function with if (!mRemoteDevice) check (if it was closed) private ICameraDeviceUserWrapper mRemoteDevice; @@ -151,6 +156,7 @@ public class CameraDeviceImpl extends CameraDevice private int mNextSessionId = 0; private final int mAppTargetSdkVersion; + private boolean mIsPrivilegedApp = false; private ExecutorService mOfflineSwitchService; private CameraOfflineSessionImpl mOfflineSessionImpl; @@ -301,6 +307,7 @@ public CameraDeviceImpl(String cameraId, StateCallback callback, Executor execut } else { mTotalPartialCount = partialCount; } + mIsPrivilegedApp = checkPrivilegedAppList(); } public CameraDeviceCallbacks getCallbacks() { @@ -389,6 +396,10 @@ public void run() { } } + public void setVendorStreamConfigMode(int fpsrange) { + customOpMode = fpsrange; + } + @Override public String getId() { return mCameraId; @@ -507,6 +518,7 @@ public boolean configureStreamsChecked(InputConfiguration inputConfig, mConfiguredOutputs.put(streamId, outConfig); } } + operatingMode = (operatingMode | (customOpMode << 16)); int offlineStreamIds[]; if (sessionParams != null) { @@ -1503,6 +1515,27 @@ private boolean checkInputConfigurationWithStreamConfigurations( return false; } + private boolean checkPrivilegedAppList() { + String packageName = ActivityThread.currentOpPackageName(); + String packageList = SystemProperties.get("persist.vendor.camera.privapp.list"); + + if (packageList.length() > 0) { + TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(','); + splitter.setString(packageList); + for (String str : splitter) { + if (packageName.equals(str)) { + return true; + } + } + } + + return false; + } + + public boolean isPrivilegedApp() { + return mIsPrivilegedApp; + } + private void checkInputConfiguration(InputConfiguration inputConfig) { if (inputConfig == null) { return; @@ -1540,6 +1573,14 @@ private void checkInputConfiguration(InputConfiguration inputConfig) { inputConfig.getWidth() + "x" + inputConfig.getHeight() + " is not valid"); } } else { + /* + * don't check input format and size, + * if the package name is in the white list + */ + if (isPrivilegedApp()) { + Log.w(TAG, "ignore input format/size check for white listed app"); + return; + } if (!checkInputConfigurationWithStreamConfigurations(inputConfig, /*maxRes*/false) && !checkInputConfigurationWithStreamConfigurations(inputConfig, /*maxRes*/true)) { throw new IllegalArgumentException("Input config with format " + diff --git a/core/java/android/hardware/camera2/impl/CameraMetadataNative.java b/core/java/android/hardware/camera2/impl/CameraMetadataNative.java index 468e6041eb73..c4387a325b9c 100644 --- a/core/java/android/hardware/camera2/impl/CameraMetadataNative.java +++ b/core/java/android/hardware/camera2/impl/CameraMetadataNative.java @@ -588,31 +588,35 @@ private T getBase(CaptureRequest.Key key) { } private T getBase(Key key) { - int tag; - if (key.hasTag()) { - tag = key.getTag(); - } else { - tag = nativeGetTagFromKeyLocal(mMetadataPtr, key.getName()); - key.cacheTag(tag); - } - byte[] values = readValues(tag); - if (values == null) { - // If the key returns null, use the fallback key if exists. - // This is to support old key names for the newly published keys. - if (key.mFallbackName == null) { - return null; + try { + int tag; + if (key.hasTag()) { + tag = key.getTag(); + } else { + tag = nativeGetTagFromKeyLocal(mMetadataPtr, key.getName()); + key.cacheTag(tag); } - tag = nativeGetTagFromKeyLocal(mMetadataPtr, key.mFallbackName); - values = readValues(tag); + byte[] values = readValues(tag); if (values == null) { - return null; + // If the key returns null, use the fallback key if exists. + // This is to support old key names for the newly published keys. + if (key.mFallbackName == null) { + return null; + } + tag = nativeGetTagFromKeyLocal(mMetadataPtr, key.mFallbackName); + values = readValues(tag); + if (values == null) { + return null; + } } - } - int nativeType = nativeGetTypeFromTagLocal(mMetadataPtr, tag); - Marshaler marshaler = getMarshalerForKey(key, nativeType); - ByteBuffer buffer = ByteBuffer.wrap(values).order(ByteOrder.nativeOrder()); - return marshaler.unmarshal(buffer); + int nativeType = nativeGetTypeFromTagLocal(mMetadataPtr, tag); + Marshaler marshaler = getMarshalerForKey(key, nativeType); + ByteBuffer buffer = ByteBuffer.wrap(values).order(ByteOrder.nativeOrder()); + return marshaler.unmarshal(buffer); + } catch (Exception e) { + return null; + } } // Use Command pattern here to avoid lots of expensive if/equals checks in get for overridden @@ -2081,6 +2085,18 @@ private static native int nativeGetTagFromKey(String keyName, long vendorId) private static native int nativeGetTypeFromTag(int tag, long vendorId) throws IllegalArgumentException; + private synchronized byte[] nativeReadValues(int tag) { + return nativeReadValues(tag, mMetadataPtr); + } + + private synchronized int nativeGetTypeFromTagLocal(int tag) { + return nativeGetTypeFromTagLocal(mMetadataPtr, tag); + } + + private synchronized int nativeGetTagFromKeyLocal(String keyname) { + return nativeGetTagFromKeyLocal(mMetadataPtr, keyname); + } + /** *

Perform a 0-copy swap of the internal metadata with another object.

* diff --git a/core/java/android/hardware/camera2/utils/SurfaceUtils.java b/core/java/android/hardware/camera2/utils/SurfaceUtils.java index 6c83057fdf29..10fc4e641bfd 100644 --- a/core/java/android/hardware/camera2/utils/SurfaceUtils.java +++ b/core/java/android/hardware/camera2/utils/SurfaceUtils.java @@ -34,6 +34,11 @@ import java.util.Iterator; import java.util.List; +import android.app.ActivityThread; +import android.os.SystemProperties; +import android.text.TextUtils; + + /** * Various Surface utilities. */ @@ -241,7 +246,13 @@ public static void checkConstrainedHighSpeedSurfaces(Collection surface + " the size must be 1 or 2"); } + if (isPrivilegedApp()) { + //skip checks for privileged apps + return; + } + List highSpeedSizes = null; + if (fpsRange == null) { highSpeedSizes = Arrays.asList(config.getHighSpeedVideoSizes()); } else { @@ -303,4 +314,21 @@ private static native int nativeDetectSurfaceDimens(Surface surface, /*out*/int[/*2*/] dimens); private static native long nativeGetSurfaceId(Surface surface); + + private static boolean isPrivilegedApp() { + String packageName = ActivityThread.currentOpPackageName(); + String packageList = SystemProperties.get("persist.vendor.camera.privapp.list"); + + if (packageList.length() > 0) { + TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(','); + splitter.setString(packageList); + for (String str : splitter) { + if (packageName.equals(str)) { + return true; + } + } + } + + return false; + } } diff --git a/core/java/android/hardware/display/AmbientDisplayConfiguration.java b/core/java/android/hardware/display/AmbientDisplayConfiguration.java index 7d8f2ff92200..04837e520055 100644 --- a/core/java/android/hardware/display/AmbientDisplayConfiguration.java +++ b/core/java/android/hardware/display/AmbientDisplayConfiguration.java @@ -71,6 +71,7 @@ public AmbientDisplayConfiguration(Context context) { public boolean enabled(int user) { return pulseOnNotificationEnabled(user) || pulseOnLongPressEnabled(user) + || pulseOnCustomDozeEventEnabled(user) || alwaysOnEnabled(user) || wakeLockScreenGestureEnabled(user) || wakeDisplayGestureEnabled(user) @@ -92,6 +93,12 @@ public boolean pulseOnNotificationAvailable() { return ambientDisplayAvailable(); } + /** @hide */ + public boolean pulseOnCustomDozeEventEnabled(int user) { + return (Settings.System.getInt(mContext.getContentResolver(), Settings.System.DOZE_TRIGGER_DOUBLETAP, 0) != 0) + && pulseOnNotificationAvailable(); + } + /** @hide */ public boolean pickupGestureEnabled(int user) { return boolSettingDefaultOn(Settings.Secure.DOZE_PICK_UP_GESTURE, user) diff --git a/core/java/android/hardware/fingerprint/FingerprintManager.java b/core/java/android/hardware/fingerprint/FingerprintManager.java index 28f1f02b7a93..171c824f15e5 100644 --- a/core/java/android/hardware/fingerprint/FingerprintManager.java +++ b/core/java/android/hardware/fingerprint/FingerprintManager.java @@ -1040,7 +1040,7 @@ public boolean isHardwareDetected() { throw e.rethrowFromSystemServer(); } } else { - Slog.w(TAG, "isFingerprintHardwareDetected(): Service not connected!"); + if (DEBUG) Slog.w(TAG, "isFingerprintHardwareDetected(): Service not connected!"); } return false; } @@ -1069,7 +1069,10 @@ public List getSensorPropertiesInternal() { */ public boolean isPowerbuttonFps() { final FingerprintSensorPropertiesInternal sensorProps = getFirstFingerprintSensor(); - return sensorProps.sensorType == TYPE_POWER_BUTTON; + if (sensorProps != null) { + return sensorProps.sensorType == TYPE_POWER_BUTTON; + } + return false; } /** diff --git a/core/java/android/inputmethodservice/IInputMethodWrapper.java b/core/java/android/inputmethodservice/IInputMethodWrapper.java index 3f49b73a78fc..8a82cff02548 100644 --- a/core/java/android/inputmethodservice/IInputMethodWrapper.java +++ b/core/java/android/inputmethodservice/IInputMethodWrapper.java @@ -381,6 +381,10 @@ public void createSession(InputChannel channel, IInputSessionCallback callback) @BinderThread @Override public void setSessionEnabled(IInputMethodSession session, boolean enabled) { + if (session == null) { + Log.w(TAG, "Incoming session is null"); + return; + } try { InputMethodSession ls = ((IInputMethodSessionWrapper) session).getInternalInputMethodSession(); diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java index 8e67705c5cf0..ebe4459fa6a8 100644 --- a/core/java/android/inputmethodservice/InputMethodService.java +++ b/core/java/android/inputmethodservice/InputMethodService.java @@ -625,6 +625,10 @@ public static boolean canImeRenderGesturalNavButtons() { * {@link InputMethodImpl#hideSoftInput}, after which it is set {@code null} until next call. */ private IBinder mCurHideInputToken; + int mVolumeKeyCursorControl; + private static final int VOLUME_CURSOR_OFF = 0; + private static final int VOLUME_CURSOR_ON = 1; + private static final int VOLUME_CURSOR_ON_REVERSE = 2; final ViewTreeObserver.OnComputeInternalInsetsListener mInsetsComputer = info -> { onComputeInsets(mTmpInsets); @@ -3048,6 +3052,26 @@ public boolean onKeyDown(int keyCode, KeyEvent event) { } return false; } + if (event.getKeyCode() == KeyEvent.KEYCODE_VOLUME_UP) { + mVolumeKeyCursorControl = Settings.System.getInt(getContentResolver(), + Settings.System.VOLUME_KEY_CURSOR_CONTROL, 0); + if (isInputViewShown() && (mVolumeKeyCursorControl != VOLUME_CURSOR_OFF)) { + sendDownUpKeyEvents((mVolumeKeyCursorControl == VOLUME_CURSOR_ON_REVERSE) + ? KeyEvent.KEYCODE_DPAD_RIGHT : KeyEvent.KEYCODE_DPAD_LEFT); + return true; + } + return false; + } + if (event.getKeyCode() == KeyEvent.KEYCODE_VOLUME_DOWN) { + mVolumeKeyCursorControl = Settings.System.getInt(getContentResolver(), + Settings.System.VOLUME_KEY_CURSOR_CONTROL, 0); + if (isInputViewShown() && (mVolumeKeyCursorControl != VOLUME_CURSOR_OFF)) { + sendDownUpKeyEvents((mVolumeKeyCursorControl == VOLUME_CURSOR_ON_REVERSE) + ? KeyEvent.KEYCODE_DPAD_LEFT : KeyEvent.KEYCODE_DPAD_RIGHT); + return true; + } + return false; + } return doMovementKey(keyCode, event, MOVEMENT_DOWN); } @@ -3098,6 +3122,15 @@ public boolean onKeyUp(int keyCode, KeyEvent event) { return handleBack(true); } } + if (event.getKeyCode() == KeyEvent.KEYCODE_VOLUME_UP + || keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) { + mVolumeKeyCursorControl = Settings.System.getInt(getContentResolver(), + Settings.System.VOLUME_KEY_CURSOR_CONTROL, 0); + if (isInputViewShown() && (mVolumeKeyCursorControl != VOLUME_CURSOR_OFF)) { + return true; + } + return false; + } return doMovementKey(keyCode, event, MOVEMENT_UP); } diff --git a/core/java/android/nfc/INfcAdapter.aidl b/core/java/android/nfc/INfcAdapter.aidl index cb9a3e43db81..37ba09b381ea 100644 --- a/core/java/android/nfc/INfcAdapter.aidl +++ b/core/java/android/nfc/INfcAdapter.aidl @@ -1,4 +1,7 @@ /* + * Copyright (c) 2018, The Linux Foundation. All rights reserved. + * Not a Contribution. + * * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -32,6 +35,7 @@ import android.nfc.INfcUnlockHandler; import android.nfc.ITagRemovedCallback; import android.nfc.INfcDta; import android.os.Bundle; +import android.os.IBinder; /** * @hide @@ -43,6 +47,8 @@ interface INfcAdapter INfcFCardEmulation getNfcFCardEmulationInterface(); INfcAdapterExtras getNfcAdapterExtrasInterface(in String pkg); INfcDta getNfcDtaInterface(in String pkg); + IBinder getNfcAdapterVendorInterface(in String vendor); + int getState(); boolean disable(boolean saveState); boolean enable(); diff --git a/core/java/android/nfc/cardemulation/AidGroup.java b/core/java/android/nfc/cardemulation/AidGroup.java index 2436e57b74bc..d4c966be04b8 100644 --- a/core/java/android/nfc/cardemulation/AidGroup.java +++ b/core/java/android/nfc/cardemulation/AidGroup.java @@ -1,4 +1,7 @@ /* + * Copyright (c) 2018, The Linux Foundation. All rights reserved. + * Not a Contribution. + * * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -39,7 +42,7 @@ * * @hide */ -public final class AidGroup implements Parcelable { +public class AidGroup implements Parcelable { /** * The maximum number of AIDs that can be present in any one group. */ @@ -48,11 +51,11 @@ public final class AidGroup implements Parcelable { static final String TAG = "AidGroup"; @UnsupportedAppUsage - final List aids; + protected List aids; @UnsupportedAppUsage - final String category; + protected String category; @UnsupportedAppUsage - final String description; + protected String description; /** * Creates a new AidGroup object. diff --git a/core/java/android/nfc/cardemulation/ApduServiceInfo.java b/core/java/android/nfc/cardemulation/ApduServiceInfo.java index 09540132fe0d..b85fea437b24 100644 --- a/core/java/android/nfc/cardemulation/ApduServiceInfo.java +++ b/core/java/android/nfc/cardemulation/ApduServiceInfo.java @@ -1,4 +1,7 @@ /* + * Copyright (c) 2018, The Linux Foundation. All rights reserved. + * Not a Contribution. + * * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -49,24 +52,24 @@ /** * @hide */ -public final class ApduServiceInfo implements Parcelable { +public class ApduServiceInfo implements Parcelable { static final String TAG = "ApduServiceInfo"; /** * The service that implements this */ @UnsupportedAppUsage - final ResolveInfo mService; + protected ResolveInfo mService; /** * Description of the service */ - final String mDescription; + protected String mDescription; /** * Whether this service represents AIDs running on the host CPU */ - final boolean mOnHost; + protected boolean mOnHost; /** * Offhost reader name. @@ -84,18 +87,18 @@ public final class ApduServiceInfo implements Parcelable { * Mapping from category to static AID group */ @UnsupportedAppUsage - final HashMap mStaticAidGroups; + protected HashMap mStaticAidGroups; /** * Mapping from category to dynamic AID group */ @UnsupportedAppUsage - final HashMap mDynamicAidGroups; + protected HashMap mDynamicAidGroups; /** * Whether this service should only be started when the device is unlocked. */ - final boolean mRequiresDeviceUnlock; + protected boolean mRequiresDeviceUnlock; /** * Whether this service should only be started when the device is screen on. @@ -105,17 +108,17 @@ public final class ApduServiceInfo implements Parcelable { /** * The id of the service banner specified in XML. */ - final int mBannerResourceId; + protected int mBannerResourceId; /** * The uid of the package the service belongs to */ - final int mUid; + protected int mUid; /** * Settings Activity for this service */ - final String mSettingsActivityName; + protected String mSettingsActivityName; /** * @hide diff --git a/core/java/android/nfc/cardemulation/CardEmulation.java b/core/java/android/nfc/cardemulation/CardEmulation.java index 2b34d8639235..0b56d19201fb 100644 --- a/core/java/android/nfc/cardemulation/CardEmulation.java +++ b/core/java/android/nfc/cardemulation/CardEmulation.java @@ -209,7 +209,8 @@ public static synchronized CardEmulation getInstance(NfcAdapter adapter) { */ public boolean isDefaultServiceForCategory(ComponentName service, String category) { try { - return sService.isDefaultServiceForCategory(mContext.getUserId(), service, category); + return sService.isDefaultServiceForCategory(mContext.getUser().getIdentifier(), + service, category); } catch (RemoteException e) { // Try one more time recoverService(); @@ -218,8 +219,8 @@ public boolean isDefaultServiceForCategory(ComponentName service, String categor return false; } try { - return sService.isDefaultServiceForCategory(mContext.getUserId(), service, - category); + return sService.isDefaultServiceForCategory(mContext.getUser().getIdentifier(), + service, category); } catch (RemoteException ee) { Log.e(TAG, "Failed to recover CardEmulationService."); return false; @@ -240,7 +241,8 @@ public boolean isDefaultServiceForCategory(ComponentName service, String categor */ public boolean isDefaultServiceForAid(ComponentName service, String aid) { try { - return sService.isDefaultServiceForAid(mContext.getUserId(), service, aid); + return sService.isDefaultServiceForAid(mContext.getUser().getIdentifier(), + service, aid); } catch (RemoteException e) { // Try one more time recoverService(); @@ -249,7 +251,8 @@ public boolean isDefaultServiceForAid(ComponentName service, String aid) { return false; } try { - return sService.isDefaultServiceForAid(mContext.getUserId(), service, aid); + return sService.isDefaultServiceForAid(mContext.getUser().getIdentifier(), + service, aid); } catch (RemoteException ee) { Log.e(TAG, "Failed to reach CardEmulationService."); return false; @@ -348,7 +351,8 @@ public boolean registerAidsForService(ComponentName service, String category, List aids) { AidGroup aidGroup = new AidGroup(aids, category); try { - return sService.registerAidGroupForService(mContext.getUserId(), service, aidGroup); + return sService.registerAidGroupForService(mContext.getUser().getIdentifier(), + service, aidGroup); } catch (RemoteException e) { // Try one more time recoverService(); @@ -357,8 +361,8 @@ public boolean registerAidsForService(ComponentName service, String category, return false; } try { - return sService.registerAidGroupForService(mContext.getUserId(), service, - aidGroup); + return sService.registerAidGroupForService(mContext.getUser().getIdentifier(), + service, aidGroup); } catch (RemoteException ee) { Log.e(TAG, "Failed to reach CardEmulationService."); return false; @@ -391,7 +395,7 @@ public boolean unsetOffHostForService(@NonNull ComponentName service) { } try { - return sService.unsetOffHostForService(mContext.getUserId(), service); + return sService.unsetOffHostForService(mContext.getUser().getIdentifier(), service); } catch (RemoteException e) { // Try one more time recoverService(); @@ -400,7 +404,7 @@ public boolean unsetOffHostForService(@NonNull ComponentName service) { return false; } try { - return sService.unsetOffHostForService(mContext.getUserId(), service); + return sService.unsetOffHostForService(mContext.getUser().getIdentifier(), service); } catch (RemoteException ee) { Log.e(TAG, "Failed to reach CardEmulationService."); return false; @@ -468,7 +472,7 @@ public boolean setOffHostForService(@NonNull ComponentName service, } try { - return sService.setOffHostForService(mContext.getUserId(), service, + return sService.setOffHostForService(mContext.getUser().getIdentifier(), service, offHostSecureElement); } catch (RemoteException e) { // Try one more time @@ -478,7 +482,7 @@ public boolean setOffHostForService(@NonNull ComponentName service, return false; } try { - return sService.setOffHostForService(mContext.getUserId(), service, + return sService.setOffHostForService(mContext.getUser().getIdentifier(), service, offHostSecureElement); } catch (RemoteException ee) { Log.e(TAG, "Failed to reach CardEmulationService."); @@ -503,8 +507,8 @@ public boolean setOffHostForService(@NonNull ComponentName service, */ public List getAidsForService(ComponentName service, String category) { try { - AidGroup group = sService.getAidGroupForService(mContext.getUserId(), service, - category); + AidGroup group = sService.getAidGroupForService(mContext.getUser().getIdentifier(), + service, category); return (group != null ? group.getAids() : null); } catch (RemoteException e) { recoverService(); @@ -513,8 +517,8 @@ public List getAidsForService(ComponentName service, String category) { return null; } try { - AidGroup group = sService.getAidGroupForService(mContext.getUserId(), service, - category); + AidGroup group = sService.getAidGroupForService(mContext.getUser().getIdentifier(), + service, category); return (group != null ? group.getAids() : null); } catch (RemoteException ee) { Log.e(TAG, "Failed to recover CardEmulationService."); @@ -540,7 +544,8 @@ public List getAidsForService(ComponentName service, String category) { */ public boolean removeAidsForService(ComponentName service, String category) { try { - return sService.removeAidGroupForService(mContext.getUserId(), service, category); + return sService.removeAidGroupForService(mContext.getUser().getIdentifier(), service, + category); } catch (RemoteException e) { // Try one more time recoverService(); @@ -549,7 +554,8 @@ public boolean removeAidsForService(ComponentName service, String category) { return false; } try { - return sService.removeAidGroupForService(mContext.getUserId(), service, category); + return sService.removeAidGroupForService(mContext.getUser().getIdentifier(), + service, category); } catch (RemoteException ee) { Log.e(TAG, "Failed to reach CardEmulationService."); return false; @@ -684,7 +690,8 @@ public boolean supportsAidPrefixRegistration() { @Nullable public List getAidsForPreferredPaymentService() { try { - ApduServiceInfo serviceInfo = sService.getPreferredPaymentService(mContext.getUserId()); + ApduServiceInfo serviceInfo = sService.getPreferredPaymentService( + mContext.getUser().getIdentifier()); return (serviceInfo != null ? serviceInfo.getAids() : null); } catch (RemoteException e) { recoverService(); @@ -694,7 +701,7 @@ public List getAidsForPreferredPaymentService() { } try { ApduServiceInfo serviceInfo = - sService.getPreferredPaymentService(mContext.getUserId()); + sService.getPreferredPaymentService(mContext.getUser().getIdentifier()); return (serviceInfo != null ? serviceInfo.getAids() : null); } catch (RemoteException ee) { Log.e(TAG, "Failed to recover CardEmulationService."); @@ -723,7 +730,8 @@ public List getAidsForPreferredPaymentService() { @Nullable public String getRouteDestinationForPreferredPaymentService() { try { - ApduServiceInfo serviceInfo = sService.getPreferredPaymentService(mContext.getUserId()); + ApduServiceInfo serviceInfo = sService.getPreferredPaymentService( + mContext.getUser().getIdentifier()); if (serviceInfo != null) { if (!serviceInfo.isOnHost()) { return serviceInfo.getOffHostSecureElement() == null ? @@ -740,7 +748,7 @@ public String getRouteDestinationForPreferredPaymentService() { } try { ApduServiceInfo serviceInfo = - sService.getPreferredPaymentService(mContext.getUserId()); + sService.getPreferredPaymentService(mContext.getUser().getIdentifier()); if (serviceInfo != null) { if (!serviceInfo.isOnHost()) { return serviceInfo.getOffHostSecureElement() == null ? @@ -766,7 +774,8 @@ public String getRouteDestinationForPreferredPaymentService() { @Nullable public CharSequence getDescriptionForPreferredPaymentService() { try { - ApduServiceInfo serviceInfo = sService.getPreferredPaymentService(mContext.getUserId()); + ApduServiceInfo serviceInfo = sService.getPreferredPaymentService( + mContext.getUser().getIdentifier()); return (serviceInfo != null ? serviceInfo.getDescription() : null); } catch (RemoteException e) { recoverService(); @@ -776,7 +785,7 @@ public CharSequence getDescriptionForPreferredPaymentService() { } try { ApduServiceInfo serviceInfo = - sService.getPreferredPaymentService(mContext.getUserId()); + sService.getPreferredPaymentService(mContext.getUser().getIdentifier()); return (serviceInfo != null ? serviceInfo.getDescription() : null); } catch (RemoteException ee) { Log.e(TAG, "Failed to recover CardEmulationService."); @@ -790,7 +799,8 @@ public CharSequence getDescriptionForPreferredPaymentService() { */ public boolean setDefaultServiceForCategory(ComponentName service, String category) { try { - return sService.setDefaultServiceForCategory(mContext.getUserId(), service, category); + return sService.setDefaultServiceForCategory(mContext.getUser().getIdentifier(), + service, category); } catch (RemoteException e) { // Try one more time recoverService(); @@ -799,8 +809,8 @@ public boolean setDefaultServiceForCategory(ComponentName service, String catego return false; } try { - return sService.setDefaultServiceForCategory(mContext.getUserId(), service, - category); + return sService.setDefaultServiceForCategory(mContext.getUser().getIdentifier(), + service, category); } catch (RemoteException ee) { Log.e(TAG, "Failed to reach CardEmulationService."); return false; @@ -813,7 +823,7 @@ public boolean setDefaultServiceForCategory(ComponentName service, String catego */ public boolean setDefaultForNextTap(ComponentName service) { try { - return sService.setDefaultForNextTap(mContext.getUserId(), service); + return sService.setDefaultForNextTap(mContext.getUser().getIdentifier(), service); } catch (RemoteException e) { // Try one more time recoverService(); @@ -822,7 +832,7 @@ public boolean setDefaultForNextTap(ComponentName service) { return false; } try { - return sService.setDefaultForNextTap(mContext.getUserId(), service); + return sService.setDefaultForNextTap(mContext.getUser().getIdentifier(), service); } catch (RemoteException ee) { Log.e(TAG, "Failed to reach CardEmulationService."); return false; @@ -857,7 +867,7 @@ public boolean setDefaultForNextTap(int userId, ComponentName service) { */ public List getServices(String category) { try { - return sService.getServices(mContext.getUserId(), category); + return sService.getServices(mContext.getUser().getIdentifier(), category); } catch (RemoteException e) { // Try one more time recoverService(); @@ -866,7 +876,7 @@ public List getServices(String category) { return null; } try { - return sService.getServices(mContext.getUserId(), category); + return sService.getServices(mContext.getUser().getIdentifier(), category); } catch (RemoteException ee) { Log.e(TAG, "Failed to reach CardEmulationService."); return null; diff --git a/core/java/android/nfc/cardemulation/NfcFCardEmulation.java b/core/java/android/nfc/cardemulation/NfcFCardEmulation.java index 557e41a2b103..3c924556365e 100644 --- a/core/java/android/nfc/cardemulation/NfcFCardEmulation.java +++ b/core/java/android/nfc/cardemulation/NfcFCardEmulation.java @@ -117,7 +117,7 @@ public String getSystemCodeForService(ComponentName service) throws RuntimeExcep throw new NullPointerException("service is null"); } try { - return sService.getSystemCodeForService(mContext.getUserId(), service); + return sService.getSystemCodeForService(mContext.getUser().getIdentifier(), service); } catch (RemoteException e) { // Try one more time recoverService(); @@ -126,7 +126,8 @@ public String getSystemCodeForService(ComponentName service) throws RuntimeExcep return null; } try { - return sService.getSystemCodeForService(mContext.getUserId(), service); + return sService.getSystemCodeForService(mContext.getUser().getIdentifier(), + service); } catch (RemoteException ee) { Log.e(TAG, "Failed to reach CardEmulationService."); ee.rethrowAsRuntimeException(); @@ -163,7 +164,7 @@ public boolean registerSystemCodeForService(ComponentName service, String system throw new NullPointerException("service or systemCode is null"); } try { - return sService.registerSystemCodeForService(mContext.getUserId(), + return sService.registerSystemCodeForService(mContext.getUser().getIdentifier(), service, systemCode); } catch (RemoteException e) { // Try one more time @@ -173,7 +174,7 @@ public boolean registerSystemCodeForService(ComponentName service, String system return false; } try { - return sService.registerSystemCodeForService(mContext.getUserId(), + return sService.registerSystemCodeForService(mContext.getUser().getIdentifier(), service, systemCode); } catch (RemoteException ee) { Log.e(TAG, "Failed to reach CardEmulationService."); @@ -194,7 +195,7 @@ public boolean unregisterSystemCodeForService(ComponentName service) throws Runt throw new NullPointerException("service is null"); } try { - return sService.removeSystemCodeForService(mContext.getUserId(), service); + return sService.removeSystemCodeForService(mContext.getUser().getIdentifier(), service); } catch (RemoteException e) { // Try one more time recoverService(); @@ -203,7 +204,8 @@ public boolean unregisterSystemCodeForService(ComponentName service) throws Runt return false; } try { - return sService.removeSystemCodeForService(mContext.getUserId(), service); + return sService.removeSystemCodeForService(mContext.getUser().getIdentifier(), + service); } catch (RemoteException ee) { Log.e(TAG, "Failed to reach CardEmulationService."); ee.rethrowAsRuntimeException(); @@ -229,7 +231,7 @@ public String getNfcid2ForService(ComponentName service) throws RuntimeException throw new NullPointerException("service is null"); } try { - return sService.getNfcid2ForService(mContext.getUserId(), service); + return sService.getNfcid2ForService(mContext.getUser().getIdentifier(), service); } catch (RemoteException e) { // Try one more time recoverService(); @@ -238,7 +240,7 @@ public String getNfcid2ForService(ComponentName service) throws RuntimeException return null; } try { - return sService.getNfcid2ForService(mContext.getUserId(), service); + return sService.getNfcid2ForService(mContext.getUser().getIdentifier(), service); } catch (RemoteException ee) { Log.e(TAG, "Failed to reach CardEmulationService."); ee.rethrowAsRuntimeException(); @@ -272,7 +274,7 @@ public boolean setNfcid2ForService(ComponentName service, String nfcid2) throw new NullPointerException("service or nfcid2 is null"); } try { - return sService.setNfcid2ForService(mContext.getUserId(), + return sService.setNfcid2ForService(mContext.getUser().getIdentifier(), service, nfcid2); } catch (RemoteException e) { // Try one more time @@ -282,7 +284,7 @@ public boolean setNfcid2ForService(ComponentName service, String nfcid2) return false; } try { - return sService.setNfcid2ForService(mContext.getUserId(), + return sService.setNfcid2ForService(mContext.getUser().getIdentifier(), service, nfcid2); } catch (RemoteException ee) { Log.e(TAG, "Failed to reach CardEmulationService."); @@ -380,7 +382,7 @@ public boolean disableService(Activity activity) throws RuntimeException { */ public List getNfcFServices() { try { - return sService.getNfcFServices(mContext.getUserId()); + return sService.getNfcFServices(mContext.getUser().getIdentifier()); } catch (RemoteException e) { // Try one more time recoverService(); @@ -389,7 +391,7 @@ public List getNfcFServices() { return null; } try { - return sService.getNfcFServices(mContext.getUserId()); + return sService.getNfcFServices(mContext.getUser().getIdentifier()); } catch (RemoteException ee) { Log.e(TAG, "Failed to reach CardEmulationService."); return null; diff --git a/core/java/android/nfc/tech/MifareClassic.java b/core/java/android/nfc/tech/MifareClassic.java index 080e058737b6..9cae043c4bdd 100644 --- a/core/java/android/nfc/tech/MifareClassic.java +++ b/core/java/android/nfc/tech/MifareClassic.java @@ -1,4 +1,6 @@ /* + * Copyright (C) 2018 NXP Semiconductors + * The original Work has been changed by NXP Semiconductors. * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -173,6 +175,10 @@ public MifareClassic(Tag tag) throws RemoteException { mType = TYPE_CLASSIC; mSize = SIZE_4K; break; + case 0x19: + mType = TYPE_CLASSIC; + mSize = SIZE_2K; + break; case 0x28: mType = TYPE_CLASSIC; mSize = SIZE_1K; diff --git a/core/java/android/nfc/tech/NfcA.java b/core/java/android/nfc/tech/NfcA.java index 88730f9af3df..1d0a5ed183b4 100644 --- a/core/java/android/nfc/tech/NfcA.java +++ b/core/java/android/nfc/tech/NfcA.java @@ -1,4 +1,6 @@ /* + * Copyright (C) 2018 NXP Semiconductors + * The original Work has been changed by NXP Semiconductors. * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -66,8 +68,15 @@ public static NfcA get(Tag tag) { /** @hide */ public NfcA(Tag tag) throws RemoteException { super(tag, TagTechnology.NFC_A); - Bundle extras = tag.getTechExtras(TagTechnology.NFC_A); - mSak = extras.getShort(EXTRA_SAK); + Bundle extras; + mSak = 0; + if (tag.hasTech(TagTechnology.MIFARE_CLASSIC)) { + extras = tag.getTechExtras(TagTechnology.MIFARE_CLASSIC); + if (extras != null) + mSak = extras.getShort(EXTRA_SAK); + } + extras = tag.getTechExtras(TagTechnology.NFC_A); + mSak |= extras.getShort(EXTRA_SAK); mAtqa = extras.getByteArray(EXTRA_ATQA); } diff --git a/core/java/android/os/BaseBundle.java b/core/java/android/os/BaseBundle.java index 0418a4bb9f80..ae8ef856c723 100644 --- a/core/java/android/os/BaseBundle.java +++ b/core/java/android/os/BaseBundle.java @@ -447,7 +447,14 @@ private void initializeFromParcelLocked(@NonNull Parcel parcelledData, boolean r } else { throw e; } - } finally { + } catch (RuntimeException e) { + if (sShouldDefuse && (e.getCause() instanceof ClassNotFoundException)) { + Log.w(TAG, "Failed to parse Bundle, but defusing quietly", e); + map.erase(); + } else { + throw e; + } + }finally { mMap = map; if (recycleParcel) { recycleParcel(parcelledData); diff --git a/core/java/android/os/BatteryManager.java b/core/java/android/os/BatteryManager.java index 76f857bd91b7..ba170a62377b 100644 --- a/core/java/android/os/BatteryManager.java +++ b/core/java/android/os/BatteryManager.java @@ -163,6 +163,20 @@ public class BatteryManager { @SystemApi public static final String EXTRA_EVENT_TIMESTAMP = "android.os.extra.EVENT_TIMESTAMP"; + /** + * Extra for {@link android.content.Intent#ACTION_BATTERY_CHANGED}: + * boolean value to detect fast charging + * {@hide} + */ + public static final String EXTRA_DASH_CHARGER = "dash_charger"; + + /** + * Extra for {@link android.content.Intent#ACTION_BATTERY_CHANGED}: + * boolean value to detect fast charging + * {@hide} + */ + public static final String EXTRA_WARP_CHARGER = "warp_charger"; + // values for "status" field in the ACTION_BATTERY_CHANGED Intent public static final int BATTERY_STATUS_UNKNOWN = Constants.BATTERY_STATUS_UNKNOWN; public static final int BATTERY_STATUS_CHARGING = Constants.BATTERY_STATUS_CHARGING; diff --git a/core/java/android/os/IPowerManager.aidl b/core/java/android/os/IPowerManager.aidl index 4fe6524dee27..e5ac615997f1 100644 --- a/core/java/android/os/IPowerManager.aidl +++ b/core/java/android/os/IPowerManager.aidl @@ -76,6 +76,7 @@ interface IPowerManager @UnsupportedAppUsage void reboot(boolean confirm, String reason, boolean wait); void rebootSafeMode(boolean confirm, boolean wait); + void rebootCustom(boolean confirm, String reason, boolean wait); void shutdown(boolean confirm, String reason, boolean wait); void crash(String message); int getLastShutdownReason(); diff --git a/core/java/android/os/ParcelFileDescriptor.java b/core/java/android/os/ParcelFileDescriptor.java index 810bd636de07..9cf909087286 100644 --- a/core/java/android/os/ParcelFileDescriptor.java +++ b/core/java/android/os/ParcelFileDescriptor.java @@ -203,7 +203,11 @@ public ParcelFileDescriptor(FileDescriptor fd, FileDescriptor commChannel) { IoUtils.setFdOwner(mCommFd, this); } - mGuard.open("close"); + try { + mGuard.open("close"); + } catch(Throwable e) { + Log.w("ParcelFileDescriptor", "Explicit termination method 'close' not called"); + } } /** diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java index 13ca2c34b27e..4232f4b7482f 100644 --- a/core/java/android/os/PowerManager.java +++ b/core/java/android/os/PowerManager.java @@ -779,6 +779,18 @@ public int hashCode() { */ public static final String REBOOT_RECOVERY = "recovery"; + /** + * The value to pass as the 'reason' argument to reboot() to + * reboot into bootloader mode + *

+ * Requires the {@link android.Manifest.permission#RECOVERY} + * permission (in addition to + * {@link android.Manifest.permission#REBOOT}). + *

+ * @hide + */ + public static final String REBOOT_BOOTLOADER = "bootloader"; + /** * The value to pass as the 'reason' argument to reboot() to reboot into * recovery mode for applying system updates. @@ -791,6 +803,13 @@ public int hashCode() { */ public static final String REBOOT_RECOVERY_UPDATE = "recovery-update"; + /** + * The value to pass as the 'reason' argument to reboot() to + * reboot into fastboot mode + * @hide + */ + public static final String REBOOT_FASTBOOT = "fastboot"; + /** * The value to pass as the 'reason' argument to reboot() when device owner requests a reboot on * the device. @@ -1798,6 +1817,24 @@ public void rebootSafeMode() { } } + /** + * Reboot the device with custom progress meassges. + * Will not return if the reboot is successful. + *

+ * Requires the {@link android.Manifest.permission#REBOOT} permission. + *

+ * + * @param reason code to pass to the kernel (e.g., "recovery") to + * request special boot modes, or null. + * @hide + */ + public void rebootCustom(String reason) { + try { + mService.rebootCustom(false, reason, true); + } catch (RemoteException e) { + } + } + /** * Returns true if the device is currently in power save mode. When in this mode, * applications should reduce their functionality in order to conserve battery as diff --git a/core/java/android/os/RecoverySystem.java b/core/java/android/os/RecoverySystem.java index a3b836adfc8b..9f1123803b63 100644 --- a/core/java/android/os/RecoverySystem.java +++ b/core/java/android/os/RecoverySystem.java @@ -672,6 +672,10 @@ public static void installPackage(Context context, File packageFile, boolean pro if (!rs.setupBcb(command)) { throw new IOException("Setup BCB failed"); } + Log.i(TAG, "Setting packageFile's read permission."); + if (!packageFile.setReadable(true, false)) { + Log.w(TAG, "Error making packageFile readable."); + } try { if (!rs.allocateSpaceForUpdate(packageFile)) { rs.clearBcb(); diff --git a/core/java/android/os/Trace.java b/core/java/android/os/Trace.java index ac2156e9e46e..580e632b8d96 100644 --- a/core/java/android/os/Trace.java +++ b/core/java/android/os/Trace.java @@ -160,6 +160,10 @@ private Trace() { @UnsupportedAppUsage @SystemApi(client = MODULE_LIBRARIES) public static boolean isTagEnabled(long traceTag) { + if (!Build.IS_DEBUGGABLE) { + return false; + } + long tags = nativeGetEnabledTags(); return (tags & traceTag) != 0; } diff --git a/core/java/android/os/UpdateEngine.java b/core/java/android/os/UpdateEngine.java index b7e3068a437c..16bb78e345ba 100644 --- a/core/java/android/os/UpdateEngine.java +++ b/core/java/android/os/UpdateEngine.java @@ -461,6 +461,17 @@ public void resetShouldSwitchSlotOnReboot() { } } + /** + * @hide + */ + public void setPerformanceMode(boolean enable) { + try { + mUpdateEngine.setPerformanceMode(enable); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + /** * Unbinds the last bound callback function. */ diff --git a/core/java/android/pocket/IPocketCallback.aidl b/core/java/android/pocket/IPocketCallback.aidl new file mode 100644 index 000000000000..53e5412f89be --- /dev/null +++ b/core/java/android/pocket/IPocketCallback.aidl @@ -0,0 +1,24 @@ +/** + * Copyright (C) 2016 The ParanoidAndroid Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.pocket; + +/** @hide */ +interface IPocketCallback { + + // notify when pocket state changes. + void onStateChanged(boolean isDeviceInPocket, int reason); + +} \ No newline at end of file diff --git a/core/java/android/pocket/IPocketService.aidl b/core/java/android/pocket/IPocketService.aidl new file mode 100644 index 000000000000..783465774207 --- /dev/null +++ b/core/java/android/pocket/IPocketService.aidl @@ -0,0 +1,43 @@ +/** + * Copyright (C) 2016 The ParanoidAndroid Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.pocket; + +import android.pocket.IPocketCallback; + +/** @hide */ +interface IPocketService { + + // add callback to get notified about pocket state. + void addCallback(IPocketCallback callback); + + // remove callback and stop getting notified about pocket state. + void removeCallback(IPocketCallback callback); + + // notify pocket service about intercative state changed. + // @see com.android.policy.PhoneWindowManager + void onInteractiveChanged(boolean interactive); + + // external processes can request changing listening state. + void setListeningExternal(boolean listen); + + // check if device is in pocket. + boolean isDeviceInPocket(); + + // Custom methods + void setPocketLockVisible(boolean visible); + boolean isPocketLockVisible(); + +} \ No newline at end of file diff --git a/core/java/android/pocket/PocketConstants.java b/core/java/android/pocket/PocketConstants.java new file mode 100644 index 000000000000..f0d08a272375 --- /dev/null +++ b/core/java/android/pocket/PocketConstants.java @@ -0,0 +1,25 @@ +package android.pocket; + +/** + * This class contains global pocket setup constants. + * @author Carlo Savignano + * @hide + */ + +public class PocketConstants { + + public static final boolean DEBUG = false; + public static final boolean DEBUG_SPEW = false; + + /** + * Whether to use proximity sensor to evaluate pocket state. + */ + public static final boolean ENABLE_PROXIMITY_JUDGE = true; + + /** + * Whether to use light sensor to evaluate pocket state. + */ + public static final boolean ENABLE_LIGHT_JUDGE = true; + + +} diff --git a/core/java/android/pocket/PocketManager.java b/core/java/android/pocket/PocketManager.java new file mode 100644 index 000000000000..22b60696289b --- /dev/null +++ b/core/java/android/pocket/PocketManager.java @@ -0,0 +1,233 @@ +/** + * Copyright (C) 2016 The ParanoidAndroid Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.pocket; + +import android.content.Context; +import android.os.Handler; +import android.os.PowerManager; +import android.os.RemoteException; +import android.os.SystemClock; +import android.text.format.DateUtils; +import android.util.Log; +import android.util.Slog; + +/** + * A class that coordinates listening for pocket state. + *

+ * Use {@link android.content.Context#getSystemService(java.lang.String)} + * with argument {@link android.content.Context#POCKET_SERVICE} to get + * an instance of this class. + * + * Usage: import and create a final {@link IPocketCallback.Stub()} and implement your logic in + * {@link IPocketCallback#onStateChanged(boolean, int)}. Then add your callback to the pocket manager + * + * // define a final callback + * private final IPocketCallback mCallback = new IPocketCallback.Stub() { + * + * @Override + * public void onStateChanged(boolean isDeviceInPocket, int reason) { + * // Your method to handle logic outside of this callback, ideally with a handler + * // posting on UI Thread for view hierarchy operations or with its own background thread. + * handlePocketStateChanged(isDeviceInPocket, reason); + * } + * + * } + * + * // add callback to pocket manager + * private void addCallback() { + * PocketManager manager = (PocketManager) context.getSystemService(Context.POCKET_SERVICE); + * manager.addCallback(mCallback); + * } + * + * @author Carlo Savignano + * @hide + */ +public class PocketManager { + + private static final String TAG = PocketManager.class.getSimpleName(); + static final boolean DEBUG = false; + + /** + * Whether {@link IPocketCallback#onStateChanged(boolean, int)} + * was fired because of the sensor. + * @see PocketService#handleDispatchCallbacks() + */ + public static final int REASON_SENSOR = 0; + + /** + * Whether {@link IPocketCallback#onStateChanged(boolean, int)} + * was fired because of an error while accessing service. + * @see #addCallback(IPocketCallback) + * @see #removeCallback(IPocketCallback) + */ + public static final int REASON_ERROR = 1; + + /** + * Whether {@link IPocketCallback#onStateChanged(boolean, int)} + * was fired because of a needed reset. + * @see PocketService#binderDied() + */ + public static final int REASON_RESET = 2; + + private Context mContext; + private IPocketService mService; + private PowerManager mPowerManager; + private Handler mHandler; + private boolean mPocketViewTimerActive; + + public PocketManager(Context context, IPocketService service) { + mContext = context; + mService = service; + if (mService == null) { + Slog.v(TAG, "PocketService was null"); + } + mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); + mHandler = new Handler(); + } + + /** + * Add pocket state callback. + * @see PocketService#handleRemoveCallback(IPocketCallback) + */ + public void addCallback(final IPocketCallback callback) { + if (mService != null) try { + mService.addCallback(callback); + } catch (RemoteException e1) { + Log.w(TAG, "Remote exception in addCallback: ", e1); + if (callback != null){ + try { + callback.onStateChanged(false, REASON_ERROR); + } catch (RemoteException e2) { + Log.w(TAG, "Remote exception in callback.onPocketStateChanged: ", e2); + } + } + } + } + + /** + * Remove pocket state callback. + * @see PocketService#handleAddCallback(IPocketCallback) + */ + public void removeCallback(final IPocketCallback callback) { + if (mService != null) try { + mService.removeCallback(callback); + } catch (RemoteException e1) { + Log.w(TAG, "Remote exception in removeCallback: ", e1); + if (callback != null){ + try { + callback.onStateChanged(false, REASON_ERROR); + } catch (RemoteException e2) { + Log.w(TAG, "Remote exception in callback.onPocketStateChanged: ", e2); + } + } + } + } + + /** + * Notify service about device interactive state changed. + * {@link PhoneWindowManager#startedWakingUp()} + * {@link PhoneWindowManager#startedGoingToSleep(int)} + */ + public void onInteractiveChanged(boolean interactive) { + boolean isPocketViewShowing = (interactive && isDeviceInPocket()); + synchronized (mPocketLockTimeout) { + if (mPocketViewTimerActive != isPocketViewShowing) { + if (isPocketViewShowing) { + if (DEBUG) Log.v(TAG, "Setting pocket timer"); + mHandler.removeCallbacks(mPocketLockTimeout); // remove any pending requests + mHandler.postDelayed(mPocketLockTimeout, 3 * DateUtils.SECOND_IN_MILLIS); + mPocketViewTimerActive = true; + } else { + if (DEBUG) Log.v(TAG, "Clearing pocket timer"); + mHandler.removeCallbacks(mPocketLockTimeout); + mPocketViewTimerActive = false; + } + } + } + if (mService != null) try { + mService.onInteractiveChanged(interactive); + } catch (RemoteException e) { + Log.w(TAG, "Remote exception in addCallback: ", e); + } + } + + /** + * Request listening state change by, but not limited to, external process. + * @see PocketService#handleSetListeningExternal(boolean) + */ + public void setListeningExternal(boolean listen) { + if (mService != null) try { + mService.setListeningExternal(listen); + } catch (RemoteException e) { + Log.w(TAG, "Remote exception in setListeningExternal: ", e); + } + // Clear timeout when user hides pocket lock with long press power. + if (mPocketViewTimerActive && !listen) { + if (DEBUG) Log.v(TAG, "Clearing pocket timer due to override"); + mHandler.removeCallbacks(mPocketLockTimeout); + mPocketViewTimerActive = false; + } + } + + /** + * Return whether device is in pocket. + * @see PocketService#isDeviceInPocket() + * @return + */ + public boolean isDeviceInPocket() { + if (mService != null) try { + return mService.isDeviceInPocket(); + } catch (RemoteException e) { + Log.w(TAG, "Remote exception in isDeviceInPocket: ", e); + } + return false; + } + + class PocketLockTimeout implements Runnable { + @Override + public void run() { + mPowerManager.goToSleep(SystemClock.uptimeMillis()); + mPocketViewTimerActive = false; + } + } + + /** Custom methods **/ + + public void setPocketLockVisible(boolean visible) { + if (!visible){ + if (DEBUG) Log.v(TAG, "Clearing pocket timer"); + mHandler.removeCallbacks(mPocketLockTimeout); + mPocketViewTimerActive = false; + } + if (mService != null) try { + mService.setPocketLockVisible(visible); + } catch (RemoteException e) { + Log.w(TAG, "Remote exception in setPocketLockVisible: ", e); + } + } + + public boolean isPocketLockVisible() { + if (mService != null) try { + return mService.isPocketLockVisible(); + } catch (RemoteException e) { + Log.w(TAG, "Remote exception in isPocketLockVisible: ", e); + } + return false; + } + + private PocketLockTimeout mPocketLockTimeout = new PocketLockTimeout(); + +} diff --git a/core/java/android/preference/SeekBarVolumizer.java b/core/java/android/preference/SeekBarVolumizer.java index 0a6a405fbce6..23ce001ac7d4 100644 --- a/core/java/android/preference/SeekBarVolumizer.java +++ b/core/java/android/preference/SeekBarVolumizer.java @@ -113,6 +113,7 @@ public void onAudioVolumeGroupChanged(int group, int flags) { @UnsupportedAppUsage private final int mStreamType; private final int mMaxStreamVolume; + private final boolean mVoiceCapable; private boolean mAffectedByRingerMode; private boolean mNotificationOrRing; private final Receiver mReceiver = new Receiver(); @@ -206,6 +207,8 @@ public SeekBarVolumizer( } } mDefaultUri = defaultUri; + mVoiceCapable = context.getResources().getBoolean( + com.android.internal.R.bool.config_voice_capable); } private boolean hasAudioProductStrategies() { @@ -254,6 +257,11 @@ private static boolean isMediaStream(int stream) { return stream == AudioManager.STREAM_MUSIC; } + private boolean isNotificationStreamLinked() { + return mVoiceCapable && Settings.Secure.getInt(mContext.getContentResolver(), + Settings.Secure.VOLUME_LINK_NOTIFICATION, 1) == 1; + } + public void setSeekBar(SeekBar seekBar) { if (mSeekBar != null) { mSeekBar.setOnSeekBarChangeListener(null); @@ -281,13 +289,19 @@ protected void updateSeekBar() { mSeekBar.setProgress(mLastAudibleStreamVolume, true); } else if (mNotificationOrRing && mRingerMode == AudioManager.RINGER_MODE_VIBRATE) { mSeekBar.setProgress(0, true); + mSeekBar.setEnabled(isSeekBarEnabled()); } else if (mMuted) { mSeekBar.setProgress(0, true); } else { + mSeekBar.setEnabled(isSeekBarEnabled()); mSeekBar.setProgress(mLastProgress > -1 ? mLastProgress : mOriginalStreamVolume, true); } } + private boolean isSeekBarEnabled() { + return !(mStreamType == AudioManager.STREAM_NOTIFICATION && isNotificationStreamLinked()); + } + @Override public boolean handleMessage(Message msg) { switch (msg.what) { @@ -434,7 +448,7 @@ public void revertVolume() { } public void onProgressChanged(SeekBar seekBar, int progress, boolean fromTouch) { - if (fromTouch) { + if (fromTouch && isSeekBarEnabled()) { postSetVolume(progress); } if (mCallback != null) { @@ -541,7 +555,8 @@ public void handleMessage(Message msg) { } public void postUpdateSlider(int volume, int lastAudibleVolume, boolean mute) { - obtainMessage(UPDATE_SLIDER, volume, lastAudibleVolume, new Boolean(mute)).sendToTarget(); + obtainMessage(UPDATE_SLIDER, volume, lastAudibleVolume, Boolean.valueOf(mute)) + .sendToTarget(); } } @@ -631,7 +646,8 @@ public void onReceive(Context context, Intent intent) { } private void updateVolumeSlider(int streamType, int streamValue) { - final boolean streamMatch = mNotificationOrRing ? isNotificationOrRing(streamType) + final boolean streamMatch = mNotificationOrRing && isNotificationStreamLinked() + ? isNotificationOrRing(streamType) : (streamType == mStreamType); if (mSeekBar != null && streamMatch && streamValue != -1) { final boolean muted = mAudioManager.isStreamMute(mStreamType) diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 805fdc44b256..2d9ae1bba45d 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -3615,6 +3615,8 @@ public static final class System extends NameValueTable { // At one time in System, then Global, but now back in Secure MOVED_TO_SECURE.add(Secure.INSTALL_NON_MARKET_APPS); + + MOVED_TO_SECURE.add(Secure.VOLUME_LINK_NOTIFICATION); } @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @@ -5090,6 +5092,12 @@ public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean @Readable public static final String DATE_FORMAT = "date_format"; + /** + * Defines the screen-off animation to display + * @hide + */ + public static final String SCREEN_OFF_ANIMATION = "screen_off_animation"; + /** * Whether the setup wizard has been run before (on first boot), or if * it still needs to be run. @@ -5178,315 +5186,1193 @@ public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean * vibrations for incoming calls. User settings are applied automatically by the service and * should not be applied by individual apps. */ - @Deprecated - @Readable - public static final String VIBRATE_WHEN_RINGING = "vibrate_when_ringing"; + @Deprecated + @Readable + public static final String VIBRATE_WHEN_RINGING = "vibrate_when_ringing"; + + /** + * When {@code 1}, Telecom enhanced call blocking functionality is enabled. When + * {@code 0}, enhanced call blocking functionality is disabled. + * @hide + */ + @Readable + public static final String DEBUG_ENABLE_ENHANCED_CALL_BLOCKING = + "debug.enable_enhanced_calling"; + + /** + * Whether the audible DTMF tones are played by the dialer when dialing. The value is + * boolean (1 or 0). + */ + @Readable + public static final String DTMF_TONE_WHEN_DIALING = "dtmf_tone"; + + /** + * CDMA only settings + * DTMF tone type played by the dialer when dialing. + * 0 = Normal + * 1 = Long + */ + @Readable + public static final String DTMF_TONE_TYPE_WHEN_DIALING = "dtmf_tone_type"; + + /** + * Whether the hearing aid is enabled. The value is + * boolean (1 or 0). + * @hide + */ + @UnsupportedAppUsage + @Readable + public static final String HEARING_AID = "hearing_aid"; + + /** + * CDMA only settings + * TTY Mode + * 0 = OFF + * 1 = FULL + * 2 = VCO + * 3 = HCO + * @hide + */ + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) + @Readable + public static final String TTY_MODE = "tty_mode"; + + /** + * Whether the sounds effects (key clicks, lid open ...) are enabled. The value is + * boolean (1 or 0). + */ + @Readable + public static final String SOUND_EFFECTS_ENABLED = "sound_effects_enabled"; + + /** + * Whether haptic feedback (Vibrate on tap) is enabled. The value is + * boolean (1 or 0). + * + * @deprecated Replaced by using {@link android.os.VibrationAttributes#USAGE_TOUCH} on + * vibrations. User settings are applied automatically by the service and should not be + * applied by individual apps. + */ + @Deprecated + @Readable + public static final String HAPTIC_FEEDBACK_ENABLED = "haptic_feedback_enabled"; + + /** + * @deprecated Each application that shows web suggestions should have its own + * setting for this. + */ + @Deprecated + @Readable + public static final String SHOW_WEB_SUGGESTIONS = "show_web_suggestions"; + + /** + * Whether the notification LED should repeatedly flash when a notification is + * pending. The value is boolean (1 or 0). + * @hide + */ + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) + @Readable + public static final String NOTIFICATION_LIGHT_PULSE = "notification_light_pulse"; + + /** + * Show pointer location on screen? + * 0 = no + * 1 = yes + * @hide + */ + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) + @Readable + public static final String POINTER_LOCATION = "pointer_location"; + + /** + * Show touch positions on screen? + * 0 = no + * 1 = yes + * @hide + */ + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) + @Readable + public static final String SHOW_TOUCHES = "show_touches"; + + /** + * Log raw orientation data from + * {@link com.android.server.policy.WindowOrientationListener} for use with the + * orientationplot.py tool. + * 0 = no + * 1 = yes + * @hide + */ + @Readable + public static final String WINDOW_ORIENTATION_LISTENER_LOG = + "window_orientation_listener_log"; + + /** + * @deprecated Use {@link android.provider.Settings.Global#POWER_SOUNDS_ENABLED} + * instead + * @hide + */ + @Deprecated + public static final String POWER_SOUNDS_ENABLED = Global.POWER_SOUNDS_ENABLED; + + /** + * @deprecated Use {@link android.provider.Settings.Global#DOCK_SOUNDS_ENABLED} + * instead + * @hide + */ + @Deprecated + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) + public static final String DOCK_SOUNDS_ENABLED = Global.DOCK_SOUNDS_ENABLED; + + /** + * Whether to play sounds when the keyguard is shown and dismissed. + * @hide + */ + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) + @Readable + public static final String LOCKSCREEN_SOUNDS_ENABLED = "lockscreen_sounds_enabled"; + + /** + * Whether the lockscreen should be completely disabled. + * @hide + */ + @Readable + public static final String LOCKSCREEN_DISABLED = "lockscreen.disabled"; + + /** + * @deprecated Use {@link android.provider.Settings.Global#LOW_BATTERY_SOUND} + * instead + * @hide + */ + @Deprecated + public static final String LOW_BATTERY_SOUND = Global.LOW_BATTERY_SOUND; + + /** + * @deprecated Use {@link android.provider.Settings.Global#DESK_DOCK_SOUND} + * instead + * @hide + */ + @Deprecated + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) + public static final String DESK_DOCK_SOUND = Global.DESK_DOCK_SOUND; + + /** + * @deprecated Use {@link android.provider.Settings.Global#DESK_UNDOCK_SOUND} + * instead + * @hide + */ + @Deprecated + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) + public static final String DESK_UNDOCK_SOUND = Global.DESK_UNDOCK_SOUND; + + /** + * @deprecated Use {@link android.provider.Settings.Global#CAR_DOCK_SOUND} + * instead + * @hide + */ + @Deprecated + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) + public static final String CAR_DOCK_SOUND = Global.CAR_DOCK_SOUND; + + /** + * @deprecated Use {@link android.provider.Settings.Global#CAR_UNDOCK_SOUND} + * instead + * @hide + */ + @Deprecated + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) + public static final String CAR_UNDOCK_SOUND = Global.CAR_UNDOCK_SOUND; + + /** + * @deprecated Use {@link android.provider.Settings.Global#LOCK_SOUND} + * instead + * @hide + */ + @Deprecated + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) + public static final String LOCK_SOUND = Global.LOCK_SOUND; + + /** + * @deprecated Use {@link android.provider.Settings.Global#UNLOCK_SOUND} + * instead + * @hide + */ + @Deprecated + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) + public static final String UNLOCK_SOUND = Global.UNLOCK_SOUND; + + /** + * Receive incoming SIP calls? + * 0 = no + * 1 = yes + * @hide + */ + @Readable + public static final String SIP_RECEIVE_CALLS = "sip_receive_calls"; + + /** + * Call Preference String. + * "SIP_ALWAYS" : Always use SIP with network access + * "SIP_ADDRESS_ONLY" : Only if destination is a SIP address + * @hide + */ + @Readable + public static final String SIP_CALL_OPTIONS = "sip_call_options"; + + /** + * One of the sip call options: Always use SIP with network access. + * @hide + */ + @Readable + public static final String SIP_ALWAYS = "SIP_ALWAYS"; + + /** + * One of the sip call options: Only if destination is a SIP address. + * @hide + */ + @Readable + public static final String SIP_ADDRESS_ONLY = "SIP_ADDRESS_ONLY"; + + /** + * @deprecated Use SIP_ALWAYS or SIP_ADDRESS_ONLY instead. Formerly used to indicate that + * the user should be prompted each time a call is made whether it should be placed using + * SIP. The {@link com.android.providers.settings.DatabaseHelper} replaces this with + * SIP_ADDRESS_ONLY. + * @hide + */ + @Deprecated + @Readable + public static final String SIP_ASK_ME_EACH_TIME = "SIP_ASK_ME_EACH_TIME"; + + /** + * Pointer speed setting. + * This is an integer value in a range between -7 and +7, so there are 15 possible values. + * -7 = slowest + * 0 = default speed + * +7 = fastest + * @hide + */ + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) + @Readable + public static final String POINTER_SPEED = "pointer_speed"; + + /** + * Whether lock-to-app will be triggered by long-press on recents. + * @hide + */ + @Readable + public static final String LOCK_TO_APP_ENABLED = "lock_to_app_enabled"; + + /** + * I am the lolrus. + *

+ * Nonzero values indicate that the user has a bukkit. + * Backward-compatible with PrefGetPreference(prefAllowEasterEggs). + * @hide + */ + @Readable + public static final String EGG_MODE = "egg_mode"; + + /** + * Setting to determine whether or not to show the battery percentage in the status bar. + * 0 - Don't show percentage + * 1 - Show percentage + * @hide + */ + @Readable + public static final String SHOW_BATTERY_PERCENT = "dummy_show_battery_percent"; + + /** + * Whether or not to enable multiple audio focus. + * When enabled, requires more management by user over application playback activity, + * for instance pausing media apps when another starts. + * @hide + */ + @Readable + public static final String MULTI_AUDIO_FOCUS_ENABLED = "multi_audio_focus_enabled"; + + /** + * @hide + * Whether the proximity sensor will adjust call to speaker + */ + public static final String PROXIMITY_AUTO_SPEAKER = "proximity_auto_speaker"; + + /** + * @hide + * Time delay to activate speaker after proximity sensor triggered + */ + public static final String PROXIMITY_AUTO_SPEAKER_DELAY = "proximity_auto_speaker_delay"; + + /** + * @hide + * Whether the proximity sensor will adjust call to speaker, + * only while in call (not while ringing on outgoing call) + */ + public static final String PROXIMITY_AUTO_SPEAKER_INCALL_ONLY = "proximity_auto_speaker_incall_only"; + + /** + * @hide + * Whether the use proximity sensor for answering incoming ring + */ + public static final String PROXIMITY_AUTO_ANSWER_INCALL_ONLY = "proximity_auto_answer_incall_only"; + + /** + * @hide + * Time delay to activate auto answer on ring when headset is plugged + */ + public static final String AUTO_ANSWER_DELAY = "auto_answer_delay"; + + /** + * @hide + * Whether to enable auto answer on ring when headset is plugged + */ + public static final String AUTO_ANSWER_CALL_KEY = "auto_answer_call_key"; + + /** + * @hide + */ + public static final String DEVICE_FEATURE_SETTINGS = "device_feature_settings"; + + /** + * @hide + */ + public static final String BUTTON_EXTRA_KEY_MAPPING = "button_extra_keymapping"; + + /** + * Whether allowing pocket service to register sensors and dispatch informations. + * 0 = disabled + * 1 = enabled + * @author Carlo Savignano + * @hide + */ + public static final String POCKET_JUDGE = "pocket_judge"; + + /** + * Swipe to screenshot + * @hide + */ + public static final String SWIPE_TO_SCREENSHOT = "swipe_to_screenshot"; + + /** + * Volume keys control cursor in text fields (default is 0) + * 0 - Disabled + * 1 - Volume up/down moves cursor left/right + * 2 - Volume up/down moves cursor right/left + * @hide + */ + public static final String VOLUME_KEY_CURSOR_CONTROL = "volume_key_cursor_control"; + + /** + * Whether the torch launch gesture to double tap or long press the power button when the + * screen is off should be enabled. * + * 0: disabled + * 1: double tap power for torch + * 2: long tap power for torch + * @hide + */ + @Readable + public static final String TORCH_POWER_BUTTON_GESTURE = "torch_power_button_gesture"; + + /** + * Whether to show the battery info on the lockscreen while charging + * @hide + */ + @Readable + public static final String LOCKSCREEN_BATTERY_INFO = "lockscreen_battery_info"; + + /** + * Whether the phone vibrates on call connect + * @hide + */ + @Readable + public static final String VIBRATE_ON_CONNECT = "vibrate_on_connect"; + + /** + * Whether the phone vibrates on call waiting + * @hide + */ + @Readable + public static final String VIBRATE_ON_CALLWAITING = "vibrate_on_callwaiting"; + + /** + * Whether the phone vibrates on disconnect + * @hide + */ + @Readable + public static final String VIBRATE_ON_DISCONNECT = "vibrate_on_disconnect"; + + /** + * Volume rocker wake + * @hide + */ + @Readable + public static final String VOLUME_ROCKER_WAKE = "volume_rocker_wake"; + + /** + * @hide + */ + @Readable + public static final String VOLUME_BUTTON_MUSIC_CONTROL = "volume_button_music_control"; + + /** + * Enable/Disable screenshot sound + * @hide + */ + @Readable + public static final String SCREENSHOT_SOUND = "screenshot_sound"; + + /** + * Whether to scramble a pin unlock layout + * @hide + */ + public static final String LOCKSCREEN_PIN_SCRAMBLE_LAYOUT = + "lockscreen_scramble_pin_layout"; + + /** + * Whether to use the custom quick unlock screen control + * @hide + */ + public static final String LOCKSCREEN_QUICK_UNLOCK_CONTROL = + "lockscreen_quick_unlock_control"; + + /** + * Wheter to show network traffic indicator in statusbar + * @hide + */ + public static final String NETWORK_TRAFFIC_STATE = "network_traffic_state"; + + /** + * Network traffic inactivity threshold + * @hide + */ + public static final String NETWORK_TRAFFIC_AUTOHIDE_THRESHOLD = "network_traffic_autohide_threshold"; + + /** + * Whether to show VoLTE icon or not + * @hide + */ + public static final String SHOW_VOLTE_ICON = "show_volte_icon"; + + /** + * VoLTE icon style + * @hide + */ + public static final String VOLTE_ICON_STYLE = "volte_icon_style"; + + /** + * Whether to show VoWiFi icon or not + * @hide + */ + public static final String VOWIFI_ICON = "vowifi_icon"; + + /** + * VoWiFi icon style + * @hide + */ + public static final String VOWIFI_ICON_STYLE = "vowifi_icon_style"; + + /** + * @hide + */ + public static final String GLOBAL_ACTIONS_LIST = "global_actions_list"; + + /** + * Whether to display airplane in the power menu + * + * @hide + */ + public static final String GLOBAL_ACTIONS_AIRPLANE = "global_actions_airplane"; + + /** + * Whether to display the flashlight option in the power menu + * + * @hide + */ + public static final String GLOBAL_ACTIONS_EMERGENCY = "global_actions_emergency"; + + /** + * Whether to display the flashlight option in the power menu + * + * @hide + */ + public static final String GLOBAL_ACTIONS_FLASHLIGHT = "global_actions_flashlight"; + + /** + * Whether to display lock in the power menu + * + * @hide + */ + public static final String GLOBAL_ACTIONS_LOCKDOWN = "global_actions_lockdown"; + + /** + * Whether to display sound panel in the power menu + * + * @hide + */ + public static final String GLOBAL_ACTIONS_SOUNDPANEL = "global_actions_soundpanel"; + + /** + * Whether to display screenshot in the power menu + * + * @hide + */ + public static final String GLOBAL_ACTIONS_SCREENSHOT = "global_actions_screenshot"; + + /** + * Whether to display screenrecord in the power menu + * + * @hide + */ + public static final String GLOBAL_ACTIONS_SCREENRECORD = "global_actions_screenrecord"; + + /** + * Whether to display settings in the power menu + * + * @hide + */ + public static final String GLOBAL_ACTIONS_SETTINGS = "global_actions_settings"; + + /** + * Whether to display the users option in the power menu + * + * @hide + */ + public static final String GLOBAL_ACTIONS_USERS = "global_actions_users"; + + /** + * How many action item columns to show before moving to overflow + * + * @hide + */ + public static final String GLOBAL_ACTIONS_MAX_COLUMNS = "global_actions_max_columns"; + + /** + * How many action item rows to show before moving to overflow + * + * @hide + */ + public static final String GLOBAL_ACTIONS_MAX_ROWS = "global_actions_max_rows"; + + /** + * Whether to allow one finger quick settings expansion on the side of the statusbar. + * 0 = 0ff, 1 = right, 2 = left, 3 = both + * @hide + */ + public static final String STATUS_BAR_QUICK_QS_PULLDOWN = "qs_quick_pulldown"; + + /** + * Enable statusbar double tap gesture to put device to sleep + * @hide + */ + public static final String DOUBLE_TAP_SLEEP_GESTURE = "double_tap_sleep_gesture"; + + /** + * Double tap on lockscreen to sleep + * @hide + */ + public static final String DOUBLE_TAP_SLEEP_LOCKSCREEN = "double_tap_sleep_lockscreen"; + + /** + * Use doubletap as doze pulse triggers + * @hide + */ + public static final String DOZE_TRIGGER_DOUBLETAP = "doze_trigger_doubletap"; + + /** @hide */ + public static final String BACK_GESTURE_HAPTIC = "back_gesture_haptic"; + + /** @hide */ + public static final String BACK_GESTURE_HEIGHT = "back_gesture_height"; + + /** + * Gestures nav: left long back swipe action + * @hide + */ + public static final String LEFT_LONG_BACK_SWIPE_ACTION = "left_long_back_swipe_action"; + + /** + * Gestures nav: left long back swipe app action + * @hide + */ + public static final String LEFT_LONG_BACK_SWIPE_APP_ACTION = "left_long_back_swipe_app_action"; + + /** + * Display friendly name of custom application launched when + * using the long left back swipe app action + * @hide + */ + public static final String LEFT_LONG_BACK_SWIPE_APP_FR_ACTION = "left_long_back_swipe_app_fr_action"; + + /** + * Launch custom activity when using the long left back swipe app action + * + * @hide + */ + public static final String LEFT_LONG_BACK_SWIPE_APP_ACTIVITY_ACTION = "left_long_back_swipe_app_activity_action"; + + /** + * Gestures nav: right long back swipe action + * @hide + */ + public static final String RIGHT_LONG_BACK_SWIPE_ACTION = "right_long_back_swipe_action"; + + /** + * Gestures nav: right long back swipe app action + * @hide + */ + public static final String RIGHT_LONG_BACK_SWIPE_APP_ACTION = "right_long_back_swipe_app_action"; + + /** + * Display friendly name of custom application launched when + * using the long right back swipe app action + * @hide + */ + public static final String RIGHT_LONG_BACK_SWIPE_APP_FR_ACTION = "right_long_back_swipe_app_fr_action"; + + /** + * Launch custom activity when using the long right back swipe app action + * + * @hide + */ + public static final String RIGHT_LONG_BACK_SWIPE_APP_ACTIVITY_ACTION = "right_long_back_swipe_app_activity_action"; + + /** + * Gestures nav: long back swipe timeout + * @hide + */ + public static final String LONG_BACK_SWIPE_TIMEOUT = "long_back_swipe_timeout"; + + /** + * Gestures nav: whether to use extended swipe instead of timeout to trigger custom actions + * @hide + */ + public static final String BACK_SWIPE_EXTENDED = "back_swipe_extended"; + + /** + * Gestures nav: left long back swipe action + * @hide + */ + public static final String LEFT_VERTICAL_BACK_SWIPE_ACTION = "left_vertical_back_swipe_action"; + + /** + * Gestures nav: left long back swipe app action + * @hide + */ + public static final String LEFT_VERTICAL_BACK_SWIPE_APP_ACTION = "left_vertical_back_swipe_app_action"; + + /** + * Display friendly name of custom application launched when + * using the long left back swipe app action + * @hide + */ + public static final String LEFT_VERTICAL_BACK_SWIPE_APP_FR_ACTION = "left_vertical_back_swipe_app_fr_action"; + + /** + * Launch custom activity when using the long left back swipe app action + * + * @hide + */ + public static final String LEFT_VERTICAL_BACK_SWIPE_APP_ACTIVITY_ACTION = "left_vertical_back_swipe_app_activity_action"; + + /** + * Gestures nav: right long back swipe action + * @hide + */ + public static final String RIGHT_VERTICAL_BACK_SWIPE_ACTION = "right_vertical_back_swipe_action"; + + /** + * Gestures nav: right long back swipe app action + * @hide + */ + public static final String RIGHT_VERTICAL_BACK_SWIPE_APP_ACTION = "right_vertical_back_swipe_app_action"; + + /** + * Display friendly name of custom application launched when + * using the long right back swipe app action + * @hide + */ + public static final String RIGHT_VERTICAL_BACK_SWIPE_APP_FR_ACTION = "right_vertical_back_swipe_app_fr_action"; + + /** + * Launch custom activity when using the long right back swipe app action + * + * @hide + */ + public static final String RIGHT_VERTICAL_BACK_SWIPE_APP_ACTIVITY_ACTION = "right_vertical_back_swipe_app_activity_action"; + + /** + * Disable hw buttons - actions, brightness, haptic feedback, overflow menu + * @hide + */ + public static final String HARDWARE_KEYS_DISABLE = "hardware_keys_disable"; + + /** + * Whether to show the clock in the right or left position or show it in the center + * 0: show the clock in the right position (LTR) + * 1: show the clock in the center + * 2: show the clock in the left position (LTR) + * default: 0 + * @hide + */ + public static final String STATUS_BAR_CLOCK = "status_bar_clock"; + + /** + * Display style of AM/PM next to clock in status bar + * 0: Normal display (Eclair stock) + * 1: Small display (Froyo stock) + * 2: No display (Gingerbread/ICS stock) + * default: 2 + * @hide + */ + public static final String STATUS_BAR_AM_PM = "status_bar_am_pm"; + + /** + * Whether to show seconds next to clock in status bar + * 0 - hide (default) + * 1 - show + * @hide + */ + public static final String STATUS_BAR_CLOCK_SECONDS = "status_bar_clock_seconds"; + + /** + * Shows custom date before clock time + * 0 - No Date + * 1 - Small Date + * 2 - Normal Date + * @hide + */ + public static final String STATUS_BAR_CLOCK_DATE_DISPLAY = "status_bar_clock_date_display"; + + /** + * Sets the date string style + * 0 - Regular style + * 1 - Lowercase + * 2 - Uppercase + * @hide + */ + public static final String STATUS_BAR_CLOCK_DATE_STYLE = "status_bar_clock_date_style"; + + /** + * Position of date + * 0 - Left of clock + * 1 - Right of clock + * @hide + */ + public static final String STATUS_BAR_CLOCK_DATE_POSITION = "status_bar_clock_date_position"; + + /** + * Stores the java DateFormat string for the date + * @hide + */ + public static final String STATUS_BAR_CLOCK_DATE_FORMAT = "status_bar_clock_date_format"; + + /** + * Battery style + * @hide + */ + public static final String STATUS_BAR_BATTERY_STYLE = "status_bar_battery_style"; + + /** + * Statusbar Battery % + * 0: Hide the battery percentage + * 1: Display the battery percentage inside the icon + * 2: Display the battery percentage next to Icon + * @hide + */ + public static final String STATUS_BAR_SHOW_BATTERY_PERCENT = "status_bar_show_battery_percent"; + + /** + * Show battery percentage when charging + * @hide + */ + public static final String STATUS_BAR_BATTERY_TEXT_CHARGING = "status_bar_battery_text_charging"; + + /** + * QS battery style + * @hide + */ + public static final String QS_BATTERY_STYLE = "qs_battery_style"; + + /** + * QS battery location + * 0: QS Panel + * 1: Quick Statusbar + * @hide + */ + public static final String QS_BATTERY_LOCATION = "qs_battery_location"; + + /** + * QS battery % + * 0: Hide the battery percentage + * 1: Display the battery percentage inside the icon + * 2: Display the battery percentage next to the icon + * @hide + */ + public static final String QS_SHOW_BATTERY_PERCENT = "qs_show_battery_percent"; + + /** + * QS battery estimate + * 0: Hide the battery estimate + * 1: Display the battery estimate + * @hide + */ + public static final String QS_SHOW_BATTERY_ESTIMATE = "qs_show_battery_estimate"; + + /** + * Whether the battery light should be enabled (if hardware supports it) + * The value is boolean (1 or 0). + * @hide + */ + public static final String BATTERY_LIGHT_ENABLED = "battery_light_enabled"; + + /** + * Whether the full battery light should be enabled + * The value is boolean (1 or 0). + * @hide + */ + public static final String BATTERY_FULL_LIGHT_ENABLED = "battery_full_light_enabled"; + + /** + * Whether to show battery light when DND mode is active + * @hide + */ + public static final String BATTERY_LIGHT_ALLOW_ON_DND = "battery_light_allow_on_dnd"; + + /** + * Whether to show blinking light when battery is low + * @hide + */ + public static final String BATTERY_LIGHT_LOW_BLINKING = "battery_light_low_blinking"; + + /** + * Low battery charging color + * @hide + */ + public static final String BATTERY_LIGHT_LOW_COLOR = "battery_light_low_color"; + + /** + * Medium battery charging color + * @hide + */ + public static final String BATTERY_LIGHT_MEDIUM_COLOR = "battery_light_medium_color"; + + /** + * Full battery charging color + * @hide + */ + public static final String BATTERY_LIGHT_FULL_COLOR = "battery_light_full_color"; + + /** + * Really full 100 battery charging color + * @hide + */ + public static final String BATTERY_LIGHT_REALLYFULL_COLOR = "battery_light_reallyfull_color"; + + /** + * Color temperature of the display during the day + * @hide + */ + public static final String DISPLAY_TEMPERATURE_DAY = "display_temperature_day"; + + /** + * @hide + * Color temperature of the display at night + * @hide + */ + public static final String DISPLAY_TEMPERATURE_NIGHT = "display_temperature_night"; + + /** + * @hide + * Display color temperature adjustment mode, one of DAY (default), NIGHT, or AUTO. + * @hide + */ + public static final String DISPLAY_TEMPERATURE_MODE = "display_temperature_mode"; + + /** + * @hide + * Automatic outdoor mode + * 0 = 0ff, 1 = on + * @hide + */ + public static final String DISPLAY_AUTO_OUTDOOR_MODE = "display_auto_outdoor_mode"; + + /** + * @hide + * Anti flicker + * 0 = 0ff, 1 = on + */ + public static final String DISPLAY_ANTI_FLICKER = "display_anti_flicker"; /** - * When {@code 1}, Telecom enhanced call blocking functionality is enabled. When - * {@code 0}, enhanced call blocking functionality is disabled. + * @hide + * Reader mode + * 0 = 0ff, 1 = on * @hide */ - @Readable - public static final String DEBUG_ENABLE_ENHANCED_CALL_BLOCKING = - "debug.enable_enhanced_calling"; + public static final String DISPLAY_READING_MODE = "display_reading_mode"; /** - * Whether the audible DTMF tones are played by the dialer when dialing. The value is - * boolean (1 or 0). + * @hide + * Use display power saving features such as CABC or CABL + * 0 = 0ff, 1 = on + * @hide */ - @Readable - public static final String DTMF_TONE_WHEN_DIALING = "dtmf_tone"; + public static final String DISPLAY_CABC = "display_low_power"; /** - * CDMA only settings - * DTMF tone type played by the dialer when dialing. - * 0 = Normal - * 1 = Long + * @hide + * Use color enhancement feature of display + * 0 = 0ff, 1 = on + * @hide */ - @Readable - public static final String DTMF_TONE_TYPE_WHEN_DIALING = "dtmf_tone_type"; + public static final String DISPLAY_COLOR_ENHANCE = "display_color_enhance"; /** - * Whether the hearing aid is enabled. The value is - * boolean (1 or 0). + * @hide + * Use auto contrast optimization feature of display + * 0 = 0ff, 1 = on * @hide */ - @UnsupportedAppUsage - @Readable - public static final String HEARING_AID = "hearing_aid"; + public static final String DISPLAY_AUTO_CONTRAST = "display_auto_contrast"; /** - * CDMA only settings - * TTY Mode - * 0 = OFF - * 1 = FULL - * 2 = VCO - * 3 = HCO + * @hide + * Manual display color adjustments (RGB values as floats, separated by spaces) * @hide */ - @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) - @Readable - public static final String TTY_MODE = "tty_mode"; + public static final String DISPLAY_COLOR_ADJUSTMENT = "display_color_adjustment"; /** - * Whether the sounds effects (key clicks, lid open ...) are enabled. The value is - * boolean (1 or 0). + * @hide + * The current custom picture adjustment values as a delimited string */ - @Readable - public static final String SOUND_EFFECTS_ENABLED = "sound_effects_enabled"; + public static final String DISPLAY_PICTURE_ADJUSTMENT = + "display_picture_adjustment"; /** - * Whether haptic feedback (Vibrate on tap) is enabled. The value is - * boolean (1 or 0). + * @hide + * Did we tell about how they can stop breaking their eyes? + */ + public static final String LIVE_DISPLAY_HINTED = "live_display_hinted"; + + /** + * whether to enable or disable vibration on succesful fingerprint auth * - * @deprecated Replaced by using {@link android.os.VibrationAttributes#USAGE_TOUCH} on - * vibrations. User settings are applied automatically by the service and should not be - * applied by individual apps. + * @hide */ - @Deprecated - @Readable - public static final String HAPTIC_FEEDBACK_ENABLED = "haptic_feedback_enabled"; + public static final String FP_SUCCESS_VIBRATE = "fingerprint_success_vib"; /** - * @deprecated Each application that shows web suggestions should have its own - * setting for this. + * whether to enable or disable vibration on failed fingerprint auth + * + * @hide */ - @Deprecated - @Readable - public static final String SHOW_WEB_SUGGESTIONS = "show_web_suggestions"; + public static final String FP_ERROR_VIBRATE = "fingerprint_error_vib"; + /** - * Whether the notification LED should repeatedly flash when a notification is - * pending. The value is boolean (1 or 0). + * Whether to enable fingerprint wake-and-unlock. * @hide */ - @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) - @Readable - public static final String NOTIFICATION_LIGHT_PULSE = "notification_light_pulse"; + public static final String FINGERPRINT_WAKE_UNLOCK = "fingerprint_wake_unlock"; /** - * Show pointer location on screen? - * 0 = no - * 1 = yes + * Whether to enable the ripple animation on fingerprint unlock * @hide */ - @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) - @Readable - public static final String POINTER_LOCATION = "pointer_location"; + public static final String ENABLE_RIPPLE_EFFECT = "enable_ripple_effect"; /** - * Show touch positions on screen? - * 0 = no - * 1 = yes + * Whether edge light is enabled. + * Default 0 * @hide */ - @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) - @Readable - public static final String SHOW_TOUCHES = "show_touches"; + public static final String EDGE_LIGHT_ENABLED = "edge_light_enabled"; /** - * Log raw orientation data from - * {@link com.android.server.policy.WindowOrientationListener} for use with the - * orientationplot.py tool. - * 0 = no - * 1 = yes + * Whether to show edge light for all pulse events and not just for notifications. + * Default 0 * @hide */ - @Readable - public static final String WINDOW_ORIENTATION_LISTENER_LOG = - "window_orientation_listener_log"; + public static final String EDGE_LIGHT_ALWAYS_TRIGGER_ON_PULSE = "edge_light_always_trigger_on_pulse"; /** - * @deprecated Use {@link android.provider.Settings.Global#POWER_SOUNDS_ENABLED} - * instead + * Whether to repeat edge light animation until pulse timeout. + * Default 0 * @hide */ - @Deprecated - public static final String POWER_SOUNDS_ENABLED = Global.POWER_SOUNDS_ENABLED; + public static final String EDGE_LIGHT_REPEAT_ANIMATION = "edge_light_repeat_animation"; /** - * @deprecated Use {@link android.provider.Settings.Global#DOCK_SOUNDS_ENABLED} - * instead + * Color mode of edge light. + * 0: Accent + * 1: Notification + * 2: Wallpaper + * 3: Custom + * Default 0 * @hide */ - @Deprecated - @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) - public static final String DOCK_SOUNDS_ENABLED = Global.DOCK_SOUNDS_ENABLED; + public static final String EDGE_LIGHT_COLOR_MODE = "edge_light_color_mode"; /** - * Whether to play sounds when the keyguard is shown and dismissed. + * Custom color (hex value) for edge light. + * Default #FFFFFF + * @hide + */ + public static final String EDGE_LIGHT_CUSTOM_COLOR = "edge_light_custom_color"; + + /** + * Whether to blink flashlight for incoming calls + * 0 = Disabled (Default) + * 1 = Blink flashlight only in Ringer mode + * 2 = Blink flashlight only when ringer is not audible + * 3 = Blink flahslight only when entirely silent + * 4 = Blink flashlight always regardless of ringer mode * @hide */ - @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @Readable - public static final String LOCKSCREEN_SOUNDS_ENABLED = "lockscreen_sounds_enabled"; + public static final String FLASHLIGHT_ON_CALL = "flashlight_on_call"; /** - * Whether the lockscreen should be completely disabled. + * Whether flashlight_on_call ignores DND (Zen Mode) * @hide */ @Readable - public static final String LOCKSCREEN_DISABLED = "lockscreen.disabled"; + public static final String FLASHLIGHT_ON_CALL_IGNORE_DND = "flashlight_on_call_ignore_dnd"; /** - * @deprecated Use {@link android.provider.Settings.Global#LOW_BATTERY_SOUND} - * instead + * Rate in Hz in which to blink flashlight_on_call * @hide */ - @Deprecated - public static final String LOW_BATTERY_SOUND = Global.LOW_BATTERY_SOUND; + @Readable + public static final String FLASHLIGHT_ON_CALL_RATE = "flashlight_on_call_rate"; /** - * @deprecated Use {@link android.provider.Settings.Global#DESK_DOCK_SOUND} - * instead * @hide */ - @Deprecated - @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) - public static final String DESK_DOCK_SOUND = Global.DESK_DOCK_SOUND; + public static final String UDFPS_ANIM = "udfps_anim"; /** - * @deprecated Use {@link android.provider.Settings.Global#DESK_UNDOCK_SOUND} - * instead * @hide */ - @Deprecated - @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) - public static final String DESK_UNDOCK_SOUND = Global.DESK_UNDOCK_SOUND; + public static final String UDFPS_ANIM_STYLE = "udfps_anim_style"; /** - * @deprecated Use {@link android.provider.Settings.Global#CAR_DOCK_SOUND} - * instead * @hide */ - @Deprecated - @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) - public static final String CAR_DOCK_SOUND = Global.CAR_DOCK_SOUND; + public static final String UDFPS_ICON = "udfps_icon"; /** - * @deprecated Use {@link android.provider.Settings.Global#CAR_UNDOCK_SOUND} - * instead + * Whether the phone ringtone should be played in an increasing manner + * 0 = 0ff, 1 = on * @hide */ - @Deprecated - @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) - public static final String CAR_UNDOCK_SOUND = Global.CAR_UNDOCK_SOUND; + public static final String INCREASING_RING = "increasing_ring"; /** - * @deprecated Use {@link android.provider.Settings.Global#LOCK_SOUND} - * instead + * Start volume fraction for increasing ring volume * @hide */ - @Deprecated - @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) - public static final String LOCK_SOUND = Global.LOCK_SOUND; + public static final String INCREASING_RING_START_VOLUME = "increasing_ring_start_vol"; /** - * @deprecated Use {@link android.provider.Settings.Global#UNLOCK_SOUND} - * instead + * Ramp up time (seconds) for increasing ring * @hide */ - @Deprecated - @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) - public static final String UNLOCK_SOUND = Global.UNLOCK_SOUND; + public static final String INCREASING_RING_RAMP_UP_TIME = "increasing_ring_ramp_up_time"; /** - * Receive incoming SIP calls? - * 0 = no - * 1 = yes + * GameSpace: List of added games by user * @hide */ @Readable - public static final String SIP_RECEIVE_CALLS = "sip_receive_calls"; + public static final String GAMESPACE_GAME_LIST = "gamespace_game_list"; /** - * Call Preference String. - * "SIP_ALWAYS" : Always use SIP with network access - * "SIP_ADDRESS_ONLY" : Only if destination is a SIP address + * GameSpace: Whether fullscreen intent will be suppressed while in game session * @hide */ @Readable - public static final String SIP_CALL_OPTIONS = "sip_call_options"; + public static final String GAMESPACE_SUPPRESS_FULLSCREEN_INTENT = "gamespace_suppress_fullscreen_intent"; /** - * One of the sip call options: Always use SIP with network access. + * reTicker Status * @hide */ - @Readable - public static final String SIP_ALWAYS = "SIP_ALWAYS"; + public static final String RETICKER_STATUS = "reticker_status"; /** - * One of the sip call options: Only if destination is a SIP address. + * reTicker Colored * @hide */ - @Readable - public static final String SIP_ADDRESS_ONLY = "SIP_ADDRESS_ONLY"; + public static final String RETICKER_COLORED = "reticker_colored"; /** - * @deprecated Use SIP_ALWAYS or SIP_ADDRESS_ONLY instead. Formerly used to indicate that - * the user should be prompted each time a call is made whether it should be placed using - * SIP. The {@link com.android.providers.settings.DatabaseHelper} replaces this with - * SIP_ADDRESS_ONLY. + * Whether to display 4G icon instead LTE * @hide */ - @Deprecated - @Readable - public static final String SIP_ASK_ME_EACH_TIME = "SIP_ASK_ME_EACH_TIME"; + public static final String SHOW_FOURG_ICON = "show_fourg_icon"; + + /** + * IMPORTANT: If you add a new public settings you also have to add it to + * PUBLIC_SETTINGS below. If the new setting is hidden you have to add + * it to PRIVATE_SETTINGS below. Also add a validator that can validate + * the setting value. See an example above. + */ /** - * Pointer speed setting. - * This is an integer value in a range between -7 and +7, so there are 15 possible values. - * -7 = slowest - * 0 = default speed - * +7 = fastest * @hide */ - @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) - @Readable - public static final String POINTER_SPEED = "pointer_speed"; + public static final String QS_LAYOUT_COLUMNS_LANDSCAPE = "qs_layout_columns_landscape"; /** - * Whether lock-to-app will be triggered by long-press on recents. * @hide */ - @Readable - public static final String LOCK_TO_APP_ENABLED = "lock_to_app_enabled"; + public static final String QS_LAYOUT_COLUMNS = "qs_layout_columns"; /** - * I am the lolrus. - *

- * Nonzero values indicate that the user has a bukkit. - * Backward-compatible with PrefGetPreference(prefAllowEasterEggs). * @hide */ - @Readable - public static final String EGG_MODE = "egg_mode"; + public static final String QS_TILE_VERTICAL_LAYOUT = "qs_tile_vertical_layout"; /** - * Setting to determine whether or not to show the battery percentage in the status bar. - * 0 - Don't show percentage - * 1 - Show percentage * @hide */ - @Readable - public static final String SHOW_BATTERY_PERCENT = "status_bar_show_battery_percent"; + public static final String QS_TILE_LABEL_HIDE = "qs_tile_label_hide"; /** - * Whether or not to enable multiple audio focus. - * When enabled, requires more management by user over application playback activity, - * for instance pausing media apps when another starts. + * Whether to play notification sound and vibration if screen is ON + * 0 - never + * 1 - always * @hide */ - @Readable - public static final String MULTI_AUDIO_FOCUS_ENABLED = "multi_audio_focus_enabled"; + public static final String NOTIFICATION_SOUND_VIB_SCREEN_ON = "notification_sound_vib_screen_on"; /** - * IMPORTANT: If you add a new public settings you also have to add it to - * PUBLIC_SETTINGS below. If the new setting is hidden you have to add - * it to PRIVATE_SETTINGS below. Also add a validator that can validate - * the setting value. See an example above. + * Whether to display set of animations when prompting the power menu + * + * @hide + */ + public static final String POWER_MENU_ANIMATIONS = "power_menu_animations"; + + /** + * Change quick settings tiles animation style + * + * @hide + */ + public static final String ANIM_TILE_STYLE = "anim_tile_style"; + + /** + * Change quick settings tiles animation duration + * + * @hide */ + public static final String ANIM_TILE_DURATION = "anim_tile_duration"; + + /** + * Change quick settings tiles interpolator + * + * @hide + */ + public static final String ANIM_TILE_INTERPOLATOR = "anim_tile_interpolator"; /** * Keys we no longer back up under the current schema, but want to continue to @@ -5607,9 +6493,51 @@ public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean PRIVATE_SETTINGS.add(POINTER_SPEED); PRIVATE_SETTINGS.add(LOCK_TO_APP_ENABLED); PRIVATE_SETTINGS.add(EGG_MODE); - PRIVATE_SETTINGS.add(SHOW_BATTERY_PERCENT); PRIVATE_SETTINGS.add(DISPLAY_COLOR_MODE); PRIVATE_SETTINGS.add(DISPLAY_COLOR_MODE_VENDOR_HINT); + PRIVATE_SETTINGS.add(POCKET_JUDGE); + PRIVATE_SETTINGS.add(SWIPE_TO_SCREENSHOT); + PRIVATE_SETTINGS.add(VOLUME_KEY_CURSOR_CONTROL); + PRIVATE_SETTINGS.add(VIBRATE_ON_CONNECT); + PRIVATE_SETTINGS.add(VIBRATE_ON_CALLWAITING); + PRIVATE_SETTINGS.add(VIBRATE_ON_DISCONNECT); + PRIVATE_SETTINGS.add(GLOBAL_ACTIONS_AIRPLANE); + PRIVATE_SETTINGS.add(GLOBAL_ACTIONS_EMERGENCY); + PRIVATE_SETTINGS.add(GLOBAL_ACTIONS_FLASHLIGHT); + PRIVATE_SETTINGS.add(GLOBAL_ACTIONS_LOCKDOWN); + PRIVATE_SETTINGS.add(GLOBAL_ACTIONS_SOUNDPANEL); + PRIVATE_SETTINGS.add(GLOBAL_ACTIONS_SCREENSHOT); + PRIVATE_SETTINGS.add(GLOBAL_ACTIONS_SCREENRECORD); + PRIVATE_SETTINGS.add(GLOBAL_ACTIONS_SETTINGS); + PRIVATE_SETTINGS.add(GLOBAL_ACTIONS_USERS); + PRIVATE_SETTINGS.add(GLOBAL_ACTIONS_MAX_COLUMNS); + PRIVATE_SETTINGS.add(GLOBAL_ACTIONS_MAX_ROWS); + PRIVATE_SETTINGS.add(BACK_GESTURE_HAPTIC); + PRIVATE_SETTINGS.add(BATTERY_LIGHT_ENABLED); + PRIVATE_SETTINGS.add(BATTERY_LIGHT_ALLOW_ON_DND); + PRIVATE_SETTINGS.add(BATTERY_LIGHT_LOW_BLINKING); + PRIVATE_SETTINGS.add(BATTERY_LIGHT_LOW_COLOR); + PRIVATE_SETTINGS.add(BATTERY_LIGHT_MEDIUM_COLOR); + PRIVATE_SETTINGS.add(BATTERY_LIGHT_FULL_COLOR); + PRIVATE_SETTINGS.add(BATTERY_LIGHT_REALLYFULL_COLOR); + PRIVATE_SETTINGS.add(DISPLAY_TEMPERATURE_DAY); + PRIVATE_SETTINGS.add(DISPLAY_TEMPERATURE_NIGHT); + PRIVATE_SETTINGS.add(DISPLAY_TEMPERATURE_MODE); + PRIVATE_SETTINGS.add(DISPLAY_AUTO_OUTDOOR_MODE); + PRIVATE_SETTINGS.add(DISPLAY_ANTI_FLICKER); + PRIVATE_SETTINGS.add(DISPLAY_READING_MODE); + PRIVATE_SETTINGS.add(DISPLAY_CABC); + PRIVATE_SETTINGS.add(DISPLAY_COLOR_ENHANCE); + PRIVATE_SETTINGS.add(DISPLAY_AUTO_CONTRAST); + PRIVATE_SETTINGS.add(DISPLAY_COLOR_ADJUSTMENT); + PRIVATE_SETTINGS.add(DISPLAY_PICTURE_ADJUSTMENT); + PRIVATE_SETTINGS.add(LIVE_DISPLAY_HINTED); + PRIVATE_SETTINGS.add(FLASHLIGHT_ON_CALL); + PRIVATE_SETTINGS.add(FLASHLIGHT_ON_CALL_IGNORE_DND); + PRIVATE_SETTINGS.add(FLASHLIGHT_ON_CALL_RATE); + PRIVATE_SETTINGS.add(INCREASING_RING); + PRIVATE_SETTINGS.add(INCREASING_RING_START_VOLUME); + PRIVATE_SETTINGS.add(INCREASING_RING_RAMP_UP_TIME); } /** @@ -10672,6 +11600,31 @@ public static boolean putFloatForUser(ContentResolver cr, String name, float val */ public static final String ADAPTIVE_CONNECTIVITY_ENABLED = "adaptive_connectivity_enabled"; + /** + * Boolean value whether to link ringtone and notification volume + * @hide + */ + public static final String VOLUME_LINK_NOTIFICATION = "volume_link_notification"; + + /** + * Enable rebooting into bootloader or fastboot. + * + * @hide + */ + public static final String ADVANCED_REBOOT = "advanced_reboot"; + + /** + * Volume panel on left + * @hide + */ + public static final String VOLUME_PANEL_ON_LEFT = "volume_panel_on_left"; + + /** + * Whether to turn on black theme + * @hide + */ + public static final String SYSTEM_BLACK_THEME = "system_black_theme"; + /** * Keys we no longer back up under the current schema, but want to continue to * process when restoring historical backup datasets. @@ -10819,6 +11772,25 @@ public static boolean putFloatForUser(ContentResolver cr, String name, float val public static final String LAUNCHER_TASKBAR_EDUCATION_SHOWING = "launcher_taskbar_education_showing"; + /** + * Whether to show the brightness slider in quick settings panel. + * @hide + */ + public static final String QS_SHOW_BRIGHTNESS_SLIDER = "qs_show_brightness_slider"; + + /** + * Whether to show the brightness slider in quick settings panel. + * 0 = Top, 1 = Bottom + * @hide + */ + public static final String QS_BRIGHTNESS_SLIDER_POSITION = "qs_brightness_slider_position"; + + /** + * Whether to show the auto brightness icon in quick settings panel. + * @hide + */ + public static final String QS_SHOW_AUTO_BRIGHTNESS = "qs_show_auto_brightness"; + /** * These entries are considered common between the personal and the managed profile, * since the managed profile doesn't get to change them. @@ -15410,6 +16382,14 @@ public static final class Global extends NameValueTable { @Readable public static final String SAFE_BOOT_DISALLOWED = "safe_boot_disallowed"; + + /** + * Whether to wake the display when plugging or unplugging the charger + * + * @hide + */ + public static final String WAKE_WHEN_PLUGGED_OR_UNPLUGGED = "wake_when_plugged_or_unplugged"; + /** * Indicates whether this device is currently in retail demo mode. If true, the device * usage is severely limited. diff --git a/core/java/android/security/net/config/PinSet.java b/core/java/android/security/net/config/PinSet.java index d3c975eb3101..ff66b6c3be49 100644 --- a/core/java/android/security/net/config/PinSet.java +++ b/core/java/android/security/net/config/PinSet.java @@ -17,8 +17,10 @@ package android.security.net.config; import android.util.ArraySet; + import java.util.Collections; import java.util.Set; +import java.util.stream.Collectors; /** @hide */ public final class PinSet { @@ -26,6 +28,7 @@ public final class PinSet { new PinSet(Collections.emptySet(), Long.MAX_VALUE); public final long expirationTime; public final Set pins; + private final Set algorithms; public PinSet(Set pins, long expirationTime) { if (pins == null) { @@ -33,14 +36,12 @@ public PinSet(Set pins, long expirationTime) { } this.pins = pins; this.expirationTime = expirationTime; + this.algorithms = pins.stream() + .map(pin -> pin.digestAlgorithm) + .collect(Collectors.toCollection(ArraySet::new)); } Set getPinAlgorithms() { - // TODO: Cache this. - Set algorithms = new ArraySet(); - for (Pin pin : pins) { - algorithms.add(pin.digestAlgorithm); - } return algorithms; } } diff --git a/core/java/android/service/dreams/DreamManagerInternal.java b/core/java/android/service/dreams/DreamManagerInternal.java index 7bf5c38b7fd4..7a1612ca40f6 100644 --- a/core/java/android/service/dreams/DreamManagerInternal.java +++ b/core/java/android/service/dreams/DreamManagerInternal.java @@ -59,4 +59,9 @@ public abstract class DreamManagerInternal { * active dream component. */ public abstract ComponentName getActiveDreamComponent(boolean doze); + + /** + * Called by the power manager to determine whether the dream has gone to doze mode. + */ + public abstract boolean isDozing(); } diff --git a/core/java/android/service/dreams/IDreamManager.aidl b/core/java/android/service/dreams/IDreamManager.aidl index 3e0deeb556e9..8f517519a50c 100644 --- a/core/java/android/service/dreams/IDreamManager.aidl +++ b/core/java/android/service/dreams/IDreamManager.aidl @@ -35,6 +35,7 @@ interface IDreamManager { void testDream(int userId, in ComponentName componentName); @UnsupportedAppUsage boolean isDreaming(); + boolean isDozing(); void finishSelf(in IBinder token, boolean immediate); void startDozing(in IBinder token, int screenState, int screenBrightness); void stopDozing(in IBinder token); diff --git a/core/java/android/service/notification/StatusBarNotification.java b/core/java/android/service/notification/StatusBarNotification.java index 66188cd19721..f8dfef59ad33 100644 --- a/core/java/android/service/notification/StatusBarNotification.java +++ b/core/java/android/service/notification/StatusBarNotification.java @@ -71,10 +71,13 @@ public class StatusBarNotification implements Parcelable { private Context mContext; // used for inflation & icon expansion + private boolean mIsContentSecure; + /** @hide */ public StatusBarNotification(String pkg, String opPkg, int id, String tag, int uid, int initialPid, Notification notification, UserHandle user, - String overrideGroupKey, long postTime) { + String overrideGroupKey, long postTime, + boolean isContentSecure) { if (pkg == null) throw new NullPointerException(); if (notification == null) throw new NullPointerException(); @@ -90,6 +93,7 @@ public StatusBarNotification(String pkg, String opPkg, int id, this.overrideGroupKey = overrideGroupKey; this.key = key(); this.groupKey = groupKey(); + mIsContentSecure = isContentSecure; } /** @@ -137,6 +141,7 @@ public StatusBarNotification(Parcel in) { } this.key = key(); this.groupKey = groupKey(); + mIsContentSecure = in.readBoolean(); } /** @@ -237,6 +242,7 @@ public void writeToParcel(Parcel out, int flags) { } else { out.writeInt(0); } + out.writeBoolean(mIsContentSecure); } public int describeContents() { @@ -276,7 +282,8 @@ public StatusBarNotification clone() { StatusBarNotification cloneShallow(Notification notification) { StatusBarNotification result = new StatusBarNotification(this.pkg, this.opPkg, this.id, this.tag, this.uid, this.initialPid, - notification, this.user, this.overrideGroupKey, this.postTime); + notification, this.user, this.overrideGroupKey, + this.postTime, mIsContentSecure); result.setInstanceId(this.mInstanceId); return result; } @@ -550,4 +557,23 @@ private String shortenTag(String logTag) { return logTag.substring(0, MAX_LOG_TAG_LENGTH - hash.length() - 1) + "-" + hash; } + + /** + * Set whether the notification content is secure. + * + * @param isContentSecure whether the content is secure. + * @hide + */ + public void setIsContentSecure(boolean isContentSecure) { + mIsContentSecure = isContentSecure; + } + + /** + * Check whether the notification content is secure. + * + * @return true if content is secure, false otherwise. + */ + public boolean getIsContentSecure() { + return mIsContentSecure; + } } diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java index 1e22856c1bde..77c7a85b6912 100644 --- a/core/java/android/service/wallpaper/WallpaperService.java +++ b/core/java/android/service/wallpaper/WallpaperService.java @@ -2363,7 +2363,7 @@ public void executeMessage(Message message) { return; } case MSG_UPDATE_SURFACE: - mEngine.updateSurface(true, false, false); + mEngine.updateSurface(true, false, true/*false*/); break; case MSG_ZOOM: mEngine.setZoom(Float.intBitsToFloat(message.arg1)); diff --git a/core/java/android/speech/tts/TtsEngines.java b/core/java/android/speech/tts/TtsEngines.java index a8aea7c1eb59..d279d7aeeb8c 100644 --- a/core/java/android/speech/tts/TtsEngines.java +++ b/core/java/android/speech/tts/TtsEngines.java @@ -507,7 +507,7 @@ private static String parseEnginePrefFromList(String prefValue, String engineNam for (String value : prefValues) { final int delimiter = value.indexOf(':'); if (delimiter > 0) { - if (engineName.equals(value.substring(0, delimiter))) { + if ((value.substring(0, delimiter)).equals(engineName)) { return value.substring(delimiter + 1); } } diff --git a/core/java/android/view/IRemoteAnimationRunner.aidl b/core/java/android/view/IRemoteAnimationRunner.aidl index 1f64fb8ca2ec..1981c9d66c8b 100644 --- a/core/java/android/view/IRemoteAnimationRunner.aidl +++ b/core/java/android/view/IRemoteAnimationRunner.aidl @@ -46,5 +46,5 @@ oneway interface IRemoteAnimationRunner { * won't have any effect anymore. */ @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553) - void onAnimationCancelled(); + void onAnimationCancelled(boolean isKeyguardOccluded); } diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl index fb562d8e97db..2e0ef6eab428 100644 --- a/core/java/android/view/IWindowManager.aidl +++ b/core/java/android/view/IWindowManager.aidl @@ -22,6 +22,7 @@ import com.android.internal.policy.IKeyguardLockedStateListener; import com.android.internal.policy.IShortcutService; import android.app.IAssistDataReceiver; +import android.content.Intent; import android.content.res.CompatibilityInfo; import android.content.res.Configuration; import android.graphics.Bitmap; @@ -398,6 +399,11 @@ interface IWindowManager */ oneway void hideTransientBars(int displayId); + /** + * Send some ActionHandler commands to WindowManager. + */ + void sendCustomAction(in Intent intent); + /** * Called by System UI to notify of changes to the visibility of Recents. */ diff --git a/core/java/android/view/InputDevice.java b/core/java/android/view/InputDevice.java index 7d5603994efa..0fbe98b599e2 100644 --- a/core/java/android/view/InputDevice.java +++ b/core/java/android/view/InputDevice.java @@ -337,6 +337,15 @@ public final class InputDevice implements Parcelable { */ public static final int SOURCE_SENSOR = 0x04000000 | SOURCE_CLASS_NONE; + /** + * The input source is a specific virtual event sent from navigation bar. + * + * @see com.android.systemui.statusbar.policy.KeyButtonView#sendEvent() + * @author Carlo Savignano + * @hide + */ + public static final int SOURCE_NAVIGATION_BAR = 0x8000000 | SOURCE_CLASS_BUTTON; + /** * A special input source constant that is used when filtering input devices * to match devices that provide any type of input source. diff --git a/core/java/android/view/LayoutInflater.java b/core/java/android/view/LayoutInflater.java index df78827534a6..49db01af7a93 100644 --- a/core/java/android/view/LayoutInflater.java +++ b/core/java/android/view/LayoutInflater.java @@ -804,67 +804,75 @@ public final View createView(@NonNull Context viewContext, @NonNull String name, throws ClassNotFoundException, InflateException { Objects.requireNonNull(viewContext); Objects.requireNonNull(name); - Constructor constructor = sConstructorMap.get(name); - if (constructor != null && !verifyClassLoader(constructor)) { - constructor = null; - sConstructorMap.remove(name); - } + String prefixedName = prefix != null ? (prefix + name) : name; Class clazz = null; try { Trace.traceBegin(Trace.TRACE_TAG_VIEW, name); - if (constructor == null) { - // Class not found in the cache, see if it's real, and try to add it - clazz = Class.forName(prefix != null ? (prefix + name) : name, false, - mContext.getClassLoader()).asSubclass(View.class); - - if (mFilter != null && clazz != null) { - boolean allowed = mFilter.onLoadClass(clazz); - if (!allowed) { - failNotAllowed(name, prefix, viewContext, attrs); - } + // Opportunistically create view directly instead of using reflection + View view = tryCreateViewDirect(prefixedName, viewContext, attrs); + if (view == null) { + Constructor constructor = sConstructorMap.get(name); + if (constructor != null && !verifyClassLoader(constructor)) { + constructor = null; + sConstructorMap.remove(name); } - constructor = clazz.getConstructor(mConstructorSignature); - constructor.setAccessible(true); - sConstructorMap.put(name, constructor); - } else { - // If we have a filter, apply it to cached constructor - if (mFilter != null) { - // Have we seen this name before? - Boolean allowedState = mFilterMap.get(name); - if (allowedState == null) { - // New class -- remember whether it is allowed - clazz = Class.forName(prefix != null ? (prefix + name) : name, false, - mContext.getClassLoader()).asSubclass(View.class); - - boolean allowed = clazz != null && mFilter.onLoadClass(clazz); - mFilterMap.put(name, allowed); + + if (constructor == null) { + // Class not found in the cache, see if it's real, and try to add it + clazz = Class.forName(prefixedName, false, + mContext.getClassLoader()).asSubclass(View.class); + + if (mFilter != null && clazz != null) { + boolean allowed = mFilter.onLoadClass(clazz); if (!allowed) { failNotAllowed(name, prefix, viewContext, attrs); } - } else if (allowedState.equals(Boolean.FALSE)) { - failNotAllowed(name, prefix, viewContext, attrs); + } + constructor = clazz.getConstructor(mConstructorSignature); + constructor.setAccessible(true); + sConstructorMap.put(name, constructor); + } else { + // If we have a filter, apply it to cached constructor + if (mFilter != null) { + // Have we seen this name before? + Boolean allowedState = mFilterMap.get(name); + if (allowedState == null) { + // New class -- remember whether it is allowed + clazz = Class.forName(prefixedName, false, + mContext.getClassLoader()).asSubclass(View.class); + + boolean allowed = clazz != null && mFilter.onLoadClass(clazz); + mFilterMap.put(name, allowed); + if (!allowed) { + failNotAllowed(name, prefix, viewContext, attrs); + } + } else if (allowedState.equals(Boolean.FALSE)) { + failNotAllowed(name, prefix, viewContext, attrs); + } } } - } - Object lastContext = mConstructorArgs[0]; - mConstructorArgs[0] = viewContext; - Object[] args = mConstructorArgs; - args[1] = attrs; + Object lastContext = mConstructorArgs[0]; + mConstructorArgs[0] = viewContext; + Object[] args = mConstructorArgs; + args[1] = attrs; - try { - final View view = constructor.newInstance(args); - if (view instanceof ViewStub) { - // Use the same context when inflating ViewStub later. - final ViewStub viewStub = (ViewStub) view; - viewStub.setLayoutInflater(cloneInContext((Context) args[0])); + try { + view = constructor.newInstance(args); + } finally { + mConstructorArgs[0] = lastContext; } - return view; - } finally { - mConstructorArgs[0] = lastContext; } + + if (view instanceof ViewStub) { + // Use the same context when inflating ViewStub later. + final ViewStub viewStub = (ViewStub) view; + viewStub.setLayoutInflater(cloneInContext((Context) viewContext)); + } + + return view; } catch (NoSuchMethodException e) { final InflateException ie = new InflateException( getParserStateDescription(viewContext, attrs) @@ -1363,4 +1371,62 @@ protected void dispatchDraw(Canvas canvas) { } } } + + // Some of the views included here are deprecated, but apps still use them. + @SuppressWarnings("deprecation") + private static View tryCreateViewDirect(String name, Context context, AttributeSet attributeSet) { + // This contains all the framework views used in a set of 113 real-world apps, sorted by + // number of occurrences. While views with only 1 occurrence are unlikely to be worth + // optimizing, it doesn't hurt to include them because switch-case is compiled into a table + // lookup after calling String#hashCode(). + switch (name) { + case "android.widget.LinearLayout": // 13486 occurrences + return new android.widget.LinearLayout(context, attributeSet); + case "android.widget.View": // 6930 occurrences + case "android.webkit.View": // 63 occurrences + case "android.view.View": // 63 occurrences + case "android.app.View": // 62 occurrences + return new android.view.View(context, attributeSet); + case "android.widget.FrameLayout": // 6447 occurrences + return new android.widget.FrameLayout(context, attributeSet); + case "android.widget.ViewStub": // 5613 occurrences + case "android.view.ViewStub": // 228 occurrences + case "android.app.ViewStub": // 227 occurrences + case "android.webkit.ViewStub": // 226 occurrences + return new android.view.ViewStub(context, attributeSet); + case "android.widget.TextView": // 4722 occurrences + return new android.widget.TextView(context, attributeSet); + case "android.widget.ImageView": // 3044 occurrences + return new android.widget.ImageView(context, attributeSet); + case "android.widget.RelativeLayout": // 2665 occurrences + return new android.widget.RelativeLayout(context, attributeSet); + case "android.widget.Space": // 1694 occurrences + return new android.widget.Space(context, attributeSet); + case "android.widget.ProgressBar": // 770 occurrences + return new android.widget.ProgressBar(context, attributeSet); + case "android.widget.Button": // 382 occurrences + return new android.widget.Button(context, attributeSet); + case "android.widget.ImageButton": // 265 occurrences + return new android.widget.ImageButton(context, attributeSet); + case "android.widget.Switch": // 145 occurrences + return new android.widget.Switch(context, attributeSet); + case "android.widget.DateTimeView": // 117 occurrences + return new android.widget.DateTimeView(context, attributeSet); + case "android.widget.Toolbar": // 86 occurrences + return new android.widget.Toolbar(context, attributeSet); + case "android.widget.HorizontalScrollView": // 68 occurrences + return new android.widget.HorizontalScrollView(context, attributeSet); + case "android.widget.ScrollView": // 67 occurrences + return new android.widget.ScrollView(context, attributeSet); + case "android.widget.NotificationHeaderView": // 65 occurrences + case "android.webkit.NotificationHeaderView": // 65 occurrences + case "android.view.NotificationHeaderView": // 65 occurrences + case "android.app.NotificationHeaderView": // 65 occurrences + return new android.view.NotificationHeaderView(context, attributeSet); + case "android.widget.ListView": // 58 occurrences + return new android.widget.ListView(context, attributeSet); + } + + return null; + } } diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java index 536a0ac6403b..05ff9f18af74 100644 --- a/core/java/android/view/SurfaceView.java +++ b/core/java/android/view/SurfaceView.java @@ -1626,8 +1626,11 @@ private Canvas internalLockCanvas(Rect dirty, boolean hardware) { */ @Override public void unlockCanvasAndPost(Canvas canvas) { - mSurface.unlockCanvasAndPost(canvas); - mSurfaceLock.unlock(); + try { + mSurface.unlockCanvasAndPost(canvas); + } finally { + mSurfaceLock.unlock(); + } } @Override diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 9f0ad1169a8e..cb768bfbcdd1 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -2892,7 +2892,7 @@ private void resetTouchState() { * Returns true if the flag was previously set. */ private static boolean resetCancelNextUpFlag(@NonNull View view) { - if ((view.mPrivateFlags & PFLAG_CANCEL_NEXT_UP_EVENT) != 0) { + if (view != null && (view.mPrivateFlags & PFLAG_CANCEL_NEXT_UP_EVENT) != 0) { view.mPrivateFlags &= ~PFLAG_CANCEL_NEXT_UP_EVENT; return true; } diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index e46e44b4115b..4350495f36e2 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -2802,10 +2802,6 @@ private void performTraversals() { // Execute enqueued actions on every traversal in case a detached view enqueued an action getRunQueue().executeActions(mAttachInfo.mHandler); - if (mApplyInsetsRequested) { - dispatchApplyInsets(host); - } - if (mFirst) { // make sure touch mode code executes by setting cached value // to opposite of the added touch mode. @@ -2869,6 +2865,18 @@ private void performTraversals() { } } + if (mApplyInsetsRequested) { + dispatchApplyInsets(host); + if (mLayoutRequested) { + // Short-circuit catching a new layout request here, so + // we don't need to go through two layout passes when things + // change due to fitting system windows, which can happen a lot. + windowSizeMayChange |= measureHierarchy(host, lp, + mView.getContext().getResources(), + desiredWindowWidth, desiredWindowHeight); + } + } + if (layoutRequested) { // Clear this now, so that if anything requests a layout in the // rest of this function we will catch it and re-run a full @@ -6535,6 +6543,10 @@ private int processPointerEvent(QueuedInputEvent q) { final MotionEvent event = (MotionEvent)q.mEvent; mHandwritingInitiator.onTouchEvent(event); + if (event.getPointerCount() == 3 && isSwipeToScreenshotGestureActive()) { + event.setAction(MotionEvent.ACTION_CANCEL); + } + mAttachInfo.mUnbufferedDispatchRequested = false; mAttachInfo.mHandlingPointerEvent = true; boolean handled = mView.dispatchPointerEvent(event); @@ -6616,7 +6628,6 @@ private boolean updatePointerIcon(MotionEvent event) { } if (x < 0 || x >= mView.getWidth() || y < 0 || y >= mView.getHeight()) { // E.g. when moving window divider with mouse - Slog.d(mTag, "updatePointerIcon called with position out of bounds"); return false; } final PointerIcon pointerIcon = mView.onResolvePointerIcon(event, pointerIndex); @@ -10972,4 +10983,12 @@ void mergeSync(int syncId, SurfaceSyncer otherSyncer) { } mSurfaceSyncer.merge(mSyncId, syncId, otherSyncer); } + + private boolean isSwipeToScreenshotGestureActive() { + try { + return ActivityManager.getService().isSwipeToScreenshotGestureActive(); + } catch (RemoteException e) { + return false; + } + } } diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java index 231ae084dd6c..ab80151ff792 100644 --- a/core/java/android/widget/AbsListView.java +++ b/core/java/android/widget/AbsListView.java @@ -661,6 +661,7 @@ public abstract class AbsListView extends AdapterView implements Te private int mMinimumVelocity; @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 124051740) private int mMaximumVelocity; + private int mDecacheThreshold; private float mVelocityScale = 1.0f; final boolean[] mIsScrap = new boolean[1]; @@ -934,6 +935,7 @@ private void initAbsListView() { mVerticalScrollFactor = configuration.getScaledVerticalScrollFactor(); mMinimumVelocity = configuration.getScaledMinimumFlingVelocity(); mMaximumVelocity = configuration.getScaledMaximumFlingVelocity(); + mDecacheThreshold = mMaximumVelocity / 2; mOverscrollDistance = configuration.getScaledOverscrollDistance(); mOverflingDistance = configuration.getScaledOverflingDistance(); @@ -4743,7 +4745,7 @@ public void run() { // Keep the fling alive a little longer postDelayed(this, FLYWHEEL_TIMEOUT); } else { - endFling(); + endFling(false); // Don't disable the scrolling cache right after it was enabled mTouchMode = TOUCH_MODE_SCROLL; reportScrollStateChange(OnScrollListener.SCROLL_STATE_TOUCH_SCROLL); } @@ -4759,6 +4761,11 @@ public void run() { // Use AbsListView#fling(int) instead @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) void start(int initialVelocity) { + if (Math.abs(initialVelocity) > mDecacheThreshold) { + // For long flings, scrolling cache causes stutter, so don't use it + clearScrollingCache(); + } + int initialY = initialVelocity < 0 ? Integer.MAX_VALUE : 0; mLastFlingY = initialY; mScroller.setInterpolator(null); @@ -4839,6 +4846,10 @@ void startScroll(int distance, int duration, boolean linear, // To interrupt a fling early you should use smoothScrollBy(0,0) instead @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) void endFling() { + endFling(true); + } + + void endFling(boolean clearCache) { mTouchMode = TOUCH_MODE_REST; removeCallbacks(this); @@ -4847,7 +4858,8 @@ void endFling() { if (!mSuppressIdleStateChangeCall) { reportScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE); } - clearScrollingCache(); + if (clearCache) + clearScrollingCache(); mScroller.abortAnimation(); if (mFlingStrictSpan != null) { diff --git a/core/java/android/widget/ArrayAdapter.java b/core/java/android/widget/ArrayAdapter.java index f554f895a981..172d702c358d 100644 --- a/core/java/android/widget/ArrayAdapter.java +++ b/core/java/android/widget/ArrayAdapter.java @@ -448,7 +448,9 @@ public long getItemId(int position) { } final T item = getItem(position); - if (item instanceof CharSequence) { + if (item == null) { + text.setText(""); + } else if (item instanceof CharSequence) { text.setText((CharSequence) item); } else { text.setText(item.toString()); diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java index c1ec168af145..ac31a2648d98 100644 --- a/core/java/android/widget/PopupWindow.java +++ b/core/java/android/widget/PopupWindow.java @@ -1532,6 +1532,7 @@ private PopupBackgroundView createBackgroundView(View contentView) { final PopupBackgroundView.LayoutParams listParams = new PopupBackgroundView.LayoutParams( MATCH_PARENT, height); backgroundView.addView(contentView, listParams); + backgroundView.setClipToOutline(true); return backgroundView; } diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java index 2879cd888d2d..bc7e31fac222 100644 --- a/core/java/android/widget/RemoteViews.java +++ b/core/java/android/widget/RemoteViews.java @@ -1598,7 +1598,13 @@ public BitmapCache() { public BitmapCache(Parcel source) { mBitmaps = source.createTypedArrayList(Bitmap.CREATOR); - mBitmapHashes = source.readSparseIntArray(); + mBitmapHashes = new SparseIntArray(); + for (int i = 0; i < mBitmaps.size(); i++) { + Bitmap b = mBitmaps.get(i); + if (b != null) { + mBitmapHashes.put(b.hashCode(), i); + } + } } public int getBitmapId(Bitmap b) { @@ -1614,7 +1620,7 @@ public int getBitmapId(Bitmap b) { b = b.asShared(); } mBitmaps.add(b); - mBitmapHashes.put(mBitmaps.size() - 1, hash); + mBitmapHashes.put(hash, mBitmaps.size() - 1); mBitmapMemory = -1; return (mBitmaps.size() - 1); } @@ -1631,7 +1637,6 @@ public Bitmap getBitmapForId(int id) { public void writeBitmapsToParcel(Parcel dest, int flags) { dest.writeTypedList(mBitmaps, flags); - dest.writeSparseIntArray(mBitmapHashes); } public int getBitmapMemory() { diff --git a/core/java/android/widget/ScrollView.java b/core/java/android/widget/ScrollView.java index 15cd17b20f4f..e7aae34b3c2a 100644 --- a/core/java/android/widget/ScrollView.java +++ b/core/java/android/widget/ScrollView.java @@ -828,7 +828,9 @@ public boolean onTouchEvent(MotionEvent ev) { if (overScrollBy(0, deltaY, 0, mScrollY, 0, range, 0, mOverscrollDistance, true) && !hasNestedScrollingParent()) { // Break our velocity if we hit a scroll barrier. - mVelocityTracker.clear(); + if (mVelocityTracker != null) { + mVelocityTracker.clear(); + } } final int scrolledDeltaY = mScrollY - oldY; diff --git a/core/java/com/android/internal/app/ChooserActivity.java b/core/java/com/android/internal/app/ChooserActivity.java index 66abe30d0123..3ab3cde98ef5 100644 --- a/core/java/com/android/internal/app/ChooserActivity.java +++ b/core/java/com/android/internal/app/ChooserActivity.java @@ -2666,7 +2666,7 @@ public Intent getReferrerFillInIntent() { @Override // ChooserListCommunicator public int getMaxRankedTargets() { - return mMaxTargetsPerRow; + return mMaxTargetsPerRow * 2; } @Override // ChooserListCommunicator diff --git a/core/java/com/android/internal/custom/app/LineageContextConstants.java b/core/java/com/android/internal/custom/app/LineageContextConstants.java new file mode 100644 index 000000000000..589270b54517 --- /dev/null +++ b/core/java/com/android/internal/custom/app/LineageContextConstants.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) 2015, The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.custom.app; + +import android.annotation.SdkConstant; + +/** + * @hide + * TODO: We need to somehow make these managers accessible via getSystemService + */ +public final class LineageContextConstants { + + /** + * @hide + */ + private LineageContextConstants() { + // Empty constructor + } + + /** + * Use with {@link android.content.Context#getSystemService} to retrieve a + * {@link com.android.internal.custom.LineageHardwareManager} to manage the extended + * hardware features of the device. + * + * @see android.content.Context#getSystemService + * @see com.android.internal.custom.LineageHardwareManager + * + * @hide + */ + public static final String LINEAGE_HARDWARE_SERVICE = "lineagehardware"; + + /** + * Manages display color adjustments + * + * @hide + */ + public static final String LINEAGE_LIVEDISPLAY_SERVICE = "lineagelivedisplay"; + +} diff --git a/core/java/com/android/internal/custom/hardware/AdaptiveBacklight.java b/core/java/com/android/internal/custom/hardware/AdaptiveBacklight.java new file mode 100644 index 000000000000..11a1c72d52dc --- /dev/null +++ b/core/java/com/android/internal/custom/hardware/AdaptiveBacklight.java @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2013 The CyanogenMod Project + * Copyright (C) 2018 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.custom.hardware; + +import android.util.Log; + +import com.android.internal.util.custom.FileUtils; + +/** + * Adaptive backlight support (this refers to technologies like NVIDIA SmartDimmer, + * QCOM CABL or Samsung CABC). + */ +public class AdaptiveBacklight { + + private static final String TAG = "AdaptiveBacklight"; + + private static final String FILE_CABC = "/sys/class/graphics/fb0/cabc"; + + /** + * Whether device supports an adaptive backlight technology. + * + * @return boolean Supported devices must return always true + */ + public static boolean isSupported() { + return FileUtils.isFileReadable(FILE_CABC) && FileUtils.isFileWritable(FILE_CABC); + } + + /** + * This method return the current activation status of the adaptive backlight technology. + * + * @return boolean Must be false when adaptive backlight is not supported or not activated, or + * the operation failed while reading the status; true in any other case. + */ + public static boolean isEnabled() { + return Integer.parseInt(FileUtils.readOneLine(FILE_CABC)) > 0; + } + + /** + * This method allows to setup adaptive backlight technology status. + * + * @param status The new adaptive backlight status + * @return boolean Must be false if adaptive backlight is not supported or the operation + * failed; true in any other case. + */ + public static boolean setEnabled(boolean status) { + return FileUtils.writeLine(FILE_CABC, status ? "1" : "0"); + } +} diff --git a/core/java/com/android/internal/custom/hardware/AutoContrast.java b/core/java/com/android/internal/custom/hardware/AutoContrast.java new file mode 100644 index 000000000000..2de28e541b4b --- /dev/null +++ b/core/java/com/android/internal/custom/hardware/AutoContrast.java @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2014 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.custom.hardware; + +import com.android.internal.util.custom.FileUtils; + +import android.util.Log; + +/** + * Auto Contrast Optimization + */ +public class AutoContrast { + + private static final String TAG = "AutoContrast"; + + private static final String FILE_ACO = "/sys/class/graphics/fb0/aco"; + + /** + * Whether device supports ACO + * + * @return boolean Supported devices must return always true + */ + public static boolean isSupported() { + return FileUtils.isFileReadable(FILE_ACO) && FileUtils.isFileWritable(FILE_ACO); + } + + /** + * This method return the current activation status of ACO + * + * @return boolean Must be false when ACO is not supported or not activated, or + * the operation failed while reading the status; true in any other case. + */ + public static boolean isEnabled() { + try { + return Integer.parseInt(FileUtils.readOneLine(FILE_ACO)) > 0; + } catch (Exception e) { + Log.e(TAG, e.getMessage(), e); + } + return false; + } + + /** + * This method allows to setup ACO + * + * @param status The new ACO status + * @return boolean Must be false if ACO is not supported or the operation + * failed; true in any other case. + */ + public static boolean setEnabled(boolean status) { + return FileUtils.writeLine(FILE_ACO, status ? "1" : "0"); + } + + /** + * Whether adaptive backlight (CABL / CABC) is required to be enabled + * + * @return boolean False if adaptive backlight is not a dependency + */ + public static boolean isAdaptiveBacklightRequired() { + return false; + } +} diff --git a/core/java/com/android/internal/custom/hardware/ColorBalance.java b/core/java/com/android/internal/custom/hardware/ColorBalance.java new file mode 100644 index 000000000000..db4496614b6b --- /dev/null +++ b/core/java/com/android/internal/custom/hardware/ColorBalance.java @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2016 The CyanogenMod Project + * Copyright (C) 2018 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.custom.hardware; + +/** + * Color balance support + * + * Color balance controls allow direct adjustment of display color temperature + * using a range of values. A zero implies no adjustment, negative values + * move towards warmer temperatures, and positive values move towards + * cool temperatures. + */ +public class ColorBalance { + + /** + * Whether device supports color balance control + * + * @return boolean Supported devices must return always true + */ + public static boolean isSupported() { + return false; + } + + /** + * This method returns the current color balance value + * + * @return int Zero when no adjustment is made, negative values move + * towards warmer temperatures, positive values move towards cooler temperatures. + */ + public static int getValue() { + return 0; + } + + /** + * This method allows to set the display color balance + * + * @param value + * @return boolean Must be false if feature is not supported or the operation + * failed; true in any other case. + */ + public static boolean setValue(int value) { + return false; + } + + /** + * Get the minimum allowed color adjustment value + * @return int + */ + public static int getMinValue() { + return 0; + } + + /** + * Get the maximum allowed color adjustment value + * @return int + */ + public static int getMaxValue() { + return 0; + } +} diff --git a/core/java/com/android/internal/custom/hardware/ColorEnhancement.java b/core/java/com/android/internal/custom/hardware/ColorEnhancement.java new file mode 100644 index 000000000000..c135bbe45d7a --- /dev/null +++ b/core/java/com/android/internal/custom/hardware/ColorEnhancement.java @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2013 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.custom.hardware; + +import com.android.internal.util.custom.FileUtils; + +import android.util.Log; + +/** + * Color enhancement support + */ +public class ColorEnhancement { + + private static final String TAG = "ColorEnhancement"; + + private static final String FILE_CE = "/sys/class/graphics/fb0/color_enhance"; + + /** + * Whether device supports an color enhancement technology. + * + * @return boolean Supported devices must return always true + */ + public static boolean isSupported() { + return FileUtils.isFileReadable(FILE_CE) && FileUtils.isFileWritable(FILE_CE); + } + + /** + * This method return the current activation status of the color enhancement technology. + * + * @return boolean Must be false when color enhancement is not supported or not activated, or + * the operation failed while reading the status; true in any other case. + */ + public static boolean isEnabled() { + try { + return Integer.parseInt(FileUtils.readOneLine(FILE_CE)) > 0; + } catch (Exception e) { + Log.e(TAG, e.getMessage(), e); + } + return false; + } + + /** + * This method allows to setup color enhancement technology status. + * + * @param status The new color enhancement status + * @return boolean Must be false if adaptive backlight is not supported or the operation + * failed; true in any other case. + */ + public static boolean setEnabled(boolean status) { + return FileUtils.writeLine(FILE_CE, status ? "1" : "0"); + } +} diff --git a/core/java/com/android/internal/custom/hardware/DisplayColorCalibration.java b/core/java/com/android/internal/custom/hardware/DisplayColorCalibration.java new file mode 100644 index 000000000000..f34fd0495ba6 --- /dev/null +++ b/core/java/com/android/internal/custom/hardware/DisplayColorCalibration.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2014 The CyanogenMod Project + * Copyright (C) 2018 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.custom.hardware; + +import com.android.internal.util.custom.FileUtils; + +public class DisplayColorCalibration { + + private static final String TAG = "DisplayColorCalibration"; + + private static final String COLOR_FILE = "/sys/class/graphics/fb0/rgb"; + + private static final int MIN = 255; + private static final int MAX = 32768; + + public static boolean isSupported() { + return FileUtils.isFileReadable(COLOR_FILE) && FileUtils.isFileWritable(COLOR_FILE); + } + + public static int getMaxValue() { + return MAX; + } + + public static int getMinValue() { + return MIN; + } + + public static int getDefValue() { + return getMaxValue(); + } + + public static String getCurColors() { + return FileUtils.readOneLine(COLOR_FILE); + } + + public static boolean setColors(String colors) { + return FileUtils.writeLine(COLOR_FILE, colors); + } + +} diff --git a/core/java/com/android/internal/custom/hardware/DisplayMode.aidl b/core/java/com/android/internal/custom/hardware/DisplayMode.aidl new file mode 100644 index 000000000000..faf938d922cf --- /dev/null +++ b/core/java/com/android/internal/custom/hardware/DisplayMode.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2015 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.custom.hardware; + +parcelable DisplayMode; diff --git a/core/java/com/android/internal/custom/hardware/DisplayMode.java b/core/java/com/android/internal/custom/hardware/DisplayMode.java new file mode 100644 index 000000000000..4a36aef7313b --- /dev/null +++ b/core/java/com/android/internal/custom/hardware/DisplayMode.java @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2015 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.custom.hardware; + +import android.os.Parcel; +import android.os.Parcelable; + +import com.android.internal.util.custom.Concierge; +import com.android.internal.util.custom.Concierge.ParcelInfo; + +/** + * Display Modes API + * + * A device may implement a list of preset display modes for different + * viewing intents, such as movies, photos, or extra vibrance. These + * modes may have multiple components such as gamma correction, white + * point adjustment, etc, but are activated by a single control point. + * + * This API provides support for enumerating and selecting the + * modes supported by the hardware. + * + * A DisplayMode is referenced by it's identifier and carries an + * associated name (up to the user to translate this value). + */ +public class DisplayMode implements Parcelable { + public final int id; + public final String name; + + public DisplayMode(int id, String name) { + this.id = id; + this.name = name; + } + + private DisplayMode(Parcel parcel) { + // Read parcelable version via the Concierge + ParcelInfo parcelInfo = Concierge.receiveParcel(parcel); + int parcelableVersion = parcelInfo.getParcelVersion(); + + // temp vars + int tmpId = -1; + String tmpName = null; + + tmpId = parcel.readInt(); + if (parcel.readInt() != 0) { + tmpName = parcel.readString(); + } + + // set temps + this.id = tmpId; + this.name = tmpName; + + // Complete parcel info for the concierge + parcelInfo.complete(); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + // Tell the concierge to prepare the parcel + ParcelInfo parcelInfo = Concierge.prepareParcel(out); + + out.writeInt(id); + if (name != null) { + out.writeInt(1); + out.writeString(name); + } else { + out.writeInt(0); + } + + // Complete the parcel info for the concierge + parcelInfo.complete(); + } + + /** @hide */ + public static final Parcelable.Creator CREATOR = + new Parcelable.Creator() { + public DisplayMode createFromParcel(Parcel in) { + return new DisplayMode(in); + } + + @Override + public DisplayMode[] newArray(int size) { + return new DisplayMode[size]; + } + }; + +} diff --git a/core/java/com/android/internal/custom/hardware/DisplayModeControl.java b/core/java/com/android/internal/custom/hardware/DisplayModeControl.java new file mode 100644 index 000000000000..206075649fd2 --- /dev/null +++ b/core/java/com/android/internal/custom/hardware/DisplayModeControl.java @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2015 The CyanogenMod Project + * Copyright (C) 2018 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.custom.hardware; + +/** + * Display Modes API + * + * A device may implement a list of preset display modes for different + * viewing intents, such as movies, photos, or extra vibrance. These + * modes may have multiple components such as gamma correction, white + * point adjustment, etc, but are activated by a single control point. + * + * This API provides support for enumerating and selecting the + * modes supported by the hardware. + */ + +public class DisplayModeControl { + + /** + * All HAF classes should export this boolean. + * Real implementations must, of course, return true + */ + public static boolean isSupported() { + return false; + } + + /** + * Get the list of available modes. A mode has an integer + * identifier and a string name. + * + * It is the responsibility of the upper layers to + * map the name to a human-readable format or perform translation. + */ + public static DisplayMode[] getAvailableModes() { + return new DisplayMode[0]; + } + + /** + * Get the name of the currently selected mode. This can return + * null if no mode is selected. + */ + public static DisplayMode getCurrentMode() { + return null; + } + + /** + * Selects a mode from the list of available modes by it's + * string identifier. Returns true on success, false for + * failure. It is up to the implementation to determine + * if this mode is valid. + */ + public static boolean setMode(DisplayMode mode, boolean makeDefault) { + return false; + } + + /** + * Gets the preferred default mode for this device by it's + * string identifier. Can return null if there is no default. + */ + public static DisplayMode getDefaultMode() { + return null; + } +} diff --git a/core/java/com/android/internal/custom/hardware/HIDLHelper.java b/core/java/com/android/internal/custom/hardware/HIDLHelper.java new file mode 100644 index 000000000000..490145f33c05 --- /dev/null +++ b/core/java/com/android/internal/custom/hardware/HIDLHelper.java @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.custom.hardware; + +import android.util.Range; + +import com.android.internal.custom.hardware.DisplayMode; +import com.android.internal.custom.hardware.HSIC; + +import java.util.ArrayList; + +class HIDLHelper { + + static DisplayMode[] fromHIDLModes( + ArrayList modes) { + int size = modes.size(); + DisplayMode[] r = new DisplayMode[size]; + for (int i = 0; i < size; i++) { + vendor.lineage.livedisplay.V2_0.DisplayMode m = modes.get(i); + r[i] = new DisplayMode(m.id, m.name); + } + return r; + } + + static DisplayMode fromHIDLMode( + vendor.lineage.livedisplay.V2_0.DisplayMode mode) { + return new DisplayMode(mode.id, mode.name); + } + + static HSIC fromHIDLHSIC(vendor.lineage.livedisplay.V2_0.HSIC hsic) { + return new HSIC(hsic.hue, hsic.saturation, hsic.intensity, + hsic.contrast, hsic.saturationThreshold); + } + + static vendor.lineage.livedisplay.V2_0.HSIC toHIDLHSIC(HSIC hsic) { + vendor.lineage.livedisplay.V2_0.HSIC h = new vendor.lineage.livedisplay.V2_0.HSIC(); + h.hue = hsic.getHue(); + h.saturation = hsic.getSaturation(); + h.intensity = hsic.getIntensity(); + h.contrast = hsic.getContrast(); + h.saturationThreshold = hsic.getSaturationThreshold(); + return h; + } + + static Range fromHIDLRange(vendor.lineage.livedisplay.V2_0.Range range) { + return new Range(range.min, range.max); + } + + static Range fromHIDLRange(vendor.lineage.livedisplay.V2_0.FloatRange range) { + return new Range(range.min, range.max); + } + +} diff --git a/core/java/com/android/internal/custom/hardware/HSIC.aidl b/core/java/com/android/internal/custom/hardware/HSIC.aidl new file mode 100644 index 000000000000..721a3771f769 --- /dev/null +++ b/core/java/com/android/internal/custom/hardware/HSIC.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2015 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.custom.hardware; + +parcelable HSIC; diff --git a/core/java/com/android/internal/custom/hardware/HSIC.java b/core/java/com/android/internal/custom/hardware/HSIC.java new file mode 100644 index 000000000000..92f033dc3434 --- /dev/null +++ b/core/java/com/android/internal/custom/hardware/HSIC.java @@ -0,0 +1,128 @@ +/* + * Copyright (C) 2016 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.internal.custom.hardware; + +import android.graphics.Color; +import android.os.Parcel; +import android.os.Parcelable; +import android.text.TextUtils; + +import java.util.Locale; + +public class HSIC implements Parcelable { + + private final float mHue; + private final float mSaturation; + private final float mIntensity; + private final float mContrast; + private final float mSaturationThreshold; + + public HSIC(float hue, float saturation, float intensity, + float contrast, float saturationThreshold) { + mHue = hue; + mSaturation = saturation; + mIntensity = intensity; + mContrast = contrast; + mSaturationThreshold = saturationThreshold; + } + + public float getHue() { + return mHue; + } + + public float getSaturation() { + return mSaturation; + } + + public float getIntensity() { + return mIntensity; + } + + public float getContrast() { + return mContrast; + } + + public float getSaturationThreshold() { + return mSaturationThreshold; + } + + public String flatten() { + return String.format(Locale.US, "%f|%f|%f|%f|%f", mHue, mSaturation, + mIntensity, mContrast, mSaturationThreshold); + } + + public static HSIC unflattenFrom(String flat) throws NumberFormatException { + final String[] unflat = TextUtils.split(flat, "\\|"); + if (unflat.length != 4 && unflat.length != 5) { + throw new NumberFormatException("Failed to unflatten HSIC values: " + flat); + } + return new HSIC(Float.parseFloat(unflat[0]), Float.parseFloat(unflat[1]), + Float.parseFloat(unflat[2]), Float.parseFloat(unflat[3]), + unflat.length == 5 ? Float.parseFloat(unflat[4]) : 0.0f); + } + + public int[] toRGB() { + final int c = Color.HSVToColor(toFloatArray()); + return new int[] { Color.red(c), Color.green(c), Color.blue(c) }; + } + + public float[] toFloatArray() { + return new float[] { mHue, mSaturation, mIntensity, mContrast, mSaturationThreshold }; + } + + public static HSIC fromFloatArray(float[] hsic) { + if (hsic.length == 5) { + return new HSIC(hsic[0], hsic[1], hsic[2], hsic[3], hsic[4]); + } else if (hsic.length == 4) { + return new HSIC(hsic[0], hsic[1], hsic[2], hsic[3], 0.0f); + } + return null; + } + + @Override + public String toString() { + return String.format(Locale.US, "HSIC={ hue=%f saturation=%f intensity=%f " + + "contrast=%f saturationThreshold=%f }", + mHue, mSaturation, mIntensity, mContrast, mSaturationThreshold); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel parcel, int i) { + parcel.writeFloatArray(toFloatArray()); + } + + /** + * @hide + */ + public static final Parcelable.Creator CREATOR = + new Parcelable.Creator() { + public HSIC createFromParcel(Parcel in) { + float[] fromParcel = new float[5]; + in.readFloatArray(fromParcel); + return HSIC.fromFloatArray(fromParcel); + } + + @Override + public HSIC[] newArray(int size) { + return new HSIC[size]; + } + }; +}; diff --git a/core/java/com/android/internal/custom/hardware/ILineageHardwareService.aidl b/core/java/com/android/internal/custom/hardware/ILineageHardwareService.aidl new file mode 100644 index 000000000000..4f4eadc4fcfc --- /dev/null +++ b/core/java/com/android/internal/custom/hardware/ILineageHardwareService.aidl @@ -0,0 +1,51 @@ +/** + * Copyright (c) 2015-2016 The CyanogenMod Project + * 2017-2018 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.custom.hardware; + +import com.android.internal.custom.hardware.DisplayMode; +import com.android.internal.custom.hardware.HSIC; + +/** @hide */ +interface ILineageHardwareService { + + int getSupportedFeatures(); + boolean get(int feature); + boolean set(int feature, boolean enable); + + int[] getDisplayColorCalibration(); + boolean setDisplayColorCalibration(in int[] rgb); + + boolean requireAdaptiveBacklightForSunlightEnhancement(); + + DisplayMode[] getDisplayModes(); + DisplayMode getCurrentDisplayMode(); + DisplayMode getDefaultDisplayMode(); + boolean setDisplayMode(in DisplayMode mode, boolean makeDefault); + + boolean isSunlightEnhancementSelfManaged(); + + int getColorBalanceMin(); + int getColorBalanceMax(); + int getColorBalance(); + boolean setColorBalance(int value); + + HSIC getPictureAdjustment(); + HSIC getDefaultPictureAdjustment(); + boolean setPictureAdjustment(in HSIC hsic); + float[] getPictureAdjustmentRanges(); +} diff --git a/core/java/com/android/internal/custom/hardware/ILiveDisplayService.aidl b/core/java/com/android/internal/custom/hardware/ILiveDisplayService.aidl new file mode 100644 index 000000000000..01c36469c0db --- /dev/null +++ b/core/java/com/android/internal/custom/hardware/ILiveDisplayService.aidl @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2016, The CyanogenMod Project + * 2021 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.custom.hardware; + +import com.android.internal.custom.hardware.HSIC; +import com.android.internal.custom.hardware.LiveDisplayConfig; + +/** @hide */ +interface ILiveDisplayService { + LiveDisplayConfig getConfig(); + + int getMode(); + boolean setMode(int mode); + + float[] getColorAdjustment(); + boolean setColorAdjustment(in float[] adj); + + boolean isAutoContrastEnabled(); + boolean setAutoContrastEnabled(boolean enabled); + + boolean isCABCEnabled(); + boolean setCABCEnabled(boolean enabled); + + boolean isColorEnhancementEnabled(); + boolean setColorEnhancementEnabled(boolean enabled); + + int getDayColorTemperature(); + boolean setDayColorTemperature(int temperature); + + int getNightColorTemperature(); + boolean setNightColorTemperature(int temperature); + + int getColorTemperature(); + + boolean isAutomaticOutdoorModeEnabled(); + boolean setAutomaticOutdoorModeEnabled(boolean enabled); + + HSIC getPictureAdjustment(); + HSIC getDefaultPictureAdjustment(); + boolean setPictureAdjustment(in HSIC adj); + boolean isNight(); + + boolean isAntiFlickerEnabled(); + boolean setAntiFlickerEnabled(boolean enabled); +} diff --git a/core/java/com/android/internal/custom/hardware/LineageHardwareManager.java b/core/java/com/android/internal/custom/hardware/LineageHardwareManager.java new file mode 100644 index 000000000000..120b243af09d --- /dev/null +++ b/core/java/com/android/internal/custom/hardware/LineageHardwareManager.java @@ -0,0 +1,774 @@ +/* + * Copyright (C) 2015-2016 The CyanogenMod Project + * 2017-2021 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.internal.custom.hardware; + +import android.content.Context; +import android.hidl.base.V1_0.IBase; +import android.os.IBinder; +import android.os.RemoteException; +import android.os.ServiceManager; +import android.util.ArrayMap; +import android.util.Log; +import android.util.Range; + +import com.android.internal.annotations.VisibleForTesting; +import com.android.internal.util.ArrayUtils; + +import com.android.internal.custom.app.LineageContextConstants; +import com.android.internal.custom.hardware.DisplayMode; +import com.android.internal.custom.hardware.HIDLHelper; +import com.android.internal.custom.hardware.HSIC; + +import vendor.lineage.livedisplay.V2_0.IAdaptiveBacklight; +import vendor.lineage.livedisplay.V2_0.IAutoContrast; +import vendor.lineage.livedisplay.V2_0.IColorBalance; +import vendor.lineage.livedisplay.V2_0.IColorEnhancement; +import vendor.lineage.livedisplay.V2_0.IDisplayColorCalibration; +import vendor.lineage.livedisplay.V2_0.IDisplayModes; +import vendor.lineage.livedisplay.V2_0.IPictureAdjustment; +import vendor.lineage.livedisplay.V2_0.IReadingEnhancement; +import vendor.lineage.livedisplay.V2_0.ISunlightEnhancement; +import vendor.lineage.livedisplay.V2_1.IAntiFlicker; + +import java.io.UnsupportedEncodingException; +import java.lang.IllegalArgumentException; +import java.lang.reflect.Field; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.NoSuchElementException; + +/** + * Manages access to LineageOS hardware extensions + * + *

+ * This manager requires the HARDWARE_ABSTRACTION_ACCESS permission. + *

+ * To get the instance of this class, utilize LineageHardwareManager#getInstance(Context context) + */ +public final class LineageHardwareManager { + private static final String TAG = "LineageHardwareManager"; + + // The VisibleForTesting annotation is to ensure Proguard doesn't remove these + // fields, as they might be used via reflection. When the @Keep annotation in + // the support library is properly handled in the platform, we should change this. + + /** + * Adaptive backlight support (this refers to technologies like NVIDIA SmartDimmer, + * QCOM CABL or Samsung CABC) + */ + @VisibleForTesting + public static final int FEATURE_ADAPTIVE_BACKLIGHT = 0x1; + + /** + * Color enhancement support + */ + @VisibleForTesting + public static final int FEATURE_COLOR_ENHANCEMENT = 0x2; + + /** + * Display RGB color calibration + */ + @VisibleForTesting + public static final int FEATURE_DISPLAY_COLOR_CALIBRATION = 0x4; + + /** + * Increased display readability in bright light + */ + @VisibleForTesting + public static final int FEATURE_SUNLIGHT_ENHANCEMENT = 0x10; + + /** + * Auto contrast + */ + @VisibleForTesting + public static final int FEATURE_AUTO_CONTRAST = 0x20; + + /** + * Display modes + */ + @VisibleForTesting + public static final int FEATURE_DISPLAY_MODES = 0x100; + + /** + * Reading mode + */ + @VisibleForTesting + public static final int FEATURE_READING_ENHANCEMENT = 0x400; + + /** + * Color balance + */ + @VisibleForTesting + public static final int FEATURE_COLOR_BALANCE = 0x800; + + /** + * HSIC picture adjustment + */ + @VisibleForTesting + public static final int FEATURE_PICTURE_ADJUSTMENT = 0x1000; + + /** + * Anti flicker mode + */ + @VisibleForTesting + public static final int FEATURE_ANTI_FLICKER = 0x200000; + + private static final List BOOLEAN_FEATURES = Arrays.asList( + FEATURE_ADAPTIVE_BACKLIGHT, + FEATURE_ANTI_FLICKER, + FEATURE_AUTO_CONTRAST, + FEATURE_COLOR_ENHANCEMENT, + FEATURE_SUNLIGHT_ENHANCEMENT, + FEATURE_READING_ENHANCEMENT + ); + + private static ILineageHardwareService sService; + private static LineageHardwareManager sLineageHardwareManagerInstance; + + private Context mContext; + + private final ArrayMap mDisplayModeMappings = new ArrayMap(); + private final boolean mFilterDisplayModes; + + // HIDL hals + private HashMap mHIDLMap = new HashMap(); + + /** + * @hide to prevent subclassing from outside of the framework + */ + private LineageHardwareManager(Context context) { + Context appContext = context.getApplicationContext(); + if (appContext != null) { + mContext = appContext; + } else { + mContext = context; + } + sService = getService(); + + if (!checkService()) { + Log.wtf(TAG, "Unable to get LineageHardwareService. The service either" + + " crashed, was not started, or the interface has been called to early in" + + " SystemServer init"); + } + + final String[] mappings = mContext.getResources().getStringArray( + com.android.internal.R.array.config_displayModeMappings); + if (mappings != null && mappings.length > 0) { + for (String mapping : mappings) { + String[] split = mapping.split(":"); + if (split.length == 2) { + mDisplayModeMappings.put(split[0], split[1]); + } + } + } + mFilterDisplayModes = mContext.getResources().getBoolean( + com.android.internal.R.bool.config_filterDisplayModes); + } + + /** + * Get or create an instance of the {@link com.android.internal.custom.hardware.LineageHardwareManager} + * @param context + * @return {@link LineageHardwareManager} + */ + public static LineageHardwareManager getInstance(Context context) { + if (sLineageHardwareManagerInstance == null) { + sLineageHardwareManagerInstance = new LineageHardwareManager(context); + } + return sLineageHardwareManagerInstance; + } + + /** @hide */ + public static ILineageHardwareService getService() { + if (sService != null) { + return sService; + } + IBinder b = ServiceManager.getService(LineageContextConstants.LINEAGE_HARDWARE_SERVICE); + if (b != null) { + sService = ILineageHardwareService.Stub.asInterface(b); + return sService; + } + return null; + } + + /** + * Determine if a Lineage Hardware feature is supported on this device + * + * @param feature The Lineage Hardware feature to query + * + * @return true if the feature is supported, false otherwise. + */ + public boolean isSupported(int feature) { + return isSupportedHIDL(feature) || isSupportedLegacy(feature); + } + + private boolean isSupportedHIDL(int feature) { + if (!mHIDLMap.containsKey(feature)) { + mHIDLMap.put(feature, getHIDLService(feature)); + } + return mHIDLMap.get(feature) != null; + } + + private boolean isSupportedLegacy(int feature) { + try { + if (checkService()) { + return feature == (sService.getSupportedFeatures() & feature); + } + } catch (RemoteException e) { + } + return false; + } + + private IBase getHIDLService(int feature) { + try { + switch (feature) { + case FEATURE_ADAPTIVE_BACKLIGHT: + return IAdaptiveBacklight.getService(true); + case FEATURE_ANTI_FLICKER: + return IAntiFlicker.getService(true); + case FEATURE_AUTO_CONTRAST: + return IAutoContrast.getService(true); + case FEATURE_COLOR_BALANCE: + return IColorBalance.getService(true); + case FEATURE_COLOR_ENHANCEMENT: + return IColorEnhancement.getService(true); + case FEATURE_DISPLAY_COLOR_CALIBRATION: + return IDisplayColorCalibration.getService(true); + case FEATURE_DISPLAY_MODES: + return IDisplayModes.getService(true); + case FEATURE_PICTURE_ADJUSTMENT: + return IPictureAdjustment.getService(true); + case FEATURE_READING_ENHANCEMENT: + return IReadingEnhancement.getService(true); + case FEATURE_SUNLIGHT_ENHANCEMENT: + return ISunlightEnhancement.getService(true); + } + } catch (NoSuchElementException | RemoteException e) { + } + return null; + } + + /** + * String version for preference constraints + * + * @hide + */ + public boolean isSupported(String feature) { + if (!feature.startsWith("FEATURE_")) { + return false; + } + try { + Field f = getClass().getField(feature); + if (f != null) { + return isSupported((int) f.get(null)); + } + } catch (NoSuchFieldException | IllegalAccessException e) { + Log.d(TAG, e.getMessage(), e); + } + + return false; + } + /** + * Determine if the given feature is enabled or disabled. + * + * Only used for features which have simple enable/disable controls. + * + * @param feature the Lineage Hardware feature to query + * + * @return true if the feature is enabled, false otherwise. + */ + public boolean get(int feature) { + if (!BOOLEAN_FEATURES.contains(feature)) { + throw new IllegalArgumentException(feature + " is not a boolean"); + } + + try { + if (isSupportedHIDL(feature)) { + IBase obj = mHIDLMap.get(feature); + switch (feature) { + case FEATURE_ADAPTIVE_BACKLIGHT: + IAdaptiveBacklight adaptiveBacklight = (IAdaptiveBacklight) obj; + return adaptiveBacklight.isEnabled(); + case FEATURE_ANTI_FLICKER: + IAntiFlicker antiFlicker = (IAntiFlicker) obj; + return antiFlicker.isEnabled(); + case FEATURE_AUTO_CONTRAST: + IAutoContrast autoContrast = (IAutoContrast) obj; + return autoContrast.isEnabled(); + case FEATURE_COLOR_ENHANCEMENT: + IColorEnhancement colorEnhancement = (IColorEnhancement) obj; + return colorEnhancement.isEnabled(); + case FEATURE_SUNLIGHT_ENHANCEMENT: + ISunlightEnhancement sunlightEnhancement = (ISunlightEnhancement) obj; + return sunlightEnhancement.isEnabled(); + case FEATURE_READING_ENHANCEMENT: + IReadingEnhancement readingEnhancement = (IReadingEnhancement) obj; + return readingEnhancement.isEnabled(); + } + } else if (checkService()) { + return sService.get(feature); + } + } catch (RemoteException e) { + } + return false; + } + + /** + * Enable or disable the given feature + * + * Only used for features which have simple enable/disable controls. + * + * @param feature the Lineage Hardware feature to set + * @param enable true to enable, false to disale + * + * @return true if the feature is enabled, false otherwise. + */ + public boolean set(int feature, boolean enable) { + if (!BOOLEAN_FEATURES.contains(feature)) { + throw new IllegalArgumentException(feature + " is not a boolean"); + } + + try { + if (isSupportedHIDL(feature)) { + IBase obj = mHIDLMap.get(feature); + switch (feature) { + case FEATURE_ADAPTIVE_BACKLIGHT: + IAdaptiveBacklight adaptiveBacklight = (IAdaptiveBacklight) obj; + return adaptiveBacklight.setEnabled(enable); + case FEATURE_ANTI_FLICKER: + IAntiFlicker antiFlicker = (IAntiFlicker) obj; + return antiFlicker.setEnabled(enable); + case FEATURE_AUTO_CONTRAST: + IAutoContrast autoContrast = (IAutoContrast) obj; + return autoContrast.setEnabled(enable); + case FEATURE_COLOR_ENHANCEMENT: + IColorEnhancement colorEnhancement = (IColorEnhancement) obj; + return colorEnhancement.setEnabled(enable); + case FEATURE_SUNLIGHT_ENHANCEMENT: + ISunlightEnhancement sunlightEnhancement = (ISunlightEnhancement) obj; + return sunlightEnhancement.setEnabled(enable); + case FEATURE_READING_ENHANCEMENT: + IReadingEnhancement readingEnhancement = (IReadingEnhancement) obj; + return readingEnhancement.setEnabled(enable); + } + } else if (checkService()) { + return sService.set(feature, enable); + } + } catch (RemoteException e) { + } + return false; + } + + private int getArrayValue(int[] arr, int idx, int defaultValue) { + if (arr == null || arr.length <= idx) { + return defaultValue; + } + + return arr[idx]; + } + + /** + * {@hide} + */ + public static final int COLOR_CALIBRATION_RED_INDEX = 0; + /** + * {@hide} + */ + public static final int COLOR_CALIBRATION_GREEN_INDEX = 1; + /** + * {@hide} + */ + public static final int COLOR_CALIBRATION_BLUE_INDEX = 2; + /** + * {@hide} + */ + public static final int COLOR_CALIBRATION_MIN_INDEX = 3; + /** + * {@hide} + */ + public static final int COLOR_CALIBRATION_MAX_INDEX = 4; + + private int[] getDisplayColorCalibrationArray() { + try { + if (isSupportedHIDL(FEATURE_DISPLAY_COLOR_CALIBRATION)) { + IDisplayColorCalibration displayColorCalibration = (IDisplayColorCalibration) + mHIDLMap.get(FEATURE_DISPLAY_COLOR_CALIBRATION); + return ArrayUtils.convertToIntArray(displayColorCalibration.getCalibration()); + } else if (checkService()) { + return sService.getDisplayColorCalibration(); + } + } catch (RemoteException e) { + } + return null; + } + + /** + * @return the current RGB calibration, where int[0] = R, int[1] = G, int[2] = B. + */ + public int[] getDisplayColorCalibration() { + int[] arr = getDisplayColorCalibrationArray(); + if (arr == null || arr.length < 3) { + return null; + } + return Arrays.copyOf(arr, 3); + } + + /** + * @return The minimum value for all colors + */ + public int getDisplayColorCalibrationMin() { + if (isSupportedHIDL(FEATURE_DISPLAY_COLOR_CALIBRATION)) { + IDisplayColorCalibration displayColorCalibration = (IDisplayColorCalibration) + mHIDLMap.get(FEATURE_DISPLAY_COLOR_CALIBRATION); + try { + return displayColorCalibration.getMinValue(); + } catch (RemoteException e) { + return 0; + } + } + + return getArrayValue(getDisplayColorCalibrationArray(), COLOR_CALIBRATION_MIN_INDEX, 0); + } + + /** + * @return The maximum value for all colors + */ + public int getDisplayColorCalibrationMax() { + if (isSupportedHIDL(FEATURE_DISPLAY_COLOR_CALIBRATION)) { + IDisplayColorCalibration displayColorCalibration = (IDisplayColorCalibration) + mHIDLMap.get(FEATURE_DISPLAY_COLOR_CALIBRATION); + try { + return displayColorCalibration.getMaxValue(); + } catch (RemoteException e) { + return 0; + } + } + + return getArrayValue(getDisplayColorCalibrationArray(), COLOR_CALIBRATION_MAX_INDEX, 0); + } + + /** + * Set the display color calibration to the given rgb triplet + * + * @param rgb RGB color calibration. Each value must be between + * {@link #getDisplayColorCalibrationMin()} and {@link #getDisplayColorCalibrationMax()}, + * inclusive. + * + * @return true on success, false otherwise. + */ + public boolean setDisplayColorCalibration(int[] rgb) { + try { + if (isSupportedHIDL(FEATURE_DISPLAY_COLOR_CALIBRATION)) { + IDisplayColorCalibration displayColorCalibration = (IDisplayColorCalibration) + mHIDLMap.get(FEATURE_DISPLAY_COLOR_CALIBRATION); + return displayColorCalibration.setCalibration( + new ArrayList(Arrays.asList(rgb[0], rgb[1], rgb[2]))); + } else if (checkService()) { + return sService.setDisplayColorCalibration(rgb); + } + } catch (RemoteException e) { + } + return false; + } + + /** + * @return true if adaptive backlight should be enabled when sunlight enhancement + * is enabled. + */ + public boolean requireAdaptiveBacklightForSunlightEnhancement() { + if (isSupportedHIDL(FEATURE_SUNLIGHT_ENHANCEMENT)) { + return false; + } + + try { + if (checkService()) { + return sService.requireAdaptiveBacklightForSunlightEnhancement(); + } + } catch (RemoteException e) { + } + return false; + } + + /** + * @return true if this implementation does it's own lux metering + */ + public boolean isSunlightEnhancementSelfManaged() { + if (isSupportedHIDL(FEATURE_SUNLIGHT_ENHANCEMENT)) { + return false; + } + + try { + if (checkService()) { + return sService.isSunlightEnhancementSelfManaged(); + } + } catch (RemoteException e) { + } + return false; + } + + /** + * @return a list of available display modes on the devices + */ + public DisplayMode[] getDisplayModes() { + DisplayMode[] modes = null; + try { + if (isSupportedHIDL(FEATURE_DISPLAY_MODES)) { + IDisplayModes displayModes = (IDisplayModes) mHIDLMap.get(FEATURE_DISPLAY_MODES); + modes = HIDLHelper.fromHIDLModes(displayModes.getDisplayModes()); + } else if (checkService()) { + modes= sService.getDisplayModes(); + } + } catch (RemoteException e) { + } finally { + if (modes == null) { + return null; + } + final ArrayList remapped = new ArrayList(); + for (DisplayMode mode : modes) { + DisplayMode r = remapDisplayMode(mode); + if (r != null) { + remapped.add(r); + } + } + return remapped.toArray(new DisplayMode[0]); + } + } + + /** + * @return the currently active display mode + */ + public DisplayMode getCurrentDisplayMode() { + DisplayMode mode = null; + try { + if (isSupportedHIDL(FEATURE_DISPLAY_MODES)) { + IDisplayModes displayModes = (IDisplayModes) mHIDLMap.get(FEATURE_DISPLAY_MODES); + mode = HIDLHelper.fromHIDLMode(displayModes.getCurrentDisplayMode()); + } else if (checkService()) { + mode = sService.getCurrentDisplayMode(); + } + } catch (RemoteException e) { + } finally { + return mode != null ? remapDisplayMode(mode) : null; + } + } + + /** + * @return the default display mode to be set on boot + */ + public DisplayMode getDefaultDisplayMode() { + DisplayMode mode = null; + try { + if (isSupportedHIDL(FEATURE_DISPLAY_MODES)) { + IDisplayModes displayModes = (IDisplayModes) mHIDLMap.get(FEATURE_DISPLAY_MODES); + mode = HIDLHelper.fromHIDLMode(displayModes.getDefaultDisplayMode()); + } else if (checkService()) { + mode = sService.getDefaultDisplayMode(); + } + } catch (RemoteException e) { + } finally { + return mode != null ? remapDisplayMode(mode) : null; + } + } + + /** + * @return true if setting the mode was successful + */ + public boolean setDisplayMode(DisplayMode mode, boolean makeDefault) { + try { + if (isSupportedHIDL(FEATURE_DISPLAY_MODES)) { + IDisplayModes displayModes = (IDisplayModes) mHIDLMap.get(FEATURE_DISPLAY_MODES); + return displayModes.setDisplayMode(mode.id, makeDefault); + } else if (checkService()) { + return sService.setDisplayMode(mode, makeDefault); + } + } catch (RemoteException e) { + } + return false; + } + + private DisplayMode remapDisplayMode(DisplayMode in) { + if (in == null) { + return null; + } + if (mDisplayModeMappings.containsKey(in.name)) { + return new DisplayMode(in.id, mDisplayModeMappings.get(in.name)); + } + if (!mFilterDisplayModes) { + return in; + } + return null; + } + + /** + * @return the available range for color temperature adjustments + */ + public Range getColorBalanceRange() { + try { + if (isSupportedHIDL(FEATURE_COLOR_BALANCE)) { + IColorBalance colorBalance = (IColorBalance) mHIDLMap.get(FEATURE_COLOR_BALANCE); + return HIDLHelper.fromHIDLRange(colorBalance.getColorBalanceRange()); + } else if (checkService()) { + return new Range( + sService.getColorBalanceMin(), + sService.getColorBalanceMax()); + } + } catch (RemoteException e) { + } + return new Range(0, 0); + } + + /** + * @return the current color balance value + */ + public int getColorBalance() { + try { + if (isSupportedHIDL(FEATURE_COLOR_BALANCE)) { + IColorBalance colorBalance = (IColorBalance) mHIDLMap.get(FEATURE_COLOR_BALANCE); + return colorBalance.getColorBalance(); + } else if (checkService()) { + return sService.getColorBalance(); + } + } catch (RemoteException e) { + } + return 0; + } + + /** + * Sets the desired color balance. Must fall within the range obtained from + * getColorBalanceRange() + * + * @param value + * @return true if success + */ + public boolean setColorBalance(int value) { + try { + if (isSupportedHIDL(FEATURE_COLOR_BALANCE)) { + IColorBalance colorBalance = (IColorBalance) mHIDLMap.get(FEATURE_COLOR_BALANCE); + return colorBalance.setColorBalance(value); + } else if (checkService()) { + return sService.setColorBalance(value); + } + } catch (RemoteException e) { + } + return false; + } + + /** + * Gets the current picture adjustment values + * + * @return HSIC object with current settings + */ + public HSIC getPictureAdjustment() { + try { + if (isSupportedHIDL(FEATURE_PICTURE_ADJUSTMENT)) { + IPictureAdjustment pictureAdjustment = (IPictureAdjustment) + mHIDLMap.get(FEATURE_PICTURE_ADJUSTMENT); + return HIDLHelper.fromHIDLHSIC(pictureAdjustment.getPictureAdjustment()); + } else if (checkService()) { + return sService.getPictureAdjustment(); + } + } catch (RemoteException e) { + } + return null; + } + + /** + * Gets the default picture adjustment for the current mode + * + * @return HSIC object with default settings + */ + public HSIC getDefaultPictureAdjustment() { + try { + if (isSupportedHIDL(FEATURE_PICTURE_ADJUSTMENT)) { + IPictureAdjustment pictureAdjustment = (IPictureAdjustment) + mHIDLMap.get(FEATURE_PICTURE_ADJUSTMENT); + return HIDLHelper.fromHIDLHSIC(pictureAdjustment.getDefaultPictureAdjustment()); + } else if (checkService()) { + return sService.getDefaultPictureAdjustment(); + } + } catch (RemoteException e) { + } + return null; + } + + /** + * Sets the desired hue/saturation/intensity/contrast + * + * @param hsic + * @return true if success + */ + public boolean setPictureAdjustment(final HSIC hsic) { + try { + if (isSupportedHIDL(FEATURE_PICTURE_ADJUSTMENT)) { + IPictureAdjustment pictureAdjustment = (IPictureAdjustment) + mHIDLMap.get(FEATURE_PICTURE_ADJUSTMENT); + return pictureAdjustment.setPictureAdjustment(HIDLHelper.toHIDLHSIC(hsic)); + } else if (checkService()) { + return sService.setPictureAdjustment(hsic); + } + } catch (RemoteException e) { + } + return false; + } + + /** + * Get a list of ranges valid for picture adjustment. + * + * @return range list + */ + public List> getPictureAdjustmentRanges() { + try { + if (isSupportedHIDL(FEATURE_PICTURE_ADJUSTMENT)) { + IPictureAdjustment pictureAdjustment = (IPictureAdjustment) + mHIDLMap.get(FEATURE_PICTURE_ADJUSTMENT); + return Arrays.asList( + HIDLHelper.fromHIDLRange(pictureAdjustment.getHueRange()), + HIDLHelper.fromHIDLRange(pictureAdjustment.getSaturationRange()), + HIDLHelper.fromHIDLRange(pictureAdjustment.getIntensityRange()), + HIDLHelper.fromHIDLRange(pictureAdjustment.getContrastRange()), + HIDLHelper.fromHIDLRange(pictureAdjustment.getSaturationThresholdRange())); + } else if (checkService()) { + float[] ranges = sService.getPictureAdjustmentRanges(); + if (ranges.length > 7) { + return Arrays.asList(new Range(ranges[0], ranges[1]), + new Range(ranges[2], ranges[3]), + new Range(ranges[4], ranges[5]), + new Range(ranges[6], ranges[7]), + (ranges.length > 9 ? + new Range(ranges[8], ranges[9]) : + new Range(0.0f, 0.0f))); + } + } + } catch (RemoteException e) { + } + return null; + } + + /** + * @return true if service is valid + */ + private boolean checkService() { + if (sService == null) { + Log.w(TAG, "not connected to LineageHardwareManagerService"); + return false; + } + return true; + } + +} diff --git a/core/java/com/android/internal/custom/hardware/LiveDisplayConfig.aidl b/core/java/com/android/internal/custom/hardware/LiveDisplayConfig.aidl new file mode 100644 index 000000000000..8a7a750cb8ef --- /dev/null +++ b/core/java/com/android/internal/custom/hardware/LiveDisplayConfig.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2016 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.custom.hardware; + +parcelable LiveDisplayConfig; diff --git a/core/java/com/android/internal/custom/hardware/LiveDisplayConfig.java b/core/java/com/android/internal/custom/hardware/LiveDisplayConfig.java new file mode 100644 index 000000000000..97b35e7d27e4 --- /dev/null +++ b/core/java/com/android/internal/custom/hardware/LiveDisplayConfig.java @@ -0,0 +1,386 @@ +/* + * Copyright (C) 2016 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.internal.custom.hardware; + +import static com.android.internal.custom.hardware.LiveDisplayManager.FEATURE_COLOR_BALANCE; +import static com.android.internal.custom.hardware.LiveDisplayManager.FEATURE_FIRST; +import static com.android.internal.custom.hardware.LiveDisplayManager.FEATURE_LAST; +import static com.android.internal.custom.hardware.LiveDisplayManager.MODE_FIRST; +import static com.android.internal.custom.hardware.LiveDisplayManager.MODE_LAST; +import static com.android.internal.custom.hardware.LiveDisplayManager.MODE_OFF; + +import android.os.Parcel; +import android.os.Parcelable; +import android.util.Range; + +import java.util.Arrays; +import java.util.BitSet; +import java.util.List; + +import com.android.internal.util.custom.Concierge; +import com.android.internal.util.custom.Concierge.ParcelInfo; + +/** + * Holder class for LiveDisplay static configuration. + * + * This class holds various defaults and hardware capabilities + * which are involved with LiveDisplay. + */ +public class LiveDisplayConfig implements Parcelable { + + private final BitSet mCapabilities; + private final BitSet mAllModes = new BitSet(); + + private final int mDefaultDayTemperature; + private final int mDefaultNightTemperature; + private final int mDefaultMode; + + private final boolean mDefaultAutoContrast; + private final boolean mDefaultAutoOutdoorMode; + private final boolean mDefaultCABC; + private final boolean mDefaultColorEnhancement; + + private final Range mColorTemperatureRange; + private final Range mColorBalanceRange; + private final Range mHueRange; + private final Range mSaturationRange; + private final Range mIntensityRange; + private final Range mContrastRange; + private final Range mSaturationThresholdRange; + + public LiveDisplayConfig(BitSet capabilities, int defaultMode, + int defaultDayTemperature, int defaultNightTemperature, + boolean defaultAutoOutdoorMode, boolean defaultAutoContrast, + boolean defaultCABC, boolean defaultColorEnhancement, + Range colorTemperatureRange, + Range colorBalanceRange, + Range hueRange, + Range saturationRange, + Range intensityRange, + Range contrastRange, + Range saturationThresholdRange) { + super(); + mCapabilities = (BitSet) capabilities.clone(); + mAllModes.set(MODE_FIRST, MODE_LAST); + mDefaultMode = defaultMode; + mDefaultDayTemperature = defaultDayTemperature; + mDefaultNightTemperature = defaultNightTemperature; + mDefaultAutoContrast = defaultAutoContrast; + mDefaultAutoOutdoorMode = defaultAutoOutdoorMode; + mDefaultCABC = defaultCABC; + mDefaultColorEnhancement = defaultColorEnhancement; + mColorTemperatureRange = colorTemperatureRange; + mColorBalanceRange = colorBalanceRange; + mHueRange = hueRange; + mSaturationRange = saturationRange; + mIntensityRange = intensityRange; + mContrastRange = contrastRange; + mSaturationThresholdRange = saturationThresholdRange; + } + + private LiveDisplayConfig(Parcel parcel) { + // Read parcelable version via the Concierge + ParcelInfo parcelInfo = Concierge.receiveParcel(parcel); + int parcelableVersion = parcelInfo.getParcelVersion(); + + // temp vars + long capabilities = 0; + int defaultMode = 0; + int defaultDayTemperature = -1; + int defaultNightTemperature = -1; + boolean defaultAutoContrast = false; + boolean defaultAutoOutdoorMode = false; + boolean defaultCABC = false; + boolean defaultColorEnhancement = false; + int minColorTemperature = 0; + int maxColorTemperature = 0; + int minColorBalance = 0; + int maxColorBalance = 0; + float[] paRanges = new float[10]; + + capabilities = parcel.readLong(); + defaultMode = parcel.readInt(); + defaultDayTemperature = parcel.readInt(); + defaultNightTemperature = parcel.readInt(); + defaultAutoContrast = parcel.readInt() == 1; + defaultAutoOutdoorMode = parcel.readInt() == 1; + defaultCABC = parcel.readInt() == 1; + defaultColorEnhancement = parcel.readInt() == 1; + minColorTemperature = parcel.readInt(); + maxColorTemperature = parcel.readInt(); + minColorBalance = parcel.readInt(); + maxColorBalance = parcel.readInt(); + parcel.readFloatArray(paRanges); + + // set temps + mCapabilities = BitSet.valueOf(new long[] { capabilities }); + mAllModes.set(MODE_FIRST, MODE_LAST); + mDefaultMode = defaultMode; + mDefaultDayTemperature = defaultDayTemperature; + mDefaultNightTemperature = defaultNightTemperature; + mDefaultAutoContrast = defaultAutoContrast; + mDefaultAutoOutdoorMode = defaultAutoOutdoorMode; + mDefaultCABC = defaultCABC; + mDefaultColorEnhancement = defaultColorEnhancement; + mColorTemperatureRange = Range.create(minColorTemperature, maxColorTemperature); + mColorBalanceRange = Range.create(minColorBalance, maxColorBalance); + mHueRange = Range.create(paRanges[0], paRanges[1]); + mSaturationRange = Range.create(paRanges[2], paRanges[3]); + mIntensityRange = Range.create(paRanges[4], paRanges[5]); + mContrastRange = Range.create(paRanges[6], paRanges[7]); + mSaturationThresholdRange = Range.create(paRanges[8], paRanges[9]); + + // Complete parcel info for the concierge + parcelInfo.complete(); + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("capabilities=").append(mCapabilities.toString()); + sb.append(" defaultMode=").append(mDefaultMode); + sb.append(" defaultDayTemperature=").append(mDefaultDayTemperature); + sb.append(" defaultNightTemperature=").append(mDefaultNightTemperature); + sb.append(" defaultAutoOutdoorMode=").append(mDefaultAutoOutdoorMode); + sb.append(" defaultAutoContrast=").append(mDefaultAutoContrast); + sb.append(" defaultCABC=").append(mDefaultCABC); + sb.append(" defaultColorEnhancement=").append(mDefaultColorEnhancement); + sb.append(" colorTemperatureRange=").append(mColorTemperatureRange); + if (mCapabilities.get(LiveDisplayManager.FEATURE_COLOR_BALANCE)) { + sb.append(" colorBalanceRange=").append(mColorBalanceRange); + } + if (mCapabilities.get(LiveDisplayManager.FEATURE_PICTURE_ADJUSTMENT)) { + sb.append(" hueRange=").append(mHueRange); + sb.append(" saturationRange=").append(mSaturationRange); + sb.append(" intensityRange=").append(mIntensityRange); + sb.append(" contrastRange=").append(mContrastRange); + sb.append(" saturationThresholdRange=").append(mSaturationThresholdRange); + } + return sb.toString(); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + // Tell the concierge to prepare the parcel + ParcelInfo parcelInfo = Concierge.prepareParcel(out); + + // ==== FIG ===== + long[] caps = mCapabilities.toLongArray(); + out.writeLong(caps != null && caps.length > 0 ? caps[0] : 0L); + out.writeInt(mDefaultMode); + out.writeInt(mDefaultDayTemperature); + out.writeInt(mDefaultNightTemperature); + out.writeInt(mDefaultAutoContrast ? 1 : 0); + out.writeInt(mDefaultAutoOutdoorMode ? 1 : 0); + out.writeInt(mDefaultCABC ? 1 : 0); + out.writeInt(mDefaultColorEnhancement ? 1 : 0); + out.writeInt(mColorTemperatureRange.getLower()); + out.writeInt(mColorTemperatureRange.getUpper()); + out.writeInt(mColorBalanceRange.getLower()); + out.writeInt(mColorBalanceRange.getUpper()); + out.writeFloatArray(new float[] { + mHueRange.getLower(), mHueRange.getUpper(), + mSaturationRange.getLower(), mSaturationRange.getUpper(), + mIntensityRange.getLower(), mIntensityRange.getUpper(), + mContrastRange.getLower(), mContrastRange.getUpper(), + mSaturationThresholdRange.getLower(), mSaturationThresholdRange.getUpper() } ); + + // Complete the parcel info for the concierge + parcelInfo.complete(); + } + + /** + * Checks if a particular feature or mode is supported by the system. + * + * @param feature + * @return true if capable + */ + public boolean hasFeature(int feature) { + return ((feature >= MODE_FIRST && feature <= MODE_LAST) || + (feature >= FEATURE_FIRST && feature <= FEATURE_LAST)) && + (feature == MODE_OFF || mCapabilities.get(feature)); + } + + /** + * Checks if LiveDisplay is available for use on this device. + * + * @return true if any feature is enabled + */ + public boolean isAvailable() { + return !mCapabilities.isEmpty(); + } + + /** + * Checks if LiveDisplay has support for adaptive modes. + * + * @return true if adaptive modes are available + */ + public boolean hasModeSupport() { + return isAvailable() && mCapabilities.intersects(mAllModes); + } + + /** + * Gets the default color temperature to use in the daytime. This is typically + * set to 6500K, however this may not be entirely accurate. Use this value for + * resetting controls to the default. + * + * @return the default day temperature in K + */ + public int getDefaultDayTemperature() { + return mDefaultDayTemperature; + } + + /** + * Gets the default color temperature to use at night. This is typically set + * to 4500K, but this may not be entirely accurate. Use this value for resetting + * controls to defaults. + * + * @return the default night color temperature + */ + public int getDefaultNightTemperature() { + return mDefaultNightTemperature; + } + + /** + * Get the default adaptive mode. + * + * @return the default mode + */ + public int getDefaultMode() { + return mDefaultMode; + } + + /** + * Get the default value for auto contrast + * + * @return true if enabled + */ + public boolean getDefaultAutoContrast() { + return mDefaultAutoContrast; + } + + /** + * Get the default value for automatic outdoor mode + * + * @return true if enabled + */ + public boolean getDefaultAutoOutdoorMode() { + return mDefaultAutoOutdoorMode; + } + + /** + * Get the default value for CABC + * + * @return true if enabled + */ + public boolean getDefaultCABC() { + return mDefaultCABC; + } + + /** + * Get the default value for color enhancement + * + * @return true if enabled + */ + public boolean getDefaultColorEnhancement() { + return mDefaultColorEnhancement; + } + + /** + * Get the range of supported color temperatures + * + * @return range in Kelvin + */ + public Range getColorTemperatureRange() { + return mColorTemperatureRange; + } + + /** + * Get the range of supported color balance + * + * @return linear range which maps into the temperature range curve + */ + public Range getColorBalanceRange() { + return mColorBalanceRange; + } + + /** + * Get the supported range for hue adjustment + * + * @return float range + */ + public Range getHueRange() { return mHueRange; } + + /** + * Get the supported range for saturation adjustment + * + * @return float range + */ + public Range getSaturationRange() { return mSaturationRange; } + + /** + * Get the supported range for intensity adjustment + * + * @return float range + */ + public Range getIntensityRange() { return mIntensityRange; } + + /** + * Get the supported range for contrast adjustment + * + * @return float range + */ + public Range getContrastRange() { return mContrastRange; } + + /** + * Get the supported range for saturation threshold adjustment + * + * @return float range + */ + public Range getSaturationThresholdRange() { + return mSaturationThresholdRange; + } + + + /** + * Convenience method to get a list of all picture adjustment ranges + * with a single call. + * + * @return List of float ranges + */ + public List> getPictureAdjustmentRanges() { + return Arrays.asList(mHueRange, mSaturationRange, mIntensityRange, + mContrastRange, mSaturationThresholdRange); + } + + /** @hide */ + public static final Parcelable.Creator CREATOR = + new Parcelable.Creator() { + public LiveDisplayConfig createFromParcel(Parcel in) { + return new LiveDisplayConfig(in); + } + + @Override + public LiveDisplayConfig[] newArray(int size) { + return new LiveDisplayConfig[size]; + } + }; +} diff --git a/core/java/com/android/internal/custom/hardware/LiveDisplayManager.java b/core/java/com/android/internal/custom/hardware/LiveDisplayManager.java new file mode 100644 index 000000000000..0af1955838c9 --- /dev/null +++ b/core/java/com/android/internal/custom/hardware/LiveDisplayManager.java @@ -0,0 +1,535 @@ +/* + * Copyright (C) 2016 The CyanogenMod Project + * 2018-2021 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.internal.custom.hardware; + +import android.content.Context; +import android.os.IBinder; +import android.os.RemoteException; +import android.os.ServiceManager; +import android.util.Log; +import android.util.Range; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import com.android.internal.custom.app.LineageContextConstants; + +/** + * LiveDisplay is an advanced set of features for improving + * display quality under various ambient conditions. + * + * The backend service is constructed with a set of LiveDisplayFeatures + * which provide capabilities such as outdoor mode, night mode, + * and calibration. It interacts with LineageHardwareService to relay + * changes down to the lower layers. + * + * Multiple adaptive modes are supported, and various hardware + * features such as CABC, ACO and color enhancement are also + * managed by LiveDisplay. + */ +public class LiveDisplayManager { + + /** + * Disable all LiveDisplay adaptive features + */ + public static final int MODE_OFF = 0; + + /** + * Change color temperature to night mode + */ + public static final int MODE_NIGHT = 1; + + /** + * Enable automatic detection of appropriate mode + */ + public static final int MODE_AUTO = 2; + + /** + * Increase brightness/contrast/saturation for sunlight + */ + public static final int MODE_OUTDOOR = 3; + + /** + * Change color temperature to day mode, and allow + * detection of outdoor conditions + */ + public static final int MODE_DAY = 4; + + /** @hide */ + public static final int MODE_FIRST = MODE_OFF; + /** @hide */ + public static final int MODE_LAST = MODE_DAY; + + /** + * Content adaptive backlight control, adjust images to + * increase brightness in order to reduce backlight level + */ + public static final int FEATURE_CABC = 10; + + /** + * Adjust images to increase contrast + */ + public static final int FEATURE_AUTO_CONTRAST = 11; + + /** + * Adjust image to improve saturation and color + */ + public static final int FEATURE_COLOR_ENHANCEMENT = 12; + + /** + * Capable of adjusting RGB levels + */ + public static final int FEATURE_COLOR_ADJUSTMENT = 13; + + /** + * System supports outdoor mode, but environmental sensing + * is done by an external application. + */ + public static final int FEATURE_MANAGED_OUTDOOR_MODE = 14; + + /** + * System supports multiple display calibrations + * for different viewing intents. + */ + public static final int FEATURE_DISPLAY_MODES = 15; + + /** + * System supports direct range-based control of display + * color balance (temperature). This is preferred over + * simple RGB adjustment. + */ + public static final int FEATURE_COLOR_BALANCE = 16; + + /** + * System supports manual hue/saturation/intensity/contrast + * adjustment of display. + */ + public static final int FEATURE_PICTURE_ADJUSTMENT = 17; + + /** + * System supports grayscale matrix overlay + */ + public static final int FEATURE_READING_ENHANCEMENT = 18; + + /** + * System supports anti flicker mode + */ + public static final int FEATURE_ANTI_FLICKER = 19; + + public static final int ADJUSTMENT_HUE = 0; + public static final int ADJUSTMENT_SATURATION = 1; + public static final int ADJUSTMENT_INTENSITY = 2; + public static final int ADJUSTMENT_CONTRAST = 3; + + /** @hide */ + public static final int FEATURE_FIRST = FEATURE_CABC; + /** @hide */ + public static final int FEATURE_LAST = FEATURE_ANTI_FLICKER; + + private static final String TAG = "LiveDisplay"; + + private final Context mContext; + private LiveDisplayConfig mConfig; + + private static LiveDisplayManager sInstance; + private static ILiveDisplayService sService; + + /** + * @hide to prevent subclassing from outside of the framework + */ + private LiveDisplayManager(Context context) { + Context appContext = context.getApplicationContext(); + if (appContext != null) { + mContext = appContext; + } else { + mContext = context; + } + sService = getService(); + + if (!checkService()) { + Log.wtf(TAG, "Unable to get LiveDisplayService. The service either" + + " crashed, was not started, or the interface has been called to early in" + + " SystemServer init"); + } + } + + /** + * Get or create an instance of the {@link com.android.internal.custom.hardware.LiveDisplayManager} + * @param context + * @return {@link LiveDisplayManager} + */ + public synchronized static LiveDisplayManager getInstance(Context context) { + if (sInstance == null) { + sInstance = new LiveDisplayManager(context); + } + return sInstance; + } + + /** @hide */ + public static ILiveDisplayService getService() { + if (sService != null) { + return sService; + } + IBinder b = ServiceManager.getService(LineageContextConstants.LINEAGE_LIVEDISPLAY_SERVICE); + if (b != null) { + sService = ILiveDisplayService.Stub.asInterface(b); + return sService; + } + return null; + } + + /** + * @return true if service is valid + */ + private boolean checkService() { + if (sService == null) { + Log.w(TAG, "not connected to LineageHardwareManagerService"); + return false; + } + return true; + } + + /** + * Gets the static configuration and settings. + * + * @return the configuration + */ + public LiveDisplayConfig getConfig() { + try { + if (mConfig == null) { + mConfig = checkService() ? sService.getConfig() : null; + } + return mConfig; + } catch (RemoteException e) { + return null; + } + } + + /** + * Returns the current adaptive mode. + * + * @return id of the selected mode + */ + public int getMode() { + try { + return checkService() ? sService.getMode() : MODE_OFF; + } catch (RemoteException e) { + return MODE_OFF; + } + } + + /** + * Selects a new adaptive mode. + * + * @param mode + * @return true if the mode was selected + */ + public boolean setMode(int mode) { + try { + return checkService() && sService.setMode(mode); + } catch (RemoteException e) { + return false; + } + } + + /** + * Checks if the auto contrast optimization feature is enabled. + * + * @return true if enabled + */ + public boolean isAutoContrastEnabled() { + try { + return checkService() && sService.isAutoContrastEnabled(); + } catch (RemoteException e) { + return false; + } + } + + /** + * Sets the state of auto contrast optimization + * + * @param enabled + * @return true if state was changed + */ + public boolean setAutoContrastEnabled(boolean enabled) { + try { + return checkService() && sService.setAutoContrastEnabled(enabled); + } catch (RemoteException e) { + return false; + } + } + + /** + * Checks if the CABC feature is enabled + * + * @return true if enabled + */ + public boolean isCABCEnabled() { + try { + return checkService() && sService.isCABCEnabled(); + } catch (RemoteException e) { + return false; + } + } + + /** + * Sets the state of CABC + * + * @param enabled + * @return true if state was changed + */ + public boolean setCABCEnabled(boolean enabled) { + try { + return checkService() && sService.setCABCEnabled(enabled); + } catch (RemoteException e) { + return false; + } + } + + /** + * Checks if the color enhancement feature is enabled + * + * @return true if enabled + */ + public boolean isColorEnhancementEnabled() { + try { + return checkService() && sService.isColorEnhancementEnabled(); + } catch (RemoteException e) { + return false; + } + } + + /** + * Sets the state of color enhancement + * + * @param enabled + * @return true if state was changed + */ + public boolean setColorEnhancementEnabled(boolean enabled) { + try { + return checkService() && sService.setColorEnhancementEnabled(enabled); + } catch (RemoteException e) { + return false; + } + } + + /** + * Gets the user-specified color temperature to use in the daytime. + * + * @return the day color temperature + */ + public int getDayColorTemperature() { + try { + return checkService() ? sService.getDayColorTemperature() : -1; + } catch (RemoteException e) { + return -1; + } + } + + /** + * Sets the color temperature to use in the daytime. + * + * @param temperature + * @return true if state was changed + */ + public boolean setDayColorTemperature(int temperature) { + try { + return checkService() && sService.setDayColorTemperature(temperature); + } catch (RemoteException e) { + return false; + } + } + + /** + * Gets the user-specified color temperature to use at night. + * + * @return the night color temperature + */ + public int getNightColorTemperature() { + try { + return checkService() ? sService.getNightColorTemperature() : -1; + } catch (RemoteException e) { + return -1; + } + } + + /** + * Sets the color temperature to use at night. + * + * @param temperature + * @return true if state was changed + */ + public boolean setNightColorTemperature(int temperature) { + try { + return checkService() && sService.setNightColorTemperature(temperature); + } catch (RemoteException e) { + return false; + } + } + + /** + * Checks if outdoor mode should be enabled automatically when under extremely high + * ambient light. This is typically around 12000 lux. + * + * @return if outdoor conditions should be detected + */ + public boolean isAutomaticOutdoorModeEnabled() { + try { + return checkService() && sService.isAutomaticOutdoorModeEnabled(); + } catch (RemoteException e) { + return false; + } + } + + /** + * Enables automatic detection of outdoor conditions. Outdoor mode is triggered + * when high ambient light is detected and it's not night. + * + * @param enabled + * @return true if state was changed + */ + public boolean setAutomaticOutdoorModeEnabled(boolean enabled) { + try { + return checkService() && sService.setAutomaticOutdoorModeEnabled(enabled); + } catch (RemoteException e) { + return false; + } + } + + /** + * Gets the current RGB triplet which is applied as a color adjustment. + * The values are floats between 0 and 1. A setting of { 1.0, 1.0, 1.0 } + * means that no adjustment is made. + * + * @return array of { R, G, B } offsets + */ + public float[] getColorAdjustment() { + try { + if (checkService()) { + return sService.getColorAdjustment(); + } + } catch (RemoteException e) { + } + return new float[] { 1.0f, 1.0f, 1.0f }; + } + + /** + * Sets the color adjustment to use. This can be set by the user to calibrate + * their screen. This should be sent in the format { R, G, B } as floats from + * 0 to 1. A setting of { 1.0, 1.0, 1.0 } means that no adjustment is made. + * The hardware implementation may refuse certain values which make the display + * unreadable, such as { 0, 0, 0 }. This calibration will be combined with other + * internal adjustments, such as night mode, if necessary. + * + * @param array of { R, G, B } offsets + * @return true if state was changed + */ + public boolean setColorAdjustment(float[] adj) { + try { + return checkService() && sService.setColorAdjustment(adj); + } catch (RemoteException e) { + return false; + } + } + + /** + * Gets the current picture adjustment settings (hue, saturation, intensity, contrast) + * + * @return HSIC object with current settings + */ + public HSIC getPictureAdjustment() { + try { + if (checkService()) { + return sService.getPictureAdjustment(); + } + } catch (RemoteException e) { + } + return null; + } + + /** + * Sets a new picture adjustment + * + * @param hsic + * @return true if success + */ + public boolean setPictureAdjustment(final HSIC hsic) { + try { + return checkService() && sService.setPictureAdjustment(hsic); + } catch (RemoteException e) { + } + return false; + } + + /** + * Gets the default picture adjustment for the current display mode + * + * @return HSIC object with default values + */ + public HSIC getDefaultPictureAdjustment() { + try { + if (checkService()) { + return sService.getDefaultPictureAdjustment(); + } + } catch (RemoteException e) { + } + return null; + } + + /** + * Determine whether night mode is enabled (be it automatic or manual) + */ + public boolean isNightModeEnabled() { + // This method might be called before config has been set up + // so a NPE would have been thrown, just report night mode is disabled instead + try { + return getMode() == MODE_NIGHT || sService.isNight(); + } catch (NullPointerException e) { + Log.w(TAG, "Can\'t check whether night mode is enabled because the service isn\'t ready"); + } catch (RemoteException ignored) { + } + return false; + } + + /** + * Checks if the anti flicker feature is enabled + * + * @return true if enabled + */ + public boolean isAntiFlickerEnabled() { + try { + return checkService() && sService.isAntiFlickerEnabled(); + } catch (RemoteException e) { + return false; + } + } + + /** + * Sets the state of anti flicker + * + * @param enabled + * @return true if state was changed + */ + public boolean setAntiFlickerEnabled(boolean enabled) { + try { + return checkService() && sService.setAntiFlickerEnabled(enabled); + } catch (RemoteException e) { + return false; + } + } +} diff --git a/core/java/com/android/internal/custom/hardware/PictureAdjustment.java b/core/java/com/android/internal/custom/hardware/PictureAdjustment.java new file mode 100644 index 000000000000..302747a719ba --- /dev/null +++ b/core/java/com/android/internal/custom/hardware/PictureAdjustment.java @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2016 The CyanogenMod Project + * Copyright (C) 2018 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.custom.hardware; + +import android.util.Range; + +import com.android.internal.custom.hardware.HSIC; + +/** + * Picture adjustment support + * + * Allows tuning of hue, saturation, intensity, and contrast levels + * of the display + */ +public class PictureAdjustment { + + /** + * Whether device supports picture adjustment + * + * @return boolean Supported devices must return always true + */ + public static boolean isSupported() { + return false; + } + + /** + * This method returns the current picture adjustment values based + * on the selected DisplayMode. + * + * @return the HSIC object or null if not supported + */ + public static HSIC getHSIC() { + return null; + } + + /** + * This method returns the default picture adjustment values. + * + * If DisplayModes are available, this may change depending on the + * selected mode. + * + * @return the HSIC object or null if not supported + */ + public static HSIC getDefaultHSIC() { + return null; + } + + /** + * This method allows to set the picture adjustment + * + * @param hsic + * @return boolean Must be false if feature is not supported or the operation + * failed; true in any other case. + */ + public static boolean setHSIC(final HSIC hsic) { + return false; + } + + /** + * Get the range available for hue adjustment + * @return range of floats + */ + public static Range getHueRange() { + return new Range(0.0f, 0.0f); + } + + /** + * Get the range available for saturation adjustment + * @return range of floats + */ + public static Range getSaturationRange() { + return new Range(0.0f, 0.0f); + } + + /** + * Get the range available for intensity adjustment + * @return range of floats + */ + public static Range getIntensityRange() { + return new Range(0.0f, 0.0f); + } + + /** + * Get the range available for contrast adjustment + * @return range of floats + */ + public static Range getContrastRange() { + return new Range(0.0f, 0.0f); + } + + /** + * Get the range available for saturation threshold adjustment + * + * This is the threshold where the display becomes fully saturated + * + * @return range of floats + */ + public static Range getSaturationThresholdRange() { + return new Range(0.0f, 0.0f); + } +} diff --git a/core/java/com/android/internal/custom/hardware/ReadingEnhancement.java b/core/java/com/android/internal/custom/hardware/ReadingEnhancement.java new file mode 100644 index 000000000000..1b1892c531b1 --- /dev/null +++ b/core/java/com/android/internal/custom/hardware/ReadingEnhancement.java @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2018 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.custom.hardware; + +import com.android.internal.util.custom.FileUtils; + +/** + * Reader mode + */ +public class ReadingEnhancement { + + private static final String TAG = "ReadingEnhancement"; + + private static final String FILE_READING = "/sys/class/graphics/fb0/reading_mode"; + + /** + * Whether device supports Reader Mode + * + * @return boolean Supported devices must return always true + */ + public static boolean isSupported() { + return FileUtils.isFileReadable(FILE_READING) && FileUtils.isFileWritable(FILE_READING); + } + + /** + * This method return the current activation status of Reader Mode + * + * @return boolean Must be false when Reader Mode is not supported or not activated, + * or the operation failed while reading the status; true in any other case. + */ + public static boolean isEnabled() { + return Integer.parseInt(FileUtils.readOneLine(FILE_READING)) > 0; + } + + /** + * This method allows to setup Reader Mode + * + * @param status The new Reader Mode status + * @return boolean Must be false if Reader Mode is not supported or the operation + * failed; true in any other case. + */ + public static boolean setEnabled(boolean status) { + return FileUtils.writeLine(FILE_READING, status ? "1" : "0"); + } + +} diff --git a/core/java/com/android/internal/custom/hardware/SunlightEnhancement.java b/core/java/com/android/internal/custom/hardware/SunlightEnhancement.java new file mode 100644 index 000000000000..c22c6672b862 --- /dev/null +++ b/core/java/com/android/internal/custom/hardware/SunlightEnhancement.java @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2014 The CyanogenMod Project + * Copyright (C) 2018 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.custom.hardware; + +import android.util.Log; + +import com.android.internal.util.custom.FileUtils; + +/** + * Facemelt mode! + */ +public class SunlightEnhancement { + + private static final String TAG = "SunlightEnhancement"; + + private static final String FACEMELT_PATH = getFacemeltPath(); + private static final String FACEMELT_MODE = getFacemeltMode(); + + private static final String FILE_HBM = "/sys/class/graphics/fb0/hbm"; + private static final String FILE_SRE = "/sys/class/graphics/fb0/sre"; + + private static String getFacemeltPath() { + if (FileUtils.fileExists(FILE_HBM)) { + return FILE_HBM; + } else { + return FILE_SRE; + } + } + + private static String getFacemeltMode() { + if (FileUtils.fileExists(FILE_HBM)) { + return "1"; + } else { + return "2"; + } + } + + /** + * Whether device supports sunlight enhancement + * + * @return boolean Supported devices must return always true + */ + public static boolean isSupported() { + return FileUtils.isFileReadable(FACEMELT_PATH) && FileUtils.isFileWritable(FACEMELT_PATH); + } + + /** + * This method return the current activation status of sunlight enhancement + * + * @return boolean Must be false when sunlight enhancement is not supported or not activated, + * or the operation failed while reading the status; true in any other case. + */ + public static boolean isEnabled() { + return Integer.parseInt(FileUtils.readOneLine(FACEMELT_PATH)) > 0; + } + + /** + * This method allows to setup sunlight enhancement + * + * @param status The new sunlight enhancement status + * @return boolean Must be false if sunlight enhancement is not supported or the operation + * failed; true in any other case. + */ + public static boolean setEnabled(boolean status) { + return FileUtils.writeLine(FACEMELT_PATH, status ? FACEMELT_MODE : "0"); + } + + /** + * Whether adaptive backlight (CABL / CABC) is required to be enabled + * + * @return boolean False if adaptive backlight is not a dependency + */ + public static boolean isAdaptiveBacklightRequired() { + return false; + } + + /** + * Set this to true if the implementation is self-managed and does + * it's own ambient sensing. In this case, setEnabled is assumed + * to toggle the feature on or off, but not activate it. If set + * to false, LiveDisplay will call setEnabled when the ambient lux + * threshold is crossed. + * + * @return true if this enhancement is self-managed + */ + public static boolean isSelfManaged() { + return false; + } +} diff --git a/core/java/com/android/internal/graphics/ColorUtils.java b/core/java/com/android/internal/graphics/ColorUtils.java index dff9551c0c07..98f14a5c5060 100644 --- a/core/java/com/android/internal/graphics/ColorUtils.java +++ b/core/java/com/android/internal/graphics/ColorUtils.java @@ -21,6 +21,8 @@ import android.annotation.IntRange; import android.annotation.NonNull; import android.graphics.Color; +import android.util.Log; +import android.util.MathUtils; import com.android.internal.graphics.cam.Cam; @@ -31,6 +33,8 @@ */ public final class ColorUtils { + private static final String TAG = "ColorUtils"; + private static final double XYZ_WHITE_REFERENCE_X = 95.047; private static final double XYZ_WHITE_REFERENCE_Y = 100; private static final double XYZ_WHITE_REFERENCE_Z = 108.883; @@ -95,8 +99,10 @@ public static double calculateLuminance(@ColorInt int color) { */ public static double calculateContrast(@ColorInt int foreground, @ColorInt int background) { if (Color.alpha(background) != 255) { - throw new IllegalArgumentException("background can not be translucent: #" - + Integer.toHexString(background)); + Log.w(TAG, String.format( + "Background should not be translucent: #%s", + Integer.toHexString(background))); + background = setAlphaComponent(background, 255); } if (Color.alpha(foreground) < 255) { // If the foreground is translucent, composite the foreground over the background @@ -148,8 +154,10 @@ public static int calculateMinimumBackgroundAlpha(@ColorInt int foreground, public static int calculateMinimumAlpha(@ColorInt int foreground, @ColorInt int background, float minContrastRatio) { if (Color.alpha(background) != 255) { - throw new IllegalArgumentException("background can not be translucent: #" - + Integer.toHexString(background)); + Log.w(TAG, String.format( + "Background should not be translucent: #%s", + Integer.toHexString(background))); + background = setAlphaComponent(background, 255); } ContrastCalculator contrastCalculator = (fg, bg, alpha) -> { @@ -605,8 +613,59 @@ private static double pivotXyzComponent(double component) { : (XYZ_KAPPA * component + 16) / 116; } + private static float cube(float x) { + return x * x * x; + } + + // Linear -> sRGB + private static float srgbTransfer(float x) { + if (x >= 0.0031308f) { + return 1.055f * (float) Math.pow(x, 1.0f / 2.4f) - 0.055f; + } else { + return 12.92f * x; + } + } + + // sRGB -> linear + private static float srgbTransferInv(float x) { + if (x >= 0.04045f) { + return (float) Math.pow((x + 0.055f) / 1.055f, 2.4f); + } else { + return x / 12.92f; + } + } + + private static float srgbRed(@ColorInt int color) { + return srgbTransferInv(((float) Color.red(color)) / 255.0f); + } + + private static float srgbGreen(@ColorInt int color) { + return srgbTransferInv(((float) Color.green(color)) / 255.0f); + } + + private static float srgbBlue(@ColorInt int color) { + return srgbTransferInv(((float) Color.blue(color)) / 255.0f); + } + + private static int srgbTransferToInt(float c) { + return MathUtils.constrain(Math.round(srgbTransfer(c) * 255.0f), 0, 255); + } + + private static float rgbToOklabLp(float r, float g, float b) { + return (float) Math.cbrt(0.4122214708f * r + 0.5363325363f * g + 0.0514459929f * b); + } + + private static float rgbToOklabMp(float r, float g, float b) { + return (float) Math.cbrt(0.2119034982f * r + 0.6806995451f * g + 0.1073969566f * b); + } + + private static float rgbToOklabSp(float r, float g, float b) { + return (float) Math.cbrt(0.0883024619f * r + 0.2817188376f * g + 0.6299787005f * b); + } + /** * Blend between two ARGB colors using the given ratio. + * This uses Oklab internally in order to perform a perceptually-uniform blend. * *

A blend ratio of 0.0 will result in {@code color1}, 0.5 will give an even blend, * 1.0 will result in {@code color2}.

@@ -620,10 +679,29 @@ public static int blendARGB(@ColorInt int color1, @ColorInt int color2, @FloatRange(from = 0.0, to = 1.0) float ratio) { final float inverseRatio = 1 - ratio; float a = Color.alpha(color1) * inverseRatio + Color.alpha(color2) * ratio; - float r = Color.red(color1) * inverseRatio + Color.red(color2) * ratio; - float g = Color.green(color1) * inverseRatio + Color.green(color2) * ratio; - float b = Color.blue(color1) * inverseRatio + Color.blue(color2) * ratio; - return Color.argb((int) a, (int) r, (int) g, (int) b); + + float r1 = srgbRed(color1); + float g1 = srgbGreen(color1); + float b1 = srgbBlue(color1); + float lp1 = rgbToOklabLp(r1, g1, b1); + float mp1 = rgbToOklabMp(r1, g1, b1); + float sp1 = rgbToOklabSp(r1, g1, b1); + + float r2 = srgbRed(color2); + float g2 = srgbGreen(color2); + float b2 = srgbBlue(color2); + float lp2 = rgbToOklabLp(r2, g2, b2); + float mp2 = rgbToOklabMp(r2, g2, b2); + float sp2 = rgbToOklabSp(r2, g2, b2); + + float l = cube(lp1 * inverseRatio + lp2 * ratio); + float m = cube(mp1 * inverseRatio + mp2 * ratio); + float s = cube(sp1 * inverseRatio + sp2 * ratio); + int r = srgbTransferToInt(+4.0767416621f * l - 3.3077115913f * m + 0.2309699292f * s); + int g = srgbTransferToInt(-1.2684380046f * l + 2.6097574011f * m - 0.3413193965f * s); + int b = srgbTransferToInt(-0.0041960863f * l - 0.7034186147f * m + 1.7076147010f * s); + + return Color.argb((int) a, r, g, b); } /** @@ -696,4 +774,4 @@ private interface ContrastCalculator { double calculateContrast(int foreground, int background, int alpha); } -} \ No newline at end of file +} diff --git a/core/java/com/android/internal/graphics/color/CieLab.java b/core/java/com/android/internal/graphics/color/CieLab.java new file mode 100644 index 000000000000..79a98ebca80e --- /dev/null +++ b/core/java/com/android/internal/graphics/color/CieLab.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.graphics.color; + +public final class CieLab { + private CieLab() { } + + public static double lToZcamJz(double l) { + double fInvLp = fInv((l + 16.0) / 116.0); + + double xRel = Illuminants.D65_X * fInvLp; + double yRel = Illuminants.D65_Y * fInvLp; + double zRel = Illuminants.D65_Z * fInvLp; + + double x = xRel * CieXyzAbs.DEFAULT_SDR_WHITE_LUMINANCE; + double y = yRel * CieXyzAbs.DEFAULT_SDR_WHITE_LUMINANCE; + double z = zRel * CieXyzAbs.DEFAULT_SDR_WHITE_LUMINANCE; + + Zcam zcam = new Zcam(new CieXyzAbs(x, y, z)); + return zcam.lightness; + } + + private static double fInv(double x) { + if (x > 6.0/29.0) { + return x * x * x; + } else { + return (108.0/841.0) * (x - 4.0/29.0); + } + } +} diff --git a/core/java/com/android/internal/graphics/color/CieXyzAbs.java b/core/java/com/android/internal/graphics/color/CieXyzAbs.java new file mode 100644 index 000000000000..b2dda3028ae4 --- /dev/null +++ b/core/java/com/android/internal/graphics/color/CieXyzAbs.java @@ -0,0 +1,125 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.graphics.color; + +/** + * CIE 1931 XYZ interchange color with absolute luminance specified in nits (cd/m^2). + * This is similar to colorkt's CieXyzAbs class, but it also does the jobs of CieXyz, LinearSrgb, + * and Srgb in order to reduce garbage object creation. + */ +public final class CieXyzAbs { + public static final double DEFAULT_SDR_WHITE_LUMINANCE = 200.0; // cd/m^2 + + public double x; + public double y; + public double z; + + public CieXyzAbs(double x, double y, double z) { + this.x = x; + this.y = y; + this.z = z; + } + + public CieXyzAbs(int rgb8) { + int r8 = (rgb8 >> 16) & 0xff; + int g8 = (rgb8 >> 8) & 0xff; + int b8 = rgb8 & 0xff; + + double r = srgbFInv(((double) r8) / 255.0); + double g = srgbFInv(((double) g8) / 255.0); + double b = srgbFInv(((double) b8) / 255.0); + + double xRel = 0.41245643908969226 * r + 0.357576077643909 * g + 0.18043748326639897 * b; + double yRel = 0.21267285140562256 * r + 0.715152155287818 * g + 0.07217499330655959 * b; + double zRel = 0.019333895582329303 * r + 0.11919202588130297 * g + 0.950304078536368 * b; + + this.x = xRel * DEFAULT_SDR_WHITE_LUMINANCE; + this.y = yRel * DEFAULT_SDR_WHITE_LUMINANCE; + this.z = zRel * DEFAULT_SDR_WHITE_LUMINANCE; + } + + public int toRgb8() { + double xRel = x / DEFAULT_SDR_WHITE_LUMINANCE; + double yRel = y / DEFAULT_SDR_WHITE_LUMINANCE; + double zRel = z / DEFAULT_SDR_WHITE_LUMINANCE; + + double r = xyzRelToR(xRel, yRel, zRel); + double g = xyzRelToG(xRel, yRel, zRel); + double b = xyzRelToB(xRel, yRel, zRel); + + int r8 = ((int) Math.round(srgbF(r) * 255.0) & 0xff) << 16; + int g8 = ((int) Math.round(srgbF(g) * 255.0) & 0xff) << 8; + int b8 = ((int) Math.round(srgbF(b) * 255.0) & 0xff); + + return r8 | g8 | b8; + } + + /*package-private*/ boolean isInGamut() { + // I don't like this duplicated code, but the alternative would be to create lots of unnecessary + // garbage array objects for gamut mapping every time a color is processed. + double xRel = x / DEFAULT_SDR_WHITE_LUMINANCE; + double yRel = y / DEFAULT_SDR_WHITE_LUMINANCE; + double zRel = z / DEFAULT_SDR_WHITE_LUMINANCE; + + double r = xyzRelToR(xRel, yRel, zRel); + double g = xyzRelToG(xRel, yRel, zRel); + double b = xyzRelToB(xRel, yRel, zRel); + + return inGamut(r) && inGamut(g) && inGamut(b); + } + + // This matrix (along with the inverse above) has been optimized to minimize chroma in CIELCh + // when converting neutral sRGB colors to CIELAB. The maximum chroma for sRGB neutral colors 0-255 is + // 5.978733960281817e-14. + // + // Calculated with https://github.com/facelessuser/coloraide/blob/master/tools/calc_xyz_transform.py + // Using D65 xy chromaticities from the sRGB spec: x = 0.3127, y = 0.3290 + // Always keep in sync with Illuminants.D65. + private static double xyzRelToR(double x, double y, double z) { + return 3.2404541621141045 * x + -1.5371385127977162 * y + -0.4985314095560159 * z; + } + + private static double xyzRelToG(double x, double y, double z) { + return -0.969266030505187 * x + 1.8760108454466944 * y + 0.04155601753034983 * z; + } + + private static double xyzRelToB(double x, double y, double z) { + return 0.05564343095911474 * x + -0.2040259135167538 * y + 1.0572251882231787 * z; + } + + // Linear -> sRGB + private static double srgbF(double x) { + if (x >= 0.0031308) { + return 1.055 * Math.pow(x, 1.0 / 2.4) - 0.055; + } else { + return 12.92 * x; + } + } + + // sRGB -> linear + private static double srgbFInv(double x) { + if (x >= 0.04045) { + return Math.pow((x + 0.055) / 1.055, 2.4); + } else { + return x / 12.92; + } + } + + private static boolean inGamut(double x) { + return x >= 0.0 && x <= 1.0; + } +} diff --git a/core/java/com/android/internal/graphics/color/Illuminants.java b/core/java/com/android/internal/graphics/color/Illuminants.java new file mode 100644 index 000000000000..ad97e0accf59 --- /dev/null +++ b/core/java/com/android/internal/graphics/color/Illuminants.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.graphics.color; + +public final class Illuminants { + // D65 as defined in ASTM E308 + public static double D65_X = 0.95047; + public static double D65_Y = 1.0; + public static double D65_Z = 1.08883; + + private Illuminants() { } + + public static CieXyzAbs getD65Abs(double luminance) { + return new CieXyzAbs(D65_X * luminance, D65_Y * luminance, D65_Z * luminance); + } +} diff --git a/core/java/com/android/internal/graphics/color/Zcam.java b/core/java/com/android/internal/graphics/color/Zcam.java new file mode 100644 index 000000000000..696d8f184c79 --- /dev/null +++ b/core/java/com/android/internal/graphics/color/Zcam.java @@ -0,0 +1,242 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.graphics.color; + +import com.android.internal.annotations.VisibleForTesting; + +/** + * Minimal implementation of ZCAM that only includes lightness, chroma, and hue. + * + * This implements the bare minimum of ZCAM necessary for ColorStateList modulation. + * It has fewer object-oriented abstractions and lacks the more sophisticated + * architecture and organization of colorkt; however, this can be called many times + * during UI view inflation, so performance is imperative. + */ +public final class Zcam { + private static final double B = 1.15; + private static final double G = 0.66; + private static final double C1 = 3424.0 / 4096; + private static final double C2 = 2413.0 / 128; + private static final double C3 = 2392.0 / 128; + private static final double ETA = 2610.0 / 16384; + private static final double RHO = 1.7 * 2523.0 / 32; + private static final double EPSILON = 3.7035226210190005e-11; + + public double lightness; + public double chroma; + public double hue; + + public final ViewingConditions viewingConditions; + + public Zcam(double lightness, double chroma, double hue) { + this(lightness, chroma, hue, ViewingConditions.DEFAULT); + } + + public Zcam(CieXyzAbs xyz) { + this(xyz, ViewingConditions.DEFAULT); + } + + public Zcam(double lightness, double chroma, double hue, ViewingConditions cond) { + this.lightness = lightness; + this.chroma = chroma; + this.hue = hue; + this.viewingConditions = cond; + } + + public Zcam(CieXyzAbs xyz, ViewingConditions cond) { + /* Step 2 */ + // Achromatic response + double[] Izazbz = xyzToIzazbz(xyz); + double Iz = Izazbz[0]; + double az = Izazbz[1]; + double bz = Izazbz[2]; + + /* Step 3 */ + // Hue angle + double hz = Math.toDegrees(Math.atan2(bz, az)); + double hp = (hz < 0) ? hz + 360.0 : hz; + + /* Step 4 */ + // Eccentricity factor + double ez = hpToEz(hp); + + /* Step 5 */ + // Brightness + double Qz = izToQz(Iz, cond); + double Qz_w = cond.Qz_w; + + // Lightness + double Jz = 100.0 * (Qz / Qz_w); + + // Colorfulness + double Mz = 100.0 * Math.pow(square(az) + square(bz), 0.37) * + ((Math.pow(ez, 0.068) * cond.ez_coeff) / cond.Mz_denom); + + // Chroma + double Cz = 100.0 * (Mz / Qz_w); + + /* Step 6 is missing because this implementation doesn't support 2D attributes */ + + this.lightness = Jz; + this.chroma = Cz; + this.hue = hp; + this.viewingConditions = cond; + } + + public CieXyzAbs toXyzAbs() { + return toXyzAbs(lightness, chroma, hue, viewingConditions); + } + + /*package-private*/ static CieXyzAbs toXyzAbs(double lightness, double chroma, double hue) { + return toXyzAbs(lightness, chroma, hue, ViewingConditions.DEFAULT); + } + + private static CieXyzAbs toXyzAbs(double lightness, double chroma, double hue, ViewingConditions cond) { + double Qz_w = cond.Qz_w; + + /* Step 1 */ + // Achromatic response + double Iz = Math.pow((lightness * Qz_w) / (cond.Iz_coeff * 100.0), + cond.Qz_denom / (1.6 * cond.surroundFactor)); + + /* Step 2 is missing because we use chroma as the input */ + + /* Step 3 is missing because hue composition is not supported */ + + /* Step 4 */ + double Mz = (chroma * Qz_w) / 100.0; + double ez = hpToEz(hue); + double Cz_p = Math.pow((Mz * cond.Mz_denom) / + // Paper specifies pow(1.3514) but this extra precision is necessary for accurate inversion + (100.0 * Math.pow(ez, 0.068) * cond.ez_coeff), 1.0 / 0.37 / 2); + double hueRad = Math.toRadians(hue); + double az = Cz_p * Math.cos(hueRad); + double bz = Cz_p * Math.sin(hueRad); + + /* Step 5 */ + double I = Iz + EPSILON; + + double r = pq(I + 0.2772100865*az + 0.1160946323*bz); + double g = pq(I); + double b = pq(I + 0.0425858012*az + -0.7538445799*bz); + + double xp = 1.9242264358*r + -1.0047923126*g + 0.0376514040*b; + double yp = 0.3503167621*r + 0.7264811939*g + -0.0653844229*b; + double z = -0.0909828110*r + -0.3127282905*g + 1.5227665613*b; + + double x = (xp + (B - 1)*z) / B; + double y = (yp + (G - 1)*x) / G; + + return new CieXyzAbs(x, y, z); + } + + // Transfer function and inverse + private static double pq(double x) { + double num = C1 - Math.pow(x, 1.0/RHO); + double denom = C3*Math.pow(x, 1.0/RHO) - C2; + + return 10000.0 * Math.pow(num / denom, 1.0/ETA); + } + private static double pqInv(double x) { + double num = C1 + C2*Math.pow(x / 10000, ETA); + double denom = 1.0 + C3*Math.pow(x / 10000, ETA); + + return Math.pow(num / denom, RHO); + } + + // Intermediate conversion, also used in ViewingConditions + private static double[] xyzToIzazbz(CieXyzAbs xyz) { + // This equation (#4) is wrong in the paper; below is the correct version. + // It can be derived from the inverse model (supplementary paper) or the original Jzazbz paper. + double xp = B*xyz.x - (B-1)*xyz.z; + double yp = G*xyz.y - (G-1)*xyz.x; + + double rp = pqInv( 0.41478972*xp + 0.579999*yp + 0.0146480*xyz.z); + double gp = pqInv(-0.20151000*xp + 1.120649*yp + 0.0531008*xyz.z); + double bp = pqInv(-0.01660080*xp + 0.264800*yp + 0.6684799*xyz.z); + + double az = 3.524000*rp + -4.066708*gp + 0.542708*bp; + double bz = 0.199076*rp + 1.096799*gp + -1.295875*bp; + double Iz = gp - EPSILON; + + return new double[]{Iz, az, bz}; + } + + // Shared between forward and inverse models + private static double hpToEz(double hp) { + return 1.015 + Math.cos(Math.toRadians(89.038 + hp)); + } + + private static double izToQz(double Iz, ViewingConditions cond) { + return cond.Iz_coeff * Math.pow(Iz, (1.6 * cond.surroundFactor) / cond.Qz_denom); + } + + private static double square(double x) { + return x * x; + } + + public static class ViewingConditions { + public static final double SURROUND_DARK = 0.525; + public static final double SURROUND_DIM = 0.59; + public static final double SURROUND_AVERAGE = 0.69; + + public static final ViewingConditions DEFAULT = new ViewingConditions( + SURROUND_AVERAGE, + 0.4 * CieXyzAbs.DEFAULT_SDR_WHITE_LUMINANCE, + // Mid-gray background: CIELAB L = 50 + 0.18418651851244416 * CieXyzAbs.DEFAULT_SDR_WHITE_LUMINANCE, + Illuminants.getD65Abs(CieXyzAbs.DEFAULT_SDR_WHITE_LUMINANCE) + ); + + public final double surroundFactor; + public final double adaptingLuminance; + public final double backgroundLuminance; + public final CieXyzAbs referenceWhite; + + @VisibleForTesting + public final double Iz_coeff; + @VisibleForTesting + public final double ez_coeff; + @VisibleForTesting + public final double Qz_denom; + @VisibleForTesting + public final double Mz_denom; + @VisibleForTesting + public final double Qz_w; + + public ViewingConditions(double surroundFactor, double adaptingLuminance, + double backgroundLuminance, CieXyzAbs referenceWhite) { + this.surroundFactor = surroundFactor; + this.adaptingLuminance = adaptingLuminance; + this.backgroundLuminance = backgroundLuminance; + this.referenceWhite = referenceWhite; + + double F_b = Math.sqrt(backgroundLuminance / referenceWhite.y); + double F_l = 0.171 * Math.cbrt(adaptingLuminance) * (1.0 - Math.exp(-48.0 / 9.0 * adaptingLuminance)); + + this.Iz_coeff = 2700.0 * Math.pow(surroundFactor, 2.2) * Math.pow(F_b, 0.5) * Math.pow(F_l, 0.2); + this.ez_coeff = Math.pow(F_l, 0.2); + this.Qz_denom = Math.pow(F_b, 0.12); + + double Iz_w = xyzToIzazbz(referenceWhite)[0]; + this.Mz_denom = Math.pow(Iz_w, 0.78) * Math.pow(F_b, 0.1); + + // Depends on coefficients computed above + this.Qz_w = izToQz(Iz_w, this); + } + } +} diff --git a/core/java/com/android/internal/graphics/color/ZcamGamut.java b/core/java/com/android/internal/graphics/color/ZcamGamut.java new file mode 100644 index 000000000000..3e86668c2c52 --- /dev/null +++ b/core/java/com/android/internal/graphics/color/ZcamGamut.java @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.graphics.color; + +public final class ZcamGamut { + private static final double EPSILON = 0.0001; + + private ZcamGamut() { } + + private static double evalLine(double slope, double intercept, double x) { + return slope * x + intercept; + } + + private static int clip(double l1, double c1, double hue, double l0) { + CieXyzAbs result = Zcam.toXyzAbs(l1, c1, hue); + if (result.isInGamut()) { + return result.toRgb8(); + } + + // Avoid searching black and white for performance + if (l1 <= EPSILON) { + return 0x000000; + } else if (l1 >= 100.0 - EPSILON) { + return 0xffffff; + } + + // Chroma is always 0 so the reference point is guaranteed to be within gamut + double c0 = 0.0; + + // Create a line - x=C, y=L - intersecting a hue plane + // In theory, we could have a divide-by-zero error here if c1=0. However, that's not a problem because + // all colors with chroma = 0 should be in gamut, so this loop never runs. Even if this loop somehow + // ends up running for such a color, it would just result in a slow search that doesn't converge because + // the NaN causes isInGamut() to return false. + double slope = (l1 - l0) / (c1 - c0); + double intercept = l0 - slope * c0; + + double lo = 0.0; + double hi = c1; + + while (Math.abs(hi - lo) > EPSILON) { + double midC = (lo + hi) / 2.0; + double midL = evalLine(slope, intercept, midC); + + result = Zcam.toXyzAbs(midL, midC, hue); + + if (!result.isInGamut()) { + // If this color isn't in gamut, pivot left to get an in-gamut color. + hi = midC; + } else { + // If this color is in gamut, test a point to the right that should be just outside the gamut. + // If the test point is *not* in gamut, we know that this color is right at the edge of the gamut. + double midC2 = midC + EPSILON; + double midL2 = evalLine(slope, intercept, midC2); + + CieXyzAbs ptOutside = Zcam.toXyzAbs(midL2, midC2, hue); + if (ptOutside.isInGamut()) { + lo = midC; + } else { + break; + } + } + } + + return result.toRgb8(); + } + + public static int clipToRgb8(Zcam color) { + return clip(color.lightness, color.chroma, color.hue, color.lightness); + } +} diff --git a/core/java/com/android/internal/graphics/drawable/RoundedCornerProgressDrawable.java b/core/java/com/android/internal/graphics/drawable/RoundedCornerProgressDrawable.java new file mode 100644 index 000000000000..2c794dbbebfc --- /dev/null +++ b/core/java/com/android/internal/graphics/drawable/RoundedCornerProgressDrawable.java @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.graphics.drawable; + +import android.content.pm.ActivityInfo; +import android.content.res.Resources; +import android.graphics.Rect; +import android.graphics.drawable.Drawable; +import android.graphics.drawable.DrawableWrapper; +import android.graphics.drawable.InsetDrawable; + +public final class RoundedCornerProgressDrawable extends InsetDrawable { + public RoundedCornerProgressDrawable() { + this(null); + } + + public RoundedCornerProgressDrawable(Drawable drawable) { + super(drawable, 0); + } + + public int getChangingConfigurations() { + return super.getChangingConfigurations() | ActivityInfo.CONFIG_DENSITY; + } + + public Drawable.ConstantState getConstantState() { + return new RoundedCornerState(super.getConstantState()); + } + + protected void onBoundsChange(Rect rect) { + super.onBoundsChange(rect); + onLevelChange(getLevel()); + } + + public boolean onLayoutDirectionChanged(int level) { + onLevelChange(getLevel()); + return super.onLayoutDirectionChanged(level); + } + + protected boolean onLevelChange(int n) { + Drawable drawable = getDrawable(); + Rect bounds; + if (drawable == null) { + bounds = null; + } else { + bounds = drawable.getBounds(); + } + int height = getBounds().height(); + int level = (getBounds().width() - getBounds().height()) * n / 10000; + drawable = getDrawable(); + if (drawable != null) { + drawable.setBounds(getBounds().left, bounds.top, getBounds().left + (height + level), bounds.bottom); + } + return super.onLevelChange(level); + } + + private static final class RoundedCornerState extends Drawable.ConstantState { + private final Drawable.ConstantState mWrappedState; + + public RoundedCornerState(Drawable.ConstantState wrappedState) { + mWrappedState = wrappedState; + } + + public int getChangingConfigurations() { + return mWrappedState.getChangingConfigurations(); + } + + public Drawable newDrawable() { + return newDrawable(null, null); + } + + public Drawable newDrawable(Resources resources, Resources.Theme theme) { + Drawable drawable = mWrappedState.newDrawable(resources, theme); + return (Drawable) new RoundedCornerProgressDrawable(((DrawableWrapper) drawable).getDrawable()); + } + } +} diff --git a/core/java/com/android/internal/notification/SystemNotificationChannels.java b/core/java/com/android/internal/notification/SystemNotificationChannels.java index 681b46a01c8d..7a7abcda13ee 100644 --- a/core/java/com/android/internal/notification/SystemNotificationChannels.java +++ b/core/java/com/android/internal/notification/SystemNotificationChannels.java @@ -113,8 +113,8 @@ public static void createAll(Context context) { final NotificationChannel developerImportant = new NotificationChannel( DEVELOPER_IMPORTANT, context.getString(R.string.notification_channel_developer_important), - NotificationManager.IMPORTANCE_HIGH); - developer.setBlockable(true); + NotificationManager.IMPORTANCE_MIN); + developerImportant.setBlockable(true); channelsList.add(developerImportant); final NotificationChannel updates = new NotificationChannel( @@ -172,6 +172,7 @@ public static void createAll(Context context) { USB, context.getString(R.string.notification_channel_usb), NotificationManager.IMPORTANCE_MIN); + usb.setBlockable(true); channelsList.add(usb); NotificationChannel foregroundChannel = new NotificationChannel( diff --git a/core/java/com/android/internal/os/DeviceKeyHandler.java b/core/java/com/android/internal/os/DeviceKeyHandler.java new file mode 100644 index 000000000000..82c41df42ee6 --- /dev/null +++ b/core/java/com/android/internal/os/DeviceKeyHandler.java @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2012 The CyanogenMod Project + * Copyright (C) 2015-2018 The OmniROM Project + * + * Licensed under the Apache License, + * Version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law + * or agreed to in writing, software distributed under the License is + * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +package com.android.internal.os; + +import android.content.Intent; +import android.hardware.SensorEvent; +import android.view.KeyEvent; + +public interface DeviceKeyHandler { + + /** + * Invoked when an unknown key was detected by the system, letting the device handle + * this special keys prior to pass the key to the active app. + * + * @param event The key event to be handled + * @return If the event is consume + */ + public boolean handleKeyEvent(KeyEvent event); + + /** + * Invoked when an unknown key was detected by the system, + * this should NOT handle the key just return if it WOULD be handled + * + * @param event The key event to be handled + * @return If the event will be consumed + */ + public boolean canHandleKeyEvent(KeyEvent event); + + /** + * Special key event that should be treated as + * a camera launch event + * + * @param event The key event to be handled + * @return If the event is a camera launch event + */ + public boolean isCameraLaunchEvent(KeyEvent event); + + /** + * Special key event that should be treated as + * a wake event + * + * @param event The key event to be handled + * @return If the event is a wake event + */ + public boolean isWakeEvent(KeyEvent event); + + /** + * Return false if this event should be ignored + * + * @param event The key event to be handled + * @return If the event should be ignored + */ + public boolean isDisabledKeyEvent(KeyEvent event); + + /** + * Return an Intent that should be launched for that KeyEvent + * + * @param event The key event to be handled + * @return an Intent or null + */ + public Intent isActivityLaunchEvent(KeyEvent event); +} diff --git a/core/java/com/android/internal/os/KernelCpuUidTimeReader.java b/core/java/com/android/internal/os/KernelCpuUidTimeReader.java index c801be0ce3e7..ff3cf6ee7dc0 100644 --- a/core/java/com/android/internal/os/KernelCpuUidTimeReader.java +++ b/core/java/com/android/internal/os/KernelCpuUidTimeReader.java @@ -20,6 +20,7 @@ import android.annotation.NonNull; import android.annotation.Nullable; +import android.os.Build; import android.os.StrictMode; import android.util.IntArray; import android.util.Slog; @@ -530,7 +531,11 @@ void readDeltaImpl(@Nullable Callback cb, boolean forceRead) { CharBuffer buf; while ((buf = iter.nextLine()) != null) { if (asLongs(buf, mBuffer) != mBuffer.length) { - Slog.wtf(mTag, "Invalid line: " + buf.toString()); + if (Build.IS_ENG) { + Slog.wtf(mTag, "Invalid line: " + buf.toString()); + } else { + Slog.w(mTag, "Invalid line: " + buf.toString()); + } continue; } processUidDelta(cb); diff --git a/core/java/com/android/internal/os/Zygote.java b/core/java/com/android/internal/os/Zygote.java index b1e7d15cbf4a..deafd19e866f 100644 --- a/core/java/com/android/internal/os/Zygote.java +++ b/core/java/com/android/internal/os/Zygote.java @@ -1000,17 +1000,25 @@ static void applyUidSecurityPolicy(ZygoteArguments args, Credentials peer) } } + /** + * This will enable jdwp by default for all apps. It is OK to cache this property + * because we expect to reboot the system whenever this property changes + */ + private static final boolean ENABLE_JDWP = SystemProperties.get( + "persist.debug.dalvik.vm.jdwp.enabled").equals("1"); + /** * Applies debugger system properties to the zygote arguments. * - * If "ro.debuggable" is "1", all apps are debuggable. Otherwise, - * the debugger state is specified via the "--enable-jdwp" flag - * in the spawn request. + * For eng builds all apps are debuggable. On userdebug and user builds + * if persist.debuggable.dalvik.vm.jdwp.enabled is 1 all apps are + * debuggable. Otherwise, the debugger state is specified via the + * "--enable-jdwp" flag in the spawn request. * * @param args non-null; zygote spawner args */ static void applyDebuggerSystemProperty(ZygoteArguments args) { - if (RoSystemProperties.DEBUGGABLE) { + if (Build.IS_ENG || ENABLE_JDWP) { args.mRuntimeFlags |= Zygote.DEBUG_ENABLE_JDWP; } } diff --git a/core/java/com/android/internal/policy/GestureNavigationSettingsObserver.java b/core/java/com/android/internal/policy/GestureNavigationSettingsObserver.java index 205c5fd735ea..24bd50b0de1f 100644 --- a/core/java/com/android/internal/policy/GestureNavigationSettingsObserver.java +++ b/core/java/com/android/internal/policy/GestureNavigationSettingsObserver.java @@ -18,8 +18,11 @@ import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.BACK_GESTURE_EDGE_WIDTH; +import android.content.BroadcastReceiver; import android.content.ContentResolver; import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; import android.content.res.Resources; import android.database.ContentObserver; import android.os.Handler; @@ -29,6 +32,8 @@ import android.util.DisplayMetrics; import android.util.TypedValue; +import com.android.internal.util.syberia.SyberiaUtils; + /** * @hide */ @@ -36,6 +41,7 @@ public class GestureNavigationSettingsObserver extends ContentObserver { private Context mContext; private Runnable mOnChangeRunnable; private Handler mMainHandler; + private IntentFilter mIntentFilter; public GestureNavigationSettingsObserver(Handler handler, Context context, Runnable onChangeRunnable) { @@ -43,6 +49,9 @@ public GestureNavigationSettingsObserver(Handler handler, Context context, mMainHandler = handler; mContext = context; mOnChangeRunnable = onChangeRunnable; + mIntentFilter = new IntentFilter(); + mIntentFilter.addAction(Intent.ACTION_PACKAGE_REMOVED); + mIntentFilter.addDataScheme("package"); } private final DeviceConfig.OnPropertiesChangedListener mOnPropertiesChangedListener = @@ -56,7 +65,79 @@ public void onPropertiesChanged(DeviceConfig.Properties properties) { } }; + private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + String action = intent.getAction(); + if(action.equals(Intent.ACTION_PACKAGE_REMOVED)) { + // Get packageName from Uri + String packageName = intent.getData().getSchemeSpecificPart(); + // If the package is still installed + if (SyberiaUtils.isPackageInstalled(context, packageName)) { + // it's an application update, we can skip the rest. + return; + } + // Get package names currently set as default + String leftPackageName = Settings.System.getStringForUser(context.getContentResolver(), + Settings.System.LEFT_LONG_BACK_SWIPE_APP_ACTION, + UserHandle.USER_CURRENT); + String rightPackageName = Settings.System.getStringForUser(context.getContentResolver(), + Settings.System.RIGHT_LONG_BACK_SWIPE_APP_ACTION, + UserHandle.USER_CURRENT); + String verticalLeftPackageName = Settings.System.getStringForUser(context.getContentResolver(), + Settings.System.LEFT_VERTICAL_BACK_SWIPE_APP_ACTION, + UserHandle.USER_CURRENT); + String verticalRightPackageName = Settings.System.getStringForUser(context.getContentResolver(), + Settings.System.RIGHT_VERTICAL_BACK_SWIPE_APP_ACTION, + UserHandle.USER_CURRENT); + // if the package name equals to some set value + if(packageName.equals(leftPackageName)) { + // The short application action has to be reset + resetApplicationAction(true, false); + } + if (packageName.equals(rightPackageName)) { + // The long application action has to be reset + resetApplicationAction(false, false); + } + if(packageName.equals(verticalLeftPackageName)) { + // The short application action has to be reset + resetApplicationAction(true, true); + } + if (packageName.equals(verticalRightPackageName)) { + // The long application action has to be reset + resetApplicationAction(false, true); + } + } + } + }; + + private void resetApplicationAction(boolean isLeftAction, boolean isVertical) { + if (isLeftAction) { + // Remove stored values + Settings.System.putIntForUser(mContext.getContentResolver(), + isVertical ? Settings.System.LEFT_VERTICAL_BACK_SWIPE_ACTION : Settings.System.LEFT_LONG_BACK_SWIPE_ACTION, + /* no action */ 0, + UserHandle.USER_CURRENT); + Settings.System.putStringForUser(mContext.getContentResolver(), + isVertical ? Settings.System.LEFT_VERTICAL_BACK_SWIPE_APP_FR_ACTION : Settings.System.LEFT_LONG_BACK_SWIPE_APP_FR_ACTION, + /* none */ "", + UserHandle.USER_CURRENT); + } else { + // Remove stored values + Settings.System.putIntForUser(mContext.getContentResolver(), + isVertical ? Settings.System.RIGHT_VERTICAL_BACK_SWIPE_ACTION : Settings.System.RIGHT_LONG_BACK_SWIPE_ACTION, + /* no action */ 0, + UserHandle.USER_CURRENT); + Settings.System.putStringForUser(mContext.getContentResolver(), + isVertical ? Settings.System.RIGHT_VERTICAL_BACK_SWIPE_APP_FR_ACTION : Settings.System.RIGHT_LONG_BACK_SWIPE_APP_FR_ACTION, + /* none */ "", + UserHandle.USER_CURRENT); + } + // the observer will trigger EdgeBackGestureHandler.updateCurrentUserResources and update settings there too + } + public void register() { + mContext.registerReceiver(mBroadcastReceiver, mIntentFilter); ContentResolver r = mContext.getContentResolver(); r.registerContentObserver( Settings.Secure.getUriFor(Settings.Secure.BACK_GESTURE_INSET_SCALE_LEFT), @@ -67,13 +148,35 @@ public void register() { r.registerContentObserver( Settings.Secure.getUriFor(Settings.Secure.USER_SETUP_COMPLETE), false, this, UserHandle.USER_ALL); + r.registerContentObserver(Settings.System.getUriFor( + Settings.System.BACK_GESTURE_HAPTIC), + false, this, UserHandle.USER_ALL); DeviceConfig.addOnPropertiesChangedListener( DeviceConfig.NAMESPACE_SYSTEMUI, runnable -> mMainHandler.post(runnable), mOnPropertiesChangedListener); + r.registerContentObserver( + Settings.System.getUriFor(Settings.System.LONG_BACK_SWIPE_TIMEOUT), + false, this, UserHandle.USER_ALL); + r.registerContentObserver( + Settings.System.getUriFor(Settings.System.LEFT_LONG_BACK_SWIPE_ACTION), + false, this, UserHandle.USER_ALL); + r.registerContentObserver( + Settings.System.getUriFor(Settings.System.RIGHT_LONG_BACK_SWIPE_ACTION), + false, this, UserHandle.USER_ALL); + r.registerContentObserver( + Settings.System.getUriFor(Settings.System.BACK_SWIPE_EXTENDED), + false, this, UserHandle.USER_ALL); + r.registerContentObserver( + Settings.System.getUriFor(Settings.System.LEFT_VERTICAL_BACK_SWIPE_ACTION), + false, this, UserHandle.USER_ALL); + r.registerContentObserver( + Settings.System.getUriFor(Settings.System.RIGHT_VERTICAL_BACK_SWIPE_ACTION), + false, this, UserHandle.USER_ALL); } public void unregister() { + mContext.unregisterReceiver(mBroadcastReceiver); mContext.getContentResolver().unregisterContentObserver(this); DeviceConfig.removeOnPropertiesChangedListener(mOnPropertiesChangedListener); } @@ -94,6 +197,15 @@ public int getRightSensitivity(Resources userRes) { return getSensitivity(userRes, Settings.Secure.BACK_GESTURE_INSET_SCALE_RIGHT); } + public boolean getEdgeHaptic() { + return (Settings.System.getIntForUser( + mContext.getContentResolver(), Settings.System.BACK_GESTURE_HAPTIC, 0, + UserHandle.USER_CURRENT) == 1 && + Settings.System.getIntForUser( + mContext.getContentResolver(), Settings.System.HAPTIC_FEEDBACK_ENABLED, 0, + UserHandle.USER_CURRENT) == 1); + } + public boolean areNavigationButtonForcedVisible() { return Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.USER_SETUP_COMPLETE, 0, UserHandle.USER_CURRENT) == 0; @@ -114,4 +226,40 @@ private int getSensitivity(Resources userRes, String side) { mContext.getContentResolver(), side, 1.0f, UserHandle.USER_CURRENT); return (int) (inset * scale); } + + public int getLongSwipeTimeOut() { + return Settings.System.getIntForUser(mContext.getContentResolver(), + Settings.System.LONG_BACK_SWIPE_TIMEOUT, 2000, + UserHandle.USER_CURRENT); + } + + public int getLeftLongSwipeAction() { + return Settings.System.getIntForUser(mContext.getContentResolver(), + Settings.System.LEFT_LONG_BACK_SWIPE_ACTION, 0, + UserHandle.USER_CURRENT); + } + + public int getRightLongSwipeAction() { + return Settings.System.getIntForUser(mContext.getContentResolver(), + Settings.System.RIGHT_LONG_BACK_SWIPE_ACTION, 0, + UserHandle.USER_CURRENT); + } + + public boolean getIsExtendedSwipe() { + return Settings.System.getIntForUser(mContext.getContentResolver(), + Settings.System.BACK_SWIPE_EXTENDED, 0, + UserHandle.USER_CURRENT) != 0; + } + + public int getLeftLSwipeAction() { + return Settings.System.getIntForUser(mContext.getContentResolver(), + Settings.System.LEFT_VERTICAL_BACK_SWIPE_ACTION, 0, + UserHandle.USER_CURRENT); + } + + public int getRightLSwipeAction() { + return Settings.System.getIntForUser(mContext.getContentResolver(), + Settings.System.RIGHT_VERTICAL_BACK_SWIPE_ACTION, 0, + UserHandle.USER_CURRENT); + } } diff --git a/core/java/com/android/internal/statusbar/IStatusBar.aidl b/core/java/com/android/internal/statusbar/IStatusBar.aidl index e93a7854f1cd..08232404e7f2 100644 --- a/core/java/com/android/internal/statusbar/IStatusBar.aidl +++ b/core/java/com/android/internal/statusbar/IStatusBar.aidl @@ -46,6 +46,7 @@ oneway interface IStatusBar void animateExpandSettingsPanel(String subPanel); void animateCollapsePanels(); void togglePanel(); + void toggleSettingsPanel(); void showWirelessChargingAnimation(int batteryLevel); @@ -148,7 +149,7 @@ oneway interface IStatusBar void showPinningEnterExitToast(boolean entering); void showPinningEscapeToast(); - void showShutdownUi(boolean isReboot, String reason); + void showShutdownUi(boolean isReboot, String reason, boolean rebootCustom); /** * Used to show the authentication dialog (Biometrics, Device Credential). @@ -324,4 +325,16 @@ oneway interface IStatusBar /** Unregisters a nearby media devices provider. */ void unregisterNearbyMediaDevicesProvider(in INearbyMediaDevicesProvider provider); + + /** + * Syberia + */ + void toggleCameraFlash(); + + void killForegroundApp(); + + /** + * Used to block or unblock usage of gestural navigation + */ + void setBlockedGesturalNavigation(boolean blocked); } diff --git a/core/java/com/android/internal/statusbar/IStatusBarService.aidl b/core/java/com/android/internal/statusbar/IStatusBarService.aidl index ef8f2db5ff57..8a7a229c4a0a 100644 --- a/core/java/com/android/internal/statusbar/IStatusBarService.aidl +++ b/core/java/com/android/internal/statusbar/IStatusBarService.aidl @@ -49,6 +49,7 @@ interface IStatusBarService @UnsupportedAppUsage void collapsePanels(); void togglePanel(); + void toggleSettingsPanel(); @UnsupportedAppUsage void disable(int what, IBinder token, String pkg); void disableForUser(int what, IBinder token, String pkg, int userId); @@ -101,7 +102,7 @@ interface IStatusBarService * These methods are needed for global actions control which the UI is shown in sysui. */ void shutdown(); - void reboot(boolean safeMode); + void reboot(boolean safeMode, String reason); /** just restarts android without rebooting device. Used for some feature flags. */ void restart(); @@ -226,4 +227,20 @@ interface IStatusBarService /** Unregisters a nearby media devices provider. */ void unregisterNearbyMediaDevicesProvider(in INearbyMediaDevicesProvider provider); + + /** + * Syberia + */ + + /** Used to block or unblock usage of gestural navigation. */ + void setBlockedGesturalNavigation(boolean blocked); + + void toggleCameraFlash(); + + void killForegroundApp(); + void toggleRecentApps(); + void toggleSplitScreen(); + void preloadRecentApps(); + void cancelPreloadRecentApps(); + void startAssist(in Bundle args); } diff --git a/core/java/com/android/internal/util/ContrastColorUtil.java b/core/java/com/android/internal/util/ContrastColorUtil.java index ced272225f48..b63a44ae14da 100644 --- a/core/java/com/android/internal/util/ContrastColorUtil.java +++ b/core/java/com/android/internal/util/ContrastColorUtil.java @@ -703,8 +703,10 @@ public static double calculateLuminance(@ColorInt int color) { */ public static double calculateContrast(@ColorInt int foreground, @ColorInt int background) { if (Color.alpha(background) != 255) { - Log.wtf(TAG, "background can not be translucent: #" - + Integer.toHexString(background)); + Log.w(TAG, String.format( + "Background should not be translucent: #%s", + Integer.toHexString(background))); + background = setAlphaComponent(background, 255); } if (Color.alpha(foreground) < 255) { // If the foreground is translucent, composite the foreground over the background diff --git a/core/java/com/android/internal/util/PropImitationHooks.java b/core/java/com/android/internal/util/PropImitationHooks.java new file mode 100644 index 000000000000..84551e4bf36e --- /dev/null +++ b/core/java/com/android/internal/util/PropImitationHooks.java @@ -0,0 +1,155 @@ +/* + * Copyright (C) 2022 Paranoid Android + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.util; + +import android.app.Application; +import android.content.res.Resources; +import android.os.Build; +import android.util.Log; + +import com.android.internal.R; + +import java.lang.reflect.Field; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +public class PropImitationHooks { + + private static final String TAG = "PropImitationHooks"; + private static final boolean DEBUG = false; + + private static final String sCertifiedFp = + Resources.getSystem().getString(R.string.config_certifiedFingerprint); + private static final String sCertifiedModel = + Resources.getSystem().getString(R.string.config_certifiedModel); + + private static final String sStockFp = + Resources.getSystem().getString(R.string.config_stockFingerprint); + + private static final String PACKAGE_ARCORE = "com.google.ar.core"; + private static final String PACKAGE_FINSKY = "com.android.vending"; + private static final String PACKAGE_GMS = "com.google.android.gms"; + private static final String PROCESS_GMS_UNSTABLE = PACKAGE_GMS + ".unstable"; + + private static final String PACKAGE_GPHOTOS = "com.google.android.apps.photos"; + private static final Map sP1Props = new HashMap<>(); + static { + sP1Props.put("BRAND", "google"); + sP1Props.put("MANUFACTURER", "Google"); + sP1Props.put("DEVICE", "marlin"); + sP1Props.put("PRODUCT", "marlin"); + sP1Props.put("MODEL", "Pixel XL"); + sP1Props.put("FINGERPRINT", "google/marlin/marlin:10/QP1A.191005.007.A3/5972272:user/release-keys"); + } + private static final String[] sFeaturesBlacklist = { + "PIXEL_2017_PRELOAD", + "PIXEL_2018_PRELOAD", + "PIXEL_2019_MIDYEAR_PRELOAD", + "PIXEL_2019_PRELOAD", + "PIXEL_2020_EXPERIENCE", + "PIXEL_2020_MIDYEAR_EXPERIENCE", + "PIXEL_2021_EXPERIENCE", + "PIXEL_2021_MIDYEAR_EXPERIENCE" + }; + + private static final String PACKAGE_VELVET = "com.google.android.quicksearchbox"; + private static final String PACKAGE_WALLPAPERS = "com.google.android.apps.wallpaper"; + private static final Map sP6Props = new HashMap<>(); + static { + sP6Props.put("BRAND", "google"); + sP6Props.put("MANUFACTURER", "Google"); + sP6Props.put("DEVICE", "raven"); + sP6Props.put("PRODUCT", "raven"); + sP6Props.put("MODEL", "Pixel 6 Pro"); + sP6Props.put("FINGERPRINT", "google/raven/raven:13/TP1A.221005.002/9012097:user/release-keys"); + } + + private static final boolean sSpoofGapps = + Resources.getSystem().getBoolean(R.bool.config_spoofGoogleApps); + + private static volatile boolean sIsGms = false; + private static volatile boolean sIsFinsky = false; + private static volatile boolean sIsPhotos = false; + + public static void setProps(Application app) { + final String packageName = context.getPackageName(); + final String processName = app.getProcessName(); + + if (packageName == null || packageName.isEmpty() || processName == null) { + return; + } + + sIsGms = packageName.equals(PACKAGE_GMS) && processName.equals(PROCESS_GMS_UNSTABLE); + sIsFinsky = packageName.equals(PACKAGE_FINSKY); + sIsPhotos = sSpoofGapps && packageName.equals(PACKAGE_GPHOTOS); + + if (!sCertifiedFp.isEmpty() && sIsGms) { + dlog("Setting certified fingerprint/model for GMS"); + setPropValue("FINGERPRINT", sCertifiedFp); + setPropValue("MODEL", sCertifiedModel); + } else if (!sStockFp.isEmpty() && packageName.equals(PACKAGE_ARCORE)) { + dlog("Setting stock fingerprint for: " + packageName); + setPropValue("FINGERPRINT", sStockFp); + } else if (sIsPhotos) { + dlog("Spoofing Pixel XL for Google Photos"); + sP1Props.forEach((k, v) -> setPropValue(k, v)); + } else if (sSpoofGapps && (packageName.equals(PACKAGE_VELVET) + || packageName.equals(PACKAGE_WALLPAPERS))) { + dlog("Spoofing Pixel 6 Pro for: " + packageName); + sP6Props.forEach((k, v) -> setPropValue(k, v)); + } + } + + private static void setPropValue(String key, Object value){ + try { + dlog("Setting prop " + key + " to " + value.toString()); + Field field = Build.class.getDeclaredField(key); + field.setAccessible(true); + field.set(null, value); + field.setAccessible(false); + } catch (NoSuchFieldException | IllegalAccessException e) { + Log.e(TAG, "Failed to set prop " + key, e); + } + } + + private static boolean isCallerSafetyNet() { + return sIsGms && Arrays.stream(Thread.currentThread().getStackTrace()) + .anyMatch(elem -> elem.getClassName().contains("DroidGuard")); + } + + public static void onEngineGetCertificateChain() { + // Check stack for SafetyNet or Play Integrity + if (isCallerSafetyNet() || sIsFinsky) { + dlog("Blocked key attestation sIsGms=" + sIsGms + " sIsFinsky=" + sIsFinsky); + throw new UnsupportedOperationException(); + } + } + + public static boolean hasSystemFeature(String name, boolean def) { + if (sIsPhotos && def && + Arrays.stream(sFeaturesBlacklist).anyMatch(name::contains)) { + dlog("Blocked system feature " + name + " for Google Photos"); + return false; + } + return def; + } + + public static void dlog(String msg) { + if (DEBUG) Log.d(TAG, msg); + } +} diff --git a/core/java/com/android/internal/util/TypedProperties.java b/core/java/com/android/internal/util/TypedProperties.java index 5613999ea773..c10dbe7fdf3b 100644 --- a/core/java/com/android/internal/util/TypedProperties.java +++ b/core/java/com/android/internal/util/TypedProperties.java @@ -264,29 +264,29 @@ static Object parseValue(StreamTokenizer st, final int type) throws IOException // Ensure that the type can hold this value, and return. int width = (type >> 8) & 0xff; switch (width) { - case 1: - if (value < Byte.MIN_VALUE || value > Byte.MAX_VALUE) { - throw new ParseException(st, "8-bit integer constant"); - } - return new Byte((byte)value); - case 2: - if (value < Short.MIN_VALUE || value > Short.MAX_VALUE) { - throw new ParseException(st, "16-bit integer constant"); - } - return new Short((short)value); - case 4: - if (value < Integer.MIN_VALUE || value > Integer.MAX_VALUE) { - throw new ParseException(st, "32-bit integer constant"); - } - return new Integer((int)value); - case 8: - if (value < Long.MIN_VALUE || value > Long.MAX_VALUE) { - throw new ParseException(st, "64-bit integer constant"); - } - return new Long(value); - default: - throw new IllegalStateException( - "Internal error; unexpected integer type width " + width); + case 1: + if (value < Byte.MIN_VALUE || value > Byte.MAX_VALUE) { + throw new ParseException(st, "8-bit integer constant"); + } + return Byte.valueOf((byte) value); + case 2: + if (value < Short.MIN_VALUE || value > Short.MAX_VALUE) { + throw new ParseException(st, "16-bit integer constant"); + } + return Short.valueOf((short) value); + case 4: + if (value < Integer.MIN_VALUE || value > Integer.MAX_VALUE) { + throw new ParseException(st, "32-bit integer constant"); + } + return Integer.valueOf((int) value); + case 8: + if (value < Long.MIN_VALUE || value > Long.MAX_VALUE) { + throw new ParseException(st, "64-bit integer constant"); + } + return Long.valueOf(value); + default: + throw new IllegalStateException( + "Internal error; unexpected integer type width " + width); } } else if ((type & 0xff) == 'F') { if (token != StreamTokenizer.TT_WORD) { @@ -317,10 +317,10 @@ static Object parseValue(StreamTokenizer st, final int type) throws IOException throw new ParseException(st, "32-bit float constant"); } } - return new Float((float)value); + return Float.valueOf((float) value); } else { // This property is a double; no need to truncate. - return new Double(value); + return Double.valueOf(value); } } else if (type == TYPE_STRING) { // Expect a quoted string or the word "null". diff --git a/core/java/com/android/internal/util/custom/ColorUtils.java b/core/java/com/android/internal/util/custom/ColorUtils.java new file mode 100644 index 000000000000..f2756f3bef8f --- /dev/null +++ b/core/java/com/android/internal/util/custom/ColorUtils.java @@ -0,0 +1,546 @@ +/* + * Copyright (c) 2011-2016 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.internal.util.custom; + +import android.app.ActivityThread; + +import android.graphics.Bitmap; +import android.graphics.Canvas; +import android.graphics.Color; +import android.graphics.drawable.BitmapDrawable; +import android.graphics.drawable.Drawable; +import android.util.MathUtils; + +import com.android.internal.util.custom.palette.Palette; + +import java.util.Collections; +import java.util.Comparator; + +/** + * Helper class for colorspace conversions, and color-related + * algorithms which may be generally useful. + */ +public class ColorUtils { + + private static int[] SOLID_COLORS = new int[] { + Color.RED, 0xFFFFA500, Color.YELLOW, Color.GREEN, Color.CYAN, + Color.BLUE, Color.MAGENTA, Color.WHITE, Color.BLACK + }; + + private static float[] COEFFICIENTS = new float[9]; + + static { + String[] coefficients = ActivityThread.currentApplication().getApplicationContext() + .getResources().getStringArray( + com.android.internal.R.array.config_nightDisplayColorTemperatureCoefficients); + for (int i = 0; i < 9 && i < coefficients.length; i++) { + COEFFICIENTS[i] = Float.valueOf(coefficients[i]); + } + } + + /** + * Drop the alpha component from an RGBA packed int and return + * a non sign-extended RGB int. + * + * @param rgba + * @return rgb + */ + public static int dropAlpha(int rgba) { + return rgba & 0x00FFFFFF; + } + + /** + * Converts an RGB packed int into L*a*b space, which is well-suited for finding + * perceptual differences in color + * + * @param rgb A 32-bit value of packed RGB ints + * @return array of Lab values of size 3 + */ + public static float[] convertRGBtoLAB(int rgb) { + float[] lab = new float[3]; + float fx, fy, fz; + float eps = 216.f / 24389.f; + float k = 24389.f / 27.f; + + float Xr = 0.964221f; // reference white D50 + float Yr = 1.0f; + float Zr = 0.825211f; + + // RGB to XYZ + float r = Color.red(rgb) / 255.f; //R 0..1 + float g = Color.green(rgb) / 255.f; //G 0..1 + float b = Color.blue(rgb) / 255.f; //B 0..1 + + // assuming sRGB (D65) + if (r <= 0.04045) + r = r / 12; + else + r = (float) Math.pow((r + 0.055) / 1.055, 2.4); + + if (g <= 0.04045) + g = g / 12; + else + g = (float) Math.pow((g + 0.055) / 1.055, 2.4); + + if (b <= 0.04045) + b = b / 12; + else + b = (float) Math.pow((b + 0.055) / 1.055, 2.4); + + float X = 0.436052025f * r + 0.385081593f * g + 0.143087414f * b; + float Y = 0.222491598f * r + 0.71688606f * g + 0.060621486f * b; + float Z = 0.013929122f * r + 0.097097002f * g + 0.71418547f * b; + + // XYZ to Lab + float xr = X / Xr; + float yr = Y / Yr; + float zr = Z / Zr; + + if (xr > eps) + fx = (float) Math.pow(xr, 1 / 3.); + else + fx = (float) ((k * xr + 16.) / 116.); + + if (yr > eps) + fy = (float) Math.pow(yr, 1 / 3.); + else + fy = (float) ((k * yr + 16.) / 116.); + + if (zr > eps) + fz = (float) Math.pow(zr, 1 / 3.); + else + fz = (float) ((k * zr + 16.) / 116); + + float Ls = (116 * fy) - 16; + float as = 500 * (fx - fy); + float bs = 200 * (fy - fz); + + lab[0] = (2.55f * Ls + .5f); + lab[1] = (as + .5f); + lab[2] = (bs + .5f); + + return lab; + } + + /** + * Calculate the colour difference value between two colours in lab space. + * This code is from OpenIMAJ under BSD License + * + * @param L1 first colour's L component + * @param a1 first colour's a component + * @param b1 first colour's b component + * @param L2 second colour's L component + * @param a2 second colour's a component + * @param b2 second colour's b component + * @return the CIE 2000 colour difference + */ + public static double calculateDeltaE(double L1, double a1, double b1, + double L2, double a2, double b2) { + double Lmean = (L1 + L2) / 2.0; + double C1 = Math.sqrt(a1 * a1 + b1 * b1); + double C2 = Math.sqrt(a2 * a2 + b2 * b2); + double Cmean = (C1 + C2) / 2.0; + + double G = (1 - Math.sqrt(Math.pow(Cmean, 7) / (Math.pow(Cmean, 7) + Math.pow(25, 7)))) / 2; + double a1prime = a1 * (1 + G); + double a2prime = a2 * (1 + G); + + double C1prime = Math.sqrt(a1prime * a1prime + b1 * b1); + double C2prime = Math.sqrt(a2prime * a2prime + b2 * b2); + double Cmeanprime = (C1prime + C2prime) / 2; + + double h1prime = Math.atan2(b1, a1prime) + + 2 * Math.PI * (Math.atan2(b1, a1prime) < 0 ? 1 : 0); + double h2prime = Math.atan2(b2, a2prime) + + 2 * Math.PI * (Math.atan2(b2, a2prime) < 0 ? 1 : 0); + double Hmeanprime = ((Math.abs(h1prime - h2prime) > Math.PI) + ? (h1prime + h2prime + 2 * Math.PI) / 2 : (h1prime + h2prime) / 2); + + double T = 1.0 - 0.17 * Math.cos(Hmeanprime - Math.PI / 6.0) + + 0.24 * Math.cos(2 * Hmeanprime) + 0.32 * Math.cos(3 * Hmeanprime + Math.PI / 30) + - 0.2 * Math.cos(4 * Hmeanprime - 21 * Math.PI / 60); + + double deltahprime = ((Math.abs(h1prime - h2prime) <= Math.PI) ? h2prime - h1prime + : (h2prime <= h1prime) ? h2prime - h1prime + 2 * Math.PI + : h2prime - h1prime - 2 * Math.PI); + + double deltaLprime = L2 - L1; + double deltaCprime = C2prime - C1prime; + double deltaHprime = 2.0 * Math.sqrt(C1prime * C2prime) * Math.sin(deltahprime / 2.0); + double SL = 1.0 + ((0.015 * (Lmean - 50) * (Lmean - 50)) + / (Math.sqrt(20 + (Lmean - 50) * (Lmean - 50)))); + double SC = 1.0 + 0.045 * Cmeanprime; + double SH = 1.0 + 0.015 * Cmeanprime * T; + + double deltaTheta = (30 * Math.PI / 180) + * Math.exp(-((180 / Math.PI * Hmeanprime - 275) / 25) + * ((180 / Math.PI * Hmeanprime - 275) / 25)); + double RC = (2 + * Math.sqrt(Math.pow(Cmeanprime, 7) / (Math.pow(Cmeanprime, 7) + Math.pow(25, 7)))); + double RT = (-RC * Math.sin(2 * deltaTheta)); + + double KL = 1; + double KC = 1; + double KH = 1; + + double deltaE = Math.sqrt( + ((deltaLprime / (KL * SL)) * (deltaLprime / (KL * SL))) + + ((deltaCprime / (KC * SC)) * (deltaCprime / (KC * SC))) + + ((deltaHprime / (KH * SH)) * (deltaHprime / (KH * SH))) + + (RT * (deltaCprime / (KC * SC)) * (deltaHprime / (KH * SH)))); + + return deltaE; + } + + /** + * Finds the "perceptually nearest" color from a list of colors to + * the given RGB value. This is done by converting to + * L*a*b colorspace and using the CIE2000 deltaE algorithm. + * + * @param rgb The original color to start with + * @param colors An array of colors to test + * @return RGB packed int of nearest color in the list + */ + public static int findPerceptuallyNearestColor(int rgb, int[] colors) { + int nearestColor = 0; + double closest = Double.MAX_VALUE; + + float[] original = convertRGBtoLAB(rgb); + + for (int i = 0; i < colors.length; i++) { + float[] cl = convertRGBtoLAB(colors[i]); + double deltaE = calculateDeltaE(original[0], original[1], original[2], + cl[0], cl[1], cl[2]); + if (deltaE < closest) { + nearestColor = colors[i]; + closest = deltaE; + } + } + return nearestColor; + } + + /** + * Convenience method to find the nearest "solid" color (having RGB components + * of either 0 or 255) to the given color. This is useful for cases such as + * LED notification lights which may not be able to display the full range + * of colors due to hardware limitations. + * + * @param rgb + * @return the perceptually nearest color in RGB + */ + public static int findPerceptuallyNearestSolidColor(int rgb) { + return findPerceptuallyNearestColor(rgb, SOLID_COLORS); + } + + /** + * Given a Palette, pick out the dominant swatch based on population + * + * @param palette + * @return the dominant Swatch + */ + public static Palette.Swatch getDominantSwatch(Palette palette) { + if (palette == null || palette.getSwatches().size() == 0) { + return null; + } + // find most-represented swatch based on population + return Collections.max(palette.getSwatches(), new Comparator() { + @Override + public int compare(Palette.Swatch sw1, Palette.Swatch sw2) { + return Integer.compare(sw1.getPopulation(), sw2.getPopulation()); + } + }); + } + + /** + * Takes a drawable and uses Palette to generate a suitable "alert" + * color which can be used for an external notification mechanism + * such as an RGB LED. This will always pick a solid color having + * RGB components of 255 or 0. + * + * @param drawable The drawable to generate a color for + * @return a suitable solid color which corresponds to the image + */ + public static int generateAlertColorFromDrawable(Drawable drawable) { + int alertColor = Color.BLACK; + Bitmap bitmap = null; + + if (drawable == null) { + return alertColor; + } + + if (drawable instanceof BitmapDrawable) { + bitmap = ((BitmapDrawable) drawable).getBitmap(); + } else { + int width = drawable.getIntrinsicWidth(); + int height = drawable.getIntrinsicHeight(); + bitmap = Bitmap.createBitmap(Math.max(1, width), + Math.max(1, height), + Bitmap.Config.ARGB_8888); + Canvas canvas = new Canvas(bitmap); + drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight()); + drawable.draw(canvas); + } + + if (bitmap != null) { + Palette p = Palette.from(bitmap).generate(); + if (p == null) { + return alertColor; + } + + // First try the dominant color + final Palette.Swatch dominantSwatch = getDominantSwatch(p); + int iconColor = alertColor; + if (dominantSwatch != null) { + iconColor = dominantSwatch.getRgb(); + alertColor = findPerceptuallyNearestSolidColor(iconColor); + } + + // Try the most saturated color if we got white or black (boring) + if (alertColor == Color.BLACK || alertColor == Color.WHITE) { + iconColor = p.getVibrantColor(Color.WHITE); + alertColor = findPerceptuallyNearestSolidColor(iconColor); + } + + if (!(drawable instanceof BitmapDrawable)) { + bitmap.recycle(); + } + } + + return alertColor; + } + + /** + * Convert a color temperature value (in Kelvin) to a RGB units as floats. + * This can be used in a transform matrix or hardware gamma control. + * + * @param degreesK + * @return array of floats representing rgb values 0->1 + */ + + public static float[] temperatureToRGB(int degreesK) { + float[] rgb = new float[3]; + + final float square = degreesK * degreesK; + for (int i = 0; i < rgb.length; i++) { + rgb[i] = square * COEFFICIENTS[i * 3] + + degreesK * COEFFICIENTS[i * 3 + 1] + COEFFICIENTS[i * 3 + 2]; + } + + return rgb; + } + + /** + * This table is a modified version of the original blackbody chart, found here: + * http://www.vendian.org/mncharity/dir3/blackbody/UnstableURLs/bbr_color.html + * + * Created by Ingo Thiel. + */ + private static final double[] sColorTable = new double[] { + 1.00000000, 0.18172716, 0.00000000, + 1.00000000, 0.25503671, 0.00000000, + 1.00000000, 0.30942099, 0.00000000, + 1.00000000, 0.35357379, 0.00000000, + 1.00000000, 0.39091524, 0.00000000, + 1.00000000, 0.42322816, 0.00000000, + 1.00000000, 0.45159884, 0.00000000, + 1.00000000, 0.47675916, 0.00000000, + 1.00000000, 0.49923747, 0.00000000, + 1.00000000, 0.51943421, 0.00000000, + 1.00000000, 0.54360078, 0.08679949, + 1.00000000, 0.56618736, 0.14065513, + 1.00000000, 0.58734976, 0.18362641, + 1.00000000, 0.60724493, 0.22137978, + 1.00000000, 0.62600248, 0.25591950, + 1.00000000, 0.64373109, 0.28819679, + 1.00000000, 0.66052319, 0.31873863, + 1.00000000, 0.67645822, 0.34786758, + 1.00000000, 0.69160518, 0.37579588, + 1.00000000, 0.70602449, 0.40267128, + 1.00000000, 0.71976951, 0.42860152, + 1.00000000, 0.73288760, 0.45366838, + 1.00000000, 0.74542112, 0.47793608, + 1.00000000, 0.75740814, 0.50145662, + 1.00000000, 0.76888303, 0.52427322, + 1.00000000, 0.77987699, 0.54642268, + 1.00000000, 0.79041843, 0.56793692, + 1.00000000, 0.80053332, 0.58884417, + 1.00000000, 0.81024551, 0.60916971, + 1.00000000, 0.81957693, 0.62893653, + 1.00000000, 0.82854786, 0.64816570, + 1.00000000, 0.83717703, 0.66687674, + 1.00000000, 0.84548188, 0.68508786, + 1.00000000, 0.85347859, 0.70281616, + 1.00000000, 0.86118227, 0.72007777, + 1.00000000, 0.86860704, 0.73688797, + 1.00000000, 0.87576611, 0.75326132, + 1.00000000, 0.88267187, 0.76921169, + 1.00000000, 0.88933596, 0.78475236, + 1.00000000, 0.89576933, 0.79989606, + 1.00000000, 0.90198230, 0.81465502, + 1.00000000, 0.90963069, 0.82838210, + 1.00000000, 0.91710889, 0.84190889, + 1.00000000, 0.92441842, 0.85523742, + 1.00000000, 0.93156127, 0.86836903, + 1.00000000, 0.93853986, 0.88130458, + 1.00000000, 0.94535695, 0.89404470, + 1.00000000, 0.95201559, 0.90658983, + 1.00000000, 0.95851906, 0.91894041, + 1.00000000, 0.96487079, 0.93109690, + 1.00000000, 0.97107439, 0.94305985, + 1.00000000, 0.97713351, 0.95482993, + 1.00000000, 0.98305189, 0.96640795, + 1.00000000, 0.98883326, 0.97779486, + 1.00000000, 0.99448139, 0.98899179, + 1.00000000, 1.00000000, 1.00000000, + 0.98947904, 0.99348723, 1.00000000, + 0.97940448, 0.98722715, 1.00000000, + 0.96975025, 0.98120637, 1.00000000, + 0.96049223, 0.97541240, 1.00000000, + 0.95160805, 0.96983355, 1.00000000, + 0.94303638, 0.96443333, 1.00000000, + 0.93480451, 0.95923080, 1.00000000, + 0.92689056, 0.95421394, 1.00000000, + 0.91927697, 0.94937330, 1.00000000, + 0.91194747, 0.94470005, 1.00000000, + 0.90488690, 0.94018594, 1.00000000, + 0.89808115, 0.93582323, 1.00000000, + 0.89151710, 0.93160469, 1.00000000, + 0.88518247, 0.92752354, 1.00000000, + 0.87906581, 0.92357340, 1.00000000, + 0.87315640, 0.91974827, 1.00000000, + 0.86744421, 0.91604254, 1.00000000, + 0.86191983, 0.91245088, 1.00000000, + 0.85657444, 0.90896831, 1.00000000, + 0.85139976, 0.90559011, 1.00000000, + 0.84638799, 0.90231183, 1.00000000, + 0.84153180, 0.89912926, 1.00000000, + 0.83682430, 0.89603843, 1.00000000, + 0.83225897, 0.89303558, 1.00000000, + 0.82782969, 0.89011714, 1.00000000, + 0.82353066, 0.88727974, 1.00000000, + 0.81935641, 0.88452017, 1.00000000, + 0.81530175, 0.88183541, 1.00000000, + 0.81136180, 0.87922257, 1.00000000, + 0.80753191, 0.87667891, 1.00000000, + 0.80380769, 0.87420182, 1.00000000, + 0.80018497, 0.87178882, 1.00000000, + 0.79665980, 0.86943756, 1.00000000, + 0.79322843, 0.86714579, 1.00000000, + 0.78988728, 0.86491137, 1.00000000, + 0.78663296, 0.86273225, 1.00000000, + 0.78346225, 0.86060650, 1.00000000, + 0.78037207, 0.85853224, 1.00000000, + 0.77735950, 0.85650771, 1.00000000, + 0.77442176, 0.85453121, 1.00000000, + 0.77155617, 0.85260112, 1.00000000, + 0.76876022, 0.85071588, 1.00000000, + 0.76603147, 0.84887402, 1.00000000, + 0.76336762, 0.84707411, 1.00000000, + 0.76076645, 0.84531479, 1.00000000, + 0.75822586, 0.84359476, 1.00000000, + 0.75574383, 0.84191277, 1.00000000, + 0.75331843, 0.84026762, 1.00000000, + 0.75094780, 0.83865816, 1.00000000, + 0.74863017, 0.83708329, 1.00000000, + 0.74636386, 0.83554194, 1.00000000, + 0.74414722, 0.83403311, 1.00000000, + 0.74197871, 0.83255582, 1.00000000, + 0.73985682, 0.83110912, 1.00000000, + 0.73778012, 0.82969211, 1.00000000, + 0.73574723, 0.82830393, 1.00000000, + 0.73375683, 0.82694373, 1.00000000, + 0.73180765, 0.82561071, 1.00000000, + 0.72989845, 0.82430410, 1.00000000, + 0.72802807, 0.82302316, 1.00000000, + 0.72619537, 0.82176715, 1.00000000, + 0.72439927, 0.82053539, 1.00000000, + 0.72263872, 0.81932722, 1.00000000, + 0.72091270, 0.81814197, 1.00000000, + 0.71922025, 0.81697905, 1.00000000, + 0.71756043, 0.81583783, 1.00000000, + 0.71593234, 0.81471775, 1.00000000, + 0.71433510, 0.81361825, 1.00000000, + 0.71276788, 0.81253878, 1.00000000, + 0.71122987, 0.81147883, 1.00000000, + 0.70972029, 0.81043789, 1.00000000, + 0.70823838, 0.80941546, 1.00000000, + 0.70678342, 0.80841109, 1.00000000, + 0.70535469, 0.80742432, 1.00000000, + 0.70395153, 0.80645469, 1.00000000, + 0.70257327, 0.80550180, 1.00000000, + 0.70121928, 0.80456522, 1.00000000, + 0.69988894, 0.80364455, 1.00000000, + 0.69858167, 0.80273941, 1.00000000, + 0.69729688, 0.80184943, 1.00000000, + 0.69603402, 0.80097423, 1.00000000, + 0.69479255, 0.80011347, 1.00000000, + 0.69357196, 0.79926681, 1.00000000, + 0.69237173, 0.79843391, 1.00000000, + 0.69119138, 0.79761446, 1.00000000, + 0.69003044, 0.79680814, 1.00000000, + 0.68888844, 0.79601466, 1.00000000, + 0.68776494, 0.79523371, 1.00000000, + 0.68665951, 0.79446502, 1.00000000, + 0.68557173, 0.79370830, 1.00000000, + 0.68450119, 0.79296330, 1.00000000, + 0.68344751, 0.79222975, 1.00000000, + 0.68241029, 0.79150740, 1.00000000, + 0.68138918, 0.79079600, 1.00000000, + 0.68038380, 0.79009531, 1.00000000, + 0.67939381, 0.78940511, 1.00000000, + 0.67841888, 0.78872517, 1.00000000, + 0.67745866, 0.78805526, 1.00000000, + 0.67651284, 0.78739518, 1.00000000, + 0.67558112, 0.78674472, 1.00000000, + 0.67466317, 0.78610368, 1.00000000, + 0.67375872, 0.78547186, 1.00000000, + 0.67286748, 0.78484907, 1.00000000, + 0.67198916, 0.78423512, 1.00000000, + 0.67112350, 0.78362984, 1.00000000, + 0.67027024, 0.78303305, 1.00000000, + 0.66942911, 0.78244457, 1.00000000, + 0.66859988, 0.78186425, 1.00000000, + 0.66778228, 0.78129191, 1.00000000, + 0.66697610, 0.78072740, 1.00000000, + 0.66618110, 0.78017057, 1.00000000, + 0.66539706, 0.77962127, 1.00000000, + 0.66462376, 0.77907934, 1.00000000, + 0.66386098, 0.77854465, 1.00000000, + 0.66310852, 0.77801705, 1.00000000, + 0.66236618, 0.77749642, 1.00000000, + 0.66163375, 0.77698261, 1.00000000, + 0.66091106, 0.77647551, 1.00000000, + 0.66019791, 0.77597498, 1.00000000, + 0.65949412, 0.77548090, 1.00000000, + 0.65879952, 0.77499315, 1.00000000, + 0.65811392, 0.77451161, 1.00000000, + 0.65743716, 0.77403618, 1.00000000, + 0.65676908, 0.77356673, 1.00000000, + 0.65610952, 0.77310316, 1.00000000, + 0.65545831, 0.77264537, 1.00000000, + 0.65481530, 0.77219324, 1.00000000, + 0.65418036, 0.77174669, 1.00000000, + 0.65355332, 0.77130560, 1.00000000, + 0.65293404, 0.77086988, 1.00000000, + 0.65232240, 0.77043944, 1.00000000, + 0.65171824, 0.77001419, 1.00000000, + 0.65112144, 0.76959404, 1.00000000, + 0.65053187, 0.76917889, 1.00000000, + 0.64994941, 0.76876866, 1.00000000, + 0.64937392, 0.76836326, 1.00000000 + }; + +} diff --git a/core/java/com/android/internal/util/custom/Concierge.java b/core/java/com/android/internal/util/custom/Concierge.java new file mode 100644 index 000000000000..74d8d73bf535 --- /dev/null +++ b/core/java/com/android/internal/util/custom/Concierge.java @@ -0,0 +1,151 @@ +/* + * Copyright (C) 2016 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.util.custom; + +import android.os.Parcel; + +/** + * Simply, Concierge handles your parcels and makes sure they get marshalled and unmarshalled + * correctly when cross IPC boundaries even when there is a version mismatch between the client + * sdk level and the framework implementation. + * + *

On incoming parcel (to be unmarshalled): + * + *

+ *     ParcelInfo incomingParcelInfo = Concierge.receiveParcel(incomingParcel);
+ *     int parcelableVersion = incomingParcelInfo.getParcelVersion();
+ *
+ *     // Do unmarshalling steps here iterating over every plausible version
+ *
+ *     // Complete the process
+ *     incomingParcelInfo.complete();
+ * 
+ * + *

On outgoing parcel (to be marshalled): + * + *

+ *     ParcelInfo outgoingParcelInfo = Concierge.prepareParcel(incomingParcel);
+ *
+ *     // Do marshalling steps here iterating over every plausible version
+ *
+ *     // Complete the process
+ *     outgoingParcelInfo.complete();
+ * 
+ */ +public final class Concierge { + + /** Not instantiable */ + private Concierge() { + // Don't instantiate + } + + /** + * Since there might be a case where new versions of the lineage framework use applications running + * old versions of the protocol (and thus old versions of this class), we need a versioning + * system for the parcels sent between the core framework and its sdk users. + * + * This parcelable version should be the latest version API version listed in + * {@link LINEAGE_VERSION_CODES} + * @hide + */ + public static final int PARCELABLE_VERSION = 9; + + /** + * Tell the concierge to receive our parcel, so we can get information from it. + * + * MUST CALL {@link ParcelInfo#complete()} AFTER UNMARSHALLING. + * + * @param parcel Incoming parcel to be unmarshalled + * @return {@link ParcelInfo} containing parcel information, specifically the version. + */ + public static ParcelInfo receiveParcel(Parcel parcel) { + return new ParcelInfo(parcel); + } + + /** + * Prepare a parcel for the Concierge. + * + * MUST CALL {@link ParcelInfo#complete()} AFTER MARSHALLING. + * + * @param parcel Outgoing parcel to be marshalled + * @return {@link ParcelInfo} containing parcel information, specifically the version. + */ + public static ParcelInfo prepareParcel(Parcel parcel) { + return new ParcelInfo(parcel, PARCELABLE_VERSION); + } + + /** + * Parcel header info specific to the Parcel object that is passed in via + * {@link #prepareParcel(Parcel)} or {@link #receiveParcel(Parcel)}. The exposed method + * of {@link #getParcelVersion()} gets the api level of the parcel object. + */ + public final static class ParcelInfo { + private Parcel mParcel; + private int mParcelableVersion; + private int mParcelableSize; + private int mStartPosition; + private int mSizePosition; + private boolean mCreation = false; + + ParcelInfo(Parcel parcel) { + mCreation = false; + mParcel = parcel; + mParcelableVersion = parcel.readInt(); + mParcelableSize = parcel.readInt(); + mStartPosition = parcel.dataPosition(); + } + + ParcelInfo(Parcel parcel, int parcelableVersion) { + mCreation = true; + mParcel = parcel; + mParcelableVersion = parcelableVersion; + + // Write parcelable version, make sure to define explicit changes + // within {@link #PARCELABLE_VERSION); + mParcel.writeInt(mParcelableVersion); + + // Inject a placeholder that will store the parcel size from this point on + // (not including the size itself). + mSizePosition = parcel.dataPosition(); + mParcel.writeInt(0); + mStartPosition = parcel.dataPosition(); + } + + /** + * Get the parcel version from the {@link Parcel} received by the Concierge. + * @return {@link #PARCELABLE_VERSION} of the {@link Parcel} + */ + public int getParcelVersion() { + return mParcelableVersion; + } + + /** + * Complete the {@link ParcelInfo} for the Concierge. + */ + public void complete() { + if (mCreation) { + // Go back and write size + mParcelableSize = mParcel.dataPosition() - mStartPosition; + mParcel.setDataPosition(mSizePosition); + mParcel.writeInt(mParcelableSize); + mParcel.setDataPosition(mStartPosition + mParcelableSize); + } else { + mParcel.setDataPosition(mStartPosition + mParcelableSize); + } + } + } +} diff --git a/core/java/com/android/internal/util/custom/FileUtils.java b/core/java/com/android/internal/util/custom/FileUtils.java new file mode 100644 index 000000000000..6b7ba194008c --- /dev/null +++ b/core/java/com/android/internal/util/custom/FileUtils.java @@ -0,0 +1,162 @@ +/* + * Copyright (C) 2016 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.util.custom; + +import android.util.Log; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.lang.NullPointerException; +import java.lang.SecurityException; + +public final class FileUtils { + private static final String TAG = "FileUtils"; + + private FileUtils() { + // This class is not supposed to be instantiated + } + + /** + * Reads the first line of text from the given file. + * Reference {@link BufferedReader#readLine()} for clarification on what a line is + * + * @return the read line contents, or null on failure + */ + public static String readOneLine(String fileName) { + String line = null; + BufferedReader reader = null; + + try { + reader = new BufferedReader(new FileReader(fileName), 512); + line = reader.readLine(); + } catch (FileNotFoundException e) { + Log.w(TAG, "No such file " + fileName + " for reading", e); + } catch (IOException e) { + Log.e(TAG, "Could not read from file " + fileName, e); + } finally { + try { + if (reader != null) { + reader.close(); + } + } catch (IOException e) { + // Ignored, not much we can do anyway + } + } + + return line; + } + + /** + * Writes the given value into the given file + * + * @return true on success, false on failure + */ + public static boolean writeLine(String fileName, String value) { + BufferedWriter writer = null; + + try { + writer = new BufferedWriter(new FileWriter(fileName)); + writer.write(value); + } catch (FileNotFoundException e) { + Log.w(TAG, "No such file " + fileName + " for writing", e); + return false; + } catch (IOException e) { + Log.e(TAG, "Could not write to file " + fileName, e); + return false; + } finally { + try { + if (writer != null) { + writer.close(); + } + } catch (IOException e) { + // Ignored, not much we can do anyway + } + } + + return true; + } + + /** + * Checks whether the given file exists + * + * @return true if exists, false if not + */ + public static boolean fileExists(String fileName) { + final File file = new File(fileName); + return file.exists(); + } + + /** + * Checks whether the given file is readable + * + * @return true if readable, false if not + */ + public static boolean isFileReadable(String fileName) { + final File file = new File(fileName); + return file.exists() && file.canRead(); + } + + /** + * Checks whether the given file is writable + * + * @return true if writable, false if not + */ + public static boolean isFileWritable(String fileName) { + final File file = new File(fileName); + return file.exists() && file.canWrite(); + } + + /** + * Deletes an existing file + * + * @return true if the delete was successful, false if not + */ + public static boolean delete(String fileName) { + final File file = new File(fileName); + boolean ok = false; + try { + ok = file.delete(); + } catch (SecurityException e) { + Log.w(TAG, "SecurityException trying to delete " + fileName, e); + } + return ok; + } + + /** + * Renames an existing file + * + * @return true if the rename was successful, false if not + */ + public static boolean rename(String srcPath, String dstPath) { + final File srcFile = new File(srcPath); + final File dstFile = new File(dstPath); + boolean ok = false; + try { + ok = srcFile.renameTo(dstFile); + } catch (SecurityException e) { + Log.w(TAG, "SecurityException trying to rename " + srcPath + " to " + dstPath, e); + } catch (NullPointerException e) { + Log.e(TAG, "NullPointerException trying to rename " + srcPath + " to " + dstPath, e); + } + return ok; + } +} diff --git a/core/java/com/android/internal/util/custom/MathUtils.java b/core/java/com/android/internal/util/custom/MathUtils.java new file mode 100644 index 000000000000..ca95c8abe798 --- /dev/null +++ b/core/java/com/android/internal/util/custom/MathUtils.java @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2016 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.internal.util.custom; + +public final class MathUtils { + + /** + * Given a range of values which change continuously in a non-linear way, + * we can map back and forth to a linear scale using some quadratic equations. + * + * The linear scale ranges from 0 -> 1. This method will calculate the + * coefficients needed to solve the conversion functions in the next two methods. + * + * lower = actual value when linear value = 0 + * mid = actual value when linear value = .5 + * upper actual value when linear value = 1 + * + * @param lower + * @param mid + * @param upper + * @return array of coefficients + */ + public static double[] powerCurve(double lower, double mid, double upper) { + final double[] curve = new double[3]; + curve[0] = ((lower * upper) - (mid * mid)) / (lower - (2 * mid) + upper); + curve[1] = Math.pow((mid - lower), 2) / (lower - (2 * mid) + upper); + curve[2] = 2 * Math.log((upper - mid) / (mid - lower)); + return curve; + } + + /** + * Map a value on a power curve to a linear value + * + * @param curve obtained from powerCurve() + * @param value to convert to linear scale + * @return linear value from 0 -> 1 + */ + public static double powerCurveToLinear(final double[] curve, double value) { + return Math.log((value - curve[0]) / curve[1]) / curve[2]; + } + + /** + * Map a value on a linear scale to a value on a power curve + * + * @param curve obtained from powerCurve() + * @param value from 0 -> 1 to map onto power curve + * @return actual value on the given curve + */ + public static double linearToPowerCurve(final double[] curve, double value) { + return curve[0] + curve[1] * Math.exp(curve[2] * value); + } + + +} diff --git a/core/java/com/android/internal/util/custom/palette/ColorCutQuantizer.java b/core/java/com/android/internal/util/custom/palette/ColorCutQuantizer.java new file mode 100644 index 000000000000..421049381d72 --- /dev/null +++ b/core/java/com/android/internal/util/custom/palette/ColorCutQuantizer.java @@ -0,0 +1,517 @@ +/* + * Copyright 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.util.custom.palette; + +import android.graphics.Color; +import android.util.TimingLogger; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Comparator; +import java.util.List; +import java.util.PriorityQueue; + +import com.android.internal.util.custom.palette.Palette.Swatch; + +/** + * An color quantizer based on the Median-cut algorithm, but optimized for picking out distinct + * colors rather than representation colors. + * + * The color space is represented as a 3-dimensional cube with each dimension being an RGB + * component. The cube is then repeatedly divided until we have reduced the color space to the + * requested number of colors. An average color is then generated from each cube. + * + * What makes this different to median-cut is that median-cut divided cubes so that all of the cubes + * have roughly the same population, where this quantizer divides boxes based on their color volume. + * This means that the color space is divided into distinct colors, rather than representative + * colors. + * + * @hide + */ +final class ColorCutQuantizer { + + private static final String LOG_TAG = "ColorCutQuantizer"; + private static final boolean LOG_TIMINGS = false; + + private static final int COMPONENT_RED = -3; + private static final int COMPONENT_GREEN = -2; + private static final int COMPONENT_BLUE = -1; + + private static final int QUANTIZE_WORD_WIDTH = 5; + private static final int QUANTIZE_WORD_MASK = (1 << QUANTIZE_WORD_WIDTH) - 1; + + final int[] mColors; + final int[] mHistogram; + final List mQuantizedColors; + final TimingLogger mTimingLogger; + final Palette.Filter[] mFilters; + + private final float[] mTempHsl = new float[3]; + + /** + * Constructor. + * + * @param pixels histogram representing an image's pixel data + * @param maxColors The maximum number of colors that should be in the result palette. + * @param filters Set of filters to use in the quantization stage + */ + ColorCutQuantizer(final int[] pixels, final int maxColors, final Palette.Filter[] filters) { + mTimingLogger = LOG_TIMINGS ? new TimingLogger(LOG_TAG, "Creation") : null; + mFilters = filters; + + final int[] hist = mHistogram = new int[1 << (QUANTIZE_WORD_WIDTH * 3)]; + for (int i = 0; i < pixels.length; i++) { + final int quantizedColor = quantizeFromRgb888(pixels[i]); + // Now update the pixel value to the quantized value + pixels[i] = quantizedColor; + // And update the histogram + hist[quantizedColor]++; + } + + if (LOG_TIMINGS) { + mTimingLogger.addSplit("Histogram created"); + } + + // Now let's count the number of distinct colors + int distinctColorCount = 0; + for (int color = 0; color < hist.length; color++) { + if (hist[color] > 0 && shouldIgnoreColor(color)) { + // If we should ignore the color, set the population to 0 + hist[color] = 0; + } + if (hist[color] > 0) { + // If the color has population, increase the distinct color count + distinctColorCount++; + } + } + + if (LOG_TIMINGS) { + mTimingLogger.addSplit("Filtered colors and distinct colors counted"); + } + + // Now lets go through create an array consisting of only distinct colors + final int[] colors = mColors = new int[distinctColorCount]; + int distinctColorIndex = 0; + for (int color = 0; color < hist.length; color++) { + if (hist[color] > 0) { + colors[distinctColorIndex++] = color; + } + } + + if (LOG_TIMINGS) { + mTimingLogger.addSplit("Distinct colors copied into array"); + } + + if (distinctColorCount <= maxColors) { + // The image has fewer colors than the maximum requested, so just return the colors + mQuantizedColors = new ArrayList<>(); + for (int color : colors) { + mQuantizedColors.add(new Swatch(approximateToRgb888(color), hist[color])); + } + + if (LOG_TIMINGS) { + mTimingLogger.addSplit("Too few colors present. Copied to Swatches"); + mTimingLogger.dumpToLog(); + } + } else { + // We need use quantization to reduce the number of colors + mQuantizedColors = quantizePixels(maxColors); + + if (LOG_TIMINGS) { + mTimingLogger.addSplit("Quantized colors computed"); + mTimingLogger.dumpToLog(); + } + } + } + + /** + * @return the list of quantized colors + */ + List getQuantizedColors() { + return mQuantizedColors; + } + + private List quantizePixels(int maxColors) { + // Create the priority queue which is sorted by volume descending. This means we always + // split the largest box in the queue + final PriorityQueue pq = new PriorityQueue<>(maxColors, VBOX_COMPARATOR_VOLUME); + + // To start, offer a box which contains all of the colors + pq.offer(new Vbox(0, mColors.length - 1)); + + // Now go through the boxes, splitting them until we have reached maxColors or there are no + // more boxes to split + splitBoxes(pq, maxColors); + + // Finally, return the average colors of the color boxes + return generateAverageColors(pq); + } + + /** + * Iterate through the {@link java.util.Queue}, popping + * {@link ColorCutQuantizer.Vbox} objects from the queue + * and splitting them. Once split, the new box and the remaining box are offered back to the + * queue. + * + * @param queue {@link java.util.PriorityQueue} to poll for boxes + * @param maxSize Maximum amount of boxes to split + */ + private void splitBoxes(final PriorityQueue queue, final int maxSize) { + while (queue.size() < maxSize) { + final Vbox vbox = queue.poll(); + + if (vbox != null && vbox.canSplit()) { + // First split the box, and offer the result + queue.offer(vbox.splitBox()); + + if (LOG_TIMINGS) { + mTimingLogger.addSplit("Box split"); + } + // Then offer the box back + queue.offer(vbox); + } else { + if (LOG_TIMINGS) { + mTimingLogger.addSplit("All boxes split"); + } + // If we get here then there are no more boxes to split, so return + return; + } + } + } + + private List generateAverageColors(Collection vboxes) { + ArrayList colors = new ArrayList<>(vboxes.size()); + for (Vbox vbox : vboxes) { + Swatch swatch = vbox.getAverageColor(); + if (!shouldIgnoreColor(swatch)) { + // As we're averaging a color box, we can still get colors which we do not want, so + // we check again here + colors.add(swatch); + } + } + return colors; + } + + /** + * Represents a tightly fitting box around a color space. + */ + private class Vbox { + // lower and upper index are inclusive + private int mLowerIndex; + private int mUpperIndex; + // Population of colors within this box + private int mPopulation; + + private int mMinRed, mMaxRed; + private int mMinGreen, mMaxGreen; + private int mMinBlue, mMaxBlue; + + Vbox(int lowerIndex, int upperIndex) { + mLowerIndex = lowerIndex; + mUpperIndex = upperIndex; + fitBox(); + } + + final int getVolume() { + return (mMaxRed - mMinRed + 1) * (mMaxGreen - mMinGreen + 1) * + (mMaxBlue - mMinBlue + 1); + } + + final boolean canSplit() { + return getColorCount() > 1; + } + + final int getColorCount() { + return 1 + mUpperIndex - mLowerIndex; + } + + /** + * Recomputes the boundaries of this box to tightly fit the colors within the box. + */ + final void fitBox() { + final int[] colors = mColors; + final int[] hist = mHistogram; + + // Reset the min and max to opposite values + int minRed, minGreen, minBlue; + minRed = minGreen = minBlue = Integer.MAX_VALUE; + int maxRed, maxGreen, maxBlue; + maxRed = maxGreen = maxBlue = Integer.MIN_VALUE; + int count = 0; + + for (int i = mLowerIndex; i <= mUpperIndex; i++) { + final int color = colors[i]; + count += hist[color]; + + final int r = quantizedRed(color); + final int g = quantizedGreen(color); + final int b = quantizedBlue(color); + if (r > maxRed) { + maxRed = r; + } + if (r < minRed) { + minRed = r; + } + if (g > maxGreen) { + maxGreen = g; + } + if (g < minGreen) { + minGreen = g; + } + if (b > maxBlue) { + maxBlue = b; + } + if (b < minBlue) { + minBlue = b; + } + } + + mMinRed = minRed; + mMaxRed = maxRed; + mMinGreen = minGreen; + mMaxGreen = maxGreen; + mMinBlue = minBlue; + mMaxBlue = maxBlue; + mPopulation = count; + } + + /** + * Split this color box at the mid-point along it's longest dimension + * + * @return the new ColorBox + */ + final Vbox splitBox() { + if (!canSplit()) { + throw new IllegalStateException("Can not split a box with only 1 color"); + } + + // find median along the longest dimension + final int splitPoint = findSplitPoint(); + + Vbox newBox = new Vbox(splitPoint + 1, mUpperIndex); + + // Now change this box's upperIndex and recompute the color boundaries + mUpperIndex = splitPoint; + fitBox(); + + return newBox; + } + + /** + * @return the dimension which this box is largest in + */ + final int getLongestColorDimension() { + final int redLength = mMaxRed - mMinRed; + final int greenLength = mMaxGreen - mMinGreen; + final int blueLength = mMaxBlue - mMinBlue; + + if (redLength >= greenLength && redLength >= blueLength) { + return COMPONENT_RED; + } else if (greenLength >= redLength && greenLength >= blueLength) { + return COMPONENT_GREEN; + } else { + return COMPONENT_BLUE; + } + } + + /** + * Finds the point within this box's lowerIndex and upperIndex index of where to split. + * + * This is calculated by finding the longest color dimension, and then sorting the + * sub-array based on that dimension value in each color. The colors are then iterated over + * until a color is found with at least the midpoint of the whole box's dimension midpoint. + * + * @return the index of the colors array to split from + */ + final int findSplitPoint() { + final int longestDimension = getLongestColorDimension(); + final int[] colors = mColors; + final int[] hist = mHistogram; + + // We need to sort the colors in this box based on the longest color dimension. + // As we can't use a Comparator to define the sort logic, we modify each color so that + // it's most significant is the desired dimension + modifySignificantOctet(colors, longestDimension, mLowerIndex, mUpperIndex); + + // Now sort... Arrays.sort uses a exclusive toIndex so we need to add 1 + Arrays.sort(colors, mLowerIndex, mUpperIndex + 1); + + // Now revert all of the colors so that they are packed as RGB again + modifySignificantOctet(colors, longestDimension, mLowerIndex, mUpperIndex); + + final int midPoint = mPopulation / 2; + for (int i = mLowerIndex, count = 0; i <= mUpperIndex; i++) { + count += hist[colors[i]]; + if (count >= midPoint) { + return i; + } + } + + return mLowerIndex; + } + + /** + * @return the average color of this box. + */ + final Swatch getAverageColor() { + final int[] colors = mColors; + final int[] hist = mHistogram; + int redSum = 0; + int greenSum = 0; + int blueSum = 0; + int totalPopulation = 0; + + for (int i = mLowerIndex; i <= mUpperIndex; i++) { + final int color = colors[i]; + final int colorPopulation = hist[color]; + + totalPopulation += colorPopulation; + redSum += colorPopulation * quantizedRed(color); + greenSum += colorPopulation * quantizedGreen(color); + blueSum += colorPopulation * quantizedBlue(color); + } + + final int redMean = Math.round(redSum / (float) totalPopulation); + final int greenMean = Math.round(greenSum / (float) totalPopulation); + final int blueMean = Math.round(blueSum / (float) totalPopulation); + + return new Swatch(approximateToRgb888(redMean, greenMean, blueMean), totalPopulation); + } + } + + /** + * Modify the significant octet in a packed color int. Allows sorting based on the value of a + * single color component. This relies on all components being the same word size. + * + * @see Vbox#findSplitPoint() + */ + private static void modifySignificantOctet(final int[] a, final int dimension, + final int lower, final int upper) { + switch (dimension) { + case COMPONENT_RED: + // Already in RGB, no need to do anything + break; + case COMPONENT_GREEN: + // We need to do a RGB to GRB swap, or vice-versa + for (int i = lower; i <= upper; i++) { + final int color = a[i]; + a[i] = quantizedGreen(color) << (QUANTIZE_WORD_WIDTH + QUANTIZE_WORD_WIDTH) + | quantizedRed(color) << QUANTIZE_WORD_WIDTH + | quantizedBlue(color); + } + break; + case COMPONENT_BLUE: + // We need to do a RGB to BGR swap, or vice-versa + for (int i = lower; i <= upper; i++) { + final int color = a[i]; + a[i] = quantizedBlue(color) << (QUANTIZE_WORD_WIDTH + QUANTIZE_WORD_WIDTH) + | quantizedGreen(color) << QUANTIZE_WORD_WIDTH + | quantizedRed(color); + } + break; + } + } + + private boolean shouldIgnoreColor(int color565) { + final int rgb = approximateToRgb888(color565); + ColorUtils.colorToHSL(rgb, mTempHsl); + return shouldIgnoreColor(rgb, mTempHsl); + } + + private boolean shouldIgnoreColor(Swatch color) { + return shouldIgnoreColor(color.getRgb(), color.getHsl()); + } + + private boolean shouldIgnoreColor(int rgb, float[] hsl) { + if (mFilters != null && mFilters.length > 0) { + for (int i = 0, count = mFilters.length; i < count; i++) { + if (!mFilters[i].isAllowed(rgb, hsl)) { + return true; + } + } + } + return false; + } + + /** + * Comparator which sorts {@link Vbox} instances based on their volume, in descending order + */ + private static final Comparator VBOX_COMPARATOR_VOLUME = new Comparator() { + @Override + public int compare(Vbox lhs, Vbox rhs) { + return rhs.getVolume() - lhs.getVolume(); + } + }; + + /** + * Quantized a RGB888 value to have a word width of {@value #QUANTIZE_WORD_WIDTH}. + */ + private static int quantizeFromRgb888(int color) { + int r = modifyWordWidth(Color.red(color), 8, QUANTIZE_WORD_WIDTH); + int g = modifyWordWidth(Color.green(color), 8, QUANTIZE_WORD_WIDTH); + int b = modifyWordWidth(Color.blue(color), 8, QUANTIZE_WORD_WIDTH); + return r << (QUANTIZE_WORD_WIDTH + QUANTIZE_WORD_WIDTH) | g << QUANTIZE_WORD_WIDTH | b; + } + + /** + * Quantized RGB888 values to have a word width of {@value #QUANTIZE_WORD_WIDTH}. + */ + private static int approximateToRgb888(int r, int g, int b) { + return Color.rgb(modifyWordWidth(r, QUANTIZE_WORD_WIDTH, 8), + modifyWordWidth(g, QUANTIZE_WORD_WIDTH, 8), + modifyWordWidth(b, QUANTIZE_WORD_WIDTH, 8)); + } + + private static int approximateToRgb888(int color) { + return approximateToRgb888(quantizedRed(color), quantizedGreen(color), quantizedBlue(color)); + } + + /** + * @return red component of the quantized color + */ + private static int quantizedRed(int color) { + return (color >> (QUANTIZE_WORD_WIDTH + QUANTIZE_WORD_WIDTH)) & QUANTIZE_WORD_MASK; + } + + /** + * @return green component of a quantized color + */ + private static int quantizedGreen(int color) { + return (color >> QUANTIZE_WORD_WIDTH) & QUANTIZE_WORD_MASK; + } + + /** + * @return blue component of a quantized color + */ + private static int quantizedBlue(int color) { + return color & QUANTIZE_WORD_MASK; + } + + private static int modifyWordWidth(int value, int currentWidth, int targetWidth) { + final int newValue; + if (targetWidth > currentWidth) { + // If we're approximating up in word width, we'll shift up + newValue = value << (targetWidth - currentWidth); + } else { + // Else, we will just shift and keep the MSB + newValue = value >> (currentWidth - targetWidth); + } + return newValue & ((1 << targetWidth) - 1); + } + +} diff --git a/core/java/com/android/internal/util/custom/palette/ColorUtils.java b/core/java/com/android/internal/util/custom/palette/ColorUtils.java new file mode 100644 index 000000000000..4dbdfe7d3320 --- /dev/null +++ b/core/java/com/android/internal/util/custom/palette/ColorUtils.java @@ -0,0 +1,299 @@ +/* + * Copyright 2015 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.util.custom.palette; + +import android.graphics.Color; + +/** + * A set of color-related utility methods, building upon those available in {@code Color}. + * + * @hide + */ +public class ColorUtils { + + private static final int MIN_ALPHA_SEARCH_MAX_ITERATIONS = 10; + private static final int MIN_ALPHA_SEARCH_PRECISION = 10; + + private ColorUtils() {} + + /** + * Composite two potentially translucent colors over each other and returns the result. + */ + public static int compositeColors(int foreground, int background) { + int bgAlpha = Color.alpha(background); + int fgAlpha = Color.alpha(foreground); + int a = compositeAlpha(fgAlpha, bgAlpha); + + int r = compositeComponent(Color.red(foreground), fgAlpha, + Color.red(background), bgAlpha, a); + int g = compositeComponent(Color.green(foreground), fgAlpha, + Color.green(background), bgAlpha, a); + int b = compositeComponent(Color.blue(foreground), fgAlpha, + Color.blue(background), bgAlpha, a); + + return Color.argb(a, r, g, b); + } + + private static int compositeAlpha(int foregroundAlpha, int backgroundAlpha) { + return 0xFF - (((0xFF - backgroundAlpha) * (0xFF - foregroundAlpha)) / 0xFF); + } + + private static int compositeComponent(int fgC, int fgA, int bgC, int bgA, int a) { + if (a == 0) return 0; + return ((0xFF * fgC * fgA) + (bgC * bgA * (0xFF - fgA))) / (a * 0xFF); + } + + /** + * Returns the luminance of a color. + * + * Formula defined here: http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef + */ + public static double calculateLuminance(int color) { + double red = Color.red(color) / 255d; + red = red < 0.03928 ? red / 12.92 : Math.pow((red + 0.055) / 1.055, 2.4); + + double green = Color.green(color) / 255d; + green = green < 0.03928 ? green / 12.92 : Math.pow((green + 0.055) / 1.055, 2.4); + + double blue = Color.blue(color) / 255d; + blue = blue < 0.03928 ? blue / 12.92 : Math.pow((blue + 0.055) / 1.055, 2.4); + + return (0.2126 * red) + (0.7152 * green) + (0.0722 * blue); + } + + /** + * Returns the contrast ratio between {@code foreground} and {@code background}. + * {@code background} must be opaque. + *

+ * Formula defined + * here. + */ + public static double calculateContrast(int foreground, int background) { + if (Color.alpha(background) != 255) { + throw new IllegalArgumentException("background can not be translucent"); + } + if (Color.alpha(foreground) < 255) { + // If the foreground is translucent, composite the foreground over the background + foreground = compositeColors(foreground, background); + } + + final double luminance1 = calculateLuminance(foreground) + 0.05; + final double luminance2 = calculateLuminance(background) + 0.05; + + // Now return the lighter luminance divided by the darker luminance + return Math.max(luminance1, luminance2) / Math.min(luminance1, luminance2); + } + + /** + * Calculates the minimum alpha value which can be applied to {@code foreground} so that would + * have a contrast value of at least {@code minContrastRatio} when compared to + * {@code background}. + * + * @param foreground the foreground color. + * @param background the background color. Should be opaque. + * @param minContrastRatio the minimum contrast ratio. + * @return the alpha value in the range 0-255, or -1 if no value could be calculated. + */ + public static int calculateMinimumAlpha(int foreground, int background, + float minContrastRatio) { + if (Color.alpha(background) != 255) { + throw new IllegalArgumentException("background can not be translucent"); + } + + // First lets check that a fully opaque foreground has sufficient contrast + int testForeground = setAlphaComponent(foreground, 255); + double testRatio = calculateContrast(testForeground, background); + if (testRatio < minContrastRatio) { + // Fully opaque foreground does not have sufficient contrast, return error + return -1; + } + + // Binary search to find a value with the minimum value which provides sufficient contrast + int numIterations = 0; + int minAlpha = 0; + int maxAlpha = 255; + + while (numIterations <= MIN_ALPHA_SEARCH_MAX_ITERATIONS && + (maxAlpha - minAlpha) > MIN_ALPHA_SEARCH_PRECISION) { + final int testAlpha = (minAlpha + maxAlpha) / 2; + + testForeground = setAlphaComponent(foreground, testAlpha); + testRatio = calculateContrast(testForeground, background); + + if (testRatio < minContrastRatio) { + minAlpha = testAlpha; + } else { + maxAlpha = testAlpha; + } + + numIterations++; + } + + // Conservatively return the max of the range of possible alphas, which is known to pass. + return maxAlpha; + } + + /** + * Convert RGB components to HSL (hue-saturation-lightness). + *

    + *
  • hsl[0] is Hue [0 .. 360)
  • + *
  • hsl[1] is Saturation [0...1]
  • + *
  • hsl[2] is Lightness [0...1]
  • + *
+ * + * @param r red component value [0..255] + * @param g green component value [0..255] + * @param b blue component value [0..255] + * @param hsl 3 element array which holds the resulting HSL components. + */ + public static void RGBToHSL(int r, int g, int b, float[] hsl) { + final float rf = r / 255f; + final float gf = g / 255f; + final float bf = b / 255f; + + final float max = Math.max(rf, Math.max(gf, bf)); + final float min = Math.min(rf, Math.min(gf, bf)); + final float deltaMaxMin = max - min; + + float h, s; + float l = (max + min) / 2f; + + if (max == min) { + // Monochromatic + h = s = 0f; + } else { + if (max == rf) { + h = ((gf - bf) / deltaMaxMin) % 6f; + } else if (max == gf) { + h = ((bf - rf) / deltaMaxMin) + 2f; + } else { + h = ((rf - gf) / deltaMaxMin) + 4f; + } + + s = deltaMaxMin / (1f - Math.abs(2f * l - 1f)); + } + + h = (h * 60f) % 360f; + if (h < 0) { + h += 360f; + } + + hsl[0] = constrain(h, 0f, 360f); + hsl[1] = constrain(s, 0f, 1f); + hsl[2] = constrain(l, 0f, 1f); + } + + /** + * Convert the ARGB color to its HSL (hue-saturation-lightness) components. + *
    + *
  • hsl[0] is Hue [0 .. 360)
  • + *
  • hsl[1] is Saturation [0...1]
  • + *
  • hsl[2] is Lightness [0...1]
  • + *
+ * + * @param color the ARGB color to convert. The alpha component is ignored. + * @param hsl 3 element array which holds the resulting HSL components. + */ + public static void colorToHSL(int color, float[] hsl) { + RGBToHSL(Color.red(color), Color.green(color), Color.blue(color), hsl); + } + + /** + * Convert HSL (hue-saturation-lightness) components to a RGB color. + *
    + *
  • hsl[0] is Hue [0 .. 360)
  • + *
  • hsl[1] is Saturation [0...1]
  • + *
  • hsl[2] is Lightness [0...1]
  • + *
+ * If hsv values are out of range, they are pinned. + * + * @param hsl 3 element array which holds the input HSL components. + * @return the resulting RGB color + */ + public static int HSLToColor(float[] hsl) { + final float h = hsl[0]; + final float s = hsl[1]; + final float l = hsl[2]; + + final float c = (1f - Math.abs(2 * l - 1f)) * s; + final float m = l - 0.5f * c; + final float x = c * (1f - Math.abs((h / 60f % 2f) - 1f)); + + final int hueSegment = (int) h / 60; + + int r = 0, g = 0, b = 0; + + switch (hueSegment) { + case 0: + r = Math.round(255 * (c + m)); + g = Math.round(255 * (x + m)); + b = Math.round(255 * m); + break; + case 1: + r = Math.round(255 * (x + m)); + g = Math.round(255 * (c + m)); + b = Math.round(255 * m); + break; + case 2: + r = Math.round(255 * m); + g = Math.round(255 * (c + m)); + b = Math.round(255 * (x + m)); + break; + case 3: + r = Math.round(255 * m); + g = Math.round(255 * (x + m)); + b = Math.round(255 * (c + m)); + break; + case 4: + r = Math.round(255 * (x + m)); + g = Math.round(255 * m); + b = Math.round(255 * (c + m)); + break; + case 5: + case 6: + r = Math.round(255 * (c + m)); + g = Math.round(255 * m); + b = Math.round(255 * (x + m)); + break; + } + + r = constrain(r, 0, 255); + g = constrain(g, 0, 255); + b = constrain(b, 0, 255); + + return Color.rgb(r, g, b); + } + + /** + * Set the alpha component of {@code color} to be {@code alpha}. + */ + public static int setAlphaComponent(int color, int alpha) { + if (alpha < 0 || alpha > 255) { + throw new IllegalArgumentException("alpha must be between 0 and 255."); + } + return (color & 0x00ffffff) | (alpha << 24); + } + + private static float constrain(float amount, float low, float high) { + return amount < low ? low : (amount > high ? high : amount); + } + + private static int constrain(int amount, int low, int high) { + return amount < low ? low : (amount > high ? high : amount); + } + +} diff --git a/core/java/com/android/internal/util/custom/palette/DefaultGenerator.java b/core/java/com/android/internal/util/custom/palette/DefaultGenerator.java new file mode 100644 index 000000000000..445d615b1547 --- /dev/null +++ b/core/java/com/android/internal/util/custom/palette/DefaultGenerator.java @@ -0,0 +1,244 @@ +/* + * Copyright 2015 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.util.custom.palette; + +import java.util.List; + +import com.android.internal.util.custom.palette.Palette.Swatch; + +/** + * @hide + */ +class DefaultGenerator extends Palette.Generator { + + private static final float TARGET_DARK_LUMA = 0.26f; + private static final float MAX_DARK_LUMA = 0.45f; + + private static final float MIN_LIGHT_LUMA = 0.55f; + private static final float TARGET_LIGHT_LUMA = 0.74f; + + private static final float MIN_NORMAL_LUMA = 0.3f; + private static final float TARGET_NORMAL_LUMA = 0.5f; + private static final float MAX_NORMAL_LUMA = 0.7f; + + private static final float TARGET_MUTED_SATURATION = 0.3f; + private static final float MAX_MUTED_SATURATION = 0.4f; + + private static final float TARGET_VIBRANT_SATURATION = 1f; + private static final float MIN_VIBRANT_SATURATION = 0.35f; + + private static final float WEIGHT_SATURATION = 3f; + private static final float WEIGHT_LUMA = 6f; + private static final float WEIGHT_POPULATION = 1f; + + private List mSwatches; + + private int mHighestPopulation; + + private Swatch mVibrantSwatch; + private Swatch mMutedSwatch; + private Swatch mDarkVibrantSwatch; + private Swatch mDarkMutedSwatch; + private Swatch mLightVibrantSwatch; + private Swatch mLightMutedSwatch; + + @Override + public void generate(final List swatches) { + mSwatches = swatches; + + mHighestPopulation = findMaxPopulation(); + + generateVariationColors(); + + // Now try and generate any missing colors + generateEmptySwatches(); + } + + @Override + public Swatch getVibrantSwatch() { + return mVibrantSwatch; + } + + @Override + public Swatch getLightVibrantSwatch() { + return mLightVibrantSwatch; + } + + @Override + public Swatch getDarkVibrantSwatch() { + return mDarkVibrantSwatch; + } + + @Override + public Swatch getMutedSwatch() { + return mMutedSwatch; + } + + @Override + public Swatch getLightMutedSwatch() { + return mLightMutedSwatch; + } + + @Override + public Swatch getDarkMutedSwatch() { + return mDarkMutedSwatch; + } + + private void generateVariationColors() { + mVibrantSwatch = findColorVariation(TARGET_NORMAL_LUMA, MIN_NORMAL_LUMA, MAX_NORMAL_LUMA, + TARGET_VIBRANT_SATURATION, MIN_VIBRANT_SATURATION, 1f); + + mLightVibrantSwatch = findColorVariation(TARGET_LIGHT_LUMA, MIN_LIGHT_LUMA, 1f, + TARGET_VIBRANT_SATURATION, MIN_VIBRANT_SATURATION, 1f); + + mDarkVibrantSwatch = findColorVariation(TARGET_DARK_LUMA, 0f, MAX_DARK_LUMA, + TARGET_VIBRANT_SATURATION, MIN_VIBRANT_SATURATION, 1f); + + mMutedSwatch = findColorVariation(TARGET_NORMAL_LUMA, MIN_NORMAL_LUMA, MAX_NORMAL_LUMA, + TARGET_MUTED_SATURATION, 0f, MAX_MUTED_SATURATION); + + mLightMutedSwatch = findColorVariation(TARGET_LIGHT_LUMA, MIN_LIGHT_LUMA, 1f, + TARGET_MUTED_SATURATION, 0f, MAX_MUTED_SATURATION); + + mDarkMutedSwatch = findColorVariation(TARGET_DARK_LUMA, 0f, MAX_DARK_LUMA, + TARGET_MUTED_SATURATION, 0f, MAX_MUTED_SATURATION); + } + + /** + * Try and generate any missing swatches from the swatches we did find. + */ + private void generateEmptySwatches() { + if (mVibrantSwatch == null) { + // If we do not have a vibrant color... + if (mDarkVibrantSwatch != null) { + // ...but we do have a dark vibrant, generate the value by modifying the luma + final float[] newHsl = copyHslValues(mDarkVibrantSwatch); + newHsl[2] = TARGET_NORMAL_LUMA; + mVibrantSwatch = new Swatch(ColorUtils.HSLToColor(newHsl), 0); + } + } + + if (mDarkVibrantSwatch == null) { + // If we do not have a dark vibrant color... + if (mVibrantSwatch != null) { + // ...but we do have a vibrant, generate the value by modifying the luma + final float[] newHsl = copyHslValues(mVibrantSwatch); + newHsl[2] = TARGET_DARK_LUMA; + mDarkVibrantSwatch = new Swatch(ColorUtils.HSLToColor(newHsl), 0); + } + } + } + + /** + * Find the {@link Palette.Swatch} with the highest population value and return the population. + */ + private int findMaxPopulation() { + int population = 0; + for (Swatch swatch : mSwatches) { + population = Math.max(population, swatch.getPopulation()); + } + return population; + } + + private Swatch findColorVariation(float targetLuma, float minLuma, float maxLuma, + float targetSaturation, float minSaturation, float maxSaturation) { + Swatch max = null; + float maxValue = 0f; + + for (Swatch swatch : mSwatches) { + final float sat = swatch.getHsl()[1]; + final float luma = swatch.getHsl()[2]; + + if (sat >= minSaturation && sat <= maxSaturation && + luma >= minLuma && luma <= maxLuma && + !isAlreadySelected(swatch)) { + float value = createComparisonValue(sat, targetSaturation, luma, targetLuma, + swatch.getPopulation(), mHighestPopulation); + if (max == null || value > maxValue) { + max = swatch; + maxValue = value; + } + } + } + + return max; + } + + /** + * @return true if we have already selected {@code swatch} + */ + private boolean isAlreadySelected(Swatch swatch) { + return mVibrantSwatch == swatch || mDarkVibrantSwatch == swatch || + mLightVibrantSwatch == swatch || mMutedSwatch == swatch || + mDarkMutedSwatch == swatch || mLightMutedSwatch == swatch; + } + + private static float createComparisonValue(float saturation, float targetSaturation, + float luma, float targetLuma, + int population, int maxPopulation) { + return createComparisonValue(saturation, targetSaturation, WEIGHT_SATURATION, + luma, targetLuma, WEIGHT_LUMA, + population, maxPopulation, WEIGHT_POPULATION); + } + + private static float createComparisonValue( + float saturation, float targetSaturation, float saturationWeight, + float luma, float targetLuma, float lumaWeight, + int population, int maxPopulation, float populationWeight) { + return weightedMean( + invertDiff(saturation, targetSaturation), saturationWeight, + invertDiff(luma, targetLuma), lumaWeight, + population / (float) maxPopulation, populationWeight + ); + } + + /** + * Copy a {@link Swatch}'s HSL values into a new float[]. + */ + private static float[] copyHslValues(Swatch color) { + final float[] newHsl = new float[3]; + System.arraycopy(color.getHsl(), 0, newHsl, 0, 3); + return newHsl; + } + + /** + * Returns a value in the range 0-1. 1 is returned when {@code value} equals the + * {@code targetValue} and then decreases as the absolute difference between {@code value} and + * {@code targetValue} increases. + * + * @param value the item's value + * @param targetValue the value which we desire + */ + private static float invertDiff(float value, float targetValue) { + return 1f - Math.abs(value - targetValue); + } + + private static float weightedMean(float... values) { + float sum = 0f; + float sumWeight = 0f; + + for (int i = 0; i < values.length; i += 2) { + float value = values[i]; + float weight = values[i + 1]; + + sum += (value * weight); + sumWeight += weight; + } + + return sum / sumWeight; + } +} diff --git a/core/java/com/android/internal/util/custom/palette/Palette.java b/core/java/com/android/internal/util/custom/palette/Palette.java new file mode 100644 index 000000000000..54b7d0de974b --- /dev/null +++ b/core/java/com/android/internal/util/custom/palette/Palette.java @@ -0,0 +1,740 @@ +/* + * Copyright 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.util.custom.palette; + +import android.graphics.Bitmap; +import android.graphics.Color; +import android.os.AsyncTask; +import android.annotation.ColorInt; +import android.annotation.Nullable; +import android.util.TimingLogger; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** + * A helper class to extract prominent colors from an image. + *

+ * A number of colors with different profiles are extracted from the image: + *

    + *
  • Vibrant
  • + *
  • Vibrant Dark
  • + *
  • Vibrant Light
  • + *
  • Muted
  • + *
  • Muted Dark
  • + *
  • Muted Light
  • + *
+ * These can be retrieved from the appropriate getter method. + * + *

+ * Instances are created with a {@link Builder} which supports several options to tweak the + * generated Palette. See that class' documentation for more information. + *

+ * Generation should always be completed on a background thread, ideally the one in + * which you load your image on. {@link Builder} supports both synchronous and asynchronous + * generation: + * + *

+ * // Synchronous
+ * Palette p = Palette.from(bitmap).generate();
+ *
+ * // Asynchronous
+ * Palette.from(bitmap).generate(new PaletteAsyncListener() {
+ *     public void onGenerated(Palette p) {
+ *         // Use generated instance
+ *     }
+ * });
+ * 
+ * + * @hide + */ +public final class Palette { + + /** + * Listener to be used with {@link #generateAsync(Bitmap, PaletteAsyncListener)} or + * {@link #generateAsync(Bitmap, int, PaletteAsyncListener)} + */ + public interface PaletteAsyncListener { + + /** + * Called when the {@link Palette} has been generated. + */ + void onGenerated(Palette palette); + } + + private static final int DEFAULT_RESIZE_BITMAP_MAX_DIMENSION = 192; + private static final int DEFAULT_CALCULATE_NUMBER_COLORS = 16; + + private static final float MIN_CONTRAST_TITLE_TEXT = 3.0f; + private static final float MIN_CONTRAST_BODY_TEXT = 4.5f; + + private static final String LOG_TAG = "Palette"; + private static final boolean LOG_TIMINGS = false; + + /** + * Start generating a {@link Palette} with the returned {@link Builder} instance. + */ + public static Builder from(Bitmap bitmap) { + return new Builder(bitmap); + } + + /** + * Generate a {@link Palette} from the pre-generated list of {@link Palette.Swatch} swatches. + * This is useful for testing, or if you want to resurrect a {@link Palette} instance from a + * list of swatches. Will return null if the {@code swatches} is null. + */ + public static Palette from(List swatches) { + return new Builder(swatches).generate(); + } + + /** + * @deprecated Use {@link Builder} to generate the Palette. + */ + @Deprecated + public static Palette generate(Bitmap bitmap) { + return from(bitmap).generate(); + } + + /** + * @deprecated Use {@link Builder} to generate the Palette. + */ + @Deprecated + public static Palette generate(Bitmap bitmap, int numColors) { + return from(bitmap).maximumColorCount(numColors).generate(); + } + + /** + * @deprecated Use {@link Builder} to generate the Palette. + */ + @Deprecated + public static AsyncTask generateAsync( + Bitmap bitmap, PaletteAsyncListener listener) { + return from(bitmap).generate(listener); + } + + /** + * @deprecated Use {@link Builder} to generate the Palette. + */ + @Deprecated + public static AsyncTask generateAsync( + final Bitmap bitmap, final int numColors, final PaletteAsyncListener listener) { + return from(bitmap).maximumColorCount(numColors).generate(listener); + } + + private final List mSwatches; + private final Generator mGenerator; + + private Palette(List swatches, Generator generator) { + mSwatches = swatches; + mGenerator = generator; + } + + /** + * Returns all of the swatches which make up the palette. + */ + public List getSwatches() { + return Collections.unmodifiableList(mSwatches); + } + + /** + * Returns the most vibrant swatch in the palette. Might be null. + */ + @Nullable + public Swatch getVibrantSwatch() { + return mGenerator.getVibrantSwatch(); + } + + /** + * Returns a light and vibrant swatch from the palette. Might be null. + */ + @Nullable + public Swatch getLightVibrantSwatch() { + return mGenerator.getLightVibrantSwatch(); + } + + /** + * Returns a dark and vibrant swatch from the palette. Might be null. + */ + @Nullable + public Swatch getDarkVibrantSwatch() { + return mGenerator.getDarkVibrantSwatch(); + } + + /** + * Returns a muted swatch from the palette. Might be null. + */ + @Nullable + public Swatch getMutedSwatch() { + return mGenerator.getMutedSwatch(); + } + + /** + * Returns a muted and light swatch from the palette. Might be null. + */ + @Nullable + public Swatch getLightMutedSwatch() { + return mGenerator.getLightMutedSwatch(); + } + + /** + * Returns a muted and dark swatch from the palette. Might be null. + */ + @Nullable + public Swatch getDarkMutedSwatch() { + return mGenerator.getDarkMutedSwatch(); + } + + /** + * Returns the most vibrant color in the palette as an RGB packed int. + * + * @param defaultColor value to return if the swatch isn't available + */ + @ColorInt + public int getVibrantColor(@ColorInt int defaultColor) { + Swatch swatch = getVibrantSwatch(); + return swatch != null ? swatch.getRgb() : defaultColor; + } + + /** + * Returns a light and vibrant color from the palette as an RGB packed int. + * + * @param defaultColor value to return if the swatch isn't available + */ + @ColorInt + public int getLightVibrantColor(@ColorInt int defaultColor) { + Swatch swatch = getLightVibrantSwatch(); + return swatch != null ? swatch.getRgb() : defaultColor; + } + + /** + * Returns a dark and vibrant color from the palette as an RGB packed int. + * + * @param defaultColor value to return if the swatch isn't available + */ + @ColorInt + public int getDarkVibrantColor(@ColorInt int defaultColor) { + Swatch swatch = getDarkVibrantSwatch(); + return swatch != null ? swatch.getRgb() : defaultColor; + } + + /** + * Returns a muted color from the palette as an RGB packed int. + * + * @param defaultColor value to return if the swatch isn't available + */ + @ColorInt + public int getMutedColor(@ColorInt int defaultColor) { + Swatch swatch = getMutedSwatch(); + return swatch != null ? swatch.getRgb() : defaultColor; + } + + /** + * Returns a muted and light color from the palette as an RGB packed int. + * + * @param defaultColor value to return if the swatch isn't available + */ + @ColorInt + public int getLightMutedColor(@ColorInt int defaultColor) { + Swatch swatch = getLightMutedSwatch(); + return swatch != null ? swatch.getRgb() : defaultColor; + } + + /** + * Returns a muted and dark color from the palette as an RGB packed int. + * + * @param defaultColor value to return if the swatch isn't available + */ + @ColorInt + public int getDarkMutedColor(@ColorInt int defaultColor) { + Swatch swatch = getDarkMutedSwatch(); + return swatch != null ? swatch.getRgb() : defaultColor; + } + + /** + * Scale the bitmap down so that it's largest dimension is {@code targetMaxDimension}. + * If {@code bitmap} is smaller than this, then it is returned. + */ + private static Bitmap scaleBitmapDown(Bitmap bitmap, final int targetMaxDimension) { + final int maxDimension = Math.max(bitmap.getWidth(), bitmap.getHeight()); + + if (maxDimension <= targetMaxDimension) { + // If the bitmap is small enough already, just return it + return bitmap; + } + + final float scaleRatio = targetMaxDimension / (float) maxDimension; + return Bitmap.createScaledBitmap(bitmap, + Math.round(bitmap.getWidth() * scaleRatio), + Math.round(bitmap.getHeight() * scaleRatio), + false); + } + + /** + * Represents a color swatch generated from an image's palette. The RGB color can be retrieved + * by calling {@link #getRgb()}. + */ + public static final class Swatch { + private final int mRed, mGreen, mBlue; + private final int mRgb; + private final int mPopulation; + + private boolean mGeneratedTextColors; + private int mTitleTextColor; + private int mBodyTextColor; + + private float[] mHsl; + + public Swatch(@ColorInt int color, int population) { + mRed = Color.red(color); + mGreen = Color.green(color); + mBlue = Color.blue(color); + mRgb = color; + mPopulation = population; + } + + Swatch(int red, int green, int blue, int population) { + mRed = red; + mGreen = green; + mBlue = blue; + mRgb = Color.rgb(red, green, blue); + mPopulation = population; + } + + /** + * @return this swatch's RGB color value + */ + @ColorInt + public int getRgb() { + return mRgb; + } + + /** + * Return this swatch's HSL values. + * hsv[0] is Hue [0 .. 360) + * hsv[1] is Saturation [0...1] + * hsv[2] is Lightness [0...1] + */ + public float[] getHsl() { + if (mHsl == null) { + mHsl = new float[3]; + ColorUtils.RGBToHSL(mRed, mGreen, mBlue, mHsl); + } + return mHsl; + } + + /** + * @return the number of pixels represented by this swatch + */ + public int getPopulation() { + return mPopulation; + } + + /** + * Returns an appropriate color to use for any 'title' text which is displayed over this + * {@link Swatch}'s color. This color is guaranteed to have sufficient contrast. + */ + @ColorInt + public int getTitleTextColor() { + ensureTextColorsGenerated(); + return mTitleTextColor; + } + + /** + * Returns an appropriate color to use for any 'body' text which is displayed over this + * {@link Swatch}'s color. This color is guaranteed to have sufficient contrast. + */ + @ColorInt + public int getBodyTextColor() { + ensureTextColorsGenerated(); + return mBodyTextColor; + } + + private void ensureTextColorsGenerated() { + if (!mGeneratedTextColors) { + // First check white, as most colors will be dark + final int lightBodyAlpha = ColorUtils.calculateMinimumAlpha( + Color.WHITE, mRgb, MIN_CONTRAST_BODY_TEXT); + final int lightTitleAlpha = ColorUtils.calculateMinimumAlpha( + Color.WHITE, mRgb, MIN_CONTRAST_TITLE_TEXT); + + if (lightBodyAlpha != -1 && lightTitleAlpha != -1) { + // If we found valid light values, use them and return + mBodyTextColor = ColorUtils.setAlphaComponent(Color.WHITE, lightBodyAlpha); + mTitleTextColor = ColorUtils.setAlphaComponent(Color.WHITE, lightTitleAlpha); + mGeneratedTextColors = true; + return; + } + + final int darkBodyAlpha = ColorUtils.calculateMinimumAlpha( + Color.BLACK, mRgb, MIN_CONTRAST_BODY_TEXT); + final int darkTitleAlpha = ColorUtils.calculateMinimumAlpha( + Color.BLACK, mRgb, MIN_CONTRAST_TITLE_TEXT); + + if (darkBodyAlpha != -1 && darkBodyAlpha != -1) { + // If we found valid dark values, use them and return + mBodyTextColor = ColorUtils.setAlphaComponent(Color.BLACK, darkBodyAlpha); + mTitleTextColor = ColorUtils.setAlphaComponent(Color.BLACK, darkTitleAlpha); + mGeneratedTextColors = true; + return; + } + + // If we reach here then we can not find title and body values which use the same + // lightness, we need to use mismatched values + mBodyTextColor = lightBodyAlpha != -1 + ? ColorUtils.setAlphaComponent(Color.WHITE, lightBodyAlpha) + : ColorUtils.setAlphaComponent(Color.BLACK, darkBodyAlpha); + mTitleTextColor = lightTitleAlpha != -1 + ? ColorUtils.setAlphaComponent(Color.WHITE, lightTitleAlpha) + : ColorUtils.setAlphaComponent(Color.BLACK, darkTitleAlpha); + mGeneratedTextColors = true; + } + } + + @Override + public String toString() { + return new StringBuilder(getClass().getSimpleName()) + .append(" [RGB: #").append(Integer.toHexString(getRgb())).append(']') + .append(" [HSL: ").append(Arrays.toString(getHsl())).append(']') + .append(" [Population: ").append(mPopulation).append(']') + .append(" [Title Text: #").append(Integer.toHexString(getTitleTextColor())) + .append(']') + .append(" [Body Text: #").append(Integer.toHexString(getBodyTextColor())) + .append(']').toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + + Swatch swatch = (Swatch) o; + return mPopulation == swatch.mPopulation && mRgb == swatch.mRgb; + } + + @Override + public int hashCode() { + return 31 * mRgb + mPopulation; + } + } + + /** + * Builder class for generating {@link Palette} instances. + */ + public static final class Builder { + private List mSwatches; + private Bitmap mBitmap; + private int mMaxColors = DEFAULT_CALCULATE_NUMBER_COLORS; + private int mResizeMaxDimension = DEFAULT_RESIZE_BITMAP_MAX_DIMENSION; + private final List mFilters = new ArrayList<>(); + + private Generator mGenerator; + + /** + * Construct a new {@link Builder} using a source {@link Bitmap} + */ + public Builder(Bitmap bitmap) { + this(); + if (bitmap == null || bitmap.isRecycled()) { + throw new IllegalArgumentException("Bitmap is not valid"); + } + mBitmap = bitmap; + } + + /** + * Construct a new {@link Builder} using a list of {@link Swatch} instances. + * Typically only used for testing. + */ + public Builder(List swatches) { + this(); + if (swatches == null || swatches.isEmpty()) { + throw new IllegalArgumentException("List of Swatches is not valid"); + } + mSwatches = swatches; + } + + private Builder() { + mFilters.add(DEFAULT_FILTER); + } + + /** + * Set the {@link Generator} to use when generating the {@link Palette}. If this is called + * with {@code null} then the default generator will be used. + */ + Builder generator(Generator generator) { + mGenerator = generator; + return this; + } + + /** + * Set the maximum number of colors to use in the quantization step when using a + * {@link android.graphics.Bitmap} as the source. + *

+ * Good values for depend on the source image type. For landscapes, good values are in + * the range 10-16. For images which are largely made up of people's faces then this + * value should be increased to ~24. + */ + public Builder maximumColorCount(int colors) { + mMaxColors = colors; + return this; + } + + /** + * Set the resize value when using a {@link android.graphics.Bitmap} as the source. + * If the bitmap's largest dimension is greater than the value specified, then the bitmap + * will be resized so that it's largest dimension matches {@code maxDimension}. If the + * bitmap is smaller or equal, the original is used as-is. + *

+ * This value has a large effect on the processing time. The larger the resized image is, + * the greater time it will take to generate the palette. The smaller the image is, the + * more detail is lost in the resulting image and thus less precision for color selection. + */ + public Builder resizeBitmapSize(int maxDimension) { + mResizeMaxDimension = maxDimension; + return this; + } + + /** + * Clear all added filters. This includes any default filters added automatically by + * {@link Palette}. + */ + public Builder clearFilters() { + mFilters.clear(); + return this; + } + + /** + * Add a filter to be able to have fine grained controlled over the colors which are + * allowed in the resulting palette. + * + * @param filter filter to add. + */ + public Builder addFilter(Filter filter) { + if (filter != null) { + mFilters.add(filter); + } + return this; + } + + /** + * Generate and return the {@link Palette} synchronously. + */ + public Palette generate() { + final TimingLogger logger = LOG_TIMINGS + ? new TimingLogger(LOG_TAG, "Generation") + : null; + + List swatches; + + if (mBitmap != null) { + // We have a Bitmap so we need to quantization to reduce the number of colors + + if (mResizeMaxDimension <= 0) { + throw new IllegalArgumentException( + "Minimum dimension size for resizing should should be >= 1"); + } + + // First we'll scale down the bitmap so it's largest dimension is as specified + final Bitmap scaledBitmap = scaleBitmapDown(mBitmap, mResizeMaxDimension); + + if (logger != null) { + logger.addSplit("Processed Bitmap"); + } + + // Now generate a quantizer from the Bitmap + final int width = scaledBitmap.getWidth(); + final int height = scaledBitmap.getHeight(); + final int[] pixels = new int[width * height]; + scaledBitmap.getPixels(pixels, 0, width, 0, 0, width, height); + + final ColorCutQuantizer quantizer = new ColorCutQuantizer(pixels, mMaxColors, + mFilters.isEmpty() ? null : mFilters.toArray(new Filter[0])); + + // If created a new bitmap, recycle it + if (scaledBitmap != mBitmap) { + scaledBitmap.recycle(); + } + swatches = quantizer.getQuantizedColors(); + + if (logger != null) { + logger.addSplit("Color quantization completed"); + } + } else { + // Else we're using the provided swatches + swatches = mSwatches; + } + + // If we haven't been provided with a generator, use the default + if (mGenerator == null) { + mGenerator = new DefaultGenerator(); + } + + // Now call let the Generator do it's thing + mGenerator.generate(swatches); + + if (logger != null) { + logger.addSplit("Generator.generate() completed"); + } + + // Now create a Palette instance + Palette p = new Palette(swatches, mGenerator); + + if (logger != null) { + logger.addSplit("Created Palette"); + logger.dumpToLog(); + } + + return p; + } + + /** + * Generate the {@link Palette} asynchronously. The provided listener's + * {@link PaletteAsyncListener#onGenerated} method will be called with the palette when + * generated. + */ + public AsyncTask generate(final PaletteAsyncListener listener) { + if (listener == null) { + throw new IllegalArgumentException("listener can not be null"); + } + + AsyncTask task = new AsyncTask() { + @Override + protected Palette doInBackground(Bitmap... params) { + return generate(); + } + + @Override + protected void onPostExecute(Palette colorExtractor) { + listener.onGenerated(colorExtractor); + } + }; + task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, mBitmap); + return task; + } + } + + static abstract class Generator { + + /** + * This method will be called with the {@link Palette.Swatch} that represent an image. + * You should process this list so that you have appropriate values when the other methods in + * class are called. + *

+ * This method will probably be called on a background thread. + */ + public abstract void generate(List swatches); + + /** + * Return the most vibrant {@link Palette.Swatch} + */ + public Palette.Swatch getVibrantSwatch() { + return null; + } + + /** + * Return a light and vibrant {@link Palette.Swatch} + */ + public Palette.Swatch getLightVibrantSwatch() { + return null; + } + + /** + * Return a dark and vibrant {@link Palette.Swatch} + */ + public Palette.Swatch getDarkVibrantSwatch() { + return null; + } + + /** + * Return a muted {@link Palette.Swatch} + */ + public Palette.Swatch getMutedSwatch() { + return null; + } + + /** + * Return a muted and light {@link Palette.Swatch} + */ + public Palette.Swatch getLightMutedSwatch() { + return null; + } + + /** + * Return a muted and dark {@link Palette.Swatch} + */ + public Palette.Swatch getDarkMutedSwatch() { + return null; + } + } + + /** + * A Filter provides a mechanism for exercising fine-grained control over which colors + * are valid within a resulting {@link Palette}. + */ + public interface Filter { + /** + * Hook to allow clients to be able filter colors from resulting palette. + * + * @param rgb the color in RGB888. + * @param hsl HSL representation of the color. + * + * @return true if the color is allowed, false if not. + * + * @see Builder#addFilter(Filter) + */ + boolean isAllowed(int rgb, float[] hsl); + } + + /** + * The default filter. + */ + private static final Filter DEFAULT_FILTER = new Filter() { + private static final float BLACK_MAX_LIGHTNESS = 0.05f; + private static final float WHITE_MIN_LIGHTNESS = 0.95f; + + @Override + public boolean isAllowed(int rgb, float[] hsl) { + return !isWhite(hsl) && !isBlack(hsl) && !isNearRedILine(hsl); + } + + /** + * @return true if the color represents a color which is close to black. + */ + private boolean isBlack(float[] hslColor) { + return hslColor[2] <= BLACK_MAX_LIGHTNESS; + } + + /** + * @return true if the color represents a color which is close to white. + */ + private boolean isWhite(float[] hslColor) { + return hslColor[2] >= WHITE_MIN_LIGHTNESS; + } + + /** + * @return true if the color lies close to the red side of the I line. + */ + private boolean isNearRedILine(float[] hslColor) { + return hslColor[0] >= 10f && hslColor[0] <= 37f && hslColor[1] <= 0.82f; + } + }; +} diff --git a/core/java/com/android/internal/util/hwkeys/ActionConstants.java b/core/java/com/android/internal/util/hwkeys/ActionConstants.java new file mode 100644 index 000000000000..1007b92b427e --- /dev/null +++ b/core/java/com/android/internal/util/hwkeys/ActionConstants.java @@ -0,0 +1,224 @@ +/* + * Copyright (C) 2015 TeamEos project + * Author Randall Rushing aka bigrushdog, randall.rushing@gmail.com + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ActionConstants.java: A helper class to assist Config.java with loading + * and assigning default feature configurations. Nested classes implement + * the static interface Defaults, which allows Settings and Config.java + * to handle configurations in a non-implementation specific way, allowing + * for more generalized code structures. + * + * Of strong importance is the ConfigMap pojo class. Current settings use + * a ActionPreference which sets a single action. Therefore, we must have a + * way to map individual actions to their associated buttons. ActionPreference + * key MUST match the tag associated with the target ConfigMap. + * + */ + +package com.android.internal.util.hwkeys; + +import java.util.HashMap; +import java.util.Map; + +import com.android.internal.util.hwkeys.ActionHandler.SystemAction; +import com.android.internal.util.hwkeys.Config.ActionConfig; + +import android.content.Context; +import android.content.res.Resources; +import android.os.Bundle; +import android.provider.Settings; +import android.util.Log; +import android.util.TypedValue; + +public class ActionConstants { + public static interface Defaults { + public int getConfigType(); + public String getUri(); + public String getDefaultConfig(); + public int getMaxButtons(); + public Map getActionMap(); + public Bundle getConfigs(Context context); + } + + public static final String ACTION_DELIMITER = "|"; + public static final String EMPTY = "empty"; + public static final int HWKEYS = 1; + + private static final Hwkeys hwkeys = new Hwkeys(); + + public static Defaults getDefaults(int type) { + if (type == HWKEYS) { + return hwkeys; + } else { + return null; + } + } + + public static String dl(String s) { + return s + ACTION_DELIMITER; + } + + public static class Hwkeys implements Defaults { + public static final int HWKEY_MAX_BUTTONS = 7; + public static final String HWKEY_DEF_BUTTONS = "5"; + public static final String BACK_BUTTON_TAG = "hwkeys_button_back"; + public static final String HOME_BUTTON_TAG = "hwkeys_button_home"; + public static final String OVERVIEW_BUTTON_TAG = "hwkeys_button_overview"; + public static final String MENU_BUTTON_TAG = "hwkeys_button_menu"; + public static final String ASSIST_BUTTON_TAG = "hwkeys_button_assist"; + public static final String EXTRA1_BUTTON_TAG = "hwkeys_button_camera"; + public static final String EXTRA2_BUTTON_TAG = "hwkeys_button_extra"; + + public static final String BACK_BUTTON_SINGLE_TAP_TAG = "hwkeys_button_back_single_tap"; + public static final String HOME_BUTTON_SINGLE_TAP_TAG = "hwkeys_button_home_single_tap"; + public static final String OVERVIEW_BUTTON_SINGLE_TAP_TAG = "hwkeys_button_overview_single_tap"; + public static final String MENU_BUTTON_SINGLE_TAP_TAG = "hwkeys_button_menu_single_tap"; + public static final String ASSIST_BUTTON_SINGLE_TAP_TAG = "hwkeys_button_assist_single_tap"; + + public static final String BACK_BUTTON_LONG_PRESS_TAG = "hwkeys_button_back_long_press"; + public static final String HOME_BUTTON_LONG_PRESS_TAG = "hwkeys_button_home_long_press"; + public static final String OVERVIEW_BUTTON_LONG_PRESS_TAG = "hwkeys_button_overview_long_press"; + public static final String MENU_BUTTON_LONG_PRESS_TAG = "hwkeys_button_menu_long_press"; + public static final String ASSIST_BUTTON_LONG_PRESS_TAG = "hwkeys_button_assist_long_press"; + + public static final String BACK_BUTTON_DOUBLE_TAP_TAG = "hwkeys_button_back_double_tap"; + public static final String HOME_BUTTON_DOUBLE_TAP_TAG = "hwkeys_button_home_double_tap"; + public static final String OVERVIEW_BUTTON_DOUBLE_TAP_TAG = "hwkeys_button_overview_double_tap"; + public static final String MENU_BUTTON_DOUBLE_TAP_TAG = "hwkeys_button_menu_double_tap"; + public static final String ASSIST_BUTTON_DOUBLE_TAP_TAG = "hwkeys_button_assist_double_tap"; + + private static final Map configMap = new HashMap(); + + static { + configMap.put(BACK_BUTTON_SINGLE_TAP_TAG, new ConfigMap(0, ActionConfig.PRIMARY)); + configMap.put(HOME_BUTTON_SINGLE_TAP_TAG, new ConfigMap(1, ActionConfig.PRIMARY)); + configMap.put(OVERVIEW_BUTTON_SINGLE_TAP_TAG, new ConfigMap(2, ActionConfig.PRIMARY)); + configMap.put(MENU_BUTTON_SINGLE_TAP_TAG, new ConfigMap(3, ActionConfig.PRIMARY)); + configMap.put(ASSIST_BUTTON_SINGLE_TAP_TAG, new ConfigMap(4, ActionConfig.PRIMARY)); + configMap.put(BACK_BUTTON_LONG_PRESS_TAG, new ConfigMap(0, ActionConfig.SECOND)); + configMap.put(HOME_BUTTON_LONG_PRESS_TAG, new ConfigMap(1, ActionConfig.SECOND)); + configMap.put(OVERVIEW_BUTTON_LONG_PRESS_TAG, new ConfigMap(2, ActionConfig.SECOND)); + configMap.put(MENU_BUTTON_LONG_PRESS_TAG, new ConfigMap(3, ActionConfig.SECOND)); + configMap.put(ASSIST_BUTTON_LONG_PRESS_TAG, new ConfigMap(4, ActionConfig.SECOND)); + configMap.put(BACK_BUTTON_DOUBLE_TAP_TAG, new ConfigMap(0, ActionConfig.THIRD)); + configMap.put(HOME_BUTTON_DOUBLE_TAP_TAG, new ConfigMap(1, ActionConfig.THIRD)); + configMap.put(OVERVIEW_BUTTON_DOUBLE_TAP_TAG, new ConfigMap(2, ActionConfig.THIRD)); + configMap.put(MENU_BUTTON_DOUBLE_TAP_TAG, new ConfigMap(3, ActionConfig.THIRD)); + configMap.put(ASSIST_BUTTON_DOUBLE_TAP_TAG, new ConfigMap(4, ActionConfig.THIRD)); + } + + public static final String HWKEYS_CONFIG_DEFAULT = + dl(HWKEY_DEF_BUTTONS) + + dl(BACK_BUTTON_TAG) + + dl(SystemAction.Back.mAction) + dl(SystemAction.Back.mLabelRes) + dl(EMPTY) // single tap (PRIMARY) + + dl(SystemAction.KillApp.mAction) + dl(SystemAction.KillApp.mLabelRes) + dl(EMPTY) // long press (SECOND) + + dl(SystemAction.NoAction.mAction) + dl(SystemAction.NoAction.mLabelRes) + dl(EMPTY) // double tap (THIRD) + + + dl(HOME_BUTTON_TAG) + + dl(SystemAction.Home.mAction) + dl(SystemAction.Home.mLabelRes) + dl(EMPTY) + + dl(SystemAction.Overview.mAction) + dl(SystemAction.Overview.mLabelRes) + dl(EMPTY) + + dl(SystemAction.NoAction.mAction) + dl(SystemAction.NoAction.mLabelRes) + dl(EMPTY) + + + dl(OVERVIEW_BUTTON_TAG) + + dl(SystemAction.Overview.mAction) + dl(SystemAction.Overview.mLabelRes) + dl(EMPTY) + + dl(SystemAction.NoAction.mAction) + dl(SystemAction.NoAction.mLabelRes) + dl(EMPTY) + + dl(SystemAction.NoAction.mAction) + dl(SystemAction.NoAction.mLabelRes) + dl(EMPTY) + + + dl(MENU_BUTTON_TAG) + + dl(SystemAction.Menu.mAction) + dl(SystemAction.Menu.mLabelRes) + dl(EMPTY) + + dl(SystemAction.LastApp.mAction) + dl(SystemAction.LastApp.mLabelRes) + dl(EMPTY) + + dl(SystemAction.NoAction.mAction) + dl(SystemAction.NoAction.mLabelRes) + dl(EMPTY) + + + dl(ASSIST_BUTTON_TAG) + + dl(SystemAction.GoogleAssistant.mAction) + dl(SystemAction.GoogleAssistant.mLabelRes) + dl(EMPTY) + + dl(SystemAction.NoAction.mAction) + dl(SystemAction.NoAction.mLabelRes) + dl(EMPTY) + + dl(SystemAction.NoAction.mAction) + dl(SystemAction.NoAction.mLabelRes) + EMPTY; + + @Override + public int getConfigType() { + return HWKEYS; + } + + @Override + public String getUri() { + //return Settings.System.HWKEY_BUTTON_ACTIONS; + return "hwkey_config"; + } + + @Override + public String getDefaultConfig() { + return HWKEYS_CONFIG_DEFAULT; + } + + @Override + public int getMaxButtons() { + return HWKEY_MAX_BUTTONS; + } + + @Override + public Map getActionMap() { + return configMap; + } + + @Override + public Bundle getConfigs(Context context) { + // TODO Auto-generated method stub + return null; + } + } + + private static Bundle loadConfigsFromMap(Context ctx, Map configMap) { + Bundle b = new Bundle(); + for (Map.Entry entry : configMap.entrySet()) { + ConfigHolder holder = entry.getValue(); + Object obj = ActionUtils.getValue(ctx, holder.name, holder.type, holder.format, + holder.pkg); + ActionUtils.putValue(holder.name, obj, holder.type, b); + } + return b; + } + + private static class ConfigHolder { + public String pkg; + public String name; + public String format; + public String type; + + public ConfigHolder(String pkg, String name, String type) { + this(pkg, name, null, type); + } + + public ConfigHolder(String pkg, String name, String format, String type) { + this.pkg = pkg; + this.name = name; + this.format = format; + this.type = type; + } + } + + public static class ConfigMap { + public int button = -1; + public int action = -1; + + public ConfigMap() { + }; + + public ConfigMap(int button, int action) { + this.button = button; + this.action = action; + } + } + +} diff --git a/core/java/com/android/internal/util/hwkeys/ActionHandler.java b/core/java/com/android/internal/util/hwkeys/ActionHandler.java new file mode 100644 index 000000000000..f550861fe142 --- /dev/null +++ b/core/java/com/android/internal/util/hwkeys/ActionHandler.java @@ -0,0 +1,1108 @@ +/* + * Copyright (C) 2015 The TeamEos Project + * Copyright (C) 2016-2017 The DirtyUnicorns Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Launches actions assigned to widgets. Creates bundles of state based + * on the type of action passed. + * + */ + +package com.android.internal.util.hwkeys; + +import android.app.ActivityManager; +import android.app.ActivityManagerNative; +import android.app.ActivityOptions; +import android.app.ActivityTaskManager; +import android.app.IActivityManager; +import android.app.SearchManager; +import android.app.usage.UsageStats; +import android.app.usage.UsageStatsManager; +import android.bluetooth.BluetoothAdapter; +import android.content.ActivityNotFoundException; +import android.content.ContentResolver; +import android.content.Context; +import android.content.ComponentName; +import android.content.Intent; +import android.content.pm.ApplicationInfo; +import android.content.pm.PackageManager; +import android.content.pm.ResolveInfo; +import android.content.res.Resources; +import android.graphics.drawable.Drawable; +import android.hardware.input.InputManager; +import android.media.AudioManager; +import android.media.ToneGenerator; +import android.media.session.MediaSessionLegacyHelper; +import android.net.ConnectivityManager; +import android.net.wifi.WifiManager; +import android.os.Bundle; +import android.os.Handler; +import android.os.Looper; +import android.os.PowerManager; +import android.os.Process; +import android.os.RemoteException; +import android.os.ServiceManager; +import android.os.SystemClock; +import android.os.UserHandle; +import android.os.Vibrator; +import android.provider.Settings; +import android.service.wallpaper.WallpaperService; +import android.text.TextUtils; +import android.util.Log; +import android.util.Slog; +import android.view.IWindowManager; +import android.view.InputDevice; +import android.view.KeyCharacterMap; +import android.view.KeyEvent; +import android.view.WindowManagerGlobal; +//import android.view.WindowManagerPolicyControl; +import android.view.inputmethod.InputMethodManager; +import android.widget.Toast; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.android.internal.statusbar.IStatusBarService; +import com.android.internal.util.hwkeys.Config.ActionConfig; + +public class ActionHandler { + public static String TAG = ActionHandler.class.getSimpleName(); + + public static final String SYSTEM_PREFIX = "task"; + public static final String SYSTEMUI = "com.android.systemui"; + + // track and filter special actions + public static final String TASK_IME = "task_ime"; + public static final String TASK_MEDIA = "task_media"; + public static final String TASK_SOUNDMODE = "task_soundmode"; + + public static final String SYSTEMUI_TASK_NO_ACTION = "task_no_action"; + public static final String SYSTEMUI_TASK_SETTINGS_PANEL = "task_settings_panel"; + public static final String SYSTEMUI_TASK_NOTIFICATION_PANEL = "task_notification_panel"; + public static final String SYSTEMUI_TASK_SCREENSHOT = "task_screenshot"; + public static final String SYSTEMUI_TASK_REGION_SCREENSHOT = "task_region_screenshot"; + public static final String SYSTEMUI_TASK_SCREENRECORD = "task_screenrecord"; + // public static final String SYSTEMUI_TASK_AUDIORECORD = + // "task_audiorecord"; + public static final String SYSTEMUI_TASK_EXPANDED_DESKTOP = "task_expanded_desktop"; + public static final String SYSTEMUI_TASK_SCREENOFF = "task_screenoff"; + public static final String SYSTEMUI_TASK_KILL_PROCESS = "task_killcurrent"; + public static final String SYSTEMUI_TASK_GOOGLE_ASSISTANT = "task_google_assistant"; + public static final String SYSTEMUI_TASK_POWER_MENU = "task_powermenu"; + public static final String SYSTEMUI_TASK_TORCH = "task_torch"; + public static final String SYSTEMUI_TASK_CAMERA = "task_camera"; + public static final String SYSTEMUI_TASK_BT = "task_bt"; + public static final String SYSTEMUI_TASK_WIFI = "task_wifi"; + public static final String SYSTEMUI_TASK_WIFIAP = "task_wifiap"; + public static final String SYSTEMUI_TASK_RECENTS = "task_recents"; + public static final String SYSTEMUI_TASK_LAST_APP = "task_last_app"; + public static final String SYSTEMUI_TASK_APP_SEARCH = "task_app_search"; + public static final String SYSTEMUI_TASK_MENU = "task_menu"; + public static final String SYSTEMUI_TASK_BACK = "task_back"; + public static final String SYSTEMUI_TASK_HOME = "task_home"; + public static final String SYSTEMUI_TASK_IME_SWITCHER = "task_ime_switcher"; + public static final String SYSTEMUI_TASK_IME_NAVIGATION_LEFT = "task_ime_navigation_left"; + public static final String SYSTEMUI_TASK_IME_NAVIGATION_RIGHT = "task_ime_navigation_right"; + public static final String SYSTEMUI_TASK_IME_NAVIGATION_UP = "task_ime_navigation_up"; + public static final String SYSTEMUI_TASK_IME_NAVIGATION_DOWN = "task_ime_navigation_down"; + public static final String SYSTEMUI_TASK_MEDIA_PREVIOUS = "task_media_previous"; + public static final String SYSTEMUI_TASK_MEDIA_NEXT = "task_media_next"; + public static final String SYSTEMUI_TASK_MEDIA_PLAY_PAUSE = "task_media_play_pause"; + public static final String SYSTEMUI_TASK_SOUNDMODE_VIB = "task_soundmode_vib"; + public static final String SYSTEMUI_TASK_SOUNDMODE_SILENT = "task_soundmode_silent"; + public static final String SYSTEMUI_TASK_SOUNDMODE_VIB_SILENT = "task_soundmode_vib_silent"; + public static final String SYSTEMUI_TASK_WAKE_DEVICE = "task_wake_device"; + public static final String SYSTEMUI_TASK_STOP_SCREENPINNING = "task_stop_screenpinning"; + public static final String SYSTEMUI_TASK_CLEAR_NOTIFICATIONS = "task_clear_notifications"; + public static final String SYSTEMUI_TASK_VOLUME_PANEL = "task_volume_panel"; + public static final String SYSTEMUI_TASK_SPLIT_SCREEN = "task_split_screen"; + public static final String SYSTEMUI_TASK_ONE_HANDED_MODE_LEFT = "task_one_handed_mode_left"; + public static final String SYSTEMUI_TASK_ONE_HANDED_MODE_RIGHT = "task_one_handed_mode_right"; + public static final String SYSTEMUI_TASK_ASSISTANT_SOUND_SEARCH = "task_assistant_sound_search"; + + public static final String INTENT_SHOW_POWER_MENU = "action_handler_show_power_menu"; + public static final String INTENT_TOGGLE_SCREENRECORD = "action_handler_toggle_screenrecord"; + public static final String INTENT_SCREENSHOT = "action_take_screenshot"; + public static final String INTENT_REGION_SCREENSHOT = "action_take_region_screenshot"; + + // remove actions from here as they come back on deck + static final Set sDisabledActions = new HashSet(); + static { + sDisabledActions.add(SYSTEMUI_TASK_SCREENRECORD); + sDisabledActions.add(SYSTEMUI_TASK_EXPANDED_DESKTOP); + sDisabledActions.add(SYSTEMUI_TASK_ONE_HANDED_MODE_LEFT); + sDisabledActions.add(SYSTEMUI_TASK_ONE_HANDED_MODE_RIGHT); + // we need to make this more reliable when the user tap the partial screenshot button + // quickly and more times + sDisabledActions.add(SYSTEMUI_TASK_REGION_SCREENSHOT); + sDisabledActions.add(SYSTEMUI_TASK_STOP_SCREENPINNING); + sDisabledActions.add(SYSTEMUI_TASK_ASSISTANT_SOUND_SEARCH); + sDisabledActions.add(SYSTEMUI_TASK_POWER_MENU); + } + + static enum SystemAction { + NoAction(SYSTEMUI_TASK_NO_ACTION, SYSTEMUI, "label_action_no_action", "ic_sysbar_no_action"), + SettingsPanel(SYSTEMUI_TASK_SETTINGS_PANEL, SYSTEMUI, "label_action_settings_panel", "ic_sysbar_settings_panel"), + NotificationPanel(SYSTEMUI_TASK_NOTIFICATION_PANEL, SYSTEMUI, "label_action_notification_panel", "ic_sysbar_notification_panel"), + Screenshot(SYSTEMUI_TASK_SCREENSHOT, SYSTEMUI, "label_action_screenshot", "ic_sysbar_screenshot"), + RegionScreenshot(SYSTEMUI_TASK_REGION_SCREENSHOT, SYSTEMUI, "label_action_region_screenshot", "ic_sysbar_region_screenshot"), + Screenrecord(SYSTEMUI_TASK_SCREENRECORD, SYSTEMUI, "label_action_screenrecord", "ic_sysbar_record_screen"), + ExpandedDesktop(SYSTEMUI_TASK_EXPANDED_DESKTOP, SYSTEMUI, "label_action_expanded_desktop", "ic_sysbar_expanded_desktop"), + ScreenOff(SYSTEMUI_TASK_SCREENOFF, SYSTEMUI, "label_action_screen_off", "ic_sysbar_screen_off"), + KillApp(SYSTEMUI_TASK_KILL_PROCESS, SYSTEMUI, "label_action_force_close_app", "ic_sysbar_killtask"), + GoogleAssistant(SYSTEMUI_TASK_GOOGLE_ASSISTANT, SYSTEMUI, "label_action_google_assistant", "ic_sysbar_google_assistant"), + InAppSearch(SYSTEMUI_TASK_APP_SEARCH, SYSTEMUI, "label_action_in_app_search", "ic_sysbar_in_app_search"), + Flashlight(SYSTEMUI_TASK_TORCH, SYSTEMUI, "label_action_flashlight", "ic_sysbar_torch"), + Bluetooth(SYSTEMUI_TASK_BT, SYSTEMUI, "label_action_bluetooth", "ic_sysbar_bt"), + WiFi(SYSTEMUI_TASK_WIFI, SYSTEMUI, "label_action_wifi", "ic_sysbar_wifi"), + Hotspot(SYSTEMUI_TASK_WIFIAP, SYSTEMUI, "label_action_hotspot", "ic_sysbar_hotspot"), + LastApp(SYSTEMUI_TASK_LAST_APP, SYSTEMUI, "label_action_last_app", "ic_sysbar_lastapp"), + Overview(SYSTEMUI_TASK_RECENTS, SYSTEMUI, "label_action_overview", "ic_sysbar_recent_hw"), + PowerMenu(SYSTEMUI_TASK_POWER_MENU, SYSTEMUI, "label_action_power_menu", "ic_sysbar_power_menu"), + Menu(SYSTEMUI_TASK_MENU, SYSTEMUI, "label_action_menu", "ic_sysbar_menu_hw"), + Back(SYSTEMUI_TASK_BACK, SYSTEMUI, "label_action_back", "ic_sysbar_back_hw"), + Home(SYSTEMUI_TASK_HOME, SYSTEMUI, "label_action_home", "ic_sysbar_home_hw"), + Ime(SYSTEMUI_TASK_IME_SWITCHER, SYSTEMUI, "label_action_ime_switcher", "ic_ime_switcher_smartbar"), + StopScreenPinning(SYSTEMUI_TASK_STOP_SCREENPINNING, SYSTEMUI, "label_action_stop_screenpinning", "ic_smartbar_screen_pinning_off"), + ImeArrowDown(SYSTEMUI_TASK_IME_NAVIGATION_DOWN, SYSTEMUI, "label_action_ime_down", "ic_sysbar_ime_down"), + ImeArrowLeft(SYSTEMUI_TASK_IME_NAVIGATION_LEFT, SYSTEMUI, "label_action_ime_left", "ic_sysbar_ime_left"), + ImeArrowRight(SYSTEMUI_TASK_IME_NAVIGATION_RIGHT, SYSTEMUI, "label_action_ime_right", "ic_sysbar_ime_right"), + ImeArrowUp(SYSTEMUI_TASK_IME_NAVIGATION_UP, SYSTEMUI, "label_action_ime_up", "ic_sysbar_ime_up"), + ClearNotifications(SYSTEMUI_TASK_CLEAR_NOTIFICATIONS, SYSTEMUI, "label_action_clear_notifications", "ic_sysbar_clear_notifications"), + VolumePanel(SYSTEMUI_TASK_VOLUME_PANEL, SYSTEMUI, "label_action_volume_panel", "ic_sysbar_volume_panel"), + SplitScreen(SYSTEMUI_TASK_SPLIT_SCREEN, SYSTEMUI, "label_action_split_screen", "ic_sysbar_docked_hw"), + OneHandedModeLeft(SYSTEMUI_TASK_ONE_HANDED_MODE_LEFT, SYSTEMUI, "label_action_one_handed_mode_left", "ic_sysbar_one_handed_mode_left"), + OneHandedModeRight(SYSTEMUI_TASK_ONE_HANDED_MODE_RIGHT, SYSTEMUI, "label_action_one_handed_mode_right", "ic_sysbar_one_handed_mode_right"), + MediaArrowLeft(SYSTEMUI_TASK_MEDIA_PREVIOUS, SYSTEMUI, "label_action_media_left", "ic_skip_previous"), + MediaArrowRight(SYSTEMUI_TASK_MEDIA_NEXT, SYSTEMUI, "label_action_media_right", "ic_skip_next"), + AssistantSoundSearch(SYSTEMUI_TASK_ASSISTANT_SOUND_SEARCH, SYSTEMUI, "label_action_assistant_sound_search", "ic_assistant_sound_search"); + + String mAction; + String mResPackage; + String mLabelRes; + String mIconRes; + String mDarkIconRes; + + private SystemAction(String action, String resPackage, String labelRes, String iconRes) { + mAction = action; + mResPackage = resPackage; + mLabelRes = labelRes; + mIconRes = iconRes; + mDarkIconRes = iconRes + "_dark"; + } + + private ActionConfig create(Context ctx) { + return new ActionConfig(ctx, mAction); + } + } + + /* + * Enumerated system actions with label and drawable support + */ + static SystemAction[] systemActions = new SystemAction[] { + SystemAction.NoAction, SystemAction.SettingsPanel, + SystemAction.NotificationPanel, SystemAction.Screenshot, + SystemAction.ScreenOff, SystemAction.KillApp, + SystemAction.Flashlight, SystemAction.Bluetooth, + SystemAction.WiFi, SystemAction.Hotspot, + SystemAction.LastApp, SystemAction.PowerMenu, + SystemAction.Overview,SystemAction.Menu, + SystemAction.Back, SystemAction.GoogleAssistant, + SystemAction.Home, SystemAction.ExpandedDesktop, + SystemAction.Screenrecord, SystemAction.Ime, + SystemAction.StopScreenPinning, SystemAction.ImeArrowDown, + SystemAction.ImeArrowLeft, SystemAction.ImeArrowRight, + SystemAction.ImeArrowUp, SystemAction.InAppSearch, + SystemAction.VolumePanel, SystemAction.ClearNotifications, + SystemAction.SplitScreen, SystemAction.RegionScreenshot, + SystemAction.OneHandedModeLeft, SystemAction.OneHandedModeRight, + SystemAction.MediaArrowLeft, SystemAction.MediaArrowRight, + SystemAction.AssistantSoundSearch + }; + + public static class ActionIconResources { + Drawable[] mDrawables; + Drawable[] mDarkDrawables; + Map mIndexMap; + + public ActionIconResources(Resources res) { + mDrawables = new Drawable[systemActions.length]; + mDarkDrawables = new Drawable[systemActions.length]; + mIndexMap = new HashMap(); + for (int i = 0; i < systemActions.length; i++) { + mIndexMap.put(systemActions[i].mAction, i); + mDrawables[i] = ActionUtils.getDrawable(res, systemActions[i].mIconRes, + systemActions[i].mResPackage); + mDarkDrawables[i] = ActionUtils.getDrawable(res, systemActions[i].mDarkIconRes, + systemActions[i].mResPackage); + } + } + + public void updateResources(Resources res) { + for (int i = 0; i < mDrawables.length; i++) { + mDrawables[i] = ActionUtils.getDrawable(res, systemActions[i].mIconRes, + systemActions[i].mResPackage); + mDarkDrawables[i] = ActionUtils.getDrawable(res, systemActions[i].mDarkIconRes, + systemActions[i].mResPackage); + } + } + + public Drawable getActionDrawable(String action) { + return mDrawables[mIndexMap.get(action)]; + } + + public Drawable getDarkActionDrawable(String action) { + return mDarkDrawables[mIndexMap.get(action)]; + } + } + + /* + * Default list to display in an action picker + * Filter by device capabilities and actions used internally + * but we don't really want as assignable + */ + public static ArrayList getSystemActions(Context context) { + ArrayList bundle = new ArrayList(); + for (int i = 0; i < systemActions.length; i++) { + ActionConfig c = systemActions[i].create(context); + String action = c.getAction(); + if (sDisabledActions.contains(action)) { + continue; + } + if (TextUtils.equals(action, SYSTEMUI_TASK_STOP_SCREENPINNING) + || TextUtils.equals(action, SYSTEMUI_TASK_IME_NAVIGATION_DOWN) + || TextUtils.equals(action, SYSTEMUI_TASK_IME_NAVIGATION_LEFT) + || TextUtils.equals(action, SYSTEMUI_TASK_IME_NAVIGATION_RIGHT) + || TextUtils.equals(action, SYSTEMUI_TASK_IME_NAVIGATION_UP) + || TextUtils.equals(action, SYSTEMUI_TASK_IME_SWITCHER) + || TextUtils.equals(action, SYSTEMUI_TASK_MEDIA_PREVIOUS) + || TextUtils.equals(action, SYSTEMUI_TASK_MEDIA_NEXT)) { + continue; + } else if (TextUtils.equals(action, SYSTEMUI_TASK_WIFIAP) + && !ActionUtils.deviceSupportsMobileData(context)) { + continue; + } else if (TextUtils.equals(action, SYSTEMUI_TASK_BT) + && !ActionUtils.deviceSupportsBluetooth()) { + continue; + } else if (TextUtils.equals(action, SYSTEMUI_TASK_TORCH) + && !ActionUtils.deviceSupportsFlashLight(context)) { + continue; + } else if (TextUtils.equals(action, SYSTEMUI_TASK_CAMERA) + && context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)) { + continue; + } else if (TextUtils.equals(action, SYSTEMUI_TASK_SCREENRECORD)) { + if (!ActionUtils.getBoolean(context, "config_enableScreenrecordChord", + ActionUtils.PACKAGE_ANDROID)) { + continue; + } + } + bundle.add(c); + } + Collections.sort(bundle); + return bundle; + } + + private static final class StatusBarHelper { + private static boolean isPreloaded = false; + private static IStatusBarService mService = null; + + private static IStatusBarService getStatusBarService() { + synchronized (StatusBarHelper.class) { + if (mService == null) { + try { + mService = IStatusBarService.Stub.asInterface( + ServiceManager.getService("statusbar")); + } catch (Exception e) { + } + } + return mService; + } + } + + private static void toggleFlashlight() { + IStatusBarService service = getStatusBarService(); + try { + service.toggleCameraFlash(); + } catch (RemoteException e) { + e.printStackTrace(); + } + } + + private static void toggleRecentsApps() { + IStatusBarService service = getStatusBarService(); + if (service != null) { + try { + sendCloseSystemWindows("recentapps"); + service.toggleRecentApps(); + } catch (RemoteException e) { + return; + } + isPreloaded = false; + } + } + + private static void cancelPreloadRecentApps() { + if (isPreloaded == false) + return; + IStatusBarService service = getStatusBarService(); + if (service != null) { + try { + service.cancelPreloadRecentApps(); + } catch (Exception e) { + return; + } + } + isPreloaded = false; + } + + private static void preloadRecentApps() { + IStatusBarService service = getStatusBarService(); + if (service != null) { + try { + service.preloadRecentApps(); + } catch (RemoteException e) { + isPreloaded = false; + return; + } + isPreloaded = true; + } + } + + private static void expandNotificationPanel() { + IStatusBarService service = getStatusBarService(); + if (service != null) { + try { + service.expandNotificationsPanel(); + } catch (RemoteException e) { + } + } + } + + private static void expandSettingsPanel() { + IStatusBarService service = getStatusBarService(); + if (service != null) { + try { + service.expandSettingsPanel(null); + } catch (RemoteException e) { + } + } + } + + private static void fireGoogleAssistant() { + IStatusBarService service = getStatusBarService(); + if (service != null) { + try { + service.startAssist(new Bundle()); + } catch (RemoteException e) { + } + } + } + + private static void splitScreen() { + IStatusBarService service = getStatusBarService(); + if (service != null) { + try { + service.toggleSplitScreen(); + } catch (RemoteException e) { + } + } + } +/* + private static void fireIntentAfterKeyguard(Intent intent) { + IStatusBarService service = getStatusBarService(); + if (service != null) { + try { + service.showCustomIntentAfterKeyguard(intent); + } catch (RemoteException e) { + } + } + } +*/ + private static void clearAllNotifications() { + IStatusBarService service = getStatusBarService(); + if (service != null) { + try { + service.onClearAllNotifications(ActivityManager.getCurrentUser()); + } catch (RemoteException e) { + } + } + } + } + + public static void toggleRecentApps() { + StatusBarHelper.toggleRecentsApps(); + } + + public static void cancelPreloadRecentApps() { + StatusBarHelper.cancelPreloadRecentApps(); + } + + public static void preloadRecentApps() { + StatusBarHelper.preloadRecentApps(); + } +/* + public static void performTaskFromKeyguard(Context ctx, String action) { + // null: throw it out + if (action == null) { + return; + } + // not a system action, should be intent + if (!action.startsWith(SYSTEM_PREFIX)) { + Intent intent = ActionUtils.getIntent(action); + if (intent == null) { + return; + } + StatusBarHelper.fireIntentAfterKeyguard(intent); + } else { + performTask(ctx, action); + } + } +*/ + + public static void performTask(Context context, String action) { + // null: throw it out + if (action == null) { + return; + } + if (sDisabledActions.contains(action)) { + return; + } + // not a system action, should be intent + if (!action.startsWith(SYSTEM_PREFIX)) { + Intent intent = ActionUtils.getIntent(action); + if (intent == null) { + return; + } + launchActivity(context, intent); + return; + } else if (action.equals(SYSTEMUI_TASK_NO_ACTION)) { + return; + } else if (action.equals(SYSTEMUI_TASK_KILL_PROCESS)) { + killProcess(context); + return; + } else if (action.equals(SYSTEMUI_TASK_SCREENSHOT)) { + sendCommandToWindowManager(new Intent(INTENT_SCREENSHOT)); + return; + } else if (action.equals(SYSTEMUI_TASK_REGION_SCREENSHOT)) { + sendCommandToWindowManager(new Intent(INTENT_REGION_SCREENSHOT)); + return; + } else if (action.equals(SYSTEMUI_TASK_SCREENRECORD)) { + sendCommandToWindowManager(new Intent(INTENT_TOGGLE_SCREENRECORD)); + return; + // } else if (action.equals(SYSTEMUI_TASK_AUDIORECORD)) { + // takeAudiorecord(); + } else if (action.equals(SYSTEMUI_TASK_EXPANDED_DESKTOP)) { + // toggleExpandedDesktop(context); + return; + } else if (action.equals(SYSTEMUI_TASK_SCREENOFF)) { + screenOff(context); + return; + } else if (action.equals(SYSTEMUI_TASK_WAKE_DEVICE)) { + PowerManager powerManager = + (PowerManager) context.getSystemService(Context.POWER_SERVICE); + if (!powerManager.isScreenOn()) { + powerManager.wakeUp(SystemClock.uptimeMillis()); + } + return; + } else if (action.equals(SYSTEMUI_TASK_GOOGLE_ASSISTANT)) { + StatusBarHelper.fireGoogleAssistant(); + return; + } else if (action.equals(SYSTEMUI_TASK_POWER_MENU)) { + sendCommandToWindowManager(new Intent(INTENT_SHOW_POWER_MENU)); + return; + } else if (action.equals(SYSTEMUI_TASK_TORCH)) { + StatusBarHelper.toggleFlashlight(); + return; + } else if (action.equals(SYSTEMUI_TASK_CAMERA)) { + launchCamera(context); + return; + } else if (action.equals(SYSTEMUI_TASK_WIFI)) { + toggleWifi(context); + return; + } else if (action.equals(SYSTEMUI_TASK_WIFIAP)) { + toggleWifiAP(context); + return; + } else if (action.equals(SYSTEMUI_TASK_BT)) { + toggleBluetooth(); + return; + } else if (action.equals(SYSTEMUI_TASK_RECENTS)) { + toggleRecentApps(); + return; + } else if (action.equals(SYSTEMUI_TASK_LAST_APP)) { + ActionUtils.switchToLastApp(context); + return; + } else if (action.equals(SYSTEMUI_TASK_SETTINGS_PANEL)) { + StatusBarHelper.expandSettingsPanel(); + return; + } else if (action.equals(SYSTEMUI_TASK_NOTIFICATION_PANEL)) { + StatusBarHelper.expandNotificationPanel(); + return; + } else if (action.equals(SYSTEMUI_TASK_APP_SEARCH)) { + triggerVirtualKeypress(context, KeyEvent.KEYCODE_SEARCH); + return; + } else if (action.equals(SYSTEMUI_TASK_MENU)) { + triggerVirtualKeypress(context, KeyEvent.KEYCODE_MENU); + return; + } else if (action.equals(SYSTEMUI_TASK_BACK)) { + triggerVirtualKeypress(context, KeyEvent.KEYCODE_BACK); + return; + } else if (action.equals(SYSTEMUI_TASK_HOME)) { + triggerVirtualKeypress(context, KeyEvent.KEYCODE_HOME); + return; +/* } else if (action.equals(SYSTEMUI_TASK_IME_SWITCHER)) { + ((InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE)) + .showInputMethodPicker(true /* showAuxiliarySubtypes);*/ +// return; +/* } else if (action.equals(SYSTEMUI_TASK_STOP_SCREENPINNING)) { + turnOffLockTask(); + return; +*/ + } else if (action.equals(SYSTEMUI_TASK_IME_NAVIGATION_RIGHT)) { + triggerVirtualKeypress(context, KeyEvent.KEYCODE_DPAD_RIGHT); + return; + } else if (action.equals(SYSTEMUI_TASK_IME_NAVIGATION_UP)) { + triggerVirtualKeypress(context, KeyEvent.KEYCODE_DPAD_UP); + return; + } else if (action.equals(SYSTEMUI_TASK_IME_NAVIGATION_DOWN)) { + triggerVirtualKeypress(context, KeyEvent.KEYCODE_DPAD_DOWN); + return; + } else if (action.equals(SYSTEMUI_TASK_IME_NAVIGATION_LEFT)) { + triggerVirtualKeypress(context, KeyEvent.KEYCODE_DPAD_LEFT); + return; + } else if (action.equals(SYSTEMUI_TASK_MEDIA_PREVIOUS)) { + dispatchMediaKeyWithWakeLock(KeyEvent.KEYCODE_MEDIA_PREVIOUS, context); + return; + } else if (action.equals(SYSTEMUI_TASK_MEDIA_NEXT)) { + dispatchMediaKeyWithWakeLock(KeyEvent.KEYCODE_MEDIA_NEXT, context); + return; + } else if (action.equals(SYSTEMUI_TASK_MEDIA_PLAY_PAUSE)) { + dispatchMediaKeyWithWakeLock(KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE, context); + return; + } else if (action.equals(SYSTEMUI_TASK_SOUNDMODE_VIB)) { + AudioManager am = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); + if (am != null && ActivityManagerNative.isSystemReady()) { + if (am.getRingerMode() != AudioManager.RINGER_MODE_VIBRATE) { + am.setRingerMode(AudioManager.RINGER_MODE_VIBRATE); + Vibrator vib = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE); + if (vib != null) { + vib.vibrate(50); + } + } else { + am.setRingerMode(AudioManager.RINGER_MODE_NORMAL); + ToneGenerator tg = new ToneGenerator( + AudioManager.STREAM_NOTIFICATION, + (int) (ToneGenerator.MAX_VOLUME * 0.85)); + if (tg != null) { + tg.startTone(ToneGenerator.TONE_PROP_BEEP); + } + } + } + return; + } else if (action.equals(SYSTEMUI_TASK_SOUNDMODE_SILENT)) { + AudioManager am = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); + if (am != null && ActivityManagerNative.isSystemReady()) { + if (am.getRingerMode() != AudioManager.RINGER_MODE_SILENT) { + am.setRingerMode(AudioManager.RINGER_MODE_SILENT); + } else { + am.setRingerMode(AudioManager.RINGER_MODE_NORMAL); + ToneGenerator tg = new ToneGenerator( + AudioManager.STREAM_NOTIFICATION, + (int) (ToneGenerator.MAX_VOLUME * 0.85)); + if (tg != null) { + tg.startTone(ToneGenerator.TONE_PROP_BEEP); + } + } + } + return; + } else if (action.equals(SYSTEMUI_TASK_SOUNDMODE_VIB_SILENT)) { + AudioManager am = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); + if (am != null && ActivityManagerNative.isSystemReady()) { + if (am.getRingerMode() == AudioManager.RINGER_MODE_NORMAL) { + am.setRingerMode(AudioManager.RINGER_MODE_VIBRATE); + Vibrator vib = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE); + if (vib != null) { + vib.vibrate(50); + } + } else if (am.getRingerMode() == AudioManager.RINGER_MODE_VIBRATE) { + am.setRingerMode(AudioManager.RINGER_MODE_SILENT); + } else { + am.setRingerMode(AudioManager.RINGER_MODE_NORMAL); + ToneGenerator tg = new ToneGenerator( + AudioManager.STREAM_NOTIFICATION, + (int) (ToneGenerator.MAX_VOLUME * 0.85)); + if (tg != null) { + tg.startTone(ToneGenerator.TONE_PROP_BEEP); + } + } + } + return; + } else if (action.equals(SYSTEMUI_TASK_CLEAR_NOTIFICATIONS)) { + StatusBarHelper.clearAllNotifications(); + return; + } else if (action.equals(SYSTEMUI_TASK_VOLUME_PANEL)) { + volumePanel(context); + return; + } else if (action.equals(SYSTEMUI_TASK_SPLIT_SCREEN)) { + StatusBarHelper.splitScreen(); + return; + } else if (action.equals(SYSTEMUI_TASK_ONE_HANDED_MODE_LEFT)) { +// toggleOneHandedMode(context, "left"); + return; + } else if (action.equals(SYSTEMUI_TASK_ONE_HANDED_MODE_RIGHT)) { +// toggleOneHandedMode(context, "right"); + return; + } else if (action.equals(SYSTEMUI_TASK_ASSISTANT_SOUND_SEARCH)) { + startAssistantSoundSearch(context); + return; + } + } + + public static boolean isActionKeyEvent(String action) { + if (action.equals(SYSTEMUI_TASK_HOME) + || action.equals(SYSTEMUI_TASK_BACK) +// || action.equals(SYSTEMUI_TASK_SEARCH) + || action.equals(SYSTEMUI_TASK_MENU) +// || action.equals(ActionConstants.ACTION_MENU_BIG) + || action.equals(SYSTEMUI_TASK_NO_ACTION)) { + return true; + } + return false; + } + + private static void launchActivity(Context context, Intent intent) { + try { + intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); + context.startActivityAsUser(intent, new UserHandle(UserHandle.USER_CURRENT)); + } catch (Exception e) { + Log.i(TAG, "Unable to launch activity " + e); + } + } + + private static void sendCloseSystemWindows(String reason) { + if (ActivityManagerNative.isSystemReady()) { + try { + ActivityManagerNative.getDefault().closeSystemDialogs(reason); + } catch (RemoteException e) { + } + } + } + +/* + private static void toggleExpandedDesktop(Context context) { + ContentResolver cr = context.getContentResolver(); + String newVal = ""; + String currentVal = Settings.Global.getString(cr, Settings.Global.POLICY_CONTROL); + if (currentVal == null) { + currentVal = newVal; + } + if ("".equals(currentVal)) { + newVal = "immersive.full=*"; + } + Settings.Global.putString(cr, Settings.Global.POLICY_CONTROL, newVal); + if (newVal.equals("")) { + WindowManagerPolicyControl.reloadFromSetting(context); + } + } +*/ + + private static void dispatchMediaKeyWithWakeLock(int keycode, Context context) { + if (ActivityManagerNative.isSystemReady()) { + KeyEvent event = new KeyEvent(SystemClock.uptimeMillis(), + SystemClock.uptimeMillis(), KeyEvent.ACTION_DOWN, keycode, 0); + MediaSessionLegacyHelper.getHelper(context).sendMediaButtonEvent(event, true); + event = KeyEvent.changeAction(event, KeyEvent.ACTION_UP); + MediaSessionLegacyHelper.getHelper(context).sendMediaButtonEvent(event, true); + } + } + + private static void triggerVirtualKeypress(Context context, final int keyCode) { + final InputManager im = InputManager.getInstance(); + final long now = SystemClock.uptimeMillis(); + int downflags = 0; + + if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT + || keyCode == KeyEvent.KEYCODE_DPAD_RIGHT + || keyCode == KeyEvent.KEYCODE_DPAD_UP + || keyCode == KeyEvent.KEYCODE_DPAD_DOWN) { + downflags = KeyEvent.FLAG_SOFT_KEYBOARD | KeyEvent.FLAG_KEEP_TOUCH_MODE; + } else { + downflags = KeyEvent.FLAG_FROM_SYSTEM; + } + + final KeyEvent downEvent = new KeyEvent(now, now, KeyEvent.ACTION_DOWN, + keyCode, 0, 0, KeyCharacterMap.VIRTUAL_KEYBOARD, 0, + downflags, InputDevice.SOURCE_KEYBOARD); + final KeyEvent upEvent = KeyEvent.changeAction(downEvent, KeyEvent.ACTION_UP); + final Handler handler = new Handler(Looper.getMainLooper()); + + final Runnable downRunnable = new Runnable() { + @Override + public void run() { + im.injectInputEvent(downEvent, InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); + } + }; + + final Runnable upRunnable = new Runnable() { + @Override + public void run() { + im.injectInputEvent(upEvent, InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); + } + }; + + handler.post(downRunnable); + handler.postDelayed(upRunnable, 10); + } + + private static void launchCamera(Context context) { + Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); + PackageManager pm = context.getPackageManager(); + final ResolveInfo mInfo = pm.resolveActivity(i, 0); + Intent intent = new Intent().setComponent(new ComponentName(mInfo.activityInfo.packageName, + mInfo.activityInfo.name)); + launchActivity(context, intent); + } + + private static void toggleWifi(Context context) { + WifiManager wfm = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); + wfm.setWifiEnabled(!wfm.isWifiEnabled()); + } + + private static void toggleBluetooth() { + BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); + boolean enabled = bluetoothAdapter.isEnabled(); + if (enabled) { + bluetoothAdapter.disable(); + } else { + bluetoothAdapter.enable(); + } + } + + private static void toggleWifiAP(Context context) { + final ContentResolver cr = context.getContentResolver(); + WifiManager wm = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); + final ConnectivityManager mConnectivityManager; + mConnectivityManager = (ConnectivityManager) context.getSystemService( + Context.CONNECTIVITY_SERVICE); + int state = wm.getWifiApState(); + boolean enabled = false; + switch (state) { + case WifiManager.WIFI_AP_STATE_ENABLING: + case WifiManager.WIFI_AP_STATE_ENABLED: + enabled = false; + break; + case WifiManager.WIFI_AP_STATE_DISABLING: + case WifiManager.WIFI_AP_STATE_DISABLED: + enabled = true; + break; + } + + // Turn on the Wifi AP + if (enabled) { + OnStartTetheringCallback callback = new OnStartTetheringCallback(); + mConnectivityManager.startTethering( + ConnectivityManager.TETHERING_WIFI, false, callback); + } else { + mConnectivityManager.stopTethering(ConnectivityManager.TETHERING_WIFI); + } + } + + static final class OnStartTetheringCallback extends + ConnectivityManager.OnStartTetheringCallback { + @Override + public void onTetheringStarted() {} + @Override + public void onTetheringFailed() { + // TODO: Show error. + } + } + + private static void sendCommandToWindowManager(Intent intent) { + IWindowManager wm = WindowManagerGlobal.getWindowManagerService(); + try { + wm.sendCustomAction(intent); + } catch (RemoteException e) { + e.printStackTrace(); + } + } + + private static boolean killProcess(Context context) { + if (context.checkCallingOrSelfPermission(android.Manifest.permission.FORCE_STOP_PACKAGES) == PackageManager.PERMISSION_GRANTED + && !isLockTaskOn()) { + final int mUserId = ActivityManager.getCurrentUser(); + try { + return killForegroundAppInternal(context, mUserId); + } catch (RemoteException e) { + Log.e(TAG, "Could not kill foreground app"); + } + } + Log.d("ActionHandler", "Caller cannot kill processes, aborting"); + return false; + } + +/* + private static void killProcess(Context context) { + if (context.checkCallingOrSelfPermission(android.Manifest.permission.FORCE_STOP_PACKAGES) == PackageManager.PERMISSION_GRANTED + && !isLockTaskOn()) { + try { + PackageManager packageManager = context.getPackageManager(); + final Intent intent = new Intent(Intent.ACTION_MAIN); + String defaultHomePackage = "com.android.launcher"; + intent.addCategory(Intent.CATEGORY_HOME); + final ResolveInfo res = packageManager.resolveActivity(intent, 0); + if (res.activityInfo != null + && !res.activityInfo.packageName.equals("android")) { + defaultHomePackage = res.activityInfo.packageName; + } + + // Use UsageStats to determine foreground app + UsageStatsManager usageStatsManager = (UsageStatsManager) + context.getSystemService(Context.USAGE_STATS_SERVICE); + long current = System.currentTimeMillis(); + long past = current - (1000 * 60 * 60); // uses snapshot of usage over past 60 minutes + + // Get the list, then sort it chronilogically so most recent usage is at start of list + List recentApps = usageStatsManager.queryUsageStats( + UsageStatsManager.INTERVAL_DAILY, past, current); + Collections.sort(recentApps, new Comparator() { + @Override + public int compare(UsageStats lhs, UsageStats rhs) { + long timeLHS = lhs.getLastTimeUsed(); + long timeRHS = rhs.getLastTimeUsed(); + if (timeLHS > timeRHS) { + return -1; + } else if (timeLHS < timeRHS) { + return 1; + } + return 0; + } + }); + + IActivityManager iam = ActivityManagerNative.getDefault(); + // this may not be needed due to !isLockTaskOn() in entry if + //if (am.getLockTaskModeState() != ActivityManager.LOCK_TASK_MODE_NONE) return; + + // Look for most recent usagestat with lastevent == 1 and grab package name + // ...this seems to map to the UsageEvents.Event.MOVE_TO_FOREGROUND + String pkg = null; + for (int i = 0; i < recentApps.size(); i++) { + UsageStats mostRecent = recentApps.get(i); + if (mostRecent.mLastEvent == 1) { + pkg = mostRecent.mPackageName; + break; + } + } + + if (pkg != null && !pkg.equals("com.android.systemui") + && !pkg.equals(defaultHomePackage)) { + + // Restore home screen stack before killing the app + Intent home = new Intent(Intent.ACTION_MAIN, null); + home.addCategory(Intent.CATEGORY_HOME); + home.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK + | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); + context.startActivity(home); + + // Kill the app + iam.forceStopPackage(pkg, UserHandle.USER_CURRENT); + + // Remove killed app from Recents +/* final ActivityManager am = (ActivityManager) + context.getSystemService(Context.ACTIVITY_SERVICE); + final List recentTasks = + am.getRecentTasksForUser(ActivityManager.getMaxRecentTasksStatic(), + ActivityManager.RECENT_IGNORE_HOME_AND_RECENTS_STACK_TASKS + | ActivityManager.RECENT_INGORE_PINNED_STACK_TASKS + | ActivityManager.RECENT_IGNORE_UNAVAILABLE + | ActivityManager.RECENT_INCLUDE_PROFILES, + UserHandle.CURRENT.getIdentifier()); + final int size = recentTasks.size(); + for (int i = 0; i < size; i++) { + ActivityManager.RecentTaskInfo recentInfo = recentTasks.get(i); + if (recentInfo.baseIntent.getComponent().getPackageName().equals(pkg)) { + int taskid = recentInfo.persistentId; + am.removeTask(taskid); + } + } +*/ +/* + String pkgName; + try { + pkgName = (String) packageManager.getApplicationLabel( + packageManager.getApplicationInfo(pkg, PackageManager.GET_META_DATA)); + } catch (PackageManager.NameNotFoundException e) { + // Just use pkg if issues getting appName + pkgName = pkg; + } + + Resources systemUIRes = ActionUtils.getResourcesForPackage(context, ActionUtils.PACKAGE_SYSTEMUI); + int ident = systemUIRes.getIdentifier("app_killed_message", ActionUtils.STRING, ActionUtils.PACKAGE_SYSTEMUI); + String toastMsg = systemUIRes.getString(ident, pkgName); + Context ctx = getPackageContext(context, ActionUtils.PACKAGE_SYSTEMUI); + Toast.makeText(ctx != null ? ctx : context, toastMsg, Toast.LENGTH_SHORT).show(); + return; + } else { + // make a "didnt kill anything" toast? + return; + } + } catch (RemoteException remoteException) { + Log.d("ActionHandler", "Caller cannot kill processes, aborting"); + } + } else { + Log.d("ActionHandler", "Caller cannot kill processes, aborting"); + } + } +*/ + + private static boolean killForegroundAppInternal(Context context, int userId) + throws RemoteException { + final String packageName = getForegroundTaskPackageName(context, userId); + String appName; + if (packageName == null) { + return false; + } + final IActivityManager am = ActivityManagerNative.getDefault(); + try { + ApplicationInfo app = context.getPackageManager().getApplicationInfo(packageName, 0); + appName = context.getPackageManager().getApplicationLabel(app).toString(); + } catch (Exception e) { + appName = ""; + } + am.forceStopPackage(packageName, UserHandle.USER_CURRENT); + Resources systemUIRes = ActionUtils.getResourcesForPackage(context, ActionUtils.PACKAGE_SYSTEMUI); + int ident = systemUIRes.getIdentifier("app_killed_message", ActionUtils.STRING, ActionUtils.PACKAGE_SYSTEMUI); + String toastMsg = systemUIRes.getString(ident,appName); + Context ctx = getPackageContext(context, ActionUtils.PACKAGE_SYSTEMUI); + Toast.makeText(ctx != null ? ctx : context, toastMsg, Toast.LENGTH_SHORT).show(); + return true; + } + + private static String getForegroundTaskPackageName(Context context, int userId) + throws RemoteException { + final String defaultHomePackage = resolveCurrentLauncherPackage(context, userId); + final ActivityTaskManager.RootTaskInfo focusedStack = ActivityTaskManager.getService() + .getFocusedRootTaskInfo(); + + if (focusedStack == null || focusedStack.topActivity == null) { + return null; + } + + final String packageName = focusedStack.topActivity.getPackageName(); + if (!packageName.equals(defaultHomePackage) + && !packageName.equals(SYSTEMUI)) { + return packageName; + } + + return null; + } + + private static String resolveCurrentLauncherPackage(Context context, int userId) { + final Intent launcherIntent = new Intent(Intent.ACTION_MAIN) + .addCategory(Intent.CATEGORY_HOME); + final PackageManager pm = context.getPackageManager(); + final ResolveInfo launcherInfo = pm.resolveActivityAsUser(launcherIntent, 0, userId); + + if (launcherInfo.activityInfo != null && + !launcherInfo.activityInfo.packageName.equals("android")) { + return launcherInfo.activityInfo.packageName; + } + + return null; + } + + public static Context getPackageContext(Context context, String packageName) { + Context pkgContext = null; + if (context.getPackageName().equals(packageName)) { + pkgContext = context; + } else { + try { + pkgContext = context.createPackageContext(packageName, + Context.CONTEXT_IGNORE_SECURITY + | Context.CONTEXT_INCLUDE_CODE); + } catch (PackageManager.NameNotFoundException e) { + e.printStackTrace(); + } + } + return pkgContext; + } + + private static boolean isPackageLiveWalls(Context ctx, String pkg) { + if (ctx == null || pkg == null) { + return false; + } + List liveWallsList = ctx.getPackageManager().queryIntentServices( + new Intent(WallpaperService.SERVICE_INTERFACE), + PackageManager.GET_META_DATA); + if (liveWallsList == null) { + return false; + } + for (ResolveInfo info : liveWallsList) { + if (info.serviceInfo != null) { + String packageName = info.serviceInfo.packageName; + if (TextUtils.equals(pkg, packageName)) { + return true; + } + } + } + return false; + } + + private static void screenOff(Context context) { + PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); + pm.goToSleep(SystemClock.uptimeMillis()); + } + +/* public static void turnOffLockTask() { + try { + ActivityManagerNative.getDefault().stopLockTaskMode(); + } catch (Exception e) { + } + } +*/ + + public static boolean isLockTaskOn() { + try { + return ActivityManagerNative.getDefault().isInLockTaskMode(); + } catch (Exception e) { + } + return false; + } + + public static void volumePanel(Context context) { + AudioManager am = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); + am.adjustVolume(AudioManager.ADJUST_SAME, AudioManager.FLAG_SHOW_UI); + } + +/* + private static void toggleOneHandedMode(Context context, String direction) { + String str = Settings.Global.getString(context.getContentResolver(), Settings.Global.SINGLE_HAND_MODE); + + if (TextUtils.isEmpty(str)) + Settings.Global.putString(context.getContentResolver(), Settings.Global.SINGLE_HAND_MODE, direction); + else + Settings.Global.putString(context.getContentResolver(), Settings.Global.SINGLE_HAND_MODE, ""); + } + */ + + public static void startAssistantSoundSearch(Context context) { + Intent intent = new Intent(Intent.ACTION_MAIN); + intent.setAction("com.google.android.googlequicksearchbox.MUSIC_SEARCH"); + context.startActivity(intent); + } +} diff --git a/core/java/com/android/internal/util/hwkeys/ActionHolder.java b/core/java/com/android/internal/util/hwkeys/ActionHolder.java new file mode 100644 index 000000000000..07221cefe6ef --- /dev/null +++ b/core/java/com/android/internal/util/hwkeys/ActionHolder.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2015 TeamEos project + * Author Randall Rushing aka bigrushdog, randall.rushing@gmail.com + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Widgets may implement this interface to interact with action configurations + * + */ + +package com.android.internal.util.hwkeys; + +import com.android.internal.util.hwkeys.ActionConstants.ConfigMap; +import com.android.internal.util.hwkeys.ActionConstants.Defaults; +import com.android.internal.util.hwkeys.Config.ActionConfig; +import com.android.internal.util.hwkeys.Config.ButtonConfig; + +public interface ActionHolder { + public String getTag(); + public void setTag(String tag); + public Defaults getDefaults(); + public void setDefaults(Defaults defaults); + public ConfigMap getConfigMap(); + public void setConfigMap(ConfigMap map); + public ButtonConfig getButtonConfig(); + public void setButtonConfig(ButtonConfig button); + public ActionConfig getActionConfig(); + public void setActionConfig(ActionConfig action); + public ButtonConfig getDefaultButtonConfig(); + public void setDefaultButtonConfig(ButtonConfig button); + public ActionConfig getDefaultActionConfig(); + public void setDefaultActionConfig(ActionConfig action); +} diff --git a/core/java/com/android/internal/util/hwkeys/ActionUtils.java b/core/java/com/android/internal/util/hwkeys/ActionUtils.java new file mode 100644 index 000000000000..4f6e2b7a7a10 --- /dev/null +++ b/core/java/com/android/internal/util/hwkeys/ActionUtils.java @@ -0,0 +1,966 @@ +/* + * Copyright (C) 2014 The TeamEos Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Helper functions mostly for device configuration and some utilities + * including a fun ViewGroup crawler and dpi conversion + * + */ + +package com.android.internal.util.hwkeys; + +import android.app.ActivityManager; +import android.app.ActivityOptions; +import android.app.NotificationManager; +import android.bluetooth.BluetoothAdapter; +import android.content.Context; +import android.content.Intent; +import android.content.pm.ActivityInfo; +import android.content.pm.PackageManager; +import android.content.pm.ResolveInfo; +import android.content.res.Configuration; +import android.content.res.Resources; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.graphics.Matrix; +//import android.content.res.ThemeConfig; +import android.graphics.Color; +import android.graphics.drawable.BitmapDrawable; +import android.graphics.drawable.Drawable; +import android.hardware.Sensor; +import android.hardware.SensorManager; +import android.hardware.camera2.CameraAccessException; +import android.hardware.camera2.CameraCharacteristics; +import android.hardware.camera2.CameraManager; +import android.media.AudioManager; +import android.net.ConnectivityManager; +import android.net.Network; +import android.net.NetworkCapabilities; +import android.net.Uri; +import android.os.Bundle; +import android.os.PowerManager; +import android.os.RemoteException; +import android.os.ServiceManager; +import android.os.SystemClock; +import android.os.SystemProperties; +import android.os.Vibrator; +import android.telephony.TelephonyManager; +import android.text.TextUtils; +import android.util.DisplayMetrics; +import android.util.TypedValue; +import android.util.Log; +import android.view.Display; +import android.provider.MediaStore; +import android.view.IWindowManager; +import android.view.View; +import android.view.ViewGroup; +import android.view.WindowManager; +import android.view.WindowManagerGlobal; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.List; + +import com.android.internal.telephony.PhoneConstants; +import com.android.internal.util.hwkeys.ActionConstants.Defaults; +import com.android.internal.util.hwkeys.Config.ActionConfig; +import com.android.internal.util.hwkeys.Config.ButtonConfig; + +import com.android.internal.statusbar.IStatusBarService; +import static android.content.Context.NOTIFICATION_SERVICE; +import static android.content.Context.VIBRATOR_SERVICE; + +public final class ActionUtils { + public static final String ANDROIDNS = "http://schemas.android.com/apk/res/android"; + public static final String PACKAGE_SYSTEMUI = "com.android.systemui"; + public static final String PACKAGE_ANDROID = "android"; + public static final String FORMAT_NONE = "none"; + public static final String FORMAT_FLOAT = "float"; + + public static final String ID = "id"; + public static final String DIMEN = "dimen"; + public static final String DIMEN_PIXEL = "dimen_pixel"; + public static final String FLOAT = "float"; + public static final String INT = "integer"; + public static final String DRAWABLE = "drawable"; + public static final String COLOR = "color"; + public static final String BOOL = "bool"; + public static final String STRING = "string"; + public static final String ANIM = "anim"; + public static final String INTENT_SCREENSHOT = "action_take_screenshot"; + public static final String INTENT_REGION_SCREENSHOT = "action_take_region_screenshot"; + + private static final String TAG = ActionUtils.class.getSimpleName(); + + private static IStatusBarService mStatusBarService = null; + + private static IStatusBarService getStatusBarService() { + synchronized (ActionUtils.class) { + if (mStatusBarService == null) { + mStatusBarService = IStatusBarService.Stub.asInterface( + ServiceManager.getService("statusbar")); + } + return mStatusBarService; + } + } + + // 10 inch tablets + public static boolean isXLargeScreen() { + int screenLayout = Resources.getSystem().getConfiguration().screenLayout & + Configuration.SCREENLAYOUT_SIZE_MASK; + return screenLayout == Configuration.SCREENLAYOUT_SIZE_XLARGE; + } + + // 7 inch "phablets" i.e. grouper + public static boolean isLargeScreen() { + int screenLayout = Resources.getSystem().getConfiguration().screenLayout & + Configuration.SCREENLAYOUT_SIZE_MASK; + return screenLayout == Configuration.SCREENLAYOUT_SIZE_LARGE; + } + + // normal phones + public static boolean isNormalScreen() { + int screenLayout = Resources.getSystem().getConfiguration().screenLayout & + Configuration.SCREENLAYOUT_SIZE_MASK; + return screenLayout == Configuration.SCREENLAYOUT_SIZE_NORMAL; + } + + public static boolean isLandscape(Context context) { + return Configuration.ORIENTATION_LANDSCAPE + == context.getResources().getConfiguration().orientation; + } + + public static boolean navigationBarCanMove() { + return Resources.getSystem().getConfiguration().smallestScreenWidthDp < 600; + } + + public static boolean hasNavbarByDefault(Context context) { + boolean needsNav = (Boolean)getValue(context, "config_showNavigationBar", BOOL, PACKAGE_ANDROID); + String navBarOverride = SystemProperties.get("qemu.hw.mainkeys"); + if ("1".equals(navBarOverride)) { + needsNav = false; + } else if ("0".equals(navBarOverride)) { + needsNav = true; + } + return needsNav; + } + + public static boolean isHWKeysSupported(Context context) { + return getInt(context, "config_deviceHardwareKeys", PACKAGE_ANDROID) != 64; + } + + public static boolean deviceSupportsLte(Context ctx) { + final TelephonyManager tm = (TelephonyManager) + ctx.getSystemService(Context.TELEPHONY_SERVICE); + return (tm.getLteOnCdmaMode(tm.getSubscriptionId()) == PhoneConstants.LTE_ON_CDMA_TRUE); +// || tm.getLteOnGsmMode() != 0; +// return tm.getLteOnCdmaModeStatic() == PhoneConstants.LTE_ON_CDMA_TRUE; + } + + public static boolean deviceSupportsDdsSupported(Context context) { + TelephonyManager tm = (TelephonyManager) + context.getSystemService(Context.TELEPHONY_SERVICE); + return tm.isMultiSimEnabled() + && tm.getMultiSimConfiguration() == TelephonyManager.MultiSimVariants.DSDA; + } + + public static boolean deviceSupportsMobileData(Context ctx) { + ConnectivityManager cm = (ConnectivityManager) ctx.getSystemService( + Context.CONNECTIVITY_SERVICE); + Network[] networks = cm.getAllNetworks(); + for (int i = 0; i < networks.length; i++) { + NetworkCapabilities caps = cm.getNetworkCapabilities(networks[i]); + if (caps.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) { + return true; + } + } + return false; + } + + public static boolean deviceSupportsBluetooth() { + return BluetoothAdapter.getDefaultAdapter() != null; + } + + public static boolean deviceSupportsNfc(Context context) { + PackageManager packageManager = context.getPackageManager(); + return packageManager.hasSystemFeature(PackageManager.FEATURE_NFC); + } + + public static boolean deviceSupportsFlashLight(Context context) { + CameraManager cameraManager = (CameraManager) context.getSystemService( + Context.CAMERA_SERVICE); + try { + String[] ids = cameraManager.getCameraIdList(); + for (String id : ids) { + CameraCharacteristics c = cameraManager.getCameraCharacteristics(id); + Boolean flashAvailable = c.get(CameraCharacteristics.FLASH_INFO_AVAILABLE); + Integer lensFacing = c.get(CameraCharacteristics.LENS_FACING); + if (flashAvailable != null + && flashAvailable + && lensFacing != null + && lensFacing == CameraCharacteristics.LENS_FACING_BACK) { + return true; + } + } + } catch (CameraAccessException | AssertionError e) { + // Ignore + } + return false; + } + + public static boolean deviceSupportsCompass(Context context) { + SensorManager sm = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE); + return sm.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) != null + && sm.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD) != null; + } + + public static boolean deviceSupportsDoze(Context context) { + String name = (String) getValue(context, "config_dozeComponent", + STRING, PACKAGE_ANDROID); + return !TextUtils.isEmpty(name); + } + + // Launch camera + public static void launchCamera(Context context) { + Intent intent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE); + intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); + context.startActivity(intent); + } + + // Launch voice search + public static void launchVoiceSearch(Context context) { + Intent intent = new Intent(Intent.ACTION_SEARCH_LONG_PRESS); + intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + context.startActivity(intent); + } + + /** + * This method converts dp unit to equivalent pixels, depending on device + * density. + * + * @param dp A value in dp (density independent pixels) unit. Which we need + * to convert into pixels + * @param context Context to get resources and device specific display + * metrics + * @return A float value to represent px equivalent to dp depending on + * device density + */ + public static float convertDpToPixel(float dp, Context context) { + Resources resources = context.getResources(); + DisplayMetrics metrics = resources.getDisplayMetrics(); + float px = dp * (metrics.densityDpi / 160f); + return px; + } + + public static int ConvertDpToPixelAsInt(float dp, Context context) { + float px = convertDpToPixel(dp, context); + if (px < 1) + px = 1; + return Math.round(px); + } + + public static int ConvertDpToPixelAsInt(int dp, Context context) { + float px = convertDpToPixel((float) dp, context); + if (px < 1) + px = 1; + return Math.round(px); + } + + /** + * This method converts device specific pixels to density independent + * pixels. + * + * @param px A value in px (pixels) unit. Which we need to convert into db + * @param context Context to get resources and device specific display + * metrics + * @return A float value to represent dp equivalent to px value + */ + public static float convertPixelsToDp(float px, Context context) { + Resources resources = context.getResources(); + DisplayMetrics metrics = resources.getDisplayMetrics(); + float dp = px / (metrics.densityDpi / 160f); + return dp; + } + + public static int dpToPx(Context context, int dp) { + return (int) ((dp * context.getResources().getDisplayMetrics().density) + 0.5); + } + + public static int pxToDp(Context context, int px) { + return (int) ((px / context.getResources().getDisplayMetrics().density) + 0.5); + } + + /* utility to iterate a viewgroup and return a list of child views */ + public static ArrayList getAllChildren(View v) { + + if (!(v instanceof ViewGroup)) { + ArrayList viewArrayList = new ArrayList(); + viewArrayList.add(v); + return viewArrayList; + } + + ArrayList result = new ArrayList(); + + ViewGroup vg = (ViewGroup) v; + for (int i = 0; i < vg.getChildCount(); i++) { + + View child = vg.getChildAt(i); + + ArrayList viewArrayList = new ArrayList(); + viewArrayList.add(v); + viewArrayList.addAll(getAllChildren(child)); + + result.addAll(viewArrayList); + } + return result; + } + + /* utility to iterate a viewgroup and return a list of child views of type */ + public static ArrayList getAllChildren(View root, Class returnType) { + if (!(root instanceof ViewGroup)) { + ArrayList viewArrayList = new ArrayList(); + try { + viewArrayList.add(returnType.cast(root)); + } catch (Exception e) { + // handle all exceptions the same and silently fail + } + return viewArrayList; + } + ArrayList result = new ArrayList(); + ViewGroup vg = (ViewGroup) root; + for (int i = 0; i < vg.getChildCount(); i++) { + View child = vg.getChildAt(i); + ArrayList viewArrayList = new ArrayList(); + try { + viewArrayList.add(returnType.cast(root)); + } catch (Exception e) { + // handle all exceptions the same and silently fail + } + viewArrayList.addAll(getAllChildren(child, returnType)); + result.addAll(viewArrayList); + } + return result; + } + + public static void resolveAndUpdateButtonActions(Context ctx, Defaults defaults) { + if (ctx == null || defaults == null) { + return; + } + boolean configChanged = false; + final PackageManager pm = ctx.getPackageManager(); + ArrayList configs = Config.getConfig(ctx, defaults); + ArrayList buttonsToChange = new ArrayList(); + buttonsToChange.addAll(configs); + for (int h = 0; h < configs.size(); h++) { + ButtonConfig button = configs.get(h); + for (int i = 0; i < 3; i++) { + ActionConfig action = button.getActionConfig(i); + final String task = action.getAction(); + if (task.startsWith(ActionHandler.SYSTEM_PREFIX)) { + continue; + } + String resolvedName = getFriendlyNameForUri(ctx, task); + if (resolvedName == null || TextUtils.equals(resolvedName, task)) { + // if resolved name is null or the full raw intent string is + // returned, we were unable to resolve + configChanged = true; + ActionConfig newAction = new ActionConfig(ctx, + ActionHandler.SYSTEMUI_TASK_NO_ACTION, action.getIconUri()); + ButtonConfig newButton = buttonsToChange.get(h); + newButton.setActionConfig(newAction, i); + buttonsToChange.remove(h); + buttonsToChange.add(h, newButton); + } + } + } + if (configChanged) { + Config.setConfig(ctx, defaults, buttonsToChange); + } + } + + public static Intent getIntent(String uri) { + if (uri == null || uri.startsWith(ActionHandler.SYSTEM_PREFIX)) { + return null; + } + + Intent intent = null; + try { + intent = Intent.parseUri(uri, 0); + } catch (URISyntaxException e) { + e.printStackTrace(); + } + return intent; + } + + public static Object getValue(Context context, String resName, String resType, String pkg) { + return getValue(context, resName, resType, null, pkg); + } + + public static Object getValue(Context context, String resName, String resType, String format, + String pkg) { + Resources res = getResourcesForPackage(context, pkg); + String tmp; + if (resType.equals(DIMEN_PIXEL)) { + tmp = DIMEN; + } else { + tmp = resType; + } + int id = res.getIdentifier(resName, tmp, pkg); + if (format != null) { // standard res + TypedValue typedVal = new TypedValue(); + res.getValue(id, typedVal, true); + if (format.equals(FORMAT_FLOAT)) { + return Float.valueOf(typedVal.getFloat()); + } + } else { // typed values + if (resType.equals(ID)) { + return Integer.valueOf(id); + } else if (resType.equals(DIMEN)) { + return Float.valueOf(res.getDimension(id)); + } else if (resType.equals(DIMEN_PIXEL)) { + return Integer.valueOf(res.getDimensionPixelSize(id)); + } else if (resType.equals(FLOAT)) { + return Float.valueOf(res.getFloat(id)); + } else if (resType.equals(INT)) { + return Integer.valueOf(res.getInteger(id)); + } else if (resType.equals(COLOR)) { + int rawColor = res.getColor(id); + return Integer.valueOf(Color.argb(Color.alpha(rawColor), Color.red(rawColor), + Color.green(rawColor), Color.blue(rawColor))); + } else if (resType.equals(BOOL)) { + return Boolean.valueOf(res.getBoolean(id)); + } else if (resType.equals(STRING)) { + return String.valueOf(res.getString(id)); + } else if (resType.equals(DRAWABLE)) { + return getDrawable(context, resName, pkg); + } + } + return null; + } + + public static void putValue(String key, Object val, String type, Bundle b) { + if (type.equals(ID) || type.equals(DIMEN_PIXEL) || type.equals(INT) || type.equals(COLOR)) { + b.putInt(key, (Integer) val); + } else if (type.equals(FLOAT) || type.equals(DIMEN)) { + b.putFloat(key, (Float) val); + } else if (type.equals(BOOL)) { + b.putBoolean(key, (Boolean) val); + } else if (type.equals(STRING)) { + b.putString(key, (String) val); + } + } + + public static int getIdentifier(Context context, String resName, String resType, String pkg) { + try { + Resources res = context.getPackageManager() + .getResourcesForApplication(pkg); + int ident = res.getIdentifier(resName, resType, pkg); + return ident; + } catch (Exception e) { + return -1; + } + } + + public static String getString(Context context, String resName, String pkg) { + return (String) getValue(context, resName, STRING, null, pkg); + } + + public static boolean getBoolean(Context context, String resName, String pkg) { + return (Boolean) getValue(context, resName, BOOL, null, pkg); + } + + public static int getInt(Context context, String resName, String pkg) { + return (Integer) getValue(context, resName, INT, null, pkg); + } + + public static int getColor(Context context, String resName, String pkg) { + return (Integer) getValue(context, resName, COLOR, null, pkg); + } + + public static int getId(Context context, String resName, String pkg) { + return (Integer) getValue(context, resName, ID, null, pkg); + } + + public static float getDimen(Context context, String resName, String pkg) { + return (Float) getValue(context, resName, DIMEN, null, pkg); + } + + public static int getDimenPixelSize(Context context, String resName, String pkg) { + return (Integer) getValue(context, resName, DIMEN_PIXEL, null, pkg); + } + + public static Drawable getDrawable(Context context, String drawableName, String pkg) { + return getDrawable(getResourcesForPackage(context, pkg), drawableName, pkg); + } + + public static Drawable getDrawable(Context context, Uri uri) { + //set inputs here so we can clean up them in the finally + InputStream inputStream = null; + + try { + //get the inputstream + inputStream = context.getContentResolver().openInputStream(uri); + + //get available bitmapfactory options + BitmapFactory.Options options = new BitmapFactory.Options(); + //query the bitmap to decode the stream but don't allocate pixels in memory yet + options.inJustDecodeBounds = true; + //decode the bitmap with calculated bounds + Bitmap b1 = BitmapFactory.decodeStream(inputStream, null, options); + //get raw height and width of the bitmap + int rawHeight = options.outHeight; + int rawWidth = options.outWidth; + + //check if the bitmap is big and we need to scale the quality to take less memory + options.inSampleSize = calculateInSampleSize(options, rawHeight, rawWidth); + + //We need to close and load again the inputstream to avoid null + try { + inputStream.close(); + } + catch (IOException e) { + e.printStackTrace(); + } + inputStream = context.getContentResolver().openInputStream(uri); + + //decode the stream again, with the calculated SampleSize option, + //and allocate the memory. Also add some metrics options to take a proper density + options.inJustDecodeBounds = false; + DisplayMetrics metrics = context.getResources().getDisplayMetrics(); + options.inScreenDensity = metrics.densityDpi; + options.inTargetDensity = metrics.densityDpi; + options.inDensity = DisplayMetrics.DENSITY_DEFAULT; + b1 = BitmapFactory.decodeStream(inputStream, null, options); + return new BitmapDrawable(context.getResources(), b1); + + } catch (FileNotFoundException e) { + e.printStackTrace(); + return null; + //clean up the system resources + } finally { + if (inputStream != null) { + try { + inputStream.close(); + } + catch (IOException e) { + e.printStackTrace(); + } + } + } + } + + //Automate the quality scaling process + public static int calculateInSampleSize(BitmapFactory.Options options, int height, int width) { + //set default inSampleSize scale factor (no scaling) + int inSampleSize = 1; + + //if img size is in 257-512 range, sample scale factor will be 4x + if (height > 256 || width > 256) { + inSampleSize = 4; + return inSampleSize; + //if img size is in 129-256 range, sample scale factor will be 2x + } else if (height > 128 || width > 128) { + inSampleSize = 2; + return inSampleSize; + } + //if img size is in 0-128 range, no need to scale it + return inSampleSize; + } + + /** + * Screen images based on desired dimensions before fully decoding + * + *@param ctx Calling context + *@param uri Image uri + *@param maxWidth maximum allowed image width + *@param maxHeight maximum allowed image height + */ + public static boolean isBitmapAllowedSize(Context ctx, Uri uri, int maxWidth, int maxHeight) { + InputStream inputStream = null; + try { + inputStream = ctx.getContentResolver().openInputStream(uri); + BitmapFactory.Options options = new BitmapFactory.Options(); + options.inJustDecodeBounds = true; + BitmapFactory.decodeStream(inputStream, null, options); + if (options.outWidth <= maxWidth && options.outHeight <= maxHeight) { + return true; + } + } catch (Exception e) { + return false; + } finally { + try { + inputStream.close(); + } + catch (IOException e) { + e.printStackTrace(); + } + } + return false; + } + + public static Drawable getDrawableFromComponent(PackageManager pm, String activity) { + Drawable d = null; + try { + Intent intent = Intent.parseUri(activity, 0); + ActivityInfo info = intent.resolveActivityInfo(pm, + PackageManager.GET_ACTIVITIES); + if (info != null) { + d = info.loadIcon(pm); + } + } catch (Exception e) { + e.printStackTrace(); + } + return d; + } + + public static String getFriendlyActivityName(PackageManager pm, Intent intent, + boolean labelOnly) { + ActivityInfo ai = intent.resolveActivityInfo(pm, PackageManager.GET_ACTIVITIES); + String friendlyName = null; + if (ai != null) { + friendlyName = ai.loadLabel(pm).toString(); + if (friendlyName == null && !labelOnly) { + friendlyName = ai.name; + } + } + return friendlyName != null || labelOnly ? friendlyName : intent.toUri(0); + } + + public static String getFriendlyShortcutName(PackageManager pm, Intent intent) { + String activityName = getFriendlyActivityName(pm, intent, true); + String name = intent.getStringExtra(Intent.EXTRA_SHORTCUT_NAME); + + if (activityName != null && name != null) { + return activityName + ": " + name; + } + return name != null ? name : intent.toUri(0); + } + + public static String getFriendlyNameForUri(Context ctx, String uri) { + if (uri == null) { + return null; + } + if (uri.startsWith(ActionHandler.SYSTEM_PREFIX)) { + for (int i = 0; i < ActionHandler.systemActions.length; i++) { + if (ActionHandler.systemActions[i].mAction.equals(uri)) { + return getString(ctx, ActionHandler.systemActions[i].mLabelRes, + ActionHandler.systemActions[i].mResPackage); + } + } + } else { + try { + Intent intent = Intent.parseUri(uri, 0); + if (Intent.ACTION_MAIN.equals(intent.getAction())) { + return getFriendlyActivityName(ctx.getPackageManager(), intent, false); + } + return getFriendlyShortcutName(ctx.getPackageManager(), intent); + } catch (URISyntaxException e) { + } + } + return uri; + } + + /** + * + * @param Target package resources + * @param drawableName + * @param Target package name + * @return the drawable if found, otherwise fall back to a green android guy + */ + public static Drawable getDrawable(Resources res, String drawableName, String pkg) { + try { + int resId = res.getIdentifier(drawableName, DRAWABLE, pkg); + Drawable icon = ImageHelper.getVector(res, resId, false); + if (icon == null) { + icon = res.getDrawable(resId); + } + return icon; + } catch (Exception e) { + return res.getDrawable( + com.android.internal.R.drawable.sym_def_app_icon); + } + } + + /** + * + * @param Target package resources + * @param drawableName + * @param Target package name + * @return the drawable if found, null otherwise. Useful for testing if a drawable is found + * in a theme overlay + */ + private static Drawable getMaybeNullDrawable(Resources res, String drawableName, String pkg) { + try { + int resId = res.getIdentifier(drawableName, DRAWABLE, pkg); + Drawable icon = ImageHelper.getVector(res, resId, false); + if (icon == null) { + icon = res.getDrawable(resId); + } + return icon; + } catch (Exception e) { + return null; + } + } + + public static Resources getResourcesForPackage(Context ctx, String pkg) { + try { + Resources res = ctx.getPackageManager() + .getResourcesForApplication(pkg); + return res; + } catch (Exception e) { + return ctx.getResources(); + } + } + + /** + * + * @param Context of the calling package + * @param the action we want a drawable for + * @return if a system action drawable is requested, we try to get the drawable + * from any current navigation overlay. if no overlay is found, get it + * from SystemUI. Return a component drawable if not a system action + */ + public static Drawable getDrawableForAction(Context context, String action) { + Drawable d = null; + + // this null check is probably no-op but let's be safe anyways + if (action == null || context == null) { + return d; + } + if (action.startsWith(ActionHandler.SYSTEM_PREFIX)) { + for (int i = 0; i < ActionHandler.systemActions.length; i++) { + if (ActionHandler.systemActions[i].mAction.equals(action)) { + // should always be SystemUI + String packageName = ActionHandler.systemActions[i].mResPackage; + Resources res = getResourcesForPackage(context, packageName); + String iconName = ActionHandler.systemActions[i].mIconRes; + d = getNavbarThemedDrawable(context, res, iconName); + if (d == null) { + d = getDrawable(res, iconName, packageName); + } + } + } + } else { + d = getDrawableFromComponent(context.getPackageManager(), action); + } + return d; + } + + /** + * + * @param calling package context, usually Settings for the custom action list adapter + * @param target package resources, usually SystemUI + * @param drawableName + * @return a navigation bar overlay themed action drawable if available, otherwise + * return drawable from SystemUI resources + */ + public static Drawable getNavbarThemedDrawable(Context context, Resources defRes, + String drawableName) { + if (context == null || defRes == null || drawableName == null) + return null; + + // TODO: turn on cmte support when it comes back + return getDrawable(defRes, drawableName, PACKAGE_SYSTEMUI); +/* + ThemeConfig themeConfig = context.getResources().getConfiguration().themeConfig; + + Drawable d = null; + if (themeConfig != null) { + try { + final String navbarThemePkgName = themeConfig.getOverlayForNavBar(); + final String sysuiThemePkgName = themeConfig.getOverlayForStatusBar(); + // Check if the same theme is applied for systemui, if so we can skip this + if (navbarThemePkgName != null && !navbarThemePkgName.equals(sysuiThemePkgName)) { + // Navbar theme and SystemUI (statusbar) theme packages are different + // But we can't assume navbar package has our drawable, so try navbar theme + // package first. If we fail, try the systemui (statusbar) package + // if we still fail, fall back to default package resource + Resources res = context.getPackageManager().getThemedResourcesForApplication( + PACKAGE_SYSTEMUI, navbarThemePkgName); + d = getMaybeNullDrawable(res, drawableName, PACKAGE_SYSTEMUI); + if (d == null) { + // drawable not found in overlay, get from default SystemUI res + d = getDrawable(defRes, drawableName, PACKAGE_SYSTEMUI); + } + } else { + // no navbar overlay present, get from default SystemUI res + d = getDrawable(defRes, drawableName, PACKAGE_SYSTEMUI); + } + } catch (PackageManager.NameNotFoundException e) { + // error thrown (unlikely), get from default SystemUI res + d = getDrawable(defRes, drawableName, PACKAGE_SYSTEMUI); + } + } + if (d == null) { + // theme config likely null, get from default SystemUI res + d = getDrawable(defRes, drawableName, PACKAGE_SYSTEMUI); + } + return d; + */ + } + + // Screen off + public static void switchScreenOff(Context ctx) { + PowerManager pm = (PowerManager) ctx.getSystemService(Context.POWER_SERVICE); + if (pm!= null && pm.isScreenOn()) { + pm.goToSleep(SystemClock.uptimeMillis()); + } + } + + // Screen on + public static void switchScreenOn(Context context) { + PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); + if (pm == null) return; + pm.wakeUp(SystemClock.uptimeMillis(), "com.android.systemui:CAMERA_GESTURE_PREVENT_LOCK"); + } + + // Volume panel + public static void toggleVolumePanel(Context context) { + AudioManager am = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); + am.adjustVolume(AudioManager.ADJUST_SAME, AudioManager.FLAG_SHOW_UI); + } + + // Toggle flashlight + public static void toggleCameraFlash() { + IStatusBarService service = getStatusBarService(); + if (service != null) { + try { + service.toggleCameraFlash(); + } catch (RemoteException e) { + // do nothing. + } + } + } + + // Clear notifications + public static void clearAllNotifications() { + IStatusBarService service = getStatusBarService(); + if (service != null) { + try { + service.onClearAllNotifications(ActivityManager.getCurrentUser()); + } catch (RemoteException e) { + // do nothing. + } + } + } + + // Screenshot + public static void takeScreenshot(boolean full) { + IWindowManager wm = WindowManagerGlobal.getWindowManagerService(); + try { + wm.sendCustomAction(new Intent(INTENT_SCREENSHOT)); + } catch (RemoteException e) { + e.printStackTrace(); + } + } + + // Toggle notifications panel + public static void toggleNotifications() { + IStatusBarService service = getStatusBarService(); + if (service != null) { + try { + service.togglePanel(); + } catch (RemoteException e) { + // do nothing. + } + } + } + + // Toggle qs panel + public static void toggleQsPanel() { + IStatusBarService service = getStatusBarService(); + if (service != null) { + try { + service.toggleSettingsPanel(); + } catch (RemoteException e) { + // do nothing. + } + } + } + + // Cycle ringer modes + public static void toggleRingerModes (Context context) { + AudioManager am = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); + Vibrator mVibrator = (Vibrator) context.getSystemService(VIBRATOR_SERVICE); + + switch (am.getRingerMode()) { + case AudioManager.RINGER_MODE_NORMAL: + if (mVibrator.hasVibrator()) { + am.setRingerMode(AudioManager.RINGER_MODE_VIBRATE); + } + break; + case AudioManager.RINGER_MODE_VIBRATE: + am.setRingerMode(AudioManager.RINGER_MODE_NORMAL); + NotificationManager notificationManager = + (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE); + notificationManager.setInterruptionFilter( + NotificationManager.INTERRUPTION_FILTER_PRIORITY); + break; + case AudioManager.RINGER_MODE_SILENT: + am.setRingerMode(AudioManager.RINGER_MODE_NORMAL); + break; + } + } + + // Switch to last app + public static void switchToLastApp(Context context) { + final ActivityManager am = + (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); + ActivityManager.RunningTaskInfo lastTask = getLastTask(context, am); + + if (lastTask != null) { + am.moveTaskToFront(lastTask.id, ActivityManager.MOVE_TASK_NO_USER_ACTION, + getAnimation(context).toBundle()); + } + } + + private static ActivityOptions getAnimation(Context context) { + return ActivityOptions.makeCustomAnimation(context, + com.android.internal.R.anim.custom_app_in, + com.android.internal.R.anim.custom_app_out); + } + + private static ActivityManager.RunningTaskInfo getLastTask(Context context, + final ActivityManager am) { + final List packageNames = getCurrentLauncherPackages(context); + final List tasks = am.getRunningTasks(5); + for (int i = 1; i < tasks.size(); i++) { + String packageName = tasks.get(i).topActivity.getPackageName(); + if (!packageName.equals(context.getPackageName()) + && !packageName.equals(PACKAGE_SYSTEMUI) + && !packageNames.contains(packageName)) { + return tasks.get(i); + } + } + return null; + } + + private static List getCurrentLauncherPackages(Context context) { + final PackageManager pm = context.getPackageManager(); + final List homeActivities = new ArrayList<>(); + pm.getHomeActivities(homeActivities); + final List packageNames = new ArrayList<>(); + for (ResolveInfo info : homeActivities) { + final String name = info.activityInfo.packageName; + if (!name.equals("com.android.settings")) { + packageNames.add(name); + } + } + return packageNames; + } + +} diff --git a/core/java/com/android/internal/util/hwkeys/Config.java b/core/java/com/android/internal/util/hwkeys/Config.java new file mode 100644 index 000000000000..f2799359178c --- /dev/null +++ b/core/java/com/android/internal/util/hwkeys/Config.java @@ -0,0 +1,563 @@ +/* + * Copyright (C) 2015 TeamEos project + * Author Randall Rushing aka bigrushdog, randall.rushing@gmail.com + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Config.java: A helper class for loading/setting feature button configurations + * to SettingsProvider. We start with defining a "action" in the nested + * ActionConfig class. A action holds a raw action string, a label for that action, + * and helper functions for loading an associated drawable for that action. + * + * The nested static class ButtonConfig is a convenience class that holds three + * ActionConfig objects. Those ActionConfig objects are labeled as "PRIMARY", + * "SECOND", and "THIRD", which will typically refer to a single tap, long press, + * and double tap, respectively. However, this is not always the case, thus the + * more generalized naming convention. + * + * ActionConfig and ButtonConfig implement the private Stringable interface to allow + * for easy loading and setting + * + */ +package com.android.internal.util.hwkeys; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.android.internal.util.hwkeys.ActionHandler; +import com.android.internal.util.hwkeys.ActionConstants.ConfigMap; +import com.android.internal.util.hwkeys.ActionConstants.Defaults; + +import android.content.Context; +import android.graphics.drawable.Drawable; +import android.net.Uri; +import android.os.Parcel; +import android.os.Parcelable; +import android.os.UserHandle; +import android.provider.Settings; +import android.text.TextUtils; + +public class Config { + private interface Stringable { + public String toDelimitedString(); + public void fromList(Context ctx, List items); + } + + /** + * For use with action/button based features that don't require a defaut configuration + */ + public static ArrayList getConfig(Context ctx, String uri, + boolean fromSecureSettings) { + if (ctx == null || uri == null) { + return null; + } + String config; + if (fromSecureSettings) { + config = Settings.Secure.getStringForUser( + ctx.getContentResolver(), uri, + UserHandle.USER_CURRENT); + } else { + config = Settings.System.getStringForUser( + ctx.getContentResolver(), uri, + UserHandle.USER_CURRENT); + } + if (TextUtils.isEmpty(config)) { + return null; + } + ArrayList items = new ArrayList(); + items.addAll(Arrays.asList(config.split("\\|"))); // split string into array elements + int numConfigs = Integer.parseInt(items.get(0)); // first element is always the number of + // ButtonConfigs to parse + items.remove(0); // remove button count for a clean list of buttons + + ArrayList buttonList = new ArrayList(); + ButtonConfig buttonConfig; + + for (int i = 0; i < numConfigs; i++) { + int from = i * ButtonConfig.NUM_ELEMENTS; // (0, 10), (10, 20)... + int to = from + ButtonConfig.NUM_ELEMENTS; + buttonConfig = new ButtonConfig(ctx); + buttonConfig.fromList(ctx, items.subList(from, to)); // initialize button from list + // elements + buttonList.add(buttonConfig); + } + return buttonList; + } + + public static ArrayList getConfig(Context ctx, Defaults defaults) { + if (ctx == null || defaults == null) { + return null; + } + String config = Settings.Secure.getStringForUser( + ctx.getContentResolver(), defaults.getUri(), + UserHandle.USER_CURRENT); + if (TextUtils.isEmpty(config)) { + config = defaults.getDefaultConfig(); + } + + ArrayList items = new ArrayList(); + items.addAll(Arrays.asList(config.split("\\|"))); // split string into array elements + int numConfigs = Integer.parseInt(items.get(0)); // first element is always the number of ButtonConfigs to parse + items.remove(0); // remove button count for a clean list of buttons + + ArrayList buttonList = new ArrayList(); + ButtonConfig buttonConfig; + + for (int i = 0; i < numConfigs; i++) { + int from = i * ButtonConfig.NUM_ELEMENTS; // (0, 10), (10, 20)... + int to = from + ButtonConfig.NUM_ELEMENTS; + buttonConfig = new ButtonConfig(ctx); + buttonConfig.fromList(ctx, items.subList(from, to)); // initialize button from list elements + buttonList.add(buttonConfig); + } + return buttonList; + } + + public static ArrayList getDefaultConfig(Context ctx, Defaults defaults) { + if (ctx == null || defaults == null) { + return null; + } + String config = defaults.getDefaultConfig(); + ArrayList items = new ArrayList(); + items.addAll(Arrays.asList(config.split("\\|"))); + int numConfigs = Integer.parseInt(items.get(0)); + items.remove(0); + ArrayList buttonList = new ArrayList(); + ButtonConfig buttonConfig; + + for (int i = 0; i < numConfigs; i++) { + int from = i * ButtonConfig.NUM_ELEMENTS; + int to = from + ButtonConfig.NUM_ELEMENTS; + buttonConfig = new ButtonConfig(ctx); + buttonConfig.fromList(ctx, items.subList(from, to)); + buttonList.add(buttonConfig); + } + return buttonList; + } + + public static void setConfig(Context ctx, Defaults defaults, ArrayList config) { + if (ctx == null || defaults == null || config == null) { + return; + } + int numConfigs = config.size(); + if (numConfigs <= 0) { + return; + } + StringBuilder b = new StringBuilder(); + b.append(String.valueOf(numConfigs)); + b.append(ActionConstants.ACTION_DELIMITER); // size of list is always first element + for (ButtonConfig button : config) { + b.append(button.toDelimitedString()); // this is just beautiful ;D + } + String s = b.toString(); + if (s.endsWith(ActionConstants.ACTION_DELIMITER)) { + s = removeLastChar(s); // trim final delimiter if need be + } + Settings.Secure.putStringForUser(ctx.getContentResolver(), defaults.getUri(), s, + UserHandle.USER_CURRENT); + } + + public static ButtonConfig getButtonConfigFromTag(ArrayList configs, String tag) { + if (configs == null || tag == null) { + return null; + } + ButtonConfig config = null; + for (ButtonConfig b : configs) { + if (TextUtils.equals(b.getTag(), tag)) { + config = b; + break; + } + } + return config; + } + + public static ArrayList replaceButtonAtPosition(ArrayList configs, + ButtonConfig button, ConfigMap map) { + if (configs == null || button == null || map == null) { + return null; + } + configs.remove(map.button); + configs.add(map.button, button); + return configs; + } + + public static String removeLastChar(String s) { + if (s == null || s.length() == 0) { + return s; + } + return s.substring(0, s.length() - 1); + } + + public static class ButtonConfig implements Stringable, Parcelable { + public static final int NUM_ELEMENTS = 10; + protected ActionConfig[] configs = new ActionConfig[3]; + private String tag = ActionConstants.EMPTY; + + // internal use only + private ButtonConfig() { + } + + public ButtonConfig(Context ctx) { + configs[ActionConfig.PRIMARY] = new ActionConfig(ctx); + configs[ActionConfig.SECOND] = new ActionConfig(ctx); + configs[ActionConfig.THIRD] = new ActionConfig(ctx); + } + + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public boolean hasCustomIcon() { + return configs[ActionConfig.PRIMARY].hasCustomIcon(); + } + + public void clearCustomIconIconUri() { + configs[ActionConfig.PRIMARY].clearCustomIconIconUri(); + } + + public void setCustomIconUri(String type, String packageName, String iconName) { + configs[ActionConfig.PRIMARY].setCustomIconUri(type, packageName, iconName); + } + + public void setCustomImageUri(Uri uri) { + configs[ActionConfig.PRIMARY].setCustomImageUri(uri); + } + + public Drawable getDefaultIcon(Context ctx) { + return configs[ActionConfig.PRIMARY].getDefaultIcon(ctx); + } + + public Drawable getCurrentIcon(Context ctx) { + return configs[ActionConfig.PRIMARY].getCurrentIcon(ctx); + } + + public boolean isSystemAction() { + return configs[ActionConfig.PRIMARY].isSystemAction(); + } + + public String getSystemActionIconName() { + return configs[ActionConfig.PRIMARY].getSystemActionIconName(); + } + + public ActionConfig getActionConfig(int which) { + if (which < ActionConfig.PRIMARY || which > ActionConfig.THIRD) { + return null; + } + return configs[which]; + } + + public void setActionConfig(ActionConfig config, int which) { + if (which < ActionConfig.PRIMARY || which > ActionConfig.THIRD || config == null) { + return; + } + configs[which] = config; + } + + public static void setButton(Context ctx, ButtonConfig button, String uri, boolean isSecure) { + StringBuilder b = new StringBuilder(); + b.append(button.toDelimitedString()); // this is just beautiful ;D + String s = b.toString(); + if (s.endsWith(ActionConstants.ACTION_DELIMITER)) { + s = removeLastChar(s); // trim final delimiter if need be + } + + if (isSecure) { + Settings.Secure.putStringForUser(ctx.getContentResolver(), uri, s, + UserHandle.USER_CURRENT); + } else { + Settings.System.putStringForUser(ctx.getContentResolver(), uri, s, + UserHandle.USER_CURRENT); + } + } + + public static ButtonConfig getButton(Context ctx, String uri, boolean isSecure) { + if (ctx == null || TextUtils.isEmpty(uri)) { + return null; + } + String config; + if (isSecure) { + config = Settings.Secure.getStringForUser( + ctx.getContentResolver(), uri, + UserHandle.USER_CURRENT); + } else { + config = Settings.System.getStringForUser( + ctx.getContentResolver(), uri, + UserHandle.USER_CURRENT); + } + if (TextUtils.isEmpty(config)) { + return new ButtonConfig(ctx); + } + ArrayList items = new ArrayList(); + items.addAll(Arrays.asList(config.split("\\|"))); + ButtonConfig buttonConfig = new ButtonConfig(ctx); + buttonConfig.fromList(ctx, items.subList(0, NUM_ELEMENTS)); // initialize button from + // list elements + return buttonConfig; + } + + @Override + public String toDelimitedString() { + return tag + ActionConstants.ACTION_DELIMITER + + configs[ActionConfig.PRIMARY].toDelimitedString() + + configs[ActionConfig.SECOND].toDelimitedString() + + configs[ActionConfig.THIRD].toDelimitedString(); + } + + @Override + public void fromList(Context ctx, List items) { + ArrayList buttons = new ArrayList(); + buttons.addAll(items); + tag = buttons.get(0); + + ActionConfig config = new ActionConfig(); + config.fromList(ctx, buttons.subList(1, 4)); + configs[ActionConfig.PRIMARY] = config; + + config = new ActionConfig(); + config.fromList(ctx, buttons.subList(4, 7)); + configs[ActionConfig.SECOND] = config; + + config = new ActionConfig(); + config.fromList(ctx, buttons.subList(7, 10)); + configs[ActionConfig.THIRD] = config; + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + dest.writeString(tag); + dest.writeParcelable(configs[ActionConfig.PRIMARY], flags); + dest.writeParcelable(configs[ActionConfig.SECOND], flags); + dest.writeParcelable(configs[ActionConfig.THIRD], flags); + } + + public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { + public ButtonConfig createFromParcel(Parcel in) { + return new ButtonConfig(in); + } + + public ButtonConfig[] newArray(int size) { + return new ButtonConfig[size]; + } + }; + + private ButtonConfig(Parcel in) { + tag = in.readString(); + configs[ActionConfig.PRIMARY] = (ActionConfig) in.readParcelable(Config.ActionConfig.class + .getClassLoader()); + configs[ActionConfig.SECOND] = (ActionConfig) in.readParcelable(Config.ActionConfig.class + .getClassLoader()); + configs[ActionConfig.THIRD] = (ActionConfig) in.readParcelable(Config.ActionConfig.class + .getClassLoader()); + } + } + + public static class ActionConfig implements Stringable, Comparable, Parcelable { + public static final int PRIMARY = 0; + public static final int SECOND = 1; + public static final int THIRD = 2; + + private String action = ActionHandler.SYSTEMUI_TASK_NO_ACTION; + private String label = ActionConstants.EMPTY; + private String iconUri = ActionConstants.EMPTY; + + // internal use only + private ActionConfig() { + } + + public static ActionConfig create(Context ctx) { + return new ActionConfig(ctx); + } + + public static ActionConfig create(Context ctx, String action) { + return new ActionConfig(ctx, action); + } + + public static ActionConfig create(Context ctx, String action, String iconUri) { + return new ActionConfig(ctx, action, iconUri); + } + + public ActionConfig(Context ctx) { + label = ActionUtils.getFriendlyNameForUri(ctx, action); + } + + public ActionConfig(Context ctx, String action) { + this.action = action; + label = ActionUtils.getFriendlyNameForUri(ctx, action); + } + + public ActionConfig(Context ctx, String action, String iconUri) { + this(ctx, action); + this.iconUri = iconUri; + } + + public String getAction() { + return action; + } + + public String getLabel() { + return label; + } + + public String getIconUri() { + if (!hasCustomIcon()) { + return action; + } else { + return iconUri; + } + } + + public boolean hasCustomIcon() { + return !TextUtils.equals(ActionConstants.EMPTY, iconUri); + } + + public void clearCustomIconIconUri() { + iconUri = ActionConstants.EMPTY; + } + + public boolean isSystemAction() { + return action.startsWith(ActionHandler.SYSTEM_PREFIX); + } + + public String getSystemActionIconName() { + if (action.startsWith(ActionHandler.SYSTEM_PREFIX)) { + for (int i = 0; i < ActionHandler.systemActions.length; i++) { + if (ActionHandler.systemActions[i].mAction.equals(action)) { + return ActionHandler.systemActions[i].mIconRes; + } + } + } + return null; + } + + public void setCustomImageUri(Uri uri) { + iconUri = "image$" + uri.toString(); + } + + public void setCustomIconUri(String type, String packageName, String iconName) { + StringBuilder b = new StringBuilder() + .append(type) + .append("$") + .append(packageName) + .append("$") + .append(iconName); + iconUri = b.toString(); + } + + public Drawable getDefaultIcon(Context ctx) { + return ActionUtils.getDrawableForAction(ctx, action); + } + + /** + * Returns custom icon (if exists) + * @param ctx app's context + * @return drawable when custom icon exists, null otherwise + */ + public Drawable getCurrentCustomIcon(Context ctx) { + if (hasCustomIcon()) { + List items = Arrays.asList(iconUri.split("\\$")); + String type = items.get(0); + if (type.equals("iconpack") && items.size() == 3) { + String packageName = items.get(1); + String iconName = items.get(2); + return ActionUtils.getDrawable(ctx, iconName, packageName); + } else if (type.equals("image") && items.size() == 2) { + String uri = items.get(1); + return ActionUtils.getDrawable(ctx, Uri.parse(uri)); + } + } + return null; + } + + public Drawable getCurrentIcon(Context ctx) { + + Drawable drawable = getCurrentCustomIcon(ctx); + + //If icon doesn't exist (or is not set) fallback to action one + if (drawable == null) { + drawable = ActionUtils.getDrawableForAction(ctx, action); + } + + return drawable; + + } + + public boolean hasNoAction() { + return TextUtils.equals(action, ActionHandler.SYSTEMUI_TASK_NO_ACTION) + || TextUtils.equals(action, ActionConstants.EMPTY); + } + + public boolean isActionRecents() { + return TextUtils.equals(action, ActionHandler.SYSTEMUI_TASK_RECENTS); + } + + @Override + public int compareTo(ActionConfig another) { + int result = label.toString().compareToIgnoreCase(another.label.toString()); + return result; + } + + @Override + public String toDelimitedString() { + return action + ActionConstants.ACTION_DELIMITER + + label + ActionConstants.ACTION_DELIMITER + + iconUri + ActionConstants.ACTION_DELIMITER; + } + + @Override + public void fromList(Context ctx, List items) { + ArrayList actionStrings = new ArrayList(); + actionStrings.addAll(items); + action = items.get(0); + label = ActionUtils.getFriendlyNameForUri(ctx, action); + iconUri = items.get(2); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + dest.writeString(action); + dest.writeString(label); + dest.writeString(iconUri); + } + + public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { + public ActionConfig createFromParcel(Parcel in) { + return new ActionConfig(in); + } + + public ActionConfig[] newArray(int size) { + return new ActionConfig[size]; + } + }; + + private ActionConfig(Parcel in) { + action = in.readString(); + label = in.readString(); + iconUri = in.readString(); + } + } +} diff --git a/core/java/com/android/internal/util/hwkeys/ImageHelper.java b/core/java/com/android/internal/util/hwkeys/ImageHelper.java new file mode 100644 index 000000000000..0c802f44d09b --- /dev/null +++ b/core/java/com/android/internal/util/hwkeys/ImageHelper.java @@ -0,0 +1,299 @@ +/* +* Copyright (C) 2013 SlimRoms Project +* Copyright (C) 2015 TeamEos Project +* Copyright (C) 2015-2016 The DirtyUnicorns Project +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package com.android.internal.util.hwkeys; + +import java.io.File; +import java.io.FileDescriptor; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; + +import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlPullParserException; + +import android.content.Context; +import android.content.res.Resources; +import android.graphics.Bitmap; +import android.graphics.Bitmap.Config; +import android.graphics.BitmapFactory; +import android.graphics.BitmapShader; +import android.graphics.Canvas; +import android.graphics.ColorMatrix; +import android.graphics.ColorMatrixColorFilter; +import android.graphics.Matrix; +import android.graphics.Paint; +import android.graphics.PorterDuff; +import android.graphics.PorterDuffColorFilter; +import android.graphics.PorterDuffXfermode; +import android.graphics.PorterDuff.Mode; +import android.graphics.Rect; +import android.graphics.RectF; +import android.graphics.Shader.TileMode; +import android.graphics.drawable.BitmapDrawable; +import android.graphics.drawable.Drawable; +import android.graphics.drawable.VectorDrawable; +import android.net.Uri; +import android.os.ParcelFileDescriptor; +import android.util.AttributeSet; +import android.util.Log; +import android.util.TypedValue; +import android.util.Xml; + +public class ImageHelper { + private static final int VECTOR_WIDTH = 512; + private static final int VECTOR_HEIGHT = 512; + + public static Drawable getColoredDrawable(Drawable d, int color) { + if (d == null) { + return null; + } + if (d instanceof VectorDrawable) { + d.setTint(color); + return d; + } + Bitmap colorBitmap = ((BitmapDrawable) d).getBitmap(); + Bitmap grayscaleBitmap = toGrayscale(colorBitmap); + Paint pp = new Paint(); + pp.setAntiAlias(true); + PorterDuffColorFilter frontFilter = + new PorterDuffColorFilter(color, Mode.MULTIPLY); + pp.setColorFilter(frontFilter); + Canvas cc = new Canvas(grayscaleBitmap); + final Rect rect = new Rect(0, 0, grayscaleBitmap.getWidth(), grayscaleBitmap.getHeight()); + cc.drawBitmap(grayscaleBitmap, rect, rect, pp); + return new BitmapDrawable(grayscaleBitmap); + } + + public static Bitmap drawableToBitmap (Drawable drawable) { + if (drawable == null) { + return null; + } else if (drawable instanceof BitmapDrawable) { + return ((BitmapDrawable) drawable).getBitmap(); + } + Bitmap bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), + drawable.getIntrinsicHeight(), Config.ARGB_8888); + Canvas canvas = new Canvas(bitmap); + drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight()); + drawable.draw(canvas); + return bitmap; + } + + public static Bitmap getColoredBitmap(Drawable d, int color) { + if (d == null) { + return null; + } + Bitmap colorBitmap = ((BitmapDrawable) d).getBitmap(); + Bitmap grayscaleBitmap = toGrayscale(colorBitmap); + Paint pp = new Paint(); + pp.setAntiAlias(true); + PorterDuffColorFilter frontFilter = + new PorterDuffColorFilter(color, Mode.MULTIPLY); + pp.setColorFilter(frontFilter); + Canvas cc = new Canvas(grayscaleBitmap); + final Rect rect = new Rect(0, 0, grayscaleBitmap.getWidth(), grayscaleBitmap.getHeight()); + cc.drawBitmap(grayscaleBitmap, rect, rect, pp); + return grayscaleBitmap; + } + + private static Bitmap toGrayscale(Bitmap bmpOriginal) { + int width, height; + height = bmpOriginal.getHeight(); + width = bmpOriginal.getWidth(); + + Bitmap bmpGrayscale = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); + Canvas c = new Canvas(bmpGrayscale); + Paint paint = new Paint(); + paint.setAntiAlias(true); + ColorMatrix cm = new ColorMatrix(); + final Rect rect = new Rect(0, 0, width, height); + cm.setSaturation(0); + + ColorMatrixColorFilter f = new ColorMatrixColorFilter(cm); + paint.setColorFilter(f); + c.drawBitmap(bmpOriginal, rect, rect, paint); + return bmpGrayscale; + } + + public static Drawable resize(Context context, Drawable image, int size) { + if (image == null || context == null) { + return null; + } + if (image instanceof VectorDrawable) { + return image; + } else { + int newSize = ActionUtils.dpToPx(context, size); + Bitmap bitmap = ((BitmapDrawable) image).getBitmap(); + Bitmap scaledBitmap = Bitmap.createBitmap(newSize, newSize, Config.ARGB_8888); + + float ratioX = newSize / (float) bitmap.getWidth(); + float ratioY = newSize / (float) bitmap.getHeight(); + float middleX = newSize / 2.0f; + float middleY = newSize / 2.0f; + + final Paint paint = new Paint(Paint.FILTER_BITMAP_FLAG); + paint.setAntiAlias(true); + + Matrix scaleMatrix = new Matrix(); + scaleMatrix.setScale(ratioX, ratioY, middleX, middleY); + + Canvas canvas = new Canvas(scaledBitmap); + canvas.setMatrix(scaleMatrix); + canvas.drawBitmap(bitmap, middleX - bitmap.getWidth() / 2, + middleY - bitmap.getHeight() / 2, paint); + return new BitmapDrawable(context.getResources(), scaledBitmap); + } + } + + public static Bitmap getRoundedCornerBitmap(Bitmap bitmap) { + if (bitmap == null) { + return null; + } + Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), + Config.ARGB_8888); + Canvas canvas = new Canvas(output); + + final int color = 0xff424242; + final Paint paint = new Paint(); + final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight()); + final RectF rectF = new RectF(rect); + final float roundPx = 24; + paint.setAntiAlias(true); + canvas.drawARGB(0, 0, 0, 0); + paint.setColor(color); + canvas.drawRoundRect(rectF, roundPx, roundPx, paint); + paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN)); + canvas.drawBitmap(bitmap, rect, rect, paint); + return output; + } + + public static Bitmap getCircleBitmap(Bitmap bitmap) { + if (bitmap == null) { + return null; + } + int width = bitmap.getWidth(); + int height = bitmap.getHeight(); + + Bitmap output = Bitmap.createBitmap(width, height, + Config.ARGB_8888); + Canvas canvas = new Canvas(output); + + BitmapShader shader = new BitmapShader(bitmap, TileMode.CLAMP, TileMode.CLAMP); + final Paint paint = new Paint(); + paint.setAntiAlias(true); + paint.setShader(shader); + + canvas.drawCircle(width/2, height/2, width/2, paint); + + return output; + } + + public static Drawable getVector(Resources res, int resId) { + return getVector(res, resId, 0, 0, false); + } + + public static Drawable getVector(Resources res, int resId, int width, int height) { + return getVector(res, resId, width, height, false); + } + + public static Drawable getVector(Resources res, int resId, boolean toBitmapDrawable) { + return getVector(res, resId, 0, 0, toBitmapDrawable); + } + + public static Drawable getVector(Resources res, int resId, int width, int height, + boolean toBitmapDrawable) { + if (width <= 0) { + width = VECTOR_WIDTH; + } + if (height <= 0) { + width = VECTOR_HEIGHT; + } + + VectorDrawable vectorDrawable = new VectorDrawable(); + vectorDrawable.setBounds(0, 0, width, height); + try { + XmlPullParser parser = res.getXml(resId); + AttributeSet attrs = Xml.asAttributeSet(parser); + + int type; + while ((type = parser.next()) != XmlPullParser.START_TAG && + type != XmlPullParser.END_DOCUMENT) { + // Empty loop + } + + if (type != XmlPullParser.START_TAG) { +// Log.e("ImageHelper VectorLoader", "No start tag found"); + } + + vectorDrawable.inflate(res, parser, attrs); + + if (!toBitmapDrawable) { + return vectorDrawable; + } + + return new BitmapDrawable(res, drawableToBitmap(vectorDrawable)); + } catch (Exception e) { +// Log.e("ImageHelper VectorLoader", "Error loading resource ID " + String.valueOf(resId) + " Try loading as a non vector"); + return null; + } + } + + /** + * @param context callers context + * @param uri Uri to handle + * @return A bitmap from the requested uri + * @throws IOException + * + * @Credit: StackOverflow + * http://stackoverflow.com/questions/35909008/pick-image + * -from-gallery-or-google-photos-failing + */ + public static Bitmap getBitmapFromUri(Context context, Uri uri) throws IOException { + if (context == null || uri == null) { + return null; + } + ParcelFileDescriptor parcelFileDescriptor = + context.getContentResolver().openFileDescriptor(uri, "r"); + FileDescriptor fileDescriptor = parcelFileDescriptor.getFileDescriptor(); + Bitmap image = BitmapFactory.decodeFileDescriptor(fileDescriptor); + parcelFileDescriptor.close(); + return image; + } + + /** + * @param storageDir Desired location in storage as a File + * @param fileName Name of bitmap file to store + * @param bitmap the bitmap to store + * @return the Uri of the bitmap + */ + public static Uri addBitmapToStorage(File storageDir, String fileName, Bitmap bitmap) { + if (storageDir == null || fileName == null || bitmap == null) { + return null; + } + File imageFile = new File(storageDir, fileName); + try { + FileOutputStream fos = new FileOutputStream(imageFile); + bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos); + fos.flush(); + fos.close(); + } catch (Exception e) { + return null; + } + return Uri.fromFile(imageFile); + } +} diff --git a/core/java/com/android/internal/util/hwkeys/PackageMonitor.java b/core/java/com/android/internal/util/hwkeys/PackageMonitor.java new file mode 100644 index 000000000000..8b1c688b7c91 --- /dev/null +++ b/core/java/com/android/internal/util/hwkeys/PackageMonitor.java @@ -0,0 +1,126 @@ +/* + * Copyright (C) 2015-2016 The TeamEos Project + * + * Author: Randall Rushing + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * A simplified package monitor class with easy-to-use callbacks when a + * state changes. We register the receiver on background thread but post events + * to the UI thread + */ + +package com.android.internal.util.hwkeys; + +import android.content.Context; +import android.os.Handler; +import android.os.Message; + +import java.util.ArrayList; + +public class PackageMonitor extends com.android.internal.content.PackageMonitor { + private static final int MSG_PACKAGE_ADDED = 1; + private static final int MSG_PACKAGE_REMOVED = 2; + private static final int MSG_PACKAGE_CHANGED = 3; + + public static enum PackageState { + PACKAGE_REMOVED, + PACKAGE_ADDED, + PACKAGE_CHANGED + } + + public interface PackageChangedListener { + public void onPackageChanged(String pkg, PackageState state); + } + + private Handler mHandler; + + private ArrayList mListeners = new ArrayList(); + + public void register(Context context, Handler foreground) { + register(context, null, null, true); + + mHandler = new Handler(foreground.getLooper()) { + @Override + public void handleMessage(Message msg) { + switch (msg.what) { + case MSG_PACKAGE_ADDED: + for (PackageChangedListener listener : mListeners) { + listener.onPackageChanged((String) msg.obj, PackageState.PACKAGE_ADDED); + } + break; + case MSG_PACKAGE_REMOVED: + for (PackageChangedListener listener : mListeners) { + listener.onPackageChanged((String) msg.obj, + PackageState.PACKAGE_REMOVED); + } + break; + case MSG_PACKAGE_CHANGED: + for (PackageChangedListener listener : mListeners) { + listener.onPackageChanged((String) msg.obj, + PackageState.PACKAGE_CHANGED); + } + break; + } + } + }; + } + + public void addListener(PackageChangedListener listener) { + if (listener != null) { + mListeners.add(listener); + } + } + + public void removeListener(PackageChangedListener listener) { + if (listener != null) { + mListeners.remove(listener); + } + } + + /** + * Called when a package is really added (and not replaced). + */ + public void onPackageAdded(String packageName, int uid) { + Message msg = mHandler.obtainMessage(MSG_PACKAGE_ADDED, packageName); + mHandler.sendMessage(msg); + } + + /** + * Called when a package is really removed (and not replaced). + */ + public void onPackageRemoved(String packageName, int uid) { + Message msg = mHandler.obtainMessage(MSG_PACKAGE_REMOVED, packageName); + mHandler.sendMessage(msg); + } + + /** + * Direct reflection of {@link Intent#ACTION_PACKAGE_CHANGED Intent.ACTION_PACKAGE_CHANGED} + * being received, informing you of changes to the enabled/disabled state of components in a + * package and/or of the overall package. + * + * @param packageName The name of the package that is changing. + * @param uid The user ID the package runs under. + * @param components Any components in the package that are changing. If the overall package is + * changing, this will contain an entry of the package name itself. + * @return Return true to indicate you care about this change, which will result in + * {@link #onSomePackagesChanged()} being called later. If you return false, no further + * callbacks will happen about this change. The default implementation returns true if + * this is a change to the entire package. + */ + public boolean onPackageChanged(String packageName, int uid, String[] components) { + Message msg = mHandler.obtainMessage(MSG_PACKAGE_CHANGED, packageName); + mHandler.sendMessage(msg); + return super.onPackageChanged(packageName, uid, components); + } +} diff --git a/core/java/com/android/internal/util/hwkeys/SystemReceiver.java b/core/java/com/android/internal/util/hwkeys/SystemReceiver.java new file mode 100644 index 000000000000..f81756332476 --- /dev/null +++ b/core/java/com/android/internal/util/hwkeys/SystemReceiver.java @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2015-2016 The TeamEos Project + * + * Author: Randall Rushing + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * A BroadcastReceiver that filters out broadcasts from non-system + * related processes. Subclasses can allow additional broadcasting + * packages by overriding onExemptBroadcast(Context context, String packageName) + */ + +package com.android.internal.util.hwkeys; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; + +public abstract class SystemReceiver extends BroadcastReceiver { + + protected abstract void onSecureReceive(Context context, Intent intent); + + protected boolean onExemptBroadcast(Context context, String packageName) { + return false; + } + + @Override + public final void onReceive(Context context, Intent intent) { + if (context == null || intent == null) { + return; + } + if (isBroadcastFromSystem(context)) { + onSecureReceive(context, intent); + } + } + + private boolean isBroadcastFromSystem(Context context) { + String packageName = context.getPackageName(); + if (packageName == null + && android.os.Process.SYSTEM_UID == context.getApplicationInfo().uid) { + packageName = "android"; + } + if (packageName == null) { + return false; + } + if (packageName.equals("com.android.systemui") + || packageName.equals("com.android.keyguard") + || packageName.equals("com.android.settings") + || packageName.equals("android") + || context.getApplicationInfo().uid == android.os.Process.SYSTEM_UID) { + return true; + } + if (onExemptBroadcast(context, packageName)) { + return true; + } + return false; + } +} diff --git a/core/java/com/android/internal/util/syberia/SyberiaUtils.java b/core/java/com/android/internal/util/syberia/SyberiaUtils.java new file mode 100644 index 000000000000..fc7afe4ebbc1 --- /dev/null +++ b/core/java/com/android/internal/util/syberia/SyberiaUtils.java @@ -0,0 +1,199 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.util.syberia; + +import android.content.Context; +import android.content.Intent; +import android.content.pm.PackageManager; +import android.content.pm.PackageManager.NameNotFoundException; +import android.hardware.input.InputManager; +import android.hardware.SensorManager; +import android.os.Handler; +import android.os.Looper; +import android.os.PowerManager; +import android.os.RemoteException; +import android.os.ServiceManager; +import android.os.SystemClock; +import android.os.UserHandle; +import android.view.IWindowManager; +import android.view.WindowManagerGlobal; +import android.view.InputDevice; +import android.view.KeyCharacterMap; +import android.view.KeyEvent; + +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager.NameNotFoundException; + +import com.android.internal.statusbar.IStatusBarService; + +import static android.hardware.Sensor.TYPE_LIGHT; +import static android.hardware.Sensor.TYPE_PROXIMITY; + +/** + * Some custom utilities + */ +public class SyberiaUtils { + + /** + * @hide + */ + public static final String SYSTEMUI_PACKAGE_NAME = "com.android.systemui"; + + /** + * @hide + */ + public static final String ACTION_DISMISS_KEYGUARD = SYSTEMUI_PACKAGE_NAME +".ACTION_DISMISS_KEYGUARD"; + + /** + * @hide + */ + public static final String DISMISS_KEYGUARD_EXTRA_INTENT = "launch"; + + public static final String INTENT_SCREENSHOT = "action_handler_screenshot"; + public static final String INTENT_REGION_SCREENSHOT = "action_handler_region_screenshot"; + + public static void switchScreenOff(Context ctx) { + PowerManager pm = (PowerManager) ctx.getSystemService(Context.POWER_SERVICE); + if (pm!= null) { + pm.goToSleep(SystemClock.uptimeMillis()); + } + } + + + public static boolean isPackageInstalled(Context context, String pkg, boolean ignoreState) { + if (pkg != null) { + try { + PackageInfo pi = context.getPackageManager().getPackageInfo(pkg, 0); + if (!pi.applicationInfo.enabled && !ignoreState) { + return false; + } + } catch (NameNotFoundException e) { + return false; + } + } + + return true; + } + + public static boolean isPackageInstalled(Context context, String pkg) { + return isPackageInstalled(context, pkg, true); + } + + public static boolean deviceHasFlashlight(Context ctx) { + return ctx.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_FLASH); + } + + public static void toggleCameraFlash() { + FireActions.toggleCameraFlash(); + } + + public static void killForegroundApp() { + FireActions.killForegroundApp(); + } + + /** + * @hide + */ + public static void launchKeyguardDismissIntent(Context context, UserHandle user, Intent launchIntent) { + Intent keyguardIntent = new Intent(ACTION_DISMISS_KEYGUARD); + keyguardIntent.setPackage(SYSTEMUI_PACKAGE_NAME); + keyguardIntent.putExtra(DISMISS_KEYGUARD_EXTRA_INTENT, launchIntent); + context.sendBroadcastAsUser(keyguardIntent, user); + } + + public static void sendKeycode(int keycode) { + long when = SystemClock.uptimeMillis(); + final KeyEvent evDown = new KeyEvent(when, when, KeyEvent.ACTION_DOWN, keycode, 0, + 0, KeyCharacterMap.VIRTUAL_KEYBOARD, 0, + KeyEvent.FLAG_FROM_SYSTEM | KeyEvent.FLAG_VIRTUAL_HARD_KEY, + InputDevice.SOURCE_KEYBOARD); + final KeyEvent evUp = KeyEvent.changeAction(evDown, KeyEvent.ACTION_UP); + + final Handler handler = new Handler(Looper.getMainLooper()); + handler.post(new Runnable() { + @Override + public void run() { + InputManager.getInstance().injectInputEvent(evDown, + InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); + } + }); + handler.postDelayed(new Runnable() { + @Override + public void run() { + InputManager.getInstance().injectInputEvent(evUp, + InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); + } + }, 20); + } + + public static boolean isAvailableApp(String packageName, Context context) { + Context mContext = context; + final PackageManager pm = mContext.getPackageManager(); + try { + pm.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES); + int enabled = pm.getApplicationEnabledSetting(packageName); + return enabled != PackageManager.COMPONENT_ENABLED_STATE_DISABLED && + enabled != PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER; + } catch (NameNotFoundException e) { + return false; + } + } + + public static void takeScreenshot(boolean full) { + IWindowManager wm = WindowManagerGlobal.getWindowManagerService(); + try { + wm.sendCustomAction(new Intent(full? INTENT_SCREENSHOT : INTENT_REGION_SCREENSHOT)); + } catch (RemoteException e) { + e.printStackTrace(); + } + } + + private static final class FireActions { + private static IStatusBarService mStatusBarService = null; + private static IStatusBarService getStatusBarService() { + synchronized (FireActions.class) { + if (mStatusBarService == null) { + mStatusBarService = IStatusBarService.Stub.asInterface( + ServiceManager.getService("statusbar")); + } + return mStatusBarService; + } + } + + public static void killForegroundApp() { + IStatusBarService service = getStatusBarService(); + if (service != null) { + try { + service.killForegroundApp(); + } catch (RemoteException e) { + // do nothing. + } + } + } + + public static void toggleCameraFlash() { + IStatusBarService service = getStatusBarService(); + if (service != null) { + try { + service.toggleCameraFlash(); + } catch (RemoteException e) { + // do nothing. + } + } + } + } +} diff --git a/core/java/com/android/internal/util/syberia/ThemeUtils.java b/core/java/com/android/internal/util/syberia/ThemeUtils.java new file mode 100644 index 000000000000..f584cefb2dc7 --- /dev/null +++ b/core/java/com/android/internal/util/syberia/ThemeUtils.java @@ -0,0 +1,234 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.util.syberia; + +import static android.os.UserHandle.USER_SYSTEM; + +import android.util.PathParser; + +import android.content.ContentResolver; +import android.content.Context; +import android.content.om.IOverlayManager; +import android.content.om.OverlayInfo; +import android.content.pm.PackageManager; +import android.content.pm.PackageManager.NameNotFoundException; +import android.content.pm.ProviderInfo; +import android.content.res.Resources; +import android.content.res.Resources.NotFoundException; +import android.content.res.Configuration; +import android.database.Cursor; +import android.graphics.Typeface; +import android.graphics.Path; +import android.graphics.drawable.AdaptiveIconDrawable; +import android.graphics.drawable.Drawable; +import android.graphics.drawable.ShapeDrawable; +import android.graphics.drawable.shapes.PathShape; +import android.net.Uri; +import android.os.RemoteException; +import android.os.ServiceManager; +import android.provider.Settings; +import android.text.TextUtils; +import android.util.Log; + +import org.json.JSONException; +import org.json.JSONObject; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; + +public class ThemeUtils { + + public static final String TAG = "ThemeUtils"; + + public static final String FONT_KEY = "android.theme.customization.font"; + public static final String ICON_SHAPE_KEY= "android.theme.customization.adaptive_icon_shape"; + + public static final Comparator OVERLAY_INFO_COMPARATOR = + Comparator.comparingInt(a -> a.priority); + + private Context mContext; + private IOverlayManager mOverlayManager; + private PackageManager pm; + private Resources overlayRes; + + public ThemeUtils(Context context) { + mContext = context; + mOverlayManager = IOverlayManager.Stub + .asInterface(ServiceManager.getService(Context.OVERLAY_SERVICE)); + pm = context.getPackageManager(); + } + + public void setOverlayEnabled(String category, String packageName, String target) { + final String currentPackageName = getOverlayInfos(category, target).stream() + .filter(info -> info.isEnabled()) + .map(info -> info.packageName) + .findFirst() + .orElse(null); + + try { + if (target.equals(packageName)) { + mOverlayManager.setEnabled(currentPackageName, false, USER_SYSTEM); + } else { + mOverlayManager.setEnabledExclusiveInCategory(packageName, + USER_SYSTEM); + } + + writeSettings(category, packageName, target.equals(packageName)); + + } catch (RemoteException e) { + } + } + + public void writeSettings(String category, String packageName, boolean disable) { + final String overlayPackageJson = Settings.Secure.getStringForUser( + mContext.getContentResolver(), + Settings.Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES, USER_SYSTEM); + JSONObject object; + try { + if (overlayPackageJson == null) { + object = new JSONObject(); + } else { + object = new JSONObject(overlayPackageJson); + } + if (disable) { + if (object.has(category)) object.remove(category); + } else { + object.put(category, packageName); + } + Settings.Secure.putStringForUser(mContext.getContentResolver(), + Settings.Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES, + object.toString(), USER_SYSTEM); + } catch (JSONException e) { + Log.e(TAG, "Failed to parse THEME_CUSTOMIZATION_OVERLAY_PACKAGES.", e); + } + } + + public List getOverlayPackagesForCategory(String category) { + return getOverlayPackagesForCategory(category, "android"); + } + + public List getOverlayPackagesForCategory(String category, String target) { + List overlays = new ArrayList<>(); + List mPkgs = new ArrayList<>(); + overlays.add(target); + for (OverlayInfo info : getOverlayInfos(category, target)) { + if (category.equals(info.getCategory())) { + mPkgs.add(info.getPackageName()); + } + } + Collections.sort(mPkgs); + overlays.addAll(mPkgs); + return overlays; + } + + public List getOverlayInfos(String category) { + return getOverlayInfos(category, "android"); + } + + public List getOverlayInfos(String category, String target) { + final List filteredInfos = new ArrayList<>(); + try { + List overlayInfos = mOverlayManager + .getOverlayInfosForTarget(target, USER_SYSTEM); + for (OverlayInfo overlayInfo : overlayInfos) { + if (category.equals(overlayInfo.category)) { + filteredInfos.add(overlayInfo); + } + } + } catch (RemoteException re) { + throw re.rethrowFromSystemServer(); + } + filteredInfos.sort(OVERLAY_INFO_COMPARATOR); + return filteredInfos; + } + + public List getFonts() { + final List fontlist = new ArrayList<>(); + for (String overlayPackage : getOverlayPackagesForCategory(FONT_KEY)) { + try { + overlayRes = overlayPackage.equals("android") ? Resources.getSystem() + : pm.getResourcesForApplication(overlayPackage); + final String font = overlayRes.getString( + overlayRes.getIdentifier("config_bodyFontFamily", + "string", overlayPackage)); + fontlist.add(Typeface.create(font, Typeface.NORMAL)); + } catch (NameNotFoundException | NotFoundException e) { + // Do nothing + } + } + return fontlist; + } + + public List getShapeDrawables() { + final List shapelist = new ArrayList<>(); + for (String overlayPackage : getOverlayPackagesForCategory(ICON_SHAPE_KEY)) { + shapelist.add(createShapeDrawable(overlayPackage)); + } + return shapelist; + } + + public ShapeDrawable createShapeDrawable(String overlayPackage) { + try { + if (overlayPackage.equals("android")) { + overlayRes = Resources.getSystem(); + } else { + if (overlayPackage.equals("default")) overlayPackage = "android"; + overlayRes = pm.getResourcesForApplication(overlayPackage); + } + } catch (NameNotFoundException | NotFoundException e) { + // Do nothing + } + final String shape = overlayRes.getString( + overlayRes.getIdentifier("config_icon_mask", + "string", overlayPackage)); + Path path = TextUtils.isEmpty(shape) ? null : PathParser.createPathFromPathData(shape); + PathShape pathShape = new PathShape(path, 100f, 100f); + ShapeDrawable shapeDrawable = new ShapeDrawable(pathShape); + int mThumbSize = (int) (mContext.getResources().getDisplayMetrics().density * 72); + shapeDrawable.setIntrinsicHeight(mThumbSize); + shapeDrawable.setIntrinsicWidth(mThumbSize); + return shapeDrawable; + } + + public boolean isOverlayEnabled(String overlayPackage) { + try { + OverlayInfo info = mOverlayManager.getOverlayInfo(overlayPackage, USER_SYSTEM); + return info == null ? false : info.isEnabled(); + } catch (RemoteException e) { + e.printStackTrace(); + } + return false; + } + + public boolean isDefaultOverlay(String category) { + for (String overlayPackage : getOverlayPackagesForCategory(category)) { + try { + OverlayInfo info = mOverlayManager.getOverlayInfo(overlayPackage, USER_SYSTEM); + if (info != null && info.isEnabled()) { + return false; + } else { + continue; + } + } catch (RemoteException e) { + e.printStackTrace(); + } + } + return true; + } +} diff --git a/core/java/com/android/internal/util/syberia/UdfpsUtils.java b/core/java/com/android/internal/util/syberia/UdfpsUtils.java new file mode 100644 index 000000000000..fd151bad3dde --- /dev/null +++ b/core/java/com/android/internal/util/syberia/UdfpsUtils.java @@ -0,0 +1,29 @@ +/* +* Copyright (C) 2020 The Pixel Experience Project +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package com.android.internal.util.syberia; + +import android.content.Context; + +import com.android.internal.util.ArrayUtils; + +public class UdfpsUtils { + public static boolean hasUdfpsSupport(Context context) { + int[] udfpsProps = context.getResources().getIntArray( + com.android.internal.R.array.config_udfps_sensor_props); + + return !ArrayUtils.isEmpty(udfpsProps); + } +} diff --git a/core/java/com/android/internal/widget/LocalImageResolver.java b/core/java/com/android/internal/widget/LocalImageResolver.java index b866723954b5..b11ea2961c17 100644 --- a/core/java/com/android/internal/widget/LocalImageResolver.java +++ b/core/java/com/android/internal/widget/LocalImageResolver.java @@ -25,6 +25,7 @@ import android.graphics.drawable.Drawable; import android.graphics.drawable.Icon; import android.net.Uri; +import android.text.TextUtils; import android.util.Log; import android.util.Size; @@ -108,6 +109,12 @@ public static Drawable resolveImage(@Nullable Icon icon, Context context, int ma } break; case Icon.TYPE_RESOURCE: + if (!(TextUtils.isEmpty(icon.getResPackage()) + || context.getPackageName().equals(icon.getResPackage()))) { + // We can't properly resolve icons from other packages here, so fall back. + return icon.loadDrawable(context); + } + Drawable result = resolveImage(icon.getResId(), context, maxWidth, maxHeight); if (result != null) { return tintDrawable(icon, result); diff --git a/core/java/com/android/server/LocalServices.java b/core/java/com/android/server/LocalServices.java index 9c632ea725a9..ca94bb08afc0 100644 --- a/core/java/com/android/server/LocalServices.java +++ b/core/java/com/android/server/LocalServices.java @@ -18,7 +18,7 @@ import com.android.internal.annotations.VisibleForTesting; -import android.util.ArrayMap; +import java.util.HashMap; /** * This class is used in a similar way as ServiceManager, except the services registered here @@ -32,8 +32,8 @@ public final class LocalServices { private LocalServices() {} - private static final ArrayMap, Object> sLocalServiceObjects = - new ArrayMap, Object>(); + private static final HashMap, Object> sLocalServiceObjects = + new HashMap, Object>(); /** * Returns a local service instance that implements the specified interface. diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp index 365a18d174c9..3325f62bba01 100644 --- a/core/jni/android_hardware_Camera.cpp +++ b/core/jni/android_hardware_Camera.cpp @@ -62,6 +62,18 @@ struct fields_t { jmethodID rect_constructor; jmethodID face_constructor; jmethodID point_constructor; + jfieldID face_sm_degree; + jfieldID face_sm_score; + jfieldID face_blink_detected; + jfieldID face_gaze_angle; + jfieldID face_updown_dir; + jfieldID face_leftright_dir; + jfieldID face_roll_dir; + jfieldID face_leye_blink; + jfieldID face_reye_blink; + jfieldID face_left_right_gaze; + jfieldID face_top_bottom_gaze; + jfieldID face_recognised; }; static fields_t fields; @@ -100,6 +112,7 @@ class JNICameraContext: public CameraListener jclass mFaceClass; // strong reference to Face class jclass mRectClass; // strong reference to Rect class jclass mPointClass; // strong reference to Point class + bool mIsExtendedFace; Mutex mLock; /* @@ -151,8 +164,16 @@ JNICameraContext::JNICameraContext(JNIEnv* env, jobject weak_this, jclass clazz, mCameraJClass = (jclass)env->NewGlobalRef(clazz); mCamera = camera; - jclass faceClazz = env->FindClass("android/hardware/Camera$Face"); - mFaceClass = (jclass) env->NewGlobalRef(faceClazz); + jclass extendedfaceClazz = env->FindClass("com/qualcomm/qti/camera/ExtendedFace"); + if (NULL != extendedfaceClazz) { + mFaceClass = (jclass) env->NewGlobalRef(extendedfaceClazz); + mIsExtendedFace = true; + } else { + env->ExceptionClear(); + jclass faceClazz = env->FindClass("android/hardware/Camera$Face"); + mFaceClass = (jclass) env->NewGlobalRef(faceClazz); + mIsExtendedFace = false; + } jclass rectClazz = env->FindClass("android/graphics/Rect"); mRectClass = (jclass) env->NewGlobalRef(rectClazz); @@ -404,7 +425,6 @@ void JNICameraContext::postMetadata(JNIEnv *env, int32_t msgType, camera_frame_m env->SetIntField(rect, fields.rect_top, metadata->faces[i].rect[1]); env->SetIntField(rect, fields.rect_right, metadata->faces[i].rect[2]); env->SetIntField(rect, fields.rect_bottom, metadata->faces[i].rect[3]); - env->SetObjectField(face, fields.face_rect, rect); env->SetIntField(face, fields.face_score, metadata->faces[i].score); @@ -433,6 +453,21 @@ void JNICameraContext::postMetadata(JNIEnv *env, int32_t msgType, camera_frame_m env->SetIntField(mouth, fields.point_y, metadata->faces[i].mouth[1]); env->SetObjectField(face, fields.face_mouth, mouth); env->DeleteLocalRef(mouth); + + if (mIsExtendedFace) { + env->SetIntField(face, fields.face_sm_degree, metadata->faces[i].smile_degree); + env->SetIntField(face, fields.face_sm_score, metadata->faces[i].smile_score); + env->SetIntField(face, fields.face_blink_detected, metadata->faces[i].blink_detected); + env->SetIntField(face, fields.face_recognised, metadata->faces[i].face_recognised); + env->SetIntField(face, fields.face_gaze_angle, metadata->faces[i].gaze_angle); + env->SetIntField(face, fields.face_updown_dir, metadata->faces[i].updown_dir); + env->SetIntField(face, fields.face_leftright_dir, metadata->faces[i].leftright_dir); + env->SetIntField(face, fields.face_roll_dir, metadata->faces[i].roll_dir); + env->SetIntField(face, fields.face_leye_blink, metadata->faces[i].leye_blink); + env->SetIntField(face, fields.face_reye_blink, metadata->faces[i].reye_blink); + env->SetIntField(face, fields.face_left_right_gaze, metadata->faces[i].left_right_gaze); + env->SetIntField(face, fields.face_top_bottom_gaze, metadata->faces[i].top_bottom_gaze); + } } env->DeleteLocalRef(face); @@ -470,6 +505,56 @@ void JNICameraContext::setCallbackMode(JNIEnv *env, bool installed, bool manualM } } +static void android_hardware_Camera_setLongshot(JNIEnv *env, jobject thiz, jboolean enable) +{ + ALOGV("setLongshot"); + JNICameraContext* context; + status_t rc; + sp camera = get_native_camera(env, thiz, &context); + if (camera == 0) return; + + if ( enable ) { + rc = camera->sendCommand(CAMERA_CMD_LONGSHOT_ON, 0, 0); + } else { + rc = camera->sendCommand(CAMERA_CMD_LONGSHOT_OFF, 0, 0); + } + + if (rc != NO_ERROR) { + jniThrowException(env, "java/lang/RuntimeException", "enabling longshot mode failed"); + } +} + +static void android_hardware_Camera_sendHistogramData(JNIEnv *env, jobject thiz) + { + ALOGV("sendHistogramData" ); + JNICameraContext* context; + status_t rc; + sp camera = get_native_camera(env, thiz, &context); + if (camera == 0) return; + + rc = camera->sendCommand(CAMERA_CMD_HISTOGRAM_SEND_DATA, 0, 0); + + if (rc != NO_ERROR) { + jniThrowException(env, "java/lang/RuntimeException", "send histogram data failed"); + } + } + static void android_hardware_Camera_setHistogramMode(JNIEnv *env, jobject thiz, jboolean mode) + { + ALOGV("setHistogramMode: mode:%d", (int)mode); + JNICameraContext* context; + status_t rc; + sp camera = get_native_camera(env, thiz, &context); + if (camera == 0) return; + + if(mode == true) + rc = camera->sendCommand(CAMERA_CMD_HISTOGRAM_ON, 0, 0); + else + rc = camera->sendCommand(CAMERA_CMD_HISTOGRAM_OFF, 0, 0); + + if (rc != NO_ERROR) { + jniThrowException(env, "java/lang/RuntimeException", "set histogram mode failed"); + } + } void JNICameraContext::addCallbackBuffer( JNIEnv *env, jbyteArray cbb, int msgType) { @@ -783,7 +868,25 @@ static void android_hardware_Camera_setHasPreviewCallback(JNIEnv *env, jobject t context->setCallbackMode(env, installed, manualBuffer); } -static void android_hardware_Camera_addCallbackBuffer(JNIEnv *env, jobject thiz, jbyteArray bytes, jint msgType) { +static void android_hardware_Camera_setMetadataCb(JNIEnv *env, jobject thiz, jboolean mode) +{ + ALOGV("setMetadataCb: mode:%d", (int)mode); + JNICameraContext* context; + status_t rc; + sp camera = get_native_camera(env, thiz, &context); + if (camera == 0) return; + + if(mode == true) + rc = camera->sendCommand(CAMERA_CMD_METADATA_ON, 0, 0); + else + rc = camera->sendCommand(CAMERA_CMD_METADATA_OFF, 0, 0); + + if (rc != NO_ERROR) { + jniThrowException(env, "java/lang/RuntimeException", "set metadata mode failed"); + } +} + +static void android_hardware_Camera_addCallbackBuffer(JNIEnv *env, jobject thiz, jbyteArray bytes, int msgType) { ALOGV("addCallbackBuffer: 0x%x", msgType); JNICameraContext* context = reinterpret_cast(env->GetLongField(thiz, fields.context)); @@ -1048,10 +1151,22 @@ static int32_t android_hardware_Camera_getAudioRestriction( return ret; } +static void android_hardware_Camera_sendVendorCommand(JNIEnv *env, jobject thiz, + jint cmd, jint arg1, jint arg2) +{ + ALOGV("sendVendorCommand"); + sp camera = get_native_camera(env, thiz, NULL); + if (camera == 0) return; + + if (camera->sendCommand(cmd, arg1, arg2) != NO_ERROR) { + jniThrowRuntimeException(env, "sending vendor command failed"); + } +} + //------------------------------------------------- static const JNINativeMethod camMethods[] = { - { "getNumberOfCameras", + { "_getNumberOfCameras", "()I", (void *)android_hardware_Camera_getNumberOfCameras }, { "_getCameraInfo", @@ -1096,6 +1211,18 @@ static const JNINativeMethod camMethods[] = { { "native_takePicture", "(I)V", (void *)android_hardware_Camera_takePicture }, + { "native_setHistogramMode", + "(Z)V", + (void *)android_hardware_Camera_setHistogramMode }, + { "native_setMetadataCb", + "(Z)V", + (void *)android_hardware_Camera_setMetadataCb }, + { "native_sendHistogramData", + "()V", + (void *)android_hardware_Camera_sendHistogramData }, + { "native_setLongshot", + "(Z)V", + (void *)android_hardware_Camera_setLongshot }, { "native_setParameters", "(Ljava/lang/String;)V", (void *)android_hardware_Camera_setParameters }, @@ -1138,6 +1265,9 @@ static const JNINativeMethod camMethods[] = { { "getAudioRestriction", "()I", (void *)android_hardware_Camera_getAudioRestriction}, + { "_sendVendorCommand", + "(III)V", + (void *)android_hardware_Camera_sendVendorCommand }, }; struct field { @@ -1180,6 +1310,27 @@ int register_android_hardware_Camera(JNIEnv *env) { "android/graphics/Point", "y", "I", &fields.point_y}, }; + field extendedfacefields_to_find[] = { + { "com/qualcomm/qti/camera/ExtendedFace", "rect", "Landroid/graphics/Rect;", &fields.face_rect }, + { "com/qualcomm/qti/camera/ExtendedFace", "score", "I", &fields.face_score }, + { "com/qualcomm/qti/camera/ExtendedFace", "id", "I", &fields.face_id }, + { "com/qualcomm/qti/camera/ExtendedFace", "leftEye", "Landroid/graphics/Point;", &fields.face_left_eye }, + { "com/qualcomm/qti/camera/ExtendedFace", "rightEye", "Landroid/graphics/Point;", &fields.face_right_eye }, + { "com/qualcomm/qti/camera/ExtendedFace", "mouth", "Landroid/graphics/Point;", &fields.face_mouth }, + { "com/qualcomm/qti/camera/ExtendedFace", "smileDegree", "I", &fields.face_sm_degree }, + { "com/qualcomm/qti/camera/ExtendedFace", "smileScore", "I", &fields.face_sm_score }, + { "com/qualcomm/qti/camera/ExtendedFace", "blinkDetected", "I", &fields.face_blink_detected }, + { "com/qualcomm/qti/camera/ExtendedFace", "faceRecognized", "I", &fields.face_recognised }, + { "com/qualcomm/qti/camera/ExtendedFace", "gazeAngle", "I", &fields.face_gaze_angle }, + { "com/qualcomm/qti/camera/ExtendedFace", "updownDir", "I", &fields.face_updown_dir }, + { "com/qualcomm/qti/camera/ExtendedFace", "leftrightDir", "I", &fields.face_leftright_dir }, + { "com/qualcomm/qti/camera/ExtendedFace", "rollDir", "I", &fields.face_roll_dir }, + { "com/qualcomm/qti/camera/ExtendedFace", "leyeBlink", "I", &fields.face_leye_blink }, + { "com/qualcomm/qti/camera/ExtendedFace", "reyeBlink", "I", &fields.face_reye_blink }, + { "com/qualcomm/qti/camera/ExtendedFace", "leftrightGaze", "I", &fields.face_left_right_gaze }, + { "com/qualcomm/qti/camera/ExtendedFace", "topbottomGaze", "I", &fields.face_top_bottom_gaze }, + }; + find_fields(env, fields_to_find, NELEM(fields_to_find)); jclass clazz = FindClassOrDie(env, "android/hardware/Camera"); @@ -1199,6 +1350,14 @@ int register_android_hardware_Camera(JNIEnv *env) return -1; } + clazz = env->FindClass("com/qualcomm/qti/camera/ExtendedFace"); + if (NULL != clazz) { + fields.face_constructor = env->GetMethodID(clazz, "", "()V"); + find_fields(env, extendedfacefields_to_find, NELEM(extendedfacefields_to_find)); + }else { + env->ExceptionClear(); + } + // Register native functions return RegisterMethodsOrDie(env, "android/hardware/Camera", camMethods, NELEM(camMethods)); } diff --git a/core/jni/android_os_MessageQueue.cpp b/core/jni/android_os_MessageQueue.cpp index f7a98d16f2e3..30d9ea19be39 100644 --- a/core/jni/android_os_MessageQueue.cpp +++ b/core/jni/android_os_MessageQueue.cpp @@ -51,6 +51,21 @@ class NativeMessageQueue : public MessageQueue, public LooperCallback { virtual int handleEvent(int fd, int events, void* data); + /** + * A simple proxy that holds a weak reference to a looper callback. + */ + class WeakLooperCallback : public LooperCallback { + protected: + virtual ~WeakLooperCallback(); + + public: + WeakLooperCallback(const wp& callback); + virtual int handleEvent(int fd, int events, void* data); + + private: + wp mCallback; + }; + private: JNIEnv* mPollEnv; jobject mPollObj; @@ -131,7 +146,8 @@ void NativeMessageQueue::setFileDescriptorEvents(int fd, int events) { if (events & CALLBACK_EVENT_OUTPUT) { looperEvents |= Looper::EVENT_OUTPUT; } - mLooper->addFd(fd, Looper::POLL_CALLBACK, looperEvents, this, + mLooper->addFd(fd, Looper::POLL_CALLBACK, looperEvents, + sp::make(this), reinterpret_cast(events)); } else { mLooper->removeFd(fd); @@ -162,6 +178,24 @@ int NativeMessageQueue::handleEvent(int fd, int looperEvents, void* data) { } +// --- NativeMessageQueue::WeakLooperCallback --- + +NativeMessageQueue::WeakLooperCallback::WeakLooperCallback(const wp& callback) : + mCallback(callback) { +} + +NativeMessageQueue::WeakLooperCallback::~WeakLooperCallback() { +} + +int NativeMessageQueue::WeakLooperCallback::handleEvent(int fd, int events, void* data) { + sp callback = mCallback.promote(); + if (callback != nullptr) { + return callback->handleEvent(fd, events, data); + } + return 0; +} + + // ---------------------------------------------------------------------------- sp android_os_MessageQueue_getMessageQueue(JNIEnv* env, jobject messageQueueObj) { diff --git a/core/jni/com_android_internal_content_NativeLibraryHelper.cpp b/core/jni/com_android_internal_content_NativeLibraryHelper.cpp index ef6fd7dd6829..a50c01178083 100644 --- a/core/jni/com_android_internal_content_NativeLibraryHelper.cpp +++ b/core/jni/com_android_internal_content_NativeLibraryHelper.cpp @@ -271,6 +271,13 @@ copyFileIfChanged(JNIEnv *env, void* arg, ZipFileRO* zipFile, ZipEntryRO zipEntr return INSTALL_FAILED_CONTAINER_ERROR; } + if (fsync(fd) < 0) { + ALOGE("Coulnd't fsync temporary file name: %s: %s\n", localTmpFileName, strerror(errno)); + close(fd); + unlink(localTmpFileName); + return INSTALL_FAILED_INTERNAL_ERROR; + } + close(fd); // Set the modification time for this file to the ZIP's mod time. diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp index 21bbac0b0a7d..c56a5fe42c91 100644 --- a/core/jni/com_android_internal_os_Zygote.cpp +++ b/core/jni/com_android_internal_os_Zygote.cpp @@ -128,8 +128,6 @@ static jclass gZygoteInitClass; static jmethodID gGetOrCreateSystemServerClassLoader; static jmethodID gPrefetchStandaloneSystemServerJars; -static bool gIsSecurityEnforced = true; - /** * True if the app process is running in its mount namespace. */ @@ -634,11 +632,6 @@ static void PreApplicationInit() { } static void SetUpSeccompFilter(uid_t uid, bool is_child_zygote) { - if (!gIsSecurityEnforced) { - ALOGI("seccomp disabled by setenforce 0"); - return; - } - // Apply system or app filter based on uid. if (uid >= AID_APP_START) { if (is_child_zygote) { @@ -2317,11 +2310,6 @@ static void com_android_internal_os_Zygote_nativeAllowFileAcrossFork( static void com_android_internal_os_Zygote_nativeInstallSeccompUidGidFilter( JNIEnv* env, jclass, jint uidGidMin, jint uidGidMax) { - if (!gIsSecurityEnforced) { - ALOGI("seccomp disabled by setenforce 0"); - return; - } - bool installed = install_setuidgid_seccomp_filter(uidGidMin, uidGidMax); if (!installed) { RuntimeAbort(env, __LINE__, "Could not install setuid/setgid seccomp filter."); @@ -2398,10 +2386,6 @@ static void com_android_internal_os_Zygote_nativeInitNativeState(JNIEnv* env, jc * Security Initialization */ - // security_getenforce is not allowed on app process. Initialize and cache - // the value before zygote forks. - gIsSecurityEnforced = security_getenforce(); - selinux_android_seapp_context_init(); /* diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 7439b2f0921f..c953558ac91d 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -816,6 +816,14 @@ + + + + + + + + @@ -6518,8 +6526,21 @@ + + + + + + + + + @@ -6542,6 +6563,11 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/core/res/res/anim/custom_app_out.xml b/core/res/res/anim/custom_app_out.xml new file mode 100644 index 000000000000..ef042528eabe --- /dev/null +++ b/core/res/res/anim/custom_app_out.xml @@ -0,0 +1,38 @@ + + + + + + + + + + \ No newline at end of file diff --git a/core/res/res/anim/honami_toast_enter.xml b/core/res/res/anim/honami_toast_enter.xml new file mode 100644 index 000000000000..5603d1500a42 --- /dev/null +++ b/core/res/res/anim/honami_toast_enter.xml @@ -0,0 +1,8 @@ + + + + + + + diff --git a/core/res/res/anim/honami_toast_exit.xml b/core/res/res/anim/honami_toast_exit.xml new file mode 100644 index 000000000000..0bbf34d73694 --- /dev/null +++ b/core/res/res/anim/honami_toast_exit.xml @@ -0,0 +1,8 @@ + + + + + + + diff --git a/core/res/res/anim/slide_in_down.xml b/core/res/res/anim/slide_in_down.xml new file mode 100644 index 000000000000..6cf96d866963 --- /dev/null +++ b/core/res/res/anim/slide_in_down.xml @@ -0,0 +1,28 @@ + + + + + diff --git a/core/res/res/anim/slide_out_up.xml b/core/res/res/anim/slide_out_up.xml new file mode 100644 index 000000000000..f390d9143320 --- /dev/null +++ b/core/res/res/anim/slide_out_up.xml @@ -0,0 +1,28 @@ + + + + + diff --git a/core/res/res/anim/tn_toast_enter.xml b/core/res/res/anim/tn_toast_enter.xml new file mode 100644 index 000000000000..cf2337f94f72 --- /dev/null +++ b/core/res/res/anim/tn_toast_enter.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/core/res/res/anim/tn_toast_exit.xml b/core/res/res/anim/tn_toast_exit.xml new file mode 100644 index 000000000000..31bfad82212a --- /dev/null +++ b/core/res/res/anim/tn_toast_exit.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/core/res/res/anim/xylon_toast_enter.xml b/core/res/res/anim/xylon_toast_enter.xml new file mode 100644 index 000000000000..1067034feb27 --- /dev/null +++ b/core/res/res/anim/xylon_toast_enter.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/core/res/res/anim/xylon_toast_exit.xml b/core/res/res/anim/xylon_toast_exit.xml new file mode 100644 index 000000000000..37b861a9cec8 --- /dev/null +++ b/core/res/res/anim/xylon_toast_exit.xml @@ -0,0 +1,4 @@ + + diff --git a/core/res/res/color/surface_header_dark_sysui.xml b/core/res/res/color/surface_header_dark_sysui.xml new file mode 100644 index 000000000000..ec070c96f91a --- /dev/null +++ b/core/res/res/color/surface_header_dark_sysui.xml @@ -0,0 +1,18 @@ + + + + + diff --git a/core/res/res/drawable-xxhdpi/pocket_mode_img.png b/core/res/res/drawable-xxhdpi/pocket_mode_img.png new file mode 100644 index 000000000000..769f13866317 Binary files /dev/null and b/core/res/res/drawable-xxhdpi/pocket_mode_img.png differ diff --git a/core/res/res/drawable/ic_ab_back_material.xml b/core/res/res/drawable/ic_ab_back_material.xml index e4bc6ccfbf07..0418309c88ba 100644 --- a/core/res/res/drawable/ic_ab_back_material.xml +++ b/core/res/res/drawable/ic_ab_back_material.xml @@ -1,26 +1,28 @@ - + android:tint="?android:colorControlNormal" + android:autoMirrored="true" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + diff --git a/core/res/res/drawable/ic_ab_back_material_dark.xml b/core/res/res/drawable/ic_ab_back_material_dark.xml index 7cdd1393a4a3..cfbc20d598ef 100644 --- a/core/res/res/drawable/ic_ab_back_material_dark.xml +++ b/core/res/res/drawable/ic_ab_back_material_dark.xml @@ -1,27 +1,28 @@ - + android:tint="@color/secondary_text_material_dark" + android:autoMirrored="true" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + android:fillColor="#FFFFFF" + android:pathData="M24,0l-0,24l-24,0l-0,-24z" + android:strokeAlpha="0" + android:fillAlpha="0"/> + diff --git a/core/res/res/drawable/ic_ab_back_material_light.xml b/core/res/res/drawable/ic_ab_back_material_light.xml index 65dab8112ef2..0ad0bbbf3492 100644 --- a/core/res/res/drawable/ic_ab_back_material_light.xml +++ b/core/res/res/drawable/ic_ab_back_material_light.xml @@ -1,27 +1,28 @@ - + android:tint="@color/secondary_text_material_light" + android:autoMirrored="true" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + android:fillColor="#FFFFFF" + android:pathData="M24,0l-0,24l-24,0l-0,-24z" + android:strokeAlpha="0" + android:fillAlpha="0"/> + diff --git a/core/res/res/drawable/ic_ab_back_material_settings.xml b/core/res/res/drawable/ic_ab_back_material_settings.xml index 938e36d4ecb5..5f5e44410d0c 100644 --- a/core/res/res/drawable/ic_ab_back_material_settings.xml +++ b/core/res/res/drawable/ic_ab_back_material_settings.xml @@ -1,29 +1,28 @@ - - + Copyright 2021-2022 The xdroidOSS & xyzprjkt + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> - + android:tint="?attr/colorControlNormal" + android:width="24dp" + android:height="24dp" + android:autoMirrored="true" + android:viewportWidth="24" + android:viewportHeight="24"> + + - diff --git a/core/res/res/drawable/ic_account_circle.xml b/core/res/res/drawable/ic_account_circle.xml index 71691add7322..5254af7c152a 100644 --- a/core/res/res/drawable/ic_account_circle.xml +++ b/core/res/res/drawable/ic_account_circle.xml @@ -14,14 +14,16 @@ Copyright (C) 2014 The Android Open Source Project limitations under the License. --> - - + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + diff --git a/core/res/res/drawable/ic_livedisplay_auto.xml b/core/res/res/drawable/ic_livedisplay_auto.xml new file mode 100644 index 000000000000..39d1f8cc6205 --- /dev/null +++ b/core/res/res/drawable/ic_livedisplay_auto.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/core/res/res/drawable/ic_livedisplay_day.xml b/core/res/res/drawable/ic_livedisplay_day.xml new file mode 100644 index 000000000000..f454d81f6d4b --- /dev/null +++ b/core/res/res/drawable/ic_livedisplay_day.xml @@ -0,0 +1,30 @@ + + + + + + \ No newline at end of file diff --git a/core/res/res/drawable/ic_livedisplay_night.xml b/core/res/res/drawable/ic_livedisplay_night.xml new file mode 100644 index 000000000000..88a6764c748c --- /dev/null +++ b/core/res/res/drawable/ic_livedisplay_night.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/core/res/res/drawable/ic_livedisplay_notif.xml b/core/res/res/drawable/ic_livedisplay_notif.xml new file mode 100644 index 000000000000..a7cb8c69646b --- /dev/null +++ b/core/res/res/drawable/ic_livedisplay_notif.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/core/res/res/drawable/ic_livedisplay_off.xml b/core/res/res/drawable/ic_livedisplay_off.xml new file mode 100644 index 000000000000..f454d81f6d4b --- /dev/null +++ b/core/res/res/drawable/ic_livedisplay_off.xml @@ -0,0 +1,30 @@ + + + + + + \ No newline at end of file diff --git a/core/res/res/drawable/ic_livedisplay_outdoor.xml b/core/res/res/drawable/ic_livedisplay_outdoor.xml new file mode 100644 index 000000000000..66ead51185c2 --- /dev/null +++ b/core/res/res/drawable/ic_livedisplay_outdoor.xml @@ -0,0 +1,27 @@ + + + + + + \ No newline at end of file diff --git a/core/res/res/drawable/ic_pocket_lock.xml b/core/res/res/drawable/ic_pocket_lock.xml new file mode 100644 index 000000000000..3494a8f38b84 --- /dev/null +++ b/core/res/res/drawable/ic_pocket_lock.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/res/res/drawable/perm_group_location.xml b/core/res/res/drawable/perm_group_location.xml index a87fc0dc43df..633610ae55f9 100644 --- a/core/res/res/drawable/perm_group_location.xml +++ b/core/res/res/drawable/perm_group_location.xml @@ -15,16 +15,16 @@ limitations under the License. --> + android:pathData="M 10 2 C 6.13 2 3 5.13 3 9 c 0 5.25 7 13 7 13 s 7 -7.75 7 -13 C 17 5.13 13.87 2 10 2 z M 5 9 c 0 -2.76 2.24 -5 5 -5 s 5 2.24 5 5 c 0 2.88 -2.88 7.19 -5 9.88 C 7.92 16.21 5 11.85 5 9 z"/> + android:pathData="M 10 9 m -2.5 0 a 2.5 2.5 0 1 1 5 0 a 2.5 2.5 0 1 1 -5 0"/> diff --git a/core/res/res/drawable/seekbar_progress.xml b/core/res/res/drawable/seekbar_progress.xml new file mode 100644 index 000000000000..944d2bfc1d53 --- /dev/null +++ b/core/res/res/drawable/seekbar_progress.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + diff --git a/core/res/res/drawable/seekbar_progress_drawable.xml b/core/res/res/drawable/seekbar_progress_drawable.xml new file mode 100644 index 000000000000..91e4771eeab8 --- /dev/null +++ b/core/res/res/drawable/seekbar_progress_drawable.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + diff --git a/core/res/res/drawable/toast_frame.xml b/core/res/res/drawable/toast_frame.xml index a8cdef6d05f1..34987394b2ec 100644 --- a/core/res/res/drawable/toast_frame.xml +++ b/core/res/res/drawable/toast_frame.xml @@ -17,7 +17,7 @@ --> - + diff --git a/core/res/res/layout/accessibility_button_chooser_item.xml b/core/res/res/layout/accessibility_button_chooser_item.xml index 33d6fa2862f7..70905ca19192 100644 --- a/core/res/res/layout/accessibility_button_chooser_item.xml +++ b/core/res/res/layout/accessibility_button_chooser_item.xml @@ -45,7 +45,7 @@ android:textAppearance="?attr/textAppearanceSmall" android:textColor="?attr/textColorPrimary" android:textSize="12sp" - android:fontFamily="sans-serif-condensed" + android:fontFamily="@*android:string/config_bodyFontFamily" android:gravity="top|center_horizontal" android:minLines="2" android:maxLines="2" diff --git a/core/res/res/layout/accessibility_enable_service_warning.xml b/core/res/res/layout/accessibility_enable_service_warning.xml index 01ef10177c5a..fc6f49837519 100644 --- a/core/res/res/layout/accessibility_enable_service_warning.xml +++ b/core/res/res/layout/accessibility_enable_service_warning.xml @@ -51,7 +51,7 @@ android:gravity="center" android:textSize="20sp" android:textColor="?android:attr/textColorPrimary" - android:fontFamily="google-sans-medium"/> + android:fontFamily="@*android:string/config_headlineFontFamily"/> + android:fontFamily="@*android:string/config_bodyFontFamily"/> + android:fontFamily="@*android:string/config_headlineFontFamily"/> + android:fontFamily="@*android:string/config_bodyFontFamily"/> + android:fontFamily="@*android:string/config_headlineFontFamily"/> + android:fontFamily="@*android:string/config_bodyFontFamily" /> + android:fontFamily="@*android:string/config_bodyFontFamily"/> + android:fontFamily="@*android:string/config_bodyFontFamily"/> diff --git a/core/res/res/layout/notification_template_material_base.xml b/core/res/res/layout/notification_template_material_base.xml index 0756d68063f5..fd787f6ea470 100644 --- a/core/res/res/layout/notification_template_material_base.xml +++ b/core/res/res/layout/notification_template_material_base.xml @@ -138,7 +138,7 @@ - - diff --git a/core/res/res/layout/pocket_lock_view.xml b/core/res/res/layout/pocket_lock_view.xml new file mode 100644 index 000000000000..8c8778ea9c0f --- /dev/null +++ b/core/res/res/layout/pocket_lock_view.xml @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/res/res/layout/time_picker_material.xml b/core/res/res/layout/time_picker_material.xml index 75973798219e..ee733f1f39e8 100644 --- a/core/res/res/layout/time_picker_material.xml +++ b/core/res/res/layout/time_picker_material.xml @@ -44,7 +44,7 @@ android:paddingTop="20dp" android:paddingBottom="20dp" android:includeFontPadding="false" - android:fontFamily="sans-serif-medium" + android:fontFamily="@string/config_bodyFontFamilyMedium" android:textSize="34sp" android:textColor="@color/white" android:text="@string/time_picker_header_text"/> diff --git a/core/res/res/values-night/themes_device_defaults.xml b/core/res/res/values-night/themes_device_defaults.xml index 7cfdba7a65be..9712951f0490 100644 --- a/core/res/res/values-night/themes_device_defaults.xml +++ b/core/res/res/values-night/themes_device_defaults.xml @@ -52,7 +52,7 @@ easier. @@ -971,7 +971,7 @@ please see styles_device_defaults.xml. diff --git a/core/res/res/values/styles_material.xml b/core/res/res/values/styles_material.xml index eec6ae3fb521..aa80246c0001 100644 --- a/core/res/res/values/styles_material.xml +++ b/core/res/res/values/styles_material.xml @@ -194,7 +194,7 @@ please see styles_device_defaults.xml. @@ -429,7 +429,7 @@ please see styles_device_defaults.xml. @@ -807,21 +807,20 @@ please see styles_device_defaults.xml. + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/res/res/values/syb_symbols.xml b/core/res/res/values/syb_symbols.xml new file mode 100644 index 000000000000..5aad5d91893d --- /dev/null +++ b/core/res/res/values/syb_symbols.xml @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 4e7e20ca10b0..8a7334d5a64c 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -3464,6 +3464,16 @@ + + + + + + + + + + @@ -3773,6 +3783,8 @@ + + @@ -4679,6 +4691,8 @@ + + diff --git a/core/res/res/values/themes_device_defaults.xml b/core/res/res/values/themes_device_defaults.xml index c603c83e033d..721812b76d9a 100644 --- a/core/res/res/values/themes_device_defaults.xml +++ b/core/res/res/values/themes_device_defaults.xml @@ -1089,6 +1089,7 @@ easier. @style/TextAppearance.DeviceDefault.Widget.Button + @style/TextAppearance.DeviceDefault.Medium @dimen/config_buttonCornerRadius @@ -2154,6 +2155,7 @@ easier. @style/TextAppearance.DeviceDefault.Widget.Button + @style/TextAppearance.DeviceDefault.Medium @dimen/config_buttonCornerRadius @@ -2299,8 +2301,8 @@ easier. @color/edge_effect_device_default_light - @color/navigation_bar_divider_device_default_settings - @android:color/white + @null + ?attr/colorBackground true diff --git a/core/tests/coretests/src/android/colormodel/ZcamTest.java b/core/tests/coretests/src/android/colormodel/ZcamTest.java new file mode 100644 index 000000000000..f9de315f83d0 --- /dev/null +++ b/core/tests/coretests/src/android/colormodel/ZcamTest.java @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import com.android.internal.graphics.color.CieLab; +import com.android.internal.graphics.color.CieXyzAbs; +import com.android.internal.graphics.color.Zcam; + +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public final class ZcamTest { + @Test + public void rgb8ToXyzAbs() { + CieXyzAbs xyz = new CieXyzAbs(0xf3a177); + approx(xyz.x, 106.0701075088416); + approx(xyz.y, 91.7571442950486); + approx(xyz.z, 47.031214129883175); + } + + @Test + public void xyzAbsToRgb8() { + CieXyzAbs xyz = new CieXyzAbs(0xf3a177); + int rgb = xyz.toRgb8(); + Assert.assertEquals(0xf3a177, rgb); + } + + @Test + public void lstarToZcamJz() { + double jz = CieLab.lToZcamJz(50.0); + approx(jz, 49.0802114144443); + } + + @Test + public void defaultViewingConditions() { + Zcam.ViewingConditions cond = Zcam.ViewingConditions.DEFAULT; + approx(cond.surroundFactor, 0.69); + approx(cond.adaptingLuminance, 80.0); + approx(cond.backgroundLuminance, 36.83730370248883); + approx(cond.referenceWhite.x, 190.0911854103343); + approx(cond.referenceWhite.y, 200.0); + approx(cond.referenceWhite.z, 217.8115501519757); + + approx(cond.Iz_coeff, 735.5600123076448); + approx(cond.ez_coeff, 0.9407449331256349); + approx(cond.Qz_denom, 0.9034736074478125); + approx(cond.Mz_denom, 0.4423628063922157); + approx(cond.Qz_w, 234.01788828747445); + } + + @Test + public void zcamRoundTrip() { + Zcam.ViewingConditions cond = new Zcam.ViewingConditions( + Zcam.ViewingConditions.SURROUND_AVERAGE, + 264.0, + 100.0, + new CieXyzAbs(250.92408, 264.0, 287.45112) + ); + + CieXyzAbs sample = new CieXyzAbs(182.232347, 206.57991269, 231.87358528); + Zcam zcam = new Zcam(sample, cond); + + approx(zcam.lightness, 91.45992645); + approx(zcam.chroma, 3.00322656); + approx(zcam.hue, 197.26438822); + + // Now invert it + CieXyzAbs inverted = zcam.toXyzAbs(); + approx(inverted.x, sample.x); + approx(inverted.y, sample.y); + approx(inverted.z, sample.z); + } + + private static void approx(double actual, double expected) { + Assert.assertEquals(expected, actual, 0.001); + } +} + diff --git a/core/tests/coretests/src/com/android/internal/widget/LocalImageResolverTest.java b/core/tests/coretests/src/com/android/internal/widget/LocalImageResolverTest.java index c63d18bfa531..0cee526651a6 100644 --- a/core/tests/coretests/src/com/android/internal/widget/LocalImageResolverTest.java +++ b/core/tests/coretests/src/com/android/internal/widget/LocalImageResolverTest.java @@ -270,4 +270,13 @@ public void resolveImage_smallAdaptiveBitmapIcon_defaultSize_untouched() throws assertThat(bd.getBitmap().getHeight()).isEqualTo(originalHeight); } + + @Test + public void resolveImage_iconWithOtherPackageResource_usesPackageContextDefinition() + throws IOException { + Icon icon = Icon.createWithResource("this_is_invalid", R.drawable.test32x24); + Drawable d = LocalImageResolver.resolveImage(icon, mContext); + // This drawable must not be loaded - if it was, the code ignored the package specification. + assertThat(d).isNull(); + } } diff --git a/data/etc/framework-sysconfig.xml b/data/etc/framework-sysconfig.xml old mode 100644 new mode 100755 index 2162ec421dcd..9ed0171f63a1 --- a/data/etc/framework-sysconfig.xml +++ b/data/etc/framework-sysconfig.xml @@ -56,4 +56,8 @@ + + + + diff --git a/data/etc/platform.xml b/data/etc/platform.xml index 6897c01844a8..52127ddb7daa 100644 --- a/data/etc/platform.xml +++ b/data/etc/platform.xml @@ -333,4 +333,6 @@ + + diff --git a/data/etc/preinstalled-packages-platform-overlays.xml b/data/etc/preinstalled-packages-platform-overlays.xml index 6f6390b19dff..bcc1759b9910 100644 --- a/data/etc/preinstalled-packages-platform-overlays.xml +++ b/data/etc/preinstalled-packages-platform-overlays.xml @@ -53,58 +53,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -229,28 +177,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/data/etc/privapp-permissions-platform.xml b/data/etc/privapp-permissions-platform.xml index 58a2073981bf..2119087d10f6 100644 --- a/data/etc/privapp-permissions-platform.xml +++ b/data/etc/privapp-permissions-platform.xml @@ -481,6 +481,8 @@ applications that come with the platform + + diff --git a/data/fonts/fonts.xml b/data/fonts/fonts.xml index 84e949a18c52..b8931d4a42a6 100644 --- a/data/fonts/fonts.xml +++ b/data/fonts/fonts.xml @@ -234,6 +234,463 @@ + + Aclonica.ttf + + + + + + + + + + + + + + Amarante.ttf + + + + + + + + + + + + + + Bariol-Regular.ttf + + + + + + + + + + + + + + Cagliostro-Regular.ttf + + + + + + + + + + + + + + Coolstory-Regular.ttf + + + + + + + + + + + + + + LGSmartGothic.ttf + + + + + + + + + + + + + + Rosemary-Regular.ttf + + + + + + + + + + + + + + SonySketch.ttf + + + + + + + + + + + + + + Surfer.ttf + + + + + + + + + + + + + + SlateFromOP-Light.ttf + SlateFromOP-Regular.ttf + + + + + + + + + + + + + + SamsungOne.ttf + + + + + + + + + + + + + + Comic_Sans.ttf + + + + + + + + + + + + + + NokiaPure-Regular.ttf + + + + + + + + + + + + + + Fifa_2018.ttf + + + + + + + + + + + + + + + Oswald.ttf + + + + + + + + + + + + + + Exo2.otf + + + + + + + + + + + + + + UbuntuRegular.ttf + + + + + + + + + + + + + + RobotoCondensedLight.ttf + + + + + + + + + + + + + + Storopia.ttf + + + + + + + + + + + + + + RoundedElegance.ttf + + + + + + + + + + + + + + CaviarDreams.ttf + + + + + + + + + + + + + + SanFranciscoDisplayPro.ttf + + + + + + + + + + + + + + Domkrat.ttf + + + + + + + + + + + + + + Fakedes.otf + + + + + + + + + + + + + + Honda.ttf + + + + + + + + + + + + + + Hortensia.ttf + + + + + + + + + + + + + + Minusman.ttf + + + + + + + + + + + + + + Nova.ttf + + + + + + + + + + + + + + Taurus.ttf + + + + + + + + + + + + + + Technical.ttf + + + + + + + + + + + + + + Montserrat.ttf + + + + + + + + + + + + + + GoogleSans-Regular.ttf + GoogleSans-Italic.ttf + GoogleSans-Medium.ttf + GoogleSans-MediumItalic.ttf + GoogleSans-Bold.ttf + GoogleSans-BoldItalic.ttf + + + + + + + + + + + + + + DroidSansMono.ttf @@ -271,6 +728,98 @@ + + RobotoFallback-VF.ttf + + + + + RobotoFallback-VF.ttf + + + + + RobotoFallback-VF.ttf + + + + + RobotoFallback-VF.ttf + + + + + RobotoFallback-VF.ttf + + + + + RobotoFallback-VF.ttf + + + + + RobotoFallback-VF.ttf + + + + + RobotoFallback-VF.ttf + + + + + RobotoFallback-VF.ttf + + + + + RobotoFallback-VF.ttf + + + + + RobotoFallback-VF.ttf + + + + + RobotoFallback-VF.ttf + + + + + RobotoFallback-VF.ttf + + + + + RobotoFallback-VF.ttf + + + + + RobotoFallback-VF.ttf + + + + + RobotoFallback-VF.ttf + + + + + RobotoFallback-VF.ttf + + + + + RobotoFallback-VF.ttf + + + + + NotoNaskhArabic-Regular.ttf diff --git a/data/videos/AndroidInSpace.240p.mp4 b/data/videos/AndroidInSpace.240p.mp4 deleted file mode 100644 index e1445e493c76..000000000000 Binary files a/data/videos/AndroidInSpace.240p.mp4 and /dev/null differ diff --git a/data/videos/AndroidInSpace.480p.lq.mp4 b/data/videos/AndroidInSpace.480p.lq.mp4 deleted file mode 100644 index f1db6942ebd2..000000000000 Binary files a/data/videos/AndroidInSpace.480p.lq.mp4 and /dev/null differ diff --git a/data/videos/AndroidInSpace.480p.mq.mp4 b/data/videos/AndroidInSpace.480p.mq.mp4 deleted file mode 100644 index 5f4cfb3c33b7..000000000000 Binary files a/data/videos/AndroidInSpace.480p.mq.mp4 and /dev/null differ diff --git a/data/videos/Disco.240p.mp4 b/data/videos/Disco.240p.mp4 deleted file mode 100644 index c9078b736f90..000000000000 Binary files a/data/videos/Disco.240p.mp4 and /dev/null differ diff --git a/data/videos/Disco.480p.lq.mp4 b/data/videos/Disco.480p.lq.mp4 deleted file mode 100644 index 411e0d5dacd5..000000000000 Binary files a/data/videos/Disco.480p.lq.mp4 and /dev/null differ diff --git a/data/videos/Disco.480p.mq.mp4 b/data/videos/Disco.480p.mq.mp4 deleted file mode 100644 index 3dc495764b82..000000000000 Binary files a/data/videos/Disco.480p.mq.mp4 and /dev/null differ diff --git a/data/videos/Sunset.240p.mp4 b/data/videos/Sunset.240p.mp4 deleted file mode 100644 index f5c533f0f9f5..000000000000 Binary files a/data/videos/Sunset.240p.mp4 and /dev/null differ diff --git a/data/videos/Sunset.480p.lq.mp4 b/data/videos/Sunset.480p.lq.mp4 deleted file mode 100644 index 7f9d6a1e6888..000000000000 Binary files a/data/videos/Sunset.480p.lq.mp4 and /dev/null differ diff --git a/data/videos/Sunset.480p.mq.mp4 b/data/videos/Sunset.480p.mq.mp4 deleted file mode 100644 index 7691544f019e..000000000000 Binary files a/data/videos/Sunset.480p.mq.mp4 and /dev/null differ diff --git a/data/videos/VideoPackage1.mk b/data/videos/VideoPackage1.mk deleted file mode 100644 index ee3b5ed321dc..000000000000 --- a/data/videos/VideoPackage1.mk +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (C) 2011 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Lower-quality videos for space-constrained devices - -LOCAL_PATH := frameworks/base/data/videos -TARGET_PATH := system/media/video - -#PRODUCT_COPY_FILES += \ -# $(LOCAL_PATH)/AndroidInSpace.240p.mp4:$(TARGET_PATH)/AndroidInSpace.240p.mp4 \ -# $(LOCAL_PATH)/AndroidInSpace.480p.lq.mp4:$(TARGET_PATH)/AndroidInSpace.480p.mp4 \ -# $(LOCAL_PATH)/Sunset.240p.mp4:$(TARGET_PATH)/Sunset.240p.mp4 \ -# $(LOCAL_PATH)/Sunset.480p.lq.mp4:$(TARGET_PATH)/Sunset.480p.mp4 diff --git a/data/videos/VideoPackage2.mk b/data/videos/VideoPackage2.mk deleted file mode 100644 index f799bea2c147..000000000000 --- a/data/videos/VideoPackage2.mk +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (C) 2011 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Good-quality videos for non-space-constrained devices - -LOCAL_PATH := frameworks/base/data/videos -TARGET_PATH := system/media/video - -#PRODUCT_COPY_FILES += \ -# $(LOCAL_PATH)/AndroidInSpace.240p.mp4:$(TARGET_PATH)/AndroidInSpace.240p.mp4 \ -# $(LOCAL_PATH)/AndroidInSpace.480p.mq.mp4:$(TARGET_PATH)/AndroidInSpace.480p.mp4 \ -# $(LOCAL_PATH)/Sunset.240p.mp4:$(TARGET_PATH)/Sunset.240p.mp4 \ -# $(LOCAL_PATH)/Sunset.480p.mq.mp4:$(TARGET_PATH)/Sunset.480p.mp4 diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java index 451b99ea7550..e60d506a171b 100644 --- a/graphics/java/android/graphics/Paint.java +++ b/graphics/java/android/graphics/Paint.java @@ -253,7 +253,7 @@ private static class NoImagePreloadHolder { // These flags are always set on a new/reset paint, even if flags 0 is passed. static final int HIDDEN_DEFAULT_PAINT_FLAGS = DEV_KERN_TEXT_FLAG | EMBEDDED_BITMAP_TEXT_FLAG - | FILTER_BITMAP_FLAG; + | FILTER_BITMAP_FLAG | SUBPIXEL_TEXT_FLAG; /** * Font hinter option that disables font hinting. diff --git a/graphics/java/android/graphics/Typeface.java b/graphics/java/android/graphics/Typeface.java index a2f5301e353f..722f63c4e0a0 100644 --- a/graphics/java/android/graphics/Typeface.java +++ b/graphics/java/android/graphics/Typeface.java @@ -29,6 +29,7 @@ import android.annotation.UiThread; import android.compat.annotation.UnsupportedAppUsage; import android.content.res.AssetManager; +import android.content.res.Resources; import android.graphics.fonts.Font; import android.graphics.fonts.FontFamily; import android.graphics.fonts.FontStyle; @@ -67,11 +68,13 @@ import java.io.InputStream; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; +import java.lang.reflect.Field; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; @@ -141,6 +144,8 @@ public class Typeface { private static final LruCache sDynamicTypefaceCache = new LruCache<>(16); private static final Object sDynamicCacheLock = new Object(); + // For dynamic default font styles + private static final HashMap sSystemFontOverrides = new HashMap<>(); @GuardedBy("SYSTEM_FONT_MAP_LOCK") static Typeface sDefaultTypeface; @@ -884,7 +889,7 @@ public CustomFallbackBuilder(@NonNull FontFamily family) { * @return The best matching typeface. */ public static Typeface create(String familyName, @Style int style) { - return create(getSystemDefaultTypeface(familyName), style); + return create(getSystemOverrideTypeface(familyName), style); } /** @@ -1176,6 +1181,11 @@ private Typeface(long ni) { mWeight = nativeGetWeight(ni); } + private static Typeface getSystemOverrideTypeface(@NonNull String familyName) { + Typeface tf = sSystemFontOverrides.get(familyName); + return tf == null ? getSystemDefaultTypeface(familyName) : tf; + } + private static Typeface getSystemDefaultTypeface(@NonNull String familyName) { Typeface tf = sSystemFontMap.get(familyName); return tf == null ? Typeface.DEFAULT : tf; @@ -1345,6 +1355,60 @@ public static void setSystemFontMap(@Nullable SharedMemory sharedMemory) } } + private static void setPublicDefaults(String familyName) { + synchronized (SYSTEM_FONT_MAP_LOCK) { + sDefaults = new Typeface[] { + DEFAULT, + DEFAULT_BOLD, + create(getSystemDefaultTypeface(familyName), Typeface.ITALIC), + create(getSystemDefaultTypeface(familyName), Typeface.BOLD_ITALIC), + }; + } + } + + private static void setFinalField(String fieldName, Typeface value) { + synchronized (SYSTEM_FONT_MAP_LOCK) { + try { + Field field = Typeface.class.getDeclaredField(fieldName); + // isAccessible bypasses final on ART + field.setAccessible(true); + field.set(null, value); + field.setAccessible(false); + } catch (NoSuchFieldException | IllegalAccessException e) { + Log.e(TAG, "Failed to set Typeface." + fieldName, e); + } + } + } + + /** @hide */ + public static void updateDefaultFont(Resources res) { + synchronized (SYSTEM_FONT_MAP_LOCK) { + String familyName = res.getString(com.android.internal.R.string.config_bodyFontFamily); + Typeface typeface = sSystemFontMap.get(familyName); + if (typeface == null) { + // This should never happen, but if the system font family name is invalid, just return + // instead of crashing the app. + return; + } + + setDefault(typeface); + + // Static typefaces in public API + setFinalField("DEFAULT", create(getSystemDefaultTypeface(familyName), 0)); + setFinalField("DEFAULT_BOLD", create(getSystemDefaultTypeface(familyName), Typeface.BOLD)); + setFinalField("SANS_SERIF", DEFAULT); + + // For default aliases used in framework styles + sSystemFontOverrides.put("sans-serif", typeface); + sSystemFontOverrides.put("sans-serif-thin", create(typeface, 100, false)); + sSystemFontOverrides.put("sans-serif-light", create(typeface, 300, false)); + sSystemFontOverrides.put("sans-serif-medium", create(typeface, 500, false)); + sSystemFontOverrides.put("sans-serif-black", create(typeface, 900, false)); + + setPublicDefaults(familyName); + } + } + /** @hide */ @VisibleForTesting public static void setSystemFontMap(Map systemFontMap) { @@ -1365,12 +1429,7 @@ public static void setSystemFontMap(Map systemFontMap) { nativeForceSetStaticFinalField("SERIF", create("serif", 0)); nativeForceSetStaticFinalField("MONOSPACE", create("monospace", 0)); - sDefaults = new Typeface[]{ - DEFAULT, - DEFAULT_BOLD, - create((String) null, Typeface.ITALIC), - create((String) null, Typeface.BOLD_ITALIC), - }; + setPublicDefaults(null); // A list of generic families to be registered in native. // https://www.w3.org/TR/css-fonts-4/#generic-font-families diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java index 33411e1ec5b9..ac1508298b6b 100644 --- a/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java +++ b/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java @@ -42,6 +42,7 @@ import android.util.Log; import com.android.internal.annotations.VisibleForTesting; +import com.android.internal.util.PropImitationHooks; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -164,6 +165,8 @@ private KeyEntryResponse getKeyMetadata(String alias) { @Override public Certificate[] engineGetCertificateChain(String alias) { + PropImitationHooks.onEngineGetCertificateChain(); + KeyEntryResponse response = getKeyMetadata(alias); if (response == null || response.metadata.certificate == null) { diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitController.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitController.java index 8ffe0c12f8ca..c9a0d7d99cc6 100644 --- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitController.java +++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitController.java @@ -24,9 +24,9 @@ import static androidx.window.extensions.embedding.SplitContainer.isStickyPlaceholderRule; import static androidx.window.extensions.embedding.SplitContainer.shouldFinishAssociatedContainerWhenAdjacent; import static androidx.window.extensions.embedding.SplitContainer.shouldFinishAssociatedContainerWhenStacked; -import static androidx.window.extensions.embedding.SplitPresenter.boundsSmallerThanMinDimensions; +import static androidx.window.extensions.embedding.SplitPresenter.RESULT_EXPAND_FAILED_NO_TF_INFO; import static androidx.window.extensions.embedding.SplitPresenter.getActivityIntentMinDimensionsPair; -import static androidx.window.extensions.embedding.SplitPresenter.getMinDimensions; +import static androidx.window.extensions.embedding.SplitPresenter.getNonEmbeddedActivityBounds; import static androidx.window.extensions.embedding.SplitPresenter.shouldShowSideBySide; import android.app.Activity; @@ -581,8 +581,9 @@ private boolean isNewActivityInSplitWithRuleMatched(@NonNull Activity launchedAc } /** Finds the activity below the given activity. */ + @VisibleForTesting @Nullable - private Activity findActivityBelow(@NonNull Activity activity) { + Activity findActivityBelow(@NonNull Activity activity) { Activity activityBelow = null; final TaskFragmentContainer container = getContainerWithActivity(activity); if (container != null) { @@ -620,21 +621,21 @@ && canReuseContainer(splitRule, splitContainer.getSplitRule())) { // Can launch in the existing secondary container if the rules share the same // presentation. final TaskFragmentContainer secondaryContainer = splitContainer.getSecondaryContainer(); - if (secondaryContainer == getContainerWithActivity(secondaryActivity) - && !boundsSmallerThanMinDimensions(secondaryContainer.getLastRequestedBounds(), - getMinDimensions(secondaryActivity))) { + if (secondaryContainer == getContainerWithActivity(secondaryActivity)) { // The activity is already in the target TaskFragment. return true; } secondaryContainer.addPendingAppearedActivity(secondaryActivity); final WindowContainerTransaction wct = new WindowContainerTransaction(); - mPresenter.expandSplitContainerIfNeeded(wct, splitContainer, primaryActivity, - secondaryActivity, null /* secondaryIntent */); - wct.reparentActivityToTaskFragment( - secondaryContainer.getTaskFragmentToken(), - secondaryActivity.getActivityToken()); - mPresenter.applyTransaction(wct); - return true; + if (mPresenter.expandSplitContainerIfNeeded(wct, splitContainer, primaryActivity, + secondaryActivity, null /* secondaryIntent */) + != RESULT_EXPAND_FAILED_NO_TF_INFO) { + wct.reparentActivityToTaskFragment( + secondaryContainer.getTaskFragmentToken(), + secondaryActivity.getActivityToken()); + mPresenter.applyTransaction(wct); + return true; + } } // Create new split pair. mPresenter.createNewSplitContainer(primaryActivity, secondaryActivity, splitRule); @@ -805,9 +806,9 @@ private TaskFragmentContainer getSecondaryContainerForSplitIfAny( if (splitContainer != null && existingContainer == splitContainer.getPrimaryContainer() && (canReuseContainer(splitRule, splitContainer.getSplitRule()) // TODO(b/231845476) we should always respect clearTop. - || !respectClearTop)) { - mPresenter.expandSplitContainerIfNeeded(wct, splitContainer, primaryActivity, - null /* secondaryActivity */, intent); + || !respectClearTop) + && mPresenter.expandSplitContainerIfNeeded(wct, splitContainer, primaryActivity, + null /* secondaryActivity */, intent) != RESULT_EXPAND_FAILED_NO_TF_INFO) { // Can launch in the existing secondary container if the rules share the same // presentation. return splitContainer.getSecondaryContainer(); @@ -877,7 +878,7 @@ TaskFragmentContainer newContainer(@Nullable Activity pendingAppearedActivity, pendingAppearedIntent, taskContainer, this); if (!taskContainer.isTaskBoundsInitialized()) { // Get the initial bounds before the TaskFragment has appeared. - final Rect taskBounds = SplitPresenter.getTaskBoundsFromActivity(activityInTask); + final Rect taskBounds = getNonEmbeddedActivityBounds(activityInTask); if (!taskContainer.setTaskBounds(taskBounds)) { Log.w(TAG, "Can't find bounds from activity=" + activityInTask); } diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitPresenter.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitPresenter.java index 63be98ebe175..a89847a30d20 100644 --- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitPresenter.java +++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitPresenter.java @@ -65,6 +65,41 @@ class SplitPresenter extends JetpackTaskFragmentOrganizer { }) private @interface Position {} + /** + * Result of {@link #expandSplitContainerIfNeeded(WindowContainerTransaction, SplitContainer, + * Activity, Activity, Intent)}. + * No need to expand the splitContainer because screen is big enough to + * {@link #shouldShowSideBySide(Rect, SplitRule, Pair)} and minimum dimensions is satisfied. + */ + static final int RESULT_NOT_EXPANDED = 0; + /** + * Result of {@link #expandSplitContainerIfNeeded(WindowContainerTransaction, SplitContainer, + * Activity, Activity, Intent)}. + * The splitContainer should be expanded. It is usually because minimum dimensions is not + * satisfied. + * @see #shouldShowSideBySide(Rect, SplitRule, Pair) + */ + static final int RESULT_EXPANDED = 1; + /** + * Result of {@link #expandSplitContainerIfNeeded(WindowContainerTransaction, SplitContainer, + * Activity, Activity, Intent)}. + * The splitContainer should be expanded, but the client side hasn't received + * {@link android.window.TaskFragmentInfo} yet. Fallback to create new expanded SplitContainer + * instead. + */ + static final int RESULT_EXPAND_FAILED_NO_TF_INFO = 2; + + /** + * Result of {@link #expandSplitContainerIfNeeded(WindowContainerTransaction, SplitContainer, + * Activity, Activity, Intent)} + */ + @IntDef(value = { + RESULT_NOT_EXPANDED, + RESULT_EXPANDED, + RESULT_EXPAND_FAILED_NO_TF_INFO, + }) + private @interface ResultCode {} + private final SplitController mController; SplitPresenter(@NonNull Executor executor, SplitController controller) { @@ -399,15 +434,19 @@ void updateWindowingMode(@NonNull WindowContainerTransaction wct, /** * Expands the split container if the current split bounds are smaller than the Activity or * Intent that is added to the container. + * + * @return the {@link ResultCode} based on {@link #shouldShowSideBySide(Rect, SplitRule, Pair)} + * and if {@link android.window.TaskFragmentInfo} has reported to the client side. */ - void expandSplitContainerIfNeeded(@NonNull WindowContainerTransaction wct, + @ResultCode + int expandSplitContainerIfNeeded(@NonNull WindowContainerTransaction wct, @NonNull SplitContainer splitContainer, @NonNull Activity primaryActivity, @Nullable Activity secondaryActivity, @Nullable Intent secondaryIntent) { if (secondaryActivity == null && secondaryIntent == null) { throw new IllegalArgumentException("Either secondaryActivity or secondaryIntent must be" + " non-null."); } - final Rect taskBounds = getTaskBoundsFromActivity(primaryActivity); + final Rect taskBounds = getParentContainerBounds(primaryActivity); final Pair minDimensionsPair; if (secondaryActivity != null) { minDimensionsPair = getActivitiesMinDimensionsPair(primaryActivity, secondaryActivity); @@ -417,11 +456,17 @@ void expandSplitContainerIfNeeded(@NonNull WindowContainerTransaction wct, } // Expand the splitContainer if minimum dimensions are not satisfied. if (!shouldShowSideBySide(taskBounds, splitContainer.getSplitRule(), minDimensionsPair)) { - expandTaskFragment(wct, splitContainer.getPrimaryContainer() - .getTaskFragmentToken()); - expandTaskFragment(wct, splitContainer.getSecondaryContainer() - .getTaskFragmentToken()); + // If the client side hasn't received TaskFragmentInfo yet, we can't change TaskFragment + // bounds. Return failure to create a new SplitContainer which fills task bounds. + if (splitContainer.getPrimaryContainer().getInfo() == null + || splitContainer.getSecondaryContainer().getInfo() == null) { + return RESULT_EXPAND_FAILED_NO_TF_INFO; + } + expandTaskFragment(wct, splitContainer.getPrimaryContainer().getTaskFragmentToken()); + expandTaskFragment(wct, splitContainer.getSecondaryContainer().getTaskFragmentToken()); + return RESULT_EXPANDED; } + return RESULT_NOT_EXPANDED; } static boolean shouldShowSideBySide(@NonNull Rect parentBounds, @NonNull SplitRule rule) { @@ -593,11 +638,19 @@ Rect getParentContainerBounds(@NonNull Activity activity) { if (container != null) { return getParentContainerBounds(container); } - return getTaskBoundsFromActivity(activity); + // Obtain bounds from Activity instead because the Activity hasn't been embedded yet. + return getNonEmbeddedActivityBounds(activity); } + /** + * Obtains the bounds from a non-embedded Activity. + *

+ * Note that callers should use {@link #getParentContainerBounds(Activity)} instead for most + * cases unless we want to obtain task bounds before + * {@link TaskContainer#isTaskBoundsInitialized()}. + */ @NonNull - static Rect getTaskBoundsFromActivity(@NonNull Activity activity) { + static Rect getNonEmbeddedActivityBounds(@NonNull Activity activity) { final WindowConfiguration windowConfiguration = activity.getResources().getConfiguration().windowConfiguration; if (!activity.isInMultiWindowMode()) { diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationRunner.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationRunner.java index 1ac33173668b..c4f37091a491 100644 --- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationRunner.java +++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationRunner.java @@ -83,9 +83,9 @@ public void onAnimationStart(@WindowManager.TransitionOldType int transit, } @Override - public void onAnimationCancelled() { + public void onAnimationCancelled(boolean isKeyguardOccluded) { if (TaskFragmentAnimationController.DEBUG) { - Log.v(TAG, "onAnimationCancelled"); + Log.v(TAG, "onAnimationCancelled: isKeyguardOccluded=" + isKeyguardOccluded); } mHandler.post(this::cancelAnimation); } diff --git a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/EmbeddingTestUtils.java b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/EmbeddingTestUtils.java index 3ef328141907..effc1a3ef3ea 100644 --- a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/EmbeddingTestUtils.java +++ b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/EmbeddingTestUtils.java @@ -58,13 +58,21 @@ static Rect getSplitBounds(boolean isPrimary) { /** Creates a rule to always split the given activity and the given intent. */ static SplitRule createSplitRule(@NonNull Activity primaryActivity, @NonNull Intent secondaryIntent) { + return createSplitRule(primaryActivity, secondaryIntent, true /* clearTop */); + } + + /** Creates a rule to always split the given activity and the given intent. */ + static SplitRule createSplitRule(@NonNull Activity primaryActivity, + @NonNull Intent secondaryIntent, boolean clearTop) { final Pair targetPair = new Pair<>(primaryActivity, secondaryIntent); return new SplitPairRule.Builder( activityPair -> false, targetPair::equals, w -> true) .setSplitRatio(SPLIT_RATIO) - .setShouldClearTop(true) + .setShouldClearTop(clearTop) + .setFinishPrimaryWithSecondary(DEFAULT_FINISH_PRIMARY_WITH_SECONDARY) + .setFinishSecondaryWithPrimary(DEFAULT_FINISH_SECONDARY_WITH_PRIMARY) .build(); } @@ -76,6 +84,14 @@ static SplitRule createSplitRule(@NonNull Activity primaryActivity, true /* clearTop */); } + /** Creates a rule to always split the given activities. */ + static SplitRule createSplitRule(@NonNull Activity primaryActivity, + @NonNull Activity secondaryActivity, boolean clearTop) { + return createSplitRule(primaryActivity, secondaryActivity, + DEFAULT_FINISH_PRIMARY_WITH_SECONDARY, DEFAULT_FINISH_SECONDARY_WITH_PRIMARY, + clearTop); + } + /** Creates a rule to always split the given activities with the given finish behaviors. */ static SplitRule createSplitRule(@NonNull Activity primaryActivity, @NonNull Activity secondaryActivity, int finishPrimaryWithSecondary, diff --git a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitControllerTest.java b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitControllerTest.java index 982ab8043bbc..ad496a906a33 100644 --- a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitControllerTest.java +++ b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitControllerTest.java @@ -35,6 +35,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertThrows; @@ -436,6 +437,50 @@ public void testResolveStartActivityIntent_shouldLaunchInFullscreen() { assertTrue(container.areLastRequestedBoundsEqual(null)); } + @Test + public void testResolveStartActivityIntent_shouldExpandSplitContainer() { + final Intent intent = new Intent().setComponent( + new ComponentName(ApplicationProvider.getApplicationContext(), + MinimumDimensionActivity.class)); + setupSplitRule(mActivity, intent, false /* clearTop */); + final Activity secondaryActivity = createMockActivity(); + addSplitTaskFragments(mActivity, secondaryActivity, false /* clearTop */); + + final TaskFragmentContainer container = mSplitController.resolveStartActivityIntent( + mTransaction, TASK_ID, intent, mActivity); + final TaskFragmentContainer primaryContainer = mSplitController.getContainerWithActivity( + mActivity); + + assertNotNull(mSplitController.getActiveSplitForContainers(primaryContainer, container)); + assertTrue(primaryContainer.areLastRequestedBoundsEqual(null)); + assertTrue(container.areLastRequestedBoundsEqual(null)); + assertEquals(container, mSplitController.getContainerWithActivity(secondaryActivity)); + } + + @Test + public void testResolveStartActivityIntent_noInfo_shouldCreateSplitContainer() { + final Intent intent = new Intent().setComponent( + new ComponentName(ApplicationProvider.getApplicationContext(), + MinimumDimensionActivity.class)); + setupSplitRule(mActivity, intent, false /* clearTop */); + final Activity secondaryActivity = createMockActivity(); + addSplitTaskFragments(mActivity, secondaryActivity, false /* clearTop */); + + final TaskFragmentContainer secondaryContainer = mSplitController + .getContainerWithActivity(secondaryActivity); + secondaryContainer.mInfo = null; + + final TaskFragmentContainer container = mSplitController.resolveStartActivityIntent( + mTransaction, TASK_ID, intent, mActivity); + final TaskFragmentContainer primaryContainer = mSplitController.getContainerWithActivity( + mActivity); + + assertNotNull(mSplitController.getActiveSplitForContainers(primaryContainer, container)); + assertTrue(primaryContainer.areLastRequestedBoundsEqual(null)); + assertTrue(container.areLastRequestedBoundsEqual(null)); + assertNotEquals(container, secondaryContainer); + } + @Test public void testPlaceActivityInTopContainer() { mSplitController.placeActivityInTopContainer(mActivity); @@ -807,17 +852,12 @@ public void testResolveActivityToContainer_secondaryActivityMinDimensionsNotSati final Activity activityBelow = createMockActivity(); setupSplitRule(activityBelow, mActivity); - ActivityInfo aInfo = new ActivityInfo(); - final Rect secondaryBounds = getSplitBounds(false /* isPrimary */); - aInfo.windowLayout = new ActivityInfo.WindowLayout(0, 0, 0, 0, 0, - secondaryBounds.width() + 1, secondaryBounds.height() + 1); - doReturn(aInfo).when(mActivity).getActivityInfo(); + doReturn(createActivityInfoWithMinDimensions()).when(mActivity).getActivityInfo(); final TaskFragmentContainer container = mSplitController.newContainer(activityBelow, TASK_ID); container.addPendingAppearedActivity(mActivity); - // Allow to split as primary. boolean result = mSplitController.resolveActivityToContainer(mActivity, false /* isOnReparent */); @@ -825,6 +865,27 @@ public void testResolveActivityToContainer_secondaryActivityMinDimensionsNotSati assertSplitPair(activityBelow, mActivity, true /* matchParentBounds */); } + @Test + public void testResolveActivityToContainer_minDimensions_shouldExpandSplitContainer() { + final Activity primaryActivity = createMockActivity(); + final Activity secondaryActivity = createMockActivity(); + addSplitTaskFragments(primaryActivity, secondaryActivity, false /* clearTop */); + + setupSplitRule(primaryActivity, mActivity, false /* clearTop */); + doReturn(createActivityInfoWithMinDimensions()).when(mActivity).getActivityInfo(); + doReturn(secondaryActivity).when(mSplitController).findActivityBelow(eq(mActivity)); + + clearInvocations(mSplitPresenter); + boolean result = mSplitController.resolveActivityToContainer(mActivity, + false /* isOnReparent */); + + assertTrue(result); + assertSplitPair(primaryActivity, mActivity, true /* matchParentBounds */); + assertEquals(mSplitController.getContainerWithActivity(secondaryActivity), + mSplitController.getContainerWithActivity(mActivity)); + verify(mSplitPresenter, never()).createNewSplitContainer(any(), any(), any()); + } + @Test public void testResolveActivityToContainer_inUnknownTaskFragment() { doReturn(new Binder()).when(mSplitController).getInitialTaskFragmentToken(mActivity); @@ -941,23 +1002,41 @@ private void setupPlaceholderRule(@NonNull Activity primaryActivity) { /** Setups a rule to always split the given activities. */ private void setupSplitRule(@NonNull Activity primaryActivity, @NonNull Intent secondaryIntent) { - final SplitRule splitRule = createSplitRule(primaryActivity, secondaryIntent); + setupSplitRule(primaryActivity, secondaryIntent, true /* clearTop */); + } + + /** Setups a rule to always split the given activities. */ + private void setupSplitRule(@NonNull Activity primaryActivity, + @NonNull Intent secondaryIntent, boolean clearTop) { + final SplitRule splitRule = createSplitRule(primaryActivity, secondaryIntent, clearTop); mSplitController.setEmbeddingRules(Collections.singleton(splitRule)); } /** Setups a rule to always split the given activities. */ private void setupSplitRule(@NonNull Activity primaryActivity, @NonNull Activity secondaryActivity) { - final SplitRule splitRule = createSplitRule(primaryActivity, secondaryActivity); + setupSplitRule(primaryActivity, secondaryActivity, true /* clearTop */); + } + + /** Setups a rule to always split the given activities. */ + private void setupSplitRule(@NonNull Activity primaryActivity, + @NonNull Activity secondaryActivity, boolean clearTop) { + final SplitRule splitRule = createSplitRule(primaryActivity, secondaryActivity, clearTop); mSplitController.setEmbeddingRules(Collections.singleton(splitRule)); } /** Adds a pair of TaskFragments as split for the given activities. */ private void addSplitTaskFragments(@NonNull Activity primaryActivity, @NonNull Activity secondaryActivity) { + addSplitTaskFragments(primaryActivity, secondaryActivity, true /* clearTop */); + } + + /** Adds a pair of TaskFragments as split for the given activities. */ + private void addSplitTaskFragments(@NonNull Activity primaryActivity, + @NonNull Activity secondaryActivity, boolean clearTop) { registerSplitPair(createMockTaskFragmentContainer(primaryActivity), createMockTaskFragmentContainer(secondaryActivity), - createSplitRule(primaryActivity, secondaryActivity)); + createSplitRule(primaryActivity, secondaryActivity, clearTop)); } /** Registers the two given TaskFragments as split pair. */ @@ -1008,16 +1087,18 @@ private void assertSplitPair(@NonNull TaskFragmentContainer primaryContainer, if (primaryContainer.mInfo != null) { final Rect primaryBounds = matchParentBounds ? new Rect() : getSplitBounds(true /* isPrimary */); + final int windowingMode = matchParentBounds ? WINDOWING_MODE_UNDEFINED + : WINDOWING_MODE_MULTI_WINDOW; assertTrue(primaryContainer.areLastRequestedBoundsEqual(primaryBounds)); - assertTrue(primaryContainer.isLastRequestedWindowingModeEqual( - WINDOWING_MODE_MULTI_WINDOW)); + assertTrue(primaryContainer.isLastRequestedWindowingModeEqual(windowingMode)); } if (secondaryContainer.mInfo != null) { final Rect secondaryBounds = matchParentBounds ? new Rect() : getSplitBounds(false /* isPrimary */); + final int windowingMode = matchParentBounds ? WINDOWING_MODE_UNDEFINED + : WINDOWING_MODE_MULTI_WINDOW; assertTrue(secondaryContainer.areLastRequestedBoundsEqual(secondaryBounds)); - assertTrue(secondaryContainer.isLastRequestedWindowingModeEqual( - WINDOWING_MODE_MULTI_WINDOW)); + assertTrue(secondaryContainer.isLastRequestedWindowingModeEqual(windowingMode)); } } } diff --git a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitPresenterTest.java b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitPresenterTest.java index 029503cd70d2..d79319666c01 100644 --- a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitPresenterTest.java +++ b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitPresenterTest.java @@ -21,11 +21,15 @@ import static androidx.window.extensions.embedding.EmbeddingTestUtils.TASK_BOUNDS; import static androidx.window.extensions.embedding.EmbeddingTestUtils.TASK_ID; import static androidx.window.extensions.embedding.EmbeddingTestUtils.createActivityInfoWithMinDimensions; +import static androidx.window.extensions.embedding.EmbeddingTestUtils.createMockTaskFragmentInfo; import static androidx.window.extensions.embedding.EmbeddingTestUtils.createSplitRule; import static androidx.window.extensions.embedding.EmbeddingTestUtils.getSplitBounds; import static androidx.window.extensions.embedding.SplitPresenter.POSITION_END; import static androidx.window.extensions.embedding.SplitPresenter.POSITION_FILL; import static androidx.window.extensions.embedding.SplitPresenter.POSITION_START; +import static androidx.window.extensions.embedding.SplitPresenter.RESULT_EXPANDED; +import static androidx.window.extensions.embedding.SplitPresenter.RESULT_EXPAND_FAILED_NO_TF_INFO; +import static androidx.window.extensions.embedding.SplitPresenter.RESULT_NOT_EXPANDED; import static androidx.window.extensions.embedding.SplitPresenter.getBoundsForPosition; import static androidx.window.extensions.embedding.SplitPresenter.getMinDimensions; import static androidx.window.extensions.embedding.SplitPresenter.shouldShowSideBySide; @@ -51,6 +55,7 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.Rect; +import android.os.IBinder; import android.platform.test.annotations.Presubmit; import android.util.Pair; import android.util.Size; @@ -212,26 +217,31 @@ public void testExpandSplitContainerIfNeeded() { mPresenter.expandSplitContainerIfNeeded(mTransaction, splitContainer, mActivity, null /* secondaryActivity */, null /* secondaryIntent */)); - mPresenter.expandSplitContainerIfNeeded(mTransaction, splitContainer, mActivity, - secondaryActivity, null /* secondaryIntent */); - + assertEquals(RESULT_NOT_EXPANDED, mPresenter.expandSplitContainerIfNeeded(mTransaction, + splitContainer, mActivity, secondaryActivity, null /* secondaryIntent */)); verify(mPresenter, never()).expandTaskFragment(any(), any()); doReturn(createActivityInfoWithMinDimensions()).when(secondaryActivity).getActivityInfo(); + assertEquals(RESULT_EXPAND_FAILED_NO_TF_INFO, mPresenter.expandSplitContainerIfNeeded( + mTransaction, splitContainer, mActivity, secondaryActivity, + null /* secondaryIntent */)); - mPresenter.expandSplitContainerIfNeeded(mTransaction, splitContainer, mActivity, - secondaryActivity, null /* secondaryIntent */); + primaryTf.setInfo(createMockTaskFragmentInfo(primaryTf, mActivity)); + secondaryTf.setInfo(createMockTaskFragmentInfo(secondaryTf, secondaryActivity)); + assertEquals(RESULT_EXPANDED, mPresenter.expandSplitContainerIfNeeded(mTransaction, + splitContainer, mActivity, secondaryActivity, null /* secondaryIntent */)); verify(mPresenter).expandTaskFragment(eq(mTransaction), eq(primaryTf.getTaskFragmentToken())); verify(mPresenter).expandTaskFragment(eq(mTransaction), eq(secondaryTf.getTaskFragmentToken())); clearInvocations(mPresenter); - mPresenter.expandSplitContainerIfNeeded(mTransaction, splitContainer, mActivity, - null /* secondaryActivity */, new Intent(ApplicationProvider - .getApplicationContext(), MinimumDimensionActivity.class)); + assertEquals(RESULT_EXPANDED, mPresenter.expandSplitContainerIfNeeded(mTransaction, + splitContainer, mActivity, null /* secondaryActivity */, + new Intent(ApplicationProvider.getApplicationContext(), + MinimumDimensionActivity.class))); verify(mPresenter).expandTaskFragment(eq(mTransaction), eq(primaryTf.getTaskFragmentToken())); verify(mPresenter).expandTaskFragment(eq(mTransaction), @@ -246,6 +256,7 @@ private Activity createMockActivity() { doReturn(mActivityResources).when(activity).getResources(); doReturn(activityConfig).when(mActivityResources).getConfiguration(); doReturn(new ActivityInfo()).when(activity).getActivityInfo(); + doReturn(mock(IBinder.class)).when(activity).getActivityToken(); return activity; } } diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java index 41e23647a6a4..30f316efb2b3 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java @@ -456,10 +456,10 @@ public void onAnimationFinished() throws RemoteException { } @Override - public void onAnimationCancelled() { + public void onAnimationCancelled(boolean isKeyguardOccluded) { onRemoteAnimationFinishedOrCancelled(evictWct); try { - adapter.getRunner().onAnimationCancelled(); + adapter.getRunner().onAnimationCancelled(isKeyguardOccluded); } catch (RemoteException e) { Slog.e(TAG, "Error starting remote animation", e); } diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/stagesplit/StageCoordinator.java b/libs/WindowManager/Shell/src/com/android/wm/shell/stagesplit/StageCoordinator.java index ac25c7510931..de0feeecad4b 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/stagesplit/StageCoordinator.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/stagesplit/StageCoordinator.java @@ -345,9 +345,9 @@ public void onAnimationStart(@WindowManager.TransitionOldType int transit, } @Override - public void onAnimationCancelled() { + public void onAnimationCancelled(boolean isKeyguardOccluded) { try { - adapter.getRunner().onAnimationCancelled(); + adapter.getRunner().onAnimationCancelled(isKeyguardOccluded); } catch (RemoteException e) { Slog.e(TAG, "Error starting remote animation", e); } diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/LegacyTransitions.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/LegacyTransitions.java index 61e11e877b90..61e92f355dc2 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/LegacyTransitions.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/LegacyTransitions.java @@ -107,7 +107,7 @@ public void onAnimationStart(int transit, RemoteAnimationTarget[] apps, } @Override - public void onAnimationCancelled() throws RemoteException { + public void onAnimationCancelled(boolean isKeyguardOccluded) throws RemoteException { mCancelled = true; mApps = mWallpapers = mNonApps = null; checkApply(); diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp index 5e8a623d4205..5825fe88a5c9 100644 --- a/libs/androidfw/ResourceTypes.cpp +++ b/libs/androidfw/ResourceTypes.cpp @@ -4387,7 +4387,7 @@ bool ResTable::getResourceName(uint32_t resID, bool allowUtf8, resource_name* ou if (p < 0) { if (Res_GETPACKAGE(resID)+1 == 0) { - ALOGW("No package identifier when getting name for resource number 0x%08x", resID); + ALOGV("No package identifier when getting name for resource number 0x%08x", resID); } else { #ifndef STATIC_ANDROIDFW_FOR_TOOLS ALOGW("No known package when getting name for resource number 0x%08x", resID); diff --git a/libs/hwui/Readback.cpp b/libs/hwui/Readback.cpp index 4cce87ad1a2f..a3ba88e4ee8a 100644 --- a/libs/hwui/Readback.cpp +++ b/libs/hwui/Readback.cpp @@ -90,11 +90,36 @@ CopyResult Readback::copySurfaceInto(ANativeWindow* window, const Rect& inSrcRec SkRect srcRect = inSrcRect.toSkRect(); - SkRect imageSrcRect = - SkRect::MakeLTRB(cropRect.left, cropRect.top, cropRect.right, cropRect.bottom); - if (imageSrcRect.isEmpty()) { - imageSrcRect = SkRect::MakeIWH(description.width, description.height); + SkRect imageSrcRect = SkRect::MakeIWH(description.width, description.height); + SkISize imageWH = SkISize::Make(description.width, description.height); + if (cropRect.left < cropRect.right && cropRect.top < cropRect.bottom) { + imageSrcRect = + SkRect::MakeLTRB(cropRect.left, cropRect.top, cropRect.right, cropRect.bottom); + imageWH = SkISize::Make(cropRect.right - cropRect.left, cropRect.bottom - cropRect.top); + + // Chroma channels of YUV420 images are subsampled we may need to shrink the crop region by + // a whole texel on each side. Since skia still adds its own 0.5 inset, we apply an + // additional 0.5 inset. See GLConsumer::computeTransformMatrix for details. + float shrinkAmount = 0.0f; + switch (description.format) { + // Use HAL formats since some AHB formats are only available in vndk + case HAL_PIXEL_FORMAT_YCBCR_420_888: + case HAL_PIXEL_FORMAT_YV12: + case HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED: + shrinkAmount = 0.5f; + break; + default: + break; + } + + // Shrink the crop if it has more than 1-px and differs from the buffer size. + if (imageWH.width() > 1 && imageWH.width() < (int32_t)description.width) + imageSrcRect = imageSrcRect.makeInset(shrinkAmount, 0); + + if (imageWH.height() > 1 && imageWH.height() < (int32_t)description.height) + imageSrcRect = imageSrcRect.makeInset(0, shrinkAmount); } + ALOGV("imageSrcRect = " RECT_STRING, SK_RECT_ARGS(imageSrcRect)); // Represents the "logical" width/height of the texture. That is, the dimensions of the buffer @@ -153,7 +178,7 @@ CopyResult Readback::copySurfaceInto(ANativeWindow* window, const Rect& inSrcRec */ SkMatrix m; - const SkRect imageDstRect = SkRect::MakeIWH(imageSrcRect.width(), imageSrcRect.height()); + const SkRect imageDstRect = SkRect::Make(imageWH); const float px = imageDstRect.centerX(); const float py = imageDstRect.centerY(); if (windowTransform & NATIVE_WINDOW_TRANSFORM_FLIP_H) { diff --git a/libs/hwui/SkiaCanvas.cpp b/libs/hwui/SkiaCanvas.cpp index 53c6db0cdf3a..f9b3a8c12b2e 100644 --- a/libs/hwui/SkiaCanvas.cpp +++ b/libs/hwui/SkiaCanvas.cpp @@ -51,6 +51,49 @@ namespace android { using uirenderer::PaintUtils; +class SkiaCanvas::Clip { +public: + Clip(const SkRect& rect, SkClipOp op, const SkMatrix& m) + : mType(Type::Rect), mOp(op), mMatrix(m), mRRect(SkRRect::MakeRect(rect)) {} + Clip(const SkRRect& rrect, SkClipOp op, const SkMatrix& m) + : mType(Type::RRect), mOp(op), mMatrix(m), mRRect(rrect) {} + Clip(const SkPath& path, SkClipOp op, const SkMatrix& m) + : mType(Type::Path), mOp(op), mMatrix(m), mPath(std::in_place, path) {} + + void apply(SkCanvas* canvas) const { + canvas->setMatrix(mMatrix); + switch (mType) { + case Type::Rect: + // Don't anti-alias rectangular clips + canvas->clipRect(mRRect.rect(), mOp, false); + break; + case Type::RRect: + // Ensure rounded rectangular clips are anti-aliased + canvas->clipRRect(mRRect, mOp, true); + break; + case Type::Path: + // Ensure path clips are anti-aliased + canvas->clipPath(mPath.value(), mOp, true); + break; + } + } + +private: + enum class Type { + Rect, + RRect, + Path, + }; + + Type mType; + SkClipOp mOp; + SkMatrix mMatrix; + + // These are logically a union (tracked separately due to non-POD path). + std::optional mPath; + SkRRect mRRect; +}; + Canvas* Canvas::create_canvas(const SkBitmap& bitmap) { return new SkiaCanvas(bitmap); } @@ -194,49 +237,6 @@ void SkiaCanvas::restoreUnclippedLayer(int restoreCount, const Paint& paint) { } } -class SkiaCanvas::Clip { -public: - Clip(const SkRect& rect, SkClipOp op, const SkMatrix& m) - : mType(Type::Rect), mOp(op), mMatrix(m), mRRect(SkRRect::MakeRect(rect)) {} - Clip(const SkRRect& rrect, SkClipOp op, const SkMatrix& m) - : mType(Type::RRect), mOp(op), mMatrix(m), mRRect(rrect) {} - Clip(const SkPath& path, SkClipOp op, const SkMatrix& m) - : mType(Type::Path), mOp(op), mMatrix(m), mPath(std::in_place, path) {} - - void apply(SkCanvas* canvas) const { - canvas->setMatrix(mMatrix); - switch (mType) { - case Type::Rect: - // Don't anti-alias rectangular clips - canvas->clipRect(mRRect.rect(), mOp, false); - break; - case Type::RRect: - // Ensure rounded rectangular clips are anti-aliased - canvas->clipRRect(mRRect, mOp, true); - break; - case Type::Path: - // Ensure path clips are anti-aliased - canvas->clipPath(mPath.value(), mOp, true); - break; - } - } - -private: - enum class Type { - Rect, - RRect, - Path, - }; - - Type mType; - SkClipOp mOp; - SkMatrix mMatrix; - - // These are logically a union (tracked separately due to non-POD path). - std::optional mPath; - SkRRect mRRect; -}; - const SkiaCanvas::SaveRec* SkiaCanvas::currentSaveRec() const { const SaveRec* rec = mSaveStack ? static_cast(mSaveStack->back()) : nullptr; int currentSaveCount = mCanvas->getSaveCount(); diff --git a/libs/hwui/renderthread/DrawFrameTask.cpp b/libs/hwui/renderthread/DrawFrameTask.cpp index 59c914f0198c..03f02de98efe 100644 --- a/libs/hwui/renderthread/DrawFrameTask.cpp +++ b/libs/hwui/renderthread/DrawFrameTask.cpp @@ -243,7 +243,9 @@ bool DrawFrameTask::syncFrameState(TreeInfo& info) { mContext->unpinImages(); for (size_t i = 0; i < mLayers.size(); i++) { - mLayers[i]->apply(); + if (mLayers[i]) { + mLayers[i]->apply(); + } } mLayers.clear(); mContext->setContentDrawBounds(mContentDrawBounds); diff --git a/libs/hwui/thread/WorkQueue.h b/libs/hwui/thread/WorkQueue.h index 46b8bc07b432..f2751d2a6cc7 100644 --- a/libs/hwui/thread/WorkQueue.h +++ b/libs/hwui/thread/WorkQueue.h @@ -57,7 +57,7 @@ class WorkQueue { public: WorkQueue(std::function&& wakeFunc, std::mutex& lock) - : mWakeFunc(move(wakeFunc)), mLock(lock) {} + : mWakeFunc(std::move(wakeFunc)), mLock(lock) {} void process() { auto now = clock::now(); diff --git a/location/java/android/location/SatellitePvt.java b/location/java/android/location/SatellitePvt.java index f3e15084d730..2031929514f3 100644 --- a/location/java/android/location/SatellitePvt.java +++ b/location/java/android/location/SatellitePvt.java @@ -539,7 +539,7 @@ public int getIssueOfDataClock() { * *

This field is valid if {@link #hasIssueOfDataEphemeris()} is true. */ - @IntRange(from = 0, to = 255) + @IntRange(from = 0, to = 1023) public int getIssueOfDataEphemeris() { return mIssueOfDataEphemeris; } @@ -847,8 +847,8 @@ public Builder setIssueOfDataClock(@IntRange(from = 0, to = 1023) int issueOfDat */ @NonNull public Builder setIssueOfDataEphemeris( - @IntRange(from = 0, to = 255) int issueOfDataEphemeris) { - Preconditions.checkArgumentInRange(issueOfDataEphemeris, 0, 255, + @IntRange(from = 0, to = 1023) int issueOfDataEphemeris) { + Preconditions.checkArgumentInRange(issueOfDataEphemeris, 0, 1023, "issueOfDataEphemeris"); mIssueOfDataEphemeris = issueOfDataEphemeris; mFlags = (byte) (mFlags | HAS_ISSUE_OF_DATA_EPHEMERIS); diff --git a/location/java/com/android/internal/location/GpsNetInitiatedHandler.java b/location/java/com/android/internal/location/GpsNetInitiatedHandler.java index 190e1cc083bd..fe0ff50b800b 100644 --- a/location/java/com/android/internal/location/GpsNetInitiatedHandler.java +++ b/location/java/com/android/internal/location/GpsNetInitiatedHandler.java @@ -51,7 +51,7 @@ public class GpsNetInitiatedHandler { private static final String TAG = "GpsNetInitiatedHandler"; - private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG); + private static final boolean DEBUG = false; // string constants for defining data fields in NI Intent public static final String NI_INTENT_KEY_NOTIF_ID = "notif_id"; diff --git a/media/java/android/media/AudioAttributes.java b/media/java/android/media/AudioAttributes.java index ded9597b68ef..5ead6af42c6e 100644 --- a/media/java/android/media/AudioAttributes.java +++ b/media/java/android/media/AudioAttributes.java @@ -712,12 +712,6 @@ public boolean isContentSpatialized() { */ @CapturePolicy public int getAllowedCapturePolicy() { - if ((mFlags & FLAG_NO_SYSTEM_CAPTURE) == FLAG_NO_SYSTEM_CAPTURE) { - return ALLOW_CAPTURE_BY_NONE; - } - if ((mFlags & FLAG_NO_MEDIA_PROJECTION) == FLAG_NO_MEDIA_PROJECTION) { - return ALLOW_CAPTURE_BY_SYSTEM; - } return ALLOW_CAPTURE_BY_ALL; } @@ -1766,20 +1760,7 @@ private static int toVolumeStreamType(boolean fromGetVolumeControlStream, AudioA * @hide */ public static int capturePolicyToFlags(@CapturePolicy int capturePolicy, int flags) { - switch (capturePolicy) { - case ALLOW_CAPTURE_BY_NONE: - flags |= FLAG_NO_MEDIA_PROJECTION | FLAG_NO_SYSTEM_CAPTURE; - break; - case ALLOW_CAPTURE_BY_SYSTEM: - flags |= FLAG_NO_MEDIA_PROJECTION; - flags &= ~FLAG_NO_SYSTEM_CAPTURE; - break; - case ALLOW_CAPTURE_BY_ALL: - flags &= ~FLAG_NO_SYSTEM_CAPTURE & ~FLAG_NO_MEDIA_PROJECTION; - break; - default: - throw new IllegalArgumentException("Unknown allow playback capture policy"); - } + flags &= ~FLAG_NO_SYSTEM_CAPTURE & ~FLAG_NO_MEDIA_PROJECTION; return flags; } diff --git a/media/java/android/media/MediaPlayer.java b/media/java/android/media/MediaPlayer.java index 10772754bd6c..fd4b7123dee5 100644 --- a/media/java/android/media/MediaPlayer.java +++ b/media/java/android/media/MediaPlayer.java @@ -1081,7 +1081,8 @@ public void setDataSource(@NonNull Context context, @NonNull Uri uri, // Try cached ringtone first since the actual provider may not be // encryption aware, or it may be stored on CE media storage final int type = RingtoneManager.getDefaultType(uri); - final Uri cacheUri = RingtoneManager.getCacheForType(type, context.getUserId()); + final Uri cacheUri = RingtoneManager.getCacheForType(context, type, + context.getUserId()); final Uri actualUri = RingtoneManager.getActualDefaultRingtoneUri(context, type); if (attemptDataSource(resolver, cacheUri)) { return; diff --git a/media/java/android/media/Ringtone.java b/media/java/android/media/Ringtone.java index 86a94a9e0662..8b40e74a4099 100644 --- a/media/java/android/media/Ringtone.java +++ b/media/java/android/media/Ringtone.java @@ -48,7 +48,7 @@ */ public class Ringtone { private static final String TAG = "Ringtone"; - private static final boolean LOGD = true; + private static final boolean LOGD = false; private static final String[] MEDIA_COLUMNS = new String[] { MediaStore.Audio.Media._ID, diff --git a/media/java/android/media/RingtoneManager.java b/media/java/android/media/RingtoneManager.java index 27727699d05c..614dba53abf3 100644 --- a/media/java/android/media/RingtoneManager.java +++ b/media/java/android/media/RingtoneManager.java @@ -50,6 +50,11 @@ import android.provider.MediaStore.MediaColumns; import android.provider.Settings; import android.provider.Settings.System; +import android.telecom.PhoneAccount; +import android.telecom.PhoneAccountHandle; +import android.telecom.TelecomManager; +import android.telephony.SubscriptionManager; +import android.telephony.TelephonyManager; import android.util.Log; import com.android.internal.database.SortCursor; @@ -265,6 +270,9 @@ public class RingtoneManager { private boolean mIncludeParentRingtones; + private static final String EMERGENCY_PHONE_ACCOUNT_HANDLE_ID = "E"; + private static final String RINGTONE_DELIMITER_FOR_PHONE_ACCOUNT_HANDLE = "_"; + /** * Constructs a RingtoneManager. This constructor is recommended as its * constructed instance manages cursor(s). @@ -752,7 +760,7 @@ private static Ringtone getRingtone( * Gets the current default sound's {@link Uri}. This will give the actual * sound {@link Uri}, instead of using this, most clients can use * {@link System#DEFAULT_RINGTONE_URI}. - * + * * @param context A context used for querying. * @param type The type whose default sound should be returned. One of * {@link #TYPE_RINGTONE}, {@link #TYPE_NOTIFICATION}, or @@ -761,10 +769,35 @@ private static Ringtone getRingtone( * @see #setActualDefaultRingtoneUri(Context, int, Uri) */ public static Uri getActualDefaultRingtoneUri(Context context, int type) { - String setting = getSettingForType(type); + return getActualDefaultRingtoneUriForPhoneAccountHandle(context, type, null); + } + + /** + * Gets the current default sound's {@link Uri} by {@link PhoneAccountHandle}. + * This will give the actual sound {@link Uri}, instead of using this, most clients can use + * {@link System#DEFAULT_RINGTONE_URI}. + * + * @param context A context used for querying. + * @param type The type whose default sound should be returned. One of + * {@link #TYPE_RINGTONE}, {@link #TYPE_NOTIFICATION}, or + * {@link #TYPE_ALARM}. + * @param phoneAccountHandle The {@link PhoneAccountHandle} whose default sound should be + * returned. + * @return A {@link Uri} pointing to the default sound for the sound type. + * @see #setActualDefaultRingtoneUriForPhoneAccountHandle(Context, int, Uri, PhoneAccountHandle) + */ + public static @NonNull Uri getActualDefaultRingtoneUriForPhoneAccountHandle(@NonNull Context context, int type, + @NonNull PhoneAccountHandle phoneAccountHandle) { + String setting = getSettingForTypeForPhoneAccountHandle(type, phoneAccountHandle); if (setting == null) return null; - final String uriString = Settings.System.getStringForUser(context.getContentResolver(), + String uriString = Settings.System.getStringForUser(context.getContentResolver(), setting, context.getUserId()); + // For TYPE_RINGTONE, if the uriString for targeted PhoneAccountHandle is null, try to + // use the default ringtone which is saved in Settings.System.RINGTONE. + if (uriString == null && type == TYPE_RINGTONE) { + uriString = Settings.System.getStringForUser(context.getContentResolver(), + Settings.System.RINGTONE, context.getUserId()); + } Uri ringtoneUri = uriString != null ? Uri.parse(uriString) : null; // If this doesn't verify, the user id must be kept in the uri to ensure it resolves in the @@ -776,10 +809,10 @@ public static Uri getActualDefaultRingtoneUri(Context context, int type) { return ringtoneUri; } - + /** * Sets the {@link Uri} of the default sound for a given sound type. - * + * * @param context A context used for querying. * @param type The type whose default sound should be set. One of * {@link #TYPE_RINGTONE}, {@link #TYPE_NOTIFICATION}, or @@ -788,7 +821,25 @@ public static Uri getActualDefaultRingtoneUri(Context context, int type) { * @see #getActualDefaultRingtoneUri(Context, int) */ public static void setActualDefaultRingtoneUri(Context context, int type, Uri ringtoneUri) { - String setting = getSettingForType(type); + // Change the default ringtone which is saved in Settings.System.RINGTONE. + setActualDefaultRingtoneUriForPhoneAccountHandle(context, type, ringtoneUri, null); + } + + /** + * Sets the {@link Uri} of the default sound by {@link PhoneAccountHandle} for a given + * sound type. + * + * @param context A context used for querying. + * @param type The type whose default sound should be set. One of + * {@link #TYPE_RINGTONE}, {@link #TYPE_NOTIFICATION}, or + * {@link #TYPE_ALARM}. + * @param ringtoneUri A {@link Uri} pointing to the default sound to set. + * @param phoneAccountHandle The {@link PhoneAccountHandle} whose default sound should be set. + * @see #getActualDefaultRingtoneUriForPhoneAccountHandle(Context, int, PhoneAccountHandle) + */ + public static void setActualDefaultRingtoneUriForPhoneAccountHandle(@NonNull Context context, int type, + @NonNull Uri ringtoneUri, @NonNull PhoneAccountHandle phoneAccountHandle) { + String setting = getSettingForTypeForPhoneAccountHandle(type, phoneAccountHandle); if (setting == null) return; final ContentResolver resolver = context.getContentResolver(); @@ -801,7 +852,8 @@ public static void setActualDefaultRingtoneUri(Context context, int type, Uri ri // Stream selected ringtone into cache so it's available for playback // when CE storage is still locked if (ringtoneUri != null) { - final Uri cacheUri = getCacheForType(type, context.getUserId()); + final Uri cacheUri = getCacheForTypeForPhoneAccountHandle(type, context.getUserId(), + phoneAccountHandle); try (InputStream in = openRingtone(context, ringtoneUri); OutputStream out = resolver.openOutputStream(cacheUri)) { FileUtils.copy(in, out); @@ -811,6 +863,29 @@ public static void setActualDefaultRingtoneUri(Context context, int type, Uri ri } } + private static PhoneAccountHandle getDefaultPhoneAccountHandle(Context context) { + TelecomManager tm = (TelecomManager) context.getSystemService(Context.TELECOM_SERVICE); + PhoneAccountHandle defaultPhoneAccountHandle = tm.getUserSelectedOutgoingPhoneAccount(); + PhoneAccount defaultPhoneAccount = tm.getPhoneAccount(defaultPhoneAccountHandle); + if (defaultPhoneAccountHandle == null + || !defaultPhoneAccount.hasCapabilities(PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION)) { + List subscriptionAccountHandles = new ArrayList<>(); + List accountHandles = tm.getCallCapablePhoneAccounts(true); + for (PhoneAccountHandle accountHandle : accountHandles) { + PhoneAccount phoneAccount = tm.getPhoneAccount(accountHandle); + // Emergency phone account also has CAPABILITY_SIM_SUBSCRIPTION, so should + // exclude it. + if (phoneAccount.hasCapabilities(PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION) + && !EMERGENCY_PHONE_ACCOUNT_HANDLE_ID.equals(accountHandle.getId())) { + subscriptionAccountHandles.add(accountHandle); + } + } + defaultPhoneAccountHandle = subscriptionAccountHandles.size() > 0 + ? subscriptionAccountHandles.get(0) : null; + } + return defaultPhoneAccountHandle; + } + private static boolean isInternalRingtoneUri(Uri uri) { return isRingtoneUriInStorage(uri, MediaStore.Audio.Media.INTERNAL_CONTENT_URI); } @@ -926,9 +1001,13 @@ private static InputStream openRingtone(Context context, Uri uri) throws IOExcep } } - private static String getSettingForType(int type) { + private static String getSettingForTypeForPhoneAccountHandle(int type, + PhoneAccountHandle phoneAccountHandle) { if ((type & TYPE_RINGTONE) != 0) { - return Settings.System.RINGTONE; + return phoneAccountHandle == null + ? Settings.System.RINGTONE + : Settings.System.RINGTONE + RINGTONE_DELIMITER_FOR_PHONE_ACCOUNT_HANDLE + + phoneAccountHandle.getId(); } else if ((type & TYPE_NOTIFICATION) != 0) { return Settings.System.NOTIFICATION_SOUND; } else if ((type & TYPE_ALARM) != 0) { @@ -939,14 +1018,26 @@ private static String getSettingForType(int type) { } /** {@hide} */ - public static Uri getCacheForType(int type) { - return getCacheForType(type, UserHandle.getCallingUserId()); + public static Uri getCacheForType(Context context, int type) { + return getCacheForTypeForPhoneAccountHandle(type, UserHandle.getCallingUserId(), + getDefaultPhoneAccountHandle(context)); } /** {@hide} */ - public static Uri getCacheForType(int type, int userId) { + public static Uri getCacheForType(Context context, int type, int userId) { + return getCacheForTypeForPhoneAccountHandle(type, userId, + getDefaultPhoneAccountHandle(context)); + } + + private static Uri getCacheForTypeForPhoneAccountHandle(int type, int userId, + PhoneAccountHandle phoneAccountHandle) { if ((type & TYPE_RINGTONE) != 0) { - return ContentProvider.maybeAddUserId(Settings.System.RINGTONE_CACHE_URI, userId); + Uri ringtoneUri = phoneAccountHandle == null + ? Settings.System.RINGTONE_CACHE_URI + : Settings.System.getUriFor(Settings.System.RINGTONE_CACHE + + RINGTONE_DELIMITER_FOR_PHONE_ACCOUNT_HANDLE + + phoneAccountHandle.getId()); + return ContentProvider.maybeAddUserId(ringtoneUri, userId); } else if ((type & TYPE_NOTIFICATION) != 0) { return ContentProvider.maybeAddUserId(Settings.System.NOTIFICATION_SOUND_CACHE_URI, userId); @@ -1026,7 +1117,7 @@ public static Uri getDefaultUri(int type) { // Try cached ringtone first since the actual provider may not be // encryption aware, or it may be stored on CE media storage final int type = getDefaultType(uri); - final Uri cacheUri = getCacheForType(type, context.getUserId()); + final Uri cacheUri = getCacheForType(context, type, context.getUserId()); final Uri actualUri = getActualDefaultRingtoneUri(context, type); final ContentResolver resolver = context.getContentResolver(); diff --git a/media/java/android/mtp/MtpDatabase.java b/media/java/android/mtp/MtpDatabase.java index 20d711cf4c54..b53d80b6ba2b 100755 --- a/media/java/android/mtp/MtpDatabase.java +++ b/media/java/android/mtp/MtpDatabase.java @@ -275,10 +275,12 @@ public void onReceive(Context context, Intent intent) { int newLevel = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, 0); if (newLevel != mBatteryLevel) { mBatteryLevel = newLevel; - if (mServer != null) { - // send device property changed event - mServer.sendDevicePropertyChanged( - MtpConstants.DEVICE_PROPERTY_BATTERY_LEVEL); + synchronized(MtpDatabase.this){ + if (mServer != null) { + // send device property changed event + mServer.sendDevicePropertyChanged( + MtpConstants.DEVICE_PROPERTY_BATTERY_LEVEL); + } } } } @@ -315,7 +317,7 @@ public void sendObjectInfoChanged(int id) { mCloseGuard.open("close"); } - public void setServer(MtpServer server) { + public synchronized void setServer(MtpServer server) { mServer = server; // always unregister before registering try { diff --git a/media/mca/filterfw/java/android/filterfw/geometry/Point.java b/media/mca/filterfw/java/android/filterfw/geometry/Point.java index 96d2d7b08b74..c38d776594d3 100644 --- a/media/mca/filterfw/java/android/filterfw/geometry/Point.java +++ b/media/mca/filterfw/java/android/filterfw/geometry/Point.java @@ -101,9 +101,9 @@ public Point rotated90(int count) { } public Point rotated(float radians) { - // TODO(renn): Optimize: Keep cache of cos/sin values - return new Point((float)(Math.cos(radians) * x - Math.sin(radians) * y), - (float)(Math.sin(radians) * x + Math.cos(radians) * y)); + double cos = Math.cos(radians); + double sin = Math.sin(radians); + return new Point((float)(cos * x - sin * y), (float)(sin * x + cos * y)); } public Point rotatedAround(Point center, float radians) { diff --git a/media/tests/contents/media_api/HEVC_320_AAC_128.mp4 b/media/tests/contents/media_api/HEVC_320_AAC_128.mp4 deleted file mode 100644 index e3e3ef0148a1..000000000000 Binary files a/media/tests/contents/media_api/HEVC_320_AAC_128.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/goldenThumbnail.png b/media/tests/contents/media_api/goldenThumbnail.png deleted file mode 100644 index 3bb6ed245dc7..000000000000 Binary files a/media/tests/contents/media_api/goldenThumbnail.png and /dev/null differ diff --git a/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17.mp3 b/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17.mp3 deleted file mode 100644 index e0d6a1799b3b..000000000000 Binary files a/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17.mp3 and /dev/null differ diff --git a/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17_ABR.mp3 b/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17_ABR.mp3 deleted file mode 100644 index 12f719328600..000000000000 Binary files a/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17_ABR.mp3 and /dev/null differ diff --git a/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17_CBR.mp3 b/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17_CBR.mp3 deleted file mode 100644 index 12f719328600..000000000000 Binary files a/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17_CBR.mp3 and /dev/null differ diff --git a/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V1.mp3 b/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V1.mp3 deleted file mode 100644 index 29d332b7ba13..000000000000 Binary files a/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V1.mp3 and /dev/null differ diff --git a/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V1_ID3V2.mp3 b/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V1_ID3V2.mp3 deleted file mode 100644 index ea5263827df8..000000000000 Binary files a/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V1_ID3V2.mp3 and /dev/null differ diff --git a/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V2.mp3 b/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V2.mp3 deleted file mode 100644 index 024039c82d8c..000000000000 Binary files a/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V2.mp3 and /dev/null differ diff --git a/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17_VBR.mp3 b/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17_VBR.mp3 deleted file mode 100644 index 12f719328600..000000000000 Binary files a/media/tests/contents/media_api/music/MP3_48KHz_128kbps_s_1_17_VBR.mp3 and /dev/null differ diff --git a/media/tests/contents/media_api/music/SHORTMP3.mp3 b/media/tests/contents/media_api/music/SHORTMP3.mp3 deleted file mode 100644 index 8b51b5d9f932..000000000000 Binary files a/media/tests/contents/media_api/music/SHORTMP3.mp3 and /dev/null differ diff --git a/media/tests/contents/media_api/music/ants.mid b/media/tests/contents/media_api/music/ants.mid deleted file mode 100644 index d4ead5314181..000000000000 Binary files a/media/tests/contents/media_api/music/ants.mid and /dev/null differ diff --git a/media/tests/contents/media_api/music/bzk_chic.wav b/media/tests/contents/media_api/music/bzk_chic.wav deleted file mode 100644 index bab1a6b4bfb5..000000000000 Binary files a/media/tests/contents/media_api/music/bzk_chic.wav and /dev/null differ diff --git a/media/tests/contents/media_api/music/sine_200+1000Hz_44K_mo.wav b/media/tests/contents/media_api/music/sine_200+1000Hz_44K_mo.wav deleted file mode 100644 index 24c2a0d4b2f4..000000000000 Binary files a/media/tests/contents/media_api/music/sine_200+1000Hz_44K_mo.wav and /dev/null differ diff --git a/media/tests/contents/media_api/music/test_amr_ietf.amr b/media/tests/contents/media_api/music/test_amr_ietf.amr deleted file mode 100644 index 540794cf573c..000000000000 Binary files a/media/tests/contents/media_api/music/test_amr_ietf.amr and /dev/null differ diff --git a/media/tests/contents/media_api/video/H263_500_AMRNB_12.3gp b/media/tests/contents/media_api/video/H263_500_AMRNB_12.3gp deleted file mode 100644 index 46bb2b1511de..000000000000 Binary files a/media/tests/contents/media_api/video/H263_500_AMRNB_12.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/video/H263_56_AAC_24.3gp b/media/tests/contents/media_api/video/H263_56_AAC_24.3gp deleted file mode 100644 index 1fb11925fee8..000000000000 Binary files a/media/tests/contents/media_api/video/H263_56_AAC_24.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/video/H263_56_AMRNB_6.3gp b/media/tests/contents/media_api/video/H263_56_AMRNB_6.3gp deleted file mode 100644 index b6eb6a18982f..000000000000 Binary files a/media/tests/contents/media_api/video/H263_56_AMRNB_6.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/video/H264_320_AAC_64.3gp b/media/tests/contents/media_api/video/H264_320_AAC_64.3gp deleted file mode 100644 index 04680ce3c2be..000000000000 Binary files a/media/tests/contents/media_api/video/H264_320_AAC_64.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/video/H264_320_AMRNB_6.3gp b/media/tests/contents/media_api/video/H264_320_AMRNB_6.3gp deleted file mode 100644 index bc533a221958..000000000000 Binary files a/media/tests/contents/media_api/video/H264_320_AMRNB_6.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/video/H264_500_AAC_128.3gp b/media/tests/contents/media_api/video/H264_500_AAC_128.3gp deleted file mode 100644 index 05d67eaeed92..000000000000 Binary files a/media/tests/contents/media_api/video/H264_500_AAC_128.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/video/H264_HVGA_500_NO_AUDIO.3gp b/media/tests/contents/media_api/video/H264_HVGA_500_NO_AUDIO.3gp deleted file mode 100644 index 13642b25ef1e..000000000000 Binary files a/media/tests/contents/media_api/video/H264_HVGA_500_NO_AUDIO.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/video/H264_QVGA_500_NO_AUDIO.3gp b/media/tests/contents/media_api/video/H264_QVGA_500_NO_AUDIO.3gp deleted file mode 100644 index 13642b25ef1e..000000000000 Binary files a/media/tests/contents/media_api/video/H264_QVGA_500_NO_AUDIO.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/video/MPEG2_1500_AAC_128.mp4 b/media/tests/contents/media_api/video/MPEG2_1500_AAC_128.mp4 deleted file mode 100644 index 33f66a087603..000000000000 Binary files a/media/tests/contents/media_api/video/MPEG2_1500_AAC_128.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/video/MPEG4_320_AAC_64.mp4 b/media/tests/contents/media_api/video/MPEG4_320_AAC_64.mp4 deleted file mode 100644 index 90f185606d0f..000000000000 Binary files a/media/tests/contents/media_api/video/MPEG4_320_AAC_64.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/video/big-buck-bunny_trailer.webm b/media/tests/contents/media_api/video/big-buck-bunny_trailer.webm deleted file mode 100644 index 6a17395f67d3..000000000000 Binary files a/media/tests/contents/media_api/video/big-buck-bunny_trailer.webm and /dev/null differ diff --git a/media/tests/contents/media_api/video/border_large.3gp b/media/tests/contents/media_api/video/border_large.3gp deleted file mode 100644 index e6221604bda4..000000000000 Binary files a/media/tests/contents/media_api/video/border_large.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/AACLC_44.1kHz_256kbps_s_1_17.mp4 b/media/tests/contents/media_api/videoeditor/AACLC_44.1kHz_256kbps_s_1_17.mp4 deleted file mode 100644 index 32d422129b74..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/AACLC_44.1kHz_256kbps_s_1_17.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/AACLC_48KHz_256Kbps_s_1_17.3gp b/media/tests/contents/media_api/videoeditor/AACLC_48KHz_256Kbps_s_1_17.3gp deleted file mode 100644 index f911cd3874cc..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/AACLC_48KHz_256Kbps_s_1_17.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/AMRNB_8KHz_12.2Kbps_m_1_17.3gp b/media/tests/contents/media_api/videoeditor/AMRNB_8KHz_12.2Kbps_m_1_17.3gp deleted file mode 100644 index f6fccef06867..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/AMRNB_8KHz_12.2Kbps_m_1_17.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_10fps_256kbps_0_25.3gp b/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_10fps_256kbps_0_25.3gp deleted file mode 100644 index 593166b2f301..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_10fps_256kbps_0_25.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_10fps_256kbps_1_17.3gp b/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_10fps_256kbps_1_17.3gp deleted file mode 100644 index 0138d8043ca2..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_10fps_256kbps_1_17.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_10fps_96kbps_0_25.3gp b/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_10fps_96kbps_0_25.3gp deleted file mode 100644 index 08d97d543e80..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_10fps_96kbps_0_25.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_15fps_128kbps_1_35.3gp b/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_15fps_128kbps_1_35.3gp deleted file mode 100644 index b73be034dc90..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_15fps_128kbps_1_35.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_15fps_256kbps_AACLC_16kHz_32kbps_m_0_26.3gp b/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_15fps_256kbps_AACLC_16kHz_32kbps_m_0_26.3gp deleted file mode 100644 index 4bcb3b59d728..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_15fps_256kbps_AACLC_16kHz_32kbps_m_0_26.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_15fps_256kbps_AACLC_32kHz_128kbps_s_0_26.3gp b/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_15fps_256kbps_AACLC_32kHz_128kbps_s_0_26.3gp deleted file mode 100644 index 0629f386570f..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_15fps_256kbps_AACLC_32kHz_128kbps_s_0_26.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_15fps_256kbps_AACLC_32kHz_128kbps_s_1_17.3gp b/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_15fps_256kbps_AACLC_32kHz_128kbps_s_1_17.3gp deleted file mode 100644 index c5cd1296bc0a..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H263_profile0_176x144_15fps_256kbps_AACLC_32kHz_128kbps_s_1_17.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H264_BP_1080x720_30fps_12Mbps_AACLC_44.1khz_64kbps_s_1_17.mp4 b/media/tests/contents/media_api/videoeditor/H264_BP_1080x720_30fps_12Mbps_AACLC_44.1khz_64kbps_s_1_17.mp4 deleted file mode 100644 index 8486f5515b7d..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H264_BP_1080x720_30fps_12Mbps_AACLC_44.1khz_64kbps_s_1_17.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H264_BP_1080x720_30fps_800kbps_1_17.mp4 b/media/tests/contents/media_api/videoeditor/H264_BP_1080x720_30fps_800kbps_1_17.mp4 deleted file mode 100644 index 217305537f5a..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H264_BP_1080x720_30fps_800kbps_1_17.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H264_BP_1280x1080_30fps_1200Kbps_1_10.mp4 b/media/tests/contents/media_api/videoeditor/H264_BP_1280x1080_30fps_1200Kbps_1_10.mp4 deleted file mode 100644 index 27eab58f6d41..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H264_BP_1280x1080_30fps_1200Kbps_1_10.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H264_BP_1280x720_15fps_512kbps_AACLC_16khz_48kbps_s_1_17.mp4 b/media/tests/contents/media_api/videoeditor/H264_BP_1280x720_15fps_512kbps_AACLC_16khz_48kbps_s_1_17.mp4 deleted file mode 100644 index 457dd96eaa7f..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H264_BP_1280x720_15fps_512kbps_AACLC_16khz_48kbps_s_1_17.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H264_BP_176x144_15fps_144kbps_AMRNB_8kHz_12.2kbps_m_1_17.3gp b/media/tests/contents/media_api/videoeditor/H264_BP_176x144_15fps_144kbps_AMRNB_8kHz_12.2kbps_m_1_17.3gp deleted file mode 100644 index dae2062df477..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H264_BP_176x144_15fps_144kbps_AMRNB_8kHz_12.2kbps_m_1_17.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H264_BP_1920x1080_30fps_1200Kbps_1_10.mp4 b/media/tests/contents/media_api/videoeditor/H264_BP_1920x1080_30fps_1200Kbps_1_10.mp4 deleted file mode 100644 index c66ccedced56..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H264_BP_1920x1080_30fps_1200Kbps_1_10.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H264_BP_640x480_12.5fps_256kbps_AACLC_16khz_24kbps_s_0_26.mp4 b/media/tests/contents/media_api/videoeditor/H264_BP_640x480_12.5fps_256kbps_AACLC_16khz_24kbps_s_0_26.mp4 deleted file mode 100644 index e026fa27607d..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H264_BP_640x480_12.5fps_256kbps_AACLC_16khz_24kbps_s_0_26.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H264_BP_640x480_15fps_1200Kbps_AACLC_48KHz_32kbps_m_1_17.3gp b/media/tests/contents/media_api/videoeditor/H264_BP_640x480_15fps_1200Kbps_AACLC_48KHz_32kbps_m_1_17.3gp deleted file mode 100644 index f9e7306c1b97..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H264_BP_640x480_15fps_1200Kbps_AACLC_48KHz_32kbps_m_1_17.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H264_BP_640x480_15fps_1200Kbps_AACLC_48KHz_64kps_m_0_27.3gp b/media/tests/contents/media_api/videoeditor/H264_BP_640x480_15fps_1200Kbps_AACLC_48KHz_64kps_m_0_27.3gp deleted file mode 100644 index f9e7306c1b97..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H264_BP_640x480_15fps_1200Kbps_AACLC_48KHz_64kps_m_0_27.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H264_BP_640x480_15fps_384kbps_60_0.mp4 b/media/tests/contents/media_api/videoeditor/H264_BP_640x480_15fps_384kbps_60_0.mp4 deleted file mode 100644 index 05224ea07fca..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H264_BP_640x480_15fps_384kbps_60_0.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H264_BP_640x480_30fps_192kbps_1_5.mp4 b/media/tests/contents/media_api/videoeditor/H264_BP_640x480_30fps_192kbps_1_5.mp4 deleted file mode 100644 index 6ac0480bb46f..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H264_BP_640x480_30fps_192kbps_1_5.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H264_BP_640x480_30fps_256kbps_1_17.mp4 b/media/tests/contents/media_api/videoeditor/H264_BP_640x480_30fps_256kbps_1_17.mp4 deleted file mode 100644 index d589bfbfe7d4..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H264_BP_640x480_30fps_256kbps_1_17.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H264_BP_720x480_25fps_256kbps_AMRNB_8khz_12.2kbps_m_0_26.mp4 b/media/tests/contents/media_api/videoeditor/H264_BP_720x480_25fps_256kbps_AMRNB_8khz_12.2kbps_m_0_26.mp4 deleted file mode 100644 index 6bfbe8bdd62b..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H264_BP_720x480_25fps_256kbps_AMRNB_8khz_12.2kbps_m_0_26.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H264_BP_800x480_15fps_512kbps_1_17.mp4 b/media/tests/contents/media_api/videoeditor/H264_BP_800x480_15fps_512kbps_1_17.mp4 deleted file mode 100644 index 4998ccc986a5..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H264_BP_800x480_15fps_512kbps_1_17.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H264_BP_800x480_15fps_512kbps_AACLC_24KHz_38Kbps_s_1_17.mp4 b/media/tests/contents/media_api/videoeditor/H264_BP_800x480_15fps_512kbps_AACLC_24KHz_38Kbps_s_1_17.mp4 deleted file mode 100644 index 6809e7f61c46..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H264_BP_800x480_15fps_512kbps_AACLC_24KHz_38Kbps_s_1_17.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H264_BP_800x480_15fps_512kbps_AMRNB_8KHz_12.2Kbps_m_0_26.mp4 b/media/tests/contents/media_api/videoeditor/H264_BP_800x480_15fps_512kbps_AMRNB_8KHz_12.2Kbps_m_0_26.mp4 deleted file mode 100644 index 74ae62a06345..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H264_BP_800x480_15fps_512kbps_AMRNB_8KHz_12.2Kbps_m_0_26.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H264_BP_960x720_25fps_800kbps_AACLC_48Khz_192Kbps_s_1_17.mp4 b/media/tests/contents/media_api/videoeditor/H264_BP_960x720_25fps_800kbps_AACLC_48Khz_192Kbps_s_1_17.mp4 deleted file mode 100644 index be050dc2a006..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H264_BP_960x720_25fps_800kbps_AACLC_48Khz_192Kbps_s_1_17.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/H264_MP_960x720_25fps_800kbps_AACLC_48Khz_192Kbps_s_1_17.mp4 b/media/tests/contents/media_api/videoeditor/H264_MP_960x720_25fps_800kbps_AACLC_48Khz_192Kbps_s_1_17.mp4 deleted file mode 100644 index 178431d4dac6..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/H264_MP_960x720_25fps_800kbps_AACLC_48Khz_192Kbps_s_1_17.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/IMG_1600x1200.jpg b/media/tests/contents/media_api/videoeditor/IMG_1600x1200.jpg deleted file mode 100644 index b09cb147ad94..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/IMG_1600x1200.jpg and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/IMG_176x144.jpg b/media/tests/contents/media_api/videoeditor/IMG_176x144.jpg deleted file mode 100644 index 97a7ba5c32f7..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/IMG_176x144.jpg and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/IMG_176x144_Overlay1.png b/media/tests/contents/media_api/videoeditor/IMG_176x144_Overlay1.png deleted file mode 100644 index 147a92521278..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/IMG_176x144_Overlay1.png and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/IMG_176x144_Overlay2.png b/media/tests/contents/media_api/videoeditor/IMG_176x144_Overlay2.png deleted file mode 100644 index ba206262f5ea..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/IMG_176x144_Overlay2.png and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/IMG_320x240.jpg b/media/tests/contents/media_api/videoeditor/IMG_320x240.jpg deleted file mode 100644 index ec5b5bf96ee1..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/IMG_320x240.jpg and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/IMG_640x480.gif b/media/tests/contents/media_api/videoeditor/IMG_640x480.gif deleted file mode 100644 index 19548df8fc77..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/IMG_640x480.gif and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/IMG_640x480.jpg b/media/tests/contents/media_api/videoeditor/IMG_640x480.jpg deleted file mode 100644 index c6a96b1e4701..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/IMG_640x480.jpg and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/IMG_640x480.png b/media/tests/contents/media_api/videoeditor/IMG_640x480.png deleted file mode 100644 index ba206262f5ea..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/IMG_640x480.png and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/IMG_640x480_Overlay1.png b/media/tests/contents/media_api/videoeditor/IMG_640x480_Overlay1.png deleted file mode 100644 index ba206262f5ea..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/IMG_640x480_Overlay1.png and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/IMG_640x480_Overlay2.png b/media/tests/contents/media_api/videoeditor/IMG_640x480_Overlay2.png deleted file mode 100644 index 0f32131a632e..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/IMG_640x480_Overlay2.png and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/MP3_48KHz_128kbps_s_1_17.mp3 b/media/tests/contents/media_api/videoeditor/MP3_48KHz_128kbps_s_1_17.mp3 deleted file mode 100644 index e0d6a1799b3b..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/MP3_48KHz_128kbps_s_1_17.mp3 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/MPEG2_640x480_30fps_192kbps_1_5.mp4 b/media/tests/contents/media_api/videoeditor/MPEG2_640x480_30fps_192kbps_1_5.mp4 deleted file mode 100644 index 22a92b2f8d48..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/MPEG2_640x480_30fps_192kbps_1_5.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/MPEG4_SP_176x144_12fps_92kbps_AMRNB_8KHz_12.2kbps_m_0_27.3gp b/media/tests/contents/media_api/videoeditor/MPEG4_SP_176x144_12fps_92kbps_AMRNB_8KHz_12.2kbps_m_0_27.3gp deleted file mode 100644 index a73c4821fb46..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/MPEG4_SP_176x144_12fps_92kbps_AMRNB_8KHz_12.2kbps_m_0_27.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/MPEG4_SP_176x144_30fps_256kbps_AACLC_44.1kHz_96kbps_s_1_17.3gp b/media/tests/contents/media_api/videoeditor/MPEG4_SP_176x144_30fps_256kbps_AACLC_44.1kHz_96kbps_s_1_17.3gp deleted file mode 100644 index 333b88039a7d..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/MPEG4_SP_176x144_30fps_256kbps_AACLC_44.1kHz_96kbps_s_1_17.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/MPEG4_SP_640x480_15fps_1200kbps_AACLC_48khz_64kbps_m_1_17.3gp b/media/tests/contents/media_api/videoeditor/MPEG4_SP_640x480_15fps_1200kbps_AACLC_48khz_64kbps_m_1_17.3gp deleted file mode 100644 index 75a0036368bf..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/MPEG4_SP_640x480_15fps_1200kbps_AACLC_48khz_64kbps_m_1_17.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/MPEG4_SP_640x480_15fps_1200kbps_AACLC_48khz_64kbps_m_1_17.mp4 b/media/tests/contents/media_api/videoeditor/MPEG4_SP_640x480_15fps_1200kbps_AACLC_48khz_64kbps_m_1_17.mp4 deleted file mode 100644 index 75a0036368bf..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/MPEG4_SP_640x480_15fps_1200kbps_AACLC_48khz_64kbps_m_1_17.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/MPEG4_SP_640x480_15fps_256kbps_0_30.mp4 b/media/tests/contents/media_api/videoeditor/MPEG4_SP_640x480_15fps_256kbps_0_30.mp4 deleted file mode 100644 index be15e907d5ab..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/MPEG4_SP_640x480_15fps_256kbps_0_30.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/MPEG4_SP_640x480_15fps_512kbps_AACLC_48khz_132kbps_s_0_26.mp4 b/media/tests/contents/media_api/videoeditor/MPEG4_SP_640x480_15fps_512kbps_AACLC_48khz_132kbps_s_0_26.mp4 deleted file mode 100644 index d165d685cb6b..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/MPEG4_SP_640x480_15fps_512kbps_AACLC_48khz_132kbps_s_0_26.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/MPEG4_SP_640x480_30fps_512Kbps_0_23.3gp b/media/tests/contents/media_api/videoeditor/MPEG4_SP_640x480_30fps_512Kbps_0_23.3gp deleted file mode 100644 index c12f2c86097a..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/MPEG4_SP_640x480_30fps_512Kbps_0_23.3gp and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/MPEG4_SP_640x480_30fps_512Kbps_0_27.mp4 b/media/tests/contents/media_api/videoeditor/MPEG4_SP_640x480_30fps_512Kbps_0_27.mp4 deleted file mode 100644 index 13ad5dbc5141..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/MPEG4_SP_640x480_30fps_512Kbps_0_27.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/MPEG4_SP_720x480_30fps_280kbps_AACLC_48kHz_161kbps_s_0_26.mp4 b/media/tests/contents/media_api/videoeditor/MPEG4_SP_720x480_30fps_280kbps_AACLC_48kHz_161kbps_s_0_26.mp4 deleted file mode 100644 index 8b72c8437d3c..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/MPEG4_SP_720x480_30fps_280kbps_AACLC_48kHz_161kbps_s_0_26.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/MPEG4_SP_720x480_30fps_280kbps_AACLC_48kHz_96kbps_s_0_21.mp4 b/media/tests/contents/media_api/videoeditor/MPEG4_SP_720x480_30fps_280kbps_AACLC_48kHz_96kbps_s_0_21.mp4 deleted file mode 100644 index 8752fc563640..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/MPEG4_SP_720x480_30fps_280kbps_AACLC_48kHz_96kbps_s_0_21.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/MPEG4_SP_800x480_515kbps_15fps_AMR_NB_8KHz_12.2kbps_m_0_26.mp4 b/media/tests/contents/media_api/videoeditor/MPEG4_SP_800x480_515kbps_15fps_AMR_NB_8KHz_12.2kbps_m_0_26.mp4 deleted file mode 100644 index 829af3504286..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/MPEG4_SP_800x480_515kbps_15fps_AMR_NB_8KHz_12.2kbps_m_0_26.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/MPEG4_SP_854x480_15fps_256kbps_AACLC_16khz_48kbps_s_0_26.mp4 b/media/tests/contents/media_api/videoeditor/MPEG4_SP_854x480_15fps_256kbps_AACLC_16khz_48kbps_s_0_26.mp4 deleted file mode 100644 index 8b60f433beb3..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/MPEG4_SP_854x480_15fps_256kbps_AACLC_16khz_48kbps_s_0_26.mp4 and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/Text_FileRenamedTo3gp.3gp b/media/tests/contents/media_api/videoeditor/Text_FileRenamedTo3gp.3gp deleted file mode 100644 index 02103c6d36e7..000000000000 --- a/media/tests/contents/media_api/videoeditor/Text_FileRenamedTo3gp.3gp +++ /dev/null @@ -1 +0,0 @@ -This is a text file \ No newline at end of file diff --git a/media/tests/contents/media_api/videoeditor/TransitionSpiral_QVGA.jpg b/media/tests/contents/media_api/videoeditor/TransitionSpiral_QVGA.jpg deleted file mode 100644 index 0863df9eb547..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/TransitionSpiral_QVGA.jpg and /dev/null differ diff --git a/media/tests/contents/media_api/videoeditor/corrupted_H264_BP_640x480_12.5fps_256kbps_AACLC_16khz_24kbps_s_0_26.mp4 b/media/tests/contents/media_api/videoeditor/corrupted_H264_BP_640x480_12.5fps_256kbps_AACLC_16khz_24kbps_s_0_26.mp4 deleted file mode 100644 index 31627c7a8dd5..000000000000 Binary files a/media/tests/contents/media_api/videoeditor/corrupted_H264_BP_640x480_12.5fps_256kbps_AACLC_16khz_24kbps_s_0_26.mp4 and /dev/null differ diff --git a/packages/BackupRestoreConfirmation/AndroidManifest.xml b/packages/BackupRestoreConfirmation/AndroidManifest.xml index e67b3be43ea1..aede4590b627 100644 --- a/packages/BackupRestoreConfirmation/AndroidManifest.xml +++ b/packages/BackupRestoreConfirmation/AndroidManifest.xml @@ -21,6 +21,7 @@ + - + android:orientation="vertical" + android:visibility="invisible"> - + + + + + + + + + + + + + + + + Установлена версия: %1$s + + Будет установлена: %1$s + diff --git a/packages/PackageInstaller/res/values/syb_strings.xml b/packages/PackageInstaller/res/values/syb_strings.xml new file mode 100644 index 000000000000..f1f470e7e5b1 --- /dev/null +++ b/packages/PackageInstaller/res/values/syb_strings.xml @@ -0,0 +1,7 @@ + + + + Installed version: %1$s + + To be installed: %1$s + diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java b/packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java index 9c6113ce4b47..4d82b271514a 100644 --- a/packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java +++ b/packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java @@ -49,6 +49,7 @@ import android.util.Log; import android.view.View; import android.widget.Button; +import android.widget.TextView; import com.android.internal.app.AlertActivity; @@ -130,18 +131,28 @@ public class PackageInstallerActivity extends AlertActivity { // Would the mOk button be enabled if this activity would be resumed private boolean mEnableOk = false; - private void startInstallConfirm() { - View viewToEnable; + private void startInstallConfirm(PackageInfo oldInfo) { + requireViewById(R.id.updating_app_view).setVisibility(View.VISIBLE); // the main layout + View viewToEnable; // which install_confirm view to show + View oldVersionView; + View newVersionView; if (mAppInfo != null) { viewToEnable = requireViewById(R.id.install_confirm_question_update); + oldVersionView = requireViewById(R.id.installed_app_version); + ((TextView)oldVersionView).setText( + getString(R.string.old_version_number, oldInfo.versionName)); + oldVersionView.setVisibility(View.VISIBLE); mOk.setText(R.string.update); } else { // This is a new application with no permissions. viewToEnable = requireViewById(R.id.install_confirm_question); } - + newVersionView = requireViewById(R.id.updating_app_version); + ((TextView)newVersionView).setText( + getString(R.string.new_version_number, mPkgInfo.versionName)); viewToEnable.setVisibility(View.VISIBLE); + newVersionView.setVisibility(View.VISIBLE); mEnableOk = true; mOk.setEnabled(true); @@ -271,20 +282,22 @@ private void initiateInstall() { mPkgInfo.applicationInfo.packageName = pkgName; } // Check if package is already installed. display confirmation dialog if replacing pkg + PackageInfo oldPackageInfo = null; try { // This is a little convoluted because we want to get all uninstalled // apps, but this may include apps with just data, and if it is just // data we still want to count it as "installed". - mAppInfo = mPm.getApplicationInfo(pkgName, + oldPackageInfo = mPm.getPackageInfo(pkgName, PackageManager.MATCH_UNINSTALLED_PACKAGES); - if ((mAppInfo.flags&ApplicationInfo.FLAG_INSTALLED) == 0) { + mAppInfo = oldPackageInfo.applicationInfo; + if (mAppInfo != null && (mAppInfo.flags & ApplicationInfo.FLAG_INSTALLED) == 0) { mAppInfo = null; } } catch (NameNotFoundException e) { mAppInfo = null; } - startInstallConfirm(); + startInstallConfirm(oldPackageInfo); } void setPmResult(int pmResult) { diff --git a/packages/PrintSpooler/res/values/styles.xml b/packages/PrintSpooler/res/values/styles.xml index 1e63a67e50a4..5d8e244e5a99 100644 --- a/packages/PrintSpooler/res/values/styles.xml +++ b/packages/PrintSpooler/res/values/styles.xml @@ -28,7 +28,7 @@ 16dip 16dip ?android:attr/colorAccent - sans-serif-medium + @*android:string/config_bodyFontFamilyMedium 14sp diff --git a/packages/PrintSpooler/src/com/android/printspooler/model/MutexFileProvider.java b/packages/PrintSpooler/src/com/android/printspooler/model/MutexFileProvider.java index 0df5e3cf18d7..60c9b586cb1a 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/model/MutexFileProvider.java +++ b/packages/PrintSpooler/src/com/android/printspooler/model/MutexFileProvider.java @@ -35,7 +35,7 @@ public final class MutexFileProvider { private static final String LOG_TAG = "MutexFileProvider"; - private static final boolean DEBUG = true; + private static final boolean DEBUG = false; private final Object mLock = new Object(); diff --git a/packages/SettingsLib/ButtonPreference/res/values/attrs.xml b/packages/SettingsLib/ButtonPreference/res/values/attrs.xml index 9a4312aa8b36..944cffbb8793 100644 --- a/packages/SettingsLib/ButtonPreference/res/values/attrs.xml +++ b/packages/SettingsLib/ButtonPreference/res/values/attrs.xml @@ -19,4 +19,4 @@ - \ No newline at end of file + diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/color-night/xd_base_layout_header.xml b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/color-night/xd_base_layout_header.xml new file mode 100644 index 000000000000..0f2ae5f51cda --- /dev/null +++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/color-night/xd_base_layout_header.xml @@ -0,0 +1,16 @@ + + + + + diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/color/xd_base_layout_header.xml b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/color/xd_base_layout_header.xml new file mode 100644 index 000000000000..49111c73201c --- /dev/null +++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/color/xd_base_layout_header.xml @@ -0,0 +1,16 @@ + + + + + diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/drawable/ic_back_arrow.xml b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/drawable/ic_back_arrow.xml new file mode 100644 index 000000000000..6811579faa3d --- /dev/null +++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/drawable/ic_back_arrow.xml @@ -0,0 +1,28 @@ + + + + + diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/drawable/xd_base_layout_round_mask.xml b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/drawable/xd_base_layout_round_mask.xml new file mode 100644 index 000000000000..433ceb369e35 --- /dev/null +++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/drawable/xd_base_layout_round_mask.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/layout-v31/collapsing_toolbar_content_layout.xml b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/layout-v31/collapsing_toolbar_content_layout.xml index 72b569f22d6c..0c632d2335af 100644 --- a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/layout-v31/collapsing_toolbar_content_layout.xml +++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/layout-v31/collapsing_toolbar_content_layout.xml @@ -35,13 +35,13 @@ android:clipToPadding="false" app:forceApplySystemWindowInsetTop="true" app:extraMultilineHeightEnabled="true" - app:contentScrim="@color/settingslib_colorSurfaceHeader" + app:contentScrim="@android:color/transparent" app:maxLines="3" app:layout_scrollFlags="scroll|exitUntilCollapsed|snap" - app:scrimAnimationDuration="50" + app:scrimAnimationDuration="150" app:scrimVisibleHeightTrigger="@dimen/settingslib_scrim_visible_height_trigger" app:statusBarScrim="@null" - app:titleCollapseMode="fade" + app:titleCollapseMode="scale" app:collapsedTitleTextAppearance="@style/CollapsingToolbarTitle.Collapsed" app:expandedTitleTextAppearance="@style/CollapsingToolbarTitle.Expanded" app:expandedTitleMarginStart="@dimen/expanded_title_margin_start" @@ -54,6 +54,8 @@ android:layout_height="?attr/actionBarSize" android:theme="?android:attr/actionBarTheme" android:transitionName="shared_element_view" + android:contentInsetStartWithNavigation="0dp" + android:navigationIcon="@drawable/ic_back_arrow" app:layout_collapseMode="pin"/> diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/layout/xd_base_layout.xml b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/layout/xd_base_layout.xml new file mode 100644 index 000000000000..a8ec80ba30af --- /dev/null +++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/layout/xd_base_layout.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-night-v31/colors.xml b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-night-v31/colors.xml new file mode 100644 index 000000000000..2a8a1ae1f963 --- /dev/null +++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-night-v31/colors.xml @@ -0,0 +1,3 @@ + + @android:color/system_neutral1_900 + diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v31/colors.xml b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v31/colors.xml new file mode 100644 index 000000000000..c12f92d0216a --- /dev/null +++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v31/colors.xml @@ -0,0 +1,4 @@ + + @android:color/system_neutral1_0 + @android:color/system_neutral1_50 + diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v31/dimens.xml b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v31/dimens.xml index 15c1abbf97ba..d897bc1aede0 100644 --- a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v31/dimens.xml +++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v31/dimens.xml @@ -16,8 +16,21 @@ --> - 179dp - 137dp + 151dp + 109dp 24dp - 24dp - \ No newline at end of file + 75dp + + + 28dp + 5dp + 16dp + -16dp + + + 131dp + 89dp + 21dp + 75dp + + diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v31/styles.xml b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v31/styles.xml index d0b6c4d54bb1..c7284b2cf183 100644 --- a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v31/styles.xml +++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v31/styles.xml @@ -19,10 +19,26 @@ @string/settingslib_config_headlineFontFamily 20dp @color/settingslib_text_color_primary_device_default + -0.016657338648324763 - \ No newline at end of file + + + + + + + diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarDelegate.java b/packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarDelegate.java index 31e8cc709749..be8d92bf898e 100644 --- a/packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarDelegate.java +++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarDelegate.java @@ -76,7 +76,7 @@ public CollapsingToolbarDelegate(@NonNull HostCallback hostCallback) { @SuppressWarnings("RestrictTo") public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container) { final View view = - inflater.inflate(R.layout.collapsing_toolbar_base_layout, container, false); + inflater.inflate(R.layout.xd_base_layout, container, false); if (view instanceof CoordinatorLayout) { mCoordinatorLayout = (CoordinatorLayout) view; } diff --git a/packages/SettingsLib/IllustrationPreference/res/drawable/protection_background.xml b/packages/SettingsLib/IllustrationPreference/res/drawable/protection_background.xml index a027f287a0aa..55f0092189c3 100644 --- a/packages/SettingsLib/IllustrationPreference/res/drawable/protection_background.xml +++ b/packages/SettingsLib/IllustrationPreference/res/drawable/protection_background.xml @@ -18,10 +18,10 @@ - + - + diff --git a/packages/SettingsLib/IllustrationPreference/res/layout/illustration_preference.xml b/packages/SettingsLib/IllustrationPreference/res/layout/illustration_preference.xml index eecb4bff16ae..76bd63a301c3 100644 --- a/packages/SettingsLib/IllustrationPreference/res/layout/illustration_preference.xml +++ b/packages/SettingsLib/IllustrationPreference/res/layout/illustration_preference.xml @@ -19,7 +19,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content" android:layout_width="match_parent" - android:background="?android:attr/colorBackground" + android:background="@android:color/transparent" android:importantForAccessibility="noHideDescendants" android:gravity="center" android:orientation="horizontal"> @@ -43,12 +43,9 @@ + android:layout_width="match_parent" + android:layout_height="150dp" + android:layout_gravity="center" /> - @android:color/black + @android:color/system_neutral1_800 diff --git a/packages/SettingsLib/IllustrationPreference/res/values/colors.xml b/packages/SettingsLib/IllustrationPreference/res/values/colors.xml index ead5174f9ee2..f2a7fa43049b 100644 --- a/packages/SettingsLib/IllustrationPreference/res/values/colors.xml +++ b/packages/SettingsLib/IllustrationPreference/res/values/colors.xml @@ -16,7 +16,7 @@ --> - @android:color/white + @android:color/system_neutral1_0 #1a73e8 diff --git a/packages/SettingsLib/IllustrationPreference/src/com/android/settingslib/widget/IllustrationPreference.java b/packages/SettingsLib/IllustrationPreference/src/com/android/settingslib/widget/IllustrationPreference.java index 468a97630e19..6bd97e844567 100644 --- a/packages/SettingsLib/IllustrationPreference/src/com/android/settingslib/widget/IllustrationPreference.java +++ b/packages/SettingsLib/IllustrationPreference/src/com/android/settingslib/widget/IllustrationPreference.java @@ -119,7 +119,7 @@ public void onBindViewHolder(PreferenceViewHolder holder) { lp.width = screenWidth < screenHeight ? screenWidth : screenHeight; illustrationFrame.setLayoutParams(lp); - handleImageWithAnimation(illustrationView); + handleImageWithAnimation(illustrationFrame, illustrationView); handleImageFrameMaxHeight(backgroundView, illustrationView); if (mIsAutoScale) { @@ -256,7 +256,8 @@ private void handleMiddleGroundView(ViewGroup middleGroundLayout) { } } - private void handleImageWithAnimation(LottieAnimationView illustrationView) { + private void handleImageWithAnimation(FrameLayout illustrationFrame, + LottieAnimationView illustrationView) { if (mImageDrawable != null) { resetAnimations(illustrationView); illustrationView.setImageDrawable(mImageDrawable); @@ -275,7 +276,7 @@ private void handleImageWithAnimation(LottieAnimationView illustrationView) { } else { // The lottie image from the raw folder also returns null because the ImageView // couldn't handle it now. - startLottieAnimationWith(illustrationView, mImageUri); + startLottieAnimationWith(illustrationFrame, illustrationView, mImageUri); } } @@ -288,7 +289,7 @@ private void handleImageWithAnimation(LottieAnimationView illustrationView) { } else { // The lottie image from the raw folder also returns null because the ImageView // couldn't handle it now. - startLottieAnimationWith(illustrationView, mImageResId); + startLottieAnimationWith(illustrationFrame, illustrationView, mImageResId); } } } @@ -326,21 +327,27 @@ private void startAnimation(Drawable drawable) { ((Animatable) drawable).start(); } - private static void startLottieAnimationWith(LottieAnimationView illustrationView, - Uri imageUri) { + private static void startLottieAnimationWith(FrameLayout illustrationFrame, + LottieAnimationView illustrationView, Uri imageUri) { final InputStream inputStream = getInputStreamFromUri(illustrationView.getContext(), imageUri); - illustrationView.setFailureListener( - result -> Log.w(TAG, "Invalid illustration image uri: " + imageUri, result)); + illustrationFrame.setVisibility(View.VISIBLE); + illustrationView.setFailureListener(result -> { + Log.w(TAG, "Invalid illustration image uri: " + imageUri, result); + illustrationFrame.setVisibility(View.GONE); + }); illustrationView.setAnimation(inputStream, /* cacheKey= */ null); illustrationView.setRepeatCount(LottieDrawable.INFINITE); illustrationView.playAnimation(); } - private static void startLottieAnimationWith(LottieAnimationView illustrationView, - @RawRes int rawRes) { - illustrationView.setFailureListener( - result -> Log.w(TAG, "Invalid illustration resource id: " + rawRes, result)); + private static void startLottieAnimationWith(FrameLayout illustrationFrame, + LottieAnimationView illustrationView, @RawRes int rawRes) { + illustrationFrame.setVisibility(View.VISIBLE); + illustrationView.setFailureListener(result -> { + Log.w(TAG, "Invalid illustration resource id: " + rawRes, result); + illustrationFrame.setVisibility(View.GONE); + }); illustrationView.setAnimation(rawRes); illustrationView.setRepeatCount(LottieDrawable.INFINITE); illustrationView.playAnimation(); diff --git a/packages/SettingsLib/LayoutPreference/src/com/android/settingslib/widget/LayoutPreference.java b/packages/SettingsLib/LayoutPreference/src/com/android/settingslib/widget/LayoutPreference.java index 2a635b0996e6..44d1a9cf5efa 100644 --- a/packages/SettingsLib/LayoutPreference/src/com/android/settingslib/widget/LayoutPreference.java +++ b/packages/SettingsLib/LayoutPreference/src/com/android/settingslib/widget/LayoutPreference.java @@ -103,10 +103,8 @@ public LayoutPreference(Context context, View view) { private void init(Context context, AttributeSet attrs, int defStyleAttr) { TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.Preference); - mAllowDividerAbove = TypedArrayUtils.getBoolean(a, R.styleable.Preference_allowDividerAbove, - R.styleable.Preference_allowDividerAbove, false); - mAllowDividerBelow = TypedArrayUtils.getBoolean(a, R.styleable.Preference_allowDividerBelow, - R.styleable.Preference_allowDividerBelow, false); + mAllowDividerAbove = false; + mAllowDividerBelow = false; a.recycle(); a = context.obtainStyledAttributes( @@ -162,7 +160,7 @@ public T findViewById(int id) { * LayoutPreference whether or not allows to set a below divider. */ public void setAllowDividerBelow(boolean allowed) { - mAllowDividerBelow = allowed; + mAllowDividerBelow = false; } /** diff --git a/packages/SettingsLib/SettingsTheme/res/values-v31/config.xml b/packages/SettingsLib/SettingsTheme/res/values-v31/config.xml index 4860ad361744..bc2df3a44a6b 100644 --- a/packages/SettingsLib/SettingsTheme/res/values-v31/config.xml +++ b/packages/SettingsLib/SettingsTheme/res/values-v31/config.xml @@ -18,5 +18,5 @@ false false - - \ No newline at end of file + @*android:string/config_headlineFontFamily + diff --git a/packages/SettingsLib/res/drawable/ic_4g_plus_mobiledata.xml b/packages/SettingsLib/res/drawable/ic_4g_plus_mobiledata.xml index 1d048ae44049..1272ea7a30e1 100644 --- a/packages/SettingsLib/res/drawable/ic_4g_plus_mobiledata.xml +++ b/packages/SettingsLib/res/drawable/ic_4g_plus_mobiledata.xml @@ -14,20 +14,17 @@ limitations under the License. --> - - + android:width="27dp" + android:height="16dp" + android:viewportWidth="27.0" + android:viewportHeight="16.0"> + android:fillColor="#FF000000" + android:pathData="M2,10.98V9.81l4.28,-6.83h1.6v6.59h1.19v1.41H7.88V13H6.4v-2.02H2zM3.68,9.57H6.4V5.33H6.31L3.68,9.57z"/> + android:fillColor="#FF000000" + android:pathData="M15,13.22c-0.88,0 -1.66,-0.21 -2.34,-0.64c-0.67,-0.44 -1.2,-1.05 -1.6,-1.83c-0.38,-0.79 -0.57,-1.71 -0.57,-2.76c0,-1.05 0.21,-1.96 0.62,-2.74c0.41,-0.79 0.97,-1.4 1.67,-1.83c0.7,-0.44 1.5,-0.66 2.39,-0.66c1.09,0 2.01,0.25 2.74,0.76c0.75,0.5 1.22,1.21 1.41,2.11l-1.47,0.39c-0.17,-0.56 -0.48,-1 -0.94,-1.32c-0.45,-0.33 -1.03,-0.49 -1.75,-0.49c-0.57,0 -1.09,0.14 -1.57,0.43c-0.48,0.29 -0.85,0.71 -1.13,1.27c-0.28,0.56 -0.42,1.25 -0.42,2.07c0,0.81 0.14,1.5 0.41,2.07c0.28,0.56 0.65,0.98 1.11,1.27c0.47,0.29 0.98,0.43 1.54,0.43c0.57,0 1.06,-0.11 1.47,-0.34c0.42,-0.23 0.75,-0.55 0.99,-0.94c0.25,-0.4 0.41,-0.85 0.46,-1.36h-2.88V7.79h4.37c0,0.87 0,1.74 0,2.6c0,0.87 0,1.74 0,2.6h-1.41v-1.4h-0.08c-0.28,0.49 -0.67,0.88 -1.18,1.18C16.34,13.07 15.73,13.22 15,13.22z"/> + android:fillColor="#FF000000" + android:pathData="M24.62 5.24 24.62 2.89 23.32 2.89 23.32 5.24 20.97 5.24 20.97 6.54 23.32 6.54 23.32 8.89 24.62 8.89 24.62 6.54 26.97 6.54 26.97 5.24Z"/> diff --git a/packages/SettingsLib/res/drawable/ic_lte_plus_mobiledata.xml b/packages/SettingsLib/res/drawable/ic_lte_plus_mobiledata.xml index e5cdff33fe98..d1f4b6fd818b 100644 --- a/packages/SettingsLib/res/drawable/ic_lte_plus_mobiledata.xml +++ b/packages/SettingsLib/res/drawable/ic_lte_plus_mobiledata.xml @@ -14,23 +14,20 @@ limitations under the License. --> - - + android:width="31dp" + android:height="16dp" + android:viewportWidth="31.0" + android:viewportHeight="16.0"> + android:fillColor="#FF000000" + android:pathData="M2,13V2.98h1.53v8.57H8.3V13H2z"/> + android:fillColor="#FF000000" + android:pathData="M11.24,13V4.43H8.19V2.98h7.63v1.46h-3.05V13H11.24z"/> + android:fillColor="#FF000000" + android:pathData="M17.41,13V2.98h6.36v1.46h-4.83v2.65h4.4v1.46h-4.4v3.01h4.83V13H17.41z"/> + android:fillColor="#FF000000" + android:pathData="M28.72 5.24 28.72 2.89 27.42 2.89 27.42 5.24 25.07 5.24 25.07 6.54 27.42 6.54 27.42 8.89 28.72 8.89 28.72 6.54 31.07 6.54 31.07 5.24Z"/> diff --git a/packages/SettingsLib/res/drawable/ic_vowifi.xml b/packages/SettingsLib/res/drawable/ic_vowifi.xml new file mode 100644 index 000000000000..6f9245f39d37 --- /dev/null +++ b/packages/SettingsLib/res/drawable/ic_vowifi.xml @@ -0,0 +1,51 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/SettingsLib/res/drawable/ic_vowifi_asus.xml b/packages/SettingsLib/res/drawable/ic_vowifi_asus.xml new file mode 100644 index 000000000000..44e44ca7ea43 --- /dev/null +++ b/packages/SettingsLib/res/drawable/ic_vowifi_asus.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/packages/SettingsLib/res/drawable/ic_vowifi_calling.xml b/packages/SettingsLib/res/drawable/ic_vowifi_calling.xml new file mode 100644 index 000000000000..6f9245f39d37 --- /dev/null +++ b/packages/SettingsLib/res/drawable/ic_vowifi_calling.xml @@ -0,0 +1,51 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/SettingsLib/res/drawable/ic_vowifi_emui.xml b/packages/SettingsLib/res/drawable/ic_vowifi_emui.xml new file mode 100644 index 000000000000..c98a70fdd2e8 --- /dev/null +++ b/packages/SettingsLib/res/drawable/ic_vowifi_emui.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/packages/SettingsLib/res/drawable/ic_vowifi_margaritov.xml b/packages/SettingsLib/res/drawable/ic_vowifi_margaritov.xml new file mode 100644 index 000000000000..64f3f4d5bd5f --- /dev/null +++ b/packages/SettingsLib/res/drawable/ic_vowifi_margaritov.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/packages/SettingsLib/res/drawable/ic_vowifi_moto.xml b/packages/SettingsLib/res/drawable/ic_vowifi_moto.xml new file mode 100644 index 000000000000..90b977d5eff7 --- /dev/null +++ b/packages/SettingsLib/res/drawable/ic_vowifi_moto.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/SettingsLib/res/drawable/ic_vowifi_oneplus.xml b/packages/SettingsLib/res/drawable/ic_vowifi_oneplus.xml new file mode 100644 index 000000000000..4574f36d31d5 --- /dev/null +++ b/packages/SettingsLib/res/drawable/ic_vowifi_oneplus.xml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/packages/SettingsLib/res/drawable/ic_vowifi_simple1.xml b/packages/SettingsLib/res/drawable/ic_vowifi_simple1.xml new file mode 100644 index 000000000000..f9f02d7be0d4 --- /dev/null +++ b/packages/SettingsLib/res/drawable/ic_vowifi_simple1.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/packages/SettingsLib/res/drawable/ic_vowifi_simple2.xml b/packages/SettingsLib/res/drawable/ic_vowifi_simple2.xml new file mode 100644 index 000000000000..980f2dec0044 --- /dev/null +++ b/packages/SettingsLib/res/drawable/ic_vowifi_simple2.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/SettingsLib/res/drawable/ic_vowifi_simple3.xml b/packages/SettingsLib/res/drawable/ic_vowifi_simple3.xml new file mode 100644 index 000000000000..6c3358a75872 --- /dev/null +++ b/packages/SettingsLib/res/drawable/ic_vowifi_simple3.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/packages/SettingsLib/res/drawable/ic_vowifi_vivo.xml b/packages/SettingsLib/res/drawable/ic_vowifi_vivo.xml new file mode 100644 index 000000000000..3f8a683b311c --- /dev/null +++ b/packages/SettingsLib/res/drawable/ic_vowifi_vivo.xml @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/packages/SettingsLib/res/values-ru/syb_strings.xml b/packages/SettingsLib/res/values-ru/syb_strings.xml new file mode 100644 index 000000000000..81a5869241ea --- /dev/null +++ b/packages/SettingsLib/res/values-ru/syb_strings.xml @@ -0,0 +1,19 @@ + + + + + (Глубокий сон: %1$d%2$s) + + + Dash зарядка (%1$s до полной) + + + Dash зарядка + + + Warp зарядка (%1$s до полной) + + + Warp зарядка + + diff --git a/packages/SettingsLib/res/values/syb_strings.xml b/packages/SettingsLib/res/values/syb_strings.xml new file mode 100644 index 000000000000..5bd11cb82a9d --- /dev/null +++ b/packages/SettingsLib/res/values/syb_strings.xml @@ -0,0 +1,20 @@ + + + + + (Deep sleep: %1$d%2$s) + + + + Dash charging (%1$s left until full) + + + Dash charging + + + Warp charging (%1$s left until full) + + + Warp charging + + diff --git a/packages/SettingsLib/search/Android.bp b/packages/SettingsLib/search/Android.bp index 45746d9848df..cfff519705f2 100644 --- a/packages/SettingsLib/search/Android.bp +++ b/packages/SettingsLib/search/Android.bp @@ -19,11 +19,11 @@ java_plugin { name: "SettingsLib-annotation-processor", processor_class: "com.android.settingslib.search.IndexableProcessor", static_libs: [ - "javapoet-prebuilt-jar", + "javapoet", ], srcs: [ "processor-src/**/*.java", - "src/com/android/settingslib/search/SearchIndexable.java" + "src/com/android/settingslib/search/SearchIndexable.java", ], java_resource_dirs: ["resources"], } diff --git a/packages/SettingsLib/src/com/android/settingslib/Utils.java b/packages/SettingsLib/src/com/android/settingslib/Utils.java index feb4212035bc..80c74a01596a 100644 --- a/packages/SettingsLib/src/com/android/settingslib/Utils.java +++ b/packages/SettingsLib/src/com/android/settingslib/Utils.java @@ -227,6 +227,12 @@ public static String getBatteryStatus(Context context, Intent batteryChangedInte statusString = res.getString(R.string.battery_info_status_charging); } else if (batteryStatus.isPluggedInWired()) { switch (batteryStatus.getChargingSpeed(context)) { + case BatteryStatus.CHARGING_DASH: + statusString = res.getString(R.string.battery_info_status_dash_charging); + break; + case BatteryStatus.CHARGING_WARP: + statusString = res.getString(R.string.battery_info_status_warp_charging); + break; case BatteryStatus.CHARGING_FAST: statusString = res.getString( R.string.battery_info_status_charging_fast); diff --git a/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java b/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java index 6b9daa35f9ca..d25623b32022 100644 --- a/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java +++ b/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java @@ -721,6 +721,10 @@ private AppEntry getEntryLocked(ApplicationInfo info) { } return null; } + if (info.sourceDir == null) { + // Avoid NullPointerException for broken uninstalled packages. + return null; + } if (DEBUG) { Log.i(TAG, "Creating AppEntry for " + info.packageName); } @@ -1925,7 +1929,7 @@ public void init() { @Override public boolean filterApp(AppEntry entry) { - return true; + return !hasFlag(entry.info.privateFlags, ApplicationInfo.PRIVATE_FLAG_IS_RESOURCE_OVERLAY); } }; diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java index fea7475fc087..2bb24267ce58 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java @@ -38,7 +38,7 @@ public class BluetoothUtils { private static final String TAG = "BluetoothUtils"; public static final boolean V = false; // verbose logging - public static final boolean D = true; // regular logging + public static final boolean D = false; // regular logging public static final int META_INT_ERROR = -1; public static final String BT_ADVANCED_HEADER_ENABLED = "bt_advanced_header_enabled"; diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java index 58944f653869..1e7d832fdb20 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java @@ -321,6 +321,11 @@ private class StateChangedHandler implements BluetoothEventManager.Handler { } public void onReceive(Context context, Intent intent, BluetoothDevice device) { + if (device == null) { + if(DEBUG) Log.d(TAG, "StateChangedHandler receives state-change for invalid device"); + return; + } + CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device); if (cachedDevice == null) { Log.w(TAG, "StateChangedHandler found new device: " + device); diff --git a/packages/SettingsLib/src/com/android/settingslib/core/AbstractPreferenceController.java b/packages/SettingsLib/src/com/android/settingslib/core/AbstractPreferenceController.java index 988055e7d8db..12844b11ac1a 100644 --- a/packages/SettingsLib/src/com/android/settingslib/core/AbstractPreferenceController.java +++ b/packages/SettingsLib/src/com/android/settingslib/core/AbstractPreferenceController.java @@ -41,8 +41,10 @@ public void displayPreference(PreferenceScreen screen) { setVisible(screen, prefKey, true /* visible */); if (this instanceof Preference.OnPreferenceChangeListener) { final Preference preference = screen.findPreference(prefKey); - preference.setOnPreferenceChangeListener( + if (preference != null) { + preference.setOnPreferenceChangeListener( (Preference.OnPreferenceChangeListener) this); + } } } else { setVisible(screen, prefKey, false /* visible */); diff --git a/packages/SettingsLib/src/com/android/settingslib/development/DeveloperOptionsPreferenceController.java b/packages/SettingsLib/src/com/android/settingslib/development/DeveloperOptionsPreferenceController.java index b29595eab5c7..79416ce6a4f8 100644 --- a/packages/SettingsLib/src/com/android/settingslib/development/DeveloperOptionsPreferenceController.java +++ b/packages/SettingsLib/src/com/android/settingslib/development/DeveloperOptionsPreferenceController.java @@ -75,14 +75,18 @@ public void onDeveloperOptionsDisabled() { * Called when developer options is enabled and the preference is available */ protected void onDeveloperOptionsSwitchEnabled() { - mPreference.setEnabled(true); + if (mPreference != null) { + mPreference.setEnabled(true); + } } /** * Called when developer options is disabled and the preference is available */ protected void onDeveloperOptionsSwitchDisabled() { - mPreference.setEnabled(false); + if (mPreference != null) { + mPreference.setEnabled(false); + } } } diff --git a/packages/SettingsLib/src/com/android/settingslib/deviceinfo/AbstractUptimePreferenceController.java b/packages/SettingsLib/src/com/android/settingslib/deviceinfo/AbstractUptimePreferenceController.java index 5f7226969699..5816578a63ea 100644 --- a/packages/SettingsLib/src/com/android/settingslib/deviceinfo/AbstractUptimePreferenceController.java +++ b/packages/SettingsLib/src/com/android/settingslib/deviceinfo/AbstractUptimePreferenceController.java @@ -26,6 +26,7 @@ import androidx.preference.Preference; import androidx.preference.PreferenceScreen; +import com.android.settingslib.R; import com.android.settingslib.core.AbstractPreferenceController; import com.android.settingslib.core.lifecycle.Lifecycle; import com.android.settingslib.core.lifecycle.LifecycleObserver; @@ -89,7 +90,14 @@ private Handler getHandler() { } private void updateTimes() { - mUptime.setSummary(DateUtils.formatElapsedTime(SystemClock.elapsedRealtime() / 1000)); + float deepSleepRatio = Math.max((float) (SystemClock.elapsedRealtime() - SystemClock.uptimeMillis()), 0f) + / SystemClock.elapsedRealtime(); + int deepSleepPercent = Math.round(deepSleepRatio * 100); + + String summary = DateUtils.formatElapsedTime(SystemClock.elapsedRealtime() / 1000) + + " " + mContext.getString(R.string.status_deep_sleep, deepSleepPercent, "%"); + + mUptime.setSummary(summary.toString()); } private static class MyHandler extends Handler { diff --git a/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryStatus.java b/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryStatus.java index 4939e04dad6a..ecd9208d2d89 100644 --- a/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryStatus.java +++ b/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryStatus.java @@ -24,9 +24,12 @@ import static android.os.BatteryManager.EXTRA_LEVEL; import static android.os.BatteryManager.EXTRA_MAX_CHARGING_CURRENT; import static android.os.BatteryManager.EXTRA_MAX_CHARGING_VOLTAGE; +import static android.os.BatteryManager.EXTRA_TEMPERATURE; import static android.os.BatteryManager.EXTRA_PLUGGED; import static android.os.BatteryManager.EXTRA_PRESENT; import static android.os.BatteryManager.EXTRA_STATUS; +import static android.os.BatteryManager.EXTRA_DASH_CHARGER; +import static android.os.BatteryManager.EXTRA_WARP_CHARGER; import android.content.Context; import android.content.Intent; @@ -45,22 +48,38 @@ public class BatteryStatus { public static final int CHARGING_SLOWLY = 0; public static final int CHARGING_REGULAR = 1; public static final int CHARGING_FAST = 2; + public static final int CHARGING_DASH = 3; + public static final int CHARGING_WARP = 4; public final int status; public final int level; public final int plugged; public final int health; + public final int maxChargingCurrent; + public final int maxChargingVoltage; public final int maxChargingWattage; public final boolean present; + public final float temperature; + public final boolean dashChargeStatus; + public final boolean warpChargeStatus; + public BatteryStatus(int status, int level, int plugged, int health, - int maxChargingWattage, boolean present) { + int maxChargingWattage, boolean present, + int maxChargingCurrent, int maxChargingVoltage, + float temperature, boolean dashChargeStatus, boolean warpChargeStatus) { + this.status = status; this.level = level; this.plugged = plugged; this.health = health; + this.maxChargingCurrent = maxChargingCurrent; + this.maxChargingVoltage = maxChargingVoltage; this.maxChargingWattage = maxChargingWattage; this.present = present; + this.temperature = temperature; + this.dashChargeStatus = dashChargeStatus; + this.warpChargeStatus = warpChargeStatus; } public BatteryStatus(Intent batteryChangedIntent) { @@ -69,6 +88,9 @@ public BatteryStatus(Intent batteryChangedIntent) { level = batteryChangedIntent.getIntExtra(EXTRA_LEVEL, 0); health = batteryChangedIntent.getIntExtra(EXTRA_HEALTH, BATTERY_HEALTH_UNKNOWN); present = batteryChangedIntent.getBooleanExtra(EXTRA_PRESENT, true); + temperature = batteryChangedIntent.getIntExtra(EXTRA_TEMPERATURE, -1); + dashChargeStatus = batteryChangedIntent.getBooleanExtra(EXTRA_DASH_CHARGER, false); + warpChargeStatus = batteryChangedIntent.getBooleanExtra(EXTRA_WARP_CHARGER, false); final int maxChargingMicroAmp = batteryChangedIntent.getIntExtra(EXTRA_MAX_CHARGING_CURRENT, -1); @@ -82,8 +104,12 @@ public BatteryStatus(Intent batteryChangedIntent) { // to maintain precision equally on both factors. maxChargingWattage = (maxChargingMicroAmp / 1000) * (maxChargingMicroVolt / 1000); + maxChargingCurrent = maxChargingMicroAmp; + maxChargingVoltage = maxChargingMicroVolt; } else { maxChargingWattage = -1; + maxChargingCurrent = -1; + maxChargingVoltage = -1; } } @@ -166,7 +192,9 @@ public final int getChargingSpeed(Context context) { R.integer.config_chargingSlowlyThreshold); final int fastThreshold = context.getResources().getInteger( R.integer.config_chargingFastThreshold); - return maxChargingWattage <= 0 ? CHARGING_UNKNOWN : + return dashChargeStatus ? CHARGING_DASH : + warpChargeStatus ? CHARGING_WARP : + maxChargingWattage <= 0 ? CHARGING_UNKNOWN : maxChargingWattage < slowThreshold ? CHARGING_SLOWLY : maxChargingWattage > fastThreshold ? CHARGING_FAST : CHARGING_REGULAR; diff --git a/packages/SettingsLib/src/com/android/settingslib/graph/CircleBatteryDrawable.kt b/packages/SettingsLib/src/com/android/settingslib/graph/CircleBatteryDrawable.kt new file mode 100644 index 000000000000..eb32bb823f94 --- /dev/null +++ b/packages/SettingsLib/src/com/android/settingslib/graph/CircleBatteryDrawable.kt @@ -0,0 +1,341 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.settingslib.graph + +import android.content.Context +import android.content.res.Resources +import android.graphics.* +import android.graphics.drawable.Drawable +import android.util.TypedValue +import com.android.settingslib.R +import com.android.settingslib.Utils +import kotlin.math.max +import kotlin.math.min + +class CircleBatteryDrawable(private val context: Context, frameColor: Int) : Drawable() { + private val criticalLevel: Int + private val warningString: String + private val framePaint: Paint + private val batteryPaint: Paint + private val warningTextPaint: Paint + private val textPaint: Paint + private val boltPaint: Paint + private val plusPaint: Paint + private val powerSavePaint: Paint + private val colors: IntArray + private val boltPoints: FloatArray + private val boltPath = Path() + private val padding = Rect() + private val frame = RectF() + private val boltFrame = RectF() + private val pathEffect = DashPathEffect(floatArrayOf(3f,2f),0f) + + private var chargeColor: Int + private var iconTint = Color.WHITE + private var intrinsicWidth: Int + private var intrinsicHeight: Int + private var height = 0 + private var width = 0 + + private var BATTERY_STYLE_CIRCLE = 1 + private var BATTERY_STYLE_DOTTED_CIRCLE = 2 + private var BATTERY_STYLE_BIG_DOTTED_CIRCLE = 9 + + // Dual tone implies that battery level is a clipped overlay over top of the whole shape + private var dualTone = false + + override fun getIntrinsicHeight() = intrinsicHeight + + override fun getIntrinsicWidth() = intrinsicWidth + + var charging = false + set(value) { + field = value + postInvalidate() + } + + var powerSaveEnabled = false + set(value) { + field = value + postInvalidate() + } + + var showPercent = false + set(value) { + field = value + postInvalidate() + } + + var batteryLevel = -1 + set(value) { + field = value + postInvalidate() + } + + var meterStyle = BATTERY_STYLE_CIRCLE + set(value) { + field = value + postInvalidate() + } + + // an approximation of View.postInvalidate() + private fun postInvalidate() { + unscheduleSelf { invalidateSelf() } + scheduleSelf({ invalidateSelf() }, 0) + } + + override fun setBounds(left: Int, top: Int, right: Int, bottom: Int) { + super.setBounds(left, top, right, bottom) + updateSize() + } + + private fun updateSize() { + val res = context.resources + height = bounds.bottom - padding.bottom - (bounds.top + padding.top) + width = bounds.right - padding.right - (bounds.left + padding.left) + warningTextPaint.textSize = height * 0.75f + intrinsicHeight = res.getDimensionPixelSize(R.dimen.battery_height) + intrinsicWidth = res.getDimensionPixelSize(R.dimen.battery_height) + } + + override fun getPadding(padding: Rect): Boolean { + if (this.padding.left == 0 && + this.padding.top == 0 && + this.padding.right == 0 && + this.padding.bottom == 0 + ) { + return super.getPadding(padding) + } + padding.set(this.padding) + return true + } + + private fun getColorForLevel(percent: Int): Int { + var thresh: Int + var color = 0 + var i = 0 + while (i < colors.size) { + thresh = colors[i] + color = colors[i + 1] + if (percent <= thresh) { + // Respect tinting for "normal" level + return if (i == colors.size - 2) { + iconTint + } else { + color + } + } + i += 2 + } + return color + } + + private fun batteryColorForLevel(level: Int) = + if (charging || powerSaveEnabled) + chargeColor + else + getColorForLevel(level) + + fun setColors(fgColor: Int, bgColor: Int, singleToneColor: Int) { + val fillColor = if (dualTone) fgColor else singleToneColor + + iconTint = fillColor + framePaint.color = bgColor + boltPaint.color = fillColor + chargeColor = fillColor + + invalidateSelf() + } + + override fun draw(c: Canvas) { + if (batteryLevel == -1) return + val circleSize = min(width, height) + val strokeWidth = circleSize / 6.5f + framePaint.strokeWidth = strokeWidth + framePaint.style = Paint.Style.STROKE + batteryPaint.strokeWidth = strokeWidth + batteryPaint.style = Paint.Style.STROKE + if (meterStyle == BATTERY_STYLE_DOTTED_CIRCLE || + meterStyle == BATTERY_STYLE_BIG_DOTTED_CIRCLE) { + batteryPaint.pathEffect = pathEffect + powerSavePaint.pathEffect = pathEffect + } else { + batteryPaint.pathEffect = null + powerSavePaint.pathEffect = null + } + powerSavePaint.strokeWidth = strokeWidth + frame[ + strokeWidth / 2.0f + padding.left, strokeWidth / 2.0f, + circleSize - strokeWidth / 2.0f + padding.left + ] = circleSize - strokeWidth / 2.0f + // set the battery charging color + batteryPaint.color = batteryColorForLevel(batteryLevel) + if (charging) { // define the bolt shape + val bl = frame.left + frame.width() / 3.0f + val bt = frame.top + frame.height() / 3.4f + val br = frame.right - frame.width() / 4.0f + val bb = frame.bottom - frame.height() / 5.6f + if (boltFrame.left != bl || + boltFrame.top != bt || + boltFrame.right != br || + boltFrame.bottom != bb + ) { + boltFrame[bl, bt, br] = bb + boltPath.reset() + boltPath.moveTo( + boltFrame.left + boltPoints[0] * boltFrame.width(), + boltFrame.top + boltPoints[1] * boltFrame.height() + ) + var i = 2 + while (i < boltPoints.size) { + boltPath.lineTo( + boltFrame.left + boltPoints[i] * boltFrame.width(), + boltFrame.top + boltPoints[i + 1] * boltFrame.height() + ) + i += 2 + } + boltPath.lineTo( + boltFrame.left + boltPoints[0] * boltFrame.width(), + boltFrame.top + boltPoints[1] * boltFrame.height() + ) + } + c.drawPath(boltPath, boltPaint) + } + // draw thin gray ring first + c.drawArc(frame, 270f, 360f, false, framePaint) + // draw colored arc representing charge level + if (batteryLevel > 0) { + if (!charging && powerSaveEnabled) { + c.drawArc(frame, 270f, 3.6f * batteryLevel, false, powerSavePaint) + } else { + c.drawArc(frame, 270f, 3.6f * batteryLevel, false, batteryPaint) + } + } + // compute percentage text + if (!charging && batteryLevel != 100 && showPercent) { + textPaint.color = getColorForLevel(batteryLevel) + textPaint.textSize = height * 0.52f + val textHeight = -textPaint.fontMetrics.ascent + val pctText = + if (batteryLevel > criticalLevel) + batteryLevel.toString() + else + warningString + val pctX = width * 0.5f + val pctY = (height + textHeight) * 0.47f + c.drawText(pctText, pctX, pctY, textPaint) + } + } + + // Some stuff required by Drawable. + override fun setAlpha(alpha: Int) {} + + override fun setColorFilter(colorFilter: ColorFilter?) { + framePaint.colorFilter = colorFilter + batteryPaint.colorFilter = colorFilter + warningTextPaint.colorFilter = colorFilter + boltPaint.colorFilter = colorFilter + plusPaint.colorFilter = colorFilter + } + + override fun getOpacity() = PixelFormat.UNKNOWN + + companion object { + private fun loadPoints( + res: Resources, + pointArrayRes: Int + ): FloatArray { + val pts = res.getIntArray(pointArrayRes) + var maxX = 0 + var maxY = 0 + run { + var i = 0 + while (i < pts.size) { + maxX = max(maxX, pts[i]) + maxY = max(maxY, pts[i + 1]) + i += 2 + } + } + val ptsF = FloatArray(pts.size) + var i = 0 + while (i < pts.size) { + ptsF[i] = pts[i].toFloat() / maxX + ptsF[i + 1] = pts[i + 1].toFloat() / maxY + i += 2 + } + return ptsF + } + } + + init { + val res = context.resources + val color_levels = res.obtainTypedArray(R.array.batterymeter_color_levels) + val color_values = res.obtainTypedArray(R.array.batterymeter_color_values) + colors = IntArray(2 * color_levels.length()) + for (i in 0 until color_levels.length()) { + colors[2 * i] = color_levels.getInt(i, 0) + if (color_values.getType(i) == TypedValue.TYPE_ATTRIBUTE) { + colors[2 * i + 1] = Utils.getColorAttrDefaultColor( + context, + color_values.getThemeAttributeId(i, 0) + ) + } else { + colors[2 * i + 1] = color_values.getColor(i, 0) + } + } + color_levels.recycle() + color_values.recycle() + warningString = res.getString(R.string.battery_meter_very_low_overlay_symbol) + criticalLevel = res.getInteger( + com.android.internal.R.integer.config_criticalBatteryWarningLevel + ) + framePaint = Paint(Paint.ANTI_ALIAS_FLAG) + framePaint.color = frameColor + framePaint.isDither = true + batteryPaint = Paint(Paint.ANTI_ALIAS_FLAG) + batteryPaint.isDither = true + textPaint = Paint(Paint.ANTI_ALIAS_FLAG) + textPaint.typeface = Typeface.create("sans-serif-condensed", Typeface.BOLD) + textPaint.textAlign = Paint.Align.CENTER + warningTextPaint = Paint(Paint.ANTI_ALIAS_FLAG) + warningTextPaint.typeface = Typeface.create("sans-serif", Typeface.BOLD) + warningTextPaint.textAlign = Paint.Align.CENTER + if (colors.size > 1) { + warningTextPaint.color = colors[1] + } + chargeColor = Utils.getColorStateListDefaultColor(context, R.color.meter_consumed_color) + boltPaint = Paint(Paint.ANTI_ALIAS_FLAG) + boltPaint.color = Utils.getColorStateListDefaultColor( + context, + R.color.batterymeter_bolt_color + ) + boltPoints = + loadPoints(res, R.array.batterymeter_bolt_points) + plusPaint = Paint(Paint.ANTI_ALIAS_FLAG) + plusPaint.color = Utils.getColorStateListDefaultColor( + context, + R.color.batterymeter_plus_color + ) + powerSavePaint = Paint(Paint.ANTI_ALIAS_FLAG) + powerSavePaint.color = plusPaint.color + powerSavePaint.style = Paint.Style.STROKE + intrinsicWidth = res.getDimensionPixelSize(R.dimen.battery_width) + intrinsicHeight = res.getDimensionPixelSize(R.dimen.battery_height) + + dualTone = res.getBoolean(com.android.internal.R.bool.config_batterymeterDualTone) + } +} diff --git a/packages/SettingsLib/src/com/android/settingslib/graph/FullCircleBatteryDrawable.kt b/packages/SettingsLib/src/com/android/settingslib/graph/FullCircleBatteryDrawable.kt new file mode 100644 index 000000000000..80e8ff058516 --- /dev/null +++ b/packages/SettingsLib/src/com/android/settingslib/graph/FullCircleBatteryDrawable.kt @@ -0,0 +1,315 @@ +/* + * Copyright (C) 2020-2022 crDroid Android Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.settingslib.graph + +import android.animation.Animator +import android.animation.AnimatorListenerAdapter +import android.animation.ValueAnimator +import android.content.Context +import android.content.res.Resources +import android.graphics.* +import android.graphics.drawable.Drawable +import android.util.TypedValue +import com.android.settingslib.R +import com.android.settingslib.Utils +import kotlin.math.min + +class FullCircleBatteryDrawable(private val context: Context, frameColor: Int) : Drawable() { + private val criticalLevel: Int + private val warningString: String + private val framePaint: Paint + private val batteryPaint: Paint + private val textPaint: Paint + private val powerSavePaint: Paint + private val colors: IntArray + private val padding = Rect() + private val frame = RectF() + + private var chargeColor: Int + private var iconTint = Color.WHITE + private var intrinsicWidth: Int + private var intrinsicHeight: Int + private var height = 0 + private var width = 0 + private var chargingAnimator: ValueAnimator? = null + private var batteryAlpha: Int + + // Dual tone implies that battery level is a clipped overlay over top of the whole shape + private var dualTone = false + + override fun getIntrinsicHeight() = intrinsicHeight + + override fun getIntrinsicWidth() = intrinsicWidth + + var charging = false + set(value) { + val previousCharging = charging + field = value + if (value) { + if (!previousCharging) { + startChargingAnimation(ValueAnimator.INFINITE) + } + } else { + cancelChargingAnimation() + postInvalidate() + } + } + + var powerSaveEnabled = false + set(value) { + field = value + postInvalidate() + } + + var showPercent = false + set(value) { + field = value + postInvalidate() + } + + var batteryLevel = -1 + set(value) { + field = value + postInvalidate() + } + + private fun startChargingAnimation(repeat: Int) { + val alpha = batteryPaint.alpha + chargingAnimator = ValueAnimator.ofInt(alpha, 0, alpha) + chargingAnimator?.addUpdateListener { + batteryAlpha = it.animatedValue as Int + postInvalidate() + } + + chargingAnimator?.addListener(object: AnimatorListenerAdapter() { + override fun onAnimationCancel(animation: Animator) { + super.onAnimationCancel(animation) + batteryAlpha = alpha + postInvalidate() + onAnimationEnd(animation) + } + + override fun onAnimationEnd(animation: Animator) { + super.onAnimationEnd(animation) + chargingAnimator = null + } + }) + chargingAnimator?.repeatCount = repeat + chargingAnimator?.duration = 4000 + chargingAnimator?.startDelay = 500 + chargingAnimator?.start() + } + + private fun cancelChargingAnimation() { + if (chargingAnimator != null) { + chargingAnimator?.cancel() + } + } + + // an approximation of View.postInvalidate() + private fun postInvalidate() { + unscheduleSelf { invalidateSelf() } + scheduleSelf({ invalidateSelf() }, 0) + } + + override fun setBounds(left: Int, top: Int, right: Int, bottom: Int) { + super.setBounds(left, top, right, bottom) + updateSize() + } + + private fun updateSize() { + val res = context.resources + height = bounds.bottom - padding.bottom - (bounds.top + padding.top) + width = bounds.right - padding.right - (bounds.left + padding.left) + intrinsicHeight = res.getDimensionPixelSize(R.dimen.battery_height) + intrinsicWidth = res.getDimensionPixelSize(R.dimen.battery_height) + textPaint.textSize = height * 0.7f + } + + override fun getPadding(padding: Rect): Boolean { + if (this.padding.left == 0 && + this.padding.top == 0 && + this.padding.right == 0 && + this.padding.bottom == 0 + ) { + return super.getPadding(padding) + } + padding.set(this.padding) + return true + } + + private fun getColorForLevel(percent: Int): Int { + var thresh: Int + var color = 0 + var i = 0 + while (i < colors.size) { + thresh = colors[i] + color = colors[i + 1] + if (percent <= thresh) { + // Respect tinting for "normal" level + return if (i == colors.size - 2) { + iconTint + } else { + color + } + } + i += 2 + } + return color + } + + private fun batteryColorForLevel(level: Int) = + if (charging || powerSaveEnabled) + chargeColor + else + getColorForLevel(level) + + fun setColors(fgColor: Int, bgColor: Int, singleToneColor: Int) { + val fillColor = if (dualTone) fgColor else singleToneColor + + iconTint = fillColor + framePaint.color = bgColor + chargeColor = fillColor + + invalidateSelf() + } + + override fun draw(c: Canvas) { + if (batteryLevel == -1) return + + val strokeWidth = powerSavePaint.strokeWidth + val circleSize = min(width, height) + var circleRadius = (circleSize / 2f) + var drawFrac = batteryLevel / 100f + + if (!charging && powerSaveEnabled) { + circleRadius -= strokeWidth / 2.0f + } + + framePaint.strokeWidth = 0f + framePaint.style = Paint.Style.FILL_AND_STROKE + batteryPaint.strokeWidth = 0f + batteryPaint.style = Paint.Style.FILL_AND_STROKE + frame[ + strokeWidth / 2.0f + padding.left, strokeWidth / 2.0f, + circleSize - strokeWidth / 2.0f + padding.left + ] = circleSize - strokeWidth / 2.0f + // set the battery charging color + batteryPaint.color = batteryColorForLevel(batteryLevel) + if (chargingAnimator != null) { + if (batteryLevel == 100) { + cancelChargingAnimation() + } else { + batteryPaint.alpha = batteryAlpha + } + } + + if (batteryLevel <= criticalLevel) { + drawFrac = 0f + } + + // draw outer circle first + c.drawCircle(frame.centerX(), frame.centerY(), circleRadius, framePaint) + + c.save() + // compute percentage text + if (batteryLevel != 100 && showPercent) { + val textHeight = -textPaint.fontMetrics.ascent + val pctText = + if (batteryLevel > criticalLevel) + batteryLevel.toString() + else + warningString + val pctY = (height + textHeight) * 0.45f + textPaint.color = batteryColorForLevel(batteryLevel) + c.drawText(pctText, frame.centerX(), pctY, textPaint) + var textPath = Path() + textPaint.getTextPath(pctText, 0, pctText.length, frame.centerX(), + pctY, textPath) + c.clipOutPath(textPath) + } + + // draw colored circle representing charge level + if (drawFrac != 0f) { + c.drawCircle(frame.centerX(), frame.centerY(), circleRadius + * drawFrac, batteryPaint) + } + + if (!charging && powerSaveEnabled) { + c.drawCircle(frame.centerX(), frame.centerY(), circleRadius, + powerSavePaint) + } + c.restore() + } + + // Some stuff required by Drawable. + override fun setAlpha(alpha: Int) {} + + override fun setColorFilter(colorFilter: ColorFilter?) { + framePaint.colorFilter = colorFilter + batteryPaint.colorFilter = colorFilter + textPaint.colorFilter = colorFilter + } + + override fun getOpacity() = PixelFormat.UNKNOWN + + init { + val res = context.resources + val color_levels = res.obtainTypedArray(R.array.batterymeter_color_levels) + val color_values = res.obtainTypedArray(R.array.batterymeter_color_values) + colors = IntArray(2 * color_levels.length()) + for (i in 0 until color_levels.length()) { + colors[2 * i] = color_levels.getInt(i, 0) + if (color_values.getType(i) == TypedValue.TYPE_ATTRIBUTE) { + colors[2 * i + 1] = Utils.getColorAttrDefaultColor( + context, + color_values.getThemeAttributeId(i, 0) + ) + } else { + colors[2 * i + 1] = color_values.getColor(i, 0) + } + } + color_levels.recycle() + color_values.recycle() + warningString = res.getString(R.string.battery_meter_very_low_overlay_symbol) + criticalLevel = res.getInteger( + com.android.internal.R.integer.config_criticalBatteryWarningLevel + ) + framePaint = Paint(Paint.ANTI_ALIAS_FLAG) + framePaint.color = frameColor + framePaint.isDither = true + batteryPaint = Paint(Paint.ANTI_ALIAS_FLAG) + batteryPaint.isDither = true + batteryAlpha = batteryPaint.alpha + textPaint = Paint(Paint.ANTI_ALIAS_FLAG) + textPaint.typeface = Typeface.create("sans-serif-condensed", Typeface.BOLD) + textPaint.textAlign = Paint.Align.CENTER + textPaint.strokeWidth = 2f + textPaint.style = Paint.Style.STROKE + chargeColor = Utils.getColorStateListDefaultColor(context, R.color.meter_consumed_color) + powerSavePaint = Paint(Paint.ANTI_ALIAS_FLAG) + powerSavePaint.color = Utils.getColorStateListDefaultColor( + context, + R.color.batterymeter_plus_color + ) + powerSavePaint.style = Paint.Style.STROKE + powerSavePaint.strokeWidth = 3f + intrinsicWidth = res.getDimensionPixelSize(R.dimen.battery_width) + intrinsicHeight = res.getDimensionPixelSize(R.dimen.battery_height) + + dualTone = res.getBoolean(com.android.internal.R.bool.config_batterymeterDualTone) + } +} diff --git a/packages/SettingsLib/src/com/android/settingslib/graph/LandscapeBatteryDrawable.kt b/packages/SettingsLib/src/com/android/settingslib/graph/LandscapeBatteryDrawable.kt new file mode 100644 index 000000000000..d03b83e56a50 --- /dev/null +++ b/packages/SettingsLib/src/com/android/settingslib/graph/LandscapeBatteryDrawable.kt @@ -0,0 +1,460 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package com.android.settingslib.graph + +import android.content.Context +import android.graphics.BlendMode +import android.graphics.Canvas +import android.graphics.Color +import android.graphics.ColorFilter +import android.graphics.Matrix +import android.graphics.Paint +import android.graphics.Path +import android.graphics.PixelFormat +import android.graphics.Rect +import android.graphics.RectF +import android.graphics.Typeface +import android.graphics.drawable.Drawable +import android.util.PathParser +import android.util.TypedValue + +import com.android.settingslib.R +import com.android.settingslib.Utils + +/** + * A battery meter drawable that respects paths configured in + * frameworks/base/core/res/res/values/config.xml to allow for an easily overrideable battery icon + */ +open class LandscapeBatteryDrawable(private val context: Context, frameColor: Int) : Drawable() { + + // Need to load: + // 1. perimeter shape + // 2. fill mask (if smaller than perimeter, this would create a fill that + // doesn't touch the walls + private val perimeterPath = Path() + private val scaledPerimeter = Path() + private val errorPerimeterPath = Path() + private val scaledErrorPerimeter = Path() + // Fill will cover the whole bounding rect of the fillMask, and be masked by the path + private val fillMask = Path() + private val scaledFill = Path() + // Based off of the mask, the fill will interpolate across this space + private val fillRect = RectF() + // Top of this rect changes based on level, 100% == fillRect + private val levelRect = RectF() + private val levelPath = Path() + // Updates the transform of the paths when our bounds change + private val scaleMatrix = Matrix() + private val padding = Rect() + // The net result of fill + perimeter paths + private val unifiedPath = Path() + + // Bolt path (used while charging) + private val boltPath = Path() + private val scaledBolt = Path() + + // Plus sign (used for power save mode) + private val plusPath = Path() + private val scaledPlus = Path() + + private var intrinsicHeight: Int + private var intrinsicWidth: Int + + // To implement hysteresis, keep track of the need to invert the interior icon of the battery + private var invertFillIcon = false + + // Colors can be configured based on battery level (see res/values/arrays.xml) + private var colorLevels: IntArray + + private var fillColor: Int = Color.MAGENTA + private var backgroundColor: Int = Color.MAGENTA + // updated whenever level changes + private var levelColor: Int = Color.MAGENTA + + // Dual tone implies that battery level is a clipped overlay over top of the whole shape + private var dualTone = false + + private var batteryLevel = 0 + + private val invalidateRunnable: () -> Unit = { + invalidateSelf() + } + + open var criticalLevel: Int = context.resources.getInteger( + com.android.internal.R.integer.config_criticalBatteryWarningLevel) + + var charging = false + set(value) { + field = value + postInvalidate() + } + + var powerSaveEnabled = false + set(value) { + field = value + postInvalidate() + } + + var showPercent = false + set(value) { + field = value + postInvalidate() + } + + private val fillColorStrokePaint = Paint(Paint.ANTI_ALIAS_FLAG).also { p -> + p.color = frameColor + p.alpha = 255 + p.isDither = true + p.strokeWidth = 5f + p.style = Paint.Style.STROKE + p.blendMode = BlendMode.SRC + p.strokeMiter = 5f + p.strokeJoin = Paint.Join.ROUND + } + + private val fillColorStrokeProtection = Paint(Paint.ANTI_ALIAS_FLAG).also { p -> + p.isDither = true + p.strokeWidth = 5f + p.style = Paint.Style.STROKE + p.blendMode = BlendMode.CLEAR + p.strokeMiter = 5f + p.strokeJoin = Paint.Join.ROUND + } + + private val fillPaint = Paint(Paint.ANTI_ALIAS_FLAG).also { p -> + p.color = frameColor + p.alpha = 255 + p.isDither = true + p.strokeWidth = 0f + p.style = Paint.Style.FILL_AND_STROKE + } + + private val errorPaint = Paint(Paint.ANTI_ALIAS_FLAG).also { p -> + p.color = Utils.getColorStateListDefaultColor(context, R.color.batterymeter_plus_color) + p.alpha = 255 + p.isDither = true + p.strokeWidth = 0f + p.style = Paint.Style.FILL_AND_STROKE + p.blendMode = BlendMode.SRC + } + + // Only used if dualTone is set to true + private val dualToneBackgroundFill = Paint(Paint.ANTI_ALIAS_FLAG).also { p -> + p.color = frameColor + p.alpha = 85 // ~0.3 alpha by default + p.isDither = true + p.strokeWidth = 0f + p.style = Paint.Style.FILL_AND_STROKE + } + + private val textPaint = Paint(Paint.ANTI_ALIAS_FLAG).also { p -> + p.typeface = Typeface.create("sans-serif-condensed", Typeface.BOLD) + p.textAlign = Paint.Align.CENTER + } + + init { + val density = context.resources.displayMetrics.density + intrinsicHeight = (Companion.HEIGHT * density).toInt() + intrinsicWidth = (Companion.WIDTH * density).toInt() + + val res = context.resources + val levels = res.obtainTypedArray(R.array.batterymeter_color_levels) + val colors = res.obtainTypedArray(R.array.batterymeter_color_values) + val N = levels.length() + colorLevels = IntArray(2 * N) + for (i in 0 until N) { + colorLevels[2 * i] = levels.getInt(i, 0) + if (colors.getType(i) == TypedValue.TYPE_ATTRIBUTE) { + colorLevels[2 * i + 1] = Utils.getColorAttrDefaultColor(context, + colors.getThemeAttributeId(i, 0)) + } else { + colorLevels[2 * i + 1] = colors.getColor(i, 0) + } + } + levels.recycle() + colors.recycle() + + loadPaths() + } + + override fun draw(c: Canvas) { + c.saveLayer(null, null) + unifiedPath.reset() + levelPath.reset() + levelRect.set(fillRect) + val fillFraction = batteryLevel / 100f + val fillTop = + if (batteryLevel >= 95) + fillRect.left + else + fillRect.left + (fillRect.width() * (1 - fillFraction)) + + levelRect.left = Math.floor(fillTop.toDouble()).toFloat() + levelPath.addRect(levelRect, Path.Direction.CCW) + + // The perimeter should never change + unifiedPath.addPath(scaledPerimeter) + // If drawing dual tone, the level is used only to clip the whole drawable path + if (!dualTone) { + unifiedPath.op(levelPath, Path.Op.UNION) + } + + fillPaint.color = levelColor + + // Deal with unifiedPath clipping before it draws + if (charging) { + // Clip out the bolt shape + unifiedPath.op(scaledBolt, Path.Op.DIFFERENCE) + if (!invertFillIcon) { + c.drawPath(scaledBolt, fillPaint) + } + } + + if (dualTone) { + // Dual tone means we draw the shape again, clipped to the charge level + c.drawPath(unifiedPath, dualToneBackgroundFill) + c.save() + c.clipRect( + bounds.left - bounds.width() * fillFraction, + 0f, + bounds.right.toFloat(), + bounds.left.toFloat()) + c.drawPath(unifiedPath, fillPaint) + c.restore() + } else { + // Non dual-tone means we draw the perimeter (with the level fill), and potentially + // draw the fill again with a critical color + fillPaint.color = fillColor + c.drawPath(unifiedPath, fillPaint) + fillPaint.color = levelColor + + // Show colorError below this level + if (batteryLevel <= Companion.CRITICAL_LEVEL && !charging) { + c.save() + c.clipPath(scaledFill) + c.drawPath(levelPath, fillPaint) + c.restore() + } + } + + if (charging) { + c.clipOutPath(scaledBolt) + if (invertFillIcon) { + c.drawPath(scaledBolt, fillColorStrokePaint) + } else { + c.drawPath(scaledBolt, fillColorStrokeProtection) + } + } else if (powerSaveEnabled) { + // If power save is enabled draw the perimeter path with colorError + c.drawPath(scaledErrorPerimeter, errorPaint) + // And draw the plus sign on top of the fill + if (!showPercent) { + c.drawPath(scaledPlus, errorPaint) + } + } + c.restore() + + if (!charging && batteryLevel < 100 && showPercent) { + textPaint.textSize = bounds.width() * 0.38f + val textHeight = +textPaint.fontMetrics.ascent + val pctX = (bounds.width() + textHeight)* 0.7f + val pctY = bounds.height() * 0.8f + + textPaint.color = fillColor + c.drawText(batteryLevel.toString(), pctX, pctY, textPaint) + + textPaint.color = fillColor.toInt().inv() or 0xFF000000.toInt() + c.save() + c.clipRect(fillRect.right, + fillRect.top , + fillRect.left + (fillRect.width() * (1 - fillFraction)), + fillRect.bottom) + c.drawText(batteryLevel.toString(), pctX, pctY, textPaint) + c.restore() + } + } + + private fun batteryColorForLevel(level: Int): Int { + return when { + charging || powerSaveEnabled -> fillColor + else -> getColorForLevel(level) + } + } + + private fun getColorForLevel(level: Int): Int { + var thresh: Int + var color = 0 + var i = 0 + while (i < colorLevels.size) { + thresh = colorLevels[i] + color = colorLevels[i + 1] + if (level <= thresh) { + + // Respect tinting for "normal" level + return if (i == colorLevels.size - 2) { + fillColor + } else { + color + } + } + i += 2 + } + return color + } + + /** + * Alpha is unused internally, and should be defined in the colors passed to {@link setColors}. + * Further, setting an alpha for a dual tone battery meter doesn't make sense without bounds + * defining the minimum background fill alpha. This is because fill + background must be equal + * to the net alpha passed in here. + */ + override fun setAlpha(alpha: Int) { + } + + override fun setColorFilter(colorFilter: ColorFilter?) { + fillPaint.colorFilter = colorFilter + fillColorStrokePaint.colorFilter = colorFilter + dualToneBackgroundFill.colorFilter = colorFilter + } + + /** + * Deprecated, but required by Drawable + */ + override fun getOpacity(): Int { + return PixelFormat.OPAQUE + } + + override fun getIntrinsicHeight(): Int { + return intrinsicHeight + } + + override fun getIntrinsicWidth(): Int { + return intrinsicWidth + } + + /** + * Set the fill level + */ + public open fun setBatteryLevel(l: Int) { + invertFillIcon = if (l >= 67) true else if (l <= 33) false else invertFillIcon + batteryLevel = l + levelColor = batteryColorForLevel(batteryLevel) + invalidateSelf() + } + + public fun getBatteryLevel(): Int { + return batteryLevel + } + + override fun onBoundsChange(bounds: Rect?) { + super.onBoundsChange(bounds) + updateSize() + } + + fun setPadding(left: Int, top: Int, right: Int, bottom: Int) { + padding.left = left + padding.top = top + padding.right = right + padding.bottom = bottom + + updateSize() + } + + fun setColors(fgColor: Int, bgColor: Int, singleToneColor: Int) { + fillColor = if (dualTone) fgColor else singleToneColor + + fillPaint.color = fillColor + fillColorStrokePaint.color = fillColor + + backgroundColor = bgColor + dualToneBackgroundFill.color = bgColor + + // Also update the level color, since fillColor may have changed + levelColor = batteryColorForLevel(batteryLevel) + + invalidateSelf() + } + + private fun postInvalidate() { + unscheduleSelf(invalidateRunnable) + scheduleSelf(invalidateRunnable, 0) + } + + private fun updateSize() { + val b = bounds + if (b.isEmpty) { + scaleMatrix.setScale(1f, 1f) + } else { + scaleMatrix.setScale((b.right / WIDTH), (b.bottom / HEIGHT)) + } + + perimeterPath.transform(scaleMatrix, scaledPerimeter) + errorPerimeterPath.transform(scaleMatrix, scaledErrorPerimeter) + fillMask.transform(scaleMatrix, scaledFill) + scaledFill.computeBounds(fillRect, true) + boltPath.transform(scaleMatrix, scaledBolt) + plusPath.transform(scaleMatrix, scaledPlus) + + // It is expected that this view only ever scale by the same factor in each dimension, so + // just pick one to scale the strokeWidths + val scaledStrokeWidth = + + Math.max(b.right / WIDTH * PROTECTION_STROKE_WIDTH, PROTECTION_MIN_STROKE_WIDTH) + + fillColorStrokePaint.strokeWidth = scaledStrokeWidth + fillColorStrokeProtection.strokeWidth = scaledStrokeWidth + } + + private fun loadPaths() { + val pathString = context.resources.getString( + com.android.internal.R.string.config_batterymeterLandPerimeterPath) + perimeterPath.set(PathParser.createPathFromPathData(pathString)) + perimeterPath.computeBounds(RectF(), true) + + val errorPathString = context.resources.getString( + com.android.internal.R.string.config_batterymeterLandErrorPerimeterPath) + errorPerimeterPath.set(PathParser.createPathFromPathData(errorPathString)) + errorPerimeterPath.computeBounds(RectF(), true) + + val fillMaskString = context.resources.getString( + com.android.internal.R.string.config_batterymeterLandFillMask) + fillMask.set(PathParser.createPathFromPathData(fillMaskString)) + // Set the fill rect so we can calculate the fill properly + fillMask.computeBounds(fillRect, true) + + val boltPathString = context.resources.getString( + com.android.internal.R.string.config_batterymeterLandBoltPath) + boltPath.set(PathParser.createPathFromPathData(boltPathString)) + + val plusPathString = context.resources.getString( + com.android.internal.R.string.config_batterymeterLandPowersavePath) + plusPath.set(PathParser.createPathFromPathData(plusPathString)) + + dualTone = context.resources.getBoolean( + com.android.internal.R.bool.config_batterymeterDualTone) + } + + companion object { + private const val TAG = "LandscapeBatteryDrawable" + private const val WIDTH = 24f + private const val HEIGHT = 12f + private const val CRITICAL_LEVEL = 15 + // On a 12x20 grid, how wide to make the fill protection stroke. + // Scales when our size changes + private const val PROTECTION_STROKE_WIDTH = 3f + // Arbitrarily chosen for visibility at small sizes + private const val PROTECTION_MIN_STROKE_WIDTH = 6f + } +} diff --git a/packages/SettingsLib/src/com/android/settingslib/graph/RLandscapeBatteryDrawable.kt b/packages/SettingsLib/src/com/android/settingslib/graph/RLandscapeBatteryDrawable.kt new file mode 100644 index 000000000000..8adcd200cc59 --- /dev/null +++ b/packages/SettingsLib/src/com/android/settingslib/graph/RLandscapeBatteryDrawable.kt @@ -0,0 +1,460 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package com.android.settingslib.graph + +import android.content.Context +import android.graphics.BlendMode +import android.graphics.Canvas +import android.graphics.Color +import android.graphics.ColorFilter +import android.graphics.Matrix +import android.graphics.Paint +import android.graphics.Path +import android.graphics.PixelFormat +import android.graphics.Rect +import android.graphics.RectF +import android.graphics.Typeface +import android.graphics.drawable.Drawable +import android.util.PathParser +import android.util.TypedValue + +import com.android.settingslib.R +import com.android.settingslib.Utils + +/** + * A battery meter drawable that respects paths configured in + * frameworks/base/core/res/res/values/config.xml to allow for an easily overrideable battery icon + */ +open class RLandscapeBatteryDrawable(private val context: Context, frameColor: Int) : Drawable() { + + // Need to load: + // 1. perimeter shape + // 2. fill mask (if smaller than perimeter, this would create a fill that + // doesn't touch the walls + private val perimeterPath = Path() + private val scaledPerimeter = Path() + private val errorPerimeterPath = Path() + private val scaledErrorPerimeter = Path() + // Fill will cover the whole bounding rect of the fillMask, and be masked by the path + private val fillMask = Path() + private val scaledFill = Path() + // Based off of the mask, the fill will interpolate across this space + private val fillRect = RectF() + // Top of this rect changes based on level, 100% == fillRect + private val levelRect = RectF() + private val levelPath = Path() + // Updates the transform of the paths when our bounds change + private val scaleMatrix = Matrix() + private val padding = Rect() + // The net result of fill + perimeter paths + private val unifiedPath = Path() + + // Bolt path (used while charging) + private val boltPath = Path() + private val scaledBolt = Path() + + // Plus sign (used for power save mode) + private val plusPath = Path() + private val scaledPlus = Path() + + private var intrinsicHeight: Int + private var intrinsicWidth: Int + + // To implement hysteresis, keep track of the need to invert the interior icon of the battery + private var invertFillIcon = false + + // Colors can be configured based on battery level (see res/values/arrays.xml) + private var colorLevels: IntArray + + private var fillColor: Int = Color.MAGENTA + private var backgroundColor: Int = Color.MAGENTA + // updated whenever level changes + private var levelColor: Int = Color.MAGENTA + + // Dual tone implies that battery level is a clipped overlay over top of the whole shape + private var dualTone = false + + private var batteryLevel = 0 + + private val invalidateRunnable: () -> Unit = { + invalidateSelf() + } + + open var criticalLevel: Int = context.resources.getInteger( + com.android.internal.R.integer.config_criticalBatteryWarningLevel) + + var charging = false + set(value) { + field = value + postInvalidate() + } + + var powerSaveEnabled = false + set(value) { + field = value + postInvalidate() + } + + var showPercent = false + set(value) { + field = value + postInvalidate() + } + + private val fillColorStrokePaint = Paint(Paint.ANTI_ALIAS_FLAG).also { p -> + p.color = frameColor + p.alpha = 255 + p.isDither = true + p.strokeWidth = 5f + p.style = Paint.Style.STROKE + p.blendMode = BlendMode.SRC + p.strokeMiter = 5f + p.strokeJoin = Paint.Join.ROUND + } + + private val fillColorStrokeProtection = Paint(Paint.ANTI_ALIAS_FLAG).also { p -> + p.isDither = true + p.strokeWidth = 5f + p.style = Paint.Style.STROKE + p.blendMode = BlendMode.CLEAR + p.strokeMiter = 5f + p.strokeJoin = Paint.Join.ROUND + } + + private val fillPaint = Paint(Paint.ANTI_ALIAS_FLAG).also { p -> + p.color = frameColor + p.alpha = 255 + p.isDither = true + p.strokeWidth = 0f + p.style = Paint.Style.FILL_AND_STROKE + } + + private val errorPaint = Paint(Paint.ANTI_ALIAS_FLAG).also { p -> + p.color = Utils.getColorStateListDefaultColor(context, R.color.batterymeter_plus_color) + p.alpha = 255 + p.isDither = true + p.strokeWidth = 0f + p.style = Paint.Style.FILL_AND_STROKE + p.blendMode = BlendMode.SRC + } + + // Only used if dualTone is set to true + private val dualToneBackgroundFill = Paint(Paint.ANTI_ALIAS_FLAG).also { p -> + p.color = frameColor + p.alpha = 85 // ~0.3 alpha by default + p.isDither = true + p.strokeWidth = 0f + p.style = Paint.Style.FILL_AND_STROKE + } + + private val textPaint = Paint(Paint.ANTI_ALIAS_FLAG).also { p -> + p.typeface = Typeface.create("sans-serif-condensed", Typeface.BOLD) + p.textAlign = Paint.Align.CENTER + } + + init { + val density = context.resources.displayMetrics.density + intrinsicHeight = (Companion.HEIGHT * density).toInt() + intrinsicWidth = (Companion.WIDTH * density).toInt() + + val res = context.resources + val levels = res.obtainTypedArray(R.array.batterymeter_color_levels) + val colors = res.obtainTypedArray(R.array.batterymeter_color_values) + val N = levels.length() + colorLevels = IntArray(2 * N) + for (i in 0 until N) { + colorLevels[2 * i] = levels.getInt(i, 0) + if (colors.getType(i) == TypedValue.TYPE_ATTRIBUTE) { + colorLevels[2 * i + 1] = Utils.getColorAttrDefaultColor(context, + colors.getThemeAttributeId(i, 0)) + } else { + colorLevels[2 * i + 1] = colors.getColor(i, 0) + } + } + levels.recycle() + colors.recycle() + + loadPaths() + } + + override fun draw(c: Canvas) { + c.saveLayer(null, null) + unifiedPath.reset() + levelPath.reset() + levelRect.set(fillRect) + val fillFraction = batteryLevel / 100f + val fillTop = + if (batteryLevel >= 95) + fillRect.right + else + fillRect.right - (fillRect.width() * (1 - fillFraction)) + + levelRect.right = Math.floor(fillTop.toDouble()).toFloat() + levelPath.addRect(levelRect, Path.Direction.CCW) + + // The perimeter should never change + unifiedPath.addPath(scaledPerimeter) + // If drawing dual tone, the level is used only to clip the whole drawable path + if (!dualTone) { + unifiedPath.op(levelPath, Path.Op.UNION) + } + + fillPaint.color = levelColor + + // Deal with unifiedPath clipping before it draws + if (charging) { + // Clip out the bolt shape + unifiedPath.op(scaledBolt, Path.Op.DIFFERENCE) + if (!invertFillIcon) { + c.drawPath(scaledBolt, fillPaint) + } + } + + if (dualTone) { + // Dual tone means we draw the shape again, clipped to the charge level + c.drawPath(unifiedPath, dualToneBackgroundFill) + c.save() + c.clipRect( + bounds.left.toFloat(), + 0f, + bounds.right + bounds.width() * fillFraction, + bounds.left.toFloat()) + c.drawPath(unifiedPath, fillPaint) + c.restore() + } else { + // Non dual-tone means we draw the perimeter (with the level fill), and potentially + // draw the fill again with a critical color + fillPaint.color = fillColor + c.drawPath(unifiedPath, fillPaint) + fillPaint.color = levelColor + + // Show colorError below this level + if (batteryLevel <= Companion.CRITICAL_LEVEL && !charging) { + c.save() + c.clipPath(scaledFill) + c.drawPath(levelPath, fillPaint) + c.restore() + } + } + + if (charging) { + c.clipOutPath(scaledBolt) + if (invertFillIcon) { + c.drawPath(scaledBolt, fillColorStrokePaint) + } else { + c.drawPath(scaledBolt, fillColorStrokeProtection) + } + } else if (powerSaveEnabled) { + // If power save is enabled draw the perimeter path with colorError + c.drawPath(scaledErrorPerimeter, errorPaint) + // And draw the plus sign on top of the fill + if (!showPercent) { + c.drawPath(scaledPlus, errorPaint) + } + } + c.restore() + + if (!charging && batteryLevel < 100 && showPercent) { + textPaint.textSize = bounds.width() * 0.38f + val textHeight = +textPaint.fontMetrics.ascent + val pctX = (bounds.width() + textHeight)* 0.7f + val pctY = bounds.height() * 0.8f + + textPaint.color = fillColor + c.drawText(batteryLevel.toString(), pctX, pctY, textPaint) + + textPaint.color = fillColor.toInt().inv() or 0xFF000000.toInt() + c.save() + c.clipRect(fillRect.left, + fillRect.top , + fillRect.right - (fillRect.width() * (1 - fillFraction)), + fillRect.bottom) + c.drawText(batteryLevel.toString(), pctX, pctY, textPaint) + c.restore() + } + } + + private fun batteryColorForLevel(level: Int): Int { + return when { + charging || powerSaveEnabled -> fillColor + else -> getColorForLevel(level) + } + } + + private fun getColorForLevel(level: Int): Int { + var thresh: Int + var color = 0 + var i = 0 + while (i < colorLevels.size) { + thresh = colorLevels[i] + color = colorLevels[i + 1] + if (level <= thresh) { + + // Respect tinting for "normal" level + return if (i == colorLevels.size - 2) { + fillColor + } else { + color + } + } + i += 2 + } + return color + } + + /** + * Alpha is unused internally, and should be defined in the colors passed to {@link setColors}. + * Further, setting an alpha for a dual tone battery meter doesn't make sense without bounds + * defining the minimum background fill alpha. This is because fill + background must be equal + * to the net alpha passed in here. + */ + override fun setAlpha(alpha: Int) { + } + + override fun setColorFilter(colorFilter: ColorFilter?) { + fillPaint.colorFilter = colorFilter + fillColorStrokePaint.colorFilter = colorFilter + dualToneBackgroundFill.colorFilter = colorFilter + } + + /** + * Deprecated, but required by Drawable + */ + override fun getOpacity(): Int { + return PixelFormat.OPAQUE + } + + override fun getIntrinsicHeight(): Int { + return intrinsicHeight + } + + override fun getIntrinsicWidth(): Int { + return intrinsicWidth + } + + /** + * Set the fill level + */ + public open fun setBatteryLevel(l: Int) { + invertFillIcon = if (l >= 67) true else if (l <= 33) false else invertFillIcon + batteryLevel = l + levelColor = batteryColorForLevel(batteryLevel) + invalidateSelf() + } + + public fun getBatteryLevel(): Int { + return batteryLevel + } + + override fun onBoundsChange(bounds: Rect?) { + super.onBoundsChange(bounds) + updateSize() + } + + fun setPadding(left: Int, top: Int, right: Int, bottom: Int) { + padding.left = left + padding.top = top + padding.right = right + padding.bottom = bottom + + updateSize() + } + + fun setColors(fgColor: Int, bgColor: Int, singleToneColor: Int) { + fillColor = if (dualTone) fgColor else singleToneColor + + fillPaint.color = fillColor + fillColorStrokePaint.color = fillColor + + backgroundColor = bgColor + dualToneBackgroundFill.color = bgColor + + // Also update the level color, since fillColor may have changed + levelColor = batteryColorForLevel(batteryLevel) + + invalidateSelf() + } + + private fun postInvalidate() { + unscheduleSelf(invalidateRunnable) + scheduleSelf(invalidateRunnable, 0) + } + + private fun updateSize() { + val b = bounds + if (b.isEmpty) { + scaleMatrix.setScale(1f, 1f) + } else { + scaleMatrix.setScale((b.right / WIDTH), (b.bottom / HEIGHT)) + } + + perimeterPath.transform(scaleMatrix, scaledPerimeter) + errorPerimeterPath.transform(scaleMatrix, scaledErrorPerimeter) + fillMask.transform(scaleMatrix, scaledFill) + scaledFill.computeBounds(fillRect, true) + boltPath.transform(scaleMatrix, scaledBolt) + plusPath.transform(scaleMatrix, scaledPlus) + + // It is expected that this view only ever scale by the same factor in each dimension, so + // just pick one to scale the strokeWidths + val scaledStrokeWidth = + + Math.max(b.right / WIDTH * PROTECTION_STROKE_WIDTH, PROTECTION_MIN_STROKE_WIDTH) + + fillColorStrokePaint.strokeWidth = scaledStrokeWidth + fillColorStrokeProtection.strokeWidth = scaledStrokeWidth + } + + private fun loadPaths() { + val pathString = context.resources.getString( + com.android.internal.R.string.config_batterymeterRLandPerimeterPath) + perimeterPath.set(PathParser.createPathFromPathData(pathString)) + perimeterPath.computeBounds(RectF(), true) + + val errorPathString = context.resources.getString( + com.android.internal.R.string.config_batterymeterRLandErrorPerimeterPath) + errorPerimeterPath.set(PathParser.createPathFromPathData(errorPathString)) + errorPerimeterPath.computeBounds(RectF(), true) + + val fillMaskString = context.resources.getString( + com.android.internal.R.string.config_batterymeterRLandFillMask) + fillMask.set(PathParser.createPathFromPathData(fillMaskString)) + // Set the fill rect so we can calculate the fill properly + fillMask.computeBounds(fillRect, true) + + val boltPathString = context.resources.getString( + com.android.internal.R.string.config_batterymeterRLandBoltPath) + boltPath.set(PathParser.createPathFromPathData(boltPathString)) + + val plusPathString = context.resources.getString( + com.android.internal.R.string.config_batterymeterRLandPowersavePath) + plusPath.set(PathParser.createPathFromPathData(plusPathString)) + + dualTone = context.resources.getBoolean( + com.android.internal.R.bool.config_batterymeterDualTone) + } + + companion object { + private const val TAG = "RLandscapeBatteryDrawable" + private const val WIDTH = 24f + private const val HEIGHT = 12f + private const val CRITICAL_LEVEL = 15 + // On a 12x20 grid, how wide to make the fill protection stroke. + // Scales when our size changes + private const val PROTECTION_STROKE_WIDTH = 3f + // Arbitrarily chosen for visibility at small sizes + private const val PROTECTION_MIN_STROKE_WIDTH = 6f + } +} diff --git a/packages/SettingsLib/src/com/android/settingslib/graph/ThemedBatteryDrawable.kt b/packages/SettingsLib/src/com/android/settingslib/graph/ThemedBatteryDrawable.kt index 5fa04f93e993..2ae2afcbeffb 100644 --- a/packages/SettingsLib/src/com/android/settingslib/graph/ThemedBatteryDrawable.kt +++ b/packages/SettingsLib/src/com/android/settingslib/graph/ThemedBatteryDrawable.kt @@ -25,6 +25,7 @@ import android.graphics.Path import android.graphics.PixelFormat import android.graphics.Rect import android.graphics.RectF +import android.graphics.Typeface import android.graphics.drawable.Drawable import android.util.PathParser import android.util.TypedValue @@ -106,6 +107,12 @@ open class ThemedBatteryDrawable(private val context: Context, frameColor: Int) postInvalidate() } + var showPercent = false + set(value) { + field = value + postInvalidate() + } + private val fillColorStrokePaint = Paint(Paint.ANTI_ALIAS_FLAG).also { p -> p.color = frameColor p.alpha = 255 @@ -152,6 +159,11 @@ open class ThemedBatteryDrawable(private val context: Context, frameColor: Int) p.style = Paint.Style.FILL_AND_STROKE } + private val textPaint = Paint(Paint.ANTI_ALIAS_FLAG).also { p -> + p.typeface = Typeface.create("sans-serif-condensed", Typeface.BOLD) + p.textAlign = Paint.Align.CENTER + } + init { val density = context.resources.displayMetrics.density intrinsicHeight = (Companion.HEIGHT * density).toInt() @@ -247,9 +259,30 @@ open class ThemedBatteryDrawable(private val context: Context, frameColor: Int) // If power save is enabled draw the perimeter path with colorError c.drawPath(scaledErrorPerimeter, errorPaint) // And draw the plus sign on top of the fill - c.drawPath(scaledPlus, errorPaint) + if (!showPercent) { + c.drawPath(scaledPlus, errorPaint) + } } c.restore() + + if (!charging && batteryLevel < 100 && showPercent) { + textPaint.textSize = bounds.height() * 0.38f + val textHeight = -textPaint.fontMetrics.ascent + val pctX = bounds.width() * 0.5f + val pctY = (bounds.height() + textHeight) * 0.5f + + textPaint.color = fillColor + c.drawText(batteryLevel.toString(), pctX, pctY, textPaint) + + textPaint.color = fillColor.toInt().inv() or 0xFF000000.toInt() + c.save() + c.clipRect(fillRect.left, + fillRect.top + (fillRect.height() * (1 - fillFraction)), + fillRect.right, + fillRect.bottom) + c.drawText(batteryLevel.toString(), pctX, pctY, textPaint) + c.restore() + } } private fun batteryColorForLevel(level: Int): Int { diff --git a/packages/SettingsLib/src/com/android/settingslib/mobile/MobileMappings.java b/packages/SettingsLib/src/com/android/settingslib/mobile/MobileMappings.java index c94195477cfc..b4e11ef368fd 100644 --- a/packages/SettingsLib/src/com/android/settingslib/mobile/MobileMappings.java +++ b/packages/SettingsLib/src/com/android/settingslib/mobile/MobileMappings.java @@ -18,6 +18,8 @@ import android.content.Context; import android.content.res.Resources; import android.os.PersistableBundle; +import android.os.UserHandle; +import android.provider.Settings; import android.telephony.Annotation; import android.telephony.CarrierConfigManager; import android.telephony.SubscriptionManager; @@ -230,6 +232,9 @@ public static Config readConfig(Context context) { res.getBoolean(com.android.internal.R.bool.config_alwaysUseCdmaRssi); config.hspaDataDistinguishable = res.getBoolean(R.bool.config_hspa_data_distinguishable); + config.show4gForLte = Settings.System.getIntForUser(context.getContentResolver(), + Settings.System.SHOW_FOURG_ICON, 0, + UserHandle.USER_CURRENT) == 1; CarrierConfigManager configMgr = (CarrierConfigManager) context.getSystemService(Context.CARRIER_CONFIG_SERVICE); @@ -240,8 +245,6 @@ public static Config readConfig(Context context) { if (b != null) { config.alwaysShowDataRatIcon = b.getBoolean( CarrierConfigManager.KEY_ALWAYS_SHOW_DATA_RAT_ICON_BOOL); - config.show4gForLte = b.getBoolean( - CarrierConfigManager.KEY_SHOW_4G_FOR_LTE_DATA_ICON_BOOL); config.show4glteForLte = b.getBoolean( CarrierConfigManager.KEY_SHOW_4GLTE_FOR_LTE_DATA_ICON_BOOL); config.show4gFor3g = b.getBoolean( diff --git a/packages/SettingsLib/src/com/android/settingslib/mobile/TelephonyIcons.java b/packages/SettingsLib/src/com/android/settingslib/mobile/TelephonyIcons.java index 23e0923d7280..52956f0ee821 100644 --- a/packages/SettingsLib/src/com/android/settingslib/mobile/TelephonyIcons.java +++ b/packages/SettingsLib/src/com/android/settingslib/mobile/TelephonyIcons.java @@ -46,6 +46,19 @@ public class TelephonyIcons { public static final int ICON_5G = R.drawable.ic_5g_mobiledata; public static final int ICON_5G_PLUS = R.drawable.ic_5g_plus_mobiledata; public static final int ICON_CWF = R.drawable.ic_carrier_wifi; + public static final int ICON_VOWIFI = R.drawable.ic_vowifi; + public static final int ICON_VOWIFI_CALLING = R.drawable.ic_vowifi_calling; + + static final int ICON_VOWIFI_ASUS = R.drawable.ic_vowifi_asus; + static final int ICON_VOWIFI_MOTO = R.drawable.ic_vowifi_moto; + static final int ICON_VOWIFI_ONEPLUS = R.drawable.ic_vowifi_oneplus; + static final int ICON_VOWIFI_EMUI = R.drawable.ic_vowifi_emui; + static final int ICON_VOWIFI_Simple1 = R.drawable.ic_vowifi_simple1; + static final int ICON_VOWIFI_Simple2 = R.drawable.ic_vowifi_simple2; + static final int ICON_VOWIFI_Simple3 = R.drawable.ic_vowifi_simple3; + static final int ICON_VOWIFI_VIVO = R.drawable.ic_vowifi_vivo; + static final int ICON_VOWIFI_Margaritov = R.drawable.ic_vowifi_margaritov; + public static final MobileIconGroup CARRIER_NETWORK_CHANGE = new MobileIconGroup( "CARRIER_NETWORK_CHANGE", @@ -339,6 +352,139 @@ public class TelephonyIcons { TelephonyIcons.ICON_CWF ); + public static final MobileIconGroup VOWIFI = new MobileIconGroup( + "VoWIFI", + null, + null, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, + 0, 0, + 0, + 0, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], + 0, + TelephonyIcons.ICON_VOWIFI); + + public static final MobileIconGroup VOWIFI_CALLING = new MobileIconGroup( + "VoWIFICall", + null, + null, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, + 0, 0, + 0, + 0, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], + 0, + TelephonyIcons.ICON_VOWIFI_CALLING); + + public static final MobileIconGroup VOWIFI_MOTO = new MobileIconGroup( + "VoWIFI_Moto", + null, + null, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, + 0, 0, + 0, + 0, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], + 0, + TelephonyIcons.ICON_VOWIFI_MOTO); + + public static final MobileIconGroup VOWIFI_ASUS = new MobileIconGroup( + "VoWIFI_ASUS", + null, + null, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, + 0, 0, + 0, + 0, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], + 0, + TelephonyIcons.ICON_VOWIFI_ASUS); + + public static final MobileIconGroup VOWIFI_ONEPLUS = new MobileIconGroup( + "VoWIFI_OnePlus", + null, + null, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, + 0, 0, + 0, + 0, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], + 0, + TelephonyIcons.ICON_VOWIFI_ONEPLUS); + + public static final MobileIconGroup VOWIFI_EMUI = new MobileIconGroup( + "VoWIFI_Emui", + null, + null, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, + 0, 0, + 0, + 0, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], + 0, + TelephonyIcons.ICON_VOWIFI_EMUI); + + public static final MobileIconGroup VOWIFI_Simple1 = new MobileIconGroup( + "VoWIFI_Simple1", + null, + null, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, + 0, 0, + 0, + 0, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], + 0, + TelephonyIcons.ICON_VOWIFI_Simple1); + + public static final MobileIconGroup VOWIFI_Simple2 = new MobileIconGroup( + "VoWIFI_Simple2", + null, + null, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, + 0, 0, + 0, + 0, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], + 0, + TelephonyIcons.ICON_VOWIFI_Simple2); + + public static final MobileIconGroup VOWIFI_Simple3 = new MobileIconGroup( + "VoWIFI_Simple3", + null, + null, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, + 0, 0, + 0, + 0, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], + 0, + TelephonyIcons.ICON_VOWIFI_Simple3); + + public static final MobileIconGroup VOWIFI_VIVO = new MobileIconGroup( + "VoWIFI_VIVO", + null, + null, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, + 0, 0, + 0, + 0, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], + 0, + TelephonyIcons.ICON_VOWIFI_VIVO); + + public static final MobileIconGroup VOWIFI_Margaritov = new MobileIconGroup( + "VoWIFI_Syberia", + null, + null, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, + 0, 0, + 0, + 0, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], + 0, + TelephonyIcons.ICON_VOWIFI_Margaritov); + + // When adding a new MobileIconGround, check if the dataContentDescription has to be filtered // in QSCarrier#hasValidTypeContentDescription diff --git a/packages/SettingsLib/src/com/android/settingslib/qrcode/QrCamera.java b/packages/SettingsLib/src/com/android/settingslib/qrcode/QrCamera.java index 364f46619061..3120643cc8cb 100644 --- a/packages/SettingsLib/src/com/android/settingslib/qrcode/QrCamera.java +++ b/packages/SettingsLib/src/com/android/settingslib/qrcode/QrCamera.java @@ -189,11 +189,7 @@ void setCameraParameter() { mCamera.setParameters(mParameters); } - private boolean startPreview() { - if (mContext.get() == null) { - return false; - } - + private void startPreview() { final WindowManager winManager = (WindowManager) mContext.get().getSystemService(Context.WINDOW_SERVICE); final int rotation = winManager.getDefaultDisplay().getRotation(); @@ -219,7 +215,6 @@ private boolean startPreview() { mCamera.autoFocus(/* Camera.AutoFocusCallback */ null); sendMessageDelayed(obtainMessage(MSG_AUTO_FOCUS), AUTOFOCUS_INTERVAL_MS); } - return true; } private class DecodingTask extends AsyncTask { @@ -279,6 +274,15 @@ protected void onPostExecute(String qrCode) { } } + /** + * We init camera in 3 steps: + * + * 1. Find an available camera and trying to open it (The front facing camera first). + * + * 2. Set parameters and configs, make sure everything is ready for starting a preview. + * + * 3. Trying to start preview. + */ private boolean initCamera(SurfaceTexture surface) { final int numberOfCameras = Camera.getNumberOfCameras(); Camera.CameraInfo cameraInfo = new Camera.CameraInfo(); @@ -313,11 +317,20 @@ private boolean initCamera(SurfaceTexture surface) { mCamera.setPreviewTexture(surface); setCameraParameter(); setTransformationMatrix(); - if (!startPreview()) { + if (mContext.get() == null) { throw new IOException("Lost contex"); } - } catch (IOException ioe) { - Log.e(TAG, "Fail to startPreview camera: " + ioe); + } catch (IOException | RuntimeException e) { + Log.e(TAG, "Fail to config camera: " + e); + mCamera = null; + mScannerCallback.handleCameraFailure(); + return false; + } + + try { + startPreview(); + } catch (RuntimeException e) { + Log.e(TAG, "Fail to startPreview camera: " + e); mCamera = null; mScannerCallback.handleCameraFailure(); return false; diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml index 7732da40aac2..58903b6902d4 100644 --- a/packages/SettingsProvider/res/values/defaults.xml +++ b/packages/SettingsProvider/res/values/defaults.xml @@ -314,4 +314,7 @@ false + + + 1 diff --git a/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java b/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java index 5eaf553a2047..98652c20bac0 100644 --- a/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java +++ b/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java @@ -204,6 +204,7 @@ public class SecureSettings { Settings.Secure.LOCKSCREEN_SHOW_WALLET, Settings.Secure.LOCK_SCREEN_SHOW_QR_CODE_SCANNER, Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, - Settings.Secure.STATUS_BAR_SHOW_VIBRATE_ICON + Settings.Secure.STATUS_BAR_SHOW_VIBRATE_ICON, + Settings.Secure.ADVANCED_REBOOT }; } diff --git a/packages/SettingsProvider/src/android/provider/settings/backup/SystemSettings.java b/packages/SettingsProvider/src/android/provider/settings/backup/SystemSettings.java index a6bfc408be7e..ffbeabbac319 100644 --- a/packages/SettingsProvider/src/android/provider/settings/backup/SystemSettings.java +++ b/packages/SettingsProvider/src/android/provider/settings/backup/SystemSettings.java @@ -89,5 +89,25 @@ public class SystemSettings { Settings.System.DISPLAY_COLOR_MODE, Settings.System.ALARM_ALERT, Settings.System.NOTIFICATION_LIGHT_PULSE, + Settings.System.GLOBAL_ACTIONS_AIRPLANE, + Settings.System.GLOBAL_ACTIONS_EMERGENCY, + Settings.System.GLOBAL_ACTIONS_FLASHLIGHT, + Settings.System.GLOBAL_ACTIONS_LOCKDOWN, + Settings.System.GLOBAL_ACTIONS_SOUNDPANEL, + Settings.System.GLOBAL_ACTIONS_SCREENSHOT, + Settings.System.GLOBAL_ACTIONS_SCREENRECORD, + Settings.System.GLOBAL_ACTIONS_SETTINGS, + Settings.System.GLOBAL_ACTIONS_USERS, + Settings.System.GLOBAL_ACTIONS_MAX_COLUMNS, + Settings.System.GLOBAL_ACTIONS_MAX_ROWS, + Settings.System.ENABLE_RIPPLE_EFFECT, + Settings.System.EDGE_LIGHT_ENABLED, + Settings.System.EDGE_LIGHT_ALWAYS_TRIGGER_ON_PULSE, + Settings.System.EDGE_LIGHT_REPEAT_ANIMATION, + Settings.System.EDGE_LIGHT_COLOR_MODE, + Settings.System.EDGE_LIGHT_CUSTOM_COLOR, + Settings.System.FLASHLIGHT_ON_CALL, + Settings.System.FLASHLIGHT_ON_CALL_IGNORE_DND, + Settings.System.FLASHLIGHT_ON_CALL_RATE, }; } diff --git a/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java b/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java index 9ee7b654046f..9b07161cfade 100644 --- a/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java +++ b/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java @@ -337,5 +337,6 @@ public class SecureSettingsValidators { return true; }); VALIDATORS.put(Secure.ODI_CAPTIONS_VOLUME_UI_ENABLED, BOOLEAN_VALIDATOR); + VALIDATORS.put(Secure.ADVANCED_REBOOT, BOOLEAN_VALIDATOR); } } diff --git a/packages/SettingsProvider/src/android/provider/settings/validators/SettingsValidators.java b/packages/SettingsProvider/src/android/provider/settings/validators/SettingsValidators.java index 49012b0159c2..602b3b3fc1f7 100644 --- a/packages/SettingsProvider/src/android/provider/settings/validators/SettingsValidators.java +++ b/packages/SettingsProvider/src/android/provider/settings/validators/SettingsValidators.java @@ -26,6 +26,7 @@ import org.json.JSONObject; import java.util.Locale; +import java.util.regex.Pattern; /** * This class provides both interface for validation and common validators @@ -88,6 +89,13 @@ public boolean validate(@Nullable String value) { } }; + public static final Validator NON_EMPTY_HEX_COLOR_VALIDATOR = new Validator() { + @Override + public boolean validate(@Nullable String value) { + return value == null || Pattern.matches("^[#][0-9A-F]{6}|[0-9A-F]{8}", value); + } + }; + public static final Validator URI_VALIDATOR = new Validator() { @Override public boolean validate(@Nullable String value) { diff --git a/packages/SettingsProvider/src/android/provider/settings/validators/SystemSettingsValidators.java b/packages/SettingsProvider/src/android/provider/settings/validators/SystemSettingsValidators.java index 06712cc68b89..a7f5b1152869 100644 --- a/packages/SettingsProvider/src/android/provider/settings/validators/SystemSettingsValidators.java +++ b/packages/SettingsProvider/src/android/provider/settings/validators/SystemSettingsValidators.java @@ -20,6 +20,7 @@ import static android.provider.settings.validators.SettingsValidators.BOOLEAN_VALIDATOR; import static android.provider.settings.validators.SettingsValidators.COMPONENT_NAME_VALIDATOR; import static android.provider.settings.validators.SettingsValidators.LENIENT_IP_ADDRESS_VALIDATOR; +import static android.provider.settings.validators.SettingsValidators.NON_EMPTY_HEX_COLOR_VALIDATOR; import static android.provider.settings.validators.SettingsValidators.NON_NEGATIVE_INTEGER_VALIDATOR; import static android.provider.settings.validators.SettingsValidators.URI_VALIDATOR; import static android.provider.settings.validators.SettingsValidators.VIBRATION_INTENSITY_VALIDATOR; @@ -207,5 +208,30 @@ public boolean validate(@Nullable String value) { VALIDATORS.put(System.WIFI_STATIC_DNS2, LENIENT_IP_ADDRESS_VALIDATOR); VALIDATORS.put(System.SHOW_BATTERY_PERCENT, BOOLEAN_VALIDATOR); VALIDATORS.put(System.NOTIFICATION_LIGHT_PULSE, BOOLEAN_VALIDATOR); + VALIDATORS.put(System.SWIPE_TO_SCREENSHOT, BOOLEAN_VALIDATOR); + VALIDATORS.put(System.GLOBAL_ACTIONS_AIRPLANE, BOOLEAN_VALIDATOR); + VALIDATORS.put(System.GLOBAL_ACTIONS_EMERGENCY, BOOLEAN_VALIDATOR); + VALIDATORS.put(System.GLOBAL_ACTIONS_FLASHLIGHT, BOOLEAN_VALIDATOR); + VALIDATORS.put(System.GLOBAL_ACTIONS_LOCKDOWN, BOOLEAN_VALIDATOR); + VALIDATORS.put(System.GLOBAL_ACTIONS_SOUNDPANEL, BOOLEAN_VALIDATOR); + VALIDATORS.put(System.GLOBAL_ACTIONS_SCREENSHOT, BOOLEAN_VALIDATOR); + VALIDATORS.put(System.GLOBAL_ACTIONS_SCREENRECORD, BOOLEAN_VALIDATOR); + VALIDATORS.put(System.GLOBAL_ACTIONS_SETTINGS, BOOLEAN_VALIDATOR); + VALIDATORS.put(System.GLOBAL_ACTIONS_USERS, BOOLEAN_VALIDATOR); + VALIDATORS.put(System.GLOBAL_ACTIONS_MAX_COLUMNS, NON_NEGATIVE_INTEGER_VALIDATOR); + VALIDATORS.put(System.GLOBAL_ACTIONS_MAX_ROWS, NON_NEGATIVE_INTEGER_VALIDATOR); + VALIDATORS.put(System.FINGERPRINT_WAKE_UNLOCK, NON_NEGATIVE_INTEGER_VALIDATOR); + VALIDATORS.put(System.ENABLE_RIPPLE_EFFECT, BOOLEAN_VALIDATOR); + VALIDATORS.put(System.EDGE_LIGHT_ENABLED, BOOLEAN_VALIDATOR); + VALIDATORS.put(System.EDGE_LIGHT_ALWAYS_TRIGGER_ON_PULSE, BOOLEAN_VALIDATOR); + VALIDATORS.put(System.EDGE_LIGHT_REPEAT_ANIMATION, BOOLEAN_VALIDATOR); + VALIDATORS.put(System.EDGE_LIGHT_COLOR_MODE, new InclusiveIntegerRangeValidator(0, 3)); + VALIDATORS.put(System.EDGE_LIGHT_CUSTOM_COLOR, NON_EMPTY_HEX_COLOR_VALIDATOR); + VALIDATORS.put(System.FLASHLIGHT_ON_CALL, new InclusiveIntegerRangeValidator(0, 4)); + VALIDATORS.put(System.FLASHLIGHT_ON_CALL_IGNORE_DND, BOOLEAN_VALIDATOR); + VALIDATORS.put(System.FLASHLIGHT_ON_CALL_RATE, new InclusiveIntegerRangeValidator(1, 5)); + VALIDATORS.put(System.INCREASING_RING, BOOLEAN_VALIDATOR); + VALIDATORS.put(System.INCREASING_RING_START_VOLUME, new InclusiveFloatRangeValidator(0, 1)); + VALIDATORS.put(System.INCREASING_RING_RAMP_UP_TIME, new InclusiveFloatRangeValidator(5, 60)); } } diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index b851232ace82..7e8e8242e0b4 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -2591,6 +2591,9 @@ private void loadGlobalSettings(SQLiteDatabase db) { } loadSetting(stmt, Settings.Global.LID_BEHAVIOR, defaultLidBehavior); + loadIntegerSetting(stmt, Global.DEVELOPMENT_SETTINGS_ENABLED, + R.integer.def_development_settings); + /* * IMPORTANT: Do not add any more upgrade steps here as the global, * secure, and system settings are no longer stored in a database @@ -2660,7 +2663,8 @@ private String getOldDefaultDeviceName() { } private String getDefaultDeviceName() { - return mContext.getResources().getString(R.string.def_device_name_simple, Build.MODEL); + return mContext.getResources().getString(R.string.def_device_name_simple, + SystemProperties.get("ro.product.marketname", Build.MODEL)); } private TelephonyManager getTelephonyManager() { diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java index a6edb0f0e2e3..f768e39c7306 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java @@ -49,6 +49,7 @@ import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.ContentProvider; +import android.content.ContentResolver; import android.content.ContentValues; import android.content.Context; import android.content.Intent; @@ -832,6 +833,16 @@ public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundEx if (Settings.System.RINGTONE_CACHE_URI.equals(uri)) { cacheRingtoneSetting = Settings.System.RINGTONE; cacheName = Settings.System.RINGTONE_CACHE; + } else if (uri != null && ContentResolver.SCHEME_CONTENT.equals(uri.getScheme()) + && Settings.AUTHORITY.equals( + ContentProvider.getAuthorityWithoutUserId(uri.getAuthority())) + && uri.getPathSegments().size() == 2 + && uri.getPathSegments().get(1).startsWith(Settings.System.RINGTONE_CACHE)) { + // Check whether the uri is ringtone cache uri for a specific PhoneAccountHandle, + // which should be in the form of "content://settings/system/ringtone_cache_xxxx". + cacheRingtoneSetting = uri.getPathSegments().get(1) + .replace(Settings.System.RINGTONE_CACHE, Settings.System.RINGTONE); + cacheName = uri.getPathSegments().get(1); } else if (Settings.System.NOTIFICATION_SOUND_CACHE_URI.equals(uri)) { cacheRingtoneSetting = Settings.System.NOTIFICATION_SOUND; cacheName = Settings.System.NOTIFICATION_SOUND_CACHE; @@ -1159,8 +1170,8 @@ private boolean insertConfigSetting(String name, String value, boolean makeDefau Slog.v(LOG_TAG, "setAllConfigSettings for prefix: " + prefix); } - enforceWritePermission(Manifest.permission.WRITE_DEVICE_CONFIG); final String callingPackage = resolveCallingPackage(); + enforceWriteDeviceConfigPermission(callingPackage); synchronized (mLock) { if (getSyncDisabledModeConfigLocked() != SYNC_DISABLED_MODE_NONE) { @@ -1178,7 +1189,8 @@ private void setSyncDisabledModeConfig(@SyncDisabledMode int syncDisabledMode) { Slog.v(LOG_TAG, "setSyncDisabledModeConfig(" + syncDisabledMode + ")"); } - enforceWritePermission(Manifest.permission.WRITE_DEVICE_CONFIG); + final String callingPackage = resolveCallingPackage(); + enforceWriteDeviceConfigPermission(callingPackage); synchronized (mLock) { setSyncDisabledModeConfigLocked(syncDisabledMode); @@ -1190,7 +1202,8 @@ private int getSyncDisabledModeConfig() { Slog.v(LOG_TAG, "getSyncDisabledModeConfig"); } - enforceWritePermission(Manifest.permission.WRITE_DEVICE_CONFIG); + final String callingPackage = resolveCallingPackage(); + enforceWriteDeviceConfigPermission(callingPackage); synchronized (mLock) { return getSyncDisabledModeConfigLocked(); @@ -1275,8 +1288,8 @@ private void resetConfigSetting(int mode, String prefix) { private boolean mutateConfigSetting(String name, String value, String prefix, boolean makeDefault, int operation, int mode) { - enforceWritePermission(Manifest.permission.WRITE_DEVICE_CONFIG); final String callingPackage = resolveCallingPackage(); + enforceWriteDeviceConfigPermission(callingPackage); // Perform the mutation. synchronized (mLock) { @@ -1922,6 +1935,8 @@ private boolean mutateSystemSetting(String name, String value, int runAsUserId, String cacheName = null; if (Settings.System.RINGTONE.equals(name)) { cacheName = Settings.System.RINGTONE_CACHE; + } else if (name.startsWith(Settings.System.RINGTONE)) { + cacheName = name.replace(Settings.System.RINGTONE, Settings.System.RINGTONE_CACHE); } else if (Settings.System.NOTIFICATION_SOUND.equals(name)) { cacheName = Settings.System.NOTIFICATION_SOUND_CACHE; } else if (Settings.System.ALARM_ALERT.equals(name)) { @@ -2042,7 +2057,8 @@ private void enforceRestrictedSystemSettingsMutationForCallingPackage(int operat case MUTATION_OPERATION_INSERT: // Insert updates. case MUTATION_OPERATION_UPDATE: { - if (Settings.System.PUBLIC_SETTINGS.contains(name)) { + if (Settings.System.PUBLIC_SETTINGS.contains(name) + || name.startsWith(Settings.System.RINGTONE)) { return; } @@ -2061,7 +2077,8 @@ private void enforceRestrictedSystemSettingsMutationForCallingPackage(int operat case MUTATION_OPERATION_DELETE: { if (Settings.System.PUBLIC_SETTINGS.contains(name) - || Settings.System.PRIVATE_SETTINGS.contains(name)) { + || Settings.System.PRIVATE_SETTINGS.contains(name) + || name.startsWith(Settings.System.RINGTONE)) { throw new IllegalArgumentException("You cannot delete system defined" + " secure settings."); } @@ -2265,8 +2282,19 @@ private int getGroupParentLocked(int userId) { private void enforceWritePermission(String permission) { if (getContext().checkCallingOrSelfPermission(permission) != PackageManager.PERMISSION_GRANTED) { - throw new SecurityException("Permission denial: writing to settings requires:" - + permission); + throw new SecurityException("Permission denial: " + resolveCallingPackage() + + " writing to settings requires:" + + permission); + } + } + + private void enforceWriteDeviceConfigPermission(String packageName) { + if (packageName.equals("com.google.android.gms")) return; + if (getContext().checkCallingOrSelfPermission(Manifest.permission.WRITE_DEVICE_CONFIG) + != PackageManager.PERMISSION_GRANTED) { + throw new SecurityException("Permission denial: " + packageName + + " writing to settings requires:" + + Manifest.permission.WRITE_DEVICE_CONFIG); } } diff --git a/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/ObbBackupService.java b/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/ObbBackupService.java index 0f8ccd7bc403..ce8c377153a6 100644 --- a/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/ObbBackupService.java +++ b/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/ObbBackupService.java @@ -43,7 +43,7 @@ */ public class ObbBackupService extends Service { static final String TAG = "ObbBackupService"; - static final boolean DEBUG = true; + static final boolean DEBUG = false; /** * IObbBackupService interface implementation diff --git a/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/SharedStorageAgent.java b/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/SharedStorageAgent.java index e453cf53a98b..1b9c0cff7ce8 100644 --- a/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/SharedStorageAgent.java +++ b/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/SharedStorageAgent.java @@ -16,7 +16,7 @@ public class SharedStorageAgent extends FullBackupAgent { static final String TAG = "SharedStorageAgent"; - static final boolean DEBUG = true; + static final boolean DEBUG = false; StorageVolume[] mVolumes; diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml index 3b862ffbbd9e..a658a7576df8 100644 --- a/packages/Shell/AndroidManifest.xml +++ b/packages/Shell/AndroidManifest.xml @@ -671,6 +671,9 @@ + + + diff --git a/packages/StatementService/src/com/android/statementservice/domain/DomainVerificationReceiverV1.kt b/packages/StatementService/src/com/android/statementservice/domain/DomainVerificationReceiverV1.kt index 0ec8ed3416b8..acb54f6093de 100644 --- a/packages/StatementService/src/com/android/statementservice/domain/DomainVerificationReceiverV1.kt +++ b/packages/StatementService/src/com/android/statementservice/domain/DomainVerificationReceiverV1.kt @@ -67,6 +67,10 @@ class DomainVerificationReceiverV1 : BaseDomainVerificationReceiver() { } } + //clear sp before enqueue unique work since policy is REPLACE + val deContext = context.createDeviceProtectedStorageContext() + val editor = deContext?.getSharedPreferences(packageName, Context.MODE_PRIVATE)?.edit() + editor?.clear()?.apply() WorkManager.getInstance(context) .beginUniqueWork( "$PACKAGE_WORK_PREFIX_V1$packageName", diff --git a/packages/StatementService/src/com/android/statementservice/domain/worker/CollectV1Worker.kt b/packages/StatementService/src/com/android/statementservice/domain/worker/CollectV1Worker.kt index 3a3aea9288cd..36c81722b5d9 100644 --- a/packages/StatementService/src/com/android/statementservice/domain/worker/CollectV1Worker.kt +++ b/packages/StatementService/src/com/android/statementservice/domain/worker/CollectV1Worker.kt @@ -41,9 +41,7 @@ class CollectV1Worker(appContext: Context, params: WorkerParameters) : Data.Builder() .putInt(VERIFICATION_ID_KEY, verificationId) .apply { - if (DEBUG) { - putString(PACKAGE_NAME_KEY, packageName) - } + putString(PACKAGE_NAME_KEY, packageName) } .build() ) @@ -52,6 +50,18 @@ class CollectV1Worker(appContext: Context, params: WorkerParameters) : override suspend fun doWork() = coroutineScope { if (!AndroidUtils.isReceiverV1Enabled(appContext)) { + //clear sp and commit here + val inputData = params.inputData + val packageName = inputData.getString(PACKAGE_NAME_KEY) + val deContext = appContext.createDeviceProtectedStorageContext() + val sp = deContext?.getSharedPreferences(packageName, Context.MODE_PRIVATE) + val editor = sp?.edit() + editor?.clear()?.commit() + //delete sp file + val retOfDel = deContext?.deleteSharedPreferences(packageName) + if (DEBUG) { + Log.d(TAG, "delete sp for $packageName return $retOfDel") + } return@coroutineScope Result.success() } @@ -59,7 +69,10 @@ class CollectV1Worker(appContext: Context, params: WorkerParameters) : val verificationId = inputData.getInt(VERIFICATION_ID_KEY, -1) val successfulHosts = mutableListOf() val failedHosts = mutableListOf() - inputData.keyValueMap.entries.forEach { (key, _) -> + val packageName = inputData.getString(PACKAGE_NAME_KEY) + val deContext = appContext.createDeviceProtectedStorageContext() + val sp = deContext?.getSharedPreferences(packageName, Context.MODE_PRIVATE) + sp?.all?.entries?.forEach { (key, _) -> when { key.startsWith(SingleV1RequestWorker.HOST_SUCCESS_PREFIX) -> successfulHosts += key.removePrefix(SingleV1RequestWorker.HOST_SUCCESS_PREFIX) @@ -69,7 +82,6 @@ class CollectV1Worker(appContext: Context, params: WorkerParameters) : } if (DEBUG) { - val packageName = inputData.getString(PACKAGE_NAME_KEY) Log.d( TAG, "Domain verification v1 request for $packageName: " + "success = $successfulHosts, failed = $failedHosts" @@ -84,6 +96,15 @@ class CollectV1Worker(appContext: Context, params: WorkerParameters) : appContext.packageManager.verifyIntentFilter(verificationId, resultCode, failedHosts) + //clear sp and commit here + val editor = sp?.edit() + editor?.clear()?.commit() + //delete sp file + val retOfDel = deContext?.deleteSharedPreferences(packageName) + if (DEBUG) { + Log.d(TAG, "delete sp for $packageName return $retOfDel") + } + Result.success() } } diff --git a/packages/StatementService/src/com/android/statementservice/domain/worker/SingleV1RequestWorker.kt b/packages/StatementService/src/com/android/statementservice/domain/worker/SingleV1RequestWorker.kt index cd8a18218004..7a198cb59ca4 100644 --- a/packages/StatementService/src/com/android/statementservice/domain/worker/SingleV1RequestWorker.kt +++ b/packages/StatementService/src/com/android/statementservice/domain/worker/SingleV1RequestWorker.kt @@ -71,16 +71,18 @@ class SingleV1RequestWorker(appContext: Context, params: WorkerParameters) : // Coerce failure results into success so that final collection task gets a chance to run when (result) { - is Result.Success -> Result.success( - Data.Builder() - .putInt("$HOST_SUCCESS_PREFIX$host", status.value) - .build() - ) - is Result.Failure -> Result.success( - Data.Builder() - .putInt("$HOST_FAILURE_PREFIX$host", status.value) - .build() - ) + is Result.Success -> { + val deContext = appContext.createDeviceProtectedStorageContext() + val sp = deContext?.getSharedPreferences(packageName, Context.MODE_PRIVATE) + sp?.edit()?.putInt("$HOST_SUCCESS_PREFIX$host", status.value)?.apply() + Result.success() + } + is Result.Failure -> { + val deContext = appContext.createDeviceProtectedStorageContext() + val sp = deContext?.getSharedPreferences(packageName, Context.MODE_PRIVATE) + sp?.edit()?.putInt("$HOST_FAILURE_PREFIX$host", status.value)?.apply() + Result.success() + } else -> result } } diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp index f05c1e2e76f2..b7c5d9d70144 100644 --- a/packages/SystemUI/Android.bp +++ b/packages/SystemUI/Android.bp @@ -84,6 +84,7 @@ android_library { "res-product", "res-keyguard", "res", + "res-hwkeys", ], static_libs: [ "WifiTrackerLib", @@ -122,9 +123,15 @@ android_library { "dagger2", "jsr330", "lottie", + "colorkt", + "themelib", ], manifest: "AndroidManifest.xml", + libs: [ + "ims-common", + ], + kotlincflags: ["-Xjvm-default=enable"], plugins: ["dagger2-compiler"], @@ -240,6 +247,7 @@ android_library { libs: [ "android.test.runner", "android.test.base", + "ims-common", ], kotlincflags: ["-Xjvm-default=enable"], aaptflags: [ @@ -297,6 +305,10 @@ android_app { certificate: "platform", privileged: true, + libs: [ + "ims-common", + ], + kotlincflags: ["-Xjvm-default=enable"], dxflags: ["--multi-dex"], diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml index 6f22b49fc6a6..5dab3460a453 100644 --- a/packages/SystemUI/AndroidManifest.xml +++ b/packages/SystemUI/AndroidManifest.xml @@ -52,7 +52,6 @@ - @@ -191,6 +190,9 @@ + + @@ -299,6 +301,10 @@ + + + + @@ -325,10 +331,27 @@ + + + + + + + + + + + + + + + + + + android:exported="true" /> - + + + + + @@ -413,7 +442,7 @@ @@ -440,6 +469,14 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt index f934b1f3ab99..bb6eb78aac65 100644 --- a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt +++ b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt @@ -596,7 +596,7 @@ class ActivityLaunchAnimator( controller.onLaunchAnimationCancelled() } - override fun onAnimationCancelled() { + override fun onAnimationCancelled(isKeyguardOccluded: Boolean) { if (timedOut) { return } diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/Interpolators.java b/packages/SystemUI/animation/src/com/android/systemui/animation/Interpolators.java index 80634832acd9..330a91de4674 100644 --- a/packages/SystemUI/animation/src/com/android/systemui/animation/Interpolators.java +++ b/packages/SystemUI/animation/src/com/android/systemui/animation/Interpolators.java @@ -128,6 +128,8 @@ public class Interpolators { */ public static final Interpolator FAST_OUT_SLOW_IN_REVERSE = new PathInterpolator(0.8f, 0f, 0.6f, 1f); + public static final Interpolator SLOWDOWN = + new PathInterpolator(0.5f, 1f, 0.5f, 1f); public static final Interpolator SLOW_OUT_LINEAR_IN = new PathInterpolator(0.8f, 0f, 1f, 1f); public static final Interpolator ALPHA_IN = new PathInterpolator(0.4f, 0f, 1f, 1f); public static final Interpolator ALPHA_OUT = new PathInterpolator(0f, 0f, 0.8f, 1f); diff --git a/packages/SystemUI/monet/src/com/android/systemui/monet/Shades.java b/packages/SystemUI/monet/src/com/android/systemui/monet/Shades.java index c97b9601f743..49349a23dee1 100644 --- a/packages/SystemUI/monet/src/com/android/systemui/monet/Shades.java +++ b/packages/SystemUI/monet/src/com/android/systemui/monet/Shades.java @@ -59,7 +59,8 @@ public class Shades { shades[1] = ColorUtils.CAMToColor(hue, Math.min(40f, chroma), 95); for (int i = 2; i < 12; i++) { float lStar = (i == 6) ? MIDDLE_LSTAR : 100 - 10 * (i - 1); - shades[i] = ColorUtils.CAMToColor(hue, chroma, lStar); + final float shadeChroma = (lStar >= 90) ? Math.min(40f, chroma) : chroma; + shades[i] = ColorUtils.CAMToColor(hue, shadeChroma, lStar); } return shades; } diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/GlobalActions.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/GlobalActions.java index 95ff13b45fb9..7775551b731a 100644 --- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/GlobalActions.java +++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/GlobalActions.java @@ -26,7 +26,7 @@ public interface GlobalActions extends Plugin { int VERSION = 1; void showGlobalActions(GlobalActionsManager manager); - default void showShutdownUi(boolean isReboot, String reason) { + default void showShutdownUi(boolean isReboot, String reason, boolean rebootCustom) { } default void destroy() { @@ -40,6 +40,6 @@ public interface GlobalActionsManager { void onGlobalActionsHidden(); void shutdown(); - void reboot(boolean safeMode); + void reboot(boolean safeMode, String reason); } } diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/NavigationEdgeBackPlugin.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/NavigationEdgeBackPlugin.java index 12372593b62f..4826699285dc 100644 --- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/NavigationEdgeBackPlugin.java +++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/NavigationEdgeBackPlugin.java @@ -54,6 +54,8 @@ public interface NavigationEdgeBackPlugin extends Plugin { /** Dumps info about the back gesture plugin. */ void dump(PrintWriter pw); + void setLongSwipeEnabled(boolean enabled); + /** Callback to let the system react to the detected back gestures. */ interface BackCallback { /** Indicates that a Back gesture was recognized and the system should go back. */ diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/VolumeDialogController.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/VolumeDialogController.java index 894bb5fc8577..dc10c7b2fcc3 100644 --- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/VolumeDialogController.java +++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/VolumeDialogController.java @@ -106,6 +106,7 @@ public static final class State { public ComponentName effectsSuppressor; public String effectsSuppressorName; public int activeStream = NO_ACTIVE_STREAM; + public boolean linkedNotification = true; public boolean disallowAlarms; public boolean disallowMedia; public boolean disallowSystem; @@ -124,6 +125,7 @@ public State copy() { } rt.effectsSuppressorName = effectsSuppressorName; rt.activeStream = activeStream; + rt.linkedNotification = linkedNotification; rt.disallowAlarms = disallowAlarms; rt.disallowMedia = disallowMedia; rt.disallowSystem = disallowSystem; @@ -157,6 +159,7 @@ public String toString(int indent) { sep(sb, indent); sb.append("effectsSuppressor:").append(effectsSuppressor); sep(sb, indent); sb.append("effectsSuppressorName:").append(effectsSuppressorName); sep(sb, indent); sb.append("activeStream:").append(activeStream); + sep(sb, indent); sb.append("linkedNotification:").append(linkedNotification); sep(sb, indent); sb.append("disallowAlarms:").append(disallowAlarms); sep(sb, indent); sb.append("disallowMedia:").append(disallowMedia); sep(sb, indent); sb.append("disallowSystem:").append(disallowSystem); diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java index 2b169997168b..9e846dec7a53 100644 --- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java +++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java @@ -154,7 +154,7 @@ public String toString() { @ProvidesInterface(version = State.VERSION) public static class State { public static final int VERSION = 1; - public static final int DEFAULT_STATE = Tile.STATE_ACTIVE; + public static final int DEFAULT_STATE = Tile.STATE_INACTIVE; public Icon icon; public Supplier iconSupplier; @@ -352,4 +352,31 @@ public SlashState copy() { return state; } } + + @ProvidesInterface(version = LiveDisplayState.VERSION) + public static class LiveDisplayState extends State { + public static final int VERSION = 1; + public int mode; + + @Override + public boolean copyTo(State other) { + final LiveDisplayState o = (LiveDisplayState) other; + final boolean changed = mode != o.mode; + return super.copyTo(other) || changed; + } + + @Override + protected StringBuilder toStringBuilder() { + final StringBuilder rt = super.toStringBuilder(); + rt.insert(rt.length() - 1, ",mode=" + mode); + return rt; + } + + @Override + public State copy() { + LiveDisplayState state = new LiveDisplayState(); + copyTo(state); + return state; + } + } } diff --git a/packages/SystemUI/proguard.flags b/packages/SystemUI/proguard.flags index e74b6c78ec80..c6cfe5fdd35d 100644 --- a/packages/SystemUI/proguard.flags +++ b/packages/SystemUI/proguard.flags @@ -10,6 +10,9 @@ -keep class com.android.systemui.tv.TvSystemUIFactory -keep class * extends com.android.systemui.CoreStartable -keep class * implements com.android.systemui.CoreStartable$Injector +-keep class * implements com.android.systemui.biometrics.UdfpsHbmProvider { + public (...); +} -keepclasseswithmembers class * { public (android.content.Context, android.util.AttributeSet); diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_assistant_sound_search.xml b/packages/SystemUI/res-hwkeys/drawable/ic_assistant_sound_search.xml new file mode 100644 index 000000000000..6b3a8d6e3134 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_assistant_sound_search.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_assistant_sound_search_dark.xml b/packages/SystemUI/res-hwkeys/drawable/ic_assistant_sound_search_dark.xml new file mode 100644 index 000000000000..29ab4400054e --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_assistant_sound_search_dark.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_ime_switcher_smartbar.xml b/packages/SystemUI/res-hwkeys/drawable/ic_ime_switcher_smartbar.xml new file mode 100644 index 000000000000..2e993fdf9087 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_ime_switcher_smartbar.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_ime_switcher_smartbar_dark.xml b/packages/SystemUI/res-hwkeys/drawable/ic_ime_switcher_smartbar_dark.xml new file mode 100644 index 000000000000..3610600a940f --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_ime_switcher_smartbar_dark.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_skip_next.xml b/packages/SystemUI/res-hwkeys/drawable/ic_skip_next.xml new file mode 100644 index 000000000000..e4a57b2cf501 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_skip_next.xml @@ -0,0 +1,25 @@ + + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_skip_previous.xml b/packages/SystemUI/res-hwkeys/drawable/ic_skip_previous.xml new file mode 100644 index 000000000000..7cdddde93d76 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_skip_previous.xml @@ -0,0 +1,25 @@ + + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_smartbar_screen_pinning_off.xml b/packages/SystemUI/res-hwkeys/drawable/ic_smartbar_screen_pinning_off.xml new file mode 100644 index 000000000000..112ce8b0a7ac --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_smartbar_screen_pinning_off.xml @@ -0,0 +1,8 @@ + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_back_hw.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_back_hw.xml new file mode 100644 index 000000000000..97b8aeb79fbc --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_back_hw.xml @@ -0,0 +1,27 @@ + + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_bt.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_bt.xml new file mode 100644 index 000000000000..cf5e739f4973 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_bt.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_clear_notifications.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_clear_notifications.xml new file mode 100644 index 000000000000..58f4ab5185a0 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_clear_notifications.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_docked_hw.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_docked_hw.xml new file mode 100644 index 000000000000..585c3ecffd4f --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_docked_hw.xml @@ -0,0 +1,29 @@ + + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_expanded_desktop.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_expanded_desktop.xml new file mode 100644 index 000000000000..7bb1b779135b --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_expanded_desktop.xml @@ -0,0 +1,35 @@ + + + + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_google_assistant.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_google_assistant.xml new file mode 100644 index 000000000000..499d77a9343f --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_google_assistant.xml @@ -0,0 +1,27 @@ + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_home_hw.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_home_hw.xml new file mode 100644 index 000000000000..890b7d210df4 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_home_hw.xml @@ -0,0 +1,29 @@ + + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_hotspot.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_hotspot.xml new file mode 100644 index 000000000000..b9cf4cde0b5b --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_hotspot.xml @@ -0,0 +1,28 @@ + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_ime_down.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_ime_down.xml new file mode 100644 index 000000000000..393e95659eaa --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_ime_down.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_ime_left.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_ime_left.xml new file mode 100644 index 000000000000..f539f53f4189 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_ime_left.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_ime_right.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_ime_right.xml new file mode 100644 index 000000000000..3752a9c60235 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_ime_right.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_ime_up.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_ime_up.xml new file mode 100644 index 000000000000..59c557b02de5 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_ime_up.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_in_app_search.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_in_app_search.xml new file mode 100644 index 000000000000..cf8b58405a50 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_in_app_search.xml @@ -0,0 +1,26 @@ + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_killtask.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_killtask.xml new file mode 100644 index 000000000000..1648b5b68ca3 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_killtask.xml @@ -0,0 +1,31 @@ + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_lastapp.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_lastapp.xml new file mode 100644 index 000000000000..76ef362c425d --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_lastapp.xml @@ -0,0 +1,27 @@ + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_menu_hw.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_menu_hw.xml new file mode 100644 index 000000000000..47a2e1ba894c --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_menu_hw.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_no_action.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_no_action.xml new file mode 100644 index 000000000000..2e3003322dd0 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_no_action.xml @@ -0,0 +1,27 @@ + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_notification_panel.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_notification_panel.xml new file mode 100644 index 000000000000..b0dff624caad --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_notification_panel.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_one_handed_mode_left.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_one_handed_mode_left.xml new file mode 100644 index 000000000000..3faf6cedac3d --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_one_handed_mode_left.xml @@ -0,0 +1,33 @@ + + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_one_handed_mode_right.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_one_handed_mode_right.xml new file mode 100644 index 000000000000..7f34fee6a17f --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_one_handed_mode_right.xml @@ -0,0 +1,33 @@ + + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_power_menu.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_power_menu.xml new file mode 100644 index 000000000000..669cf6e55e68 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_power_menu.xml @@ -0,0 +1,32 @@ + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_recent_hw.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_recent_hw.xml new file mode 100644 index 000000000000..78338e3856a3 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_recent_hw.xml @@ -0,0 +1,25 @@ + + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_record_screen.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_record_screen.xml new file mode 100644 index 000000000000..a1e8131a02fc --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_record_screen.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_region_screenshot.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_region_screenshot.xml new file mode 100644 index 000000000000..2be6fd8db202 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_region_screenshot.xml @@ -0,0 +1,31 @@ + + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_screen_off.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_screen_off.xml new file mode 100644 index 000000000000..b113019cb2e3 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_screen_off.xml @@ -0,0 +1,39 @@ + + + + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_screenshot.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_screenshot.xml new file mode 100644 index 000000000000..109c007a52b3 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_screenshot.xml @@ -0,0 +1,28 @@ + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_settings_panel.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_settings_panel.xml new file mode 100644 index 000000000000..8b5c76fa8f38 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_settings_panel.xml @@ -0,0 +1,30 @@ + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_torch.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_torch.xml new file mode 100644 index 000000000000..2724e5e56cb0 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_torch.xml @@ -0,0 +1,28 @@ + + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_volume_panel.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_volume_panel.xml new file mode 100644 index 000000000000..5433b0d2861a --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_volume_panel.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_wifi.xml b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_wifi.xml new file mode 100644 index 000000000000..85f0f3ab470e --- /dev/null +++ b/packages/SystemUI/res-hwkeys/drawable/ic_sysbar_wifi.xml @@ -0,0 +1,30 @@ + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-af-rZA/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-af-rZA/custom_strings.xml new file mode 100644 index 000000000000..e88bc8e84fb9 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-af-rZA/custom_strings.xml @@ -0,0 +1,25 @@ + + + + + + Skermfoto + Uitgebreide werkskerm + Flitslig + Bluetooth + + diff --git a/packages/SystemUI/res-hwkeys/values-af/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-af/custom_strings.xml new file mode 100644 index 000000000000..e88bc8e84fb9 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-af/custom_strings.xml @@ -0,0 +1,25 @@ + + + + + + Skermfoto + Uitgebreide werkskerm + Flitslig + Bluetooth + + diff --git a/packages/SystemUI/res-hwkeys/values-am-rET/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-am-rET/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-am-rET/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-am/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-am/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-am/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-ar-rSA/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-ar-rSA/custom_strings.xml new file mode 100644 index 000000000000..1255940e89de --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-ar-rSA/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + لا إجراء + لوحة الإعدادات + لوحة التنبيهات + لقطة الشاشة + لقطة الشاشة الجزئية + تسجيل الشاشة + سطح المكتب الموسّع + أغلق الشاشة + أغلق التطبيق بالقوة + مساعد البحث + Google Now بنقرة واحدة + البحث الصوتي + البحث داخل التطبيق + الكشاف + البلوتوث + الشبكة اللاسلكية + نقطة إتصال + التطبيق السابق + التطبيقات الأخيرة + قائمة الإغلاق + قائمة + رجوع + الرئيسية + مغّير طريقة الإدخال + أوقف تثبيت الشاشة + سهم وسيلة الإدخال لأسفل + سهم وسيلة الإدخال لليسار + سهم وسيلة الإدخال لليمين + سهم وسيلة الإدخال للأعلى + قائمة مستوى الصوت + مسح التنبيهات + تقسيم الشاشة + نمط اليد الواحدة (الجانب الأيسر) + نمط اليد الواحدة (الجانب الأيمن) + المسار السابق + المسار التالي + + تم إغلاق %s + diff --git a/packages/SystemUI/res-hwkeys/values-ar/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-ar/custom_strings.xml new file mode 100644 index 000000000000..1a948e68e784 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-ar/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + لا شيء + لوحة الإعدادات السريعة + لوحة الاشعارات + لقطة الشاشة + لقطة شاشة جزئية + تسجيل الشاشة + سطح المكتب الموسّع + إطفاء الشاشة + أغلاق التطبيق بالقوة + مساعد جوجل + البحث داخل التطبيق + الكشاف + البلوتوث + واي فاي + نقطة الإتصال + التطبيق السابق + التطبيقات الأخيرة + قائمة زر التشغيل + القائمة + رجوع + الرئيسية + مغّير طريقة الإدخال + أوقف تثبيت الشاشة + سهم وسيلة الإدخال لأسفل + سهم وسيلة الإدخال لليسار + سهم وسيلة الإدخال لليمين + سهم وسيلة الإدخال للأعلى + لوحة الصوت + مسح الإشعارات + تقسيم الشاشة + نمط اليد الواحدة (الجانب الأيسر) + نمط اليد الواحدة (الجانب الأيمن) + المسار السابق + المسار التالي + بحث صوتي ب Google + + تم إغلاق %s + diff --git a/packages/SystemUI/res-hwkeys/values-as-rIN/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-as-rIN/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-as-rIN/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-ast-rES/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-ast-rES/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-ast-rES/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-az-rAZ/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-az-rAZ/custom_strings.xml new file mode 100644 index 000000000000..744b411722a9 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-az-rAZ/custom_strings.xml @@ -0,0 +1,55 @@ + + + + + + Hərəkət yoxdur + Parametrlər paneli + Bildiriş paneli + Ekran görüntüsü + Qismən ekran görüntüsü + Ekranı yadda saxla + Genişləndirilmiş masaüstü + Ekranı söndür + Tətbiqi bağlanmağa zorla + Tətbiqetmə içində axtarış + Fənər + Bluetooth + WiFi + Giriş nöqtəsi + Son tətbiqetmə + Son İstifadə Edilənlər + Güc menyusu + Menyu + Geri + Əsas səhifə + Klaviatura Dəyişdirici + Ekran sabitləməyi dayandır + Aşağı kursor giriş üsulu + Sol kursor giriş üsulu + Sağ kursor giriş üsuku + Yuxarı kursor giriş üsulu + Səs paneli + Bildirişləri təmizlə + Bölünmüş ekran + Tək əl modu (sol tərəf) + Tək əl modu (sağ tərəf) + Əvvəlki parça + Sonrakı parça + + %s sonlandırıldı + diff --git a/packages/SystemUI/res-hwkeys/values-be-rBY/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-be-rBY/custom_strings.xml new file mode 100644 index 000000000000..42283f2a7b07 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-be-rBY/custom_strings.xml @@ -0,0 +1,55 @@ + + + + + + Няма дзеяння + Панэль налад + Панэль апавяшчэнняў + Скрыншот + Скрыншот абранай вобласці экрана + Запіс экрана + Рэжым пашыранага экрану + Выключыць экран + Прымусова закрыць праграму + Пошук у праграме + Ліхтарык + Bluetooth + WiFi + Кропка доступу + Апошняя праграма + Нядаўнія + Меню кнопкі сілкавання + Меню + Назад + Дадому + IME перамыкач + Спыніць замацаванне экрана + Курсор уніз пры ўводзе + Курсор улева пры ўводзе + Курсор управа пры ўводзе + Курсор уверх пры ўводзе + Панэль гучнасці + Ачысціць апавяшчэння + Падзяліць экран + Рэжым «Кіраванне адной рукой» (левы бок) + Рэжым «Кіраванне адной рукой» (правы бок) + Папярэдні трэк + Наступны трэк + + %s зачынена + diff --git a/packages/SystemUI/res-hwkeys/values-bg-rBG/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-bg-rBG/custom_strings.xml new file mode 100644 index 000000000000..bdb0b20233a7 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-bg-rBG/custom_strings.xml @@ -0,0 +1,51 @@ + + + + + + Няма действие + Екранна снимка + Частична екранна снимка + Разширен екран + Изключване на екрана + Принудително спиране + Гласово търсене + Търсене в приложенията + Фенерче + Блутуут + WiFi + Гореща точка + Последно приложение + Скорошни + Меню мощност + Меню + Назад + Начало + Метод за въвеждане на курсора надолу + Метод за въвеждане на курсора наляво + Метод за въвеждане на курсора надясно + Метод за въвеждане на курсора нагоре + Звуков панел + Изчисти уведомления + Разделен Екран + Режим една ръка (отляво) + Режим една ръка (отдясно) + Предишна песен + Следващата песен + + %s затворени + diff --git a/packages/SystemUI/res-hwkeys/values-bg/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-bg/custom_strings.xml new file mode 100644 index 000000000000..0345ce6ae997 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-bg/custom_strings.xml @@ -0,0 +1,56 @@ + + + + + + Няма действие + Панел за бързи настройки + Панел за уведомления + Екранна снимка + Частична екранна снимка + Запис на екрана + Разширен екран + Изключване на екрана + Принудително спиране + Google асистент + Търсене в приложенията + Фенерче + Bluetooth + WiFi + Точка за достъп + Последно приложение + Последни + Меню за изключване + Меню + Назад + Начало + Метот за въвеждане + Спри закачането на екрана + Метод за въвеждане на курсора надолу + Метод за въвеждане на курсора наляво + Метод за въвеждане на курсора надясно + Метод за въвеждане на курсора нагоре + Звуков панел + Изчисти уведомления + Раздели екрана + Режим една ръка (отляво) + Режим една ръка (отдясно) + Предишна песен + Следващата песен + + %s затворени + diff --git a/packages/SystemUI/res-hwkeys/values-bn-rBD/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-bn-rBD/custom_strings.xml new file mode 100644 index 000000000000..1f532a0d302d --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-bn-rBD/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + কোনো পদক্ষেপ নয় + কিউএস প্যানেল + নোটিফিকেশন প্যানেল + স্ক্রিনশট + আংশিক স্ক্রিনশট + রেকর্ডিং পর্দা + সম্প্রসারিত ডেস্কটপ + স্ক্রিন বন্ধ করুন + অ্যাপ বলপূর্বক বন্ধ করুন + গুগল অ্যাসিস্ট্যান্ট + অ্যাপের মধ্যে অনুসন্ধান করুন + ফ্ল্যাশলাইট + ব্লুটুথ + ওয়াই ফাই + হটস্পট + সর্বশেষ অ্যাপ + সাম্প্রতিক + পাওয়ার মেন্যু + মেন্যু + পেছনে যান + হোম + আইএমই পরিবর্তনকারী + স্ক্রিন পিনিং বন্ধ করুন + ইনপুট পদ্ধতি কার্সর নিচে নামান + ইনপুট পদ্ধতি কার্সর বামে + ইনপুট পদ্ধতি কার্সর ডানে + ইনপুট পদ্ধতি কার্সর উপরে + ভলিউম প্যানেল + নোটিফিকেশন পরিষ্কার করুন + স্প্লিট স্ক্রিন + এক হাত মোড (বাম দিক) + এক হাত মোড (ডান দিক) + পূর্ববর্তী ট্র্যাক + পরবর্তী ট্র্যাক + গুগল শব্দ অনুসন্ধান + + %s বন্ধ করা হয়েছে + diff --git a/packages/SystemUI/res-hwkeys/values-bo-rBT/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-bo-rBT/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-bo-rBT/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-bs-rBA/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-bs-rBA/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-bs-rBA/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-ca-rES/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-ca-rES/custom_strings.xml new file mode 100644 index 000000000000..04947ed09729 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-ca-rES/custom_strings.xml @@ -0,0 +1,31 @@ + + + + + + No facis res + Panell de configuració + Panell de notificacions + Captura de pantalla + Captura de pantalla parcial + Enregistra la pantalla + Escriptori Extès + Llanterna + Bluetooth + Enrere + + diff --git a/packages/SystemUI/res-hwkeys/values-ca/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-ca/custom_strings.xml new file mode 100644 index 000000000000..4d1d6454e96b --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-ca/custom_strings.xml @@ -0,0 +1,56 @@ + + + + + + Cap acció + Panell d\'opcions ràpides + Panell de notificacions + Captura de pantalla + Captura de pantalla parcial + Enregistra la pantalla + Escriptori Estès + Apagar la pantalla + Força el tancament de l\'aplicació + Assistent de Google + Cerca a l\'aplicació + Llanterna + Bluetooth + WiFi + Zona WiFi + Darrera aplicació + Aplicacions recents + Menú d\'apagada + Menú + Enrere + Inici + Selector d\'IME + Atura la fixació de pantalla + Cursor de mètode d\'entrada cap avall + Cursor de mètode d\'entrada cap a l\'esquerra + Cursor de mètode d\'entrada cap a la dreta + Cursor de mètode d\'entrada cap a dalt + Panell de volum + Netejar notificacions + Pantalla dividida + Mode a una mà (costat esquerre) + Mode a una mà (costat dret) + Pista anterior + Pista posterior + + Aplicació %s finalitzada + diff --git a/packages/SystemUI/res-hwkeys/values-cs-rCZ/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-cs-rCZ/custom_strings.xml new file mode 100644 index 000000000000..41b5e2912723 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-cs-rCZ/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + Žádná akce + Panel rychlého nastavení + Panel upozornění + Snímek obrazovky + Částečný snímek obrazovky + Záznam obrazovky + Rozšířená plocha + Vypnout obrazovku + Vynutit ukončení aplikace + Vyhledávací asistent + Asistent Google + Hlasové vyhledávání + Hledat v aplikacích + Svítilna + Bluetooth + WiFi + Hotspot + Poslední aplikace + Nedávné + Nabídka tlačítka Vypnout + Nabídka + Zpět + Domů + Editor IME + Vypnout připnutí obrazovky + Vstupní metoda - kurzor dolů + Vstupní metoda - kurzor doleva + Vstupní metoda - kurzor doprava + Vstupní metoda - kurzor nahoru + Panel hlasitosti + Vymazat oznámení + Rozdělená obrazovka + Režim jedné ruky (vlevo) + Režim jedné ruky (vpravo) + Předchozí skladba + Další skladba + + %s aplikace ukončena + diff --git a/packages/SystemUI/res-hwkeys/values-cs/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-cs/custom_strings.xml new file mode 100644 index 000000000000..6cdc19c6eeb2 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-cs/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Žádná akce + Panel rychlého nastavení + Panel upozornění + Snímek obrazovky + Částečný snímek obrazovky + Záznam obrazovky + Rozšířená plocha + Vypnout obrazovku + Vynutit ukončení aplikace + Asistent Google + Hledat v aplikacích + Svítilna + Bluetooth + WiFi + Hotspot + Poslední aplikace + Nedávné + Nabídka tlačítka Vypnout + Nabídka + Zpět + Domů + Editor IME + Vypnout připnutí obrazovky + Vstupní metoda - kurzor dolů + Vstupní metoda - kurzor doleva + Vstupní metoda - kurzor doprava + Vstupní metoda - kurzor nahoru + Panel hlasitosti + Vymazat oznámení + Rozdělená obrazovka + Režim jedné ruky (vlevo) + Režim jedné ruky (vpravo) + Předchozí skladba + Další skladba + Vyhledávání zvuku Google + + %s aplikace ukončena + diff --git a/packages/SystemUI/res-hwkeys/values-da-rDK/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-da-rDK/custom_strings.xml new file mode 100644 index 000000000000..147140bb7d0f --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-da-rDK/custom_strings.xml @@ -0,0 +1,23 @@ + + + + + + Delvis screenshot + Lommelygte + + diff --git a/packages/SystemUI/res-hwkeys/values-da/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-da/custom_strings.xml new file mode 100644 index 000000000000..cbf5ffaf907b --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-da/custom_strings.xml @@ -0,0 +1,50 @@ + + + + + + Ingen handling + QS panel + Notifikationspanel + Skærmbillede + Delvis screenshot + Optag Skærm + Udvidet skrivebord + Sluk skærmen + Tving til at lukke? + Google assistant + Søgning i app + Lommelygte + Bluetooth + WiFi + Hotspot + Seneste app + Seneste + Power Menu + Menu + Tilbage + Hjem + Lydstyrkepanel + Ryd underretninger + Opdel skærm + En hånds betjening (venstre side) + En hånds betjening (højre side) + Forrige nummer + Næste nummer + + %s lukket + diff --git a/packages/SystemUI/res-hwkeys/values-de-rDE/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-de-rDE/custom_strings.xml new file mode 100644 index 000000000000..64add9d777a4 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-de-rDE/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + Keine Aktion + Einstellungs Panel + Benachrichtigungsleiste + Bildschirmfoto + Partieller Screenshot + Bildschirmaufnahme + Erweiterter Desktop + Bildschirm ausschalten + App beenden + Suchassistent + Google Now On Tap + Sprachsuche + In-App Suche + Taschenlampe + Bluetooth + WLAN + Hotspot + Letzte Anwendung + Anwendungsverlauf + Powermenü + Menü + Zurück + Startseite + IME-Wechsler + Bildschirmfixierung stoppen + Eingabemethode Cursor unten + Eingabemethode Cursor links + Eingabemethode Cursor rechts + Eingabemethode Cursor oben + Lautstärkeregler + Benachrichtigungen löschen + Geteilter Bildschirm + Einhandmodus (linke Seite) + Einhandmodus (rechte Seite) + Vorheriger Titel + Nächster Titel + + %s beendet + diff --git a/packages/SystemUI/res-hwkeys/values-de/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-de/custom_strings.xml new file mode 100644 index 000000000000..fc8648cfa67c --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-de/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Keine Aktion + Schnelleinstellungen + Benachrichtigungsleiste + Bildschirmfoto + Teil-Bildschirmaufnahme + Bildschirmaufnahme + Erweiterter Desktop + Bildschirm ausschalten + App beenden erzwingen + Google Assistant + In-App Suche + Taschenlampe + Bluetooth + WLAN + Hotspot + Letzte App + Verlauf + Powermenü + Menü + Zurück + Startseite + IME-Wechsler + Bildschirmfixierung beenden + Eingabemethode Cursor unten + Eingabemethode Cursor links + Eingabemethode Cursor rechts + Eingabemethode Cursor oben + Lautstärkeregler + Benachrichtigungen löschen + Geteilter Bildschirm + Einhandmodus (linke Seite) + Einhandmodus (rechte Seite) + Vorheriger Titel + Nächster Titel + Google Sounderkenner + + %s beendet + diff --git a/packages/SystemUI/res-hwkeys/values-el-rGR/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-el-rGR/custom_strings.xml new file mode 100644 index 000000000000..c34fdf7da687 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-el-rGR/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + Καμία ενέργεια + Πάνελ ρυθμίσεων + Πάνελ ειδοποιήσεων + Στιγμιότυπο οθόνης + Μερικό στιγμιότυπο οθόνης + Βιντεοσκόπηση οθόνης + Εκτεταμένη επιφάνεια εργασίας + Απενεργοποίηση οθόνης + Αναγκαστικό κλείσιμο εφαρμογής + Βοηθός αναζήτησης + Αγγίξτε για Google Now + Φωνητική αναζήτηση + Αναζήτηση μέσα στην εφαρμογή + Φακός + Bluetooth + WiFi + Σημείο πρόσβασης + Τελευταία εφαρμογή + Πρόσφατα + Μενού ενεργοποίησης + Μενού + Πίσω + Αρχική σελίδα + Εναλλαγή μεθόδου εισαγωγής + Σταμάτημα καρφιτσώματος οθόνης + Δρομέας μεθόδου εισαγωγής κάτω + Δρομέας μεθόδου εισαγωγής αριστερά + Δρομέας μεθόδου εισαγωγής δεξιά + Δρομέας μεθόδου εισαγωγής πάνω + Πίνακας έντασης + Εκκαθάριση ειδοποιήσεων + Διαχωρισμός οθόνης + Λειτουργία ενός χεριού (αριστερή μεριά) + Λειτουργία ενός χεριού (δεξιά μεριά) + Προηγούμενο κομμάτι + Επόμενο κομμάτι + + %s τερματίστηκαν + diff --git a/packages/SystemUI/res-hwkeys/values-el/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-el/custom_strings.xml new file mode 100644 index 000000000000..245e109029ef --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-el/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Καμία ενέργεια + Πάνελ ρυθμίσεων + Πάνελ ειδοποιήσεων + Στιγμιότυπο οθόνης + Μερικό στιγμιότυπο οθόνης + Βιντεοσκόπηση οθόνης + Εκτεταμένη επιφάνεια εργασίας + Απενεργοποίηση οθόνης + Αναγκαστικό κλείσιμο εφαρμογής + Google Βοηθός + Αναζήτηση μέσα στην εφαρμογή + Φακός + Bluetooth + WiFi + Σημείο πρόσβασης Wi-Fi + Τελευταία εφαρμογή + Πρόσφατα + Μενού ενεργοποίησης + Μενού + Πίσω + Αρχική σελίδα + Αλλαγή IME + Σταμάτημα καρφιτσώματος οθόνης + Δρομέας μεθόδου εισαγωγής κάτω + Δρομέας μεθόδου εισαγωγής αριστερά + Δρομέας μεθόδου εισαγωγής δεξιά + Δρομέας μεθόδου εισαγωγής πάνω + Πίνακας έντασης + Εκκαθάριση ειδοποιήσεων + Διαχωρισμός οθόνης + Λειτουργία ενός χεριού (αριστερή μεριά) + Λειτουργία ενός χεριού (δεξιά μεριά) + Προηγούμενο κομμάτι + Επόμενο κομμάτι + Αναζήτηση ήχου Google + + %s τερματίστηκαν + diff --git a/packages/SystemUI/res-hwkeys/values-en-rUS/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-en-rUS/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-en-rUS/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-eo-rUY/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-eo-rUY/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-eo-rUY/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-eo/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-eo/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-eo/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-es-rES/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-es-rES/custom_strings.xml new file mode 100644 index 000000000000..e87d09aacbc1 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-es-rES/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + Sen acción + Panel de axustes + Panel de notificacións + Captura de pantalla + Captura de pantalla parcial + Gravar a pantalla + Escritorio estendido + Apagar a pantalla + Forzar peche do aplicativo + Asistente de procura + Google Now ao tocar + Procura con voz + Buscar no aplicativo + Lanterna + Bluetooth + WiFi + Punto de acceso + Último aplicativo + Recentes + Menu de enerxía + Menu + Volver + Inicio + Alternador IME + Deter fixado de pantalla + Método de entrada cursor hacia abaixo + Método de entrada cursor hacia a esquerda + Método de entrada cursor hacia a dereita + Método de entrada cursor hacia arriba + Panel de volume + Limpar as notificacións + Dividir a pantalla + Modo a unha man (lado esquerdo) + Modo a unha man (lado dereito) + Canción anterior + Seguinte canción + + %s matado + diff --git a/packages/SystemUI/res-hwkeys/values-es-rMX/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-es-rMX/custom_strings.xml new file mode 100644 index 000000000000..701b98ca90f4 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-es-rMX/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Sin acción + Panel de Ajustes Rápidos + Panel de notificaciones + Captura de pantalla + Captura de pantalla parcial + Grabar pantalla + Escritorio extendido + Apagar a pantalla + Cierre de aplicación forzada + Asistente de Google + Búsqueda en la aplicación + Linterna + Bluetooth + WiFi + Punto de acceso + Última aplicación + Aplicaciones recientes + Menú de apagado + Menú + Atrás + Inicio + Cambiador de IME + Detener fijado de pantalla + Método de entrada cursor hacia abajo + Método de entrada cursor hacia la izquierda + Método de entrada cursor hacia la derecha + Método de entrada cursos hacia arriba + Panel de volumen + Eliminar notificaciones + Pantalla dividida + Modo de una mano (Lado izquierdo) + Modo de una mano (Lado derecho) + Pista anterior + Siguiente pista + Búsqueda de sonidos de Google + + %s terminado + diff --git a/packages/SystemUI/res-hwkeys/values-es/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-es/custom_strings.xml new file mode 100644 index 000000000000..2c18b50904d3 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-es/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Sin acción + Panel de ajustes + Panel de notificaciones + Captura de pantalla + Captura de pantalla parcial + Grabar pantalla + Escritorio extendido + Apagar la pantalla + Forzar cierre de la aplicación + Asistente de Google + Búsqueda dentro de la aplicación + Linterna + Bluetooth + WiFi + Zona Wi-Fi + Última aplicación + Recientes + Menú de apagado + Menú + Atrás + Inicio + Selector de IME + Detener fijado de pantalla + Cursor de método de entrada hacia abajo + Cursor de método de entrada a la izquierda + Cursor de método de entrada a la derecha + Cursor de método de entrada hacia arriba + Panel de volumen + Borrar notificaciones + Pantalla dividida + Modo solo una mano (lado izquierdo) + Modo solo una mano (lado derecho) + Canción anterior + Siguiente canción + Búsqueda de sonido de Google + + Aplicación %s finalizada + diff --git a/packages/SystemUI/res-hwkeys/values-et-rEE/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-et-rEE/custom_strings.xml new file mode 100644 index 000000000000..a056a103b578 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-et-rEE/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Tegevus puudub + Kiirseadete paneel + Teavituste paneel + Kuvatõmmis + Osaline kuvatõmmis + Jäädvusta ekraani + Laiendatud töölaud + Lülita ekraan välja + Sundsulge rakendus + Google\'i abiline + Rakendusesisene otsing + Taskulamp + Bluetooth + WiFi + Kuumkoht + Viimane rakendus + Hiljutised + Toite menüü + Menüü + Tagasi + Avaekraan + IME muutja + Peata ekraani kinnitamine + Sisendmeetodi kursor all + Sisendmeetodi kursor vasakul + Sisendmeetodi kursor paremal + Sisendmeetodi kursor üleval + Helitugevuse paneel + Kustuta teavitused + Jaga ekraan + Ühe käe režiim (vasak pool) + Ühe käe režiim (parem pool) + Eelmine lugu + Järgmine lugu + Google\'i heliotsing + + %s suletud + diff --git a/packages/SystemUI/res-hwkeys/values-eu-rES/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-eu-rES/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-eu-rES/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-fa-rIR/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-fa-rIR/custom_strings.xml new file mode 100644 index 000000000000..23cd8ddd4bde --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-fa-rIR/custom_strings.xml @@ -0,0 +1,24 @@ + + + + + + پنل قسمت تنظیمات سریع + عکس گرفتن از صفحه فعلی + چراغ قوه + + diff --git a/packages/SystemUI/res-hwkeys/values-fa/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-fa/custom_strings.xml new file mode 100644 index 000000000000..9cb70b4c14ca --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-fa/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + بدون اقدام + پانل تنظیمات سریع + پانل اعلان‌ها + عکس گرفتن از صفحه + عکس گرفتن از بخشی از صفحه + فیلم‌ گرفتن از صفحه + میز کار گسترده + خاموش کردن صفحه‌نمایش + توقف اجباری برنامه + دستیار صوتی گوگل + جستجوی درون‌ برنامه‌ای + چراغ قوه + بلوتوث + وای‌فای + نقطه اتصال + آخرین برنامه اجرا شده + برنامه‌های اخیر + منوی پاور + منو + بازگشت + صفحه اصلی + تغییر چینش کیبورد + توقف حالت سنجاق صفحه + مکان نمای ورودی متن به سمت پایین + مکان نمای ورودی متن به سمت چپ + مکان نمای ورودی متن به سمت راست + مکان نمای ورودی متن به سمت بالا + پنل تنظیم صدا + پاک کردن اعلان‌ها + تقسیم صفحه + حالت کار با یک دست (سمت چپ) + حالت کار با یک دست (سمت راست) + آهنگ قبلی + آهنگ بعدی + جستجوی صوتی گوگل + + %s متوقف شد + diff --git a/packages/SystemUI/res-hwkeys/values-fi-rFI/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-fi-rFI/custom_strings.xml new file mode 100644 index 000000000000..087ec02de35b --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-fi-rFI/custom_strings.xml @@ -0,0 +1,29 @@ + + + + + + Ei toimintoa + Asetusvalikko + Ilmoitusvalikko + Kuvakaappaus + Osittainen kuvakaappaus + Tallenna näyttöä + Laajennettu työpöytä + Taskulamppu + + diff --git a/packages/SystemUI/res-hwkeys/values-fi/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-fi/custom_strings.xml new file mode 100644 index 000000000000..855140db5ba9 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-fi/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Ei toimintoa + Pikasetus paneeli + Ilmoitus paneeli + Näytönkaappaus + Osittainen Näytönkaappaus + Tallenna näyttö tiedostoon + Laajennettu työpöytä + Sammuta näyttö + Pakota sovelluksen sulkeminen + Google avustaja + Sovelluksen sisäinen haku + Taskulamppu + Bluetooth + WiFi + Kuumapiste + Viimeisin sovellus + Viimeaikaiset + Virta valikko + Menu + Takaisin + Koti + IME vaihtaja + Lopeta näytön kiinnitys + Syöttötapa osoitin alas + Syöttötapa osoitin vasemmalle + Syöttötapa osoitin oikealle + Syöttötapa osoitin ylös + Äänenvoimakkuus paneeli + Tyhjennä ilmoitukset + Jaettu näyttö + Yhden käden tila (vasen puoli) + Yhden käden tila (oikea puoli) + Edellinen biisi + Seuraava biisi + Googlen ääni haku + + %s teurastettu + diff --git a/packages/SystemUI/res-hwkeys/values-fr-rFR/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-fr-rFR/custom_strings.xml new file mode 100644 index 000000000000..caf38cdee7cc --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-fr-rFR/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + Aucune action + Volet des réglages rapides + Panneau de notification + Capture d\'écran + Capture d’écran partielle + Capture vidéo + Bureau étendu + Éteindre l\'écran + Forcer l\'arrêt de l\'application + Assistant de recherche + Google Now On Tap + Recherche vocale + Recherche dans l\'application + Lampe de poche + Bluetooth + Wi-Fi + Point d\'accès + Application précédente + Vue des applications récentes + Menu Marche/Arrêt + Menu + Retour + Accueil + Sélecteur de clavier + Annuler l\'épinglage de l\'écran + Curseur bas + Curseur gauche + Curseur droit + Curseur haut + Panneau de volume + Supprimer les notifications + Écran partagé + Utilisation à une main (gaucher) + Utilisation à une main (droitier) + Titre précédent + Titre suivant + + Fermeture forcée de %s + diff --git a/packages/SystemUI/res-hwkeys/values-fr/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-fr/custom_strings.xml new file mode 100644 index 000000000000..c34d803fa6ab --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-fr/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Aucune action + Volet des réglages rapides + Panneau de notification + Capture d\'écran + Capture d’écran partielle + Capture vidéo + Bureau étendu + Éteindre l\'écran + Forcer l\'arrêt de l\'application + Assistant Google + Recherche dans l\'application + Lampe de poche + Bluetooth + Wi-Fi + Point d\'accès + Application récente + Récent + Menu Marche/Arrêt + Menu + Retour + Accueil + Sélecteur de clavier + Annuler l\'épinglage de l\'écran + Curseur bas + Curseur gauche + Curseur droit + Curseur haut + Panneau de volume + Supprimer les notifications + Écran partagé + Utilisation à une main (côté gauche) + Utilisation à une main (côté droit) + Titre précédent + Titre suivant + Google Reconnaissance vocale + + Fermeture forcée de %s + diff --git a/packages/SystemUI/res-hwkeys/values-fy-rNL/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-fy-rNL/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-fy-rNL/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-gd-rGB/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-gd-rGB/custom_strings.xml new file mode 100644 index 000000000000..751a9eea6040 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-gd-rGB/custom_strings.xml @@ -0,0 +1,24 @@ + + + + + + Glacadh-sgrìn + An solas-boillsgidh + Bluetooth + + diff --git a/packages/SystemUI/res-hwkeys/values-gl-rES/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-gl-rES/custom_strings.xml new file mode 100644 index 000000000000..9da6130a8eb0 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-gl-rES/custom_strings.xml @@ -0,0 +1,56 @@ + + + + + + Sen acción + Panel de axustes + Panel de notificacións + Captura de pantalla + Captura de pantalla parcial + Gravar a pantalla + Escritorio estendido + Apagar a pantalla + Forzar peche da aplicación + Asistente de Google + Busqueda na aplicación + Lanterna + Bluetooth + WiFi + Punto de acceso + Última aplicación + Recentes + Menú de apagado + Menú + Voltar + Inicio + Trocador IME + Deter fixado de pantalla + Cursor de método de entrada abaixo + Cursor de método de entrada a esquerda + Cursor de método de entrada a dereita + Cursor de método de entrada arriba + Panel de volume + Limpar as notificacións + Dividir a pantalla + Modo a unha man (esquerda) + Modo a unha man (dereita) + Canción anterior + Seguinte canción + + %s detida + diff --git a/packages/SystemUI/res-hwkeys/values-gu-rIN/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-gu-rIN/custom_strings.xml new file mode 100644 index 000000000000..07709adbd455 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-gu-rIN/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + કાર્યવાહી નથી + સેટિંગ્સ પેનલ + સૂચના પેનલ + સ્ક્રીનશોટ + અડધો સ્ક્રીનશોટ + રેકોર્ડ સ્ક્રીન + ડેસ્કટૉપ વિસ્તૃત કરો + સ્ક્રીન બંધ કરો + એપ્લિકેશનને ફોર્સ બંધ કરો + Google સહાય + ઇન-એપ્લિકેશન શોધ + ફ્લેશલાઇટ + બ્લુટૂથ + વાઇફાઇ + હોટસ્પોટ + છેલ્લી એપ્લિકેશન + તાજેતરના + પાવર મેનૂ + મેનુ + પાછા જાઓ + હોમ + ઈએમઆઈ બદલો + સ્ક્રીનને પિન કરવું રોકો + ઇનપુટ પદ્ધતિ કર્સર નીચે + ઇનપુટ પદ્ધતિ કર્સર ડાબે + ઇનપુટ પદ્ધતિ કર્સર જમણે + ઇનપુટ પદ્ધતિ કર્સર ઉપર + વોલ્યુમ પેનલ + સૂચનાઓ સાફ કરો + સ્ક્રીન વિભાજીત કરો + એક હાથે સ્થિતિ (ડાબી બાજુ) + એક હાથે સ્થિતિ (જમણે બાજુ) + ગત ટ્રેક + આગામી ટ્રેક + Google સાઉન્ડ શોધ + + %s killed + diff --git a/packages/SystemUI/res-hwkeys/values-haw-rUS/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-haw-rUS/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-haw-rUS/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-hi-rIN/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-hi-rIN/custom_strings.xml new file mode 100644 index 000000000000..3d0848ae8747 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-hi-rIN/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + कोई क्रिया नहीं + सेटिंग्स पैनल + सुचना पटल + स्क्रीनशॉट + आंशिक स्क्रीनशॉट + रिकॉर्ड स्क्रीन + विस्तारित डेस्कटॉप + स्क्रीन बंद + बल अनुप्रयोग बंद करे + खोज सहायक + अभी गूगल करें + आवाज से खोज + इन-ऐप खोज + टॉर्च + ब्लू टूथ + वाईफ़ाई + हॉटस्पॉट + पिछ्ला ऍप + हाल ही के + पावर मेनू + मेन्यू + वापस जाएं + होम + IME परिवर्तक + स्क्रीन पिनिंग रोके + इनपुट विधि कर्सर नीचे + इनपुट विधि कर्सर बाएं + इनपुट विधि कर्सर दाए + इनपुट विधि कर्सर ऊपर + वॉल्यूम पैनल + सूचनाएं हटाए + विभाजित स्क्रीन + एक हाथ मोड (बाईं ओर) + एक हाथ मोड (दाईं ओर) + पिछला ट्रैक + अगला ट्रैक + + %s बंद कर दिया + diff --git a/packages/SystemUI/res-hwkeys/values-hi/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-hi/custom_strings.xml new file mode 100644 index 000000000000..50f8c3894f4f --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-hi/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + कोई क्रिया नहीं + सेटिंग्स पैनल + सुचना पटल + स्क्रीनशॉट + आंशिक स्क्रीनशॉट + रिकॉर्ड स्क्रीन + विस्तारित डेस्कटॉप + स्क्रीन बंद + बल अनुप्रयोग बंद करे + गूगल असिस्टेंट + इन-ऐप खोज + टॉर्च + ब्लू टूथ + वाईफ़ाई + हॉटस्पॉट + पिछ्ला ऍप + हाल ही के + पावर मेनू + मेन्यू + वापस जाएं + होम + IME परिवर्तक + स्क्रीन पिनिंग रोके + इनपुट विधि कर्सर नीचे + इनपुट विधि कर्सर बाएं + इनपुट विधि कर्सर दाए + इनपुट विधि कर्सर ऊपर + वॉल्यूम पैनल + सूचनाएं हटाए + विभाजित स्क्रीन + एक हाथ मोड (बाईं ओर) + एक हाथ मोड (दाईं ओर) + पिछला ट्रैक + अगला ट्रैक + Google ध्वनि खोज + + %s बंद कर दिया + diff --git a/packages/SystemUI/res-hwkeys/values-hr-rHR/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-hr-rHR/custom_strings.xml new file mode 100644 index 000000000000..2b4a1f7eda34 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-hr-rHR/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + Bez radnje + Ploča postavki + Ploča obavijesti + Snimka zaslona + Djelomična snimka zaslona + Snimanje zaslona + Proširena radna površina + Isključi zaslon + Prisilno zatvori aplikaciju + Pomoćnik u pretraživanju + Google Now na dodir + Glasovno pretraživanje + Pretraživanje u aplikaciji + Svjetiljka + Bluetooth + Wi-Fi + Žarišna točka + Zadnja aplikacija + Nedavne aplikacije + Izbornik napajanja + Izbornik + Natrag + Početna + Promjena načina unosa + Zaustavi prikvačivanje zaslona + Način unosa - strelica za dolje + Način unosa - strelica ulijevo + Način unosa - strelica udesno + Način unosa - strelica za gore + Ploča glasnoće + Izbriši obavijesti + Podijeljeni zaslon + Način rada jednom rukom (lijeva strana) + Način rada jednom rukom (desna strana) + Prethodna pjesma + Sljedeća pjesma + + Aplikacija %s je zaustavljena + diff --git a/packages/SystemUI/res-hwkeys/values-hr/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-hr/custom_strings.xml new file mode 100644 index 000000000000..b949f49a9d70 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-hr/custom_strings.xml @@ -0,0 +1,56 @@ + + + + + + Bez radnje + Ploča postavki + Ploča obavijesti + Snimka zaslona + Djelomična snimka zaslona + Snimanje zaslona + Proširena radna površina + Isključi zaslon + Prisilno zatvori aplikaciju + Google pomoćnik + Pretraživanje u aplikaciji + Svjetiljka + Bluetooth + Wi-Fi + Žarišna točka + Zadnja aplikacija + Nedavne aplikacije + Izbornik napajanja + Izbornik + Natrag + Početna + Promjena načina unosa + Zaustavi prikvačivanje zaslona + Način unosa - strelica za dolje + Način unosa - strelica ulijevo + Način unosa - strelica udesno + Način unosa - strelica za gore + Ploča glasnoće + Izbriši obavijesti + Podijeljeni zaslon + Način rada jednom rukom (lijeva strana) + Način rada jednom rukom (desna strana) + Prethodna pjesma + Sljedeća pjesma + + Aplikacija %s je zaustavljena + diff --git a/packages/SystemUI/res-hwkeys/values-hu-rHU/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-hu-rHU/custom_strings.xml new file mode 100644 index 000000000000..8a72bebd4302 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-hu-rHU/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + Nincs művelet + Beállítások panel + Értesítési panel + Képernyőmentés + Részleges képernyőmentés + Képernyő felvétel + Kiterjesztett képernyő + Képernyő kikapcsolása + Alkalmazás kényszerített bezárása + Keresési segéd + Google Now On Tap + Hangalapú keresés + Alkalmazáson belüli keresés + Zseblámpa + Bluetooth + WiFi + Hotspot + Utolsó alkalmazás + Előzmények + Kikapcsoló menü + Menü + Vissza + Kezdőlap + Bill. váltó + Képernyő rögzítés feloldása + Beviteli mód - kurzor le + Beviteli mód - kurzor balra + Beviteli mód - kurzor jobbra + Beviteli mód - kurzor fel + Hangerő panel + Értesítések törlése + Osztott képernyő + Egykezes üzemmód (bal oldalon) + Egykezes üzemmód (jobb oldalon) + Előző szám + Következő szám + + %s kilőve + diff --git a/packages/SystemUI/res-hwkeys/values-hu/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-hu/custom_strings.xml new file mode 100644 index 000000000000..2c0753263262 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-hu/custom_strings.xml @@ -0,0 +1,56 @@ + + + + + + Nincs teendő + Beállítások panel + Értesítési panel + Képernyőmentés + Részleges képernyőmentés + Képernyő felvétel + Kiterjesztett képernyő + Képernyő kikapcsolása + Alkalmazás kényszerített bezárása + Google asszisztens + Alkalmazáson belüli keresés + Zseblámpa + Bluetooth + WiFi + Hotspot + Utolsó alkalmazás + Előzmények + Kikapcsoló menü + Menü + Vissza + Kezdőlap + Bill. váltó + Képernyő rögzítés feloldása + Beviteli mód - kurzor le + Beviteli mód - kurzor balra + Beviteli mód - kurzor jobbra + Beviteli mód - kurzor fel + Hangerő panel + Értesítések törlése + Osztott képernyő + Egykezes üzemmód (bal oldalon) + Egykezes üzemmód (jobb oldalon) + Előző szám + Következő szám + + %s kilőve + diff --git a/packages/SystemUI/res-hwkeys/values-hy-rAM/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-hy-rAM/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-hy-rAM/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-in-rID/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-in-rID/custom_strings.xml new file mode 100644 index 000000000000..bdcf57b725ab --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-in-rID/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + Tidak ada tindakan + Panel setelan + Panel pemberitahuan + Screenshot + Menangkap sebagian layar + Rekam layar + Desktop diperluas + Matikan layar + Paksa tutup aplikasi + Asisten pencarian + Google Now On Tap + Pencarian suara + Pencarian di-app + Senter + Bluetooth + WiFi + Hotspot + Aplikasi terakhir + Terbaru + Menu daya + Menu + Kembali + Home + Pengganti IME + Berhenti menyemat layar + Metode masukan kursor ke bawah + Metode masukan kursor ke kiri + Metode masukan kursor ke kanan + Metode masukan kursor ke atas + Panel volume + Bersihkan notifikasi + Pisah layar + Mode satu tangan (sisi kiri) + Mode satu tangan (sisi kanan) + Trek sebelumnya + Trek berikutnya + + %s dimatikan + diff --git a/packages/SystemUI/res-hwkeys/values-in/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-in/custom_strings.xml new file mode 100644 index 000000000000..50ed44fec9f2 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-in/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Tidak ada tindakan + Panel Setelan Cepat + Panel pemberitahuan + Tangkapan layar + Tangkapan layar sebagian + Rekam layar + Desktop diperluas + Matikan layar + Paksa tutup aplikasi + Asisten Google + Pencarian di dalam aplikasi + Senter + Bluetooth + WiFi + Hotspot + Aplikasi terakhir + Terbaru + Menu tombol daya + Menu + Kembali + Home + Pengganti IME + Berhenti menyemat layar + Saat memasukan kursor dari bawah + Saat memasukan kursor dari kiri + Saat memasukan kursor dari kanan + Saat memasukan kursor dari atas + Panel volume + Bersihkan pemberitahuan + Layar terpisah + Modus satu tangan (sisi kiri) + Modus satu tangan (sisi kanan) + Trek sebelumnya + Trek berikutnya + Pencarian suara Google + + %s dimatikan + diff --git a/packages/SystemUI/res-hwkeys/values-it-rIT/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-it-rIT/custom_strings.xml new file mode 100644 index 000000000000..82d85395548f --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-it-rIT/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + Nessuna azione + Pannello impostazioni + Pannello notifiche + Screenshot + Screenshot parziale + Registra schermo + Schermo esteso + Spegni lo schermo + Chiusura forzata app + Assistente di ricerca + Google Now al tocco + Ricerca vocale + Ricerca in app + Torcia + Bluetooth + WiFi + Hotspot + Ultima app + Recenti + Menù di spegnimento + Menù + Indietro + Home + Cambio metodo d\'immissione + Interrompi blocco sullo schermo + Cursore d\'inserimento verso il basso + Cursore d\'inserimento verso sinistra + Cursore d\'inserimento verso destra + Cursore d\'inserimento verso l\'alto + Pannello volume + Cancella le notifiche + Dividi schermo + Modalità a una mano (lato sinistro) + Modalità a una mano (lato destro) + Brano precedente + Brano successivo + + %s terminato + diff --git a/packages/SystemUI/res-hwkeys/values-it/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-it/custom_strings.xml new file mode 100644 index 000000000000..744c7b06819f --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-it/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Nessuna azione + Pannello impostazioni + Pannello notifiche + Screenshot + Screenshot parziale + Registra schermo + Schermo esteso + Spegni lo schermo + Chiusura forzata app + Google assistant + Ricerca in app + Torcia + Bluetooth + WiFi + Hotspot + Ultima app + Recenti + Menù di spegnimento + Menù + Indietro + Home + Cambio metodo d\'immissione + Interrompi blocco sullo schermo + Cursore d\'inserimento verso il basso + Cursore d\'inserimento verso sinistra + Cursore d\'inserimento verso destra + Cursore d\'inserimento verso l\'alto + Pannello volume + Cancella le notifiche + Dividi schermo + Modalità a una mano (lato sinistro) + Modalità a una mano (lato destro) + Brano precedente + Brano successivo + Ricerca audio Google + + %s terminato + diff --git a/packages/SystemUI/res-hwkeys/values-iw-rIL/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-iw-rIL/custom_strings.xml new file mode 100644 index 000000000000..2fa4df47a6ba --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-iw-rIL/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + ללא פעולה + הגדרות + התראות + צילום מסך + צילום מסך חלקי + הקלט מסך + שולחן עבודה מורחב + כבה מסך + אלץ סגירת אפליקציה + עוזר חיפוש + גוגל עכשיו בלחיצה + חיפוש קולי + חיפוש בתוך היישום + פנס + Bluetooth + WiFi + נקודה חמה + מעבר ליישום אחרון + יישומים אחרונים + תפריט כיבוי + תפריט + חזור + בית + שינוי אמצעי קלט + הפסקת הצמדת מסך + שיטת קלט מצביע למטה + שיטת קלט מצביע שמאלה + שיטת קלט מצביע ימינה + שיטת קלט מצביע למעלה + לוח עוצמת השמע + נקה את כל ההתראות + פיצול מסך + מצב שימוש ביד אחד (צד שמאל) + מצב שימוש ביד אחד (צד ימין) + שיר קודם + שיר הבא + + %s נסגר + diff --git a/packages/SystemUI/res-hwkeys/values-iw/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-iw/custom_strings.xml new file mode 100644 index 000000000000..9ee6b926edb4 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-iw/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + ללא פעולה + הגדרות + התראות + צילום מסך + צילום מסך חלקי + הקלט מסך + שולחן עבודה מורחב + כבה מסך + אלץ סגירת אפליקציה + עוזרת קולית + חיפוש בתוך היישום + פנס + Bluetooth + WiFi + נקודה חמה + מעבר ליישום אחרון + יישומים אחרונים + תפריט כיבוי + תפריט + חזור + בית + שינוי אמצעי קלט + הפסקת הצמדת מסך + שיטת קלט מצביע למטה + שיטת קלט מצביע שמאלה + שיטת קלט מצביע ימינה + שיטת קלט מצביע למעלה + לוח עוצמת השמע + נקה את כל ההתראות + פיצול מסך + מצב שימוש ביד אחד (צד שמאל) + מצב שימוש ביד אחד (צד ימין) + שיר קודם + שיר הבא + חיפוש קולי של גוגל + + %s נסגר + diff --git a/packages/SystemUI/res-hwkeys/values-ja-rJP/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-ja-rJP/custom_strings.xml new file mode 100644 index 000000000000..327c27388de8 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-ja-rJP/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + 行わない + 設定パネル + 通知パネル + スクリーンショット + 範囲を選択してスクリーンショット + 画面を録画 + 拡張デスクトップ + 画面をオフにする + アプリを強制終了 + 検索アシスタント + Google Now On Tap + 音声検索 + アプリ内検索 + フラッシュライト + Bluetooth + WiFi + 公衆無線LAN + 最後に使用したアプリ + 最近 + 電源メニュー + メニュー + 戻る + ホーム + IMEの変更 + 画面の固定を停止 + カーソル下移動 + カーソル左移動 + カーソル右移動 + カーソル上移動 + 音量パネル + 通知を消去 + 画面分割 + 片手操作モード (左寄り) + 片手操作モード (右寄り) + 前のトラック + 次のトラック + + %s を終了しました + diff --git a/packages/SystemUI/res-hwkeys/values-ja/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-ja/custom_strings.xml new file mode 100644 index 000000000000..a2b998cbbaba --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-ja/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + 何もしない + クイック設定パネル + 通知パネル + スクリーンショット + 範囲を選択してスクリーンショット + 画面を録画 + 拡張デスクトップ + 画面をオフにする + アプリを強制終了 + Googleアシスタント + アプリ内検索 + フラッシュライト + Bluetooth + WiFi + 公衆無線LAN + 最後に使用したアプリ + アプリ履歴 + 電源メニュー + メニュー + 戻る + ホーム + IMEの変更 + 画面の固定を停止 + カーソル下移動 + カーソル左移動 + カーソル右移動 + カーソル上移動 + 音量パネル + 通知を消去 + 画面分割 + 片手操作モード(左寄り) + 片手操作モード(右寄り) + 前のトラック + 次のトラック + Google音声検索 + + %s を終了しました + diff --git a/packages/SystemUI/res-hwkeys/values-kab-rDZ/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-kab-rDZ/custom_strings.xml new file mode 100644 index 000000000000..2a7adbb600fb --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-kab-rDZ/custom_strings.xml @@ -0,0 +1,56 @@ + + + + + + Ulac tigawt + Agalis n iɣewwaṛen + Agalis n yilɣa + Tuṭṭfa n ugdil + Tuṭfa abruyan n wagdil + Agdil n usekles + Lbiru hrawen + Sens agdil + Hettem aseḥbes n usnas + Adhal n Google + Anadi deg wasnas + Taftilt n lǧib + Bluetooth + WiFi + Tineqiṭ n unekcum + Asnas aneggaru + Isnasen ineggura + Umuɣ Tiddit/Asensi + Umuɣ + Ar deffir + Agdil agejdan + Imbeddel IME + Sefsex tawaṭfa n wagdil + Taḥnacaṭ s wadda + Taḥnacaṭ s azelmaḍ + Taḥnacaṭ s ayefus + Taḥnacaṭ ad asawen + Agalis n ubleɣ + Sfeḍ ilɣa + Agdil yettwabḍa + Aseqdec s yiwen ufus (azelmaḍ) + Aseqdec s yiwen ufus (ayefus) + Azwel amezwaru + Azwel nniḍen + + Imdel %s + diff --git a/packages/SystemUI/res-hwkeys/values-kl-rGL/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-kl-rGL/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-kl-rGL/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-kn-rIN/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-kn-rIN/custom_strings.xml new file mode 100644 index 000000000000..2c5c8d862d24 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-kn-rIN/custom_strings.xml @@ -0,0 +1,49 @@ + + + + + + ಯಾವುದೇ ಕ್ರಿಯೆ ಇಲ್ಲ + ನೋಟಿಫಿಕೇಶನ್ ಫಲಕ + ಸ್ಕ್ರೀನ್‍ಶಾಟ್ + ಭಾಗಶಃ/ಬೇಕಾಗಿರುವಸ್ಟು ಮಾತ್ರ ಸ್ಕ್ರೀನ್ಶಾಟ್ + ಸ್ಕ್ರೀನ್ರೆ ಕಾರ್ಡ್ ಮಾಡಿ + ವಿಸ್ತೃತ ಡೆಸ್ಕ್ಟಾಪ್ + ಸ್ಕ್ರೀನ್ರೆ ಆಫ್ ಮಾಡಿ + ಅಪ್ಲಿಕೇಶನ್ ಪೂರ್ಣವಾಗಿ ಒತ್ತಾಯಿಸಿ ಮುಚ್ಚಿ + ಧ್ವನಿ ಸಹಾಯಕ + ಇನ್-ಅಪ್ಲಿಕೇಶನ್ ಸರ್ಚ್ + ಫ್ಲಾಶ್ ಬೆಳಕು + ಬ್ಲೂಟೂತ್ + ವೈಫೈ + ಹಾಟ್ಸ್ಪಾಟ್ + ಕೊನೆಯ ಅಪ್ಲಿಕೇಶನ್ + ರಿಸೆಂಟ್ + ಪವರ್ ಮೆನು + ಮೆನು + ಹಿಂದೆ + ಮುಖಪುಟ + ವಾಲ್ಯೂಂ ಪ್ಯಾನೆಲ್ + ಪ್ರಕಟಣೆಗಳನ್ನು ತೆರವುಗೊಳಿಸಿ + ಸೀಳು ಪರದೆ + ಒಂದು ಕೈಯ ಮೋಡ್ (ಎಡಭಾಗ) + ಒಂದು ಕೈಯ ಮೋಡ್ (ಬಲಭಾಗ) + ಹಿಂದಿನ ಹಾಡು + ಮುಂದಿನ ಹಾಡು + + %s ಮುಚ್ಚಲಾಗಿದೆ + diff --git a/packages/SystemUI/res-hwkeys/values-ko-rKR/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-ko-rKR/custom_strings.xml new file mode 100644 index 000000000000..36967eabe7e8 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-ko-rKR/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + 동작 없음 + 설정 패널 + 알림 패널 + 스크린샷 + 부분 스크린샷 + 화면 녹화 + 확장 데스크탑 + 화면 끄기 + 앱 강제종료 + 검색 도우미 + 구글 나우 온 탭 + 음성 검색 + 앱 내 검색 + 손전등 + 블루투스 + WiFi + 핫스팟 + 마지막으로 사용한 앱 + 최근 실행 목록 + 전원 메뉴 + 메뉴 + 뒤로가기 + + IME 체인저 + 화면 고정 중지 + 입력 방법 커서를 아래로 내림 + 입력 커서를 왼쪽으로 이동 + 입력 커서를 오른쪽으로 이동 + 입력 커서를 위로 올림 + 볼륨 패널 + 알림 지우기 + 화면 분할 + 한손모드(왼쪽) + 한손모드(오른쪽) + 이전 트랙 + 다음 트랙 + + %s 종료됨 + diff --git a/packages/SystemUI/res-hwkeys/values-ko/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-ko/custom_strings.xml new file mode 100644 index 000000000000..cd663be12fe5 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-ko/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + 동작 없음 + 빠른 설정 패널 + 알림 패널 + 스크린샷 + 부분 스크린샷 + 화면 녹화 + 확장 데스크탑 + 화면 끄기 + 앱 강제종료 + Google 어시스턴트 + 앱에서 검색 + 손전등 + 블루투스 + WiFi + 핫스팟 + 마지막에 사용한 앱 + 최근 실행 목록 + 전원 메뉴 + 메뉴 + 뒤로가기 + + IME 체인저 + 화면 고정 중지 + 입력 커서 아래로 + 입력 커서 왼쪽으로 + 입력 커서 오른쪽으로 + 입력 커서 위로 + 볼륨 패널 + 알림 지우기 + 화면 분할 + 한손모드(왼쪽) + 한손모드(오른쪽) + 이전 트랙 + 다음 트랙 + Google 음성 검색 + + %s 종료됨 + diff --git a/packages/SystemUI/res-hwkeys/values-lb/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-lb/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-lb/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-lt-rLT/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-lt-rLT/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-lt-rLT/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-lt/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-lt/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-lt/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-lv-rLV/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-lv-rLV/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-lv-rLV/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-lv/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-lv/custom_strings.xml new file mode 100644 index 000000000000..ac08872cee18 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-lv/custom_strings.xml @@ -0,0 +1,49 @@ + + + + + + Nav darbība + Paziņojumu vadība + Ekrānuzņēmums + Ierakstīt ekrānu + Paplašināta darbvirsma + Izslēgt ekrānu + Piespiedu apturēšana + Google palīgs + Meklēšana lietotnē + Lukturītis + Bluetooth + WiFi + Tīklājs + Pēdējā lietotne + Nesenie + Barošanas izvēlne + Izvēlne + Atpakaļ + Sākums + IME mainītājs + Skaņas izvelne + Notīrīt paziņojumus + Dalīt ekrānu + Vienas rokas režīms (kreisā puse) + Vienas rokas režīms (labā puse) + Iepriekšējā dziesma + Nākamā dziesma + Google skaņas meklētājs + + diff --git a/packages/SystemUI/res-hwkeys/values-ml-rIN/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-ml-rIN/custom_strings.xml new file mode 100644 index 000000000000..418642f79bce --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-ml-rIN/custom_strings.xml @@ -0,0 +1,50 @@ + + + + + + ഒന്നും ചെയ്യാനില്ല + സ്ക്രീൻഷോട്ട് + ഭാഗികമായ സ്ക്രീൻഷോട്ട്‌ + സ്ക്രീൻ റെക്കോർഡ് ചെയ്യുക + വികസിച്ച ഡെസ്ക്ടോപ്പ് + സ്ക്രീൻ ഓഫ്‌ ചെയ്യുക + ബലമായി ആപ്പ് നിർത്തുക + ഗൂഗിൾ സഹായി + ആപ്പിനുള്ളിൽ തിരയുക + ടോർച്ച് + ബ്ലൂടൂത്ത് + വൈഫൈ + ഹോട്ട്സ്പോട്ട് + അവസാന ആപ്പ് + അവസാനം ഉപയോഗിച്ചവ + പവർ മെനു + മെനു + തിരികെ + ഹോം + IME മാറ്റുക + സ്ക്രീൻ പിൻ ഓഫ് ചെയ്യുക + വോളിയം പാനൽ + അറിയിപ്പുകൾ മാറ്റുക + സ്ക്രീൻ പകുത്തെടുക്കുക + ഇടതു കയ്യാൽ മാത്രം ഉപയോഗിക്കാം + വലതു കയ്യാൽ മാത്രം ഉപയോഗിക്കാം + കഴിഞ്ഞു പോയ ഗാനം + അടുത്ത ഗാനം + + %s അവസാനിച്ചു + diff --git a/packages/SystemUI/res-hwkeys/values-mr-rIN/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-mr-rIN/custom_strings.xml new file mode 100644 index 000000000000..2976cec41c25 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-mr-rIN/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + कृतीविना + क्यु एस पॅनेल + नोतिफ़िकेशन पेनेल + स्क्रीनशॉट + अर्धवट स्क्रीनशॉट + स्क्रीन रेकोर्ड + विस्तृत केलेले डेस्कटॉप + स्क्रीन बंद करा + अॅप सक्तीने बंद करा + गुगल सहाय्यक + अॅप-मधील शोध + फ्लॅशलाइट + ब्लुटुथ + वाय फ़ाय + हॉटस्पॉट + शेवट्चे अॅप + रिसेन्ट + पॉवर मेनू + मेनू + मागे + घर + आय एम इ बदल + स्क्रीन पिन करणे थांबवा + इनपुट पद्धत कर्सर खाली + इनपुट पद्धत कर्सर डविकडे + इनपुट पद्धत कर्सर उजविकडे + इनपुट पद्धत कर्सर वर + व्हॉल्यूम पॅनेल + नोटिफ़िकेशन साफ करा + स्प्लिट स्क्रीन + एक हाताने मोड (डावी बाजू) + एक हाताने मोड (उजवी बाजू) + मागील ट्रॅक + पुढील ट्रॅक + Google ध्वनी शोध + + %s ब्न्द केले + diff --git a/packages/SystemUI/res-hwkeys/values-ms-rMY/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-ms-rMY/custom_strings.xml new file mode 100644 index 000000000000..cc010e855c7f --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-ms-rMY/custom_strings.xml @@ -0,0 +1,56 @@ + + + + + + Tiada tindakan + Panel QS + Panel notifikasi + Screenshot + Screenshot separa + Rakam skrin + Desktop diperluaskan + Matikan skrin + Paksa tutup aplikasi + Google assistant + Carian dalam aplikasi + Lampu suluh + Bluetooth + WiFi + Hotspot + Aplikasi terakhir + Terdahulu + Menu kuasa + Menu + Kembali + Skrin utama + Pengurup IME + Hentikan screen pinning + Kaedah input kursor turun + Kaedah input kursor kiri + Kaedah input kursor kanan + Kaedah input kursor atas + Panel Suara + Padam notifikasi + Split screen + Mod satu tangan (sebelah kiri) + Mod satu tangan (sebelah kanan) + Trek sebelumnya + Trek kemudian + + %s dimatikan + diff --git a/packages/SystemUI/res-hwkeys/values-my-rMM/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-my-rMM/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-my-rMM/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-nb-rNO/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-nb-rNO/custom_strings.xml new file mode 100644 index 000000000000..df256875e445 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-nb-rNO/custom_strings.xml @@ -0,0 +1,22 @@ + + + + + + Blitz + + diff --git a/packages/SystemUI/res-hwkeys/values-nb/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-nb/custom_strings.xml new file mode 100644 index 000000000000..df256875e445 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-nb/custom_strings.xml @@ -0,0 +1,22 @@ + + + + + + Blitz + + diff --git a/packages/SystemUI/res-hwkeys/values-ne-rNP/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-ne-rNP/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-ne-rNP/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-nl-rNL/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-nl-rNL/custom_strings.xml new file mode 100644 index 000000000000..56bf539e0c85 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-nl-rNL/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + Geen actie + Instellingenpaneel + Notificatie paneel + Schermafbeelding + Gedeeltelijke schermafbeelding + Scherm opnemen + Uitgebreid bureaublad + Scherm uitzetten + App geforceerd afsluiten + Zoek assistent + Google Now On Tap + Spraakgestuurd zoeken + In-app zoeken + Zaklamp + Bluetooth + WiFi + Hotspot + Laatste app + Recente apps + Aan-/uit menu + Menu + Terug + Thuis + Invoermethode + Stop met scherm vastzetten + Invoermethode cursor omlaag + Invoermethode cursor links + Invoermethode cursor rechts + Invoermethode cursor omhoog + Volume paneel + Meldingen wissen + Scherm opsplitsen + Éen hand modus (linker kant) + Éen hand modus (rechter kant) + Vorig nummer + Volgende nummer + + %s afgesloten + diff --git a/packages/SystemUI/res-hwkeys/values-nl/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-nl/custom_strings.xml new file mode 100644 index 000000000000..7154d3e2c1a5 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-nl/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Geen actie + Instellingenpaneel + Notificatie paneel + Schermafbeelding + Gedeeltelijke schermafbeelding + Scherm opnemen + Uitgebreid bureaublad + Scherm uitzetten + App geforceerd afsluiten + Google Assistant + In-app zoeken + Zaklamp + Bluetooth + WiFi + Hotspot + Laatste app + Recente apps + Aan-/uit menu + Menu + Terug + Thuis + Invoermethode + Stop met scherm vastzetten + Invoermethode cursor omlaag + Invoermethode cursor links + Invoermethode cursor rechts + Invoermethode cursor omhoog + Volume paneel + Meldingen wissen + Scherm opsplitsen + Éen hand modus (linker kant) + Éen hand modus (rechter kant) + Vorig nummer + Volgende nummer + Google muziek zoeken + + %s afgesloten + diff --git a/packages/SystemUI/res-hwkeys/values-no-rNO/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-no-rNO/custom_strings.xml new file mode 100644 index 000000000000..df256875e445 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-no-rNO/custom_strings.xml @@ -0,0 +1,22 @@ + + + + + + Blitz + + diff --git a/packages/SystemUI/res-hwkeys/values-or-rIN/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-or-rIN/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-or-rIN/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-pl-rPL/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-pl-rPL/custom_strings.xml new file mode 100644 index 000000000000..91705f908fb2 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-pl-rPL/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + Brak akcji + Panel ustawień + Panel powiadomień + Zrzut ekranu + Częściowy zrzut ekranu + Nagrywanie ekranu + Rozszerzony pulpit + Wyłączanie ekranu + Wymuś zamknięcie aplikacji + Asystent wyszukiwania + Google Now On Tap + Wyszukiwanie głosowe + Wyszukiwanie w aplikacji + Latarka + Bluetooth + WiFi + Hotspot + Ostatnia aplikacja + Ostatnie + Menu zasilania + Menu + Wstecz + Strona główna + Zmiana metody wprowadzania + Zatrzymaj przypinanie ekranu + Metoda wprowadzania kursor w dół + Metoda wprowadzania kursor w lewo + Metoda wprowadzania kursor w prawo + Metoda wprowadzania kursor w górę + Panel głośności + Wyczyść powiadomienia + Podzielony ekran + Tryb jednej ręki (lewa strona) + Tryb jednej ręki (prawa strona) + Poprzedni utwór + Następny utwór + + %s zabitych + diff --git a/packages/SystemUI/res-hwkeys/values-pl/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-pl/custom_strings.xml new file mode 100644 index 000000000000..ba34d59738cb --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-pl/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Brak akcji + Panel ustawień + Panel powiadomień + Zrzut ekranu + Częściowy zrzut ekranu + Nagrywanie ekranu + Rozszerzony pulpit + Wyłącz ekran + Wymuś zamknięcie aplikacji + Asystent Google + Wyszukiwanie w aplikacji + Latarka + Bluetooth + WiFi + Punkt dostępu + Ostatnia aplikacja + Ostatnie + Menu zasilania + Menu + Wstecz + Strona główna + Zmiana metody wprowadzania + Zatrzymaj przypinanie ekranu + Metoda wprowadzania kursor w dół + Metoda wprowadzania kursor w lewo + Metoda wprowadzania kursor w prawo + Metoda wprowadzania kursor w górę + Panel głośności + Wyczyść powiadomienia + Podzielony ekran + Tryb jednej ręki (lewa strona) + Tryb jednej ręki (prawa strona) + Poprzedni utwór + Następny utwór + Wyszukiwarka dźwięku Google + + %s zabitych + diff --git a/packages/SystemUI/res-hwkeys/values-pt-rBR/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-pt-rBR/custom_strings.xml new file mode 100644 index 000000000000..768c4beb9ed0 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-pt-rBR/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Nenhuma ação + Painel de configurações + Painel de notificação + Captura de tela + Captura de tela parcial + Gravar tela + Área de trabalho expandida + Desligar a tela + Forçar fechamento do app + Google Assistente + Busca interna do app + Lanterna + Bluetooth + Wi-Fi + Ponto de acesso + Último aplicativo + Recentes + Menu de energia + Menu + Voltar + Início + Método de entrada + Sair do modo de fixação de tela + Cursor do método de entrada para baixo + Cursor do método de entrada para esquerda + Cursor do método de entrada para direita + Cursor do método de entrada para cima + Painel de volume + Limpar notificações + Dividir a tela + Modo de uma mão (lado esquerdo) + Modo de uma mão (lado direito) + Faixa anterior + Próxima faixa + Pesquisa de som do Google + + %s encerrado + diff --git a/packages/SystemUI/res-hwkeys/values-pt-rPT/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-pt-rPT/custom_strings.xml new file mode 100644 index 000000000000..6521ecc07941 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-pt-rPT/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Sem ação + Painel de definições + Painel de notificações + Captura de ecrã + Captura parcial de ecrã + Gravar ecrã + Área de trabalho expandida + Desligar o ecrã + Forçar encerramento da aplicação + Assistente Google + Pesquisa na aplicação + Lanterna + Bluetooth + Wi-Fi + Zona Wi-Fi + Última aplicação + Aplicações recentes + Menu de ligar/desligar + Menu + Voltar + Página Inicial + Método de entrada + Sair da fixação do ecrã + Cursor para baixo + Cursor para a esquerda + Cursor para a direita + Cursor para cima + Painel de volume + Limpar notificações + Dividir ecrã + Modo de uma mão (esquerda) + Modo de uma mão (direita) + Faixa anterior + Próxima faixa + Pesquisa de som no Google + + %s terminada + diff --git a/packages/SystemUI/res-hwkeys/values-ro-rRO/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-ro-rRO/custom_strings.xml new file mode 100644 index 000000000000..c74e187465cc --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-ro-rRO/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + Nicio acțiune + Panoul de setări + Panou notificări + Captură ecran + Captură parțială de ecran + Înregistrare de ecran + Desktop extins + Oprește ecranul + Forțează închiderea aplicației + Asistent căutare + Google Now la apăsare + Căutare vocală + Căutare în aplicație + Lanternă + Bluetooth + WiFi + Hotspot + Ultima aplicație + Recente + Meniu pornire + Meniu + Înapoi + Acasă + Schimbător IME + Oprire fixare ecran + Metodă de introducere cursor în jos + Metodă de introducere cursor stânga + Metodă de introducere cursor dreapta + Metodă de introducere cursor sus + Panou de volum + Ștergeți notificări + Ecran divizat + Mod cu o mână (stânga) + Mod cu o mână (dreapta) + Melodia anterioară + Piesa următoare + + %s oprită + diff --git a/packages/SystemUI/res-hwkeys/values-ro/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-ro/custom_strings.xml new file mode 100644 index 000000000000..e88f417a279f --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-ro/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Nici o acțiune + Panoul de setări + Panou notificări + Captură ecran + Captură parțială de ecran + Înregistrare de ecran + Desktop extins + Oprește ecranul + Forțează închiderea aplicației + Asistent Google + Căutare în aplicație + Lanternă + Bluetooth + WiFi + Hotspot + Ultima aplicație + Recente + Meniu pornire + Meniu + Înapoi + Acasă + Schimbător IME + Oprire fixare ecran + Metodă de introducere cursor în jos + Metodă de introducere cursor stânga + Metodă de introducere cursor dreapta + Metodă de introducere cursor sus + Panou de volum + Ștergeți notificări + Ecran divizat + Mod cu o mână (stânga) + Mod cu o mână (dreapta) + Melodia anterioară + Piesa următoare + Google cautare sunet + + %s oprită + diff --git a/packages/SystemUI/res-hwkeys/values-ru-rRU/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-ru-rRU/custom_strings.xml new file mode 100644 index 000000000000..56c9e843f12d --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-ru-rRU/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + Нет действия + Панель настроек + Панель уведомлений + Скриншот + Скриншот выбранной области экрана + Запись экрана + Расширенный рабочий стол + Выключить экран + Принудительно закрыть приложение + Поисковый помощник + Google Now On Tap + Голосовой поиск + Поиск в приложении + Фонарик + Bluetooth + Wi-Fi + Точка доступа + Последнее приложение + Меню недавних приложений + Меню кнопки питания + Меню + Назад + Домой + Выбор способа ввода + Остановить закрепление экрана + Курсор вниз при вводе + Курсор влево при вводе + Курсор вправо при вводе + Курсор вверх при вводе + Панель громкости + Очистить уведомления + Разделить экран + Режим «Управление одной рукой» (левая сторона) + Режим «Управление одной рукой» (правая сторона) + Предыдущий трек + Следующий трек + + %s закрыто + diff --git a/packages/SystemUI/res-hwkeys/values-ru/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-ru/custom_strings.xml new file mode 100644 index 000000000000..7c18e37654a8 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-ru/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Нет действия + Панель быстрых настроек + Панель уведомлений + Снимок экрана + Скриншот выбранной области экрана + Запись экрана + Расширенный рабочий стол + Выключить экран + Принудительно закрыть приложение + Google Ассистент + Поиск в приложении + Фонарик + Bluetooth + Wi-Fi + Точка доступа + Последнее приложение + Меню недавних приложений + Меню кнопки питания + Меню + Назад + Домой + Выбор способа ввода + Остановить закрепление экрана + При вводе курсор снизу + При вводе курсор справа + При вводе курсор справа + При вводе курсор сверху + Панель громкости + Очистить уведомления + Разделить экран + Режим «Управление одной рукой» (левая сторона) + Режим «Управление одной рукой» (правая сторона) + Предыдущий трек + Следующий трек + Голосовой поиск Google + + %s закрыто + diff --git a/packages/SystemUI/res-hwkeys/values-si-rLK/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-si-rLK/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-si-rLK/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-sk-rSK/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-sk-rSK/custom_strings.xml new file mode 100644 index 000000000000..d555ecaa263b --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-sk-rSK/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + Žiadna akcia + Panel nastavení + Panel upozornení + Snímka obrazovky + Čiastočná snímka obrazovky + Nahrávanie obrazovky + Rozšírená plocha + Vypnutie obrazovky + Vynútené ukončenie aplikácií + Asistent vyhľadávania + Asistent Google Now na kliknutie + Hlasové vyhľadávanie + Vyhľadávanie v aplikáciách + Baterka + Bluetooth + Wi-Fi + Hotspot + Posledná aplikácia + Nedávne + Ponuka tlačidla Napájanie + Menu + Späť + Domov + Prepínač metódy vstupu (IME) + Ukončenie pripnutia obrazovky + IME - kurzor nadol + IME - kurzor vľavo + IME - kurzor vpravo + IME - kurzor nahor + Panel hlasitosti + Vymazať upozornenia + Rozdelenie obrazovky + Režim jednou rukou (vľavo) + Režim jednou rukou (vpravo) + Predchádzajúca skladba + Ďalšia skladba + + %s bola ukončená + diff --git a/packages/SystemUI/res-hwkeys/values-sk/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-sk/custom_strings.xml new file mode 100644 index 000000000000..f9bef6677c29 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-sk/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Žiadna akcia + Panel rýchlych nastavení + Panel upozornení + Snímka obrazovky + Čiastočná snímka obrazovky + Nahrávanie obrazovky + Rozšírená plocha + Vypnúť obrazovku + Vynútené ukončenie aplikácie + Asistent Google + Vyhľadávanie v aplikáciách + Baterka + Bluetooth + WiFi + Hotspot + Posledná aplikácia + Nedávne + Ponuka tlačidla Napájanie + Menu + Späť + Domov + Prepínač metódy vstupu (IME) + Ukončenie pripnutia obrazovky + IME - kurzor nadol + IME - kurzor vľavo + IME - kurzor vpravo + IME - kurzor nahor + Panel hlasitosti + Vymazať upozornenia + Rozdelenie obrazovky + Režim jednou rukou (vľavo) + Režim jednou rukou (vpravo) + Predchádzajúca skladba + Ďalšia skladba + Vyhľadávanie zvuku Google + + %s bola ukončená + diff --git a/packages/SystemUI/res-hwkeys/values-sl-rSI/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-sl-rSI/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-sl-rSI/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-sl/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-sl/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-sl/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-sq-rAL/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-sq-rAL/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-sq-rAL/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-sr-rSP/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-sr-rSP/custom_strings.xml new file mode 100644 index 000000000000..890ef9170fa2 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-sr-rSP/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + Нема радње + Панел поставки + Панел обавештења + Снимак слике екрана + Делимичан снимак слике екрана + Снимање екрана + Проширена радна површина + Искључи екран + Присилно затвори апликацију + Помоћник у претрази + Google Now на додир + Гласовна претрага + Претрага унутар апликације + Лампа + Bluetooth + Wi-Fi + Hotspot + Последња апликација + Недавне + Мени напајања + Мени + Назад + Почетна + Промена начина уноса + Заустави откачињање екрана + Начин уноса - стрелица за доле + Начин уноза - стрелица лево + Начин уноса - стрелица десно + Начин уноса - стрелица за горе + Панел јачине звука + Избриши обавештења + Подељени екран + Режим коришћења једне руке (лева страна) + Режим коришћења једне руке (десна страна) + Предходна нумера + Следећа нумера + + %s заустављена + diff --git a/packages/SystemUI/res-hwkeys/values-sr/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-sr/custom_strings.xml new file mode 100644 index 000000000000..377a8d75b223 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-sr/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Без акције + Панел поставки + Панел обавештења + Снимак слике екрана + Делимичан снимак слике екрана + Снимање екрана + Проширена радна површина + Искључи екран + Присилно затвори апликацију + Гугл асистент + Претрага унутар апликације + Лампа + Bluetooth + Wi-Fi + Приступна тачка + Последња апликација + Мени недавних апликација + Мени напајања + Мени + Назад + Почетна + Промена начина уноса + Заустави откачињање екрана + Начин уноса - стрелица за доле + Начин уноза - стрелица лево + Начин уноса - стрелица десно + Начин уноса - стрелица за горе + Панел јачине звука + Избриши обавештења + Подељени екран + Режим коришћења једном руком (лева страна) + Режим коришћења једном руком (десна страна) + Предходна нумера + Следећа нумера + Gугл гласовно претраживање + + %s заустављена + diff --git a/packages/SystemUI/res-hwkeys/values-sv-rSE/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-sv-rSE/custom_strings.xml new file mode 100644 index 000000000000..bbce0f344c05 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-sv-rSE/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + Ingen åtgärd + Inställningspanel + Notifieringspanel + Skärmdump + Partiell skärmdump + Spela in skärmen + Utökat skrivbord + Stäng av skärm + Tvinga stängning av app + Sökassistenten + Google Now vid klick + Röstsökning + Sökning i app + Ficklampa + Blåtand + WiFi + Trådlös surfzon + Senaste app + Senaste appar + Avstängningsmeny + Meny + Tillbaka + Hem + IME-växlare + Stoppa fastlåsning av skärm + Inmatningsmetod pil nedåt + Inmatningsmetod pil vänster + Inmatningsmetod pil höger + Inmatningsmetod pil uppåt + Volympanel + Rensa aviseringar. + Dela skärm + Enhandsläge (vänster sida) + Enhandsläge (höger sida) + Föregående spår + Nästa spår + + %s tvångsavslutades + diff --git a/packages/SystemUI/res-hwkeys/values-sv/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-sv/custom_strings.xml new file mode 100644 index 000000000000..6f17c5ae7da1 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-sv/custom_strings.xml @@ -0,0 +1,56 @@ + + + + + + Ingen åtgärd + Inställningspanel + Notifieringspanel + Skärmdump + Partiell skärmdump + Spela in skärmen + Utökat skrivbord + Stäng av skärm + Tvinga stängning av app + Google assistent + Sök i app + Ficklampa + Blåtand + WiFi + Trådlös surfzon + Senaste app + Senaste appar + Avstängningsmeny + Meny + Tillbaka + Hem + IME-växlare + Stoppa fastlåsning av skärm + Inmatningsmetod pil nedåt + Inmatningsmetod pil vänster + Inmatningsmetod pil höger + Inmatningsmetod pil uppåt + Volympanel + Rensa aviseringar. + Dela skärm + Enhandsläge (vänster sida) + Enhandsläge (höger sida) + Föregående spår + Nästa spår + + %s tvångsavslutades + diff --git a/packages/SystemUI/res-hwkeys/values-sw/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-sw/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-sw/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-ta-rIN/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-ta-rIN/custom_strings.xml new file mode 100644 index 000000000000..8bee59a54a60 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-ta-rIN/custom_strings.xml @@ -0,0 +1,56 @@ + + + + + + செயல்பாடு இல்லை + QS பேனல் + அறிவிப்புப் பலகை + திரைப்பிடிப்பு + பகுதி திரைச்சொட்டு + திரை பதிவு + விரிவுபடுத்தப்பட்ட டெஸ்க்டாப் + திரையை முடக்கு + நெருங்கிய பயன்பாடு பயன்படுகிறது + குரல் உதவியாளர் + ஆப்-உள் தேடல் + விளக்கு + புளூடூத் + வைஃபை + ஹாட்ஸ்பாட் + கடைசி செயலி + சமீபத்திய + பவர் பட்டியல் + மெனு + பின்செல் + முகப்பு + IME மாற்றி + திரை பொருத்துதல் நிறுத்து + உள்ளீட்டு முறை கர்சர் கீழே + உள்ளீட்டு முறை கர்சர் இடது + உள்ளீட்டு முறை கர்சர் வலது + உள்ளீட்டு முறை கர்சர் கீழே + வால்யூம் பேனல் + அறிவிப்பை அகற்றவும் + பிரிக்கப்பட்ட திரை + ஒரு கைமுறை முறை (இடது பக்கம்) + ஒரு கைமுறை முறை (இடது பக்கம்) + முந்தைய பாடல் + அடுத்த பாடல் + + %s மூடப்பட்டது + diff --git a/packages/SystemUI/res-hwkeys/values-te-rIN/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-te-rIN/custom_strings.xml new file mode 100644 index 000000000000..3b636ecf2435 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-te-rIN/custom_strings.xml @@ -0,0 +1,56 @@ + + + + + + చర్య తీసుకోలేదు + QS ప్యానెల్ + నోటిఫికేషన్ ప్యానెల్ + స్క్రీన్‌షాట్ + పాక్షిక స్క్రీన్షాట్ + స్క్రీన్ ని రికార్డు చేయండి + విస్తరించిన డెస్క్టాప్ + స్క్రీన్ను ఆపివేయి + అప్లికేషన్ను మూసివేయండి + Google అసిస్టెంట్ + అప్ లో వెతకండి + ఫ్లాష్ లైట్ + బ్లూటూత్ + వైఫై + హాట్స్పాట్ + చివరి యాప్ + ఇటీవలి + పవర్ మెను + మెనూ + వెనక్కు + ఇల్లు + IME మారకం + స్క్రీన్ పిన్ చేయడాన్ని ఆపివేయి + ఇన్పుట్ పద్ధతి కర్సర్ కింద + ఇన్పుట్ పద్ధతి కర్సర్ వదిలి + ఇన్పుట్ పద్ధతి కర్సర్ కుడి + ఇన్పుట్ పద్ధతి కర్సర్ పైని + వాల్యూమ్ ప్యానెల్ + ప్రకటనలను క్లియర్ చేయండి + విభజించిన తెర + ఒక చేతి మోడ్ (ఎడమ) + ఒక చేతి మోడ్ (కుడి వైపు) + మునుపటి ట్రాక్ + తదుపరి ట్రాక్ + + %s చంపా + diff --git a/packages/SystemUI/res-hwkeys/values-th-rTH/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-th-rTH/custom_strings.xml new file mode 100644 index 000000000000..70449c48a924 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-th-rTH/custom_strings.xml @@ -0,0 +1,56 @@ + + + + + + ไม่มีการกระทำ + แผงตั้งค่า + แผงการแจ้งเตือน + ภาพหน้าจอ + บางส่วนของภาพหน้าจอ + บันทึกหน้าจอ + เต็มจอ + ปิดหน้าจอ + บังคับปิดแอป + ผู้ช่วยช่วยค้นหา + แตะบน Google Now + ค้นหาด้วยเสียง + ค้นหาในแอป + ไฟฉาย + บลูทูธ + WiFi + ฮอตสปอต + แอปล่าสุด + ล่า​สุด + เมนูเพาว์เวอร์ + เมนู + กลับ + หน้าแรก + เปลี่ยน IME + หยุดการปักหมุดหน้าจอ + วิธีการป้อนข้อมูลลง + วิธีการป้อนข้อมูลไปทางซ้าย + วิธีการป้อนข้อมูลไปทางขวา + วิธีการป้อนข้อมูลขึ้น + แผงควบคุมระดับเสียง + ล้างการแจ้งเตือน + แยกหน้าจอ + โหมดมือเดียว (ซ้าย) + โหมดมือเดียว (ขวา) + + %sปิดแอป + diff --git a/packages/SystemUI/res-hwkeys/values-th/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-th/custom_strings.xml new file mode 100644 index 000000000000..c4a48d8811da --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-th/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + ไม่มีการกระทำ + แผงตั้งค่า + แผงการแจ้งเตือน + ภาพหน้าจอ + บางส่วนของภาพหน้าจอ + บันทึกหน้าจอ + เต็มจอ + ปิดหน้าจอ + บังคับปิดแอป + Google assistant + ค้นหาในแอป + ไฟฉาย + บลูทูธ + WiFi + ฮอตสปอต + แอปล่าสุด + ล่า​สุด + เมนูเพาว์เวอร์ + เมนู + กลับ + หน้าแรก + เปลี่ยน IME + หยุดการปักหมุดหน้าจอ + วิธีการป้อนข้อมูลลง + วิธีการป้อนข้อมูลไปทางซ้าย + วิธีการป้อนข้อมูลไปทางขวา + วิธีการป้อนข้อมูลขึ้น + แผงควบคุมระดับเสียง + ล้างการแจ้งเตือน + แยกหน้าจอ + โหมดมือเดียว (ซ้าย) + โหมดมือเดียว (ขวา) + แทร็กก่อนหน้า + แทร็คถัดไป + การค้นหาด้วยเสียงของ Google + + %sปิดแอป + diff --git a/packages/SystemUI/res-hwkeys/values-tl/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-tl/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-tl/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-tr-rTR/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-tr-rTR/custom_strings.xml new file mode 100644 index 000000000000..127b4d4de198 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-tr-rTR/custom_strings.xml @@ -0,0 +1,59 @@ + + + + + + Eylem yok + Ayarlar paneli + Bildirim paneli + Ekran görüntüsü + Kısmi ekran görüntüsü + Ekranı kaydet + Genişletilmiş masaüstü + Ekranı kapat + Uygulamayı kapatmaya zorla + Arama yardımcısı + Google Asistan\'a Dokunun + + Sesli arama + Uygulama içi arama + El feneri + Bluetooth + Kablosuz + Erişim noktası + Son uygulama + Son uygulamalar + Güç menüsü + Menü + Geri + Ana sayfa + Klavye Değiştirici + Ekran sabitlemeyi durdur + Aşagı imleç giriş yöntemi + Sol imleç giriş yontemi + Sağ imleç giriş yöntemi + Yukarı imleç giriş yöntemi + Ses paneli + Bildirimleri temizle + Bölünmüş ekran + Tek el modu (sol taraf) + Tek el modu (sağ taraf) + Önceki parça + Sonraki parça + + %s sonlandırıldı + diff --git a/packages/SystemUI/res-hwkeys/values-tr/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-tr/custom_strings.xml new file mode 100644 index 000000000000..d8af09344257 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-tr/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Eylem yok + Hızlı ayarlar paneli + Bildirim paneli + Ekran görüntüsü + Kısmi ekran görüntüsü + Ekranı kaydet + Genişletilmiş masaüstü + Ekranı kapat + Uygulamayı kapatmaya zorla + Google asistan + Uygulama içi arama + El feneri + Bluetooth + WiFİ + Erişim noktası + Son uygulama + Son uygulamalar + Güç menüsü + Menü + Geri + Ana sayfa + Klavye değiştirici + Ekran sabitlemeyi durdur + Giriş yöntemi imleç aşağı + Giriş yöntemi imleç sola + Giriş yöntemi imleç sağa + Giriş yöntemi imleç yukarı + Ses paneli + Bildirimleri temizle + Bölünmüş ekran + Tek el modu (sol taraf) + Tek el modu (sağ taraf) + Önceki parça + Sonraki parça + Google sesli arama + + %s sonlandırıldı + diff --git a/packages/SystemUI/res-hwkeys/values-ug-rCN/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-ug-rCN/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-ug-rCN/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-ug/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-ug/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-ug/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-uk-rUA/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-uk-rUA/custom_strings.xml new file mode 100644 index 000000000000..7bcaaad534f7 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-uk-rUA/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + Немає дій + Панель налаштувань + Панель сповіщень + Знімок екрану + Частковий скріншот + Записати екран + Розширений робочий стіл + Вимкнути екран + Закрити примусово + Пошуковий асистент + Google Now On Tap + Голосовий пошук + Пошук у додатку + Ліхтарик + Bluetooth + WiFi + Точка доступу + Останній додаток + Нещодавні + Меню вимкнення + Меню + Назад + Додому + IME перемикач + Зупинити закріплення екрану + Метод введення курсор вниз + Метод введення курсор вліво + Метод введення курсор вправо + Метод введення курсор вгору + Панель гучності + Очистити сповіщення + Розділення екрану + Режим однієї руки (зліва) + Режим однієї руки (справа) + Попередня композиція + Наступна композиція + + %s закрито + diff --git a/packages/SystemUI/res-hwkeys/values-uk/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-uk/custom_strings.xml new file mode 100644 index 000000000000..c413cdd92dc8 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-uk/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Немає дій + Панель налаштувань + Панель сповіщень + Знімок екрану + Частковий скріншот + Записати екран + Розширений робочий стіл + Вимкнути екран + Закрити примусово + Google Помічник + Пошук у додатку + Ліхтарик + Bluetooth + WiFi + Точка доступу + Останній додаток + Нещодавні + Меню вимкнення + Меню + Назад + Додому + IME перемикач + Зупинити закріплення екрану + Метод введення курсор вниз + Метод введення курсор вліво + Метод введення курсор вправо + Метод введення курсор вгору + Панель гучності + Очистити сповіщення + Розділення екрану + Режим однієї руки (зліва) + Режим однієї руки (справа) + Попередня композиція + Наступна композиція + Голосовий пошук Google + + %s закрито + diff --git a/packages/SystemUI/res-hwkeys/values-ur-rPK/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-ur-rPK/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-ur-rPK/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values-vi-rVN/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-vi-rVN/custom_strings.xml new file mode 100644 index 000000000000..e3de297726cc --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-vi-rVN/custom_strings.xml @@ -0,0 +1,58 @@ + + + + + + Không có hành động + Bảng cài đặt + Bảng thông báo + Chụp ảnh màn hình + Ảnh chụp màn hình một phần + Ghi lại màn hình + Mở rộng màn hình + Tắt màn hình + Buộc dừng ứng dụng + Trợ lý tìm kiếm + Google Now On Tap + Tìm kiếm bằng giọng nói + Tìm kiếm trong ứng dụng + Đèn pin + Bluetooth + WiFi + Điểm phát sóng + Ứng dụng cuối + Gần đây + Trình đơn nguồn + Trình đơn + Quay lại + Trang chủ + Thay đổi IME + Dừng ghim màn hình + Phương thức nhập con trỏ xuống + Phương thức nhập con trỏ trái + Phương thức nhập con trỏ phải + Phương thức nhập con trỏ lên + Bảng điều chỉnh âm lượng + Xóa thông báo + Chia màn hình + Chế độ một tay (bên trái) + Chế độ một tay (bên phải) + Bản nhạc trước + Bản nhạc tiếp theo + + %s đã dừng + diff --git a/packages/SystemUI/res-hwkeys/values-vi/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-vi/custom_strings.xml new file mode 100644 index 000000000000..9031cb0cc3ef --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-vi/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + Không có hành động + Bảng cài đặt + Bảng thông báo + Chụp ảnh màn hình + Chụp một phần màn hình + Ghi lại màn hình + Mở rộng màn hình + Tắt màn hình + Buộc dừng ứng dụng + Google Assistant + Tìm kiếm trong ứng dụng + Đèn pin + Bluetooth + WiFi + Điểm phát sóng + Ứng dụng cuối + Gần đây + Trình đơn nguồn + Trình đơn + Quay lại + Trang chủ + Thay đổi IME + Dừng ghim màn hình + Phương thức nhập con trỏ xuống + Phương thức nhập con trỏ trái + Phương thức nhập con trỏ phải + Phương thức nhập con trỏ lên + Bảng điều chỉnh âm lượng + Xóa thông báo + Chia màn hình + Chế độ một tay (bên trái) + Chế độ một tay (bên phải) + Bản nhạc trước + Bản nhạc tiếp theo + Tìm kiếm âm thanh bằng Google + + %s đã dừng + diff --git a/packages/SystemUI/res-hwkeys/values-zh-rCN/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-zh-rCN/custom_strings.xml new file mode 100644 index 000000000000..5276607de9ee --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-zh-rCN/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + 无操作 + 快速设置面板 + 通知面板 + 屏幕截图 + 局部截图 + 屏幕录制 + 扩展桌面 + 关闭屏幕 + 强制关闭应用 + Google Assistant + 应用内搜索 + 手电筒 + 蓝牙 + WiFi + 热点 + 最后使用的应用 + 最近任务 + 电源菜单 + 菜单 + 返回 + 主屏幕 + 输入法切换器 + 停止屏幕固定 + 输入法光标向下 + 输入法光标向左 + 输入法光标向右 + 输入法光标向上 + 音量面板 + 清除通知 + 分屏 + 单手模式(左侧) + 单手模式(右侧) + 上一曲 + 下一曲 + Google 语音搜索 + + 已停止\"%s\" + diff --git a/packages/SystemUI/res-hwkeys/values-zh-rHK/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-zh-rHK/custom_strings.xml new file mode 100644 index 000000000000..a70cbacb9398 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-zh-rHK/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + 無動作 + 設定面板 + 通知面板 + 截圖 + 部分截圖 + 錄製螢幕 + 擴展桌面 + 關閉螢幕 + 強制關閉應用程式 + Google語音助手 + 應用程式內搜尋 + 手電筒 + 藍芽 + WiFi + 熱點 + 最後一個應用程式 + 最近使用的應用程式 + 電源選單 + 功能表 + 返回 + 首頁 + 輸入法切換 + 停止螢幕固定 + 輸入游標向下 + 輸入游標向左 + 輸入游標向右 + 輸入游標向上 + 音量面板 + 清除通知 + 分割視窗 + 單手模式 (左側) + 單手模式 (右側) + 上一首曲目 + 下一首曲目 + Google 聲音搜尋 + + %s 已終止 + diff --git a/packages/SystemUI/res-hwkeys/values-zh-rSG/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-zh-rSG/custom_strings.xml new file mode 100644 index 000000000000..35ec159136f9 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-zh-rSG/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + 無操作 + 設定面板 + 通知面板 + 截圖 + 部分截圖 + 錄製螢幕 + 延伸桌面 + 關閉螢幕 + 強制關閉應用程式 + Google 個人助理 + 應用程式內搜尋 + 手電筒 + 藍牙 + WiFi + 熱點 + 最後一個應用程式 + 最近的應用程式 + 電源選單 + 選單 + 返回 + 主畫面 + 輸入法切換 + 停止螢幕固定 + 輸入法游標向下 + 輸入法游標向左 + 輸入法游標向右 + 輸入法游標向上 + 音量面板 + 清除通知 + 分割畫面 + 單手模式 (左側) + 單手模式 (右側) + 上一首曲目 + 下一首曲目 + Google 聲音搜尋 + + %s 已終止 + diff --git a/packages/SystemUI/res-hwkeys/values-zh-rTW/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-zh-rTW/custom_strings.xml new file mode 100644 index 000000000000..427cc41554e6 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-zh-rTW/custom_strings.xml @@ -0,0 +1,57 @@ + + + + + + 無動作 + 設定面板 + 通知面板 + 擷取螢幕畫面 + 部分螢幕截圖 + 錄製螢幕 + 延伸桌面 + 關閉螢幕 + 強制關閉應用程式 + Google 個人助理 + 應用程式內搜尋 + 手電筒 + 藍牙 + WiFi + 熱點 + 最後一個應用程式 + 總覽 + 電源選單 + 選單 + 返回 + 主畫面 + 輸入法切換 + 停止螢幕固定 + 輸入法游標向下 + 輸入法游標向左 + 輸入法游標向右 + 輸入法游標向上 + 音量面板 + 清除通知 + 分割畫面 + 單手模式 (左側) + 單手模式 (右側) + 上一首曲目 + 下一首曲目 + Google 聲音搜尋 + + %s 已終止 + diff --git a/packages/SystemUI/res-hwkeys/values-zu/custom_strings.xml b/packages/SystemUI/res-hwkeys/values-zu/custom_strings.xml new file mode 100644 index 000000000000..f64c1b3f9f89 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values-zu/custom_strings.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/SystemUI/res-hwkeys/values/custom_colors.xml b/packages/SystemUI/res-hwkeys/values/custom_colors.xml new file mode 100644 index 000000000000..9ce6be3ad127 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values/custom_colors.xml @@ -0,0 +1,56 @@ + + + + + #fff + @android:color/black + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + @color/icon_color_default + + diff --git a/packages/SystemUI/res-hwkeys/values/custom_strings.xml b/packages/SystemUI/res-hwkeys/values/custom_strings.xml new file mode 100644 index 000000000000..c2d2a92dbba1 --- /dev/null +++ b/packages/SystemUI/res-hwkeys/values/custom_strings.xml @@ -0,0 +1,60 @@ + + + + + + + No action + QS panel + Notification panel + Screenshot + Partial screenshot + Record screen + Expanded desktop + Turn off screen + Force close app + Google assistant + In-app search + Flashlight + Bluetooth + WiFi + Hotspot + Last app + Recents + Power menu + Menu + Back + Home + IME changer + Stop screen pinning + Input method cursor down + Input method cursor left + Input method cursor right + Input method cursor up + Volume panel + Clear notifications + Split screen + One handed mode (left side) + One handed mode (right side) + Previous track + Next track + Google sound search + + + %s killed + + diff --git a/packages/SystemUI/res-keyguard/font/clock.xml b/packages/SystemUI/res-keyguard/font/clock.xml index d0867e9aa546..5122fe74719b 100644 --- a/packages/SystemUI/res-keyguard/font/clock.xml +++ b/packages/SystemUI/res-keyguard/font/clock.xml @@ -23,5 +23,5 @@ ** Recommended: font with variable width to support AOD => LS animations --> - + \ No newline at end of file diff --git a/packages/SystemUI/res-keyguard/font/google_sans_clock.ttf b/packages/SystemUI/res-keyguard/font/google_sans_clock.ttf new file mode 100644 index 000000000000..5e683a05088c Binary files /dev/null and b/packages/SystemUI/res-keyguard/font/google_sans_clock.ttf differ diff --git a/packages/SystemUI/res-keyguard/layout/footer_actions.xml b/packages/SystemUI/res-keyguard/layout/footer_actions.xml index a7e61029bfdb..f670eda0c0f3 100644 --- a/packages/SystemUI/res-keyguard/layout/footer_actions.xml +++ b/packages/SystemUI/res-keyguard/layout/footer_actions.xml @@ -94,7 +94,7 @@ android:padding="@dimen/qs_footer_icon_padding" android:src="@*android:drawable/ic_lock_power_off" android:contentDescription="@string/accessibility_quick_settings_power_menu" - android:tint="?androidprv:attr/textColorOnAccent" /> + android:tint="?androidprv:attr/textColorPrimaryInverse" /> \ No newline at end of file diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml index 625ffd3aa3ec..e2d382004672 100644 --- a/packages/SystemUI/res-keyguard/values/styles.xml +++ b/packages/SystemUI/res-keyguard/values/styles.xml @@ -51,6 +51,7 @@ 32sp ?android:attr/textColorPrimary @*android:string/config_headlineFontFamily + cv03, cv04 -16dp + + diff --git a/packages/SystemUI/res/values-night/syb_colors.xml b/packages/SystemUI/res/values-night/syb_colors.xml new file mode 100644 index 000000000000..ea888240c506 --- /dev/null +++ b/packages/SystemUI/res/values-night/syb_colors.xml @@ -0,0 +1,23 @@ + + + + @android:color/system_accent2_600 + @android:color/system_neutral1_900 + + diff --git a/packages/SystemUI/res/values-ru/syb_strings.xml b/packages/SystemUI/res/values-ru/syb_strings.xml new file mode 100644 index 000000000000..1c6fde2012f0 --- /dev/null +++ b/packages/SystemUI/res/values-ru/syb_strings.xml @@ -0,0 +1,91 @@ + + + + + + + Приоритетные + Будильник + Не беспокоить + Фонарик + + Редактирование иконок + Экономия трафика + Уровень сигнала + + + + Удалить + + Запись экрана удалена + + + + Удалить + + Скриншот удалён + + %1$s принудительно остановлено + Приложение + + + %2$s • Dash зарядка (%s до полной) + Dash зарядка + + + %2$s • Warp зарядка (%1$s до полной) + %s • Warp зарядка + + + Подавление мерцания + + + Переключить SIM на + Используется SIM 1 для передачи данных + Используется SIM 2 для передачи данных + + + Режим чтения + Режим чтения включен + Режим чтения выключен + Режим чтения включен + Режим чтения выключен + + + Перезагрузка + Система + Перезагрузка\u2026 + Режим восстановления + Загрузчик + Fastbootd + Настройки + Скриншот + Запись экрана + Фонарик + + + Звук + Звонок + Вибрация + Без звука + + + Кофеин + Кофеин выкл + Кофеин вкл + + diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml index 02ba271ee9a4..49ccb8a71680 100644 --- a/packages/SystemUI/res/values/colors.xml +++ b/packages/SystemUI/res/values/colors.xml @@ -33,9 +33,9 @@ #F1F3F4 - #191C18 - #303030 - #F0F0F0 + @*android:color/primary_device_default_light + @*android:color/surface_light + @*android:color/foreground_device_default_light #F85D4D @color/GM2_grey_900 @@ -147,6 +147,12 @@ #1f000000 #40000000 + + #ff4185f4 + #ff3aa853 + #ffea4234 + #fffbbc06 + #F1F3F4 #E8EAED diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index 7ed915600230..40cd17366c52 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -87,7 +87,7 @@ - internet,bt,flashlight,dnd,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle,location,hotspot,inversion,saver,dark,work,night,reverse,reduce_brightness,qr_code_scanner,onehanded,color_correction + internet,bt,flashlight,dnd,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,livedisplay,reading_mode,mictoggle,cameratoggle,location,hotspot,inversion,saver,dark,work,night,reverse,reduce_brightness,qr_code_scanner,onehanded,color_correction,nfc,anti_flicker,dataswitch,sound,caffeine @@ -243,7 +243,7 @@ - 130 + 100 6000 @@ -410,7 +410,7 @@ true - true + false @@ -481,6 +481,7 @@ @*android:string/status_bar_rotate @*android:string/status_bar_headset + @*android:string/status_bar_call_strength @@ -701,14 +702,12 @@ @*android:string/status_bar_volume - @*android:string/status_bar_alarm_clock @*android:string/status_bar_call_strength @*android:string/status_bar_volume - @*android:string/status_bar_alarm_clock @*android:string/status_bar_call_strength @@ -717,4 +716,8 @@ com.android.keyguard com.android.systemui + + + true + diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 66488415ff9f..70ddd4af73fb 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -392,7 +392,7 @@ 48dp - 8dp + 8dp 20dp @@ -431,7 +431,7 @@ 0dp - 76dp + 76dp 2dp @@ -466,7 +466,7 @@ 25dp - 28dp + 32dp 80dp 8dp @dimen/qs_tile_margin_horizontal @@ -497,7 +497,7 @@ 28dp 10dp 60dp - 12dp + 8dp 16dp 4dp 16dp diff --git a/packages/SystemUI/res/values/flags.xml b/packages/SystemUI/res/values/flags.xml index 49dd574af829..d0fc1abe42c9 100644 --- a/packages/SystemUI/res/values/flags.xml +++ b/packages/SystemUI/res/values/flags.xml @@ -16,19 +16,19 @@ --> - false + true true - false + true false - false + true false diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml index 0c25f5473416..99dbaec694e0 100644 --- a/packages/SystemUI/res/values/styles.xml +++ b/packages/SystemUI/res/values/styles.xml @@ -136,7 +136,7 @@ @@ -187,21 +187,21 @@ - @@ -455,7 +455,7 @@ @color/dark_mode_qs_icon_color_single_tone - @@ -477,6 +477,7 @@ @@ -583,7 +584,7 @@ @@ -595,6 +596,7 @@ + + + + + + + + diff --git a/packages/SystemUI/res/xml/statusbar_items.xml b/packages/SystemUI/res/xml/statusbar_items.xml new file mode 100644 index 000000000000..a13b1f6bcf1c --- /dev/null +++ b/packages/SystemUI/res/xml/statusbar_items.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/QuickStepContract.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/QuickStepContract.java index 630fb360cc14..b437503a600a 100644 --- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/QuickStepContract.java +++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/QuickStepContract.java @@ -38,7 +38,7 @@ public class QuickStepContract { // Fully qualified name of the Launcher activity. public static final String LAUNCHER_ACTIVITY_CLASS_NAME = - "com.google.android.apps.nexuslauncher.NexusLauncherActivity"; + "com.android.launcher3.Launcher"; public static final String KEY_EXTRA_SYSUI_PROXY = "extra_sysui_proxy"; public static final String KEY_EXTRA_WINDOW_CORNER_RADIUS = "extra_window_corner_radius"; diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationAdapterCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationAdapterCompat.java index 618d2d2f213a..06f5372e5cce 100644 --- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationAdapterCompat.java +++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationAdapterCompat.java @@ -105,7 +105,7 @@ public void run() { } @Override - public void onAnimationCancelled() { + public void onAnimationCancelled(boolean isKeyguardOccluded) { remoteAnimationAdapter.onAnimationCancelled(); } }; diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardConstants.java b/packages/SystemUI/src/com/android/keyguard/KeyguardConstants.java index b2658c9f9bdb..f8f07a26326a 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardConstants.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardConstants.java @@ -28,6 +28,6 @@ public class KeyguardConstants { * be used temporarily for debugging. */ public static final boolean DEBUG = Log.isLoggable("Keyguard", Log.DEBUG); - public static final boolean DEBUG_SIM_STATES = true; - public static final boolean DEBUG_BIOMETRIC_WAKELOCK = true; + public static final boolean DEBUG_SIM_STATES = false; + public static final boolean DEBUG_BIOMETRIC_WAKELOCK = false; } diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardMessageArea.java b/packages/SystemUI/src/com/android/keyguard/KeyguardMessageArea.java index 5ab2fd0aff09..a80d7cbfc9dc 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardMessageArea.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardMessageArea.java @@ -181,9 +181,11 @@ void update() { ? INVISIBLE : VISIBLE); setText(status); ColorStateList colorState = mDefaultColorState; - if (mNextMessageColorState.getDefaultColor() != DEFAULT_COLOR) { - colorState = mNextMessageColorState; - mNextMessageColorState = ColorStateList.valueOf(DEFAULT_COLOR); + if (mNextMessageColorState != null) { + if (mNextMessageColorState.getDefaultColor() != DEFAULT_COLOR) { + colorState = mNextMessageColorState; + mNextMessageColorState = ColorStateList.valueOf(DEFAULT_COLOR); + } } if (mAltBouncerShowing) { // alt bouncer has a black scrim, so always show the text in white diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordViewController.java index bfacc590dc52..75a5128217f9 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordViewController.java @@ -16,9 +16,13 @@ package com.android.keyguard; +import static com.android.keyguard.KeyguardAbsKeyInputView.MINIMUM_PASSWORD_LENGTH_BEFORE_REPORT; + import android.content.res.ColorStateList; import android.content.res.Resources; +import android.os.AsyncTask; import android.os.UserHandle; +import android.provider.Settings; import android.text.Editable; import android.text.InputType; import android.text.TextUtils; @@ -37,7 +41,9 @@ import android.widget.TextView.OnEditorActionListener; import com.android.internal.util.LatencyTracker; +import com.android.internal.widget.LockscreenCredential; import com.android.internal.widget.LockPatternUtils; +import com.android.internal.widget.LockPatternUtils.RequestThrottledException; import com.android.keyguard.KeyguardSecurityModel.SecurityMode; import com.android.settingslib.Utils; import com.android.systemui.R; @@ -61,6 +67,12 @@ public class KeyguardPasswordViewController private ImageView mSwitchImeButton; private boolean mPaused; + private final boolean quickUnlock = (Settings.System.getIntForUser(getContext().getContentResolver(), + Settings.System.LOCKSCREEN_QUICK_UNLOCK_CONTROL, 0, UserHandle.USER_CURRENT) == 1); + private final int userId = KeyguardUpdateMonitor.getCurrentUser(); + + private LockPatternUtils mLockPatternUtils; + private final OnEditorActionListener mOnEditorActionListener = (v, actionId, event) -> { // Check if this was the result of hitting the enter key final boolean isSoftImeEvent = event == null @@ -91,6 +103,13 @@ public void onTextChanged(CharSequence s, int start, int before, int count) { public void afterTextChanged(Editable s) { if (!TextUtils.isEmpty(s)) { onUserInput(); + if (quickUnlock) { + LockscreenCredential entry = mView.getEnteredCredential(); + if (entry.size() == keyguardPinPasswordLength()) { + validateQuickUnlock(mLockPatternUtils, entry, userId); + } + + } } } }; @@ -130,6 +149,7 @@ protected KeyguardPasswordViewController(KeyguardPasswordView view, mShowImeAtScreenOn = resources.getBoolean(R.bool.kg_show_ime_at_screen_on); mPasswordEntry = mView.findViewById(mView.getPasswordTextViewId()); mSwitchImeButton = mView.findViewById(R.id.switch_ime_button); + mLockPatternUtils = lockPatternUtils; } @Override @@ -323,4 +343,45 @@ private boolean hasMultipleEnabledIMEsOrSubtypes(InputMethodManager imm, //enabled input method subtype (The current IME should be LatinIME.) || imm.getEnabledInputMethodSubtypeList(null, false).size() > 1; } + + private AsyncTask validateQuickUnlock(final LockPatternUtils utils, + final LockscreenCredential password, + final int userId) { + AsyncTask task = new AsyncTask() { + + @Override + protected Boolean doInBackground(Void... args) { + try { + return utils.checkCredential(password, userId, null); + } catch (RequestThrottledException ex) { + return false; + } + } + + @Override + protected void onPostExecute(Boolean result) { + runQuickUnlock(result); + } + }; + task.execute(); + return task; + } + + private void runQuickUnlock(Boolean matched) { + if (matched) { + mKeyguardSecurityCallback.reportUnlockAttempt(userId, true, 0); + mKeyguardSecurityCallback.dismiss(true, userId); + mView.resetPasswordText(true, true); + } + } + + private int keyguardPinPasswordLength() { + int pinPasswordLength = -1; + try { + pinPasswordLength = (int) mLockPatternUtils.getLockSettings().getLong("lockscreen.pin_password_length", 0, userId); + } catch (Exception e) { + // do nothing + } + return pinPasswordLength >= 4 ? pinPasswordLength : -1; + } } diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPinViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPinViewController.java index 9f4585fb1a92..1b5189dd6ae9 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardPinViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPinViewController.java @@ -16,15 +16,30 @@ package com.android.keyguard; +import static com.android.keyguard.KeyguardAbsKeyInputView.MINIMUM_PASSWORD_LENGTH_BEFORE_REPORT; + +import android.os.AsyncTask; +import android.os.UserHandle; +import android.provider.Settings; import android.view.View; +import androidx.constraintlayout.widget.ConstraintLayout; + import com.android.internal.util.LatencyTracker; import com.android.internal.widget.LockPatternUtils; +import com.android.internal.widget.LockPatternUtils.RequestThrottledException; +import com.android.internal.widget.LockscreenCredential; +import com.android.keyguard.PasswordTextView.QuickUnlockListener; import com.android.keyguard.KeyguardSecurityModel.SecurityMode; import com.android.systemui.R; import com.android.systemui.classifier.FalsingCollector; import com.android.systemui.statusbar.policy.DevicePostureController; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + public class KeyguardPinViewController extends KeyguardPinBasedInputViewController { private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; @@ -32,6 +47,14 @@ public class KeyguardPinViewController private final DevicePostureController.Callback mPostureCallback = posture -> mView.onDevicePostureChanged(posture); + private int userId = KeyguardUpdateMonitor.getCurrentUser(); + + private LockPatternUtils mLockPatternUtils; + + private KeyguardSecurityCallback mKeyguardSecurityCallback; + + private static List sNumbers = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 0); + protected KeyguardPinViewController(KeyguardPINView view, KeyguardUpdateMonitor keyguardUpdateMonitor, SecurityMode securityMode, LockPatternUtils lockPatternUtils, @@ -46,6 +69,8 @@ protected KeyguardPinViewController(KeyguardPINView view, emergencyButtonController, falsingCollector); mKeyguardUpdateMonitor = keyguardUpdateMonitor; mPostureController = postureController; + mLockPatternUtils = lockPatternUtils; + mKeyguardSecurityCallback = keyguardSecurityCallback; } @Override @@ -55,9 +80,48 @@ protected void onViewAttached() { View cancelBtn = mView.findViewById(R.id.cancel_button); if (cancelBtn != null) { cancelBtn.setOnClickListener(view -> { - getKeyguardSecurityCallback().reset(); - getKeyguardSecurityCallback().onCancelClicked(); + mKeyguardSecurityCallback.reset(); + mKeyguardSecurityCallback.onCancelClicked(); + }); + } + + boolean scramblePin = Settings.System.getIntForUser(getContext().getContentResolver(), + Settings.System.LOCKSCREEN_PIN_SCRAMBLE_LAYOUT, 0, + UserHandle.USER_CURRENT) == 1; + + if (scramblePin) { + Collections.shuffle(sNumbers); + // get all children who are NumPadKey's + ConstraintLayout container = (ConstraintLayout) mView.findViewById(R.id.pin_container); + + List views = new ArrayList(); + for (int i = 0; i < container.getChildCount(); i++) { + View view = container.getChildAt(i); + if (view.getClass() == NumPadKey.class) { + views.add((NumPadKey) view); + } + } + + // reset the digits in the views + for (int i = 0; i < sNumbers.size(); i++) { + NumPadKey view = views.get(i); + view.setDigit(sNumbers.get(i)); + } + } + + boolean quickUnlock = (Settings.System.getIntForUser(getContext().getContentResolver(), + Settings.System.LOCKSCREEN_QUICK_UNLOCK_CONTROL, 0, UserHandle.USER_CURRENT) == 1); + + if (quickUnlock) { + mPasswordEntry.setQuickUnlockListener(new QuickUnlockListener() { + public void onValidateQuickUnlock(String password) { + if (password != null && password.length() == keyguardPinPasswordLength()) { + validateQuickUnlock(mLockPatternUtils, password, userId); + } + } }); + } else { + mPasswordEntry.setQuickUnlockListener(null); } mPostureController.addCallback(mPostureCallback); @@ -86,4 +150,48 @@ public boolean startDisappearAnimation(Runnable finishRunnable) { return mView.startDisappearAnimation( mKeyguardUpdateMonitor.needsSlowUnlockTransition(), finishRunnable); } + + private AsyncTask validateQuickUnlock(final LockPatternUtils utils, + final String password, + final int userId) { + AsyncTask task = new AsyncTask() { + + @Override + protected Boolean doInBackground(Void... args) { + try { + return utils.checkCredential( + LockscreenCredential.createPinOrNone(password), + userId, null); + } catch (RequestThrottledException ex) { + return false; + } + } + + @Override + protected void onPostExecute(Boolean result) { + runQuickUnlock(result); + } + }; + task.execute(); + return task; + } + + private void runQuickUnlock(Boolean matched) { + if (matched) { + mPasswordEntry.setEnabled(false); + mKeyguardSecurityCallback.reportUnlockAttempt(userId, true, 0); + mKeyguardSecurityCallback.dismiss(true, userId); + mView.resetPasswordText(true, true); + } + } + + private int keyguardPinPasswordLength() { + int pinPasswordLength = -1; + try { + pinPasswordLength = (int) mLockPatternUtils.getLockSettings().getLong("lockscreen.pin_password_length", -1, userId); + } catch (Exception e) { + // do nothing + } + return pinPasswordLength >= 4 ? pinPasswordLength : -1; + } } diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java index 47df70b522f7..dd7c6d4caaa6 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java @@ -86,6 +86,7 @@ protected KeyguardSimPinViewController(KeyguardSimPinView view, mKeyguardUpdateMonitor = keyguardUpdateMonitor; mTelephonyManager = telephonyManager; mSimImageView = mView.findViewById(R.id.keyguard_sim); + mPasswordEntry.setQuickUnlockListener(null); } @Override diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukViewController.java index 47aa43b86599..5b934dc8124c 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukViewController.java @@ -92,6 +92,7 @@ protected KeyguardSimPukViewController(KeyguardSimPukView view, mKeyguardUpdateMonitor = keyguardUpdateMonitor; mTelephonyManager = telephonyManager; mSimImageView = mView.findViewById(R.id.keyguard_sim); + mPasswordEntry.setQuickUnlockListener(null); } @Override diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java index 13690f30ab3b..87f494933604 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -48,6 +48,7 @@ import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Context; +import android.content.ContentResolver; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.IPackageManager; @@ -78,6 +79,8 @@ import android.os.Trace; import android.os.UserHandle; import android.os.UserManager; +import android.pocket.IPocketCallback; +import android.pocket.PocketManager; import android.provider.Settings; import android.service.dreams.DreamService; import android.service.dreams.IDreamManager; @@ -190,6 +193,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab private static final int MSG_REQUIRE_NFC_UNLOCK = 345; private static final int MSG_KEYGUARD_DISMISS_ANIMATION_FINISHED = 346; + // Additional messages should be 600+ + private static final int MSG_POCKET_STATE_CHANGED = 600; + /** Biometric authentication state: Not listening. */ private static final int BIOMETRIC_STATE_STOPPED = 0; @@ -336,6 +342,8 @@ public void onExpandedChanged(boolean isExpanded) { private SensorPrivacyManager mSensorPrivacyManager; private final ActiveUnlockConfig mActiveUnlockConfig; + private boolean mFingerprintWakeAndUnlock; + /** * Short delay before restarting fingerprint authentication after a successful try. This should * be slightly longer than the time between onFingerprintAuthenticated and @@ -363,6 +371,27 @@ public void onExpandedChanged(boolean isExpanded) { private final Handler mHandler; + private PocketManager mPocketManager; + private boolean mIsDeviceInPocket; + private final IPocketCallback mPocketCallback = new IPocketCallback.Stub() { + @Override + public void onStateChanged(boolean isDeviceInPocket, int reason) { + boolean wasInPocket = mIsDeviceInPocket; + if (reason == PocketManager.REASON_SENSOR) { + mIsDeviceInPocket = isDeviceInPocket; + } else { + mIsDeviceInPocket = false; + } + if (wasInPocket != mIsDeviceInPocket) { + mHandler.sendEmptyMessage(MSG_POCKET_STATE_CHANGED); + } + } + }; + + public boolean isPocketLockVisible(){ + return mPocketManager.isPocketLockVisible(); + } + private SparseBooleanArray mBiometricEnabledForUser = new SparseBooleanArray(); private BiometricManager mBiometricManager; private IBiometricEnabledOnKeyguardCallback mBiometricEnabledCallback = @@ -422,6 +451,8 @@ static class BiometricAuthenticated { private static int sCurrentUser; + SettingsObserver mSettingsObserver; + public synchronized static void setCurrentUser(int currentUser) { sCurrentUser = currentUser; } @@ -1899,6 +1930,8 @@ protected KeyguardUpdateMonitor( mActiveUnlockConfig = activeUnlockConfiguration; mActiveUnlockConfig.setKeyguardUpdateMonitor(this); + updateFingerprintSettings(); + mHandler = new Handler(mainLooper) { @Override public void handleMessage(Message msg) { @@ -2009,6 +2042,9 @@ public void handleMessage(Message msg) { case MSG_KEYGUARD_DISMISS_ANIMATION_FINISHED: handleKeyguardDismissAnimationFinished(); break; + case MSG_POCKET_STATE_CHANGED: + updateBiometricListeningState(BIOMETRIC_ACTION_UPDATE); + break; default: super.handleMessage(msg); break; @@ -2023,7 +2059,8 @@ public void handleMessage(Message msg) { } // Take a guess at initial SIM state, battery status and PLMN until we get an update - mBatteryStatus = new BatteryStatus(BATTERY_STATUS_UNKNOWN, 100, 0, 0, 0, true); + mBatteryStatus = new BatteryStatus(BATTERY_STATUS_UNKNOWN, + 100, 0, 0, 0, true, 0, 0, 0, false, false); // Watch for interesting updates final IntentFilter filter = new IntentFilter(); @@ -2087,6 +2124,11 @@ public void handleMessage(Message msg) { mDreamManager = IDreamManager.Stub.asInterface( ServiceManager.getService(DreamService.DREAM_SERVICE)); + mPocketManager = (PocketManager) context.getSystemService(Context.POCKET_SERVICE); + if (mPocketManager != null) { + mPocketManager.addCallback(mPocketCallback); + } + if (mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) { mFpm = (FingerprintManager) context.getSystemService(Context.FINGERPRINT_SERVICE); mFingerprintSensorProperties = mFpm.getSensorPropertiesInternal(); @@ -2168,6 +2210,8 @@ public void onChange(boolean selfChange) { mContext.getContentResolver().registerContentObserver( Settings.System.getUriFor(Settings.System.TIME_12_24), false, mTimeFormatChangeObserver, UserHandle.USER_ALL); + mSettingsObserver = new SettingsObserver(mHandler); + mSettingsObserver.observe(); } private void updateFaceEnrolled(int userId) { @@ -2479,7 +2523,7 @@ private boolean shouldListenForFaceAssistant() { BiometricAuthenticated face = mUserFaceAuthenticated.get(getCurrentUser()); return mAssistantVisible && mKeyguardOccluded && !(face != null && face.mAuthenticated) - && !mUserHasTrust.get(getCurrentUser(), false); + && !mUserHasTrust.get(getCurrentUser(), false) && !mIsDeviceInPocket; } private boolean shouldTriggerActiveUnlockForAssistant() { @@ -2492,7 +2536,18 @@ protected boolean shouldListenForFingerprint(boolean isUdfps) { final int user = getCurrentUser(); final boolean userDoesNotHaveTrust = !getUserHasTrust(user); final boolean shouldListenForFingerprintAssistant = shouldListenForFingerprintAssistant(); - final boolean shouldListenKeyguardState = + final boolean shouldListenKeyguardState; + if (!mFingerprintWakeAndUnlock) { + shouldListenKeyguardState = + (mKeyguardIsVisible + || mBouncerIsOrWillBeShowing + || shouldListenForFingerprintAssistant + || (mKeyguardOccluded && mIsDreaming)) + && mDeviceInteractive && !mGoingToSleep && !mKeyguardGoingAway + || (mKeyguardOccluded && userDoesNotHaveTrust + && (mOccludingAppRequestingFp || isUdfps)); + } else { + shouldListenKeyguardState = mKeyguardIsVisible || !mDeviceInteractive || (mBouncerIsOrWillBeShowing && !mKeyguardGoingAway) @@ -2501,6 +2556,7 @@ protected boolean shouldListenForFingerprint(boolean isUdfps) { || (mKeyguardOccluded && mIsDreaming) || (mKeyguardOccluded && userDoesNotHaveTrust && (mOccludingAppRequestingFp || isUdfps)); + } // Only listen if this KeyguardUpdateMonitor belongs to the primary user. There is an // instance of KeyguardUpdateMonitor for each user but KeyguardUpdateMonitor is user-aware. @@ -2524,7 +2580,8 @@ protected boolean shouldListenForFingerprint(boolean isUdfps) { && userDoesNotHaveTrust); final boolean shouldListen = shouldListenKeyguardState && shouldListenUserState - && shouldListenBouncerState && shouldListenUdfpsState && !isFingerprintLockedOut(); + && shouldListenBouncerState && shouldListenUdfpsState && !isFingerprintLockedOut() + && !mIsDeviceInPocket; if (DEBUG_FINGERPRINT || DEBUG_SPEW) { maybeLogListenerModelData( @@ -3324,8 +3381,16 @@ private boolean isBatteryUpdateInteresting(BatteryStatus old, BatteryStatus curr return true; } + // change in battery temperature + if (old.temperature != current.temperature) { + return true; + } + // change in charging current while plugged in - if (nowPluggedIn && current.maxChargingWattage != old.maxChargingWattage) { + if (nowPluggedIn && + (current.maxChargingWattage != old.maxChargingWattage || + current.maxChargingCurrent != old.maxChargingCurrent || + current.maxChargingVoltage != old.maxChargingVoltage)) { return true; } @@ -3339,6 +3404,16 @@ private boolean isBatteryUpdateInteresting(BatteryStatus old, BatteryStatus curr return true; } + // change in dash charging while plugged in + if (nowPluggedIn && current.dashChargeStatus != old.dashChargeStatus) { + return true; + } + + // change in warp charging while plugged in + if (nowPluggedIn && current.warpChargeStatus != old.warpChargeStatus) { + return true; + } + return false; } @@ -3698,6 +3773,43 @@ private void updateLogoutEnabled() { } } + class SettingsObserver extends ContentObserver { + private ContentResolver mContentResolver; + SettingsObserver(Handler handler) { + super(handler); + } + + void observe() { + mContentResolver = mContext.getContentResolver(); + mContentResolver.registerContentObserver(Settings.System.getUriFor( + Settings.System.FINGERPRINT_WAKE_UNLOCK), false, this, + UserHandle.USER_ALL); + updateSettings(); + } + + void unobserve() { + if (mContentResolver != null) { + mContentResolver.unregisterContentObserver(this); + } + } + + @Override + public void onChange(boolean selfChange) { + updateSettings(); + } + } + + private void updateSettings() { + ContentResolver resolver = mContext.getContentResolver(); + updateFingerprintSettings(); + } + + private void updateFingerprintSettings() { + mFingerprintWakeAndUnlock = Settings.System.getIntForUser( + mContext.getContentResolver(), Settings.System.FINGERPRINT_WAKE_UNLOCK, + 0, UserHandle.USER_CURRENT) == 0; + } + protected int getBiometricLockoutDelay() { return BIOMETRIC_LOCKOUT_RESET_DELAY_MS; } @@ -3723,6 +3835,10 @@ public void destroy() { mContext.getContentResolver().unregisterContentObserver(mTimeFormatChangeObserver); } + if (mSettingsObserver != null) { + mSettingsObserver.unobserve(); + } + try { ActivityManager.getService().unregisterUserSwitchObserver(mUserSwitchObserver); } catch (RemoteException e) { diff --git a/packages/SystemUI/src/com/android/keyguard/NumPadKey.java b/packages/SystemUI/src/com/android/keyguard/NumPadKey.java index 4aed2513d4f2..d42276ae3c8d 100644 --- a/packages/SystemUI/src/com/android/keyguard/NumPadKey.java +++ b/packages/SystemUI/src/com/android/keyguard/NumPadKey.java @@ -22,6 +22,8 @@ import android.graphics.drawable.GradientDrawable; import android.os.PowerManager; import android.os.SystemClock; +import android.os.UserHandle; +import android.provider.Settings; import android.util.AttributeSet; import android.view.HapticFeedbackConstants; import android.view.LayoutInflater; @@ -114,30 +116,42 @@ protected NumPadKey(Context context, AttributeSet attrs, int defStyle, int conte mDigitText.setText(Integer.toString(mDigit)); mKlondikeText = (TextView) findViewById(R.id.klondike_text); + updateText(); + setContentDescription(mDigitText.getText().toString()); + + Drawable background = getBackground(); + if (background instanceof GradientDrawable) { + mAnimator = new NumPadAnimator(context, background.mutate(), + R.style.NumPadKey, mDigitText, null); + } else { + mAnimator = null; + } + } + + public void setDigit(int digit) { + mDigit = digit; + updateText(); + } + + private void updateText() { + boolean scramblePin = Settings.System.getIntForUser(getContext().getContentResolver(), + Settings.System.LOCKSCREEN_PIN_SCRAMBLE_LAYOUT, 0, + UserHandle.USER_CURRENT) == 1; if (mDigit >= 0) { + mDigitText.setText(Integer.toString(mDigit)); if (sKlondike == null) { sKlondike = getResources().getStringArray(R.array.lockscreen_num_pad_klondike); } if (sKlondike != null && sKlondike.length > mDigit) { String klondike = sKlondike[mDigit]; final int len = klondike.length(); - if (len > 0) { + if (len > 0 || scramblePin) { mKlondikeText.setText(klondike); } else if (mKlondikeText.getVisibility() != View.GONE) { mKlondikeText.setVisibility(View.INVISIBLE); } } } - - setContentDescription(mDigitText.getText().toString()); - - Drawable background = getBackground(); - if (background instanceof GradientDrawable) { - mAnimator = new NumPadAnimator(context, background.mutate(), - R.style.NumPadKey, mDigitText, null); - } else { - mAnimator = null; - } } @Override diff --git a/packages/SystemUI/src/com/android/keyguard/PasswordTextView.java b/packages/SystemUI/src/com/android/keyguard/PasswordTextView.java index b1597144d237..73a99061e322 100644 --- a/packages/SystemUI/src/com/android/keyguard/PasswordTextView.java +++ b/packages/SystemUI/src/com/android/keyguard/PasswordTextView.java @@ -102,11 +102,25 @@ public class PasswordTextView extends View { private Interpolator mFastOutSlowInInterpolator; private boolean mShowPassword; private UserActivityListener mUserActivityListener; + protected QuickUnlockListener mQuickUnlockListener; public interface UserActivityListener { void onUserActivity(); } + /* Quick unlock management for PIN view. */ + public interface QuickUnlockListener { + /** + * Validate current password and prepare callback if verified. + * @param password The password string to be verified. + */ + void onValidateQuickUnlock(String password); + } + + public void setQuickUnlockListener(QuickUnlockListener listener) { + mQuickUnlockListener = listener; + } + public PasswordTextView(Context context) { this(context, null); } @@ -265,6 +279,10 @@ public void append(char c) { } userActivity(); sendAccessibilityEventTypeViewTextChanged(textbefore, textbefore.length(), 0, 1); + + if (mQuickUnlockListener != null) { + mQuickUnlockListener.onValidateQuickUnlock(mText); + } } public void setUserActivityListener(UserActivityListener userActivitiListener) { diff --git a/packages/SystemUI/src/com/android/systemui/Dependency.java b/packages/SystemUI/src/com/android/systemui/Dependency.java index 1270bd823612..7af9f41ae246 100644 --- a/packages/SystemUI/src/com/android/systemui/Dependency.java +++ b/packages/SystemUI/src/com/android/systemui/Dependency.java @@ -127,6 +127,7 @@ import com.android.systemui.statusbar.policy.SecurityController; import com.android.systemui.statusbar.policy.SensorPrivacyController; import com.android.systemui.statusbar.policy.SmartReplyConstants; +import com.android.systemui.statusbar.policy.TaskHelper; import com.android.systemui.statusbar.policy.UserInfoController; import com.android.systemui.statusbar.policy.UserSwitcherController; import com.android.systemui.statusbar.policy.ZenModeController; @@ -374,6 +375,7 @@ public class Dependency { @Inject Lazy mGroupExpansionManagerLazy; @Inject Lazy mSystemUIDialogManagerLazy; @Inject Lazy mDialogLaunchAnimatorLazy; + @Inject Lazy mTaskHelper; @Inject public Dependency() { @@ -567,6 +569,7 @@ protected void start() { mProviders.put(ProtoTracer.class, mProtoTracer::get); mProviders.put(DeviceConfigProxy.class, mDeviceConfigProxy::get); mProviders.put(TelephonyListenerManager.class, mTelephonyListenerManager::get); + mProviders.put(TaskHelper.class, mTaskHelper::get); // TODO(b/118592525): to support multi-display , we start to add something which is // per-display, while others may be global. I think it's time to add diff --git a/packages/SystemUI/src/com/android/systemui/ExpandHelper.java b/packages/SystemUI/src/com/android/systemui/ExpandHelper.java index f00615bc0fe6..527bba2d088c 100644 --- a/packages/SystemUI/src/com/android/systemui/ExpandHelper.java +++ b/packages/SystemUI/src/com/android/systemui/ExpandHelper.java @@ -547,7 +547,6 @@ boolean startExpanding(ExpandableView v, int expandType) { mExpanding = true; mCallback.expansionStateChanged(true); if (DEBUG) Log.d(TAG, "scale type " + expandType + " beginning on view: " + v); - mCallback.setUserLockedChild(v, true); mScaler.setView(v); mOldHeight = mScaler.getHeight(); mCurrentHeight = mOldHeight; @@ -560,6 +559,7 @@ boolean startExpanding(ExpandableView v, int expandType) { if (DEBUG) Log.d(TAG, "working on a non-expandable child"); mNaturalHeight = mOldHeight; } + mCallback.setUserLockedChild(v, true); if (DEBUG) Log.d(TAG, "got mOldHeight: " + mOldHeight + " mNaturalHeight: " + mNaturalHeight); InteractionJankMonitor.getInstance().begin(v, CUJ_NOTIFICATION_SHADE_ROW_EXPAND); diff --git a/packages/SystemUI/src/com/android/systemui/RetickerAnimations.java b/packages/SystemUI/src/com/android/systemui/RetickerAnimations.java new file mode 100644 index 000000000000..80820ffc44e0 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/RetickerAnimations.java @@ -0,0 +1,53 @@ +package com.android.systemui; + +import android.animation.Animator; +import android.animation.ObjectAnimator; +import android.view.animation.BounceInterpolator; +import android.view.View; + +public class RetickerAnimations { + + static boolean mIsAnimatingTicker; + + public static void doBounceAnimationIn(View targetView) { + ObjectAnimator animator = ObjectAnimator.ofFloat(targetView, "translationY", -100, 0, 0); + ObjectAnimator animator2 = ObjectAnimator.ofFloat(targetView, "translationX", 0, 17, 0); + animator.setInterpolator(new BounceInterpolator()); + animator2.setInterpolator(new BounceInterpolator()); + animator.setDuration(500); + animator2.setStartDelay(500); + animator2.setDuration(500); + animator.start(); + animator2.start(); + targetView.setVisibility(View.VISIBLE); + } + + public static void doBounceAnimationOut(View targetView, View notificationStackScroller) { + ObjectAnimator animator = ObjectAnimator.ofFloat(targetView, "translationY", 0, -1000, -1000); + animator.setInterpolator(new BounceInterpolator()); + animator.setDuration(350); + animator.start(); + animator.addListener(new Animator.AnimatorListener() { + @Override + public void onAnimationStart(Animator animation) { + } + @Override + public void onAnimationRepeat(Animator animation) { + } + @Override + public void onAnimationEnd(Animator animation) { + notificationStackScroller.setVisibility(View.VISIBLE); + targetView.setVisibility(View.GONE); + mIsAnimatingTicker = false; + } + @Override + public void onAnimationCancel(Animator animation) { + } + }); + } + + public static boolean isTickerAnimating() { + return mIsAnimatingTicker; + } + +} diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIService.java b/packages/SystemUI/src/com/android/systemui/SystemUIService.java index 7bcba3cc1c46..acaa50ef8d85 100644 --- a/packages/SystemUI/src/com/android/systemui/SystemUIService.java +++ b/packages/SystemUI/src/com/android/systemui/SystemUIService.java @@ -83,7 +83,7 @@ public void onCreate() { throw new RuntimeException(); } - if (Build.IS_DEBUGGABLE) { + if (Build.IS_ENG) { // b/71353150 - looking for leaked binder proxies BinderInternal.nSetBinderProxyCountEnabled(true); BinderInternal.nSetBinderProxyCountWatermarks(1000,900); diff --git a/packages/SystemUI/src/com/android/systemui/assist/ui/InvocationLightsView.java b/packages/SystemUI/src/com/android/systemui/assist/ui/InvocationLightsView.java index ac39ed501811..d6da7b4c7937 100644 --- a/packages/SystemUI/src/com/android/systemui/assist/ui/InvocationLightsView.java +++ b/packages/SystemUI/src/com/android/systemui/assist/ui/InvocationLightsView.java @@ -20,6 +20,7 @@ import android.annotation.ColorInt; import android.annotation.Nullable; import android.content.Context; +import android.content.res.Resources; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; @@ -114,6 +115,13 @@ public InvocationLightsView(Context context, AttributeSet attrs, int defStyleAtt for (int i = 0; i < 4; i++) { mAssistInvocationLights.add(new EdgeLight(Color.TRANSPARENT, 0, 0)); } + + Resources res = mContext.getResources(); + int colorRed = res.getColor(R.color.edge_light_red); + int colorYellow = res.getColor(R.color.edge_light_yellow); + int colorBlue = res.getColor(R.color.edge_light_blue); + int colorGreen = res.getColor(R.color.edge_light_green); + setColors(colorBlue, colorRed, colorYellow, colorGreen); } /** diff --git a/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java b/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java index 6a10d4ab1e8b..4ea55e9054a8 100644 --- a/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java +++ b/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java @@ -15,8 +15,6 @@ */ package com.android.systemui.battery; -import static android.provider.Settings.System.SHOW_BATTERY_PERCENT; - import static com.android.systemui.DejankUtils.whitelistIpcs; import static java.lang.annotation.RetentionPolicy.SOURCE; @@ -37,6 +35,7 @@ import android.util.TypedValue; import android.view.Gravity; import android.view.LayoutInflater; +import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; @@ -45,7 +44,11 @@ import androidx.annotation.StyleRes; import androidx.annotation.VisibleForTesting; +import com.android.settingslib.graph.CircleBatteryDrawable; +import com.android.settingslib.graph.FullCircleBatteryDrawable; import com.android.settingslib.graph.ThemedBatteryDrawable; +import com.android.settingslib.graph.RLandscapeBatteryDrawable; +import com.android.settingslib.graph.LandscapeBatteryDrawable; import com.android.systemui.DualToneHandler; import com.android.systemui.R; import com.android.systemui.animation.Interpolators; @@ -60,15 +63,30 @@ public class BatteryMeterView extends LinearLayout implements DarkReceiver { + protected static final int BATTERY_STYLE_PORTRAIT = 0; + protected static final int BATTERY_STYLE_CIRCLE = 1; + protected static final int BATTERY_STYLE_DOTTED_CIRCLE = 2; + protected static final int BATTERY_STYLE_FULL_CIRCLE = 3; + protected static final int BATTERY_STYLE_TEXT = 4; + protected static final int BATTERY_STYLE_HIDDEN = 5; + protected static final int BATTERY_STYLE_RLANDSCAPE = 6; + protected static final int BATTERY_STYLE_LANDSCAPE = 7; + protected static final int BATTERY_STYLE_BIG_CIRCLE = 8; + protected static final int BATTERY_STYLE_BIG_DOTTED_CIRCLE = 9; + @Retention(SOURCE) @IntDef({MODE_DEFAULT, MODE_ON, MODE_OFF, MODE_ESTIMATE}) public @interface BatteryPercentMode {} public static final int MODE_DEFAULT = 0; public static final int MODE_ON = 1; public static final int MODE_OFF = 2; - public static final int MODE_ESTIMATE = 3; + public static final int MODE_ESTIMATE = 3; // Not to be used - private final ThemedBatteryDrawable mDrawable; + private final CircleBatteryDrawable mCircleDrawable; + private final FullCircleBatteryDrawable mFullCircleDrawable; + private final ThemedBatteryDrawable mThemedDrawable; + private final RLandscapeBatteryDrawable mRLandscapeDrawable; + private final LandscapeBatteryDrawable mLandscapeDrawable; private final ImageView mBatteryIconView; private TextView mBatteryPercentView; @@ -76,21 +94,29 @@ public class BatteryMeterView extends LinearLayout implements DarkReceiver { private int mTextColor; private int mLevel; private int mShowPercentMode = MODE_DEFAULT; - private boolean mShowPercentAvailable; private boolean mCharging; // Error state where we know nothing about the current battery state private boolean mBatteryStateUnknown; // Lazily-loaded since this is expected to be a rare-if-ever state private Drawable mUnknownStateDrawable; + private int mBatteryStyle = BATTERY_STYLE_PORTRAIT; + private int mShowBatteryPercent; + private int mShowBatteryEstimate = 0; + private boolean mBatteryPercentCharging; + private DualToneHandler mDualToneHandler; + private final ArrayList mCallbacks = new ArrayList<>(); + private int mNonAdaptedSingleToneColor; private int mNonAdaptedForegroundColor; private int mNonAdaptedBackgroundColor; private BatteryEstimateFetcher mBatteryEstimateFetcher; + public boolean mQS = false; + public BatteryMeterView(Context context, AttributeSet attrs) { this(context, attrs, 0); } @@ -106,32 +132,52 @@ public BatteryMeterView(Context context, AttributeSet attrs, int defStyle) { final int frameColor = atts.getColor(R.styleable.BatteryMeterView_frameColor, context.getColor(R.color.meter_background_color)); mPercentageStyleId = atts.getResourceId(R.styleable.BatteryMeterView_textAppearance, 0); - mDrawable = new ThemedBatteryDrawable(context, frameColor); + mCircleDrawable = new CircleBatteryDrawable(context, frameColor); + mThemedDrawable = new ThemedBatteryDrawable(context, frameColor); + mFullCircleDrawable = new FullCircleBatteryDrawable(context, frameColor); + mRLandscapeDrawable = new RLandscapeBatteryDrawable(context, frameColor); + mLandscapeDrawable = new LandscapeBatteryDrawable(context, frameColor); atts.recycle(); - mShowPercentAvailable = context.getResources().getBoolean( - com.android.internal.R.bool.config_battery_percentage_setting_available); - setupLayoutTransition(); mBatteryIconView = new ImageView(context); - mBatteryIconView.setImageDrawable(mDrawable); - final MarginLayoutParams mlp = new MarginLayoutParams( - getResources().getDimensionPixelSize(R.dimen.status_bar_battery_icon_width), - getResources().getDimensionPixelSize(R.dimen.status_bar_battery_icon_height)); + mBatteryStyle = Settings.System.getIntForUser(mContext.getContentResolver(), + Settings.System.STATUS_BAR_BATTERY_STYLE, BATTERY_STYLE_PORTRAIT, UserHandle.USER_CURRENT); + updateDrawable(); + + int batteryHeight = mBatteryStyle == BATTERY_STYLE_CIRCLE || mBatteryStyle == BATTERY_STYLE_DOTTED_CIRCLE + || mBatteryStyle == BATTERY_STYLE_FULL_CIRCLE ? + getResources().getDimensionPixelSize(R.dimen.status_bar_battery_icon_circle_width) : + getResources().getDimensionPixelSize(R.dimen.status_bar_battery_icon_height); + int batteryWidth = mBatteryStyle == BATTERY_STYLE_CIRCLE || mBatteryStyle == BATTERY_STYLE_DOTTED_CIRCLE + || mBatteryStyle == BATTERY_STYLE_FULL_CIRCLE ? + getResources().getDimensionPixelSize(R.dimen.status_bar_battery_icon_circle_width) : + getResources().getDimensionPixelSize(R.dimen.status_bar_battery_icon_width); + + final MarginLayoutParams mlp = new MarginLayoutParams(batteryWidth, batteryHeight); mlp.setMargins(0, 0, 0, getResources().getDimensionPixelOffset(R.dimen.battery_margin_bottom)); addView(mBatteryIconView, mlp); - updateShowPercent(); + updatePercentView(); + updateVisibility(); + mDualToneHandler = new DualToneHandler(context); // Init to not dark at all. - onDarkChanged(new ArrayList(), 0, DarkIconDispatcher.DEFAULT_ICON_TINT); + if (isNightMode()) { + onDarkChanged(new ArrayList(), 0, DarkIconDispatcher.DEFAULT_ICON_TINT); + } setClipChildren(false); setClipToPadding(false); } + private boolean isNightMode() { + return (mContext.getResources().getConfiguration().uiMode + & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES; + } + private void setupLayoutTransition() { LayoutTransition transition = new LayoutTransition(); transition.setDuration(200); @@ -153,6 +199,46 @@ private void setupLayoutTransition() { setLayoutTransition(transition); } + public int getBatteryStyle() { + return mBatteryStyle; + } + + public void setBatteryStyle(int batteryStyle) { + if (batteryStyle == mBatteryStyle) return; + mBatteryStyle = batteryStyle; + updateBatteryStyle(); + } + + protected void updateBatteryStyle() { + updateDrawable(); + scaleBatteryMeterViews(); + updatePercentView(); + updateVisibility(); + } + + public void setBatteryPercent(int showBatteryPercent) { + if (showBatteryPercent == mShowBatteryPercent) return; + mShowBatteryPercent = showBatteryPercent; + updatePercentView(); + } + + public void setBatteryPercentCharging(boolean batteryPercentCharging) { + if (batteryPercentCharging == mBatteryPercentCharging) return; + mBatteryPercentCharging = batteryPercentCharging; + updatePercentView(); + } + + public int getBatteryEstimate() { + return mShowBatteryEstimate; + } + + public void setBatteryEstimate(int showBatteryEstimate) { + if (showBatteryEstimate == mShowBatteryEstimate) return; + mShowBatteryEstimate = showBatteryEstimate; + updatePercentView(); + updateVisibility(); + } + public void setForceShowPercent(boolean show) { setPercentShowMode(show ? MODE_ON : MODE_DEFAULT); } @@ -175,7 +261,7 @@ public void setPercentShowMode(@BatteryPercentMode int mode) { @Override protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); - updatePercentView(); + updateBatteryStyle(); } public void setColorsFromContext(Context context) { @@ -192,15 +278,33 @@ public boolean hasOverlappingRendering() { } void onBatteryLevelChanged(int level, boolean pluggedIn) { - mDrawable.setCharging(pluggedIn); - mDrawable.setBatteryLevel(level); - mCharging = pluggedIn; - mLevel = level; - updatePercentText(); + if (mLevel != level) { + mLevel = level; + mThemedDrawable.setBatteryLevel(mLevel); + mCircleDrawable.setBatteryLevel(mLevel); + mFullCircleDrawable.setBatteryLevel(mLevel); + mRLandscapeDrawable.setBatteryLevel(mLevel); + mLandscapeDrawable.setBatteryLevel(mLevel); + updatePercentText(); + } + if (mCharging != pluggedIn) { + mCharging = pluggedIn; + mThemedDrawable.setCharging(mCharging); + mCircleDrawable.setCharging(mCharging); + mFullCircleDrawable.setCharging(mCharging); + mRLandscapeDrawable.setCharging(mCharging); + mLandscapeDrawable.setCharging(mCharging); + updateShowPercent(); + updatePercentText(); + } } void onPowerSaveChanged(boolean isPowerSave) { - mDrawable.setPowerSaveEnabled(isPowerSave); + mCircleDrawable.setPowerSaveEnabled(isPowerSave); + mThemedDrawable.setPowerSaveEnabled(isPowerSave); + mFullCircleDrawable.setPowerSaveEnabled(isPowerSave); + mRLandscapeDrawable.setPowerSaveEnabled(isPowerSave); + mLandscapeDrawable.setPowerSaveEnabled(isPowerSave); } private TextView loadPercentView() { @@ -233,29 +337,8 @@ void updatePercentText() { return; } - if (mBatteryEstimateFetcher == null) { - return; - } - if (mBatteryPercentView != null) { - if (mShowPercentMode == MODE_ESTIMATE && !mCharging) { - mBatteryEstimateFetcher.fetchBatteryTimeRemainingEstimate( - (String estimate) -> { - if (mBatteryPercentView == null) { - return; - } - if (estimate != null && mShowPercentMode == MODE_ESTIMATE) { - mBatteryPercentView.setText(estimate); - setContentDescription(getContext().getString( - R.string.accessibility_battery_level_with_estimate, - mLevel, estimate)); - } else { - setPercentTextAtCurrentLevel(); - } - }); - } else { - setPercentTextAtCurrentLevel(); - } + setPercentTextAtCurrentLevel(); } else { setContentDescription( getContext().getString(mCharging ? R.string.accessibility_battery_level_charging @@ -264,37 +347,70 @@ void updatePercentText() { } private void setPercentTextAtCurrentLevel() { - if (mBatteryPercentView == null) { - return; - } + String text = NumberFormat.getPercentInstance().format(mLevel / 100f); + + if (mBatteryEstimateFetcher != null && mShowBatteryEstimate != 0 && !mCharging) { + mBatteryEstimateFetcher.fetchBatteryTimeRemainingEstimate( + (String estimate) -> { + if (mBatteryPercentView == null) { + return; + } + if (estimate != null) { + mBatteryPercentView.setText(estimate); + setContentDescription(getContext().getString( + R.string.accessibility_battery_level_with_estimate, + mLevel, estimate)); + } else { + mBatteryPercentView.setText(text); + setContentDescription(getContext().getString( + R.string.accessibility_battery_level, + mLevel)); + } + }); + } else { + // Use the high voltage symbol ⚡ (u26A1 unicode) but prevent the system + // to load its emoji colored variant with the uFE0E flag + String bolt = "\u26A1\uFE0E"; + CharSequence mChargeIndicator = mCharging && (mBatteryStyle == BATTERY_STYLE_HIDDEN || + mBatteryStyle == BATTERY_STYLE_TEXT) ? (bolt + " ") : ""; + // Setting text actually triggers a layout pass (because the text view is set to + // wrap_content width and TextView always relayouts for this). Avoid needless + // relayout if the text didn't actually change. + if (!TextUtils.equals(mBatteryPercentView.getText(), text)) { + mBatteryPercentView.setText(mChargeIndicator + text); + } - String percentText = NumberFormat.getPercentInstance().format(mLevel / 100f); - // Setting text actually triggers a layout pass (because the text view is set to - // wrap_content width and TextView always relayouts for this). Avoid needless - // relayout if the text didn't actually change. - if (!TextUtils.equals(mBatteryPercentView.getText(), percentText)) { - mBatteryPercentView.setText(percentText); + setContentDescription( + getContext().getString(mCharging ? R.string.accessibility_battery_level_charging + : R.string.accessibility_battery_level, mLevel)); } + } - setContentDescription( - getContext().getString(mCharging ? R.string.accessibility_battery_level_charging - : R.string.accessibility_battery_level, mLevel)); + private void removeBatteryPercentView() { + if (mBatteryPercentView != null) { + removeView(mBatteryPercentView); + mBatteryPercentView = null; + } } void updateShowPercent() { - final boolean showing = mBatteryPercentView != null; - // TODO(b/140051051) - final boolean systemSetting = 0 != whitelistIpcs(() -> Settings.System - .getIntForUser(getContext().getContentResolver(), - SHOW_BATTERY_PERCENT, 0, UserHandle.USER_CURRENT)); - boolean shouldShow = - (mShowPercentAvailable && systemSetting && mShowPercentMode != MODE_OFF) - || mShowPercentMode == MODE_ON - || mShowPercentMode == MODE_ESTIMATE; - shouldShow = shouldShow && !mBatteryStateUnknown; - - if (shouldShow) { - if (!showing) { + boolean drawPercentInside = mShowBatteryPercent == 1 + && !mCharging && !mBatteryStateUnknown; + boolean showPercent = mShowBatteryPercent >= 2 + || mBatteryStyle == BATTERY_STYLE_TEXT + || mShowPercentMode == MODE_ON; + showPercent = showPercent && !mBatteryStateUnknown + && mBatteryStyle != BATTERY_STYLE_HIDDEN; + + mCircleDrawable.setShowPercent(drawPercentInside); + mThemedDrawable.setShowPercent(drawPercentInside); + mFullCircleDrawable.setShowPercent(drawPercentInside); + mRLandscapeDrawable.setShowPercent(drawPercentInside); + mLandscapeDrawable.setShowPercent(drawPercentInside); + + if (showPercent || (mBatteryPercentCharging && mCharging) + || mShowBatteryEstimate != 0) { + if (mBatteryPercentView == null) { mBatteryPercentView = loadPercentView(); if (mPercentageStyleId != 0) { // Only set if specified as attribute mBatteryPercentView.setTextAppearance(mPercentageStyleId); @@ -306,11 +422,30 @@ void updateShowPercent() { LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT)); } - } else { - if (showing) { - removeView(mBatteryPercentView); - mBatteryPercentView = null; + if (mBatteryStyle == BATTERY_STYLE_HIDDEN || mBatteryStyle == BATTERY_STYLE_TEXT) { + mBatteryPercentView.setPaddingRelative(0, 0, 0, 0); + } else { + Resources res = getContext().getResources(); + mBatteryPercentView.setPaddingRelative( + res.getDimensionPixelSize(R.dimen.battery_level_padding_start), 0, 0, 0); + setLayoutDirection(mShowBatteryPercent > 2 ? View.LAYOUT_DIRECTION_RTL : View.LAYOUT_DIRECTION_LTR); } + + } else { + removeBatteryPercentView(); + } + } + + private void updateVisibility() { + if (mBatteryStyle == BATTERY_STYLE_HIDDEN || mBatteryStyle == BATTERY_STYLE_TEXT) { + mBatteryIconView.setVisibility(View.GONE); + mBatteryIconView.setImageDrawable(null); + } else { + mBatteryIconView.setVisibility(View.VISIBLE); + scaleBatteryMeterViews(); + } + for (int i = 0; i < mCallbacks.size(); i++) { + mCallbacks.get(i).onHiddenBattery(mBatteryStyle == BATTERY_STYLE_HIDDEN); } } @@ -333,7 +468,7 @@ void onBatteryUnknownStateChanged(boolean isUnknown) { if (mBatteryStateUnknown) { mBatteryIconView.setImageDrawable(getUnknownStateDrawable()); } else { - mBatteryIconView.setImageDrawable(mDrawable); + updateDrawable(); } updateShowPercent(); @@ -343,21 +478,68 @@ void onBatteryUnknownStateChanged(boolean isUnknown) { * Looks up the scale factor for status bar icons and scales the battery view by that amount. */ void scaleBatteryMeterViews() { + if (mBatteryIconView == null) { + return; + } Resources res = getContext().getResources(); TypedValue typedValue = new TypedValue(); res.getValue(R.dimen.status_bar_icon_scale_factor, typedValue, true); float iconScaleFactor = typedValue.getFloat(); - int batteryHeight = res.getDimensionPixelSize(R.dimen.status_bar_battery_icon_height); - int batteryWidth = res.getDimensionPixelSize(R.dimen.status_bar_battery_icon_width); + int batteryHeight = mBatteryStyle == BATTERY_STYLE_CIRCLE || mBatteryStyle == BATTERY_STYLE_DOTTED_CIRCLE + || mBatteryStyle == BATTERY_STYLE_FULL_CIRCLE ? + res.getDimensionPixelSize(R.dimen.status_bar_battery_icon_circle_width) : + res.getDimensionPixelSize(R.dimen.status_bar_battery_icon_height); + batteryHeight = mBatteryStyle == BATTERY_STYLE_LANDSCAPE || mBatteryStyle == BATTERY_STYLE_RLANDSCAPE ? + res.getDimensionPixelSize(R.dimen.status_bar_battery_icon_height_landscape) : batteryHeight; + batteryHeight = mBatteryStyle == BATTERY_STYLE_BIG_CIRCLE || mBatteryStyle == BATTERY_STYLE_BIG_DOTTED_CIRCLE ? + res.getDimensionPixelSize(R.dimen.status_bar_battery_icon_big_circle_height) : batteryHeight; + int batteryWidth = mBatteryStyle == BATTERY_STYLE_CIRCLE || mBatteryStyle == BATTERY_STYLE_DOTTED_CIRCLE + || mBatteryStyle == BATTERY_STYLE_FULL_CIRCLE ? + res.getDimensionPixelSize(R.dimen.status_bar_battery_icon_circle_width) : + res.getDimensionPixelSize(R.dimen.status_bar_battery_icon_width); + batteryWidth = mBatteryStyle == BATTERY_STYLE_LANDSCAPE || mBatteryStyle == BATTERY_STYLE_RLANDSCAPE ? + res.getDimensionPixelSize(R.dimen.status_bar_battery_icon_width_landscape) : batteryWidth; + batteryWidth = mBatteryStyle == BATTERY_STYLE_BIG_CIRCLE || mBatteryStyle == BATTERY_STYLE_BIG_DOTTED_CIRCLE ? + res.getDimensionPixelSize(R.dimen.status_bar_battery_icon_big_circle_width) : batteryWidth; int marginBottom = res.getDimensionPixelSize(R.dimen.battery_margin_bottom); LinearLayout.LayoutParams scaledLayoutParams = new LinearLayout.LayoutParams( (int) (batteryWidth * iconScaleFactor), (int) (batteryHeight * iconScaleFactor)); scaledLayoutParams.setMargins(0, 0, 0, marginBottom); - mBatteryIconView.setLayoutParams(scaledLayoutParams); + if (mBatteryIconView != null) { + mBatteryIconView.setLayoutParams(scaledLayoutParams); + } + } + + private void updateDrawable() { + switch (mBatteryStyle) { + case BATTERY_STYLE_PORTRAIT: + mBatteryIconView.setImageDrawable(mThemedDrawable); + break; + case BATTERY_STYLE_RLANDSCAPE: + mBatteryIconView.setImageDrawable(mRLandscapeDrawable); + break; + case BATTERY_STYLE_LANDSCAPE: + mBatteryIconView.setImageDrawable(mLandscapeDrawable); + break; + case BATTERY_STYLE_FULL_CIRCLE: + mBatteryIconView.setImageDrawable(mFullCircleDrawable); + break; + case BATTERY_STYLE_CIRCLE: + case BATTERY_STYLE_DOTTED_CIRCLE: + case BATTERY_STYLE_BIG_CIRCLE: + case BATTERY_STYLE_BIG_DOTTED_CIRCLE: + mCircleDrawable.setMeterStyle(mBatteryStyle); + mBatteryIconView.setImageDrawable(mCircleDrawable); + break; + case BATTERY_STYLE_HIDDEN: + case BATTERY_STYLE_TEXT: + return; + default: + } } @Override @@ -380,7 +562,11 @@ public void onDarkChanged(ArrayList areas, float darkIntensity, int tint) * @param singleToneColor */ public void updateColors(int foregroundColor, int backgroundColor, int singleToneColor) { - mDrawable.setColors(foregroundColor, backgroundColor, singleToneColor); + mCircleDrawable.setColors(foregroundColor, backgroundColor, singleToneColor); + mThemedDrawable.setColors(foregroundColor, backgroundColor, singleToneColor); + mFullCircleDrawable.setColors(foregroundColor, backgroundColor, singleToneColor); + mRLandscapeDrawable.setColors(foregroundColor, backgroundColor, singleToneColor); + mLandscapeDrawable.setColors(foregroundColor, backgroundColor, singleToneColor); mTextColor = singleToneColor; if (mBatteryPercentView != null) { mBatteryPercentView.setTextColor(singleToneColor); @@ -392,10 +578,11 @@ public void updateColors(int foregroundColor, int backgroundColor, int singleTon } public void dump(PrintWriter pw, String[] args) { - String powerSave = mDrawable == null ? null : mDrawable.getPowerSaveEnabled() + ""; + String powerSave = mThemedDrawable == null ? + null : mThemedDrawable.getPowerSaveEnabled() + ""; CharSequence percent = mBatteryPercentView == null ? null : mBatteryPercentView.getText(); pw.println(" BatteryMeterView:"); - pw.println(" mDrawable.getPowerSave: " + powerSave); + pw.println(" getPowerSave: " + powerSave); pw.println(" mBatteryPercentView.getText(): " + percent); pw.println(" mTextColor: #" + Integer.toHexString(mTextColor)); pw.println(" mBatteryStateUnknown: " + mBatteryStateUnknown); @@ -413,5 +600,17 @@ public interface BatteryEstimateFetcher { void fetchBatteryTimeRemainingEstimate( BatteryController.EstimateFetchCompletion completion); } + + public interface BatteryMeterViewCallbacks { + default void onHiddenBattery(boolean hidden) {} + } + + public void addCallback(BatteryMeterViewCallbacks callback) { + mCallbacks.add(callback); + } + + public void removeCallback(BatteryMeterViewCallbacks callbacks) { + mCallbacks.remove(callbacks); + } } diff --git a/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterViewController.java b/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterViewController.java index ae9a32309d45..ca9d11927135 100644 --- a/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterViewController.java +++ b/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterViewController.java @@ -15,7 +15,7 @@ */ package com.android.systemui.battery; -import static android.provider.Settings.System.SHOW_BATTERY_PERCENT; +import static android.provider.Settings.Global.BATTERY_ESTIMATES_LAST_UPDATE_TIME; import android.app.ActivityManager; import android.content.ContentResolver; @@ -24,13 +24,10 @@ import android.os.Handler; import android.provider.Settings; import android.text.TextUtils; -import android.util.ArraySet; import android.view.View; import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.dagger.qualifiers.Main; -import com.android.systemui.settings.CurrentUserTracker; -import com.android.systemui.statusbar.phone.StatusBarIconController; import com.android.systemui.statusbar.policy.BatteryController; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.tuner.TunerService; @@ -40,14 +37,20 @@ /** Controller for {@link BatteryMeterView}. **/ public class BatteryMeterViewController extends ViewController { + + public static final String STATUS_BAR_BATTERY_STYLE = + "system:" + Settings.System.STATUS_BAR_BATTERY_STYLE; + public static final String STATUS_BAR_SHOW_BATTERY_PERCENT = + "system:" + Settings.System.STATUS_BAR_SHOW_BATTERY_PERCENT; + public static final String STATUS_BAR_BATTERY_TEXT_CHARGING = + "system:" + Settings.System.STATUS_BAR_BATTERY_TEXT_CHARGING; + private final ConfigurationController mConfigurationController; private final TunerService mTunerService; private final ContentResolver mContentResolver; private final BatteryController mBatteryController; - private final String mSlotBattery; private final SettingObserver mSettingObserver; - private final CurrentUserTracker mCurrentUserTracker; private final ConfigurationController.ConfigurationListener mConfigurationListener = new ConfigurationController.ConfigurationListener() { @@ -60,10 +63,26 @@ public void onDensityOrFontScaleChanged() { private final TunerService.Tunable mTunable = new TunerService.Tunable() { @Override public void onTuningChanged(String key, String newValue) { - if (StatusBarIconController.ICON_HIDE_LIST.equals(key)) { - ArraySet icons = StatusBarIconController.getIconHideList( - getContext(), newValue); - mView.setVisibility(icons.contains(mSlotBattery) ? View.GONE : View.VISIBLE); + switch (key) { + case STATUS_BAR_BATTERY_STYLE: + if (mView.mQS) break; + int batteryStyle = TunerService.parseInteger(newValue, + BatteryMeterView.BATTERY_STYLE_PORTRAIT); + mView.setBatteryStyle(batteryStyle); + break; + case STATUS_BAR_SHOW_BATTERY_PERCENT: + if (mView.mQS) break; + int showBatteryPercent = + TunerService.parseInteger(newValue, 0); + mView.setBatteryPercent(showBatteryPercent); + break; + case STATUS_BAR_BATTERY_TEXT_CHARGING: + boolean batteryPercentCharging = + TunerService.parseIntegerSwitch(newValue, true); + mView.setBatteryPercentCharging(batteryPercentCharging); + break; + default: + break; } } }; @@ -107,16 +126,7 @@ public BatteryMeterViewController( mView.setBatteryEstimateFetcher(mBatteryController::getEstimatedTimeRemainingString); - mSlotBattery = getResources().getString(com.android.internal.R.string.status_bar_battery); mSettingObserver = new SettingObserver(mainHandler); - mCurrentUserTracker = new CurrentUserTracker(broadcastDispatcher) { - @Override - public void onUserSwitched(int newUserId) { - contentResolver.unregisterContentObserver(mSettingObserver); - registerShowBatteryPercentObserver(newUserId); - mView.updateShowPercent(); - } - }; } @Override @@ -125,9 +135,7 @@ protected void onViewAttached() { subscribeForTunerUpdates(); mBatteryController.addCallback(mBatteryStateChangeCallback); - registerShowBatteryPercentObserver(ActivityManager.getCurrentUser()); registerGlobalBatteryUpdateObserver(); - mCurrentUserTracker.startTracking(); mView.updateShowPercent(); } @@ -138,7 +146,6 @@ protected void onViewDetached() { unsubscribeFromTunerUpdates(); mBatteryController.removeCallback(mBatteryStateChangeCallback); - mCurrentUserTracker.stopTracking(); mContentResolver.unregisterContentObserver(mSettingObserver); } @@ -156,7 +163,9 @@ private void subscribeForTunerUpdates() { return; } - mTunerService.addTunable(mTunable, StatusBarIconController.ICON_HIDE_LIST); + mTunerService.addTunable(mTunable, STATUS_BAR_BATTERY_STYLE); + mTunerService.addTunable(mTunable, STATUS_BAR_SHOW_BATTERY_PERCENT); + mTunerService.addTunable(mTunable, STATUS_BAR_BATTERY_TEXT_CHARGING); mIsSubscribedForTunerUpdates = true; } @@ -169,14 +178,6 @@ private void unsubscribeFromTunerUpdates() { mIsSubscribedForTunerUpdates = false; } - private void registerShowBatteryPercentObserver(int user) { - mContentResolver.registerContentObserver( - Settings.System.getUriFor(SHOW_BATTERY_PERCENT), - false, - mSettingObserver, - user); - } - private void registerGlobalBatteryUpdateObserver() { mContentResolver.registerContentObserver( Settings.Global.getUriFor(Settings.Global.BATTERY_ESTIMATES_LAST_UPDATE_TIME), diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java index 6da2f50aac27..c498e2abc675 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java @@ -729,7 +729,7 @@ static WindowManager.LayoutParams getLayoutParams(IBinder windowToken, CharSeque final WindowManager.LayoutParams lp = new WindowManager.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT, - WindowManager.LayoutParams.TYPE_STATUS_BAR_ADDITIONAL, + WindowManager.LayoutParams.TYPE_DISPLAY_OVERLAY, windowFlags, PixelFormat.TRANSLUCENT); lp.privateFlags |= WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS; diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java index 17396469c10a..ae9efbcc97ad 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java @@ -54,8 +54,10 @@ import android.os.Handler; import android.os.RemoteException; import android.os.UserManager; +import android.util.DisplayUtils; import android.util.Log; import android.util.SparseBooleanArray; +import android.view.Display; import android.view.DisplayInfo; import android.view.MotionEvent; import android.view.WindowManager; @@ -112,8 +114,6 @@ public class AuthController extends CoreStartable implements CommandQueue.Callba private final Provider mUdfpsControllerFactory; private final Provider mSidefpsControllerFactory; - @NonNull private Point mStableDisplaySize = new Point(); - @Nullable private final PointF mFaceAuthSensorLocation; @Nullable private PointF mFingerprintLocation; @Nullable private Rect mUdfpsBounds; @@ -486,9 +486,11 @@ public float getScaleFactor() { } DisplayInfo displayInfo = new DisplayInfo(); mContext.getDisplay().getDisplayInfo(displayInfo); - final float scaleFactor = android.util.DisplayUtils.getPhysicalPixelDisplaySizeRatio( - mStableDisplaySize.x, mStableDisplaySize.y, displayInfo.getNaturalWidth(), - displayInfo.getNaturalHeight()); + final Display.Mode maxDisplayMode = + DisplayUtils.getMaximumResolutionDisplayMode(displayInfo.supportedModes); + final float scaleFactor = DisplayUtils.getPhysicalPixelDisplaySizeRatio( + maxDisplayMode.getPhysicalWidth(), maxDisplayMode.getPhysicalHeight(), + displayInfo.getNaturalWidth(), displayInfo.getNaturalHeight()); return new PointF(mFaceAuthSensorLocation.x * scaleFactor, mFaceAuthSensorLocation.y * scaleFactor); } @@ -614,7 +616,15 @@ private int getDisplayWidth() { } private void updateFingerprintLocation() { - int xLocation = getDisplayWidth() / 2; + boolean isPowerbuttonFps = + mFingerprintManager != null && mFingerprintManager.isPowerbuttonFps(); + + int xLocation; + if (isPowerbuttonFps) { + xLocation = getDisplayWidth(); + } else { + xLocation = getDisplayWidth() / 2; + } try { xLocation = mContext.getResources().getDimensionPixelSize( com.android.systemui.R.dimen @@ -636,9 +646,11 @@ private void updateUdfpsLocation() { if (mUdfpsController != null) { final DisplayInfo displayInfo = new DisplayInfo(); mContext.getDisplay().getDisplayInfo(displayInfo); - final float scaleFactor = android.util.DisplayUtils.getPhysicalPixelDisplaySizeRatio( - mStableDisplaySize.x, mStableDisplaySize.y, displayInfo.getNaturalWidth(), - displayInfo.getNaturalHeight()); + final Display.Mode maxDisplayMode = + DisplayUtils.getMaximumResolutionDisplayMode(displayInfo.supportedModes); + final float scaleFactor = DisplayUtils.getPhysicalPixelDisplaySizeRatio( + maxDisplayMode.getPhysicalWidth(), maxDisplayMode.getPhysicalHeight(), + displayInfo.getNaturalWidth(), displayInfo.getNaturalHeight()); final FingerprintSensorPropertiesInternal udfpsProp = mUdfpsProps.get(0); final Rect previousUdfpsBounds = mUdfpsBounds; @@ -665,7 +677,6 @@ public void start() { mFingerprintAuthenticatorsRegisteredCallback); } - mStableDisplaySize = mDisplayManager.getStableDisplaySize(); mActivityTaskManager.registerTaskStackListener(mTaskStackListener); } diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt index 86e501670440..d858915d3da8 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt +++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt @@ -23,6 +23,8 @@ import android.content.Context import android.graphics.PointF import android.hardware.biometrics.BiometricFingerprintConstants import android.hardware.biometrics.BiometricSourceType +import android.os.UserHandle +import android.provider.Settings import android.util.DisplayMetrics import android.util.Log import androidx.annotation.VisibleForTesting @@ -88,6 +90,10 @@ class AuthRippleController @Inject constructor( private var udfpsController: UdfpsController? = null private var udfpsRadius: Float = -1f + private val isRippleEnabled: Boolean + get() = Settings.System.getIntForUser(context.contentResolver, + Settings.System.ENABLE_RIPPLE_EFFECT, 1, UserHandle.USER_CURRENT) == 1 + override fun onInit() { mView.setAlphaInDuration(sysuiContext.resources.getInteger( R.integer.auth_ripple_alpha_in_duration).toLong()) @@ -142,6 +148,8 @@ class AuthRippleController @Inject constructor( } private fun showUnlockedRipple() { + if (!isRippleEnabled) return + notificationShadeWindowController.setForcePluginOpen(true, this) val lightRevealScrim = centralSurfaces.lightRevealScrim if (statusBarStateController.isDozing || biometricUnlockController.isWakeAndUnlock) { @@ -161,6 +169,14 @@ class AuthRippleController @Inject constructor( } override fun onKeyguardFadingAwayChanged() { + if (!isRippleEnabled) { + // reset and hide the scrim so it doesn't appears on + // the next notification shade usage + centralSurfaces.lightRevealScrim?.revealAmount = 1f + startLightRevealScrimOnKeyguardFadingAway = false + return + } + if (keyguardStateController.isKeyguardFadingAway) { val lightRevealScrim = centralSurfaces.lightRevealScrim if (startLightRevealScrimOnKeyguardFadingAway && lightRevealScrim != null) { @@ -320,11 +336,17 @@ class AuthRippleController @Inject constructor( } mView.setFingerprintSensorLocation(fingerprintSensorLocation!!, udfpsRadius) - showDwellRipple() + if (Settings.System.getInt(sysuiContext.contentResolver, + Settings.System.UDFPS_ANIM, 0) == 0) { + showDwellRipple() + } } override fun onFingerUp() { + if (Settings.System.getInt(sysuiContext.contentResolver, + Settings.System.UDFPS_ANIM, 0) == 0) { mView.retractDwellRipple() + } } } diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleView.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleView.kt index 378ae14f0327..4e0f8dd51936 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleView.kt +++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleView.kt @@ -28,6 +28,7 @@ import android.util.AttributeSet import android.view.View import android.view.animation.PathInterpolator import com.android.internal.graphics.ColorUtils +import com.android.settingslib.Utils import com.android.systemui.animation.Interpolators import com.android.systemui.statusbar.charging.DwellRippleShader import com.android.systemui.statusbar.charging.RippleShader @@ -86,7 +87,7 @@ class AuthRippleView(context: Context?, attrs: AttributeSet?) : View(context, at } init { - rippleShader.color = 0xffffffff.toInt() // default color + rippleShader.color = Utils.getColorAttr(context, android.R.attr.colorAccent).defaultColor rippleShader.progress = 0f rippleShader.sparkleStrength = RIPPLE_SPARKLE_STRENGTH ripplePaint.shader = rippleShader diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/DummyUdfpsHbmProvider.kt b/packages/SystemUI/src/com/android/systemui/biometrics/DummyUdfpsHbmProvider.kt new file mode 100644 index 000000000000..ab0cc33f1714 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/biometrics/DummyUdfpsHbmProvider.kt @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2022 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.biometrics + +import android.content.Context +import android.view.Surface + +class DummyUdfpsHbmProvider constructor( + private val context: Context +): UdfpsHbmProvider { + override fun enableHbm(halControlsIllumination: Boolean, onHbmEnabled: Runnable?) { + onHbmEnabled?.run() + } + + override fun disableHbm(onHbmDisabled: Runnable?) { + onHbmDisabled?.run() + } +} diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsAnimation.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsAnimation.java new file mode 100644 index 000000000000..eaf3f9719757 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsAnimation.java @@ -0,0 +1,193 @@ +/** + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.biometrics; + +import static com.android.systemui.doze.util.BurnInHelperKt.getBurnInOffset; +import static com.android.systemui.doze.util.BurnInHelperKt.getBurnInProgressOffset; + +import android.content.Context; +import android.content.pm.PackageManager; +import android.content.res.Resources; +import android.graphics.PixelFormat; +import android.graphics.drawable.AnimationDrawable; +import android.hardware.fingerprint.FingerprintSensorPropertiesInternal; +import android.provider.Settings; +import android.util.AttributeSet; +import android.util.DisplayUtils; +import android.util.Log; +import android.util.MathUtils; +import android.view.Display; +import android.view.DisplayInfo; +import android.view.Gravity; +import android.view.View; +import android.view.WindowManager; +import android.widget.ImageView; +import android.graphics.Rect; + +import com.android.systemui.Dependency; +import com.android.systemui.R; +import com.android.systemui.plugins.statusbar.StatusBarStateController; +import com.android.systemui.tuner.TunerService; + +public class UdfpsAnimation extends ImageView { + + private static final boolean DEBUG = true; + private static final String LOG_TAG = "UdfpsAnimations"; + + private static final String UDFPS_ANIM = + "system:" + Settings.System.UDFPS_ANIM; + private static final String UDFPS_ANIM_STYLE = + "system:" + Settings.System.UDFPS_ANIM_STYLE; + + private Context mContext; + private int mAnimationSize; + private int mAnimationOffset; + private AnimationDrawable recognizingAnim; + + private final WindowManager.LayoutParams mAnimParams = new WindowManager.LayoutParams(); + private WindowManager mWindowManager; + + private boolean mIsKeyguard; + private boolean mEnabled; + + private final int mMaxBurnInOffsetX; + private final int mMaxBurnInOffsetY; + + private int mSelectedAnim; + private String[] mStyleNames; + + private final String mUdfpsAnimationPackage; + + private Resources mApkResources; + + public UdfpsAnimation(Context context, WindowManager windowManager, + FingerprintSensorPropertiesInternal props) { + super(context); + mContext = context; + DisplayInfo displayInfo = new DisplayInfo(); + mContext.getDisplay().getDisplayInfo(displayInfo); + final Display.Mode maxDisplayMode = + DisplayUtils.getMaximumResolutionDisplayMode(displayInfo.supportedModes); + final float scaleFactor = DisplayUtils.getPhysicalPixelDisplaySizeRatio( + maxDisplayMode.getPhysicalWidth(), maxDisplayMode.getPhysicalHeight(), + displayInfo.getNaturalWidth(), displayInfo.getNaturalHeight()); + + mWindowManager = windowManager; + + mMaxBurnInOffsetX = (int) (context.getResources() + .getDimensionPixelSize(R.dimen.udfps_burn_in_offset_x) * scaleFactor); + mMaxBurnInOffsetY = (int) (context.getResources() + .getDimensionPixelSize(R.dimen.udfps_burn_in_offset_y) * scaleFactor); + + mUdfpsAnimationPackage = "com.syberia.udfps.resources"; + + mAnimationSize = mContext.getResources().getDimensionPixelSize(R.dimen.udfps_animation_size); + mAnimationOffset = (int) (mContext.getResources().getDimensionPixelSize(R.dimen.udfps_animation_offset) * scaleFactor); + + mAnimParams.height = mAnimationSize; + mAnimParams.width = mAnimationSize; + + mAnimParams.format = PixelFormat.TRANSLUCENT; + mAnimParams.type = WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY; // it must be behind Udfps icon + mAnimParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE + | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL + | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS; + mAnimParams.gravity = Gravity.TOP | Gravity.CENTER; + mAnimParams.y = (int) (props.getLocation().sensorLocationY * scaleFactor) - (int) (props.getLocation().sensorRadius * scaleFactor) + - (mAnimationSize / 2) + mAnimationOffset; + + try { + PackageManager pm = mContext.getPackageManager(); + mApkResources = pm.getResourcesForApplication(mUdfpsAnimationPackage); + } catch (PackageManager.NameNotFoundException e) { + e.printStackTrace(); + } + int res = mApkResources.getIdentifier("udfps_animation_styles", + "array", mUdfpsAnimationPackage); + mStyleNames = mApkResources.getStringArray(res); + + setScaleType(ImageView.ScaleType.CENTER_INSIDE); + TunerService.Tunable tunable = (key, newValue) -> { + switch (key) { + case UDFPS_ANIM: + mEnabled = TunerService.parseIntegerSwitch(newValue, false); + break; + case UDFPS_ANIM_STYLE: + mSelectedAnim = newValue == null ? 0 : Integer.parseInt(newValue); + updateAnimationStyle(mStyleNames[mSelectedAnim]); + break; + } + }; + Dependency.get(TunerService.class).addTunable(tunable, UDFPS_ANIM, UDFPS_ANIM_STYLE); + } + + private void updateAnimationStyle(String drawableName) { + if (DEBUG) Log.i(LOG_TAG, "Updating animation style to:" + drawableName); + int resId = mApkResources.getIdentifier(drawableName, "drawable", mUdfpsAnimationPackage); + if (DEBUG) Log.i(LOG_TAG, "Got resource id: "+ resId +" from package" ); + setBackgroundDrawable(mApkResources.getDrawable(resId)); + recognizingAnim = (AnimationDrawable) getBackground(); + } + + public void show() { + if (mIsKeyguard && mEnabled) { + try { + if (getWindowToken() == null) { + mWindowManager.addView(this, mAnimParams); + } else { + mWindowManager.updateViewLayout(this, mAnimParams); + } + } catch (RuntimeException e) { + e.printStackTrace(); + return; + } + if (recognizingAnim != null) { + recognizingAnim.start(); + } + } + } + + public void hide() { + if (mIsKeyguard && mEnabled) { + if (recognizingAnim != null) { + clearAnimation(); + recognizingAnim.stop(); + recognizingAnim.selectDrawable(0); + } + if (getWindowToken() != null) { + mWindowManager.removeView(this); + } + } + } + + public void setIsKeyguard(boolean isKeyguard) { + mIsKeyguard = isKeyguard; + } + + public void dozeTimeTick() { + float amt = Dependency.get(StatusBarStateController.class).getDozeAmount(); + + float mBurnInOffsetX = MathUtils.lerp(0f, + getBurnInOffset(mMaxBurnInOffsetX * 2, true /* xAxis */) + - mMaxBurnInOffsetX, amt); + float mBurnInOffsetY = MathUtils.lerp(0f, + getBurnInOffset(mMaxBurnInOffsetY * 2, false /* xAxis */) + - mMaxBurnInOffsetY, amt); + setTranslationX(mBurnInOffsetX); + setTranslationY(mBurnInOffsetY); + } +} diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java index 6e2dcae4728e..3daf0519ad13 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java @@ -19,6 +19,8 @@ import static android.hardware.biometrics.BiometricFingerprintConstants.FINGERPRINT_ACQUIRED_GOOD; import static android.hardware.biometrics.BiometricOverlayConstants.REASON_AUTH_KEYGUARD; +import android.hardware.biometrics.BiometricOverlayConstants; + import static com.android.internal.util.Preconditions.checkNotNull; import static com.android.systemui.classifier.Classifier.UDFPS_AUTHENTICATION; @@ -34,6 +36,7 @@ import android.hardware.fingerprint.FingerprintManager; import android.hardware.fingerprint.IUdfpsOverlayController; import android.hardware.fingerprint.IUdfpsOverlayControllerCallback; +import android.hardware.fingerprint.FingerprintSensorPropertiesInternal; import android.os.Handler; import android.os.PowerManager; import android.os.Process; @@ -51,6 +54,7 @@ import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.LatencyTracker; +import com.android.internal.util.syberia.SyberiaUtils; import com.android.keyguard.KeyguardUpdateMonitor; import com.android.systemui.animation.ActivityLaunchAnimator; import com.android.systemui.biometrics.dagger.BiometricsBackground; @@ -138,7 +142,7 @@ public class UdfpsController implements DozeReceiver { // TODO(b/229290039): UDFPS controller should manage its dimensions on its own. Remove this. @Nullable private Runnable mAuthControllerUpdateUdfpsLocation; @Nullable private final AlternateUdfpsTouchProvider mAlternateTouchProvider; - + @VisibleForTesting final FingerprintSensorPropertiesInternal mSensorProps; // Tracks the velocity of a touch to help filter out the touches that move too fast. @Nullable private VelocityTracker mVelocityTracker; // The ID of the pointer for which ACTION_DOWN has occurred. -1 means no pointer is active. @@ -166,6 +170,8 @@ public class UdfpsController implements DozeReceiver { private boolean mAttemptedToDismissKeyguard; private final Set mCallbacks = new HashSet<>(); + private UdfpsAnimation mUdfpsAnimation; + @VisibleForTesting public static final VibrationAttributes VIBRATION_ATTRIBUTES = new VibrationAttributes.Builder() @@ -444,7 +450,12 @@ boolean onTouch(long requestId, @NonNull MotionEvent event, boolean fromUdfpsVie // We need to persist its ID to track it during ACTION_MOVE that could include // data for many other pointers because of multi-touch support. mActivePointerId = event.getPointerId(0); + final int idx = mActivePointerId == -1 + ? event.getPointerId(0) + : event.findPointerIndex(mActivePointerId); mVelocityTracker.addMovement(event); + onFingerDown(requestId, (int) event.getRawX(), (int) event.getRawY(), + (int) event.getTouchMinor(idx), (int) event.getTouchMajor(idx)); handled = true; mAcquiredReceived = false; } @@ -593,7 +604,7 @@ public UdfpsController(@NonNull Context context, @NonNull VibratorHelper vibrator, @NonNull UdfpsHapticsSimulator udfpsHapticsSimulator, @NonNull UdfpsShell udfpsShell, - @NonNull Optional hbmProvider, + @NonNull UdfpsHbmProvider hbmProvider, @NonNull KeyguardStateController keyguardStateController, @NonNull DisplayManager displayManager, @Main Handler mainHandler, @@ -625,7 +636,7 @@ public UdfpsController(@NonNull Context context, mPowerManager = powerManager; mAccessibilityManager = accessibilityManager; mLockscreenShadeTransitionController = lockscreenShadeTransitionController; - mHbmProvider = hbmProvider.orElse(null); + mHbmProvider = hbmProvider; screenLifecycle.addObserver(mScreenObserver); mScreenOn = screenLifecycle.getScreenState() == ScreenLifecycle.SCREEN_ON; mConfigurationController = configurationController; @@ -635,6 +646,7 @@ public UdfpsController(@NonNull Context context, mActivityLaunchAnimator = activityLaunchAnimator; mAlternateTouchProvider = aternateTouchProvider.orElse(null); mBiometricExecutor = biometricsExecutor; + mSensorProps = findFirstUdfps(); mOrientationListener = new BiometricDisplayListener( context, @@ -658,8 +670,12 @@ public UdfpsController(@NonNull Context context, udfpsHapticsSimulator.setUdfpsController(this); udfpsShell.setUdfpsOverlayController(mUdfpsOverlayController); + if (SyberiaUtils.isPackageInstalled(mContext, "com.syberia.udfps.resources")) { + mUdfpsAnimation = new UdfpsAnimation(mContext, mWindowManager, mSensorProps); + } } + /** * If a11y touchExplorationEnabled, play haptic to signal UDFPS scanning started. */ @@ -675,6 +691,17 @@ public void playStartHaptic() { } } + @Nullable + private FingerprintSensorPropertiesInternal findFirstUdfps() { + for (FingerprintSensorPropertiesInternal props : + mFingerprintManager.getSensorPropertiesInternal()) { + if (props.isAnyUdfpsType()) { + return props; + } + } + return null; + } + @Override public void dozeTimeTick() { if (mOverlay != null) { @@ -698,6 +725,12 @@ private void showUdfpsOverlay(@NonNull UdfpsControllerOverlay overlay) { mOverlay = overlay; final int requestReason = overlay.getRequestReason(); + + if (mUdfpsAnimation != null) { + mUdfpsAnimation.setIsKeyguard(requestReason == + BiometricOverlayConstants.REASON_AUTH_KEYGUARD); + } + if (requestReason == REASON_AUTH_KEYGUARD && !mKeyguardUpdateMonitor.isFingerprintDetectionRunning()) { Log.d(TAG, "Attempting to showUdfpsOverlay when fingerprint detection" @@ -811,11 +844,11 @@ void onCancelUdfps() { mIsAodInterruptActive = false; } - public boolean isFingerDown() { + public synchronized boolean isFingerDown() { return mOnFingerDown; } - private void onFingerDown(long requestId, int x, int y, float minor, float major) { + private synchronized void onFingerDown(long requestId, int x, int y, float minor, float major) { mExecution.assertIsMainThread(); if (mOverlay == null) { @@ -836,7 +869,6 @@ private void onFingerDown(long requestId, int x, int y, float minor, float major mKeyguardUpdateMonitor.requestFaceAuth(/* userInitiatedRequest */ false); } } - mOnFingerDown = true; if (mAlternateTouchProvider != null) { mBiometricExecutor.execute(() -> { mAlternateTouchProvider.onPointerDown(requestId, x, y, minor, major); @@ -864,9 +896,13 @@ private void onFingerDown(long requestId, int x, int y, float minor, float major for (Callback cb : mCallbacks) { cb.onFingerDown(); } + if (!mOnFingerDown && mUdfpsAnimation != null) { + mUdfpsAnimation.show(); + } + mOnFingerDown = true; } - private void onFingerUp(long requestId, @NonNull UdfpsView view) { + private synchronized void onFingerUp(long requestId, @NonNull UdfpsView view) { mExecution.assertIsMainThread(); mActivePointerId = -1; mAcquiredReceived = false; @@ -882,6 +918,9 @@ private void onFingerUp(long requestId, @NonNull UdfpsView view) { cb.onFingerUp(); } } + if (mUdfpsAnimation != null) { + mUdfpsAnimation.hide(); + } mOnFingerDown = false; if (view.isIlluminationRequested()) { view.stopIllumination(); diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt index ec720579fbee..baa448814d30 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt @@ -94,7 +94,7 @@ class UdfpsControllerOverlay( private var overlayTouchListener: TouchExplorationStateChangeListener? = null private val coreLayoutParams = WindowManager.LayoutParams( - WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG, + WindowManager.LayoutParams.TYPE_DISPLAY_OVERLAY, 0 /* flags set in computeLayoutParams() */, PixelFormat.TRANSLUCENT ).apply { diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsDialogMeasureAdapter.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsDialogMeasureAdapter.java index 8de721352069..817c331ff6e9 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsDialogMeasureAdapter.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsDialogMeasureAdapter.java @@ -19,7 +19,6 @@ import android.annotation.IdRes; import android.annotation.NonNull; import android.annotation.Nullable; -import android.graphics.Insets; import android.graphics.Rect; import android.hardware.biometrics.SensorLocationInternal; import android.hardware.fingerprint.FingerprintSensorPropertiesInternal; @@ -29,7 +28,6 @@ import android.view.View; import android.view.View.MeasureSpec; import android.view.ViewGroup; -import android.view.WindowInsets; import android.view.WindowManager; import android.view.WindowMetrics; import android.widget.FrameLayout; @@ -98,10 +96,9 @@ private AuthDialog.LayoutParams onMeasureInternalPortrait(int width, int height) final int buttonBarHeight = getViewHeightPx(R.id.button_bar); final int dialogMargin = getDialogMarginPx(); final int displayHeight = getMaximumWindowBounds(windowMetrics).height(); - final Insets navbarInsets = getNavbarInsets(windowMetrics); mBottomSpacerHeight = calculateBottomSpacerHeightForPortrait( mSensorProps, displayHeight, textIndicatorHeight, buttonBarHeight, - dialogMargin, navbarInsets.bottom); + dialogMargin); // Go through each of the children and do the custom measurement. int totalHeight = 0; @@ -187,17 +184,15 @@ private AuthDialog.LayoutParams onMeasureInternalLandscape(int width, int height final int textIndicatorHeight = getViewHeightPx(R.id.indicator); final int buttonBarHeight = getViewHeightPx(R.id.button_bar); - final Insets navbarInsets = getNavbarInsets(windowMetrics); final int bottomSpacerHeight = calculateBottomSpacerHeightForLandscape(titleHeight, subtitleHeight, descriptionHeight, topSpacerHeight, textIndicatorHeight, - buttonBarHeight, navbarInsets.bottom); + buttonBarHeight); // Find the spacer width needed to horizontally align the icon with the sensor. final int displayWidth = getMaximumWindowBounds(windowMetrics).width(); final int dialogMargin = getDialogMarginPx(); - final int horizontalInset = navbarInsets.left + navbarInsets.right; final int horizontalSpacerWidth = calculateHorizontalSpacerWidthForLandscape( - mSensorProps, displayWidth, dialogMargin, horizontalInset); + mSensorProps, displayWidth, dialogMargin); final int sensorDiameter = mSensorProps.getLocation().sensorRadius * 2; final int remeasuredWidth = sensorDiameter + 2 * horizontalSpacerWidth; @@ -261,13 +256,6 @@ private int getDialogMarginPx() { return mView.getResources().getDimensionPixelSize(R.dimen.biometric_dialog_border_padding); } - @NonNull - private static Insets getNavbarInsets(@Nullable WindowMetrics windowMetrics) { - return windowMetrics != null - ? windowMetrics.getWindowInsets().getInsets(WindowInsets.Type.navigationBars()) - : Insets.NONE; - } - @NonNull private static Rect getMaximumWindowBounds(@Nullable WindowMetrics windowMetrics) { return windowMetrics != null ? windowMetrics.getBounds() : new Rect(); @@ -280,8 +268,7 @@ private static Rect getMaximumWindowBounds(@Nullable WindowMetrics windowMetrics @VisibleForTesting static int calculateBottomSpacerHeightForPortrait( @NonNull FingerprintSensorPropertiesInternal sensorProperties, int displayHeightPx, - int textIndicatorHeightPx, int buttonBarHeightPx, int dialogMarginPx, - int navbarBottomInsetPx) { + int textIndicatorHeightPx, int buttonBarHeightPx, int dialogMarginPx) { final SensorLocationInternal location = sensorProperties.getLocation(); final int sensorDistanceFromBottom = displayHeightPx - location.sensorLocationY @@ -290,14 +277,12 @@ static int calculateBottomSpacerHeightForPortrait( final int spacerHeight = sensorDistanceFromBottom - textIndicatorHeightPx - buttonBarHeightPx - - dialogMarginPx - - navbarBottomInsetPx; + - dialogMarginPx; if (DEBUG) { Log.d(TAG, "Display height: " + displayHeightPx + ", Distance from bottom: " + sensorDistanceFromBottom + ", Bottom margin: " + dialogMarginPx - + ", Navbar bottom inset: " + navbarBottomInsetPx + ", Bottom spacer height (portrait): " + spacerHeight); } @@ -311,7 +296,7 @@ static int calculateBottomSpacerHeightForPortrait( @VisibleForTesting static int calculateBottomSpacerHeightForLandscape(int titleHeightPx, int subtitleHeightPx, int descriptionHeightPx, int topSpacerHeightPx, int textIndicatorHeightPx, - int buttonBarHeightPx, int navbarBottomInsetPx) { + int buttonBarHeightPx) { final int dialogHeightAboveIcon = titleHeightPx + subtitleHeightPx @@ -321,8 +306,7 @@ static int calculateBottomSpacerHeightForLandscape(int titleHeightPx, int subtit final int dialogHeightBelowIcon = textIndicatorHeightPx + buttonBarHeightPx; final int bottomSpacerHeight = dialogHeightAboveIcon - - dialogHeightBelowIcon - - navbarBottomInsetPx; + - dialogHeightBelowIcon; if (DEBUG) { Log.d(TAG, "Title height: " + titleHeightPx @@ -331,7 +315,6 @@ static int calculateBottomSpacerHeightForLandscape(int titleHeightPx, int subtit + ", Top spacer height: " + topSpacerHeightPx + ", Text indicator height: " + textIndicatorHeightPx + ", Button bar height: " + buttonBarHeightPx - + ", Navbar bottom inset: " + navbarBottomInsetPx + ", Bottom spacer height (landscape): " + bottomSpacerHeight); } @@ -346,21 +329,19 @@ static int calculateBottomSpacerHeightForLandscape(int titleHeightPx, int subtit @VisibleForTesting static int calculateHorizontalSpacerWidthForLandscape( @NonNull FingerprintSensorPropertiesInternal sensorProperties, int displayWidthPx, - int dialogMarginPx, int navbarHorizontalInsetPx) { + int dialogMarginPx) { final SensorLocationInternal location = sensorProperties.getLocation(); final int sensorDistanceFromEdge = displayWidthPx - location.sensorLocationY - location.sensorRadius; final int horizontalPadding = sensorDistanceFromEdge - - dialogMarginPx - - navbarHorizontalInsetPx; + - dialogMarginPx; if (DEBUG) { Log.d(TAG, "Display width: " + displayWidthPx + ", Distance from edge: " + sensorDistanceFromEdge + ", Dialog margin: " + dialogMarginPx - + ", Navbar horizontal inset: " + navbarHorizontalInsetPx + ", Horizontal spacer width (landscape): " + horizontalPadding); } diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsDrawable.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsDrawable.java new file mode 100644 index 000000000000..015eaa7f02bb --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsDrawable.java @@ -0,0 +1,169 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.biometrics; + +import android.content.Context; +import android.content.res.Resources; +import android.content.pm.PackageManager; +import android.graphics.ColorFilter; +import android.graphics.Paint; +import android.graphics.Rect; +import android.graphics.RectF; +import android.graphics.drawable.Drawable; +import android.graphics.drawable.ShapeDrawable; +import android.graphics.drawable.shapes.PathShape; +import android.provider.Settings; +import android.util.PathParser; +import com.android.internal.util.syberia.SyberiaUtils; +import com.android.systemui.Dependency; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import com.android.systemui.tuner.TunerService; +import com.android.systemui.R; + +/** + * Abstract base class for drawable displayed when the finger is not touching the + * sensor area. + */ +public abstract class UdfpsDrawable extends Drawable { + static final float DEFAULT_STROKE_WIDTH = 3f; + static final String UDFPS_ICON = "system:" + Settings.System.UDFPS_ICON; + + String udfpsResourcesPackage = "com.syberia.udfps.resources"; + + @NonNull final Context mContext; + @NonNull final ShapeDrawable mFingerprintDrawable; + private final Paint mPaint; + private boolean mIlluminationShowing; + + int mSelectedIcon = 0; + + Drawable mUdfpsDrawable; + Resources udfpsRes; + String[] mUdfpsIcons; + + int mAlpha = 255; // 0 - 255 + public UdfpsDrawable(@NonNull Context context) { + mContext = context; + final String fpPath = context.getResources().getString(R.string.config_udfpsIcon); + mFingerprintDrawable = new ShapeDrawable( + new PathShape(PathParser.createPathFromPathData(fpPath), 72, 72)); + mFingerprintDrawable.mutate(); + + mPaint = mFingerprintDrawable.getPaint(); + mPaint.setStyle(Paint.Style.STROKE); + mPaint.setStrokeCap(Paint.Cap.ROUND); + setStrokeWidth(DEFAULT_STROKE_WIDTH); + + init(); + } + + void init() { + if (SyberiaUtils.isPackageInstalled(mContext, udfpsResourcesPackage)) { + try { + PackageManager pm = mContext.getPackageManager(); + udfpsRes = pm.getResourcesForApplication(udfpsResourcesPackage); + } catch (PackageManager.NameNotFoundException e) { + e.printStackTrace(); + } + + int res = udfpsRes.getIdentifier("udfps_icons", + "array", udfpsResourcesPackage); + mUdfpsIcons = udfpsRes.getStringArray(res); + + TunerService.Tunable tunable = (key, newValue) -> { + if (UDFPS_ICON.equals(key)) { + mSelectedIcon = newValue == null ? 0 : Integer.parseInt(newValue); + mUdfpsDrawable = mSelectedIcon == 0 ? null : + loadDrawable(udfpsRes, + mUdfpsIcons[mSelectedIcon]); + } + }; + Dependency.get(TunerService.class).addTunable(tunable, UDFPS_ICON); + } + } + + void setStrokeWidth(float strokeWidth) { + mPaint.setStrokeWidth(strokeWidth); + invalidateSelf(); + } + + /** + * @param sensorRect the rect coordinates for the sensor area + */ + public void onSensorRectUpdated(@NonNull RectF sensorRect) { + final int margin = (int) sensorRect.height() / 16; + + final Rect bounds = new Rect((int) sensorRect.left + margin, + (int) sensorRect.top + margin, + (int) sensorRect.right - margin, + (int) sensorRect.bottom - margin); + updateFingerprintIconBounds(bounds); + } + + /** + * Bounds for the fingerprint icon + */ + protected void updateFingerprintIconBounds(@NonNull Rect bounds) { + mFingerprintDrawable.setBounds(bounds); + if (mUdfpsDrawable != null) { + mUdfpsDrawable.setBounds(bounds); + } + invalidateSelf(); + } + + @Override + public void setAlpha(int alpha) { + mAlpha = alpha; + mFingerprintDrawable.setAlpha(mAlpha); + if (mUdfpsDrawable != null) { + mUdfpsDrawable.setAlpha(mAlpha); + } + invalidateSelf(); + } + + boolean isIlluminationShowing() { + return mIlluminationShowing; + } + + Drawable getUdfpsDrawable() { + return mUdfpsDrawable; + } + + Drawable loadDrawable(Resources res, String resName) { + int resId = res.getIdentifier(resName, + "drawable", udfpsResourcesPackage); + return res.getDrawable(resId); + } + + void setIlluminationShowing(boolean showing) { + if (mIlluminationShowing == showing) { + return; + } + mIlluminationShowing = showing; + invalidateSelf(); + } + + @Override + public void setColorFilter(@Nullable ColorFilter colorFilter) { + } + + @Override + public int getOpacity() { + return 0; + } +} diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsDrawable.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsDrawable.kt deleted file mode 100644 index ee112b47e243..000000000000 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsDrawable.kt +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (C) 2021 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.systemui.biometrics - -import android.content.Context -import android.graphics.ColorFilter -import android.graphics.Paint -import android.graphics.Rect -import android.graphics.RectF -import android.graphics.drawable.Drawable -import android.graphics.drawable.ShapeDrawable -import android.graphics.drawable.shapes.PathShape -import android.util.PathParser -import com.android.systemui.R - -private const val DEFAULT_STROKE_WIDTH = 3f - -/** - * Abstract base class for drawable displayed when the finger is not touching the - * sensor area. - */ -abstract class UdfpsDrawable( - protected val context: Context, - drawableFactory: (Context) -> ShapeDrawable -) : Drawable() { - - constructor(context: Context) : this(context, defaultFactory) - - /** Fingerprint affordance. */ - val fingerprintDrawable: ShapeDrawable = drawableFactory(context) - - private var _alpha: Int = 255 // 0 - 255 - - var strokeWidth: Float = fingerprintDrawable.paint.strokeWidth - set(value) { - field = value - fingerprintDrawable.paint.strokeWidth = value - invalidateSelf() - } - - var isIlluminationShowing: Boolean = false - set(showing) { - if (field == showing) { - return - } - field = showing - invalidateSelf() - } - - /** The [sensorRect] coordinates for the sensor area. */ - open fun onSensorRectUpdated(sensorRect: RectF) { - val margin = sensorRect.height().toInt() / 8 - val bounds = Rect( - sensorRect.left.toInt() + margin, - sensorRect.top.toInt() + margin, - sensorRect.right.toInt() - margin, - sensorRect.bottom.toInt() - margin - ) - updateFingerprintIconBounds(bounds) - } - - /** Bounds for the fingerprint icon. */ - protected open fun updateFingerprintIconBounds(bounds: Rect) { - fingerprintDrawable.bounds = bounds - invalidateSelf() - } - - override fun getAlpha(): Int = _alpha - - override fun setAlpha(alpha: Int) { - _alpha = alpha - fingerprintDrawable.alpha = alpha - invalidateSelf() - } - - override fun setColorFilter(colorFilter: ColorFilter?) {} - - override fun getOpacity(): Int = 0 -} - -private val defaultFactory = { context: Context -> - val fpPath = context.resources.getString(R.string.config_udfpsIcon) - val drawable = ShapeDrawable( - PathShape(PathParser.createPathFromPathData(fpPath), 72f, 72f) - ) - drawable.mutate() - drawable.paint.style = Paint.Style.STROKE - drawable.paint.strokeCap = Paint.Cap.ROUND - drawable.paint.strokeWidth = DEFAULT_STROKE_WIDTH - drawable -} diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsEnrollDrawable.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsEnrollDrawable.java index 1317492aefac..656b23ecd03d 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsEnrollDrawable.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsEnrollDrawable.java @@ -73,7 +73,7 @@ public class UdfpsEnrollDrawable extends UdfpsDrawable { mSensorOutlinePaint = new Paint(0 /* flags */); mSensorOutlinePaint.setAntiAlias(true); - mSensorOutlinePaint.setColor(context.getColor(R.color.udfps_moving_target_fill)); + mSensorOutlinePaint.setColor(mContext.getColor(R.color.udfps_moving_target_fill)); mSensorOutlinePaint.setStyle(Paint.Style.FILL); mBlueFill = new Paint(0 /* flags */); @@ -83,10 +83,10 @@ public class UdfpsEnrollDrawable extends UdfpsDrawable { mMovingTargetFpIcon = context.getResources() .getDrawable(R.drawable.ic_kg_fingerprint, null); - mMovingTargetFpIcon.setTint(context.getColor(R.color.udfps_enroll_icon)); + mMovingTargetFpIcon.setTint(mContext.getColor(R.color.udfps_enroll_icon)); mMovingTargetFpIcon.mutate(); - getFingerprintDrawable().setTint(context.getColor(R.color.udfps_enroll_icon)); + mFingerprintDrawable.setTint(mContext.getColor(R.color.udfps_enroll_icon)); mTargetAnimListener = new Animator.AnimatorListener() { @Override @@ -201,6 +201,11 @@ public void draw(@NonNull Canvas canvas) { return; } + if (getUdfpsDrawable() != null) { + getUdfpsDrawable().draw(canvas); + return; + } + // Draw moving target if (mEnrollHelper != null && !mEnrollHelper.isCenterEnrollmentStage()) { canvas.save(); @@ -218,9 +223,9 @@ public void draw(@NonNull Canvas canvas) { if (mSensorRect != null) { canvas.drawOval(mSensorRect, mSensorOutlinePaint); } - getFingerprintDrawable().draw(canvas); - getFingerprintDrawable().setAlpha(getAlpha()); - mSensorOutlinePaint.setAlpha(getAlpha()); + mFingerprintDrawable.draw(canvas); + mFingerprintDrawable.setAlpha(mAlpha); + mSensorOutlinePaint.setAlpha(mAlpha); } } diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpDrawable.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpDrawable.java new file mode 100644 index 000000000000..f7081a70552d --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpDrawable.java @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.biometrics; + +import android.content.Context; +import android.graphics.Canvas; +import android.graphics.Rect; +import android.graphics.RectF; + +import androidx.annotation.NonNull; + +/** + * Draws udfps fingerprint if sensor isn't illuminating. + */ +public class UdfpsFpDrawable extends UdfpsDrawable { + + UdfpsFpDrawable(@NonNull Context context) { + super(context); + } + + @Override + public void draw(@NonNull Canvas canvas) { + if (isIlluminationShowing()) { + return; + } + + if (getUdfpsDrawable() != null) { + getUdfpsDrawable().draw(canvas); + return; + } + + mFingerprintDrawable.draw(canvas); + } + + @Override + public void onSensorRectUpdated(@NonNull RectF sensorRect) { + super.onSensorRectUpdated(sensorRect); + final int margin = (int) sensorRect.height() / 16; + + final Rect bounds = new Rect((int) sensorRect.left + margin, + (int) sensorRect.top + margin, + (int) sensorRect.right - margin, + (int) sensorRect.bottom - margin); + updateFingerprintIconBounds(bounds); + } + + @Override + protected void updateFingerprintIconBounds(@NonNull Rect bounds) { + super.updateFingerprintIconBounds(bounds); + if (getUdfpsDrawable() != null) { + getUdfpsDrawable().setBounds(bounds); + invalidateSelf(); + } + } +} diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpDrawable.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpDrawable.kt deleted file mode 100644 index 1afa36bd5000..000000000000 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpDrawable.kt +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2021 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.systemui.biometrics - -import android.content.Context -import android.graphics.Canvas - -/** - * Draws udfps fingerprint if sensor isn't illuminating. - */ -class UdfpsFpDrawable(context: Context) : UdfpsDrawable(context) { - override fun draw(canvas: Canvas) { - if (isIlluminationShowing) { - return - } - fingerprintDrawable.draw(canvas) - } -} diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardView.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardView.java index f28fedb9155b..d4ebca38a5af 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardView.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardView.java @@ -26,6 +26,7 @@ import android.content.Context; import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; +import android.provider.Settings; import android.util.AttributeSet; import android.util.MathUtils; import android.view.View; @@ -37,6 +38,8 @@ import androidx.asynclayoutinflater.view.AsyncLayoutInflater; import com.android.settingslib.Utils; +import com.android.internal.util.syberia.SyberiaUtils; + import com.android.systemui.R; import com.android.systemui.animation.Interpolators; @@ -75,6 +78,9 @@ public class UdfpsKeyguardView extends UdfpsAnimationView { private int mAnimationType = ANIMATION_NONE; private boolean mFullyInflated; + private boolean mCustomUdfpsIcon; + private boolean mPackageInstalled; + public UdfpsKeyguardView(Context context, @Nullable AttributeSet attrs) { super(context, attrs); mFingerprintDrawable = new UdfpsFpDrawable(context); @@ -83,6 +89,9 @@ public UdfpsKeyguardView(Context context, @Nullable AttributeSet attrs) { .getDimensionPixelSize(R.dimen.udfps_burn_in_offset_x); mMaxBurnInOffsetY = context.getResources() .getDimensionPixelSize(R.dimen.udfps_burn_in_offset_y); + + mPackageInstalled = com.android.internal.util.syberia.SyberiaUtils.isPackageInstalled( + mContext, "com.syberia.udfps.resources"); } @Override @@ -93,6 +102,7 @@ protected void onFinishInflate() { AsyncLayoutInflater inflater = new AsyncLayoutInflater(mContext); inflater.inflate(R.layout.udfps_keyguard_view_internal, this, mLayoutInflaterFinishListener); + } @Override @@ -114,6 +124,14 @@ public boolean dozeTimeTick() { return true; } + private void updateIcon() { + mCustomUdfpsIcon = mPackageInstalled && (Settings.System.getInt( + mContext.getContentResolver(), Settings.System.UDFPS_ICON, 0) != 0); + mBgProtection.setImageDrawable(mCustomUdfpsIcon + ? mFingerprintDrawable : + getContext().getDrawable(R.drawable.fingerprint_bg)); + } + private void updateBurnInOffsets() { if (!mFullyInflated) { return; @@ -135,12 +153,14 @@ private void updateBurnInOffsets() { mLockScreenFp.setTranslationX(mBurnInOffsetX); mLockScreenFp.setTranslationY(mBurnInOffsetY); mBgProtection.setAlpha(1f - mInterpolatedDarkAmount); - mLockScreenFp.setAlpha(1f - mInterpolatedDarkAmount); + mLockScreenFp.setAlpha(mCustomUdfpsIcon ? 0.0f + : (1f - mInterpolatedDarkAmount)); } else if (darkAmountForAnimation == 0f) { mLockScreenFp.setTranslationX(0); mLockScreenFp.setTranslationY(0); mBgProtection.setAlpha(mAlpha / 255f); - mLockScreenFp.setAlpha(mAlpha / 255f); + mLockScreenFp.setAlpha(mCustomUdfpsIcon ? 0.0f + : (mAlpha / 255f)); } else { mBgProtection.setAlpha(0f); mLockScreenFp.setAlpha(0f); @@ -175,7 +195,6 @@ void updateColor() { mTextColorPrimary = Utils.getColorAttrDefaultColor(mContext, android.R.attr.textColorPrimary); - mBgProtection.setImageDrawable(getContext().getDrawable(R.drawable.fingerprint_bg)); mLockScreenFp.invalidate(); // updated with a valueCallback } @@ -291,6 +310,7 @@ public void onInflateFinished(View view, int resid, ViewGroup parent) { updatePadding(); updateColor(); updateAlpha(); + updateIcon(); parent.addView(view); // requires call to invalidate to update the color diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsSurfaceView.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsSurfaceView.java new file mode 100644 index 000000000000..a99527acb8bd --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsSurfaceView.java @@ -0,0 +1,142 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.systemui.biometrics; +import android.annotation.NonNull; +import android.annotation.Nullable; +import android.content.Context; +import android.graphics.drawable.Drawable; +import android.graphics.Canvas; +import android.graphics.Paint; +import android.graphics.PixelFormat; +import android.graphics.RectF; +import android.util.AttributeSet; +import android.util.Log; +import android.view.Surface; +import android.view.SurfaceHolder; +import android.view.SurfaceView; + +import com.android.systemui.R; + +/** + * Surface View for providing the Global High-Brightness Mode (GHBM) illumination for UDFPS. + */ +public class UdfpsSurfaceView extends SurfaceView implements SurfaceHolder.Callback { + private static final String TAG = "UdfpsSurfaceView"; + /** + * Notifies {@link UdfpsView} when to enable GHBM illumination. + */ + interface GhbmIlluminationListener { + /** + * @param surface the surface for which GHBM should be enabled. + * @param onIlluminatedRunnable a runnable that should be run after GHBM is enabled. + */ + void enableGhbm(@NonNull Surface surface, @Nullable Runnable onIlluminatedRunnable); + } + @NonNull private final SurfaceHolder mHolder; + @NonNull private final Paint mSensorPaint; + @Nullable private GhbmIlluminationListener mGhbmIlluminationListener; + @Nullable private Runnable mOnIlluminatedRunnable; + boolean mAwaitingSurfaceToStartIllumination; + boolean mHasValidSurface; + + private Drawable mUdfpsIconPressed; + + public UdfpsSurfaceView(Context context, AttributeSet attrs) { + super(context, attrs); + // Make this SurfaceView draw on top of everything else in this window. This allows us to + // 1) Always show the HBM circle on top of everything else, and + // 2) Properly composite this view with any other animations in the same window no matter + // what contents are added in which order to this view hierarchy. + setZOrderOnTop(true); + mHolder = getHolder(); + mHolder.addCallback(this); + mHolder.setFormat(PixelFormat.RGBA_8888); + mSensorPaint = new Paint(0 /* flags */); + mSensorPaint.setAntiAlias(true); + mSensorPaint.setColor(context.getColor(R.color.config_udfpsColor)); + mSensorPaint.setStyle(Paint.Style.FILL); + + mUdfpsIconPressed = context.getDrawable(R.drawable.udfps_icon_pressed); + } + @Override public void surfaceCreated(SurfaceHolder holder) { + mHasValidSurface = true; + if (mAwaitingSurfaceToStartIllumination) { + doIlluminate(mOnIlluminatedRunnable); + mOnIlluminatedRunnable = null; + mAwaitingSurfaceToStartIllumination = false; + } + } + @Override + public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { + // Unused. + } + @Override public void surfaceDestroyed(SurfaceHolder holder) { + mHasValidSurface = false; + } + void setGhbmIlluminationListener(@Nullable GhbmIlluminationListener listener) { + mGhbmIlluminationListener = listener; + } + /** + * Note: there is no corresponding method to stop GHBM illumination. It is expected that + * {@link UdfpsView} will hide this view, which would destroy the surface and remove the + * illumination dot. + */ + void startGhbmIllumination(@Nullable Runnable onIlluminatedRunnable) { + if (mGhbmIlluminationListener == null) { + Log.e(TAG, "startIllumination | mGhbmIlluminationListener is null"); + return; + } + if (mHasValidSurface) { + doIlluminate(onIlluminatedRunnable); + } else { + mAwaitingSurfaceToStartIllumination = true; + mOnIlluminatedRunnable = onIlluminatedRunnable; + } + } + private void doIlluminate(@Nullable Runnable onIlluminatedRunnable) { + if (mGhbmIlluminationListener == null) { + Log.e(TAG, "doIlluminate | mGhbmIlluminationListener is null"); + return; + } + mGhbmIlluminationListener.enableGhbm(mHolder.getSurface(), onIlluminatedRunnable); + } + /** + * Immediately draws the illumination dot on this SurfaceView's surface. + */ + void drawIlluminationDot(@NonNull RectF sensorRect) { + if (!mHasValidSurface) { + Log.e(TAG, "drawIlluminationDot | the surface is destroyed or was never created."); + return; + } + Canvas canvas = null; + try { + canvas = mHolder.lockCanvas(); + mUdfpsIconPressed.setBounds( + Math.round(sensorRect.left), + Math.round(sensorRect.top), + Math.round(sensorRect.right), + Math.round(sensorRect.bottom) + ); + mUdfpsIconPressed.draw(canvas); + canvas.drawOval(sensorRect, mSensorPaint); + } finally { + // Make sure the surface is never left in a bad state. + if (canvas != null) { + mHolder.unlockCanvasAndPost(canvas); + } + } + } +} diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt index 245c2252d57b..dc4539b1fa82 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt @@ -24,6 +24,7 @@ import android.graphics.RectF import android.util.AttributeSet import android.util.Log import android.view.MotionEvent +import android.view.Surface import android.widget.FrameLayout import com.android.systemui.R import com.android.systemui.doze.DozeReceiver @@ -60,6 +61,9 @@ class UdfpsView( com.android.internal.R.integer.config_udfps_illumination_transition_ms ).toLong() + // Only used for UdfpsHbmTypes.GLOBAL_HBM. + private var ghbmView: UdfpsSurfaceView? = null + /** View controller (can be different for enrollment, BiometricPrompt, Keyguard, etc.). */ var animationViewController: UdfpsAnimationViewController<*>? = null @@ -89,6 +93,10 @@ class UdfpsView( return (animationViewController == null || !animationViewController!!.shouldPauseAuth()) } + override fun onFinishInflate() { + ghbmView = findViewById(R.id.hbm_view) + } + override fun dozeTimeTick() { animationViewController?.dozeTimeTick() } @@ -153,23 +161,37 @@ class UdfpsView( override fun startIllumination(onIlluminatedRunnable: Runnable?) { isIlluminationRequested = true animationViewController?.onIlluminationStarting() - doIlluminate(onIlluminatedRunnable) + val gView = ghbmView + if (gView != null) { + gView.setGhbmIlluminationListener(this::doIlluminate) + gView.visibility = VISIBLE + gView.startGhbmIllumination(onIlluminatedRunnable) + } else { + doIlluminate(null /* surface */, onIlluminatedRunnable) + } } - private fun doIlluminate(onIlluminatedRunnable: Runnable?) { + private fun doIlluminate(surface: Surface?, onIlluminatedRunnable: Runnable?) { + if (ghbmView != null && surface == null) { + Log.e(TAG, "doIlluminate | surface must be non-null for GHBM") + } + // TODO(b/231335067): enableHbm with halControlsIllumination=true shouldn't make sense. // This only makes sense now because vendor code may rely on the side effects of enableHbm. - hbmProvider?.enableHbm(halControlsIllumination) { - if (onIlluminatedRunnable != null) { - if (halControlsIllumination) { - onIlluminatedRunnable.run() + if (hbmProvider != null) { + hbmProvider?.enableHbm(halControlsIllumination) { + ghbmView?.drawIlluminationDot(sensorRect) + if (onIlluminatedRunnable != null) { + if (halControlsIllumination) { + onIlluminatedRunnable.run() + } else { + // No framework API can reliably tell when a frame reaches the panel. A timeout + // is the safest solution. + postDelayed(onIlluminatedRunnable, onIlluminatedDelayMs) + } } else { - // No framework API can reliably tell when a frame reaches the panel. A timeout - // is the safest solution. - postDelayed(onIlluminatedRunnable, onIlluminatedDelayMs) + Log.w(TAG, "doIlluminate | onIlluminatedRunnable is null") } - } else { - Log.w(TAG, "doIlluminate | onIlluminatedRunnable is null") } } } @@ -177,6 +199,12 @@ class UdfpsView( override fun stopIllumination() { isIlluminationRequested = false animationViewController?.onIlluminationStopped() - hbmProvider?.disableHbm(null /* onHbmDisabled */) + ghbmView?.let { view -> + view.setGhbmIlluminationListener(null) + view.visibility = INVISIBLE + } + if (hbmProvider != null) { + hbmProvider?.disableHbm(null /* onHbmDisabled */) + } } } diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinatorImpl.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinatorImpl.kt index b8a00133c728..1f7021e514e5 100644 --- a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinatorImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinatorImpl.kt @@ -18,6 +18,7 @@ package com.android.systemui.controls.ui import android.annotation.AnyThread import android.annotation.MainThread +import android.app.Activity import android.app.AlertDialog import android.app.Dialog import android.app.PendingIntent @@ -119,8 +120,16 @@ class ControlActionCoordinatorImpl @Inject constructor( } override fun closeDialogs() { - dialog?.dismiss() - dialog = null + val isActivityFinishing = + (activityContext as? Activity)?.let { it.isFinishing || it.isDestroyed } + if (isActivityFinishing == true) { + dialog = null + return + } + if (dialog?.isShowing == true) { + dialog?.dismiss() + dialog = null + } } override fun toggle(cvh: ControlViewHolder, templateId: String, isChecked: Boolean) { diff --git a/packages/SystemUI/src/com/android/systemui/dagger/FrameworkServicesModule.java b/packages/SystemUI/src/com/android/systemui/dagger/FrameworkServicesModule.java index cd8ca0553add..8049084b88d7 100644 --- a/packages/SystemUI/src/com/android/systemui/dagger/FrameworkServicesModule.java +++ b/packages/SystemUI/src/com/android/systemui/dagger/FrameworkServicesModule.java @@ -94,6 +94,7 @@ import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.dagger.qualifiers.TestHarness; import com.android.systemui.shared.system.PackageManagerWrapper; +import com.android.systemui.statusbar.policy.TaskHelper; import java.util.Optional; @@ -553,4 +554,11 @@ static SmartspaceManager provideSmartspaceManager(Context context) { static SafetyCenterManager provideSafetyCenterManager(Context context) { return context.getSystemService(SafetyCenterManager.class); } + + @Provides + @Singleton + public TaskHelper provideTaskHelper(Context context) { + return new TaskHelper(context); + } + } diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt b/packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt index a9f340854689..adf7de83fadf 100644 --- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt +++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt @@ -36,6 +36,7 @@ import com.android.systemui.recents.Recents import com.android.systemui.shortcut.ShortcutKeyDispatcher import com.android.systemui.statusbar.notification.InstantAppNotifier import com.android.systemui.statusbar.phone.KeyguardLiftController +import com.android.systemui.theme.CustomThemeOverlayController import com.android.systemui.theme.ThemeOverlayController import com.android.systemui.toast.ToastUI import com.android.systemui.usb.StorageNotification @@ -174,7 +175,7 @@ abstract class SystemUICoreStartableModule { @Binds @IntoMap @ClassKey(ThemeOverlayController::class) - abstract fun bindThemeOverlayController(sysui: ThemeOverlayController): CoreStartable + abstract fun bindThemeOverlayController(sysui: CustomThemeOverlayController): CoreStartable /** Inject into ToastUI. */ @Binds @@ -205,4 +206,4 @@ abstract class SystemUICoreStartableModule { @IntoMap @ClassKey(KeyguardLiftController::class) abstract fun bindKeyguardLiftController(sysui: KeyguardLiftController): CoreStartable -} \ No newline at end of file +} diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java index 366ef2651a92..e462f0e0f466 100644 --- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java +++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java @@ -89,6 +89,7 @@ import com.android.systemui.util.time.SystemClockImpl; import com.android.systemui.wallet.dagger.WalletModule; import com.android.systemui.wmshell.BubblesManager; +import com.android.systemui.R; import com.android.wm.shell.bubbles.Bubbles; import com.android.wm.shell.dagger.DynamicOverride; @@ -188,8 +189,17 @@ static SysUiState provideSysUiState(DumpManager dumpManager) { @BindsOptionalOf abstract CentralSurfaces optionalCentralSurfaces(); - @BindsOptionalOf - abstract UdfpsHbmProvider optionalUdfpsHbmProvider(); + @Provides + static UdfpsHbmProvider getUdfpsHbmProvider(Context context) { + String className = context.getString(R.string.config_udfpsHbmProviderComponent); + try { + Class clazz = context.getClassLoader().loadClass(className); + return (UdfpsHbmProvider) clazz.getDeclaredConstructor( + new Class[] { Context.class }).newInstance(context); + } catch (Throwable t) { + throw new RuntimeException("Error loading UdfpsHbmProvider " + className, t); + } + } @BindsOptionalOf abstract AlternateUdfpsTouchProvider optionalUdfpsTouchProvider(); diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java b/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java index 83220cab7149..2f7ad889c160 100644 --- a/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java +++ b/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java @@ -148,6 +148,11 @@ public void transitionTo(DozeMachine.State oldState, DozeMachine.State newState) break; case DOZE: setLightSensorEnabled(false); + // we dont have a brightness sensor so remove any font scrim + // set from prepareForGentleWakeUp right away + if (!mRegistered) { + mDozeHost.setAodDimmingScrim(0f); + } resetBrightnessToDefault(); break; case DOZE_AOD_PAUSED: diff --git a/packages/SystemUI/src/com/android/systemui/flags/Flags.java b/packages/SystemUI/src/com/android/systemui/flags/Flags.java index c43dd9041a50..f411654ed611 100644 --- a/packages/SystemUI/src/com/android/systemui/flags/Flags.java +++ b/packages/SystemUI/src/com/android/systemui/flags/Flags.java @@ -151,7 +151,7 @@ public class Flags { /***************************************/ // 900 - media public static final BooleanFlag MEDIA_TAP_TO_TRANSFER = new BooleanFlag(900, false); - public static final BooleanFlag MEDIA_SESSION_ACTIONS = new BooleanFlag(901, false); + public static final BooleanFlag MEDIA_SESSION_ACTIONS = new BooleanFlag(901, true); public static final BooleanFlag MEDIA_NEARBY_DEVICES = new BooleanFlag(903, true); public static final BooleanFlag MEDIA_MUTE_AWAIT = new BooleanFlag(904, true); diff --git a/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java b/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java index 9c7411bf3649..54af4a844b51 100644 --- a/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java +++ b/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java @@ -54,7 +54,7 @@ public class FragmentHostManager { private final View mRootView; private final InterestingConfigChanges mConfigChanges = new InterestingConfigChanges( ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_LOCALE - | ActivityInfo.CONFIG_ASSETS_PATHS); + | ActivityInfo.CONFIG_ASSETS_PATHS | ActivityInfo.CONFIG_UI_MODE); private final FragmentService mManager; private final ExtensionFragmentManager mPlugins = new ExtensionFragmentManager(); diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsComponent.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsComponent.java index 74d5bd577cf4..77b7e478494d 100644 --- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsComponent.java +++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsComponent.java @@ -80,8 +80,8 @@ private void onExtensionCallback(GlobalActions newPlugin) { } @Override - public void handleShowShutdownUi(boolean isReboot, String reason) { - mExtension.get().showShutdownUi(isReboot, reason); + public void handleShowShutdownUi(boolean isReboot, String reason, boolean rebootCustom) { + mExtension.get().showShutdownUi(isReboot, reason, rebootCustom); } @Override @@ -116,9 +116,9 @@ public void shutdown() { } @Override - public void reboot(boolean safeMode) { + public void reboot(boolean safeMode, String reason) { try { - mBarService.reboot(safeMode); + mBarService.reboot(safeMode, reason); } catch (RemoteException e) { } } diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java index acb080a2eaaa..784970c9cbd9 100644 --- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java +++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java @@ -35,12 +35,15 @@ import android.app.ActivityManager; import android.app.Dialog; import android.app.IActivityManager; +import android.app.KeyguardManager; import android.app.StatusBarManager; import android.app.WallpaperManager; import android.app.admin.DevicePolicyManager; import android.app.trust.TrustManager; import android.content.BroadcastReceiver; +import android.content.ComponentName; import android.content.Context; +import android.content.ContentResolver; import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; @@ -52,12 +55,24 @@ import android.database.ContentObserver; import android.graphics.Color; import android.graphics.drawable.Drawable; +import android.graphics.Bitmap; +import android.graphics.BitmapShader; +import android.graphics.Canvas; +import android.graphics.Matrix; +import android.graphics.Paint; +import android.graphics.RectF; +import android.graphics.Shader; +import android.graphics.drawable.BitmapDrawable; +import android.hardware.camera2.CameraManager; +import android.hardware.camera2.CameraCharacteristics; +import android.hardware.camera2.CameraAccessException; import android.media.AudioManager; import android.os.Binder; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Message; +import android.os.PowerManager; import android.os.RemoteException; import android.os.SystemProperties; import android.os.UserHandle; @@ -75,6 +90,7 @@ import android.view.GestureDetector; import android.view.IWindowManager; import android.view.LayoutInflater; +import android.view.Gravity; import android.view.MotionEvent; import android.view.Surface; import android.view.View; @@ -118,6 +134,8 @@ import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.plugins.GlobalActions.GlobalActionsManager; import com.android.systemui.plugins.GlobalActionsPanelPlugin; +import com.android.systemui.screenrecord.RecordingController; +import com.android.systemui.screenrecord.ScreenRecordDialog; import com.android.systemui.scrim.ScrimDrawable; import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.VibratorHelper; @@ -130,6 +148,7 @@ import com.android.systemui.util.RingerModeTracker; import com.android.systemui.util.settings.GlobalSettings; import com.android.systemui.util.settings.SecureSettings; +import com.android.systemui.util.settings.SystemSettings; import java.util.ArrayList; import java.util.List; @@ -172,6 +191,11 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene private static final String GLOBAL_ACTION_KEY_LOGOUT = "logout"; static final String GLOBAL_ACTION_KEY_EMERGENCY = "emergency"; static final String GLOBAL_ACTION_KEY_SCREENSHOT = "screenshot"; + private static final String GLOBAL_ACTION_KEY_REBOOT_RECOVERY = "reboot_recovery"; + private static final String GLOBAL_ACTION_KEY_REBOOT_BOOTLOADER = "reboot_bootloader"; + private static final String GLOBAL_ACTION_KEY_REBOOT_FASTBOOT = "reboot_fastboot"; + private static final String GLOBAL_ACTION_KEY_SCREENRECORD = "screenrecord"; + private static final String GLOBAL_ACTION_KEY_FLASHLIGHT = "flashlight"; // See NotificationManagerService#scheduleDurationReachedLocked private static final long TOAST_FADE_TIME = 333; @@ -189,6 +213,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene private final BroadcastDispatcher mBroadcastDispatcher; protected final GlobalSettings mGlobalSettings; protected final SecureSettings mSecureSettings; + protected final SystemSettings mSystemSettings; protected final Resources mResources; private final ConfigurationController mConfigurationController; private final UserManager mUserManager; @@ -239,6 +264,14 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene private final Optional mCentralSurfacesOptional; private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; private final DialogLaunchAnimator mDialogLaunchAnimator; + private final RecordingController mRecordingController; + private boolean mFlashlightEnabled = false; + + private String[] mDefaultMenuActions; + private String[] mRootMenuActions; + private String[] mRebootMenuActions; + private String[] mCurrentMenuActions; + private static boolean mIsRebootMenu; @VisibleForTesting public enum GlobalActionsEvent implements UiEventLogger.UiEventEnum { @@ -326,6 +359,7 @@ public GlobalActionsDialogLite( TelephonyListenerManager telephonyListenerManager, GlobalSettings globalSettings, SecureSettings secureSettings, + SystemSettings systemSettings, @NonNull VibratorHelper vibrator, @Main Resources resources, ConfigurationController configurationController, @@ -346,7 +380,8 @@ public GlobalActionsDialogLite( PackageManager packageManager, Optional centralSurfacesOptional, KeyguardUpdateMonitor keyguardUpdateMonitor, - DialogLaunchAnimator dialogLaunchAnimator) { + DialogLaunchAnimator dialogLaunchAnimator, + RecordingController recordingController) { mContext = context; mWindowManagerFuncs = windowManagerFuncs; mAudioManager = audioManager; @@ -358,6 +393,7 @@ public GlobalActionsDialogLite( mBroadcastDispatcher = broadcastDispatcher; mGlobalSettings = globalSettings; mSecureSettings = secureSettings; + mSystemSettings = systemSettings; mResources = resources; mConfigurationController = configurationController; mUserManager = userManager; @@ -377,6 +413,7 @@ public GlobalActionsDialogLite( mCentralSurfacesOptional = centralSurfacesOptional; mKeyguardUpdateMonitor = keyguardUpdateMonitor; mDialogLaunchAnimator = dialogLaunchAnimator; + mRecordingController = recordingController; // receive broadcasts IntentFilter filter = new IntentFilter(); @@ -406,6 +443,13 @@ public GlobalActionsDialogLite( mScreenshotHelper = new ScreenshotHelper(context); mConfigurationController.addCallback(this); + + mDefaultMenuActions = mContext.getResources().getStringArray( + com.android.internal.R.array.config_globalActionsList); + mRebootMenuActions = mContext.getResources().getStringArray( + com.android.internal.R.array.config_rebootActionsList); + + settingsChanged(); } /** @@ -445,6 +489,8 @@ public void showOrHideDialog(boolean keyguardShowing, boolean isDeviceProvisione @Nullable View view) { mKeyguardShowing = keyguardShowing; mDeviceProvisioned = isDeviceProvisioned; + mIsRebootMenu = false; + mCurrentMenuActions = mRootMenuActions; if (mDialog != null && mDialog.isShowing()) { // In order to force global actions to hide on the same affordance press, we must // register a call to onGlobalActionsShown() first to prevent the default actions @@ -492,6 +538,53 @@ protected void handleShow(@Nullable View view) { prepareDialog(); WindowManager.LayoutParams attrs = mDialog.getWindow().getAttributes(); + + boolean isPrimary = UserHandle.getCallingUserId() == UserHandle.USER_OWNER; + + int powermenuAnimations = isPrimary ? getPowermenuAnimations() : 0; + switch (powermenuAnimations) { + case 0: + attrs.windowAnimations = R.style.GlobalActionsAnimationEnter; + attrs.gravity = Gravity.CENTER|Gravity.CENTER_HORIZONTAL; + break; + case 1: + attrs.windowAnimations = R.style.GlobalActionsAnimation; + attrs.gravity = Gravity.BOTTOM|Gravity.CENTER_HORIZONTAL; + break; + case 2: + attrs.windowAnimations = R.style.GlobalActionsAnimationTop; + attrs.gravity = Gravity.TOP|Gravity.CENTER_HORIZONTAL; + break; + case 3: + attrs.windowAnimations = R.style.GlobalActionsAnimationFly; + attrs.gravity = Gravity.CENTER_VERTICAL|Gravity.CENTER_HORIZONTAL; + break; + case 4: + attrs.windowAnimations = R.style.GlobalActionsAnimationTn; + attrs.gravity = Gravity.CENTER_VERTICAL|Gravity.CENTER_HORIZONTAL; + break; + case 5: + attrs.windowAnimations = R.style.GlobalActionsAnimationTranslucent; + attrs.gravity = Gravity.CENTER_VERTICAL|Gravity.CENTER_HORIZONTAL; + break; + case 6: + attrs.windowAnimations = R.style.GlobalActionsAnimationXylon; + attrs.gravity = Gravity.CENTER_VERTICAL|Gravity.CENTER_HORIZONTAL; + break; + case 7: + attrs.windowAnimations = R.style.GlobalActionsAnimationCard; + attrs.gravity = Gravity.CENTER_VERTICAL|Gravity.CENTER_HORIZONTAL; + break; + case 8: + attrs.windowAnimations = R.style.GlobalActionsAnimationTranslucent; + attrs.gravity = Gravity.TOP|Gravity.CENTER_HORIZONTAL; + break; + case 9: + attrs.windowAnimations = R.style.GlobalActionsAnimationTranslucent; + attrs.gravity = Gravity.BOTTOM|Gravity.CENTER_HORIZONTAL; + break; + } + attrs.setTitle("ActionsDialog"); attrs.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; mDialog.getWindow().setAttributes(attrs); @@ -517,14 +610,76 @@ protected boolean shouldShowAction(Action action) { return action.shouldShow(); } + public void settingsChanged() { + final String globalAction = mSystemSettings.getStringForUser( + Settings.System.GLOBAL_ACTIONS_LIST, UserHandle.USER_CURRENT); + + if (globalAction != null) { + mRootMenuActions = globalAction.split(","); + } else { + mRootMenuActions = mDefaultMenuActions; + } + } + + private boolean isAdvancedRebootPossible(Context context) { + KeyguardManager km = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE); + boolean keyguardLocked = km.inKeyguardRestrictedInputMode() && km.isKeyguardSecure(); + boolean advancedRebootEnabled = Settings.Secure.getInt(context.getContentResolver(), + Settings.Secure.ADVANCED_REBOOT, 1) == 1; + boolean isPrimaryUser = UserHandle.getCallingUserId() == UserHandle.USER_OWNER; + + return advancedRebootEnabled && !keyguardLocked && isPrimaryUser; + } + + private List getCurrentRebootMenuItems() { + List items = new ArrayList(); + String[] rebootMenuActions = mContext.getResources().getStringArray( + com.android.internal.R.array.config_rebootActionsList); + for (int i = 0; i < rebootMenuActions.length; i++) { + String actionKey = rebootMenuActions[i]; + if (GLOBAL_ACTION_KEY_REBOOT_RECOVERY.equals(actionKey)) { + items.add(new RebootRecoveryAction()); + } else if (GLOBAL_ACTION_KEY_REBOOT_BOOTLOADER.equals(actionKey)) { + items.add(new RebootBootloaderAction()); + } + } + return items; + } + + private boolean shouldShowRebootSubmenu() { + if (!isAdvancedRebootPossible(mContext)) { + return false; + } else { + List rebootMenuItems = getCurrentRebootMenuItems(); + return rebootMenuItems.size() > 0; + } + } + /** * Returns the maximum number of power menu items to show based on which GlobalActions * layout is being used. */ @VisibleForTesting protected int getMaxShownPowerItems() { - return mResources.getInteger(com.android.systemui.R.integer.power_menu_lite_max_columns) - * mResources.getInteger(com.android.systemui.R.integer.power_menu_lite_max_rows); + int globalactionMaxColumns = mSystemSettings.getInt( + Settings.System.GLOBAL_ACTIONS_MAX_COLUMNS, 2); + int globalactionMaxRows = mSystemSettings.getInt( + Settings.System.GLOBAL_ACTIONS_MAX_ROWS, 4); + if (mIsRebootMenu) { + // To show reboot to bootloader, recovery, fastbootd, system. + return 4; + } else if (globalactionMaxColumns != 0 && + globalactionMaxRows != 0) { + return globalactionMaxColumns * globalactionMaxRows; + } else { + return mResources.getInteger(com.android.systemui.R.integer.power_menu_lite_max_columns) + * mResources.getInteger(com.android.systemui.R.integer.power_menu_lite_max_rows); + } + } + + private int getPowermenuAnimations() { + return Settings.System.getInt(mContext.getContentResolver(), + Settings.System.POWER_MENU_ANIMATIONS, 0); } /** @@ -564,7 +719,6 @@ protected void createActionItems() { mItems.clear(); mOverflowItems.clear(); mPowerItems.clear(); - String[] defaultActions = getDefaultActions(); ShutDownAction shutdownAction = new ShutDownAction(); RestartAction restartAction = new RestartAction(); @@ -573,37 +727,55 @@ protected void createActionItems() { CurrentUserProvider currentUser = new CurrentUserProvider(); // make sure emergency affordance action is first, if needed - if (mEmergencyAffordanceManager.needsEmergencyAffordance()) { + if (mSystemSettings.getInt( + Settings.System.GLOBAL_ACTIONS_EMERGENCY, 0) == 1 && + mEmergencyAffordanceManager.needsEmergencyAffordance()) { addIfShouldShowAction(tempActions, new EmergencyAffordanceAction()); addedKeys.add(GLOBAL_ACTION_KEY_EMERGENCY); } - for (int i = 0; i < defaultActions.length; i++) { - String actionKey = defaultActions[i]; + // Always add the power off and restart options if we're not in advanced restart submenu + if (!mIsRebootMenu) { + addIfShouldShowAction(tempActions, shutdownAction); + addIfShouldShowAction(tempActions, restartAction); + } + + for (int i = 0; i < mCurrentMenuActions.length; i++) { + String actionKey = mCurrentMenuActions[i]; if (addedKeys.contains(actionKey)) { // If we already have added this, don't add it again. continue; } if (GLOBAL_ACTION_KEY_POWER.equals(actionKey)) { - addIfShouldShowAction(tempActions, shutdownAction); + continue; } else if (GLOBAL_ACTION_KEY_AIRPLANE.equals(actionKey)) { - addIfShouldShowAction(tempActions, mAirplaneModeOn); + if (mSystemSettings.getInt( + Settings.System.GLOBAL_ACTIONS_AIRPLANE, 0) == 1) { + addIfShouldShowAction(tempActions, mAirplaneModeOn); + } } else if (GLOBAL_ACTION_KEY_BUGREPORT.equals(actionKey)) { if (shouldDisplayBugReport(currentUser.get())) { addIfShouldShowAction(tempActions, new BugReportAction()); } } else if (GLOBAL_ACTION_KEY_SILENT.equals(actionKey)) { - if (mShowSilentToggle) { + if (mSystemSettings.getInt( + Settings.System.GLOBAL_ACTIONS_SOUNDPANEL, 0) == 1) { addIfShouldShowAction(tempActions, mSilentModeAction); } } else if (GLOBAL_ACTION_KEY_USERS.equals(actionKey)) { - if (SystemProperties.getBoolean("fw.power_user_switcher", false)) { + if (mSystemSettings.getInt( + Settings.System.GLOBAL_ACTIONS_USERS, 0) == 1) { addUserActions(tempActions, currentUser.get()); } } else if (GLOBAL_ACTION_KEY_SETTINGS.equals(actionKey)) { - addIfShouldShowAction(tempActions, getSettingsAction()); + if (mSystemSettings.getInt( + Settings.System.GLOBAL_ACTIONS_SETTINGS, 0) != 0) { + addIfShouldShowAction(tempActions, getSettingsAction()); + } } else if (GLOBAL_ACTION_KEY_LOCKDOWN.equals(actionKey)) { - if (shouldDisplayLockdown(currentUser.get())) { + if (mSystemSettings.getIntForUser( + Settings.System.GLOBAL_ACTIONS_LOCKDOWN, 0, + currentUser.get().id) != 0) { addIfShouldShowAction(tempActions, new LockDownAction()); } } else if (GLOBAL_ACTION_KEY_VOICEASSIST.equals(actionKey)) { @@ -611,9 +783,35 @@ protected void createActionItems() { } else if (GLOBAL_ACTION_KEY_ASSIST.equals(actionKey)) { addIfShouldShowAction(tempActions, getAssistAction()); } else if (GLOBAL_ACTION_KEY_RESTART.equals(actionKey)) { - addIfShouldShowAction(tempActions, restartAction); + if (!mIsRebootMenu) { + continue; + } else { + addIfShouldShowAction(tempActions, restartAction); + } + } else if (GLOBAL_ACTION_KEY_REBOOT_RECOVERY.equals(actionKey) && + isAdvancedRebootPossible(mContext)) { + addIfShouldShowAction(tempActions, new RebootRecoveryAction()); + } else if (GLOBAL_ACTION_KEY_REBOOT_BOOTLOADER.equals(actionKey) && + isAdvancedRebootPossible(mContext)) { + addIfShouldShowAction(tempActions, new RebootBootloaderAction()); + } else if (GLOBAL_ACTION_KEY_REBOOT_FASTBOOT.equals(actionKey) && + isAdvancedRebootPossible(mContext)) { + addIfShouldShowAction(tempActions, new RebootFastbootAction()); } else if (GLOBAL_ACTION_KEY_SCREENSHOT.equals(actionKey)) { - addIfShouldShowAction(tempActions, new ScreenshotAction()); + if (mSystemSettings.getInt( + Settings.System.GLOBAL_ACTIONS_SCREENSHOT, 0) == 1) { + addIfShouldShowAction(tempActions, new ScreenshotAction()); + } + } else if (GLOBAL_ACTION_KEY_SCREENRECORD.equals(actionKey)) { + if (mSystemSettings.getInt( + Settings.System.GLOBAL_ACTIONS_SCREENRECORD, 0) == 1) { + addIfShouldShowAction(tempActions, getScreenrecordAction()); + } + } else if (GLOBAL_ACTION_KEY_FLASHLIGHT.equals(actionKey)) { + if (mSystemSettings.getInt( + Settings.System.GLOBAL_ACTIONS_FLASHLIGHT, 0) == 1) { + addIfShouldShowAction(tempActions, getFlashlightToggleAction()); + } } else if (GLOBAL_ACTION_KEY_LOGOUT.equals(actionKey)) { // TODO(b/206032495): should call mDevicePolicyManager.getLogoutUserId() instead of // hardcode it to USER_SYSTEM so it properly supports headless system user mode @@ -624,9 +822,11 @@ protected void createActionItems() { addIfShouldShowAction(tempActions, new LogoutAction()); } } else if (GLOBAL_ACTION_KEY_EMERGENCY.equals(actionKey)) { - if (shouldDisplayEmergency()) { + if (mSystemSettings.getInt( + Settings.System.GLOBAL_ACTIONS_EMERGENCY, 0) == 1 + && !mIsRebootMenu && shouldDisplayEmergency()) { addIfShouldShowAction(tempActions, new EmergencyDialerAction()); - } + } } else { Log.e(TAG, "Invalid global action key " + actionKey); } @@ -717,6 +917,15 @@ boolean shouldDisplayBugReport(UserInfo currentUser) { && (currentUser == null || currentUser.isPrimary()); } + @Override + public void onUiModeChanged() { + // Colors may change, depending on UI mode + mContext.getTheme().applyStyle(mContext.getThemeResId(), true); + if (mDialog != null && mDialog.isShowing()) { + mDialog.refreshDialog(); + } + } + @Override public void onConfigChanged(Configuration newConfig) { if (mDialog != null && mDialog.isShowing() @@ -771,7 +980,7 @@ final class ShutDownAction extends SinglePressAction implements LongPressAction public boolean onLongPress() { mUiEventLogger.log(GlobalActionsEvent.GA_SHUTDOWN_LONG_PRESS); if (!mUserManager.hasUserRestriction(UserManager.DISALLOW_SAFE_BOOT)) { - mWindowManagerFuncs.reboot(true); + mWindowManagerFuncs.reboot(true, null); return true; } return false; @@ -895,14 +1104,19 @@ EmergencyDialerAction makeEmergencyDialerActionForTesting() { @VisibleForTesting final class RestartAction extends SinglePressAction implements LongPressAction { RestartAction() { - super(R.drawable.ic_restart, R.string.global_action_restart); + super(R.drawable.ic_restart, com.android.systemui.R.string.global_action_reboot); + if (mIsRebootMenu) { + mMessageResId = com.android.systemui.R.string.global_action_reboot_system; + } else if (shouldShowRebootSubmenu()) { + mMessageResId = com.android.systemui.R.string.global_action_reboot; + } } @Override public boolean onLongPress() { mUiEventLogger.log(GlobalActionsEvent.GA_REBOOT_LONG_PRESS); if (!mUserManager.hasUserRestriction(UserManager.DISALLOW_SAFE_BOOT)) { - mWindowManagerFuncs.reboot(true); + mWindowManagerFuncs.reboot(true, null); return true; } return false; @@ -921,14 +1135,112 @@ public boolean showBeforeProvisioning() { @Override public void onPress() { mUiEventLogger.log(GlobalActionsEvent.GA_REBOOT_PRESS); - mWindowManagerFuncs.reboot(false); + if (!mIsRebootMenu && shouldShowRebootSubmenu()) { + mIsRebootMenu = true; + mCurrentMenuActions = mRebootMenuActions; + if (mDialog != null) { + mDialog.dismiss(); + mDialog = null; + // Show delayed, so that the dismiss of the previous dialog completes + mHandler.sendEmptyMessageDelayed(MESSAGE_SHOW, DIALOG_SHOW_DELAY); + } else { + handleShow(null); + } + } else { + mHandler.sendEmptyMessage(MESSAGE_DISMISS); + if (mIsRebootMenu || !isAdvancedRebootPossible(mContext)) { + mWindowManagerFuncs.reboot(false, null); + } + } + } + } + + private final class RebootRecoveryAction extends SinglePressAction { + private RebootRecoveryAction() { + super(com.android.systemui.R.drawable.ic_restart_recovery, + com.android.systemui.R.string.global_action_reboot_recovery); + } + + @Override + public boolean showDuringKeyguard() { + return true; + } + + @Override + public boolean showDuringRestrictedKeyguard() { + return false; + } + + @Override + public boolean showBeforeProvisioning() { + return true; + } + + @Override + public void onPress() { + mWindowManagerFuncs.reboot(false, PowerManager.REBOOT_RECOVERY); + } + } + + private final class RebootBootloaderAction extends SinglePressAction { + private RebootBootloaderAction() { + super(com.android.systemui.R.drawable.ic_restart_bootloader, + com.android.systemui.R.string.global_action_reboot_bootloader); + } + + @Override + public boolean showDuringKeyguard() { + return true; + } + + @Override + public boolean showDuringRestrictedKeyguard() { + return false; + } + + @Override + public boolean showBeforeProvisioning() { + return true; + } + + @Override + public void onPress() { + mWindowManagerFuncs.reboot(false, PowerManager.REBOOT_BOOTLOADER); + } + } + + private final class RebootFastbootAction extends SinglePressAction { + private RebootFastbootAction() { + super(com.android.systemui.R.drawable.ic_lock_restart_fastboot, + com.android.systemui.R.string.global_action_reboot_fastboot); + } + + @Override + public boolean showDuringKeyguard() { + return true; + } + + @Override + public boolean showDuringRestrictedKeyguard() { + return false; + } + + @Override + public boolean showBeforeProvisioning() { + return true; + } + + @Override + public void onPress() { + mWindowManagerFuncs.reboot(false, PowerManager.REBOOT_FASTBOOT); } } @VisibleForTesting class ScreenshotAction extends SinglePressAction { ScreenshotAction() { - super(R.drawable.ic_screenshot, R.string.global_action_screenshot); + super(com.android.systemui.R.drawable.ic_lock_screenshot, + R.string.global_action_screenshot); } @Override @@ -957,18 +1269,6 @@ public boolean showDuringKeyguard() { public boolean showBeforeProvisioning() { return false; } - - @Override - public boolean shouldShow() { - // Include screenshot in power menu for legacy nav because it is not accessible - // through Recents in that mode - return is2ButtonNavigationEnabled(); - } - - boolean is2ButtonNavigationEnabled() { - return NAV_BAR_MODE_2BUTTON == mContext.getResources().getInteger( - com.android.internal.R.integer.config_navBarInteractionMode); - } } @VisibleForTesting @@ -976,6 +1276,69 @@ ScreenshotAction makeScreenshotActionForTesting() { return new ScreenshotAction(); } + private Action getFlashlightToggleAction() { + return new SinglePressAction(com.android.systemui.R.drawable.ic_lock_flashlight, + com.android.systemui.R.string.global_action_flashlight) { + public void onPress() { + try { + CameraManager cameraManager = (CameraManager) + mContext.getSystemService(Context.CAMERA_SERVICE); + for (final String cameraId : cameraManager.getCameraIdList()) { + CameraCharacteristics characteristics = + cameraManager.getCameraCharacteristics(cameraId); + int orient = characteristics.get(CameraCharacteristics.LENS_FACING); + if (orient == CameraCharacteristics.LENS_FACING_BACK) { + cameraManager.setTorchMode(cameraId, !mFlashlightEnabled); + mFlashlightEnabled = !mFlashlightEnabled; + } + } + } catch (CameraAccessException e) { + } + } + + public boolean showDuringKeyguard() { + return true; + } + + public boolean showBeforeProvisioning() { + return false; + } + }; + } + + private Action getScreenrecordAction() { + return new SinglePressAction(com.android.systemui.R.drawable.ic_lock_screenrecord, + com.android.systemui.R.string.global_action_screenrecord) { + @Override + public void onPress() { + if (mRecordingController.isRecording()) { + mRecordingController.stopRecording(); + return; + } else if (mRecordingController.isStarting()) { + return; + } + mHandler.post(() -> { + Runnable onScreenRecord = () -> { + mCentralSurfacesOptional.ifPresent(CentralSurfaces::collapseShade); + }; + ScreenRecordDialog screenRecordDialog = + mRecordingController.createScreenRecordDialog(mContext, onScreenRecord); + screenRecordDialog.show(); + }); + } + + @Override + public boolean showDuringKeyguard() { + return true; + } + + @Override + public boolean showBeforeProvisioning() { + return true; + } + }; + } + @VisibleForTesting class BugReportAction extends SinglePressAction implements LongPressAction { @@ -1073,7 +1436,7 @@ public void onPress() { } private Action getSettingsAction() { - return new SinglePressAction(R.drawable.ic_settings, + return new SinglePressAction(com.android.systemui.R.drawable.ic_lock_settings, R.string.global_action_settings) { @Override @@ -1142,7 +1505,7 @@ public boolean showBeforeProvisioning() { @VisibleForTesting class LockDownAction extends SinglePressAction { LockDownAction() { - super(R.drawable.ic_lock_lockdown, R.string.global_action_lockdown); + super(com.android.systemui.R.drawable.ic_lock_lock, R.string.global_action_lockdown); } @Override @@ -1241,6 +1604,10 @@ public boolean showBeforeProvisioning() { } } + public static boolean isRebootMenu() { + return mIsRebootMenu; + } + protected void prepareDialog() { refreshSilentMode(); mAirplaneModeOn.updateState(mAirplaneState); @@ -1594,6 +1961,14 @@ public interface Action { */ boolean showDuringKeyguard(); + /** + * @return whether this action should appear in the dialog when a restricted + * keyguard is showing. + */ + default boolean showDuringRestrictedKeyguard() { + return true; + } + /** * @return whether this action should appear in the dialog before the * device is provisioned.f @@ -1651,8 +2026,9 @@ private interface LongPressAction extends Action { private abstract class SinglePressAction implements Action { private final int mIconResId; private final Drawable mIcon; - private final int mMessageResId; + protected int mMessageResId; private final CharSequence mMessage; + private CharSequence mStatusMessage; protected SinglePressAction(int iconResId, int messageResId) { mIconResId = iconResId; @@ -1672,8 +2048,12 @@ public boolean isEnabled() { return true; } - public String getStatus() { - return null; + public CharSequence getStatus() { + return mStatusMessage; + } + + public void setStatus(CharSequence status) { + mStatusMessage = status; } public abstract void onPress(); @@ -1753,6 +2133,10 @@ public boolean inTransition() { */ private abstract class ToggleAction implements Action { + public String getStatus() { + return null; + } + protected ToggleState mState = ToggleState.Off; // prefs @@ -1881,8 +2265,8 @@ public void updateState(ToggleState state) { private class AirplaneModeAction extends ToggleAction { AirplaneModeAction() { super( - R.drawable.ic_lock_airplane_mode, - R.drawable.ic_lock_airplane_mode_off, + com.android.systemui.R.drawable.ic_lock_airplane_mode_enabled, + com.android.systemui.R.drawable.ic_lock_airplane_mode_disabled, R.string.global_actions_toggle_airplane_mode, R.string.global_actions_airplane_mode_on_status, R.string.global_actions_airplane_mode_off_status); @@ -2080,8 +2464,10 @@ public void onChange(boolean selfChange) { private static final int MESSAGE_DISMISS = 0; private static final int MESSAGE_REFRESH = 1; + private static final int MESSAGE_SHOW = 2; private static final int DIALOG_DISMISS_DELAY = 300; // ms private static final int DIALOG_PRESS_DELAY = 850; // ms + private static final int DIALOG_SHOW_DELAY = 300; // ms @VisibleForTesting void setZeroDialogPressDelayForTesting() { mDialogPressDelay = 0; // ms @@ -2106,6 +2492,9 @@ public void handleMessage(Message msg) { refreshSilentMode(); mAdapter.notifyDataSetChanged(); break; + case MESSAGE_SHOW: + handleShow(null); + break; } } }; diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsImpl.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsImpl.java index 290bf0d0734c..73929fddffc9 100644 --- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsImpl.java +++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsImpl.java @@ -79,7 +79,7 @@ public void showGlobalActions(GlobalActionsManager manager) { } @Override - public void showShutdownUi(boolean isReboot, String reason) { + public void showShutdownUi(boolean isReboot, String reason, boolean rebootCustom) { ScrimDrawable background = new ScrimDrawable(); final Dialog d = new Dialog(mContext, @@ -143,11 +143,28 @@ public void showShutdownUi(boolean isReboot, String reason) { reasonView.setTextColor(color); messageView.setTextColor(color); - messageView.setText(getRebootMessage(isReboot, reason)); - String rebootReasonMessage = getReasonMessage(reason); - if (rebootReasonMessage != null) { - reasonView.setVisibility(View.VISIBLE); - reasonView.setText(rebootReasonMessage); + if (rebootCustom) { + if (reason != null) { + if (PowerManager.REBOOT_RECOVERY.equals(reason)) { + messageView.setText( + com.android.systemui.R.string.global_action_reboot_recovery_progress); + } else if (PowerManager.REBOOT_BOOTLOADER.equals(reason)) { + messageView.setText( + com.android.systemui.R.string.global_action_reboot_bootloader_progress); + } else if (PowerManager.REBOOT_FASTBOOT.equals(reason)) { + messageView.setText( + com.android.systemui.R.string.global_action_reboot_fastboot_progress); + } + } else { + messageView.setText(com.android.systemui.R.string.global_action_reboot_progress); + } + } else { + messageView.setText(getRebootMessage(isReboot, reason)); + String rebootReasonMessage = getReasonMessage(reason); + if (rebootReasonMessage != null) { + reasonView.setVisibility(View.VISIBLE); + reasonView.setText(rebootReasonMessage); + } } d.show(); diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java index 5aedbdc20b31..5ff3fe2507c4 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java @@ -140,10 +140,10 @@ public void updateIndication(@IndicationType int type, KeyguardIndication newInd boolean currMsgShownForMinTime = timeSinceLastIndicationSwitch >= minShowDuration; if (hasNewIndication) { if (mCurrIndicationType == INDICATION_TYPE_NONE || mCurrIndicationType == type) { - showIndication(type); + showIndication(type, showAsap); } else if (showAsap) { if (currMsgShownForMinTime) { - showIndication(type); + showIndication(type, showAsap); } else { mIndicationQueue.removeIf(x -> x == type); mIndicationQueue.add(0 /* index */, type /* type */); @@ -154,7 +154,7 @@ public void updateIndication(@IndicationType int type, KeyguardIndication newInd getMinVisibilityMillis(mIndicationMessages.get(type)), DEFAULT_INDICATION_SHOW_LENGTH); if (timeSinceLastIndicationSwitch >= nextShowTime) { - showIndication(type); + showIndication(type, showAsap); } else { scheduleShowNextIndication( nextShowTime - timeSinceLastIndicationSwitch); @@ -171,7 +171,7 @@ public void updateIndication(@IndicationType int type, KeyguardIndication newInd if (mShowNextIndicationRunnable != null) { mShowNextIndicationRunnable.runImmediately(); } else { - showIndication(INDICATION_TYPE_NONE); + showIndication(INDICATION_TYPE_NONE, true); } } else { scheduleShowNextIndication(minShowDuration - timeSinceLastIndicationSwitch); @@ -237,7 +237,7 @@ public void clearMessages() { * Will re-add this indication to be re-shown after all other indications have been * rotated through. */ - private void showIndication(@IndicationType int type) { + private void showIndication(@IndicationType int type, boolean showAsap) { cancelScheduledIndication(); final CharSequence previousMessage = mCurrMessage; @@ -255,7 +255,7 @@ private void showIndication(@IndicationType int type) { mLastIndicationSwitch = SystemClock.uptimeMillis(); if (!TextUtils.equals(previousMessage, mCurrMessage) || previousIndicationType != mCurrIndicationType) { - mView.switchIndication(mIndicationMessages.get(type)); + mView.switchIndication(mIndicationMessages.get(type), showAsap); } // only schedule next indication if there's more than just this indication in the queue @@ -307,9 +307,9 @@ public void onDozingChanged(boolean isDozing) { if (isDozing == mIsDozing) return; mIsDozing = isDozing; if (mIsDozing) { - showIndication(INDICATION_TYPE_NONE); + showIndication(INDICATION_TYPE_NONE, true); } else if (mIndicationQueue.size() > 0) { - showIndication(mIndicationQueue.get(0)); + showIndication(mIndicationQueue.remove(0), true); } } }; @@ -327,7 +327,7 @@ class ShowNextIndication { mShowIndicationRunnable = () -> { int type = mIndicationQueue.size() == 0 ? INDICATION_TYPE_NONE : mIndicationQueue.get(0); - showIndication(type); + showIndication(type, true); }; mCancelDelayedRunnable = mExecutor.executeDelayed(mShowIndicationRunnable, delay); } diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java index b96eee717260..a724d87e5c08 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java @@ -220,7 +220,6 @@ public void onAnimationFinished() throws RemoteException { public void mergeAnimation(IBinder transition, TransitionInfo info, SurfaceControl.Transaction t, IBinder mergeTarget, IRemoteTransitionFinishedCallback finishCallback) { - } }; } @@ -349,7 +348,7 @@ public void onAnimationStart(@WindowManager.TransitionOldType int transit, } @Override // Binder interface - public void onAnimationCancelled() { + public void onAnimationCancelled(boolean isKeyguardOccluded) { mKeyguardViewMediator.cancelKeyguardExitAnimation(); } }; @@ -406,6 +405,8 @@ public void verifyUnlock(IKeyguardExitCallback callback) { @Override // Binder interface public void setOccluded(boolean isOccluded, boolean animate) { + Log.d(TAG, "setOccluded(" + isOccluded + ")"); + Trace.beginSection("KeyguardService.mBinder#setOccluded"); checkPermission(); mKeyguardViewMediator.setOccluded(isOccluded, animate); diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt index c686b48278a3..b51dfbab2b36 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt @@ -541,7 +541,7 @@ class KeyguardUnlockAnimationController @Inject constructor( // Now that the Launcher surface (with its smartspace positioned identically to ours) is // visible, hide our smartspace. - lockscreenSmartspace!!.visibility = View.INVISIBLE + lockscreenSmartspace?.visibility = View.INVISIBLE // As soon as the shade has animated out of the way, finish the keyguard exit animation. The // in-window animations in the Launcher window will end on their own. diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index 3ad43ac32185..0783eeec176f 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -836,13 +836,10 @@ public CharSequence consumeCustomMessage() { private final ActivityLaunchAnimator.Controller mOccludeAnimationController = new ActivityLaunchAnimator.Controller() { @Override - public void onLaunchAnimationStart(boolean isExpandingFullyAbove) { - setOccluded(true /* occluded */, false /* animate */); - } + public void onLaunchAnimationStart(boolean isExpandingFullyAbove) {} @Override public void onLaunchAnimationCancelled() { - setOccluded(true /* occluded */, false /* animate */); Log.d(TAG, "Occlude launch animation cancelled. Occluded state is now: " + mOccluded); } @@ -910,12 +907,12 @@ public LaunchAnimator.State createAnimatorState() { private final Matrix mUnoccludeMatrix = new Matrix(); @Override - public void onAnimationCancelled() { + public void onAnimationCancelled(boolean isKeyguardOccluded) { if (mUnoccludeAnimator != null) { mUnoccludeAnimator.cancel(); } - setOccluded(false /* isOccluded */, false /* animate */); + setOccluded(isKeyguardOccluded /* isOccluded */, false /* animate */); Log.d(TAG, "Unocclude animation cancelled. Occluded state is now: " + mOccluded); } @@ -925,6 +922,7 @@ public void onAnimationStart(int transit, RemoteAnimationTarget[] apps, RemoteAnimationTarget[] wallpapers, RemoteAnimationTarget[] nonApps, IRemoteAnimationFinishedCallback finishedCallback) throws RemoteException { + Log.d(TAG, "UnoccludeAnimator#onAnimationStart. Set occluded = false."); setOccluded(false /* isOccluded */, true /* animate */); if (apps == null || apps.length == 0 || apps[0] == null) { @@ -1670,6 +1668,8 @@ public boolean isShowingAndNotOccluded() { * Notify us when the keyguard is occluded by another window */ public void setOccluded(boolean isOccluded, boolean animate) { + Log.d(TAG, "setOccluded(" + isOccluded + ")"); + Trace.beginSection("KeyguardViewMediator#setOccluded"); if (DEBUG) Log.d(TAG, "setOccluded " + isOccluded); mInteractionJankMonitor.cancel(CUJ_LOCKSCREEN_TRANSITION_FROM_AOD); @@ -1700,6 +1700,7 @@ public boolean isAnimatingScreenOff() { */ private void handleSetOccluded(boolean isOccluded, boolean animate) { Trace.beginSection("KeyguardViewMediator#handleSetOccluded"); + Log.d(TAG, "handleSetOccluded(" + isOccluded + ")"); synchronized (KeyguardViewMediator.this) { if (mHiding && isOccluded) { // We're in the process of going away but WindowManager wants to show a @@ -3150,9 +3151,9 @@ private class ActivityLaunchRemoteAnimationRunner extends IRemoteAnimationRunner } @Override - public void onAnimationCancelled() throws RemoteException { + public void onAnimationCancelled(boolean isKeyguardOccluded) throws RemoteException { if (mRunner != null) { - mRunner.onAnimationCancelled(); + mRunner.onAnimationCancelled(isKeyguardOccluded); } } @@ -3189,13 +3190,18 @@ public void onAnimationStart(int transit, RemoteAnimationTarget[] apps, // internal state to reflect that immediately, vs. waiting for the launch animator to // begin. Otherwise, calls to setShowingLocked, etc. will not know that we're about to // be occluded and might re-show the keyguard. + Log.d(TAG, "OccludeAnimator#onAnimationStart. Set occluded = true."); setOccluded(true /* isOccluded */, false /* animate */); } @Override - public void onAnimationCancelled() throws RemoteException { - super.onAnimationCancelled(); - Log.d(TAG, "Occlude launch animation cancelled. Occluded state is now: " + mOccluded); + public void onAnimationCancelled(boolean isKeyguardOccluded) throws RemoteException { + super.onAnimationCancelled(isKeyguardOccluded); + + Log.d(TAG, "Occlude animation cancelled by WM. " + + "Setting occluded state to: " + isKeyguardOccluded); + setOccluded(isKeyguardOccluded /* occluded */, false /* animate */); + } } } diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java b/packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java index 33453a4c31d6..159784575b69 100644 --- a/packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java +++ b/packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java @@ -631,9 +631,22 @@ private void bindArtworkAndColors(MediaData data, String key, boolean updateBack Drawable artwork; boolean isArtworkBound; Icon artworkIcon = data.getArtwork(); + WallpaperColors wallpaperColors = null; if (artworkIcon != null) { - WallpaperColors wallpaperColors = WallpaperColors - .fromBitmap(artworkIcon.getBitmap()); + if (artworkIcon.getType() == Icon.TYPE_BITMAP + || artworkIcon.getType() == Icon.TYPE_ADAPTIVE_BITMAP) { + // Avoids extra processing if this is already a valid bitmap + wallpaperColors = WallpaperColors + .fromBitmap(artworkIcon.getBitmap()); + } else { + Drawable artworkDrawable = artworkIcon.loadDrawable(mContext); + if (artworkDrawable != null) { + wallpaperColors = WallpaperColors + .fromDrawable(artworkIcon.loadDrawable(mContext)); + } + } + } + if (wallpaperColors != null) { mutableColorScheme = new ColorScheme(wallpaperColors, true, Style.CONTENT); artwork = getScaledBackground(artworkIcon, width, height); isArtworkBound = true; diff --git a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputAdapter.java b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputAdapter.java index f2f275323d58..1ab0b5e263d1 100644 --- a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputAdapter.java +++ b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputAdapter.java @@ -269,6 +269,7 @@ void onBind(int customizedItem, boolean topMargin, boolean bottomMargin) { } private void onGroupActionTriggered(boolean isChecked, MediaDevice device) { + disableSeekBar(); if (isChecked && isDeviceIncluded(mController.getSelectableMediaDevice(), device)) { mController.addDeviceToPlayMedia(device); } else if (!isChecked && isDeviceIncluded(mController.getDeselectableMediaDevice(), diff --git a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBaseAdapter.java b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBaseAdapter.java index ccc0a3db0611..3b4ca48046eb 100644 --- a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBaseAdapter.java +++ b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBaseAdapter.java @@ -69,11 +69,13 @@ public abstract class MediaOutputBaseAdapter extends View mHolderView; boolean mIsDragging; int mCurrentActivePosition; + private boolean mIsInitVolumeFirstTime; public MediaOutputBaseAdapter(MediaOutputController controller) { mController = controller; mIsDragging = false; mCurrentActivePosition = -1; + mIsInitVolumeFirstTime = true; } @Override @@ -271,11 +273,13 @@ private void setTwoLineLayout(MediaDevice device, CharSequence title, boolean bF void initSeekbar(MediaDevice device, boolean isCurrentSeekbarInvisible) { if (!mController.isVolumeControlEnabled(device)) { disableSeekBar(); + } else { + enableSeekBar(); } mSeekBar.setMaxVolume(device.getMaxVolume()); final int currentVolume = device.getCurrentVolume(); if (mSeekBar.getVolume() != currentVolume) { - if (isCurrentSeekbarInvisible) { + if (isCurrentSeekbarInvisible && !mIsInitVolumeFirstTime) { animateCornerAndVolume(mSeekBar.getProgress(), MediaOutputSeekbar.scaleVolumeToProgress(currentVolume)); } else { @@ -284,6 +288,9 @@ void initSeekbar(MediaDevice device, boolean isCurrentSeekbarInvisible) { } } } + if (mIsInitVolumeFirstTime) { + mIsInitVolumeFirstTime = false; + } mSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { @@ -412,11 +419,16 @@ Drawable getSpeakerDrawable() { return drawable; } - private void disableSeekBar() { + protected void disableSeekBar() { mSeekBar.setEnabled(false); mSeekBar.setOnTouchListener((v, event) -> true); } + private void enableSeekBar() { + mSeekBar.setEnabled(true); + mSeekBar.setOnTouchListener((v, event) -> false); + } + protected void setUpDeviceIcon(MediaDevice device) { ThreadUtils.postOnBackgroundThread(() -> { Icon icon = mController.getDeviceIconCompat(device).toIcon(mContext); diff --git a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputMetricLogger.java b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputMetricLogger.java index 5d7af522176a..6fe06e085556 100644 --- a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputMetricLogger.java +++ b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputMetricLogger.java @@ -194,6 +194,11 @@ private void updateLoggingDeviceCount(List deviceList) { } private int getLoggingDeviceType(MediaDevice device, boolean isSourceDevice) { + if (device == null) { + return isSourceDevice + ? SysUiStatsLog.MEDIA_OUTPUT_OP_SWITCH_REPORTED__SOURCE__UNKNOWN_TYPE + : SysUiStatsLog.MEDIA_OUTPUT_OP_SWITCH_REPORTED__TARGET__UNKNOWN_TYPE; + } switch (device.getDeviceType()) { case MediaDevice.MediaDeviceType.TYPE_PHONE_DEVICE: return isSourceDevice @@ -229,6 +234,9 @@ private int getLoggingDeviceType(MediaDevice device, boolean isSourceDevice) { } private int getInteractionDeviceType(MediaDevice device) { + if (device == null) { + return SysUiStatsLog.MEDIA_OUTPUT_OP_INTERACTION_REPORTED__TARGET__UNKNOWN_TYPE; + } switch (device.getDeviceType()) { case MediaDevice.MediaDeviceType.TYPE_PHONE_DEVICE: return SysUiStatsLog.MEDIA_OUTPUT_OP_INTERACTION_REPORTED__TARGET__BUILTIN_SPEAKER; diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java index aa38b781229c..aaf57e51b691 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java @@ -1885,6 +1885,11 @@ public void onNavigationModeChanged(int mode) { setNavBarMode(mode); mView.setShouldShowSwipeUpUi(mOverviewProxyService.shouldShowSwipeUpUI()); } + + @Override + public void onSettingsChanged() { + mEdgeBackGestureHandler.onSettingsChanged(); + } }; private final Gefingerpoken mTouchHandler = new Gefingerpoken() { diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java index 59bb2278edfe..dd6086869a15 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java @@ -43,18 +43,20 @@ import com.android.systemui.navigationbar.buttons.ReverseLinearLayout.ReverseRelativeLayout; import com.android.systemui.recents.OverviewProxyService; import com.android.systemui.shared.system.QuickStepContract; +import com.android.systemui.tuner.TunerService; import java.io.PrintWriter; import java.util.Objects; public class NavigationBarInflaterView extends FrameLayout - implements NavigationModeController.ModeChangedListener { + implements NavigationModeController.ModeChangedListener, TunerService.Tunable { private static final String TAG = "NavBarInflater"; public static final String NAV_BAR_VIEWS = "sysui_nav_bar"; public static final String NAV_BAR_LEFT = "sysui_nav_bar_left"; public static final String NAV_BAR_RIGHT = "sysui_nav_bar_right"; + public static final String NAV_BAR_INVERSE = "sysui_nav_bar_inverse"; public static final String MENU_IME_ROTATE = "menu_ime"; public static final String BACK = "back"; @@ -102,6 +104,8 @@ public class NavigationBarInflaterView extends FrameLayout private OverviewProxyService mOverviewProxyService; private int mNavBarMode = NAV_BAR_MODE_3BUTTON; + private boolean mInverseLayout; + public NavigationBarInflaterView(Context context, AttributeSet attrs) { super(context, attrs); createInflaters(); @@ -151,12 +155,33 @@ public void onNavigationModeChanged(int mode) { mNavBarMode = mode; } + @Override + protected void onAttachedToWindow() { + super.onAttachedToWindow(); + Dependency.get(TunerService.class).addTunable(this, NAV_BAR_INVERSE); + } + @Override protected void onDetachedFromWindow() { Dependency.get(NavigationModeController.class).removeListener(this); + Dependency.get(TunerService.class).removeTunable(this); super.onDetachedFromWindow(); } + @Override + public void onTuningChanged(String key, String newValue) { + if (NAV_BAR_INVERSE.equals(key)) { + mInverseLayout = TunerService.parseIntegerSwitch(newValue, true); + updateLayoutInversion(); + } + } + + @Override + public void onConfigurationChanged(Configuration newConfig) { + super.onConfigurationChanged(newConfig); + updateLayoutInversion(); + } + public void onLikelyDefaultLayoutChange() { // Reevaluate new layout final String newValue = getDefaultLayout(); @@ -267,6 +292,19 @@ protected void inflateLayout(String newLayout) { updateButtonDispatchersCurrentView(); } + private void updateLayoutInversion() { + if (mInverseLayout) { + Configuration config = mContext.getResources().getConfiguration(); + if (config.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) { + setLayoutDirection(View.LAYOUT_DIRECTION_LTR); + } else { + setLayoutDirection(View.LAYOUT_DIRECTION_RTL); + } + } else { + setLayoutDirection(View.LAYOUT_DIRECTION_INHERIT); + } + } + private void addGravitySpacer(LinearLayout layout) { layout.addView(new Space(mContext), new LinearLayout.LayoutParams(0, 0, 1)); } diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java index 3fc9afe6ea94..b9f84d12d169 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java @@ -171,6 +171,8 @@ public class NavigationBarView extends FrameLayout { private boolean mShowSwipeUpUi; private UpdateActiveTouchRegionsCallback mUpdateActiveTouchRegionsCallback; + private boolean mBlockedGesturalNavigation; + private class NavTransitionListener implements TransitionListener { private boolean mBackTransitioning; private boolean mHomeAppearing; @@ -567,6 +569,7 @@ void onImeVisibilityChanged(boolean visible) { mTransitionListener.onBackAltCleared(); } mRotationButtonController.getRotationButton().setCanShowRotationButton(!visible); + mEdgeBackGestureHandler.setImeVisible(visible); } void setDisabledFlags(int disabledFlags, SysUiState sysUiState) { @@ -732,10 +735,13 @@ public void updateDisabledSystemUiStateFlags(SysUiState sysUiState) { sysUiState.setFlag(SYSUI_STATE_SCREEN_PINNING, ActivityManagerWrapper.getInstance().isScreenPinningActive()) .setFlag(SYSUI_STATE_OVERVIEW_DISABLED, + mBlockedGesturalNavigation || (mDisabledFlags & View.STATUS_BAR_DISABLE_RECENT) != 0) .setFlag(SYSUI_STATE_HOME_DISABLED, + mBlockedGesturalNavigation || (mDisabledFlags & View.STATUS_BAR_DISABLE_HOME) != 0) .setFlag(SYSUI_STATE_SEARCH_DISABLED, + mBlockedGesturalNavigation || (mDisabledFlags & View.STATUS_BAR_DISABLE_SEARCH) != 0) .commitUpdate(displayId); } @@ -774,6 +780,12 @@ public void updateStates() { mShowSwipeUpUi ? mQuickStepAccessibilityDelegate : null); } + public void setBlockedGesturalNavigation(boolean blocked, SysUiState sysUiState) { + mBlockedGesturalNavigation = blocked; + mEdgeBackGestureHandler.setBlockedGesturalNavigation(blocked); + updateDisabledSystemUiStateFlags(sysUiState); + } + /** * Updates the {@link WindowManager.LayoutParams.FLAG_SLIPPERY} state dependent on if swipe up * is enabled, or the notifications is fully opened without being in an animated state. If diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationModeController.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationModeController.java index 63276fee811b..b9de6bc6906f 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationModeController.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationModeController.java @@ -19,12 +19,16 @@ import static android.content.Intent.ACTION_OVERLAY_CHANGED; import android.content.BroadcastReceiver; +import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.om.IOverlayManager; import android.content.pm.PackageManager; import android.content.res.ApkAssets; +import android.database.ContentObserver; +import android.net.Uri; +import android.os.Handler; import android.os.PatternMatcher; import android.os.RemoteException; import android.os.ServiceManager; @@ -58,6 +62,7 @@ public class NavigationModeController implements Dumpable { public interface ModeChangedListener { void onNavigationModeChanged(int mode); + default void onSettingsChanged() {} } private final Context mContext; @@ -81,6 +86,21 @@ public void onUserSwitched() { } }; + private final class SettingsObserver extends ContentObserver { + public SettingsObserver(Handler handler) { + super(handler); + } + + @Override + public void onChange(boolean selfChange, Uri uri) { + for (int i = 0; i < mListeners.size(); i++) { + mListeners.get(i).onSettingsChanged(); + } + } + } + + private SettingsObserver mSettingsObserver; + // The primary user SysUI process doesn't get AppInfo changes from overlay package changes for // the secondary user (b/158613864), so we need to update the interaction mode here as well // as a fallback if we don't receive the configuration change @@ -115,6 +135,11 @@ public NavigationModeController(Context context, overlayFilter.addDataSchemeSpecificPart("android", PatternMatcher.PATTERN_LITERAL); mContext.registerReceiverAsUser(mReceiver, UserHandle.ALL, overlayFilter, null, null); + mSettingsObserver = new SettingsObserver(new Handler()); + mContext.getContentResolver().registerContentObserver(Settings.System.getUriFor( + Settings.System.BACK_GESTURE_HEIGHT), + false, mSettingsObserver, UserHandle.USER_ALL); + configurationController.addCallback(new ConfigurationController.ConfigurationListener() { @Override public void onThemeChanged() { @@ -136,7 +161,6 @@ public void updateCurrentInteractionMode(boolean notify) { Secure.NAVIGATION_MODE, String.valueOf(mode))); if (DEBUG) { Log.d(TAG, "updateCurrentInteractionMode: mode=" + mode); - dumpAssetPaths(mCurrentUserContext); } if (notify) { @@ -200,15 +224,5 @@ public void dump(PrintWriter pw, String[] args) { defaultOverlays = "failed_to_fetch"; } pw.println(" defaultOverlays=" + defaultOverlays); - dumpAssetPaths(mCurrentUserContext); - } - - private void dumpAssetPaths(Context context) { - Log.d(TAG, " contextUser=" + mCurrentUserContext.getUserId()); - Log.d(TAG, " assetPaths="); - ApkAssets[] assets = context.getResources().getAssets().getApkAssets(); - for (ApkAssets a : assets) { - Log.d(TAG, " " + a.getDebugName()); - } } } diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/DeadZone.java b/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/DeadZone.java index 9305d0518732..488b7eaf126f 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/DeadZone.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/DeadZone.java @@ -46,7 +46,7 @@ public class DeadZone { public static final int HORIZONTAL = 0; // Consume taps along the top edge. public static final int VERTICAL = 1; // Consume taps along the left edge. - private static final boolean CHATTY = true; // print to logcat when we eat a click + private static final boolean CHATTY = false; // print to logcat when we eat a click private static final FloatProperty FLASH_PROPERTY = new FloatProperty("DeadZoneFlash") { diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/KeyButtonView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/KeyButtonView.java index 622f5a279a5f..922174df7f67 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/KeyButtonView.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/KeyButtonView.java @@ -421,7 +421,7 @@ private void sendEvent(int action, int flags, long when) { final KeyEvent ev = new KeyEvent(mDownTime, when, action, mCode, repeatCount, 0, KeyCharacterMap.VIRTUAL_KEYBOARD, 0, flags | KeyEvent.FLAG_FROM_SYSTEM | KeyEvent.FLAG_VIRTUAL_HARD_KEY, - InputDevice.SOURCE_KEYBOARD); + InputDevice.SOURCE_NAVIGATION_BAR); int displayId = INVALID_DISPLAY; diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java b/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java index ea41fe74f798..d6fc05d6f699 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java @@ -22,6 +22,7 @@ import android.app.ActivityManager; import android.content.ComponentName; import android.content.Context; +import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.content.res.Configuration; @@ -32,13 +33,21 @@ import android.graphics.Rect; import android.graphics.Region; import android.hardware.input.InputManager; +import android.os.AsyncTask; +import android.os.Bundle; +import android.os.Handler; import android.os.Looper; import android.os.RemoteException; import android.os.SystemClock; import android.os.SystemProperties; import android.os.Trace; +import android.os.Vibrator; +import android.os.VibrationEffect; import android.provider.DeviceConfig; import android.util.DisplayMetrics; +import android.os.UserHandle; +import android.provider.Settings; +import android.text.TextUtils; import android.util.Log; import android.util.TypedValue; import android.view.Choreographer; @@ -55,6 +64,8 @@ import android.view.WindowManager; import android.view.WindowMetrics; +import com.android.internal.util.hwkeys.ActionUtils; +import com.android.internal.util.syberia.SyberiaUtils; import com.android.internal.config.sysui.SystemUiDeviceConfigFlags; import com.android.internal.policy.GestureNavigationSettingsObserver; import com.android.internal.util.LatencyTracker; @@ -223,6 +234,15 @@ public void onPropertiesChanged(DeviceConfig.Properties properties) { private boolean mInRejectedExclusion = false; private boolean mIsOnLeftEdge; + private int mTimeout = 2000; //ms + private int mLeftLongSwipeAction; + private int mRightLongSwipeAction; + private boolean mIsExtendedSwipe; + private int mLeftVerticalSwipeAction; + private int mRightVerticalSwipeAction; + private Handler mHandler; + private boolean mImeVisible; + private boolean mIsAttached; private boolean mIsGesturalModeEnabled; private boolean mIsEnabled; @@ -240,6 +260,11 @@ public void onPropertiesChanged(DeviceConfig.Properties properties) { private int mRightInset; private int mSysUiFlags; + private boolean mEdgeHapticEnabled; + private final Vibrator mVibrator; + + private int mEdgeHeight; + // For Tf-Lite model. private BackGestureTfClassifierProvider mBackGestureTfClassifierProvider; private Map mVocab; @@ -261,6 +286,10 @@ public void onPropertiesChanged(DeviceConfig.Properties properties) { new NavigationEdgeBackPlugin.BackCallback() { @Override public void triggerBack() { + if (mEdgeHapticEnabled) { + vibrateBack(true /* Click */); + } + // Notify FalsingManager that an intentional gesture has occurred. // TODO(b/186519446): use a different method than isFalseTouch mFalsingManager.isFalseTouch(BACK_GESTURE); @@ -283,6 +312,7 @@ public void triggerBack() { @Override public void cancelBack() { + // called by MotionEvent.ACTION_CANCEL and MotionEvent.ACTION_UP from EdgePanel callback logGesture(SysUiStatsLog.BACK_GESTURE__TYPE__INCOMPLETE); mOverviewProxyService.notifyBackAction(false, (int) mDownPoint.x, (int) mDownPoint.y, false /* isButton */, !mIsOnLeftEdge); @@ -297,6 +327,7 @@ public void onSystemUiStateChanged(int sysUiFlags) { } }; + private boolean mBlockedGesturalNavigation; EdgeBackGestureHandler(Context context, OverviewProxyService overviewProxyService, SysUiState sysUiState, PluginManager pluginManager, @Main Executor executor, @@ -306,6 +337,7 @@ public void onSystemUiStateChanged(int sysUiFlags) { FalsingManager falsingManager, LatencyTracker latencyTracker) { super(broadcastDispatcher); mContext = context; + mVibrator = context.getSystemService(Vibrator.class); mDisplayId = context.getDisplayId(); mMainExecutor = executor; mOverviewProxyService = overviewProxyService; @@ -351,9 +383,32 @@ public void onSystemUiStateChanged(int sysUiFlags) { mGestureNavigationSettingsObserver = new GestureNavigationSettingsObserver( mContext.getMainThreadHandler(), mContext, this::onNavigationSettingsChanged); + mHandler = new Handler(); updateCurrentUserResources(); } + private void updateEdgeHeightValue() { + if (mDisplaySize == null) { + return; + } + int edgeHeightSetting = Settings.System.getIntForUser(mContext.getContentResolver(), + Settings.System.BACK_GESTURE_HEIGHT, 0, UserHandle.USER_CURRENT); + // edgeHeigthSettings cant be range 0 - 3 + // 0 means full height + // 1 measns half of the screen + // 2 means lower third of the screen + // 3 means lower sicth of the screen + if (edgeHeightSetting == 0) { + mEdgeHeight = mDisplaySize.y; + } else if (edgeHeightSetting == 1) { + mEdgeHeight = mDisplaySize.y / 2; + } else if (edgeHeightSetting == 2) { + mEdgeHeight = mDisplaySize.y / 3; + } else { + mEdgeHeight = mDisplaySize.y / 6; + } + } + public void setStateChangeCallback(Runnable callback) { mStateChangeCallback = callback; } @@ -362,9 +417,20 @@ public void updateCurrentUserResources() { Resources res = mNavigationModeController.getCurrentUserContext().getResources(); mEdgeWidthLeft = mGestureNavigationSettingsObserver.getLeftSensitivity(res); mEdgeWidthRight = mGestureNavigationSettingsObserver.getRightSensitivity(res); + mEdgeHapticEnabled = mGestureNavigationSettingsObserver.getEdgeHaptic(); mIsBackGestureAllowed = !mGestureNavigationSettingsObserver.areNavigationButtonForcedVisible(); + mTimeout = mGestureNavigationSettingsObserver.getLongSwipeTimeOut(); + mLeftLongSwipeAction = mGestureNavigationSettingsObserver.getLeftLongSwipeAction(); + mRightLongSwipeAction = mGestureNavigationSettingsObserver.getRightLongSwipeAction(); + mIsExtendedSwipe = mGestureNavigationSettingsObserver.getIsExtendedSwipe(); + mLeftVerticalSwipeAction = mGestureNavigationSettingsObserver.getLeftLSwipeAction(); + mRightVerticalSwipeAction = mGestureNavigationSettingsObserver.getRightLSwipeAction(); + if (mEdgeBackPlugin != null) { + mEdgeBackPlugin.setLongSwipeEnabled(mIsExtendedSwipe); + } + final DisplayMetrics dm = res.getDisplayMetrics(); final float defaultGestureHeight = res.getDimension( com.android.internal.R.dimen.navigation_bar_gesture_height) / dm.density; @@ -438,10 +504,24 @@ public void onNavigationModeChanged(int mode) { updateCurrentUserResources(); } + private void vibrateBack(boolean light) { + AsyncTask.execute(() -> + mVibrator.vibrate(VibrationEffect.get(light ? VibrationEffect.EFFECT_CLICK : + VibrationEffect.EFFECT_HEAVY_CLICK, true /* fallback */))); + } + + public void onSettingsChanged() { + updateEdgeHeightValue(); + } + public void onNavBarTransientStateChanged(boolean isTransient) { mIsNavBarShownTransiently = isTransient; } + public void setBlockedGesturalNavigation(boolean blocked) { + mBlockedGesturalNavigation = blocked; + } + private void disposeInputChannel() { if (mInputEventReceiver != null) { mInputEventReceiver.dispose(); @@ -504,7 +584,11 @@ private void updateIsEnabled() { "edge-swipe", mDisplayId); mInputEventReceiver = new InputChannelCompat.InputEventReceiver( mInputMonitor.getInputChannel(), Looper.getMainLooper(), - Choreographer.getInstance(), this::onInputEvent); + Choreographer.getInstance(), event -> { + if (!mBlockedGesturalNavigation) { + onInputEvent(event); + } + }); // Add a nav bar panel window setEdgeBackPlugin( @@ -533,6 +617,7 @@ private void setEdgeBackPlugin(NavigationEdgeBackPlugin edgeBackPlugin) { mEdgeBackPlugin = edgeBackPlugin; mEdgeBackPlugin.setBackCallback(mBackCallback); mEdgeBackPlugin.setLayoutParams(createLayoutParams()); + mEdgeBackPlugin.setLongSwipeEnabled(mIsExtendedSwipe); updateDisplaySize(); } @@ -639,6 +724,11 @@ private boolean isWithinInsets(int x, int y) { if (y >= (mDisplaySize.y - mBottomGestureHeight)) { return false; } + if (mEdgeHeight != 0) { + if (y < (mDisplaySize.y - mBottomGestureHeight - mEdgeHeight)) { + return false; + } + } // If the point is way too far (twice the margin), it is // not interesting to us for logging purposes, nor we // should process it. Simply return false and keep @@ -690,7 +780,19 @@ private boolean isWithinTouchRegion(int x, int y) { return withinRange; } - if (mExcludeRegion.contains(x, y)) { + /* If Launcher is showing and wants to block back gesture, let's still trigger our custom + swipe actions at the very bottom of the screen, because we are cool.*/ + boolean isInExcludedRegion = false; + // still block extended swipe if keyboard is showing, to avoid conflicts with IME gestures + if (!mImeVisible && ( + mIsExtendedSwipe + || (mLeftLongSwipeAction != 0 && mIsOnLeftEdge) || (mRightLongSwipeAction != 0 && !mIsOnLeftEdge))) { + isInExcludedRegion= mExcludeRegion.contains(x, y) + && y < ((mDisplaySize.y / 4) * 3); + } else { + isInExcludedRegion= mExcludeRegion.contains(x, y); + } + if (isInExcludedRegion) { if (withinRange) { // Log as exclusion only if it is in acceptable range in the first place. mOverviewProxyService.notifyBackAction( @@ -709,8 +811,13 @@ private boolean isWithinTouchRegion(int x, int y) { return withinRange; } + public void setImeVisible(boolean visible) { + mImeVisible = visible; + } + private void cancelGesture(MotionEvent ev) { // Send action cancel to reset all the touch events + mHandler.removeCallbacksAndMessages(null); mAllowGesture = false; mLogGesture = false; mInRejectedExclusion = false; @@ -779,6 +886,8 @@ private void onMotionEvent(MotionEvent ev) { mEdgeWidthLeft, mLeftInset, mEdgeWidthRight, mRightInset, mExcludeRegion)); } else if (mAllowGesture || mLogGesture) { if (!mThresholdCrossed) { + // mThresholdCrossed is true only after the first move event + // then other events will go straight to "forward touch" line mEndPoint.x = (int) ev.getX(); mEndPoint.y = (int) ev.getY(); if (action == MotionEvent.ACTION_POINTER_DOWN) { @@ -793,7 +902,8 @@ private void onMotionEvent(MotionEvent ev) { mLogGesture = false; return; } else if (action == MotionEvent.ACTION_MOVE) { - if ((ev.getEventTime() - ev.getDownTime()) > mLongPressTimeout) { + int elapsedTime = (int)(ev.getEventTime() - ev.getDownTime()); + if (elapsedTime > mLongPressTimeout) { if (mAllowGesture) { logGesture(SysUiStatsLog.BACK_GESTURE__TYPE__INCOMPLETE_LONG_PRESS); cancelGesture(ev); @@ -823,6 +933,12 @@ private void onMotionEvent(MotionEvent ev) { } else if (dx > dy && dx > mTouchSlop) { if (mAllowGesture) { mThresholdCrossed = true; + if (!mIsExtendedSwipe && ((mLeftLongSwipeAction != 0 && mIsOnLeftEdge) + || (mRightLongSwipeAction != 0 && !mIsOnLeftEdge))) { + mLongSwipeAction.setIsVertical(false); + mHandler.postDelayed(mLongSwipeAction, (mTimeout - elapsedTime)); + // mThresholdCrossed is now set to true so on next move event the handler won't get triggered again + } // Capture inputs mInputMonitor.pilferPointers(); mInputEventReceiver.setBatchingEnabled(true); @@ -833,6 +949,26 @@ private void onMotionEvent(MotionEvent ev) { } } + boolean isUp = action == MotionEvent.ACTION_UP; + boolean isCancel = action == MotionEvent.ACTION_CANCEL; + boolean isMove = action == MotionEvent.ACTION_MOVE; + if (isMove && mIsExtendedSwipe) { + float deltaX = Math.abs(ev.getX() - mDownPoint.x); + float deltaY = Math.abs(ev.getY() - mDownPoint.y); + // give priority to horizontal (X) swipe + if (deltaX > (int)((mDisplaySize.x / 4) * 2.5f)) { + mLongSwipeAction.setIsVertical(false); + mLongSwipeAction.run(); + } + if (deltaY > (mDisplaySize.y / 4)) { + mLongSwipeAction.setIsVertical(true); + mLongSwipeAction.run(); + } + } + if (isUp || isCancel) { + mHandler.removeCallbacksAndMessages(null); + } + if (mAllowGesture) { // forward touch mEdgeBackPlugin.onMotionEvent(ev); @@ -842,6 +978,108 @@ private void onMotionEvent(MotionEvent ev) { mProtoTracer.scheduleFrameUpdate(); } + private SwipeRunnable mLongSwipeAction = new SwipeRunnable(); + private class SwipeRunnable implements Runnable { + private boolean mIsVertical; + + public void setIsVertical(boolean vertical) { + mIsVertical = vertical; + } + + @Override + public void run() { + triggerAction(mIsVertical); + } + } + + private void prepareForAction() { + // cancel touch event then trigger the action + final long now = SystemClock.uptimeMillis(); + final MotionEvent ev = MotionEvent.obtain(now, now, + MotionEvent.ACTION_CANCEL, 0.0f, 0.0f, 0); + cancelGesture(ev); + if (mEdgeHapticEnabled) { + vibrateBack(false /* HEAVY_CLICK */); + } + } + + private void triggerAction(boolean isVertical) { + int action = mIsOnLeftEdge ? (isVertical ? mLeftVerticalSwipeAction : mLeftLongSwipeAction) + : (isVertical ? mRightVerticalSwipeAction : mRightLongSwipeAction); + + if (action == 0) return; + + prepareForAction(); + + switch (action) { + case 0: // No action + default: + break; + case 1: // Voice search + ActionUtils.launchVoiceSearch(mContext); + break; + case 2: // Camera + ActionUtils.launchCamera(mContext); + break; + case 3: // Flashlight + ActionUtils.toggleCameraFlash(); + break; + case 4: // Application + launchApp(mContext, mIsOnLeftEdge, isVertical); + break; + case 5: // Volume panel + ActionUtils.toggleVolumePanel(mContext); + break; + case 6: // Screen off + ActionUtils.switchScreenOff(mContext); + break; + case 7: // Screenshot + SyberiaUtils.takeScreenshot(true); + break; + case 8: // Notification panel + ActionUtils.toggleNotifications(); + break; + case 9: // QS panel + ActionUtils.toggleQsPanel(); + break; + case 10: // Clear notifications + ActionUtils.clearAllNotifications(); + break; + case 11: // Ringer modes + ActionUtils.toggleRingerModes(mContext); + break; + case 12: // Kill app + SyberiaUtils.killForegroundApp(); + break; + case 13: // Switch recent app + ActionUtils.switchToLastApp(mContext); + break; + } + } + + private void launchApp(Context context, boolean leftEdgeApp, boolean isVerticalSwipe) { + Intent intent = null; + String packageName = Settings.System.getStringForUser(context.getContentResolver(), + leftEdgeApp ? (isVerticalSwipe ? Settings.System.LEFT_VERTICAL_BACK_SWIPE_APP_ACTION : Settings.System.LEFT_LONG_BACK_SWIPE_APP_ACTION) + : (isVerticalSwipe ? Settings.System.RIGHT_VERTICAL_BACK_SWIPE_APP_ACTION : Settings.System.RIGHT_LONG_BACK_SWIPE_APP_ACTION), + UserHandle.USER_CURRENT); + String activity = Settings.System.getStringForUser(context.getContentResolver(), + leftEdgeApp ? (isVerticalSwipe ? Settings.System.LEFT_VERTICAL_BACK_SWIPE_APP_ACTIVITY_ACTION : Settings.System.LEFT_LONG_BACK_SWIPE_APP_ACTIVITY_ACTION) + : (isVerticalSwipe ? Settings.System.RIGHT_VERTICAL_BACK_SWIPE_APP_ACTIVITY_ACTION : Settings.System.RIGHT_LONG_BACK_SWIPE_APP_ACTIVITY_ACTION), + UserHandle.USER_CURRENT); + boolean launchActivity = activity != null && !TextUtils.equals("NONE", activity); + try { + if (launchActivity) { + intent = new Intent(Intent.ACTION_MAIN); + intent.setClassName(packageName, activity); + } else { + intent = context.getPackageManager().getLaunchIntentForPackage(packageName); + } + intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); + context.startActivity(intent); + } catch (Exception e) {} + } + private void updateDisabledForQuickstep(Configuration newConfig) { int rotation = newConfig.windowConfiguration.getRotation(); mDisabledForQuickstep = mStartingQuickstepRotation > -1 && @@ -869,6 +1107,7 @@ private void updateDisplaySize() { if (mEdgeBackPlugin != null) { mEdgeBackPlugin.setDisplaySize(mDisplaySize); } + updateEdgeHeightValue(); } private boolean sendEvent(int action, int code) { @@ -876,7 +1115,7 @@ private boolean sendEvent(int action, int code) { final KeyEvent ev = new KeyEvent(when, when, action, code, 0 /* repeat */, 0 /* metaState */, KeyCharacterMap.VIRTUAL_KEYBOARD, 0 /* scancode */, KeyEvent.FLAG_FROM_SYSTEM | KeyEvent.FLAG_VIRTUAL_HARD_KEY, - InputDevice.SOURCE_KEYBOARD); + InputDevice.SOURCE_NAVIGATION_BAR); ev.setDisplayId(mContext.getDisplay().getDisplayId()); return InputManager.getInstance() diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/NavigationBarEdgePanel.java b/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/NavigationBarEdgePanel.java index eba9d3fdcab8..bcc8f5a42a2d 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/NavigationBarEdgePanel.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/NavigationBarEdgePanel.java @@ -58,7 +58,7 @@ import com.android.systemui.animation.Interpolators; import com.android.systemui.plugins.NavigationEdgeBackPlugin; import com.android.systemui.shared.navigationbar.RegionSamplingHelper; -import com.android.systemui.statusbar.VibratorHelper; +//import com.android.systemui.statusbar.VibratorHelper; import com.android.wm.shell.back.BackAnimation; import java.io.PrintWriter; @@ -138,7 +138,7 @@ public class NavigationBarEdgePanel extends View implements NavigationEdgeBackPl = new PathInterpolator(1.0f / RUBBER_BAND_AMOUNT_APPEAR, 1.0f, 1.0f, 1.0f); private final WindowManager mWindowManager; - private final VibratorHelper mVibratorHelper; +// private final VibratorHelper mVibratorHelper; /** * The paint the arrow is drawn with @@ -153,6 +153,9 @@ public class NavigationBarEdgePanel extends View implements NavigationEdgeBackPl private final float mBaseTranslation; private final float mArrowLength; private final float mArrowThickness; + private float mLongSwipeThreshold; + private boolean mAlmostLongSwipe; + private boolean mIsExtendedSwipe; /** * The minimum delta needed in movement for the arrow to change direction / stop triggering back @@ -291,7 +294,7 @@ public NavigationBarEdgePanel(Context context, mWindowManager = context.getSystemService(WindowManager.class); mBackAnimation = backAnimation; - mVibratorHelper = Dependency.get(VibratorHelper.class); +// mVibratorHelper = Dependency.get(VibratorHelper.class); mDensity = context.getResources().getDisplayMetrics().density; @@ -496,6 +499,7 @@ public void onMotionEvent(MotionEvent event) { mVelocityTracker.addMovement(event); switch (event.getActionMasked()) { case MotionEvent.ACTION_DOWN: + mAlmostLongSwipe = false; mDragSlopPassed = false; resetOnDown(); mStartX = event.getX(); @@ -555,6 +559,9 @@ protected void onDraw(Canvas canvas) { float x = (polarToCartX(mCurrentAngle) * mArrowLength); float y = (polarToCartY(mCurrentAngle) * mArrowLength); Path arrowPath = calculatePath(x,y); + if (mAlmostLongSwipe) { + arrowPath.addPath(calculatePath(x,y), mArrowThickness * 2.0f * (mIsLeftPanel ? 1 : -1), 0.0f); + } if (mShowProtection) { canvas.drawPath(arrowPath, mProtectionPaint); } @@ -579,6 +586,7 @@ private void loadDimens() { mArrowPaddingEnd = res.getDimensionPixelSize(R.dimen.navigation_edge_panel_padding); mMinArrowPosition = res.getDimensionPixelSize(R.dimen.navigation_edge_arrow_min_y); mFingerOffset = res.getDimensionPixelSize(R.dimen.navigation_edge_finger_offset); + mLongSwipeThreshold = mDisplaySize.x * 0.45f; } private void updateArrowDirection() { @@ -661,11 +669,11 @@ private void triggerBack() { } mVelocityTracker.computeCurrentVelocity(1000); // Only do the extra translation if we're not already flinging - boolean isSlow = Math.abs(mVelocityTracker.getXVelocity()) < 500; - if (isSlow - || SystemClock.uptimeMillis() - mVibrationTime >= GESTURE_DURATION_FOR_CLICK_MS) { - mVibratorHelper.vibrate(VibrationEffect.EFFECT_CLICK); - } +// boolean isSlow = Math.abs(mVelocityTracker.getXVelocity()) < 500; +// if (isSlow +// || SystemClock.uptimeMillis() - mVibrationTime >= GESTURE_DURATION_FOR_CLICK_MS) { +// mVibratorHelper.vibrate(VibrationEffect.EFFECT_CLICK); +// } // Let's also snap the angle a bit if (mAngleOffset > -4) { @@ -746,6 +754,7 @@ private void handleMoveEvent(MotionEvent event) { float x = event.getX(); float y = event.getY(); float touchTranslation = MathUtils.abs(x - mStartX); + mAlmostLongSwipe = mIsExtendedSwipe && (touchTranslation > mLongSwipeThreshold); float yOffset = y - mStartY; float delta = touchTranslation - mPreviousTouchTranslation; if (Math.abs(delta) > 0) { @@ -760,8 +769,8 @@ private void handleMoveEvent(MotionEvent event) { // Apply a haptic on drag slop passed if (!mDragSlopPassed && touchTranslation > mSwipeTriggerThreshold) { mDragSlopPassed = true; - mVibratorHelper.vibrate(VibrationEffect.EFFECT_TICK); - mVibrationTime = SystemClock.uptimeMillis(); +// mVibratorHelper.vibrate(VibrationEffect.EFFECT_TICK); +// mVibrationTime = SystemClock.uptimeMillis(); // Let's show the arrow and animate it in! mDisappearAmount = 0.0f; @@ -960,4 +969,9 @@ public void dump(PrintWriter pw) { pw.println(" mTranslationAnimation running=" + mTranslationAnimation.isRunning()); mRegionSamplingHelper.dump(pw); } + + @Override + public void setLongSwipeEnabled(boolean enabled) { + mIsExtendedSwipe = enabled; + } } diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java index 67dae9e7a0ea..4a1f63e0fede 100644 --- a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java +++ b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java @@ -62,7 +62,7 @@ public class PowerUI extends CoreStartable implements CommandQueue.Callbacks { static final String TAG = "PowerUI"; - static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG); + static final boolean DEBUG = false; private static final long TEMPERATURE_INTERVAL = 30 * DateUtils.SECOND_IN_MILLIS; private static final long TEMPERATURE_LOGGING_INTERVAL = DateUtils.HOUR_IN_MILLIS; private static final int MAX_RECENT_TEMPS = 125; // TEMPERATURE_LOGGING_INTERVAL plus a buffer @@ -425,9 +425,11 @@ void maybeShowHybridWarning(BatteryStateSnapshot currentSnapshot, boolean shouldShowHybridWarning(BatteryStateSnapshot snapshot) { if (snapshot.getPlugged() || snapshot.getBatteryStatus() == BatteryManager.BATTERY_STATUS_UNKNOWN) { - Slog.d(TAG, "can't show warning due to - plugged: " + snapshot.getPlugged() - + " status unknown: " - + (snapshot.getBatteryStatus() == BatteryManager.BATTERY_STATUS_UNKNOWN)); + if (DEBUG) { + Slog.d(TAG, "can't show warning due to - plugged: " + snapshot.getPlugged() + + " status unknown: " + + (snapshot.getBatteryStatus() == BatteryManager.BATTERY_STATUS_UNKNOWN)); + } return false; } diff --git a/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt b/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt index 2a6ca1acb38e..b1a87364cfb9 100644 --- a/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt +++ b/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyChip.kt @@ -101,8 +101,8 @@ class OngoingPrivacyChip @JvmOverloads constructor( .getDimensionPixelSize(R.dimen.ongoing_appops_chip_icon_margin) iconSize = context.resources .getDimensionPixelSize(R.dimen.ongoing_appops_chip_icon_size) - iconColor = - Utils.getColorAttrDefaultColor(context, com.android.internal.R.attr.colorPrimary) + iconColor = context.resources + .getColor(android.R.color.system_neutral1_900) val padding = context.resources .getDimensionPixelSize(R.dimen.ongoing_appops_chip_side_padding) diff --git a/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java b/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java index ce50ddff7b0f..bd9d51103aa9 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java +++ b/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java @@ -122,12 +122,15 @@ public void restoreInstanceState(Bundle savedInstanceState) { @Override public int getTilesHeight() { - // Use the first page as that is the maximum height we need to show. - TileLayout tileLayout = mPages.get(0); - if (tileLayout == null) { - return 0; + // Find the maximum height among all pages. + int height = 0; + for (TileLayout tileLayout: mPages) { + if (tileLayout != null) { + height = Math.max(height, tileLayout.getTilesHeight()); + } } - return tileLayout.getTilesHeight(); + if (DEBUG) Log.d(TAG, "getTilesHeight ret=" + height); + return height; } @Override @@ -541,6 +544,21 @@ public int getNumTilesFirstPage() { return mPages.get(0).mRecords.size(); } + @Override + public int getResourceColumns() { + if (mPages.size() == 0) return TileLayout.NO_MAX_COLUMNS; + TileLayout currentPage = mPages.get(getCurrentPageNumber()); + return currentPage.getResourceColumns(); + } + + @Override + public void updateSettings() { + for (int i = 0; i < mPages.size(); i++) { + mPages.get(i).updateSettings(); + } + mDistributeTiles = true; + } + public void startTileReveal(Set tileSpecs, final Runnable postAnimation) { if (tileSpecs.isEmpty() || mPages.size() < 2 || getScrollX() != 0 || !beginFakeDrag()) { // Do not start the reveal animation unless there are tiles to animate, multiple diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java b/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java index 56298fa155fa..076257b95cde 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java @@ -47,6 +47,9 @@ import javax.inject.Inject; +import kotlin.Unit; +import kotlin.jvm.functions.Function1; + /** */ @QSScope public class QSAnimator implements Callback, PageListener, Listener, OnLayoutChangeListener, @@ -140,6 +143,11 @@ public class QSAnimator implements Callback, PageListener, Listener, OnLayoutCha private int[] mTmpLoc1 = new int[2]; private int[] mTmpLoc2 = new int[2]; + private final Function1 mMediaHostVisibilityListener = (visible) -> { + requestAnimatorUpdate(); + return null; + }; + @Inject public QSAnimator(QS qs, QuickQSPanel quickPanel, QuickStatusBarHeader quickStatusBarHeader, QSPanelController qsPanelController, @@ -213,12 +221,14 @@ private void updateQQSVisibility() { public void onViewAttachedToWindow(@Nullable View v) { mTunerService.addTunable(this, ALLOW_FANCY_ANIMATION, MOVE_FULL_ROWS); + mQuickQSPanelController.mMediaHost.addVisibilityChangeListener(mMediaHostVisibilityListener); } @Override public void onViewDetachedFromWindow(View v) { mHost.removeCallback(this); mTunerService.removeTunable(this); + mQuickQSPanelController.mMediaHost.removeVisibilityChangeListener(mMediaHostVisibilityListener); } @Override @@ -588,6 +598,12 @@ private Pair createSecondaryPageAnimator private void animateBrightnessSlider(Builder firstPageBuilder) { View qsBrightness = mQsPanelController.getBrightnessView(); View qqsBrightness = mQuickQSPanelController.getBrightnessView(); + + if (mTunerService.getValue(QSPanel.QS_SHOW_BRIGHTNESS_SLIDER, 1) == 0) { + qsBrightness.setVisibility(View.GONE); + qqsBrightness.setVisibility(View.GONE); + } + if (qqsBrightness != null && qqsBrightness.getVisibility() == View.VISIBLE) { // animating in split shade mode mAnimatedQsViews.add(qsBrightness); @@ -599,6 +615,8 @@ private void animateBrightnessSlider(Builder firstPageBuilder) { // portrait orientation before .addFloat(qsBrightness, "sliderScaleY", 0.3f, 1) .addFloat(qqsBrightness, "translationY", 0, translationY) + .setInterpolator(mQuickQSPanelController.mMediaHost.getVisible() ? + Interpolators.ALPHA_OUT : Interpolators.SLOWDOWN) .build(); } else if (qsBrightness != null) { firstPageBuilder.addFloat(qsBrightness, "translationY", diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java b/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java index 5d2060d8043e..7b1ddd62ec6e 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java @@ -139,12 +139,11 @@ public void disable(int state1, int state2, boolean animate) { void updateResources(QSPanelController qsPanelController, QuickStatusBarHeaderController quickStatusBarHeaderController) { - int bottomPadding = getResources().getDimensionPixelSize(R.dimen.qs_panel_padding_bottom); mQSPanelContainer.setPaddingRelative( mQSPanelContainer.getPaddingStart(), QSUtils.getQsHeaderSystemIconsAreaHeight(mContext), mQSPanelContainer.getPaddingEnd(), - bottomPadding); + mQSPanelContainer.getPaddingBottom()); int horizontalMargins = getResources().getDimensionPixelSize(R.dimen.qs_horizontal_margin); int horizontalPadding = getResources().getDimensionPixelSize( diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSFooterView.java b/packages/SystemUI/src/com/android/systemui/qs/QSFooterView.java index 61905ae00be8..24ce4b4e44d7 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSFooterView.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSFooterView.java @@ -85,20 +85,9 @@ protected void onFinishInflate() { private void setBuildText() { if (mBuildText == null) return; - if (DevelopmentSettingsEnabler.isDevelopmentSettingsEnabled(mContext)) { - mBuildText.setText(mContext.getString( - com.android.internal.R.string.bugreport_status, - Build.VERSION.RELEASE_OR_CODENAME, - Build.ID)); - // Set as selected for marquee before its made visible, then it won't be announced when - // it's made visible. - mBuildText.setSelected(true); - mShouldShowBuildText = true; - } else { - mBuildText.setText(null); - mShouldShowBuildText = false; - mBuildText.setSelected(false); - } + mBuildText.setText(null); + mShouldShowBuildText = false; + mBuildText.setSelected(false); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java index d03a2e55d628..88e3234caf2e 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java @@ -454,6 +454,7 @@ public QSPanelController getQSPanelController() { public void setBrightnessMirrorController( BrightnessMirrorController brightnessMirrorController) { mQSPanelController.setBrightnessMirror(brightnessMirrorController); + mQuickQSPanelController.setBrightnessMirror(brightnessMirrorController); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java index 41724ef62683..1a5983fc0b5e 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java @@ -18,6 +18,10 @@ import static com.android.systemui.util.Utils.useQsMediaPlayer; +import android.animation.Animator; +import android.animation.Animator.AnimatorListener; +import android.animation.AnimatorListenerAdapter; +import android.animation.ObjectAnimator; import android.annotation.NonNull; import android.annotation.Nullable; import android.content.Context; @@ -27,9 +31,19 @@ import android.os.Bundle; import android.os.Handler; import android.os.Message; +import android.os.UserHandle; +import android.provider.Settings; import android.util.ArrayMap; import android.util.AttributeSet; import android.util.Log; +import android.view.animation.AccelerateInterpolator; +import android.view.animation.AccelerateDecelerateInterpolator; +import android.view.animation.AnticipateInterpolator; +import android.view.animation.AnticipateOvershootInterpolator; +import android.view.animation.BounceInterpolator; +import android.view.animation.DecelerateInterpolator; +import android.view.animation.LinearInterpolator; +import android.view.animation.OvershootInterpolator; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; @@ -41,8 +55,10 @@ import com.android.internal.logging.UiEventLogger; import com.android.internal.widget.RemeasuringLinearLayout; +import com.android.systemui.Dependency; import com.android.systemui.R; import com.android.systemui.plugins.qs.QSTile; +import com.android.systemui.plugins.qs.QSTileView; import com.android.systemui.settings.brightness.BrightnessSliderController; import com.android.systemui.tuner.TunerService; import com.android.systemui.tuner.TunerService.Tunable; @@ -54,8 +70,16 @@ /** View that represents the quick settings tile panel (when expanded/pulled down). **/ public class QSPanel extends LinearLayout implements Tunable { - public static final String QS_SHOW_BRIGHTNESS = "qs_show_brightness"; - public static final String QS_SHOW_HEADER = "qs_show_header"; + public static final String QS_SHOW_AUTO_BRIGHTNESS = + Settings.Secure.QS_SHOW_AUTO_BRIGHTNESS; + public static final String QS_SHOW_BRIGHTNESS_SLIDER = + Settings.Secure.QS_SHOW_BRIGHTNESS_SLIDER; + public static final String QS_BRIGHTNESS_SLIDER_POSITION = + Settings.Secure.QS_BRIGHTNESS_SLIDER_POSITION; + public static final String QS_LAYOUT_COLUMNS = + "system:" + Settings.System.QS_LAYOUT_COLUMNS; + public static final String QS_LAYOUT_COLUMNS_LANDSCAPE = + "system:" + Settings.System.QS_LAYOUT_COLUMNS_LANDSCAPE; private static final String TAG = "QSPanel"; @@ -72,14 +96,21 @@ public class QSPanel extends LinearLayout implements Tunable { @Nullable protected View mBrightnessView; + protected View mAutoBrightnessView; + @Nullable protected BrightnessSliderController mToggleSliderController; + protected Runnable mBrightnessRunnable; + + protected boolean mTop; + /** Whether or not the QS media player feature is enabled. */ protected boolean mUsingMediaPlayer; protected boolean mExpanded; protected boolean mListening; + protected boolean mIsAutomaticBrightnessAvailable = false; @Nullable protected QSTileHost mHost; private final List mOnConfigurationChangedListeners = @@ -120,6 +151,11 @@ public QSPanel(Context context, AttributeSet attrs) { mMovableContentStartIndex = getChildCount(); + mIsAutomaticBrightnessAvailable = getResources().getBoolean( + com.android.internal.R.bool.config_automatic_brightness_available); + + TunerService tunerService = Dependency.get(TunerService.class); + mTop = tunerService.getValue(QS_BRIGHTNESS_SLIDER_POSITION, 0) == 0; } void initialize() { @@ -176,21 +212,28 @@ public void setBrightnessView(@NonNull View view) { removeView(mBrightnessView); mMovableContentStartIndex--; } - addView(view, 0); mBrightnessView = view; - - setBrightnessViewMargin(); - - mMovableContentStartIndex++; + mAutoBrightnessView = view.findViewById(R.id.brightness_icon); + setBrightnessViewMargin(mTop); + if (mBrightnessView != null) { + addView(mBrightnessView); + mMovableContentStartIndex++; + } } - private void setBrightnessViewMargin() { + private void setBrightnessViewMargin(boolean top) { if (mBrightnessView != null) { MarginLayoutParams lp = (MarginLayoutParams) mBrightnessView.getLayoutParams(); - lp.topMargin = mContext.getResources() - .getDimensionPixelSize(R.dimen.qs_brightness_margin_top); - lp.bottomMargin = mContext.getResources() - .getDimensionPixelSize(R.dimen.qs_brightness_margin_bottom); + if (top) { + lp.topMargin = mContext.getResources() + .getDimensionPixelSize(R.dimen.qs_top_brightness_margin_top); + lp.bottomMargin = mContext.getResources() + .getDimensionPixelSize(R.dimen.qs_top_brightness_margin_bottom); + } else { + lp.topMargin = mContext.getResources() + .getDimensionPixelSize(R.dimen.qs_bottom_brightness_margin_top); + lp.bottomMargin = 0; + } mBrightnessView.setLayoutParams(lp); } } @@ -305,13 +348,35 @@ protected String getDumpableTag() { @Override public void onTuningChanged(String key, String newValue) { - if (QS_SHOW_BRIGHTNESS.equals(key) && mBrightnessView != null) { - updateViewVisibilityForTuningValue(mBrightnessView, newValue); - } + switch (key) { + case QS_SHOW_BRIGHTNESS_SLIDER: + boolean value = + TunerService.parseInteger(newValue, 1) >= 1; + if (mBrightnessView != null) { + mBrightnessView.setVisibility(value ? VISIBLE : GONE); + } + break; + case QS_BRIGHTNESS_SLIDER_POSITION: + mTop = TunerService.parseInteger(newValue, 0) == 0; + updateBrightnessSliderPosition(); + break; + case QS_SHOW_AUTO_BRIGHTNESS: + if (mAutoBrightnessView != null) { + mAutoBrightnessView.setVisibility(mIsAutomaticBrightnessAvailable && + TunerService.parseIntegerSwitch(newValue, true) ? View.VISIBLE : View.GONE); + } + break; + case QS_LAYOUT_COLUMNS: + case QS_LAYOUT_COLUMNS_LANDSCAPE: + needsDynamicRowsAndColumns(); + break; + default: + break; + } } - private void updateViewVisibilityForTuningValue(View view, @Nullable String newValue) { - view.setVisibility(TunerService.parseIntegerSwitch(newValue, true) ? VISIBLE : GONE); + public void setBrightnessRunnable(Runnable runnable) { + mBrightnessRunnable = runnable; } @@ -352,7 +417,7 @@ public void updateResources() { updatePageIndicator(); - setBrightnessViewMargin(); + setBrightnessViewMargin(mTop); if (mTileLayout != null) { mTileLayout.updateResources(); @@ -362,11 +427,11 @@ public void updateResources() { protected void updatePadding() { final Resources res = mContext.getResources(); int paddingTop = res.getDimensionPixelSize(R.dimen.qs_panel_padding_top); - // Bottom padding only when there's a new footer with its height. + int paddingBottom = res.getDimensionPixelSize(R.dimen.qs_panel_padding_bottom); setPaddingRelative(getPaddingStart(), paddingTop, getPaddingEnd(), - getPaddingBottom()); + paddingBottom); } void addOnConfigurationChangedListener(OnConfigurationChangedListener listener) { @@ -382,6 +447,7 @@ protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); mOnConfigurationChangedListeners.forEach( listener -> listener.onConfigurationChange(newConfig)); + needsDynamicRowsAndColumns(); } @Override @@ -415,17 +481,31 @@ protected boolean mediaNeedsTopMargin() { return false; } - private boolean needsDynamicRowsAndColumns() { - return true; + public void needsDynamicRowsAndColumns() { + if (mTileLayout != null) { + int columns = mTileLayout.getResourceColumns(); + mTileLayout.setMinRows(mUsingHorizontalLayout ? 2 : 1); + mTileLayout.setMaxColumns(columns > 3 && mUsingHorizontalLayout ? columns / 2 : columns); + } } private void switchAllContentToParent(ViewGroup parent, QSTileLayout newLayout) { int index = parent == this ? mMovableContentStartIndex : 0; + if (mBrightnessView != null && mTop) { + switchToParent(mBrightnessView, parent, index); + index++; + } + // Let's first move the tileLayout to the new parent, since that should come first. switchToParent((View) newLayout, parent, index); index++; + if (mBrightnessView != null && !mTop) { + switchToParent(mBrightnessView, parent, index); + index++; + } + if (mFooter != null) { // Then the footer with the settings switchToParent(mFooter, parent, index); @@ -522,6 +602,7 @@ public void onStateChanged(QSTile.State state) { if (mTileLayout != null) { mTileLayout.addTile(tileRecord); + tileClickListener(tileRecord.tile, tileRecord.tileView); } } @@ -592,12 +673,14 @@ void setUsingHorizontalLayout(boolean horizontal, ViewGroup mediaHostView, boole mUsingHorizontalLayout = horizontal; ViewGroup newParent = horizontal ? mHorizontalContentContainer : this; switchAllContentToParent(newParent, mTileLayout); - reAttachMediaHost(mediaHostView, horizontal); - if (needsDynamicRowsAndColumns()) { - mTileLayout.setMinRows(horizontal ? 2 : 1); - mTileLayout.setMaxColumns(horizontal ? 2 : 4); + if (mBrightnessRunnable != null) { + updateResources(); + mBrightnessRunnable.run(); } + reAttachMediaHost(mediaHostView, horizontal); + needsDynamicRowsAndColumns(); updateMargins(mediaHostView); + if (mHorizontalLinearLayout == null) return; mHorizontalLinearLayout.setVisibility(horizontal ? View.VISIBLE : View.GONE); } } @@ -643,6 +726,16 @@ public void setCollapseExpandAction(Runnable action) { mCollapseExpandAction = action; } + protected void updateBrightnessSliderPosition() { + if (mBrightnessView == null) return; + ViewGroup newParent = mUsingHorizontalLayout ? mHorizontalContentContainer : this; + switchAllContentToParent(newParent, mTileLayout); + if (mBrightnessRunnable != null) { + updateResources(); + mBrightnessRunnable.run(); + } + } + private class H extends Handler { private static final int ANNOUNCE_FOR_ACCESSIBILITY = 1; @@ -713,12 +806,76 @@ default boolean setMaxColumns(int maxColumns) { default void setExpansion(float expansion, float proposedTranslation) {} int getNumVisibleTiles(); + + int getResourceColumns(); + + void updateSettings(); } interface OnConfigurationChangedListener { void onConfigurationChange(Configuration newConfig); } + private void setAnimationTile(QSTileView v) { + ObjectAnimator animTile = null; + int animStyle = Settings.System.getIntForUser(mContext.getContentResolver(), + Settings.System.ANIM_TILE_STYLE, 0, UserHandle.USER_CURRENT); + int animDuration = Settings.System.getIntForUser(mContext.getContentResolver(), + Settings.System.ANIM_TILE_DURATION, 2000, UserHandle.USER_CURRENT); + int interpolatorType = Settings.System.getIntForUser(mContext.getContentResolver(), + Settings.System.ANIM_TILE_INTERPOLATOR, 0, UserHandle.USER_CURRENT); + if (animStyle == 0) { + //No animation + } + if (animStyle == 1) { + animTile = ObjectAnimator.ofFloat(v, "rotationY", 0f, 360f); + } + if (animStyle == 2) { + animTile = ObjectAnimator.ofFloat(v, "rotation", 0f, 360f); + } + if (animTile != null) { + switch (interpolatorType) { + case 0: + animTile.setInterpolator(new LinearInterpolator()); + break; + case 1: + animTile.setInterpolator(new AccelerateInterpolator()); + break; + case 2: + animTile.setInterpolator(new DecelerateInterpolator()); + break; + case 3: + animTile.setInterpolator(new AccelerateDecelerateInterpolator()); + break; + case 4: + animTile.setInterpolator(new BounceInterpolator()); + break; + case 5: + animTile.setInterpolator(new OvershootInterpolator()); + break; + case 6: + animTile.setInterpolator(new AnticipateInterpolator()); + break; + case 7: + animTile.setInterpolator(new AnticipateOvershootInterpolator()); + break; + default: + break; + } + animTile.setDuration(animDuration); + animTile.start(); + } + } + + private void tileClickListener(QSTile t, QSTileView v) { + if (mTileLayout != null) { + v.setOnClickListener(view -> { + t.click(view); + setAnimationTile(v); + }); + } + } + @VisibleForTesting static void switchToParent(View child, ViewGroup parent, int index, String tag) { if (parent == null) { diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java index 918c6be582e7..121f0b4ee1fe 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java @@ -18,7 +18,6 @@ import static com.android.systemui.classifier.Classifier.QS_SWIPE; import static com.android.systemui.media.dagger.MediaModule.QS_PANEL; -import static com.android.systemui.qs.QSPanel.QS_SHOW_BRIGHTNESS; import static com.android.systemui.qs.dagger.QSFragmentModule.QS_USING_MEDIA_PLAYER; import android.content.res.Configuration; @@ -60,6 +59,7 @@ public class QSPanelController extends QSPanelControllerBase { private final BrightnessSliderController mBrightnessSliderController; private final BrightnessMirrorHandler mBrightnessMirrorHandler; private final StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; + private BrightnessMirrorController mBrightnessMirrorController; private boolean mGridContentVisible = true; @@ -96,7 +96,7 @@ public boolean onTouch(View v, MotionEvent event) { FalsingManager falsingManager, StatusBarKeyguardViewManager statusBarKeyguardViewManager) { super(view, qstileHost, qsCustomizerController, usingMediaPlayer, mediaHost, - metricsLogger, uiEventLogger, qsLogger, dumpManager); + metricsLogger, uiEventLogger, qsLogger, dumpManager, tunerService); mTunerService = tunerService; mQsCustomizerController = qsCustomizerController; mQsTileRevealControllerFactory = qsTileRevealControllerFactory; @@ -126,7 +126,17 @@ protected void onViewAttached() { updateMediaDisappearParameters(); - mTunerService.addTunable(mView, QS_SHOW_BRIGHTNESS); + mTunerService.addTunable(mView, QSPanel.QS_SHOW_BRIGHTNESS_SLIDER); + mTunerService.addTunable(mView, QSPanel.QS_SHOW_AUTO_BRIGHTNESS); + mTunerService.addTunable(mView, QSPanel.QS_BRIGHTNESS_SLIDER_POSITION); + mTunerService.addTunable(mView, QSPanel.QS_LAYOUT_COLUMNS); + mTunerService.addTunable(mView, QSPanel.QS_LAYOUT_COLUMNS_LANDSCAPE); + + mView.setBrightnessRunnable(() -> { + mView.updateResources(); + updateBrightnessMirror(); + }); + mView.updateResources(); if (mView.isListening()) { refreshAllTiles(); @@ -148,11 +158,18 @@ protected QSTileRevealController createTileRevealController() { @Override protected void onViewDetached() { mTunerService.removeTunable(mView); + mView.setBrightnessRunnable(null); mView.removeOnConfigurationChangedListener(mOnConfigurationChangedListener); mBrightnessMirrorHandler.onQsPanelDettached(); super.onViewDetached(); } + private void updateBrightnessMirror() { + if (mBrightnessMirrorController != null) { + mBrightnessSliderController.setMirrorControllerAndMirror(mBrightnessMirrorController); + } + } + /** */ public void setVisibility(int visibility) { mView.setVisibility(visibility); @@ -172,6 +189,7 @@ public void setListening(boolean listening, boolean expanded) { } public void setBrightnessMirror(BrightnessMirrorController brightnessMirrorController) { + mBrightnessMirrorController = brightnessMirrorController; mBrightnessMirrorHandler.setController(brightnessMirrorController); } diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanelControllerBase.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanelControllerBase.java index ec61ea6fffa8..e4567928cdec 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSPanelControllerBase.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanelControllerBase.java @@ -24,6 +24,7 @@ import android.content.ComponentName; import android.content.res.Configuration; import android.metrics.LogMaker; +import android.provider.Settings; import android.view.View; import com.android.internal.annotations.VisibleForTesting; @@ -37,6 +38,7 @@ import com.android.systemui.qs.customize.QSCustomizerController; import com.android.systemui.qs.external.CustomTile; import com.android.systemui.qs.logging.QSLogger; +import com.android.systemui.tuner.TunerService; import com.android.systemui.util.LargeScreenUtils; import com.android.systemui.util.ViewController; import com.android.systemui.util.animation.DisappearParameters; @@ -59,7 +61,17 @@ * @param Type of QSPanel. */ public abstract class QSPanelControllerBase extends ViewController - implements Dumpable{ + implements Dumpable, TunerService.Tunable { + + private static final String QS_TILE_VERTICAL_LAYOUT = + "system:" + Settings.System.QS_TILE_VERTICAL_LAYOUT; + private static final String QS_LAYOUT_COLUMNS = + "system:" + Settings.System.QS_LAYOUT_COLUMNS; + private static final String QS_LAYOUT_COLUMNS_LANDSCAPE = + "system:" + Settings.System.QS_LAYOUT_COLUMNS_LANDSCAPE; + private static final String QS_TILE_LABEL_HIDE = + "system:" + Settings.System.QS_TILE_LABEL_HIDE; + protected final QSTileHost mHost; private final QSCustomizerController mQsCustomizerController; private final boolean mUsingMediaPlayer; @@ -68,6 +80,7 @@ public abstract class QSPanelControllerBase extends ViewContr private final UiEventLogger mUiEventLogger; private final QSLogger mQSLogger; private final DumpManager mDumpManager; + private final TunerService mTunerService; protected final ArrayList mRecords = new ArrayList<>(); protected boolean mShouldUseSplitNotificationShade; @@ -93,6 +106,10 @@ public void onConfigurationChange(Configuration newConfig) { mLastOrientation = newConfig.orientation; switchTileLayout(false); } + if (mView.getTileLayout() != null) { + mView.getTileLayout().updateSettings(); + setTiles(); + } } }; @@ -120,7 +137,8 @@ protected QSPanelControllerBase( MetricsLogger metricsLogger, UiEventLogger uiEventLogger, QSLogger qsLogger, - DumpManager dumpManager + DumpManager dumpManager, + TunerService tunerService ) { super(view); mHost = host; @@ -131,6 +149,7 @@ protected QSPanelControllerBase( mUiEventLogger = uiEventLogger; mQSLogger = qsLogger; mDumpManager = dumpManager; + mTunerService = tunerService; mShouldUseSplitNotificationShade = LargeScreenUtils.shouldUseSplitNotificationShade(getResources()); } @@ -167,10 +186,17 @@ protected void onViewAttached() { switchTileLayout(true); mDumpManager.registerDumpable(mView.getDumpableTag(), this); + + mTunerService.addTunable(this, QS_TILE_VERTICAL_LAYOUT); + mTunerService.addTunable(this, QS_LAYOUT_COLUMNS); + mTunerService.addTunable(this, QS_LAYOUT_COLUMNS_LANDSCAPE); + mTunerService.addTunable(this, QS_TILE_LABEL_HIDE); } @Override protected void onViewDetached() { + mTunerService.removeTunable(mView); + mView.removeOnConfigurationChangedListener(mOnConfigurationChangedListener); mHost.removeCallback(mQSHostCallback); @@ -446,6 +472,23 @@ public void setIsOnKeyguard(boolean isOnKeyguard) { mView.setShouldMoveMediaOnExpansion(!isOnSplitShadeLockscreen); } + @Override + public void onTuningChanged(String key, String newValue) { + switch (key) { + case QS_TILE_VERTICAL_LAYOUT: + case QS_LAYOUT_COLUMNS: + case QS_LAYOUT_COLUMNS_LANDSCAPE: + case QS_TILE_LABEL_HIDE: + if (mView.getTileLayout() != null) { + mView.getTileLayout().updateSettings(); + setTiles(); + } + break; + default: + break; + } + } + /** */ public static final class TileRecord { public TileRecord(QSTile tile, com.android.systemui.plugins.qs.QSTileView tileView) { diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java b/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java index fbdabc74aba4..fcd9e10089bc 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java @@ -19,8 +19,6 @@ import android.content.Intent; import android.content.res.Resources; import android.os.Build; -import android.os.Handler; -import android.os.Looper; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings.Secure; @@ -28,6 +26,7 @@ import android.util.ArraySet; import android.util.Log; +import androidx.annotation.MainThread; import androidx.annotation.Nullable; import com.android.internal.logging.InstanceId; @@ -35,9 +34,7 @@ import com.android.internal.logging.UiEventLogger; import com.android.systemui.Dumpable; import com.android.systemui.R; -import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.dagger.SysUISingleton; -import com.android.systemui.dagger.qualifiers.Background; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.dump.DumpManager; import com.android.systemui.plugins.PluginListener; @@ -68,12 +65,20 @@ import java.util.List; import java.util.Optional; import java.util.Set; +import java.util.concurrent.Executor; import java.util.function.Predicate; import javax.inject.Inject; import javax.inject.Provider; -/** Platform implementation of the quick settings tile host **/ +/** Platform implementation of the quick settings tile host + * + * This class keeps track of the set of current tiles and is the in memory source of truth + * (ground truth is kept in {@link Secure#QS_TILES}). When the ground truth changes, + * {@link #onTuningChanged} will be called and the tiles will be re-created as needed. + * + * This class also provides the interface for adding/removing/changing tiles. + */ @SysUISingleton public class QSTileHost implements QSHost, Tunable, PluginListener, Dumpable { private static final String TAG = "QSTileHost"; @@ -89,11 +94,11 @@ public class QSTileHost implements QSHost, Tunable, PluginListener, D private final TunerService mTunerService; private final PluginManager mPluginManager; private final DumpManager mDumpManager; - private final BroadcastDispatcher mBroadcastDispatcher; private final QSLogger mQSLogger; private final UiEventLogger mUiEventLogger; private final InstanceIdSequence mInstanceIdSequence; private final CustomTileStatePersister mCustomTileStatePersister; + private final Executor mMainExecutor; private final List mCallbacks = new ArrayList<>(); @Nullable @@ -113,13 +118,11 @@ public class QSTileHost implements QSHost, Tunable, PluginListener, D public QSTileHost(Context context, StatusBarIconController iconController, QSFactory defaultFactory, - @Main Handler mainHandler, - @Background Looper bgLooper, + @Main Executor mainExecutor, PluginManager pluginManager, TunerService tunerService, Provider autoTiles, DumpManager dumpManager, - BroadcastDispatcher broadcastDispatcher, Optional centralSurfacesOptional, QSLogger qsLogger, UiEventLogger uiEventLogger, @@ -137,7 +140,7 @@ public QSTileHost(Context context, mDumpManager = dumpManager; mQSLogger = qsLogger; mUiEventLogger = uiEventLogger; - mBroadcastDispatcher = broadcastDispatcher; + mMainExecutor = mainExecutor; mTileServiceRequestController = tileServiceRequestControllerBuilder.create(this); mTileLifeCycleManagerFactory = tileLifecycleManagerFactory; @@ -151,7 +154,7 @@ public QSTileHost(Context context, mSecureSettings = secureSettings; mCustomTileStatePersister = customTileStatePersister; - mainHandler.post(() -> { + mainExecutor.execute(() -> { // This is technically a hack to avoid circular dependency of // QSTileHost -> XXXTile -> QSTileHost. Posting ensures creation // finishes before creating any tiles. @@ -258,6 +261,33 @@ public int indexOf(String spec) { return mTileSpecs.indexOf(spec); } + /** + * Whenever the Secure Setting keeping track of the current tiles changes (or upon start) this + * will be called with the new value of the setting. + * + * This method will do the following: + *

    + *
  1. Destroy any existing tile that's not one of the current tiles (in the setting)
  2. + *
  3. Create new tiles for those that don't already exist. If this tiles end up being + * not available, they'll also be destroyed.
  4. + *
  5. Save the resolved list of tiles (current tiles that are available) into the setting. + * This means that after this call ends, the tiles in the Setting, {@link #mTileSpecs}, + * and visible tiles ({@link #mTiles}) must match. + *
  6. + *
+ * + * Additionally, if the user has changed, it'll do the following: + *
    + *
  • Change the user for SystemUI tiles: {@link QSTile#userSwitch}.
  • + *
  • Destroy any {@link CustomTile} and recreate it for the new user.
  • + *
+ * + * This happens in main thread as {@link com.android.systemui.tuner.TunerServiceImpl} dispatches + * in main thread. + * + * @see QSTile#isAvailable + */ + @MainThread @Override public void onTuningChanged(String key, String newValue) { if (!TILES_SETTING.equals(key)) { @@ -330,34 +360,44 @@ public void onTuningChanged(String key, String newValue) { mCurrentUser = currentUser; List currentSpecs = new ArrayList<>(mTileSpecs); mTileSpecs.clear(); - mTileSpecs.addAll(tileSpecs); + mTileSpecs.addAll(newTiles.keySet()); // Only add the valid (available) tiles. mTiles.clear(); mTiles.putAll(newTiles); if (newTiles.isEmpty() && !tileSpecs.isEmpty()) { // If we didn't manage to create any tiles, set it to empty (default) Log.d(TAG, "No valid tiles on tuning changed. Setting to default."); - changeTiles(currentSpecs, loadTileSpecs(mContext, "")); + changeTilesByUser(currentSpecs, loadTileSpecs(mContext, "")); } else { + String resolvedTiles = TextUtils.join(",", mTileSpecs); + if (!resolvedTiles.equals(newValue)) { + // If the resolved tiles (those we actually ended up with) are different than + // the ones that are in the setting, update the Setting. + saveTilesToSettings(mTileSpecs); + } for (int i = 0; i < mCallbacks.size(); i++) { mCallbacks.get(i).onTilesChanged(); } } } + /** + * Only use with [CustomTile] if the tile doesn't exist anymore (and therefore doesn't need + * its lifecycle terminated). + */ @Override public void removeTile(String spec) { - changeTileSpecs(tileSpecs-> tileSpecs.remove(spec)); + mMainExecutor.execute(() -> changeTileSpecs(tileSpecs-> tileSpecs.remove(spec))); } /** * Remove many tiles at once. * - * It will only save to settings once (as opposed to {@link QSTileHost#removeTile} called + * It will only save to settings once (as opposed to {@link QSTileHost#removeTileByUser} called * multiple times). */ @Override public void removeTiles(Collection specs) { - changeTileSpecs(tileSpecs -> tileSpecs.removeAll(specs)); + mMainExecutor.execute(() -> changeTileSpecs(tileSpecs -> tileSpecs.removeAll(specs))); } @Override @@ -381,27 +421,30 @@ public void addTile(String spec) { * @param requestPosition -1 for end, 0 for beginning, or X for insertion at position X */ public void addTile(String spec, int requestPosition) { - if (spec.equals("work")) Log.wtfStack(TAG, "Adding work tile"); - changeTileSpecs(tileSpecs -> { - if (tileSpecs.contains(spec)) return false; - - int size = tileSpecs.size(); - if (requestPosition == POSITION_AT_END || requestPosition >= size) { - tileSpecs.add(spec); - } else { - tileSpecs.add(requestPosition, spec); - } - return true; - }); + mMainExecutor.execute(() -> + changeTileSpecs(tileSpecs -> { + if (tileSpecs.contains(spec)) return false; + + int size = tileSpecs.size(); + if (requestPosition == POSITION_AT_END || requestPosition >= size) { + tileSpecs.add(spec); + } else { + tileSpecs.add(requestPosition, spec); + } + return true; + }) + ); } - void saveTilesToSettings(List tileSpecs) { - if (tileSpecs.contains("work")) Log.wtfStack(TAG, "Saving work tile"); + + @MainThread + private void saveTilesToSettings(List tileSpecs) { mSecureSettings.putStringForUser(TILES_SETTING, TextUtils.join(",", tileSpecs), null /* tag */, false /* default */, mCurrentUser, true /* overrideable by restore */); } + @MainThread private void changeTileSpecs(Predicate> changeFunction) { final String setting = mSecureSettings.getStringForUser(TILES_SETTING, mCurrentUser); final List tileSpecs = loadTileSpecs(mContext, setting); @@ -421,29 +464,32 @@ public void addTile(ComponentName tile) { */ public void addTile(ComponentName tile, boolean end) { String spec = CustomTile.toSpec(tile); - if (!mTileSpecs.contains(spec)) { - List newSpecs = new ArrayList<>(mTileSpecs); - if (end) { - newSpecs.add(spec); - } else { - newSpecs.add(0, spec); - } - changeTiles(mTileSpecs, newSpecs); - } + addTile(spec, end ? POSITION_AT_END : 0); } - public void removeTile(ComponentName tile) { - List newSpecs = new ArrayList<>(mTileSpecs); - newSpecs.remove(CustomTile.toSpec(tile)); - changeTiles(mTileSpecs, newSpecs); + /** + * This will call through {@link #changeTilesByUser}. It should only be used when a tile is + * removed by a user action like {@code adb}. + */ + public void removeTileByUser(ComponentName tile) { + mMainExecutor.execute(() -> { + List newSpecs = new ArrayList<>(mTileSpecs); + if (newSpecs.remove(CustomTile.toSpec(tile))) { + changeTilesByUser(mTileSpecs, newSpecs); + } + }); } /** * Change the tiles triggered by the user editing. *

* This is not called on device start, or on user change. + * + * {@link android.service.quicksettings.TileService#onTileRemoved} will be called for tiles + * that are removed. */ - public void changeTiles(List previousTiles, List newTiles) { + @MainThread + public void changeTilesByUser(List previousTiles, List newTiles) { final List copy = new ArrayList<>(previousTiles); final int NP = copy.size(); for (int i = 0; i < NP; i++) { diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java index 112b1e827845..6248bd3822c7 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java @@ -16,6 +16,7 @@ package com.android.systemui.qs; +import android.annotation.NonNull; import android.content.Context; import android.content.res.Configuration; import android.util.AttributeSet; @@ -28,22 +29,28 @@ import com.android.systemui.plugins.qs.QSTile; import com.android.systemui.plugins.qs.QSTile.SignalState; import com.android.systemui.plugins.qs.QSTile.State; +import com.android.systemui.qs.TileUtils; +import com.android.systemui.tuner.TunerService; /** * Version of QSPanel that only shows N Quick Tiles in the QS Header. */ -public class QuickQSPanel extends QSPanel { +public class QuickQSPanel extends QSPanel implements TunerService.Tunable { private static final String TAG = "QuickQSPanel"; // A fallback value for max tiles number when setting via Tuner (parseNumTiles) public static final int TUNER_MAX_TILES_FALLBACK = 6; + private static final int NUM_COLUMNS_ID = R.integer.quick_settings_num_columns; + private boolean mDisabledByPolicy; private int mMaxTiles; + private int mColumns; public QuickQSPanel(Context context, AttributeSet attrs) { super(context, attrs); mMaxTiles = getResources().getInteger(R.integer.quick_qs_panel_max_tiles); + setMaxTiles(mMaxTiles); } @Override @@ -52,9 +59,52 @@ protected void setHorizontalContentContainerClipping() { mHorizontalContentContainer.setClipChildren(false); } + + @Override + public void setBrightnessView(@NonNull View view) { + if (mBrightnessView != null) { + removeView(mBrightnessView); + } + mBrightnessView = view; + mAutoBrightnessView = view.findViewById(R.id.brightness_icon); + setBrightnessViewMargin(mTop); + if (mBrightnessView != null) { + addView(mBrightnessView); + } + } + + View getBrightnessView() { + return mBrightnessView; + } + + private void setBrightnessViewMargin(boolean top) { + if (mBrightnessView != null) { + MarginLayoutParams lp = (MarginLayoutParams) mBrightnessView.getLayoutParams(); + if (top) { + lp.topMargin = mContext.getResources() + .getDimensionPixelSize(R.dimen.qqs_top_brightness_margin_top); + lp.bottomMargin = mContext.getResources() + .getDimensionPixelSize(R.dimen.qqs_top_brightness_margin_bottom); + } else { + lp.topMargin = mContext.getResources() + .getDimensionPixelSize(R.dimen.qqs_bottom_brightness_margin_top); + lp.bottomMargin = 0; + } + mBrightnessView.setLayoutParams(lp); + } + } + + @Override + void initialize() { + super.initialize(); + if (mHorizontalContentContainer != null) { + mHorizontalContentContainer.setClipChildren(false); + } + } + @Override public TileLayout getOrCreateTileLayout() { - return new QQSSideLabelTileLayout(mContext); + return new QQSSideLabelTileLayout(mContext, this); } @@ -102,18 +152,37 @@ protected void drawTile(QSPanelControllerBase.TileRecord r, State state) { } public void setMaxTiles(int maxTiles) { + mColumns = TileUtils.getQSColumnsCount(mContext, + getResources().getInteger(NUM_COLUMNS_ID)); + if (mColumns == 2) maxTiles = getResources().getInteger(R.integer.quick_qs_panel_max_tiles); + if (maxTiles > mColumns && (maxTiles % mColumns != 0)) { + maxTiles--; + setMaxTiles(maxTiles); + return; + } mMaxTiles = maxTiles; } @Override public void onTuningChanged(String key, String newValue) { - if (QS_SHOW_BRIGHTNESS.equals(key)) { - // No Brightness or Tooltip for you! - super.onTuningChanged(key, "0"); - } + switch (key) { + case QS_SHOW_BRIGHTNESS_SLIDER: + boolean value = + TunerService.parseInteger(newValue, 1) > 1; + super.onTuningChanged(key, value ? newValue : "0"); + break; + case QS_LAYOUT_COLUMNS: + case QS_LAYOUT_COLUMNS_LANDSCAPE: + setMaxTiles(mColumns); + super.onTuningChanged(key, newValue); + break; + default: + super.onTuningChanged(key, newValue); + } } public int getNumQuickTiles() { + setMaxTiles(mColumns); return mMaxTiles; } @@ -183,15 +252,16 @@ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { static class QQSSideLabelTileLayout extends SideLabelTileLayout { private boolean mLastSelected; + private QuickQSPanel mQSPanel; - QQSSideLabelTileLayout(Context context) { + QQSSideLabelTileLayout(Context context, QuickQSPanel qsPanel) { super(context, null); + mQSPanel = qsPanel; setClipChildren(false); setClipToPadding(false); LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); setLayoutParams(lp); - setMaxColumns(4); } @Override @@ -206,6 +276,7 @@ public boolean updateResources() { protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); updateResources(); + mQSPanel.setMaxTiles(getResourceColumns()); } @Override @@ -253,5 +324,19 @@ public void setExpansion(float expansion, float proposedTranslation) { setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_AUTO); mLastSelected = selected; } + + @Override + public int getResourceColumns() { + int columns = getResources().getInteger(NUM_COLUMNS_ID); + return TileUtils.getQSColumnsCount(mContext, columns); + } + + @Override + public void updateSettings() { + updateResources(); + mQSPanel.setMaxTiles(getResourceColumns()); + updateMaxRows(10000, mRecords.size()); + super.updateSettings(); + } } } diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanelController.java b/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanelController.java index 833573dd3873..ca507a646d8b 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanelController.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanelController.java @@ -33,6 +33,12 @@ import com.android.systemui.qs.dagger.QSScope; import com.android.systemui.qs.logging.QSLogger; import com.android.systemui.util.leak.RotationUtils; +import com.android.systemui.qs.TileUtils; +import com.android.systemui.settings.brightness.BrightnessController; +import com.android.systemui.settings.brightness.BrightnessMirrorHandler; +import com.android.systemui.settings.brightness.BrightnessSliderController; +import com.android.systemui.statusbar.policy.BrightnessMirrorController; +import com.android.systemui.tuner.TunerService; import java.util.ArrayList; import java.util.List; @@ -42,17 +48,20 @@ /** Controller for {@link QuickQSPanel}. */ @QSScope -public class QuickQSPanelController extends QSPanelControllerBase { +public class QuickQSPanelController extends QSPanelControllerBase + implements TunerService.Tunable { private final QSPanel.OnConfigurationChangedListener mOnConfigurationChangedListener = newConfig -> { - int newMaxTiles = getResources().getInteger(R.integer.quick_qs_panel_max_tiles); - if (newMaxTiles != mView.getNumQuickTiles()) { - setMaxTiles(newMaxTiles); - } + updateConfig(); }; private final boolean mUsingCollapsedLandscapeMedia; + private final BrightnessController mBrightnessController; + private final TunerService mTunerService; + private final BrightnessSliderController mBrightnessSliderController; + private final BrightnessMirrorHandler mBrightnessMirrorHandler; + private BrightnessMirrorController mBrightnessMirrorController; @Inject QuickQSPanelController(QuickQSPanel view, QSTileHost qsTileHost, @@ -61,11 +70,21 @@ public class QuickQSPanelController extends QSPanelControllerBase @Named(QUICK_QS_PANEL) MediaHost mediaHost, @Named(QS_USING_COLLAPSED_LANDSCAPE_MEDIA) boolean usingCollapsedLandscapeMedia, MetricsLogger metricsLogger, UiEventLogger uiEventLogger, QSLogger qsLogger, - DumpManager dumpManager + DumpManager dumpManager, + TunerService tunerService, + BrightnessController.Factory brightnessControllerFactory, + BrightnessSliderController.Factory brightnessSliderFactory ) { super(view, qsTileHost, qsCustomizerController, usingMediaPlayer, mediaHost, metricsLogger, - uiEventLogger, qsLogger, dumpManager); + uiEventLogger, qsLogger, dumpManager, tunerService); mUsingCollapsedLandscapeMedia = usingCollapsedLandscapeMedia; + mTunerService = tunerService; + + mBrightnessSliderController = brightnessSliderFactory.create(getContext(), mView); + mView.setBrightnessView(mBrightnessSliderController.getRootView()); + + mBrightnessController = brightnessControllerFactory.create(mBrightnessSliderController); + mBrightnessMirrorHandler = new BrightnessMirrorHandler(mBrightnessController); } @Override @@ -74,6 +93,7 @@ protected void onInit() { updateMediaExpansion(); mMediaHost.setShowsOnlyActiveMedia(true); mMediaHost.init(MediaHierarchyManager.LOCATION_QQS); + mBrightnessSliderController.init(); } private void updateMediaExpansion() { @@ -95,20 +115,69 @@ protected int getRotation() { @Override protected void onViewAttached() { super.onViewAttached(); + + mTunerService.addTunable(mView, QSPanel.QS_BRIGHTNESS_SLIDER_POSITION); + mTunerService.addTunable(mView, QSPanel.QS_SHOW_AUTO_BRIGHTNESS); + mTunerService.addTunable(mView, QSPanel.QS_SHOW_BRIGHTNESS_SLIDER); + mTunerService.addTunable(mView, QSPanel.QS_LAYOUT_COLUMNS); + mTunerService.addTunable(mView, QSPanel.QS_LAYOUT_COLUMNS_LANDSCAPE); + + mView.setBrightnessRunnable(() -> { + mView.updateResources(); + updateBrightnessMirror(); + }); + mView.addOnConfigurationChangedListener(mOnConfigurationChangedListener); + updateConfig(); + mBrightnessMirrorHandler.onQsPanelAttached(); } @Override protected void onViewDetached() { super.onViewDetached(); + mTunerService.removeTunable(mView); + mView.setBrightnessRunnable(null); mView.removeOnConfigurationChangedListener(mOnConfigurationChangedListener); + mBrightnessMirrorHandler.onQsPanelDettached(); } - private void setMaxTiles(int parseNumTiles) { - mView.setMaxTiles(parseNumTiles); + private void updateConfig() { + int maxTiles = getResources().getInteger(R.integer.quick_qs_panel_max_tiles); + int columns = getResources().getInteger(R.integer.quick_settings_num_columns); + columns = TileUtils.getQSColumnsCount(getContext(), columns); + mView.setMaxTiles(Math.max(columns, maxTiles)); setTiles(); } + private void updateBrightnessMirror() { + if (mBrightnessMirrorController != null) { + mBrightnessSliderController.setMirrorControllerAndMirror(mBrightnessMirrorController); + } + } + + @Override + void setListening(boolean listening) { + super.setListening(listening); + + // Set the listening as soon as the QS fragment starts listening regardless of the + //expansion, so it will update the current brightness before the slider is visible. + if (listening) { + mBrightnessController.registerCallbacks(); + } else { + mBrightnessController.unregisterCallbacks(); + } + } + + public boolean isListening() { + return mView.isListening(); + } + + @Override + public void refreshAllTiles() { + mBrightnessController.checkRestrictionAndSetEnabled(); + super.refreshAllTiles(); + } + @Override protected void onConfigurationChanged() { updateMediaExpansion(); @@ -134,4 +203,9 @@ public void setContentMargins(int marginStart, int marginEnd) { public int getNumQuickTiles() { return mView.getNumQuickTiles(); } + + public void setBrightnessMirror(BrightnessMirrorController brightnessMirrorController) { + mBrightnessMirrorController = brightnessMirrorController; + mBrightnessMirrorHandler.setController(brightnessMirrorController); + } } diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java index 264edb1ec9e4..7b5261ebac8e 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java @@ -18,10 +18,17 @@ import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT; import android.content.Context; +import android.content.Intent; import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.Color; import android.graphics.Rect; +import android.net.Uri; +import android.os.VibrationEffect; +import android.os.Vibrator; +import android.provider.AlarmClock; +import android.provider.CalendarContract; +import android.provider.Settings; import android.util.AttributeSet; import android.util.Pair; import android.view.DisplayCutout; @@ -37,14 +44,18 @@ import com.android.internal.policy.SystemBarUtils; import com.android.settingslib.Utils; +import com.android.systemui.Dependency; import com.android.systemui.R; import com.android.systemui.battery.BatteryMeterView; +import com.android.systemui.plugins.ActivityStarter; import com.android.systemui.statusbar.phone.StatusBarContentInsetsProvider; +import com.android.systemui.statusbar.phone.StatusBarIconController; import com.android.systemui.statusbar.phone.StatusBarIconController.TintedIconManager; import com.android.systemui.statusbar.phone.StatusIconContainer; import com.android.systemui.statusbar.policy.Clock; import com.android.systemui.statusbar.policy.VariableDateView; import com.android.systemui.util.LargeScreenUtils; +import com.android.systemui.tuner.TunerService; import java.util.List; @@ -52,7 +63,19 @@ * View that contains the top-most bits of the QS panel (primarily the status bar with date, time, * battery, carrier info and privacy icons) and also contains the {@link QuickQSPanel}. */ -public class QuickStatusBarHeader extends FrameLayout { +public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tunable, + View.OnClickListener, View.OnLongClickListener { + + public static final String STATUS_BAR_BATTERY_STYLE = + "system:" + Settings.System.STATUS_BAR_BATTERY_STYLE; + public static final String QS_BATTERY_STYLE = + "system:" + Settings.System.QS_BATTERY_STYLE; + public static final String QS_BATTERY_LOCATION = + "system:" + Settings.System.QS_BATTERY_LOCATION; + private static final String QS_SHOW_BATTERY_PERCENT = + "system:" + Settings.System.QS_SHOW_BATTERY_PERCENT; + private static final String QS_SHOW_BATTERY_ESTIMATE = + "system:" + Settings.System.QS_SHOW_BATTERY_ESTIMATE; private boolean mExpanded; private boolean mQsDisabled; @@ -84,6 +107,7 @@ public class QuickStatusBarHeader extends FrameLayout { private View mPrivacyContainer; private BatteryMeterView mBatteryRemainingIcon; + private BatteryMeterView mBatteryIcon; private StatusIconContainer mIconContainer; private View mPrivacyChip; @@ -105,13 +129,17 @@ public class QuickStatusBarHeader extends FrameLayout { private List mRssiIgnoredSlots = List.of(); private boolean mIsSingleCarrier; - private boolean mHasCenterCutout; - private boolean mConfigShowBatteryEstimate; - private boolean mUseCombinedQSHeader; + private final ActivityStarter mActivityStarter; + private final Vibrator mVibrator; + + private int mStatusBarBatteryStyle, mQSBatteryStyle, mQSBatteryLocation; + public QuickStatusBarHeader(Context context, AttributeSet attrs) { super(context, attrs); + mActivityStarter = Dependency.get(ActivityStarter.class); + mVibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE); } /** @@ -135,7 +163,11 @@ protected void onFinishInflate() { mIconContainer = findViewById(R.id.statusIcons); mPrivacyChip = findViewById(R.id.privacy_chip); mDateView = findViewById(R.id.date); + mDateView.setOnClickListener(this); + mDateView.setOnLongClickListener(this); mClockDateView = findViewById(R.id.date_clock); + mClockDateView.setOnClickListener(this); + mClockDateView.setOnLongClickListener(this); mClockIconsSeparator = findViewById(R.id.separator); mRightLayout = findViewById(R.id.rightLayout); mDateContainer = findViewById(R.id.date_container); @@ -143,22 +175,35 @@ protected void onFinishInflate() { mClockContainer = findViewById(R.id.clock_container); mClockView = findViewById(R.id.clock); + mClockView.setOnClickListener(this); mDatePrivacySeparator = findViewById(R.id.space); // Tint for the battery icons are handled in setupHost() mBatteryRemainingIcon = findViewById(R.id.batteryRemainingIcon); + mBatteryRemainingIcon.mQS = true; + mBatteryRemainingIcon.setOnClickListener(this); + mBatteryRemainingIcon.setOnLongClickListener(this); + + mBatteryIcon = findViewById(R.id.batteryIcon); + mBatteryIcon.setOnClickListener(this); + mBatteryIcon.setOnLongClickListener(this); - updateResources(); Configuration config = mContext.getResources().getConfiguration(); setDatePrivacyContainersWidth(config.orientation == Configuration.ORIENTATION_LANDSCAPE); - // QS will always show the estimate, and BatteryMeterView handles the case where - // it's unavailable or charging - mBatteryRemainingIcon.setPercentShowMode(BatteryMeterView.MODE_ESTIMATE); - mIconsAlphaAnimatorFixed = new TouchAnimator.Builder() .addFloat(mIconContainer, "alpha", 0, 1) .addFloat(mBatteryRemainingIcon, "alpha", 0, 1) .build(); + + updateResources(); + + Dependency.get(TunerService.class).addTunable(this, + StatusBarIconController.ICON_HIDE_LIST, + STATUS_BAR_BATTERY_STYLE, + QS_BATTERY_STYLE, + QS_BATTERY_LOCATION, + QS_SHOW_BATTERY_PERCENT, + QS_SHOW_BATTERY_ESTIMATE); } void onAttach(TintedIconManager iconManager, @@ -182,6 +227,9 @@ void onAttach(TintedIconManager iconManager, void setIsSingleCarrier(boolean isSingleCarrier) { mIsSingleCarrier = isSingleCarrier; + if (mIsSingleCarrier) { + mIconContainer.removeIgnoredSlots(mRssiIgnoredSlots); + } updateAlphaAnimator(); } @@ -194,7 +242,7 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); if (mDatePrivacyView.getMeasuredHeight() != mTopViewMeasureHeight) { mTopViewMeasureHeight = mDatePrivacyView.getMeasuredHeight(); - post(this::updateAnimators); + updateAnimators(); } } @@ -211,6 +259,43 @@ public void onRtlPropertiesChanged(int layoutDirection) { updateResources(); } + @Override + public void onClick(View v) { + // Clock view is still there when the panel is not expanded + // Making sure we get the date action when the user clicks on it + // but actually is seeing the date + if (v == mClockView) { + mActivityStarter.postStartActivityDismissingKeyguard(new Intent( + AlarmClock.ACTION_SHOW_ALARMS), 0); + } else if (v == mDateView || v == mClockDateView) { + Uri.Builder builder = CalendarContract.CONTENT_URI.buildUpon(); + builder.appendPath("time"); + builder.appendPath(Long.toString(System.currentTimeMillis())); + Intent todayIntent = new Intent(Intent.ACTION_VIEW, builder.build()); + mActivityStarter.postStartActivityDismissingKeyguard(todayIntent, 0); + } else if (v == mBatteryRemainingIcon || v == mBatteryIcon) { + mActivityStarter.postStartActivityDismissingKeyguard(new Intent( + Intent.ACTION_POWER_USAGE_SUMMARY), 0); + } + } + + @Override + public boolean onLongClick(View v) { + if (v == mClockView || v == mDateView || v == mClockDateView) { + Intent nIntent = new Intent(Intent.ACTION_MAIN); + nIntent.setClassName("com.android.settings", + "com.android.settings.Settings$DateTimeSettingsActivity"); + mActivityStarter.startActivity(nIntent, true /* dismissShade */); + mVibrator.vibrate(VibrationEffect.createOneShot(50, VibrationEffect.DEFAULT_AMPLITUDE)); + return true; + } else if (v == mBatteryRemainingIcon || v == mBatteryIcon) { + mActivityStarter.postStartActivityDismissingKeyguard(new Intent( + Intent.ACTION_POWER_USAGE_SUMMARY), 0); + return true; + } + return false; + } + private void setDatePrivacyContainersWidth(boolean landscape) { LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) mDateContainer.getLayoutParams(); lp.width = landscape ? WRAP_CONTENT : 0; @@ -223,14 +308,6 @@ private void setDatePrivacyContainersWidth(boolean landscape) { mPrivacyContainer.setLayoutParams(lp); } - private void updateBatteryMode() { - if (mConfigShowBatteryEstimate && !mHasCenterCutout) { - mBatteryRemainingIcon.setPercentShowMode(BatteryMeterView.MODE_ESTIMATE); - } else { - mBatteryRemainingIcon.setPercentShowMode(BatteryMeterView.MODE_ON); - } - } - void updateResources() { Resources resources = mContext.getResources(); boolean largeScreenHeaderActive = @@ -240,8 +317,6 @@ void updateResources() { mStatusIconsView.setVisibility(gone ? View.GONE : View.VISIBLE); mDatePrivacyView.setVisibility(gone ? View.GONE : View.VISIBLE); - mConfigShowBatteryEstimate = resources.getBoolean(R.bool.config_showBatteryEstimateQSBH); - mRoundedCornerPadding = resources.getDimensionPixelSize( R.dimen.rounded_corner_content_padding); @@ -265,8 +340,10 @@ void updateResources() { int textColor = Utils.getColorAttrDefaultColor(mContext, android.R.attr.textColorPrimary); if (textColor != mTextColorPrimary) { + int isCircleBattery = mBatteryIcon.getBatteryStyle(); int textColorSecondary = Utils.getColorAttrDefaultColor(mContext, - android.R.attr.textColorSecondary); + (isCircleBattery == 1 || isCircleBattery == 2 || isCircleBattery == 3) + ? android.R.attr.textColorHint : android.R.attr.textColorSecondary); mTextColorPrimary = textColor; mClockView.setTextColor(textColor); if (mTintedIconManager != null) { @@ -274,6 +351,8 @@ void updateResources() { } mBatteryRemainingIcon.updateColors(mTextColorPrimary, textColorSecondary, mTextColorPrimary); + mBatteryIcon.updateColors(mTextColorPrimary, textColorSecondary, + mTextColorPrimary); } MarginLayoutParams qqsLP = (MarginLayoutParams) mHeaderQsPanel.getLayoutParams(); @@ -281,7 +360,6 @@ void updateResources() { .getDimensionPixelSize(R.dimen.qqs_layout_margin_top) : qsOffsetHeight; mHeaderQsPanel.setLayoutParams(qqsLP); - updateBatteryMode(); updateHeadersPadding(); updateAnimators(); @@ -366,16 +444,23 @@ public void onAnimationAtStart() { } void setChipVisibility(boolean visibility) { - if (visibility) { + boolean showBattery = mQSBatteryLocation == 1 + && (mBatteryIcon.getBatteryStyle() != 5 + || mBatteryIcon.getBatteryEstimate() != 0); + if (showBattery) { + mBatteryIcon.setVisibility(visibility ? View.GONE : View.VISIBLE); + } + if (visibility || showBattery) { // Animates the icons and battery indicator from alpha 0 to 1, when the chip is visible mIconsAlphaAnimator = mIconsAlphaAnimatorFixed; mIconsAlphaAnimator.setPosition(mKeyguardExpansionFraction); + mBatteryRemainingIcon.setClickable(!visibility || mKeyguardExpansionFraction == 1f); } else { mIconsAlphaAnimator = null; mIconContainer.setAlpha(1); mBatteryRemainingIcon.setAlpha(1); + mBatteryRemainingIcon.setClickable(true); } - } /** */ @@ -407,6 +492,9 @@ public void setExpansion(boolean forceExpanded, float expansionFraction, if (mIconsAlphaAnimator != null) { mIconsAlphaAnimator.setPosition(keyguardExpansionFraction); } + if (keyguardExpansionFraction == 1f && mBatteryRemainingIcon != null) { + mBatteryRemainingIcon.setClickable(true); + } // If forceExpanded (we are opening QS from lockscreen), the animators have been set to // position = 1f. if (forceExpanded) { @@ -450,14 +538,12 @@ public WindowInsets onApplyWindowInsets(WindowInsets insets) { mClockIconsSeparatorLayoutParams.width = 0; setSeparatorVisibility(false); mShowClockIconsSeparator = false; - mHasCenterCutout = false; } else { datePrivacySeparatorLayoutParams.width = topCutout.width(); mDatePrivacySeparator.setVisibility(View.VISIBLE); mClockIconsSeparatorLayoutParams.width = topCutout.width(); mShowClockIconsSeparator = true; setSeparatorVisibility(mKeyguardExpansionFraction == 0f); - mHasCenterCutout = true; } } mDatePrivacySeparator.setLayoutParams(datePrivacySeparatorLayoutParams); @@ -466,7 +552,6 @@ public WindowInsets onApplyWindowInsets(WindowInsets insets) { mCutOutPaddingRight = sbInsets.second; mWaterfallTopInset = cutout == null ? 0 : cutout.getWaterfallInsets().top; - updateBatteryMode(); updateHeadersPadding(); return super.onApplyWindowInsets(insets); } @@ -552,4 +637,68 @@ public void setExpandedScrollAmount(int scrollY) { mStatusIconsView.setScrollY(scrollY); mDatePrivacyView.setScrollY(scrollY); } + + private void updateBatteryStyle() { + int style; + if (mQSBatteryStyle == -1) { + style = mStatusBarBatteryStyle; + } else { + style = mQSBatteryStyle; + } + mBatteryRemainingIcon.setBatteryStyle(style); + mBatteryIcon.setBatteryStyle(style); + setChipVisibility(mPrivacyChip.getVisibility() == View.VISIBLE); + } + + public BatteryMeterView getBatteryMeterView() { + if (mQSBatteryLocation == 0) { + return mBatteryRemainingIcon; + } + return mBatteryIcon; + } + + @Override + public void onTuningChanged(String key, String newValue) { + switch (key) { + case QS_BATTERY_STYLE: + mQSBatteryStyle = + TunerService.parseInteger(newValue, -1); + updateBatteryStyle(); + break; + case STATUS_BAR_BATTERY_STYLE: + mStatusBarBatteryStyle = + TunerService.parseInteger(newValue, 0); + updateBatteryStyle(); + break; + case QS_BATTERY_LOCATION: + mQSBatteryLocation = + TunerService.parseInteger(newValue, 0); + if (mQSBatteryLocation == 0) { + mBatteryIcon.setVisibility(View.GONE); + mBatteryRemainingIcon.setVisibility(View.VISIBLE); + } else { + mBatteryRemainingIcon.setVisibility(View.GONE); + mBatteryIcon.setVisibility(View.VISIBLE); + } + setChipVisibility(mPrivacyChip.getVisibility() == View.VISIBLE); + break; + case QS_SHOW_BATTERY_PERCENT: + mBatteryRemainingIcon.setBatteryPercent( + TunerService.parseInteger(newValue, 2)); + mBatteryIcon.setBatteryPercent( + TunerService.parseInteger(newValue, 2)); + break; + case QS_SHOW_BATTERY_ESTIMATE: + mBatteryRemainingIcon.setBatteryEstimate( + TunerService.parseInteger(newValue, 0)); + mBatteryIcon.setBatteryEstimate( + TunerService.parseInteger(newValue, 0)); + setChipVisibility(mPrivacyChip.getVisibility() == View.VISIBLE); + break; + default: + break; + } + mClockView.setClockVisibleByUser(!StatusBarIconController.getIconHideList( + mContext, newValue).contains("clock")); + } } diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java index ec0d0811ee76..be79b1fc7379 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java @@ -18,10 +18,8 @@ import android.os.Bundle; -import com.android.internal.colorextraction.ColorExtractor; import com.android.systemui.R; import com.android.systemui.battery.BatteryMeterViewController; -import com.android.systemui.colorextraction.SysuiColorExtractor; import com.android.systemui.demomode.DemoMode; import com.android.systemui.demomode.DemoModeController; import com.android.systemui.flags.FeatureFlags; @@ -65,9 +63,6 @@ class QuickStatusBarHeaderController extends ViewController { - final boolean lightTheme = mColorExtractor.getNeutralColors().supportsDarkText(); - mClockView.onColorsChanged(lightTheme); - }; - mColorExtractor.addOnColorsChangedListener(mOnColorsChangedListener); // Don't need to worry about tuner settings for this icon mBatteryMeterViewController.ignoreTunerUpdates(); @@ -158,7 +146,6 @@ protected void onViewAttached() { @Override protected void onViewDetached() { - mColorExtractor.removeOnColorsChangedListener(mOnColorsChangedListener); mPrivacyIconsController.onParentInvisible(); mStatusBarIconController.removeIconGroup(mIconManager); mQSCarrierGroupController.setOnSingleCarrierChangedListener(null); diff --git a/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java b/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java index 3d00dd49cb1c..61485a9181fe 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java +++ b/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java @@ -3,6 +3,7 @@ import static com.android.systemui.util.Utils.useQsMediaPlayer; import android.content.Context; +import android.content.res.Configuration; import android.content.res.Resources; import android.provider.Settings; import android.util.AttributeSet; @@ -16,6 +17,7 @@ import com.android.systemui.R; import com.android.systemui.qs.QSPanel.QSTileLayout; import com.android.systemui.qs.QSPanelControllerBase.TileRecord; +import com.android.systemui.qs.TileUtils; import com.android.systemui.qs.tileimpl.HeightOverrideable; import com.android.systemui.qs.tileimpl.QSTileViewImplKt; @@ -27,6 +29,8 @@ public class TileLayout extends ViewGroup implements QSTileLayout { private static final String TAG = "TileLayout"; + private static final int NUM_COLUMNS_ID = R.integer.quick_settings_num_columns; + protected int mColumns; protected int mCellWidth; protected int mCellHeightResId = R.dimen.qs_tile_height; @@ -45,7 +49,6 @@ public class TileLayout extends ViewGroup implements QSTileLayout { private final boolean mLessRows; private int mMinRows = 1; private int mMaxColumns = NO_MAX_COLUMNS; - protected int mResourceColumns; private float mSquishinessFraction = 1f; protected int mLastTileBottom; @@ -61,6 +64,12 @@ public TileLayout(Context context, @Nullable AttributeSet attrs) { updateResources(); } + @Override + protected void onConfigurationChanged(Configuration newConfig) { + super.onConfigurationChanged(newConfig); + updateResources(); + } + @Override public int getOffsetTop(TileRecord tile) { return getTop(); @@ -121,30 +130,28 @@ public void removeAllViews() { } public boolean updateResources() { - final Resources res = mContext.getResources(); - mResourceColumns = Math.max(1, res.getInteger(R.integer.quick_settings_num_columns)); - updateColumns(); - mMaxCellHeight = mContext.getResources().getDimensionPixelSize(mCellHeightResId); + final Resources res = getResources(); + mMaxCellHeight = res.getDimensionPixelSize(mCellHeightResId); mCellMarginHorizontal = res.getDimensionPixelSize(R.dimen.qs_tile_margin_horizontal); mSidePadding = useSidePadding() ? mCellMarginHorizontal / 2 : 0; mCellMarginVertical= res.getDimensionPixelSize(R.dimen.qs_tile_margin_vertical); - mMaxAllowedRows = Math.max(1, getResources().getInteger(R.integer.quick_settings_max_rows)); + mMaxAllowedRows = Math.max(1, res.getInteger(R.integer.quick_settings_max_rows)); if (mLessRows) mMaxAllowedRows = Math.max(mMinRows, mMaxAllowedRows - 1); - if (updateColumns()) { - requestLayout(); - return true; - } - return false; + return updateColumns(); } protected boolean useSidePadding() { return true; } - private boolean updateColumns() { + public boolean updateColumns() { int oldColumns = mColumns; - mColumns = Math.min(mResourceColumns, mMaxColumns); - return oldColumns != mColumns; + mColumns = Math.min(getResourceColumns(), mMaxColumns); + if (oldColumns != mColumns) { + requestLayout(); + return true; + } + return false; } @Override @@ -214,6 +221,9 @@ protected static int exactly(int size) { } protected int getCellHeight() { + if (TileUtils.getQSTileLabelHide(mContext)) { + return getResources().getDimensionPixelSize(R.dimen.qs_quick_tile_size); + } return mMaxCellHeight; } @@ -311,4 +321,14 @@ public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info info.setCollectionInfo( new AccessibilityNodeInfo.CollectionInfo(mRecords.size(), 1, false)); } + + public int getResourceColumns() { + int columns = getResources().getInteger(NUM_COLUMNS_ID); + return TileUtils.getQSColumnsCount(mContext, columns); + } + + @Override + public void updateSettings() { + updateResources(); + } } diff --git a/packages/SystemUI/src/com/android/systemui/qs/TileUtils.java b/packages/SystemUI/src/com/android/systemui/qs/TileUtils.java new file mode 100644 index 000000000000..30943ae889e3 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/qs/TileUtils.java @@ -0,0 +1,55 @@ +/* +* Copyright (C) 2022 crDroid Android Project +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +*/ +package com.android.systemui.qs; + +import android.content.Context; +import android.content.res.Configuration; +import android.content.res.Resources; +import android.os.UserHandle; +import android.provider.Settings; + +public class TileUtils { + + public static int getQSColumnsCount(Context context, int resourceCount) { + final int QS_COLUMNS_MIN = 2; + final Resources res = context.getResources(); + int value = QS_COLUMNS_MIN; + if (res.getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) { + value = Settings.System.getIntForUser( + context.getContentResolver(), Settings.System.QS_LAYOUT_COLUMNS, + resourceCount, UserHandle.USER_CURRENT); + } else { + value = Settings.System.getIntForUser( + context.getContentResolver(), Settings.System.QS_LAYOUT_COLUMNS_LANDSCAPE, + resourceCount, UserHandle.USER_CURRENT); + } + return Math.max(QS_COLUMNS_MIN, value); + } + + public static boolean getQSTileLabelHide(Context context) { + return Settings.System.getIntForUser(context.getContentResolver(), + Settings.System.QS_TILE_LABEL_HIDE, + 0, UserHandle.USER_CURRENT) != 0; + } + + public static boolean getQSTileVerticalLayout(Context context, int defaultValue) { + return Settings.System.getIntForUser(context.getContentResolver(), + Settings.System.QS_TILE_VERTICAL_LAYOUT, + defaultValue, UserHandle.USER_CURRENT) != 0; + } +} diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java index 8ad011904d3d..f4f5588cc4b6 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java +++ b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java @@ -20,6 +20,9 @@ import android.animation.AnimatorListenerAdapter; import android.content.Context; import android.content.res.Configuration; +import android.graphics.Color; +import android.text.SpannableString; +import android.text.style.ForegroundColorSpan; import android.util.AttributeSet; import android.util.TypedValue; import android.view.LayoutInflater; @@ -74,8 +77,11 @@ public QSCustomizer(Context context, AttributeSet attrs) { toolbar.setNavigationIcon( getResources().getDrawable(value.resourceId, mContext.getTheme())); - toolbar.getMenu().add(Menu.NONE, MENU_RESET, 0, + SpannableString resetText = new SpannableString( mContext.getString(com.android.internal.R.string.reset)); + resetText.setSpan(new ForegroundColorSpan(isNightMode() ? + Color.WHITE : Color.BLACK), 0, resetText.length(), 0); + toolbar.getMenu().add(Menu.NONE, MENU_RESET, 0, resetText); toolbar.setTitle(R.string.qs_edit); mRecyclerView = findViewById(android.R.id.list); mTransparentView = findViewById(R.id.customizer_transparent_view); @@ -84,6 +90,11 @@ public QSCustomizer(Context context, AttributeSet attrs) { mRecyclerView.setItemAnimator(animator); } + private boolean isNightMode() { + return (mContext.getResources().getConfiguration().uiMode + & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES; + } + void updateResources() { LayoutParams lp = (LayoutParams) mTransparentView.getLayoutParams(); lp.height = QSUtils.getQsHeaderSystemIconsAreaHeight(mContext); @@ -92,12 +103,8 @@ void updateResources() { } void updateNavBackDrop(Configuration newConfig, LightBarController lightBarController) { - View navBackdrop = findViewById(R.id.nav_bar_background); mIsShowingNavBackdrop = newConfig.smallestScreenWidthDp >= 600 || newConfig.orientation != Configuration.ORIENTATION_LANDSCAPE; - if (navBackdrop != null) { - navBackdrop.setVisibility(mIsShowingNavBackdrop ? View.VISIBLE : View.GONE); - } updateNavColors(lightBarController); } diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizerController.java b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizerController.java index 97390112c3ed..1f4fb4962ee0 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizerController.java +++ b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizerController.java @@ -22,6 +22,7 @@ import android.content.res.Configuration; import android.graphics.Rect; import android.os.Bundle; +import android.provider.Settings; import android.view.MenuItem; import android.view.View; import android.widget.TextView; @@ -46,6 +47,7 @@ import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.ConfigurationController.ConfigurationListener; import com.android.systemui.statusbar.policy.KeyguardStateController; +import com.android.systemui.tuner.TunerService; import com.android.systemui.util.ViewController; import java.util.ArrayList; @@ -55,7 +57,14 @@ /** {@link ViewController} for {@link QSCustomizer}. */ @QSScope -public class QSCustomizerController extends ViewController { +public class QSCustomizerController extends ViewController + implements TunerService.Tunable { + + private static final String QS_LAYOUT_COLUMNS = + "system:" + Settings.System.QS_LAYOUT_COLUMNS; + private static final String QS_LAYOUT_COLUMNS_LANDSCAPE = + "system:" + Settings.System.QS_LAYOUT_COLUMNS_LANDSCAPE; + private final TileQueryHelper mTileQueryHelper; private final QSTileHost mQsTileHost; private final TileAdapter mTileAdapter; @@ -65,6 +74,7 @@ public class QSCustomizerController extends ViewController { private final ConfigurationController mConfigurationController; private final UiEventLogger mUiEventLogger; private final Toolbar mToolbar; + private final TunerService mTunerService; private final OnMenuItemClickListener mOnMenuItemClickListener = new OnMenuItemClickListener() { @Override @@ -93,12 +103,7 @@ public void onKeyguardShowingChanged() { public void onConfigChanged(Configuration newConfig) { mView.updateNavBackDrop(newConfig, mLightBarController); mView.updateResources(); - if (mTileAdapter.updateNumColumns()) { - RecyclerView.LayoutManager lm = mView.getRecyclerView().getLayoutManager(); - if (lm instanceof GridLayoutManager) { - ((GridLayoutManager) lm).setSpanCount(mTileAdapter.getNumColumns()); - } - } + updateColumns(); } }; @@ -106,7 +111,8 @@ public void onConfigChanged(Configuration newConfig) { protected QSCustomizerController(QSCustomizer view, TileQueryHelper tileQueryHelper, QSTileHost qsTileHost, TileAdapter tileAdapter, ScreenLifecycle screenLifecycle, KeyguardStateController keyguardStateController, LightBarController lightBarController, - ConfigurationController configurationController, UiEventLogger uiEventLogger) { + ConfigurationController configurationController, UiEventLogger uiEventLogger, + TunerService tunerService) { super(view); mTileQueryHelper = tileQueryHelper; mQsTileHost = qsTileHost; @@ -116,6 +122,7 @@ protected QSCustomizerController(QSCustomizer view, TileQueryHelper tileQueryHel mLightBarController = lightBarController; mConfigurationController = configurationController; mUiEventLogger = uiEventLogger; + mTunerService = tunerService; mToolbar = mView.findViewById(com.android.internal.R.id.action_bar); } @@ -164,15 +171,39 @@ public void calculateItemDecorationsForChild(View child, Rect outRect) { mToolbar.setOnMenuItemClickListener(mOnMenuItemClickListener); mToolbar.setNavigationOnClickListener(v -> hide()); + + mTunerService.addTunable(this, QS_LAYOUT_COLUMNS); + mTunerService.addTunable(this, QS_LAYOUT_COLUMNS_LANDSCAPE); } @Override protected void onViewDetached() { + mTunerService.removeTunable(this); mTileQueryHelper.setListener(null); mToolbar.setOnMenuItemClickListener(null); mConfigurationController.removeCallback(mConfigurationListener); } + @Override + public void onTuningChanged(String key, String newValue) { + switch (key) { + case QS_LAYOUT_COLUMNS: + case QS_LAYOUT_COLUMNS_LANDSCAPE: + updateColumns(); + break; + default: + break; + } + } + + private void updateColumns() { + if (mTileAdapter.updateNumColumns()) { + RecyclerView.LayoutManager lm = mView.getRecyclerView().getLayoutManager(); + if (lm instanceof GridLayoutManager) { + ((GridLayoutManager) lm).setSpanCount(mTileAdapter.getNumColumns()); + } + } + } private void reset() { mTileAdapter.resetTileSpecs(QSTileHost.getDefaultSpecs(getContext())); diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java index e52bfbd67275..f2e8ed4eb142 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java +++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java @@ -46,6 +46,7 @@ import com.android.systemui.R; import com.android.systemui.qs.QSEditEvent; import com.android.systemui.qs.QSTileHost; +import com.android.systemui.qs.TileUtils; import com.android.systemui.qs.customize.TileAdapter.Holder; import com.android.systemui.qs.customize.TileQueryHelper.TileInfo; import com.android.systemui.qs.customize.TileQueryHelper.TileStateListener; @@ -109,7 +110,7 @@ public class TileAdapter extends RecyclerView.Adapter implements TileSta private int mAccessibilityAction = ACTION_NONE; private int mAccessibilityFromIndex; private final UiEventLogger mUiEventLogger; - private final AccessibilityDelegateCompat mAccessibilityDelegate; + //private final AccessibilityDelegateCompat mAccessibilityDelegate; @Nullable private RecyclerView mRecyclerView; private int mNumColumns; @@ -127,7 +128,8 @@ public TileAdapter( mMarginDecoration = new MarginTileDecoration(); mMinNumTiles = context.getResources().getInteger(R.integer.quick_settings_min_num_tiles); mNumColumns = context.getResources().getInteger(NUM_COLUMNS_ID); - mAccessibilityDelegate = new TileAdapterDelegate(); + //mAccessibilityDelegate = new TileAdapterDelegate(); + mNumColumns = TileUtils.getQSColumnsCount(context, mNumColumns); mSizeLookup.setSpanIndexCacheEnabled(true); } @@ -148,6 +150,7 @@ public void onDetachedFromRecyclerView(@NonNull RecyclerView recyclerView) { */ public boolean updateNumColumns() { int numColumns = mContext.getResources().getInteger(NUM_COLUMNS_ID); + numColumns = TileUtils.getQSColumnsCount(mContext, numColumns); if (numColumns != mNumColumns) { mNumColumns = numColumns; return true; @@ -182,7 +185,7 @@ public void saveSpecs(QSTileHost host) { for (int i = 1; i < mTiles.size() && mTiles.get(i) != null; i++) { newSpecs.add(mTiles.get(i).spec); } - host.changeTiles(mCurrentSpecs, newSpecs); + host.changeTilesByUser(mCurrentSpecs, newSpecs); mCurrentSpecs = newSpecs; } @@ -200,7 +203,7 @@ private void clearAccessibilityState() { /** */ public void resetTileSpecs(List specs) { // Notify the host so the tiles get removed callbacks. - mHost.changeTiles(mCurrentSpecs, specs); + mHost.changeTilesByUser(mCurrentSpecs, specs); setTileSpecs(specs); } @@ -383,13 +386,27 @@ public void onClick(View v) { // Don't show the side view for third party tiles, as we don't have the actual state. tileView.setShowSideView(position < mEditIndex || info.isSystem); holder.mTileView.setSelected(true); - holder.mTileView.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES); + /*holder.mTileView.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES); holder.mTileView.setClickable(true); holder.mTileView.setOnClickListener(null); holder.mTileView.setFocusable(true); - holder.mTileView.setFocusableInTouchMode(true); + holder.mTileView.setFocusableInTouchMode(true);*/ + + holder.mTileView.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + int position = holder.getLayoutPosition(); + if (position < mEditIndex) { + if (canRemoveTiles()) { + move(position, mEditIndex); + } + } else { + move(position, mEditIndex); + } + } + }); - if (mAccessibilityAction != ACTION_NONE) { + /*if (mAccessibilityAction != ACTION_NONE) { holder.mTileView.setClickable(selectable); holder.mTileView.setFocusable(selectable); holder.mTileView.setFocusableInTouchMode(selectable); @@ -411,7 +428,7 @@ public void onClick(View v) { } if (position == mFocusIndex) { focusOnHolder(holder); - } + }*/ } private void focusOnHolder(Holder holder) { @@ -572,7 +589,7 @@ public Holder(View itemView) { mTileView = (QSTileViewImpl) ((FrameLayout) itemView).getChildAt(0); mTileView.getIcon().disableAnimation(); mTileView.setTag(this); - ViewCompat.setAccessibilityDelegate(mTileView, mAccessibilityDelegate); + //ViewCompat.setAccessibilityDelegate(mTileView, mAccessibilityDelegate); } } diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java index 32a7916da70f..605723544e32 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java +++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java @@ -114,9 +114,9 @@ private void addCurrentAndStockTiles(QSTileHost host) { possibleTiles.add(spec); } } - if (Build.IS_DEBUGGABLE && !current.contains(GarbageMonitor.MemoryTile.TILE_SPEC)) { + /*if (Build.IS_DEBUGGABLE && !current.contains(GarbageMonitor.MemoryTile.TILE_SPEC)) { possibleTiles.add(GarbageMonitor.MemoryTile.TILE_SPEC); - } + }*/ final ArrayList tilesToAdd = new ArrayList<>(); possibleTiles.remove("cell"); diff --git a/packages/SystemUI/src/com/android/systemui/qs/dagger/QSFragmentModule.java b/packages/SystemUI/src/com/android/systemui/qs/dagger/QSFragmentModule.java index aa505fb0b6bd..0152da89916e 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/dagger/QSFragmentModule.java +++ b/packages/SystemUI/src/com/android/systemui/qs/dagger/QSFragmentModule.java @@ -110,7 +110,7 @@ static QuickQSPanel providesQuickQSPanel(QuickStatusBarHeader quickStatusBarHead /** */ @Provides static BatteryMeterView providesBatteryMeterView(QuickStatusBarHeader quickStatusBarHeader) { - return quickStatusBarHeader.findViewById(R.id.batteryRemainingIcon); + return quickStatusBarHeader.getBatteryMeterView(); } /** */ diff --git a/packages/SystemUI/src/com/android/systemui/qs/external/TileServiceManager.java b/packages/SystemUI/src/com/android/systemui/qs/external/TileServiceManager.java index bf565a8c52e0..cfc57db2eeb8 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/external/TileServiceManager.java +++ b/packages/SystemUI/src/com/android/systemui/qs/external/TileServiceManager.java @@ -289,7 +289,7 @@ public void onReceive(Context context, Intent intent) { } } - mServices.getHost().removeTile(component); + mServices.getHost().removeTile(CustomTile.toSpec(component)); } }; } diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java index 1488231275c3..c15bd0f67fac 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java @@ -29,19 +29,23 @@ import com.android.systemui.qs.external.CustomTile; import com.android.systemui.qs.tiles.AirplaneModeTile; import com.android.systemui.qs.tiles.AlarmTile; +import com.android.systemui.qs.tiles.AntiFlickerTile; import com.android.systemui.qs.tiles.BatterySaverTile; import com.android.systemui.qs.tiles.BluetoothTile; import com.android.systemui.qs.tiles.CameraToggleTile; +import com.android.systemui.qs.tiles.CaffeineTile; import com.android.systemui.qs.tiles.CastTile; import com.android.systemui.qs.tiles.CellularTile; import com.android.systemui.qs.tiles.ColorCorrectionTile; import com.android.systemui.qs.tiles.ColorInversionTile; import com.android.systemui.qs.tiles.DataSaverTile; +import com.android.systemui.qs.tiles.DataSwitchTile; import com.android.systemui.qs.tiles.DeviceControlsTile; import com.android.systemui.qs.tiles.DndTile; import com.android.systemui.qs.tiles.FlashlightTile; import com.android.systemui.qs.tiles.HotspotTile; import com.android.systemui.qs.tiles.InternetTile; +import com.android.systemui.qs.tiles.LiveDisplayTile; import com.android.systemui.qs.tiles.LocationTile; import com.android.systemui.qs.tiles.MicrophoneToggleTile; import com.android.systemui.qs.tiles.NfcTile; @@ -50,8 +54,10 @@ import com.android.systemui.qs.tiles.QRCodeScannerTile; import com.android.systemui.qs.tiles.QuickAccessWalletTile; import com.android.systemui.qs.tiles.ReduceBrightColorsTile; +import com.android.systemui.qs.tiles.ReadingModeTile; import com.android.systemui.qs.tiles.RotationLockTile; import com.android.systemui.qs.tiles.ScreenRecordTile; +import com.android.systemui.qs.tiles.SoundTile; import com.android.systemui.qs.tiles.UiModeNightTile; import com.android.systemui.qs.tiles.WifiTile; import com.android.systemui.qs.tiles.WorkModeTile; @@ -96,6 +102,12 @@ public class QSFactoryImpl implements QSFactory { private final Provider mQuickAccessWalletTileProvider; private final Provider mQRCodeScannerTileProvider; private final Provider mOneHandedModeTileProvider; + private final Provider mLiveDisplayTileProvider; + private final Provider mReadingModeTileProvider; + private final Provider mAntiFlickerTileProvider; + private final Provider mDataSwitchTileProvider; + private final Provider mSoundTileProvider; + private final Provider mCaffeineTileProvider; private final Lazy mQsHostLazy; private final Provider mCustomTileBuilderProvider; @@ -132,7 +144,13 @@ public QSFactoryImpl( Provider quickAccessWalletTileProvider, Provider qrCodeScannerTileProvider, Provider oneHandedModeTileProvider, - Provider colorCorrectionTileProvider) { + Provider colorCorrectionTileProvider, + Provider liveDisplayTileProvider, + Provider readingModeTileProvider, + Provider antiFlickerTileProvider, + Provider dataSwitchTileProvider, + Provider soundTileProvider, + Provider caffeineTileProvider) { mQsHostLazy = qsHostLazy; mCustomTileBuilderProvider = customTileBuilderProvider; @@ -165,6 +183,12 @@ public QSFactoryImpl( mQRCodeScannerTileProvider = qrCodeScannerTileProvider; mOneHandedModeTileProvider = oneHandedModeTileProvider; mColorCorrectionTileProvider = colorCorrectionTileProvider; + mLiveDisplayTileProvider = liveDisplayTileProvider; + mReadingModeTileProvider = readingModeTileProvider; + mAntiFlickerTileProvider = antiFlickerTileProvider; + mDataSwitchTileProvider = dataSwitchTileProvider; + mSoundTileProvider = soundTileProvider; + mCaffeineTileProvider = caffeineTileProvider; } /** Creates a tile with a type based on {@code tileSpec} */ @@ -238,6 +262,18 @@ protected QSTileImpl createTileInternal(String tileSpec) { return mOneHandedModeTileProvider.get(); case "color_correction": return mColorCorrectionTileProvider.get(); + case "livedisplay": + return mLiveDisplayTileProvider.get(); + case "reading_mode": + return mReadingModeTileProvider.get(); + case "anti_flicker": + return mAntiFlickerTileProvider.get(); + case "dataswitch": + return mDataSwitchTileProvider.get(); + case "sound": + return mSoundTileProvider.get(); + case "caffeine": + return mCaffeineTileProvider.get(); } // Custom tiles @@ -247,11 +283,11 @@ protected QSTileImpl createTileInternal(String tileSpec) { } // Debug tiles. - if (Build.IS_DEBUGGABLE) { + /*if (Build.IS_DEBUGGABLE) { if (tileSpec.equals(GarbageMonitor.MemoryTile.TILE_SPEC)) { return mMemoryTileProvider.get(); } - } + }*/ // Broken tiles. Log.w(TAG, "No stock tile spec: " + tileSpec); diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java index be6982ab2470..c28b826130a4 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java @@ -248,7 +248,7 @@ public static int getIconColorForState(Context context, int state) { return Utils.getColorAttrDefaultColor(context, android.R.attr.textColorPrimary); case Tile.STATE_ACTIVE: return Utils.getColorAttrDefaultColor(context, - com.android.internal.R.attr.textColorOnAccent); + com.android.internal.R.attr.textColorPrimaryInverse); default: Log.e("QSIconView", "Invalid state " + state); return 0; diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt index 59164dea9c45..0cfed722ffea 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt @@ -48,6 +48,7 @@ import com.android.systemui.plugins.qs.QSIconView import com.android.systemui.plugins.qs.QSTile import com.android.systemui.plugins.qs.QSTile.BooleanState import com.android.systemui.plugins.qs.QSTileView +import com.android.systemui.qs.TileUtils import com.android.systemui.qs.tileimpl.QSIconViewImpl.QS_ANIM_LENGTH import java.util.Objects @@ -90,12 +91,12 @@ open class QSTileViewImpl @JvmOverloads constructor( } private val colorActive = Utils.getColorAttrDefaultColor(context, - com.android.internal.R.attr.colorAccentPrimary) + android.R.attr.colorAccent) private val colorInactive = Utils.getColorAttrDefaultColor(context, R.attr.offStateColor) private val colorUnavailable = Utils.applyAlpha(UNAVAILABLE_ALPHA, colorInactive) - private val colorLabelActive = - Utils.getColorAttrDefaultColor(context, com.android.internal.R.attr.textColorOnAccent) + private val colorLabelActive = Utils.getColorAttrDefaultColor(context, + com.android.internal.R.attr.textColorPrimaryInverse) private val colorLabelInactive = Utils.getColorAttrDefaultColor(context, android.R.attr.textColorPrimary) private val colorLabelUnavailable = Utils.applyAlpha(UNAVAILABLE_ALPHA, colorLabelInactive) @@ -142,11 +143,16 @@ open class QSTileViewImpl @JvmOverloads constructor( private var lastVisibility = View.VISIBLE private val locInScreen = IntArray(2) + private var vertical = false + private val forceHideCheveron = true + private var labelHide = false init { setId(generateViewId()) - orientation = LinearLayout.HORIZONTAL - gravity = Gravity.CENTER_VERTICAL or Gravity.START + + vertical = TileUtils.getQSTileVerticalLayout(context, if (vertical) 1 else 0) + labelHide = TileUtils.getQSTileLabelHide(context) + importantForAccessibility = IMPORTANT_FOR_ACCESSIBILITY_YES clipChildren = false clipToPadding = false @@ -154,15 +160,12 @@ open class QSTileViewImpl @JvmOverloads constructor( background = createTileBackground() setColor(getBackgroundColorForState(QSTile.State.DEFAULT_STATE)) - val padding = resources.getDimensionPixelSize(R.dimen.qs_tile_padding) - val startPadding = resources.getDimensionPixelSize(R.dimen.qs_tile_start_padding) - setPaddingRelative(startPadding, padding, padding, padding) - val iconSize = resources.getDimensionPixelSize(R.dimen.qs_icon_size) addView(_icon, LayoutParams(iconSize, iconSize)) createAndAddLabels() createAndAddSideView() + updateResources() } override fun onConfigurationChanged(newConfig: Configuration?) { @@ -191,11 +194,22 @@ open class QSTileViewImpl @JvmOverloads constructor( width = iconSize } + if (vertical) { + orientation = LinearLayout.VERTICAL + gravity = Gravity.CENTER_HORIZONTAL or Gravity.CENTER_VERTICAL + } else { + orientation = LinearLayout.HORIZONTAL + gravity = Gravity.CENTER_VERTICAL or Gravity.START + } + + if (labelHide) + gravity = Gravity.CENTER_HORIZONTAL or Gravity.CENTER_VERTICAL + val padding = resources.getDimensionPixelSize(R.dimen.qs_tile_padding) - val startPadding = resources.getDimensionPixelSize(R.dimen.qs_tile_start_padding) + val startPadding = if (vertical) padding else resources.getDimensionPixelSize(R.dimen.qs_tile_start_padding) setPaddingRelative(startPadding, padding, padding, padding) - val labelMargin = resources.getDimensionPixelSize(R.dimen.qs_label_container_margin) + val labelMargin = if (vertical) 0 else resources.getDimensionPixelSize(R.dimen.qs_label_container_margin) (labelContainer.layoutParams as MarginLayoutParams).apply { marginStart = labelMargin } @@ -217,7 +231,7 @@ open class QSTileViewImpl @JvmOverloads constructor( private fun createAndAddLabels() { labelContainer = LayoutInflater.from(context) - .inflate(R.layout.qs_tile_label, this, false) as IgnorableChildLinearLayout + .inflate(if (vertical) R.layout.qs_tile_label_vertical else R.layout.qs_tile_label,this, false) as IgnorableChildLinearLayout label = labelContainer.requireViewById(R.id.tile_label) secondaryLabel = labelContainer.requireViewById(R.id.app_label) if (collapsed) { @@ -231,7 +245,8 @@ open class QSTileViewImpl @JvmOverloads constructor( } setLabelColor(getLabelColorForState(QSTile.State.DEFAULT_STATE)) setSecondaryLabelColor(getSecondaryLabelColorForState(QSTile.State.DEFAULT_STATE)) - addView(labelContainer) + if (!labelHide) + addView(labelContainer) } private fun createAndAddSideView() { @@ -264,7 +279,8 @@ open class QSTileViewImpl @JvmOverloads constructor( // is too short. val constrainedSquishiness = constrainSquishiness(squishinessFraction) bottom = top + (actualHeight * constrainedSquishiness).toInt() - scrollY = (actualHeight - height) / 2 + scrollY = (actualHeight - height) / if (vertical) 7 else 2 + label.alpha = if (!vertical) 1.0f else Math.pow(squishinessFraction.toDouble(), 7.0).toFloat() } override fun updateAccessibilityOrder(previousView: View?): View { @@ -562,7 +578,7 @@ open class QSTileViewImpl @JvmOverloads constructor( customDrawableView.setImageDrawable(state.sideViewCustomDrawable) customDrawableView.visibility = VISIBLE chevronView.visibility = GONE - } else if (state !is BooleanState || state.forceExpandIcon) { + } else if ((state !is BooleanState || state.forceExpandIcon) && !forceHideCheveron) { customDrawableView.setImageDrawable(null) customDrawableView.visibility = GONE chevronView.visibility = VISIBLE diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java index ccec80db3ea5..6d7dae46f150 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java @@ -48,6 +48,7 @@ import com.android.systemui.qs.SettingObserver; import com.android.systemui.qs.logging.QSLogger; import com.android.systemui.qs.tileimpl.QSTileImpl; +import com.android.systemui.statusbar.policy.KeyguardStateController; import com.android.systemui.util.settings.GlobalSettings; import javax.inject.Inject; @@ -55,7 +56,7 @@ import dagger.Lazy; /** Quick settings tile: Airplane mode **/ -public class AirplaneModeTile extends QSTileImpl { +public class AirplaneModeTile extends SecureQSTile { private final Icon mIcon = ResourceIcon.get(com.android.internal.R.drawable.ic_qs_airplane); private final SettingObserver mSetting; private final BroadcastDispatcher mBroadcastDispatcher; @@ -75,10 +76,11 @@ public AirplaneModeTile( QSLogger qsLogger, BroadcastDispatcher broadcastDispatcher, Lazy lazyConnectivityManager, - GlobalSettings globalSettings + GlobalSettings globalSettings, + KeyguardStateController keyguardStateController ) { super(host, backgroundLooper, mainHandler, falsingManager, metricsLogger, - statusBarStateController, activityStarter, qsLogger); + statusBarStateController, activityStarter, qsLogger, keyguardStateController); mBroadcastDispatcher = broadcastDispatcher; mLazyConnectivityManager = lazyConnectivityManager; @@ -97,7 +99,11 @@ public BooleanState newTileState() { } @Override - public void handleClick(@Nullable View view) { + protected void handleClick(@Nullable View view, boolean keyguardShowing) { + if (checkKeyguard(view, keyguardShowing)) { + return; + } + boolean airplaneModeEnabled = mState.value; MetricsLogger.action(mContext, getMetricsCategory(), !airplaneModeEnabled); if (!airplaneModeEnabled && TelephonyProperties.in_ecm_mode().orElse(false)) { diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/AntiFlickerTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/AntiFlickerTile.java new file mode 100644 index 000000000000..64cab8718435 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/AntiFlickerTile.java @@ -0,0 +1,160 @@ +/* + * Copyright (C) 2020-2021 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.qs.tiles; + +import static com.android.internal.custom.hardware.LiveDisplayManager.FEATURE_ANTI_FLICKER; + +import com.android.internal.logging.MetricsLogger; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.os.Handler; +import android.os.Looper; +import android.provider.Settings; +import android.service.quicksettings.Tile; +import android.view.View; + +import com.android.systemui.dagger.qualifiers.Background; +import com.android.systemui.dagger.qualifiers.Main; +import com.android.systemui.plugins.ActivityStarter; +import com.android.systemui.plugins.FalsingManager; +import com.android.systemui.plugins.qs.QSTile.BooleanState; +import com.android.systemui.plugins.statusbar.StatusBarStateController; +import com.android.systemui.qs.QSHost; +import com.android.systemui.qs.logging.QSLogger; +import com.android.systemui.qs.tileimpl.QSTileImpl; +import com.android.systemui.R; + +import com.android.internal.logging.nano.MetricsProto.MetricsEvent; + +import com.android.internal.custom.hardware.LiveDisplayManager; + +import javax.inject.Inject; +import androidx.annotation.Nullable; + +public class AntiFlickerTile extends QSTileImpl { + private boolean mAntiFlickerEnabled = true; + private boolean mReceiverRegistered; + + private final Icon mIcon = ResourceIcon.get(R.drawable.ic_qs_anti_flicker); + + private static final Intent DISPLAY_SETTINGS = new Intent("android.settings.DISPLAY_SETTINGS"); + + private final LiveDisplayManager mLiveDisplay; + + @Inject + public AntiFlickerTile(QSHost host, + @Background Looper backgroundLooper, + @Main Handler mainHandler, + FalsingManager falsingManager, + MetricsLogger metricsLogger, + StatusBarStateController statusBarStateController, + ActivityStarter activityStarter, + QSLogger qsLogger + ) { + super(host, backgroundLooper, mainHandler, falsingManager, metricsLogger, statusBarStateController, + activityStarter, qsLogger); + + mLiveDisplay = LiveDisplayManager.getInstance(mContext); + if (!updateConfig()) { + mContext.registerReceiver(mReceiver, + new IntentFilter("lineageos.intent.action.INITIALIZE_LIVEDISPLAY")); + mReceiverRegistered = true; + } + } + + @Override + protected void handleDestroy() { + super.handleDestroy(); + unregisterReceiver(); + } + + private void unregisterReceiver() { + if (mReceiverRegistered) { + mContext.unregisterReceiver(mReceiver); + mReceiverRegistered = false; + } + } + + private boolean updateConfig() { + if (mLiveDisplay.getConfig() != null) { + mAntiFlickerEnabled = mLiveDisplay.getConfig().hasFeature(FEATURE_ANTI_FLICKER); + if (!isAvailable()) { + mHost.removeTile(getTileSpec()); + } + return true; + } + return false; + } + + @Override + public BooleanState newTileState() { + return new BooleanState(); + } + + @Override + protected void handleClick(@Nullable View view) { + setEnabled(!mLiveDisplay.isAntiFlickerEnabled()); + refreshState(); + } + + private void setEnabled(boolean enabled) { + Settings.System.putInt(mContext.getContentResolver(), + Settings.System.DISPLAY_ANTI_FLICKER, enabled ? 1 : 0); + } + + @Override + public Intent getLongClickIntent() { + return DISPLAY_SETTINGS; + } + + @Override + public boolean isAvailable() { + return mAntiFlickerEnabled; + } + + @Override + protected void handleUpdateState(BooleanState state, Object arg) { + state.value = mLiveDisplay.isAntiFlickerEnabled(); + state.icon = mIcon; + state.contentDescription = mContext.getString(R.string.quick_settings_anti_flicker); + state.state = (state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE); + state.label = getTileLabel(); + } + + @Override + public CharSequence getTileLabel() { + return mContext.getString(R.string.quick_settings_anti_flicker); + } + + @Override + public int getMetricsCategory() { + return MetricsEvent.SYBERIA; + } + + @Override + public void handleSetListening(boolean listening) {} + + private final BroadcastReceiver mReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + updateConfig(); + unregisterReceiver(); + } + }; +} diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/BatterySaverTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/BatterySaverTile.java index 1004fcae3827..d2de348e6139 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/BatterySaverTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/BatterySaverTile.java @@ -41,11 +41,12 @@ import com.android.systemui.qs.logging.QSLogger; import com.android.systemui.qs.tileimpl.QSTileImpl; import com.android.systemui.statusbar.policy.BatteryController; +import com.android.systemui.statusbar.policy.KeyguardStateController; import com.android.systemui.util.settings.SecureSettings; import javax.inject.Inject; -public class BatterySaverTile extends QSTileImpl implements +public class BatterySaverTile extends SecureQSTile implements BatteryController.BatteryStateChangeCallback { private final BatteryController mBatteryController; @@ -70,10 +71,11 @@ public BatterySaverTile( ActivityStarter activityStarter, QSLogger qsLogger, BatteryController batteryController, - SecureSettings secureSettings + SecureSettings secureSettings, + KeyguardStateController keyguardStateController ) { super(host, backgroundLooper, mainHandler, falsingManager, metricsLogger, - statusBarStateController, activityStarter, qsLogger); + statusBarStateController, activityStarter, qsLogger, keyguardStateController); mBatteryController = batteryController; mBatteryController.observe(getLifecycle(), this); int currentUser = host.getUserContext().getUserId(); @@ -129,7 +131,11 @@ public Intent getLongClickIntent() { } @Override - protected void handleClick(@Nullable View view) { + protected void handleClick(@Nullable View view, boolean keyguardShowing) { + if (checkKeyguard(view, keyguardShowing)) { + return; + } + if (getState().state == Tile.STATE_UNAVAILABLE) { return; } diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java index f736231bc22b..6594e4735f6e 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java @@ -48,13 +48,14 @@ import com.android.systemui.qs.logging.QSLogger; import com.android.systemui.qs.tileimpl.QSTileImpl; import com.android.systemui.statusbar.policy.BluetoothController; +import com.android.systemui.statusbar.policy.KeyguardStateController; import java.util.List; import javax.inject.Inject; /** Quick settings tile: Bluetooth **/ -public class BluetoothTile extends QSTileImpl { +public class BluetoothTile extends SecureQSTile { private static final Intent BLUETOOTH_SETTINGS = new Intent(Settings.ACTION_BLUETOOTH_SETTINGS); private final BluetoothController mController; @@ -69,10 +70,11 @@ public BluetoothTile( StatusBarStateController statusBarStateController, ActivityStarter activityStarter, QSLogger qsLogger, - BluetoothController bluetoothController + BluetoothController bluetoothController, + KeyguardStateController keyguardStateController ) { super(host, backgroundLooper, mainHandler, falsingManager, metricsLogger, - statusBarStateController, activityStarter, qsLogger); + statusBarStateController, activityStarter, qsLogger, keyguardStateController); mController = bluetoothController; mController.observe(getLifecycle(), mCallback); } @@ -83,7 +85,11 @@ public BooleanState newTileState() { } @Override - protected void handleClick(@Nullable View view) { + protected void handleClick(@Nullable View view, boolean keyguardShowing) { + if (checkKeyguard(view, keyguardShowing)) { + return; + } + // Secondary clicks are header clicks, just toggle. final boolean isEnabled = mState.value; // Immediately enter transient enabling state when turning bluetooth on. diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CaffeineTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CaffeineTile.java new file mode 100644 index 000000000000..d428fe873dfd --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CaffeineTile.java @@ -0,0 +1,251 @@ +/* + * Copyright (C) 2016 The CyanogenMod Project + * Copyright (c) 2017 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.qs.tiles; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.os.CountDownTimer; +import android.os.Handler; +import android.os.Looper; +import android.os.PowerManager; +import android.os.SystemClock; +import android.service.quicksettings.Tile; +import android.view.View; + +import androidx.annotation.Nullable; + +import com.android.internal.logging.MetricsLogger; +import com.android.internal.logging.nano.MetricsProto.MetricsEvent; +import com.android.systemui.dagger.qualifiers.Background; +import com.android.systemui.dagger.qualifiers.Main; +import com.android.systemui.qs.QSHost; +import com.android.systemui.qs.logging.QSLogger; +import com.android.systemui.qs.tileimpl.QSTileImpl; +import com.android.systemui.plugins.ActivityStarter; +import com.android.systemui.plugins.FalsingManager; +import com.android.systemui.plugins.qs.QSTile.BooleanState; +import com.android.systemui.plugins.statusbar.StatusBarStateController; +import com.android.systemui.R; + +import javax.inject.Inject; + +/** Quick settings tile: Caffeine **/ +public class CaffeineTile extends QSTileImpl { + + private final Icon mIcon = ResourceIcon.get(R.drawable.ic_qs_caffeine); + + private final PowerManager.WakeLock mWakeLock; + private int mSecondsRemaining; + private int mDuration; + private static int[] DURATIONS = new int[] { + 5 * 60, // 5 min + 10 * 60, // 10 min + 30 * 60, // 30 min + -1, // infinity + }; + private CountDownTimer mCountdownTimer = null; + public long mLastClickTime = -1; + private final Receiver mReceiver = new Receiver(); + + @Inject + public CaffeineTile( + QSHost host, + @Background Looper backgroundLooper, + @Main Handler mainHandler, + FalsingManager falsingManager, + MetricsLogger metricsLogger, + StatusBarStateController statusBarStateController, + ActivityStarter activityStarter, + QSLogger qsLogger + ) { + super(host, backgroundLooper, mainHandler, falsingManager, metricsLogger, + statusBarStateController, activityStarter, qsLogger); + mWakeLock = mContext.getSystemService(PowerManager.class).newWakeLock( + PowerManager.FULL_WAKE_LOCK, "CaffeineTile"); + mReceiver.init(); + } + + @Override + public BooleanState newTileState() { + return new BooleanState(); + } + + @Override + protected void handleDestroy() { + super.handleDestroy(); + stopCountDown(); + mReceiver.destroy(); + if (mWakeLock.isHeld()) { + mWakeLock.release(); + } + } + + @Override + public void handleClick(@Nullable View view) { + // If last user clicks < 5 seconds + // we cycle different duration + // otherwise toggle on/off + if (mWakeLock.isHeld() && (mLastClickTime != -1) && + (SystemClock.elapsedRealtime() - mLastClickTime < 5000)) { + // cycle duration + mDuration++; + if (mDuration >= DURATIONS.length) { + // all durations cycled, turn if off + mDuration = -1; + stopCountDown(); + if (mWakeLock.isHeld()) { + mWakeLock.release(); + } + } else { + // change duration + startCountDown(DURATIONS[mDuration]); + if (!mWakeLock.isHeld()) { + mWakeLock.acquire(); + } + } + } else { + // toggle + if (mWakeLock.isHeld()) { + mWakeLock.release(); + stopCountDown(); + } else { + mWakeLock.acquire(); + mDuration = 0; + startCountDown(DURATIONS[mDuration]); + } + } + mLastClickTime = SystemClock.elapsedRealtime(); + refreshState(); + } + + @Override + protected void handleLongClick(@Nullable View view) { + // Set duration to infinity on long click + int infinityIndex = DURATIONS.length - 1; + if (mLastClickTime == infinityIndex) { + // Already at infinity + return; + } + mDuration = infinityIndex; + startCountDown(DURATIONS[mDuration]); + if (!mWakeLock.isHeld()) { + mWakeLock.acquire(); + } + mLastClickTime = SystemClock.elapsedRealtime(); + refreshState(); + } + + @Override + public Intent getLongClickIntent() { + return null; + } + + @Override + public CharSequence getTileLabel() { + return mContext.getString(R.string.quick_settings_caffeine_label); + } + + @Override + public int getMetricsCategory() { + return MetricsEvent.SYBERIA; + } + + private void startCountDown(long duration) { + stopCountDown(); + mSecondsRemaining = (int)duration; + if (duration == -1) { + // infinity timing, no need to start timer + return; + } + mCountdownTimer = new CountDownTimer(duration * 1000, 1000) { + @Override + public void onTick(long millisUntilFinished) { + mSecondsRemaining = (int) (millisUntilFinished / 1000); + refreshState(); + } + + @Override + public void onFinish() { + if (mWakeLock.isHeld()) + mWakeLock.release(); + refreshState(); + } + + }.start(); + } + + private void stopCountDown() { + if (mCountdownTimer != null) { + mCountdownTimer.cancel(); + mCountdownTimer = null; + } + } + + private String formatValueWithRemainingTime() { + if (mSecondsRemaining == -1) { + return "\u221E"; // infinity + } + return String.format("%02d:%02d", + mSecondsRemaining / 60 % 60, mSecondsRemaining % 60); + } + + @Override + protected void handleUpdateState(BooleanState state, Object arg) { + state.value = mWakeLock.isHeld(); + state.icon = mIcon; + state.label = mContext.getString(R.string.quick_settings_caffeine_label); + if (state.value) { + state.secondaryLabel = formatValueWithRemainingTime(); + state.contentDescription = mContext.getString( + R.string.accessibility_quick_settings_caffeine_on); + state.state = Tile.STATE_ACTIVE; + } else { + state.secondaryLabel = null; + state.contentDescription = mContext.getString( + R.string.accessibility_quick_settings_caffeine_off); + state.state = Tile.STATE_INACTIVE; + } + } + + private final class Receiver extends BroadcastReceiver { + public void init() { + // Register for Intent broadcasts for... + IntentFilter filter = new IntentFilter(); + filter.addAction(Intent.ACTION_SCREEN_OFF); + mContext.registerReceiver(this, filter, null, mHandler); + } + + public void destroy() { + mContext.unregisterReceiver(this); + } + + @Override + public void onReceive(Context context, Intent intent) { + String action = intent.getAction(); + if (Intent.ACTION_SCREEN_OFF.equals(action)) { + // disable caffeine if user force off (power button) + stopCountDown(); + if (mWakeLock.isHeld()) + mWakeLock.release(); + refreshState(); + } + } + } +} diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java index 04a25fc193b3..f5b9bb87cc3d 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java @@ -64,7 +64,7 @@ import javax.inject.Inject; /** Quick settings tile: Cellular **/ -public class CellularTile extends QSTileImpl { +public class CellularTile extends SecureQSTile { private static final String ENABLE_SETTINGS_DATA_PLAN = "enable.settings.data.plan"; private final NetworkController mController; @@ -84,10 +84,9 @@ public CellularTile( QSLogger qsLogger, NetworkController networkController, KeyguardStateController keyguardStateController - ) { super(host, backgroundLooper, mainHandler, falsingManager, metricsLogger, - statusBarStateController, activityStarter, qsLogger); + statusBarStateController, activityStarter, qsLogger, keyguardStateController); mController = networkController; mKeyguard = keyguardStateController; mDataController = mController.getMobileDataController(); @@ -113,7 +112,11 @@ public Intent getLongClickIntent() { } @Override - protected void handleClick(@Nullable View view) { + protected void handleClick(@Nullable View view, boolean keyguardShowing) { + if (checkKeyguard(view, keyguardShowing)) { + return; + } + if (getState().state == Tile.STATE_UNAVAILABLE) { return; } @@ -170,8 +173,8 @@ protected void handleUpdateState(SignalState state, Object arg) { cb = mSignalCallback.mInfo; } + DataUsageController.DataUsageInfo carrierLabelInfo = mDataController.getDataUsageInfo(); final Resources r = mContext.getResources(); - state.label = r.getString(R.string.mobile_data); boolean mobileDataEnabled = mDataController.isMobileDataSupported() && mDataController.isMobileDataEnabled(); state.value = mobileDataEnabled; @@ -179,8 +182,14 @@ protected void handleUpdateState(SignalState state, Object arg) { state.activityOut = mobileDataEnabled && cb.activityOut; state.expandedAccessibilityClassName = Switch.class.getName(); if (cb.noSim) { + state.label = r.getString(R.string.mobile_data); state.icon = ResourceIcon.get(R.drawable.ic_qs_no_sim); } else { + if (carrierLabelInfo != null) { + state.label = carrierLabelInfo.carrier; + } else { + state.label = r.getString(R.string.mobile_data); + } state.icon = ResourceIcon.get(R.drawable.ic_swap_vert); } diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/DataSaverTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/DataSaverTile.java index 1bbe411eee25..09f14f998722 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/DataSaverTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/DataSaverTile.java @@ -40,10 +40,11 @@ import com.android.systemui.qs.tileimpl.QSTileImpl; import com.android.systemui.statusbar.phone.SystemUIDialog; import com.android.systemui.statusbar.policy.DataSaverController; +import com.android.systemui.statusbar.policy.KeyguardStateController; import javax.inject.Inject; -public class DataSaverTile extends QSTileImpl implements +public class DataSaverTile extends SecureQSTile implements DataSaverController.Listener{ private final DataSaverController mDataSaverController; @@ -60,10 +61,11 @@ public DataSaverTile( ActivityStarter activityStarter, QSLogger qsLogger, DataSaverController dataSaverController, - DialogLaunchAnimator dialogLaunchAnimator + DialogLaunchAnimator dialogLaunchAnimator, + KeyguardStateController keyguardStateController ) { super(host, backgroundLooper, mainHandler, falsingManager, metricsLogger, - statusBarStateController, activityStarter, qsLogger); + statusBarStateController, activityStarter, qsLogger, keyguardStateController); mDataSaverController = dataSaverController; mDialogLaunchAnimator = dialogLaunchAnimator; mDataSaverController.observe(getLifecycle(), this); @@ -79,7 +81,11 @@ public Intent getLongClickIntent() { return new Intent(Settings.ACTION_DATA_SAVER_SETTINGS); } @Override - protected void handleClick(@Nullable View view) { + protected void handleClick(@Nullable View view, boolean keyguardShowing) { + if (checkKeyguard(view, keyguardShowing)) { + return; + } + if (mState.value || Prefs.getBoolean(mContext, Prefs.Key.QS_DATA_SAVER_DIALOG_SHOWN, false)) { // Do it right away. diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/DataSwitchTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/DataSwitchTile.java new file mode 100644 index 000000000000..9d14f4544f38 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/DataSwitchTile.java @@ -0,0 +1,266 @@ +package com.android.systemui.qs.tiles; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.os.AsyncTask; +import android.os.Handler; +import android.os.Looper; +import android.os.ServiceManager; +import android.os.SystemProperties; +import android.provider.Settings; +import android.telephony.PhoneStateListener; +import android.telephony.SubscriptionInfo; +import android.telephony.SubscriptionManager; +import android.telephony.TelephonyManager; +import android.text.TextUtils; +import android.util.Log; +import android.widget.Toast; +import android.view.View; + +import androidx.annotation.Nullable; + +import com.android.internal.logging.MetricsLogger; + +import com.android.internal.logging.nano.MetricsProto.MetricsEvent; +import com.android.internal.telephony.IccCardConstants; +import com.android.internal.telephony.TelephonyIntents; +import com.android.systemui.Dependency; +import com.android.systemui.R; +import com.android.systemui.SysUIToast; +import com.android.systemui.plugins.qs.QSTile.BooleanState; +import com.android.systemui.qs.QSHost; +import com.android.systemui.qs.tileimpl.QSTileImpl; +import com.android.systemui.qs.tileimpl.QSTileImpl.ResourceIcon; +import com.android.systemui.dagger.qualifiers.Background; +import com.android.systemui.dagger.qualifiers.Main; +import com.android.systemui.plugins.ActivityStarter; +import com.android.systemui.plugins.FalsingManager; +import com.android.systemui.plugins.statusbar.StatusBarStateController; +import com.android.systemui.qs.logging.QSLogger; + +import java.lang.reflect.Method; +import java.util.List; + +import javax.inject.Inject; + +public class DataSwitchTile extends QSTileImpl { + private boolean mCanSwitch = true; + private MyCallStateListener mPhoneStateListener; + private boolean mRegistered = false; + private int mSimCount = 0; + BroadcastReceiver mSimReceiver = new BroadcastReceiver() { + public void onReceive(Context context, Intent intent) { + Log.d(TAG, "mSimReceiver:onReceive"); + refreshState(); + } + }; + private SubscriptionManager mSubscriptionManager; + private TelephonyManager mTelephonyManager; + + class MyCallStateListener extends PhoneStateListener { + MyCallStateListener() { + } + + public void onCallStateChanged(int state, String arg1) { + mCanSwitch = mTelephonyManager.getCallState() == 0; + refreshState(); + } + } + + @Inject + public DataSwitchTile( + QSHost host, + @Background Looper backgroundLooper, + @Main Handler mainHandler, + FalsingManager falsingManager, + MetricsLogger metricsLogger, + StatusBarStateController statusBarStateController, + ActivityStarter activityStarter, + QSLogger qsLogger + ) { + super(host, backgroundLooper, mainHandler, falsingManager, metricsLogger, + statusBarStateController, activityStarter, qsLogger); + mSubscriptionManager = SubscriptionManager.from(host.getContext()); + mTelephonyManager = TelephonyManager.from(host.getContext()); + mPhoneStateListener = new MyCallStateListener(); + } + + @Override + public boolean isAvailable() { + int count = TelephonyManager.getDefault().getPhoneCount(); + Log.d(TAG, "phoneCount: " + count); + return count >= 2; + } + + @Override + public BooleanState newTileState() { + return new BooleanState(); + } + + @Override + public void handleSetListening(boolean listening) { + if (listening) { + if (!mRegistered) { + IntentFilter filter = new IntentFilter(); + filter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED); + mContext.registerReceiver(mSimReceiver, filter); + mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE); + mRegistered = true; + } + refreshState(); + } else if (mRegistered) { + mContext.unregisterReceiver(mSimReceiver); + mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE); + mRegistered = false; + } + } + + private void updateSimCount() { + String simState = SystemProperties.get("gsm.sim.state"); + Log.d(TAG, "DataSwitchTile:updateSimCount:simState=" + simState); + mSimCount = 0; + try { + String[] sims = TextUtils.split(simState, ","); + for (int i = 0; i < sims.length; i++) { + if (!sims[i].isEmpty() + && !sims[i].equalsIgnoreCase(IccCardConstants.INTENT_VALUE_ICC_ABSENT) + && !sims[i].equalsIgnoreCase(IccCardConstants.INTENT_VALUE_ICC_NOT_READY)) { + mSimCount++; + } + } + } catch (Exception e) { + Log.e(TAG, "Error to parse sim state"); + } + Log.d(TAG, "DataSwitchTile:updateSimCount:mSimCount=" + mSimCount); + } + + @Override + protected void handleClick(@Nullable View view) { + if (!mCanSwitch) { + Log.d(TAG, "Call state=" + mTelephonyManager.getCallState()); + } else if (mSimCount == 0) { + Log.d(TAG, "handleClick:no sim card"); + } else if (mSimCount == 1) { + Log.d(TAG, "handleClick:only one sim card"); + } else { + mHost.collapsePanels(); + AsyncTask.execute(new Runnable() { + public final void run() { + toggleMobileDataEnabled(); + refreshState(); + } + }); + } + } + + @Override + public Intent getLongClickIntent() { + return new Intent(Settings.ACTION_NETWORK_OPERATOR_SETTINGS); + } + + @Override + public CharSequence getTileLabel() { + return mContext.getString(R.string.qs_data_switch_label); + } + + @Override + protected void handleUpdateState(BooleanState state, Object arg) { + boolean activeSIMZero; + if (arg == null) { + int defaultPhoneId = mSubscriptionManager.getDefaultDataPhoneId(); + Log.d(TAG, "default data phone id=" + defaultPhoneId); + activeSIMZero = defaultPhoneId == 0; + } else { + activeSIMZero = (Boolean) arg; + } + updateSimCount(); + switch (mSimCount) { + case 0: + state.icon = ResourceIcon.get(R.drawable.ic_qs_data_switch_0); + state.value = false; + break; + case 1: + state.icon = ResourceIcon.get(activeSIMZero + ? R.drawable.ic_qs_data_switch_1 + : R.drawable.ic_qs_data_switch_2); + state.value = false; + break; + case 2: + state.icon = ResourceIcon.get(activeSIMZero + ? R.drawable.ic_qs_data_switch_1 + : R.drawable.ic_qs_data_switch_2); + state.value = true; + break; + default: + state.icon = ResourceIcon.get(R.drawable.ic_qs_data_switch_1); + state.value = false; + break; + } + if (mSimCount < 2) { + state.state = 0; + } else if (!mCanSwitch) { + state.state = 0; + Log.d(TAG, "call state isn't idle, set to unavailable."); + } else { + state.state = state.value ? 2 : 1; + } + + state.contentDescription = + mContext.getString(activeSIMZero + ? R.string.qs_data_switch_changed_1 + : R.string.qs_data_switch_changed_2); + state.label = mContext.getString(R.string.qs_data_switch_label) + + " " + getOppositeSlotCarrierName(); + } + + private String getOppositeSlotCarrierName() { + CharSequence result = ""; + // Get opposite slot 2 ^ 3 = 1, 1 ^ 3 = 2 + int subId = mSubscriptionManager.getDefaultDataSubscriptionId() ^ 3; + List subInfoList = + mSubscriptionManager.getActiveSubscriptionInfoList(true); + if (subInfoList != null) { + for (SubscriptionInfo subInfo : subInfoList) { + if (subId == subInfo.getSubscriptionId()) { + result = subInfo.getDisplayName(); + break; + } + } + } + return result.toString(); + } + + @Override + public int getMetricsCategory() { + return MetricsEvent.SYBERIA; + } + + /** + * Set whether to enable data for {@code subId}, also whether to disable data for other + * subscription + */ + private void toggleMobileDataEnabled() { + // Get opposite slot 2 ^ 3 = 1, 1 ^ 3 = 2 + int subId = mSubscriptionManager.getDefaultDataSubscriptionId() ^ 3; + final TelephonyManager telephonyManager = + mTelephonyManager.createForSubscriptionId(subId); + telephonyManager.setDataEnabled(true); + mSubscriptionManager.setDefaultDataSubId(subId); + Log.d(TAG, "Enabled subID: " + subId); + + List subInfoList = + mSubscriptionManager.getActiveSubscriptionInfoList(true); + if (subInfoList != null) { + for (SubscriptionInfo subInfo : subInfoList) { + // We never disable mobile data for opportunistic subscriptions. + if (subInfo.getSubscriptionId() != subId && !subInfo.isOpportunistic()) { + mTelephonyManager.createForSubscriptionId( + subInfo.getSubscriptionId()).setDataEnabled(false); + Log.d(TAG, "Disabled subID: " + subInfo.getSubscriptionId()); + } + } + } + } +} diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java index 7c8e77b5d993..3820898374b9 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java @@ -43,11 +43,12 @@ import com.android.systemui.qs.tileimpl.QSTileImpl; import com.android.systemui.statusbar.policy.DataSaverController; import com.android.systemui.statusbar.policy.HotspotController; +import com.android.systemui.statusbar.policy.KeyguardStateController; import javax.inject.Inject; /** Quick settings tile: Hotspot **/ -public class HotspotTile extends QSTileImpl { +public class HotspotTile extends SecureQSTile { private final Icon mEnabledStatic = ResourceIcon.get(R.drawable.ic_hotspot); @@ -68,10 +69,11 @@ public HotspotTile( ActivityStarter activityStarter, QSLogger qsLogger, HotspotController hotspotController, - DataSaverController dataSaverController + DataSaverController dataSaverController, + KeyguardStateController keyguardStateController ) { super(host, backgroundLooper, mainHandler, falsingManager, metricsLogger, - statusBarStateController, activityStarter, qsLogger); + statusBarStateController, activityStarter, qsLogger, keyguardStateController); mHotspotController = hotspotController; mDataSaverController = dataSaverController; mHotspotController.observe(this, mCallbacks); @@ -109,7 +111,11 @@ public BooleanState newTileState() { } @Override - protected void handleClick(@Nullable View view) { + protected void handleClick(@Nullable View view, boolean keyguardShowing) { + if (checkKeyguard(view, keyguardShowing)) { + return; + } + final boolean isEnabled = mState.value; if (!isEnabled && mDataSaverController.isDataSaverEnabled()) { return; diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/LiveDisplayTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/LiveDisplayTile.java new file mode 100644 index 000000000000..2745773a81b6 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/LiveDisplayTile.java @@ -0,0 +1,286 @@ +/* + * Copyright (C) 2015 The CyanogenMod Project + * Copyright (C) 2018-2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.qs.tiles; + +import static com.android.internal.custom.hardware.LiveDisplayManager.FEATURE_MANAGED_OUTDOOR_MODE; +import static com.android.internal.custom.hardware.LiveDisplayManager.MODE_AUTO; +import static com.android.internal.custom.hardware.LiveDisplayManager.MODE_DAY; +import static com.android.internal.custom.hardware.LiveDisplayManager.MODE_NIGHT; +import static com.android.internal.custom.hardware.LiveDisplayManager.MODE_OFF; +import static com.android.internal.custom.hardware.LiveDisplayManager.MODE_OUTDOOR; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.os.Handler; +import android.os.Looper; +import android.content.res.Resources; +import android.content.res.TypedArray; +import android.database.ContentObserver; +import android.hardware.display.ColorDisplayManager; +import android.provider.Settings; +import android.os.Handler; +import android.os.UserHandle; +import android.service.quicksettings.Tile; + +import com.android.systemui.dagger.qualifiers.Background; +import com.android.systemui.dagger.qualifiers.Main; +import com.android.systemui.plugins.ActivityStarter; +import com.android.systemui.plugins.statusbar.StatusBarStateController; + +import com.android.internal.util.ArrayUtils; +import com.android.systemui.plugins.qs.QSTile.LiveDisplayState; +import com.android.systemui.plugins.FalsingManager; +import com.android.systemui.qs.QSHost; +import com.android.systemui.qs.logging.QSLogger; +import com.android.systemui.qs.tileimpl.QSTileImpl; + +import com.android.internal.R; + +import com.android.internal.logging.MetricsLogger; +import com.android.internal.logging.nano.MetricsProto.MetricsEvent; +import com.android.internal.custom.hardware.LiveDisplayManager; + +import androidx.annotation.Nullable; +import android.view.View; + +import javax.inject.Inject; + +/** Quick settings tile: LiveDisplay mode switcher **/ +public class LiveDisplayTile extends QSTileImpl { + + private static final Intent LIVEDISPLAY_SETTINGS = + new Intent("com.android.settings.LIVEDISPLAY_SETTINGS"); + + private final LiveDisplayObserver mObserver; + private String mTitle; + private String[] mEntries; + private String[] mDescriptionEntries; + private String[] mAnnouncementEntries; + private String[] mValues; + private final int[] mEntryIconRes; + + private boolean mListening; + + private int mDayTemperature = -1; + + private final boolean mNightDisplayAvailable; + private boolean mOutdoorModeAvailable; + private boolean mReceiverRegistered; + + private final LiveDisplayManager mLiveDisplay; + + private static final int OFF_TEMPERATURE = 6500; + + @Inject + public LiveDisplayTile(QSHost host, + @Background Looper backgroundLooper, + @Main Handler mainHandler, + MetricsLogger metricsLogger, + FalsingManager falsingManager, + StatusBarStateController statusBarStateController, + ActivityStarter activityStarter, + QSLogger qsLogger + ) { + super(host, backgroundLooper, mainHandler, falsingManager, metricsLogger, statusBarStateController, + activityStarter, qsLogger); + + mNightDisplayAvailable = ColorDisplayManager.isNightDisplayAvailable(mContext); + + Resources res = mContext.getResources(); + TypedArray typedArray = res.obtainTypedArray(R.array.live_display_drawables); + mEntryIconRes = new int[typedArray.length()]; + for (int i = 0; i < mEntryIconRes.length; i++) { + mEntryIconRes[i] = typedArray.getResourceId(i, 0); + } + typedArray.recycle(); + + updateEntries(); + + mLiveDisplay = LiveDisplayManager.getInstance(mContext); + if (!updateConfig()) { + mContext.registerReceiver(mReceiver, new IntentFilter( + "lineageos.intent.action.INITIALIZE_LIVEDISPLAY")); + mReceiverRegistered = true; + } + + mObserver = new LiveDisplayObserver(mHandler); + mObserver.startObserving(); + } + + @Override + protected void handleDestroy() { + super.handleDestroy(); + unregisterReceiver(); + } + + private void unregisterReceiver() { + if (mReceiverRegistered) { + mContext.unregisterReceiver(mReceiver); + mReceiverRegistered = false; + } + } + + private boolean updateConfig() { + if (mLiveDisplay.getConfig() != null) { + mOutdoorModeAvailable = mLiveDisplay.getConfig().hasFeature(MODE_OUTDOOR) && + !mLiveDisplay.getConfig().hasFeature(FEATURE_MANAGED_OUTDOOR_MODE); + mDayTemperature = mLiveDisplay.getDayColorTemperature(); + if (mNightDisplayAvailable && !mOutdoorModeAvailable){ + mHost.removeTile(getTileSpec()); + } + return true; + } + return false; + } + + private void updateEntries() { + Resources res = mContext.getResources(); + mTitle = res.getString(R.string.live_display_title); + mEntries = res.getStringArray(R.array.live_display_entries); + mDescriptionEntries = res.getStringArray(R.array.live_display_description); + mAnnouncementEntries = res.getStringArray(R.array.live_display_announcement); + mValues = res.getStringArray(R.array.live_display_values); + } + + @Override + public LiveDisplayState newTileState() { + return new LiveDisplayState(); + } + + @Override + public void handleSetListening(boolean listening) { + if (mListening == listening) + return; + mListening = listening; + if (listening) { + mObserver.startObserving(); + } else { + mObserver.endObserving(); + } + } + + @Override + protected void handleClick(@Nullable View view) { + changeToNextMode(); + } + + @Override + protected void handleUpdateState(LiveDisplayState state, Object arg) { + updateEntries(); + state.mode = arg == null ? getCurrentModeIndex() : (Integer) arg; + state.label = mTitle; + state.secondaryLabel = mEntries[state.mode]; + state.icon = ResourceIcon.get(mEntryIconRes[state.mode]); + state.contentDescription = mDescriptionEntries[state.mode]; + state.state = (mNightDisplayAvailable && !mOutdoorModeAvailable) ? Tile.STATE_UNAVAILABLE: + mLiveDisplay.getMode() != MODE_OFF ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE; + } + + @Override + public int getMetricsCategory() { + return MetricsEvent.SYBERIA; + } + + @Override + public CharSequence getTileLabel() { + return mContext.getString(R.string.live_display_title); + } + + @Override + public Intent getLongClickIntent() { + return LIVEDISPLAY_SETTINGS; + } + + private int getCurrentModeIndex() { + String currentLiveDisplayMode = null; + try { + currentLiveDisplayMode = String.valueOf(mLiveDisplay.getMode()); + } catch (NullPointerException e) { + currentLiveDisplayMode = String.valueOf(MODE_AUTO); + } finally { + return ArrayUtils.indexOf(mValues, currentLiveDisplayMode); + } + } + + private void changeToNextMode() { + int next = getCurrentModeIndex() + 1; + + if (next >= mValues.length) { + next = 0; + } + + int nextMode = 0; + + while (true) { + nextMode = Integer.valueOf(mValues[next]); + // Skip outdoor mode if it's unsupported, skip the day setting + // if it's the same as the off setting, and skip night display + // on HWC2 + if ((!mOutdoorModeAvailable && nextMode == MODE_OUTDOOR) || + (mDayTemperature == OFF_TEMPERATURE && nextMode == MODE_DAY) || + (mNightDisplayAvailable && (nextMode == MODE_DAY || nextMode == MODE_NIGHT))) { + next++; + if (next >= mValues.length) { + next = 0; + } + } else { + break; + } + } + + Settings.System.putIntForUser(mContext.getContentResolver(), + Settings.System.DISPLAY_TEMPERATURE_MODE, nextMode, + UserHandle.USER_CURRENT); + } + + private class LiveDisplayObserver extends ContentObserver { + public LiveDisplayObserver(Handler handler) { + super(handler); + } + + @Override + public void onChange(boolean selfChange) { + mDayTemperature = mLiveDisplay.getDayColorTemperature(); + refreshState(getCurrentModeIndex()); + } + + public void startObserving() { + mContext.getContentResolver().registerContentObserver( + Settings.System.getUriFor(Settings.System.DISPLAY_TEMPERATURE_MODE), + false, this, UserHandle.USER_ALL); + mContext.getContentResolver().registerContentObserver( + Settings.System.getUriFor(Settings.System.DISPLAY_TEMPERATURE_DAY), + false, this, UserHandle.USER_ALL); + } + + public void endObserving() { + mContext.getContentResolver().unregisterContentObserver(this); + } + } + + private final BroadcastReceiver mReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + updateConfig(); + refreshState(); + unregisterReceiver(); + } + }; +} diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java index a61f0ce0c864..9bf4661e4e25 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java @@ -45,11 +45,12 @@ import com.android.systemui.qs.QSHost; import com.android.systemui.qs.logging.QSLogger; import com.android.systemui.qs.tileimpl.QSTileImpl; +import com.android.systemui.statusbar.policy.KeyguardStateController; import javax.inject.Inject; /** Quick settings tile: Enable/Disable NFC **/ -public class NfcTile extends QSTileImpl { +public class NfcTile extends SecureQSTile { private static final String NFC = "nfc"; private final Icon mIcon = ResourceIcon.get(R.drawable.ic_qs_nfc); @@ -70,10 +71,11 @@ public NfcTile( StatusBarStateController statusBarStateController, ActivityStarter activityStarter, QSLogger qsLogger, - BroadcastDispatcher broadcastDispatcher + BroadcastDispatcher broadcastDispatcher, + KeyguardStateController keyguardStateController ) { super(host, backgroundLooper, mainHandler, falsingManager, metricsLogger, - statusBarStateController, activityStarter, qsLogger); + statusBarStateController, activityStarter, qsLogger, keyguardStateController); mBroadcastDispatcher = broadcastDispatcher; } @@ -115,7 +117,11 @@ public Intent getLongClickIntent() { } @Override - protected void handleClick(@Nullable View view) { + protected void handleClick(@Nullable View view, boolean keyguardShowing) { + if (checkKeyguard(view, keyguardShowing)) { + return; + } + if (getAdapter() == null) { return; } @@ -151,7 +157,7 @@ public int getMetricsCategory() { private NfcAdapter getAdapter() { if (mAdapter == null) { try { - mAdapter = NfcAdapter.getDefaultAdapter(mContext); + mAdapter = NfcAdapter.getNfcAdapter(mContext.getApplicationContext()); } catch (UnsupportedOperationException e) { mAdapter = null; } diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/ReadingModeTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/ReadingModeTile.java new file mode 100644 index 000000000000..8289bce2e4c8 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/ReadingModeTile.java @@ -0,0 +1,125 @@ +/* + * Copyright (C) 2018 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.qs.tiles; + +import android.content.Intent; +import android.service.quicksettings.Tile; + +import com.android.systemui.plugins.qs.QSTile.BooleanState; +import com.android.systemui.qs.QSHost; +import com.android.systemui.qs.tileimpl.QSTileImpl; +import com.android.systemui.R; + +import android.os.Handler; +import android.os.Looper; +import com.android.internal.logging.MetricsLogger; +import com.android.systemui.dagger.qualifiers.Background; +import com.android.systemui.dagger.qualifiers.Main; +import com.android.systemui.plugins.ActivityStarter; +import com.android.systemui.plugins.statusbar.StatusBarStateController; +import com.android.systemui.plugins.FalsingManager; +import com.android.systemui.qs.logging.QSLogger; +import android.view.View; + +import com.android.internal.logging.nano.MetricsProto.MetricsEvent; + +import com.android.internal.custom.hardware.LineageHardwareManager; + +import javax.inject.Inject; +import androidx.annotation.Nullable; + +public class ReadingModeTile extends QSTileImpl { + + private final Icon mIcon = ResourceIcon.get(R.drawable.ic_qs_reader); + + private static final Intent LIVEDISPLAY_SETTINGS = + new Intent("com.android.settings.LIVEDISPLAY_SETTINGS"); + + private LineageHardwareManager mHardware; + + @Inject + public ReadingModeTile(QSHost host, + @Background Looper backgroundLooper, + @Main Handler mainHandler, + FalsingManager falsingManager, + MetricsLogger metricsLogger, + StatusBarStateController statusBarStateController, + ActivityStarter activityStarter, + QSLogger qsLogger + ) { + super(host, backgroundLooper, mainHandler, falsingManager, metricsLogger, statusBarStateController, + activityStarter, qsLogger); + + mHardware = LineageHardwareManager.getInstance(mContext); + } + + @Override + public BooleanState newTileState() { + return new BooleanState(); + } + + @Override + protected void handleClick(@Nullable View view) { + boolean newStatus = !isReadingModeEnabled(); + mHardware.set(LineageHardwareManager.FEATURE_READING_ENHANCEMENT, newStatus); + refreshState(); + } + + @Override + public Intent getLongClickIntent() { + return LIVEDISPLAY_SETTINGS; + } + + @Override + public boolean isAvailable() { + return mHardware.isSupported(LineageHardwareManager.FEATURE_READING_ENHANCEMENT); + } + + @Override + protected void handleUpdateState(BooleanState state, Object arg) { + state.value = isReadingModeEnabled(); + state.icon = mIcon; + if (state.value) { + state.contentDescription = mContext.getString( + R.string.accessibility_quick_settings_reading_mode_on); + state.state = Tile.STATE_ACTIVE; + } else { + state.contentDescription = mContext.getString( + R.string.accessibility_quick_settings_reading_mode_off); + state.state = Tile.STATE_INACTIVE; + } + state.label = getTileLabel(); + } + + @Override + public CharSequence getTileLabel() { + return mContext.getString(R.string.quick_settings_reading_mode); + } + + @Override + public int getMetricsCategory() { + return MetricsEvent.SYBERIA; + } + + @Override + public void handleSetListening(boolean listening) { + } + + private boolean isReadingModeEnabled() { + return mHardware.get(LineageHardwareManager.FEATURE_READING_ENHANCEMENT); + } +} diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java index 177c82ed3d78..6d2a56107dfe 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java @@ -48,6 +48,7 @@ import com.android.systemui.qs.logging.QSLogger; import com.android.systemui.qs.tileimpl.QSTileImpl; import com.android.systemui.statusbar.policy.BatteryController; +import com.android.systemui.statusbar.policy.KeyguardStateController; import com.android.systemui.statusbar.policy.RotationLockController; import com.android.systemui.statusbar.policy.RotationLockController.RotationLockControllerCallback; import com.android.systemui.util.settings.SecureSettings; @@ -55,7 +56,7 @@ import javax.inject.Inject; /** Quick settings tile: Rotation **/ -public class RotationLockTile extends QSTileImpl implements +public class RotationLockTile extends SecureQSTile implements BatteryController.BatteryStateChangeCallback { private final Icon mIcon = ResourceIcon.get(com.android.internal.R.drawable.ic_qs_auto_rotate); @@ -77,10 +78,11 @@ public RotationLockTile( RotationLockController rotationLockController, SensorPrivacyManager privacyManager, BatteryController batteryController, - SecureSettings secureSettings + SecureSettings secureSettings, + KeyguardStateController keyguardStateController ) { super(host, backgroundLooper, mainHandler, falsingManager, metricsLogger, - statusBarStateController, activityStarter, qsLogger); + statusBarStateController, activityStarter, qsLogger, keyguardStateController); mController = rotationLockController; mController.observe(this, mCallback); mPrivacyManager = privacyManager; @@ -122,7 +124,11 @@ public Intent getLongClickIntent() { } @Override - protected void handleClick(@Nullable View view) { + protected void handleClick(@Nullable View view, boolean keyguardShowing) { + if (checkKeyguard(view, keyguardShowing)) { + return; + } + final boolean newState = !mState.value; mController.setRotationLocked(!newState); refreshState(newState); diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/SecureQSTile.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/SecureQSTile.kt new file mode 100644 index 000000000000..30a5461fbb59 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/SecureQSTile.kt @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.systemui.qs.tiles + +import android.os.Handler +import android.os.Looper +import android.view.View +import com.android.systemui.plugins.qs.QSTile +import com.android.systemui.qs.QSHost +import com.android.systemui.plugins.FalsingManager +import com.android.internal.logging.MetricsLogger +import com.android.systemui.plugins.ActivityStarter +import com.android.systemui.plugins.statusbar.StatusBarStateController +import com.android.systemui.qs.logging.QSLogger +import com.android.systemui.statusbar.policy.KeyguardStateController +import com.android.systemui.qs.tileimpl.QSTileImpl + +internal abstract class SecureQSTile protected constructor( + host: QSHost, backgroundLooper: Looper, mainHandler: Handler, falsingManager: FalsingManager, + metricsLogger: MetricsLogger, statusBarStateController: StatusBarStateController, + activityStarter: ActivityStarter, qsLogger: QSLogger, + private val mKeyguard: KeyguardStateController, +) : QSTileImpl( + host, backgroundLooper, mainHandler, falsingManager, metricsLogger, statusBarStateController, + activityStarter, qsLogger, +) { + abstract override fun newTileState(): TState + + protected abstract fun handleClick(view: View?, keyguardShowing: Boolean) + + override fun handleClick(view: View?) { + handleClick(view, mKeyguard.isMethodSecure && mKeyguard.isShowing) + } + + protected fun checkKeyguard(view: View?, keyguardShowing: Boolean): Boolean { + return if (keyguardShowing) { + mActivityStarter.postQSRunnableDismissingKeyguard { + handleClick(view, false) + } + true + } else { + false + } + } +} diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/SoundTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/SoundTile.java new file mode 100644 index 000000000000..db27ede81a1f --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/SoundTile.java @@ -0,0 +1,178 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.systemui.qs.tiles; + +import android.content.BroadcastReceiver; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.media.AudioManager; +import android.os.Handler; +import android.os.Looper; +import android.provider.Settings.Global; +import android.service.quicksettings.Tile; +import android.view.View; + +import androidx.annotation.Nullable; + +import com.android.internal.logging.MetricsLogger; +import com.android.internal.logging.nano.MetricsProto.MetricsEvent; + +import com.android.systemui.Dependency; +import com.android.systemui.qs.QSHost; +import com.android.systemui.plugins.qs.QSTile.BooleanState; +import com.android.systemui.qs.tileimpl.QSTileImpl; +import com.android.systemui.R; +import com.android.systemui.dagger.qualifiers.Background; +import com.android.systemui.dagger.qualifiers.Main; +import com.android.systemui.plugins.ActivityStarter; +import com.android.systemui.plugins.FalsingManager; +import com.android.systemui.plugins.statusbar.StatusBarStateController; +import com.android.systemui.qs.logging.QSLogger; + +import javax.inject.Inject; + +public class SoundTile extends QSTileImpl { + + private final AudioManager mAudioManager; + + private boolean mListening = false; + + private BroadcastReceiver mReceiver; + private IntentFilter mFilter; + + @Inject + public SoundTile( + QSHost host, + @Background Looper backgroundLooper, + @Main Handler mainHandler, + FalsingManager falsingManager, + MetricsLogger metricsLogger, + StatusBarStateController statusBarStateController, + ActivityStarter activityStarter, + QSLogger qsLogger + ) { + super(host, backgroundLooper, mainHandler, falsingManager, metricsLogger, + statusBarStateController, activityStarter, qsLogger); + mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); + mReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + refreshState(); + } + }; + } + + @Override + public BooleanState newTileState() { + return new BooleanState(); + } + + @Override + public void handleSetListening(boolean listening) { + if (mAudioManager == null) { + return; + } + if (mListening == listening) return; + mListening = listening; + if (listening) { + final IntentFilter filter = new IntentFilter(); + filter.addAction(AudioManager.INTERNAL_RINGER_MODE_CHANGED_ACTION); + mContext.registerReceiver(mReceiver, filter); + } else { + mContext.unregisterReceiver(mReceiver); + } + } + + @Override + protected void handleClick(@Nullable View view) { + updateState(); + } + + @Override + public void handleLongClick(@Nullable View view) { + mAudioManager.adjustVolume(AudioManager.ADJUST_SAME, AudioManager.FLAG_SHOW_UI); + } + + @Override + public Intent getLongClickIntent() { + return null; + } + + private void updateState() { + int oldState = mAudioManager.getRingerModeInternal(); + int newState = oldState; + switch (oldState) { + case AudioManager.RINGER_MODE_NORMAL: + newState = AudioManager.RINGER_MODE_VIBRATE; + mAudioManager.setRingerModeInternal(newState); + break; + case AudioManager.RINGER_MODE_VIBRATE: + newState = AudioManager.RINGER_MODE_SILENT; + mAudioManager.setRingerModeInternal(newState); + break; + case AudioManager.RINGER_MODE_SILENT: + newState = AudioManager.RINGER_MODE_NORMAL; + mAudioManager.setRingerModeInternal(newState); + break; + default: + break; + } + } + + @Override + public CharSequence getTileLabel() { + return mContext.getString(R.string.quick_settings_sound_label); + } + + @Override + protected void handleUpdateState(BooleanState state, Object arg) { + if (mAudioManager == null) { + return; + } + switch (mAudioManager.getRingerModeInternal()) { + case AudioManager.RINGER_MODE_NORMAL: + state.icon = ResourceIcon.get(R.drawable.ic_qs_ringer_audible); + state.label = mContext.getString(R.string.quick_settings_sound_ring); + state.contentDescription = mContext.getString( + R.string.quick_settings_sound_ring); + state.state = Tile.STATE_INACTIVE; + break; + case AudioManager.RINGER_MODE_VIBRATE: + state.icon = ResourceIcon.get(R.drawable.ic_qs_ringer_vibrate); + state.label = mContext.getString(R.string.quick_settings_sound_vibrate); + state.contentDescription = mContext.getString( + R.string.quick_settings_sound_vibrate); + state.state = Tile.STATE_INACTIVE; + break; + case AudioManager.RINGER_MODE_SILENT: + state.icon = ResourceIcon.get(R.drawable.ic_qs_ringer_silent); + state.label = mContext.getString(R.string.quick_settings_sound_mute); + state.contentDescription = mContext.getString( + R.string.quick_settings_sound_mute); + state.state = Tile.STATE_ACTIVE; + break; + default: + break; + } + } + + @Override + public int getMetricsCategory() { + return MetricsEvent.SYBERIA; + } +} diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java index b2be56cca51e..c523c3eeaaee 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java @@ -53,11 +53,12 @@ import com.android.systemui.statusbar.connectivity.SignalCallback; import com.android.systemui.statusbar.connectivity.WifiIcons; import com.android.systemui.statusbar.connectivity.WifiIndicators; +import com.android.systemui.statusbar.policy.KeyguardStateController; import javax.inject.Inject; /** Quick settings tile: Wifi **/ -public class WifiTile extends QSTileImpl { +public class WifiTile extends SecureQSTile { private static final Intent WIFI_SETTINGS = new Intent(Settings.ACTION_WIFI_SETTINGS); protected final NetworkController mController; @@ -78,10 +79,11 @@ public WifiTile( ActivityStarter activityStarter, QSLogger qsLogger, NetworkController networkController, - AccessPointController accessPointController + AccessPointController accessPointController, + KeyguardStateController keyguardStateController ) { super(host, backgroundLooper, mainHandler, falsingManager, metricsLogger, - statusBarStateController, activityStarter, qsLogger); + statusBarStateController, activityStarter, qsLogger, keyguardStateController); mController = networkController; mWifiController = accessPointController; mController.observe(getLifecycle(), mSignalCallback); @@ -104,7 +106,11 @@ public Intent getLongClickIntent() { } @Override - protected void handleClick(@Nullable View view) { + protected void handleClick(@Nullable View view, boolean keyguardShowing) { + if (checkKeyguard(view, keyguardShowing)) { + return; + } + // Secondary clicks are header clicks, just toggle. mState.copyTo(mStateBeforeClick); boolean wifiEnabled = mState.value; diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/WorkModeTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/WorkModeTile.java index 7130294deccb..3720bc3ada21 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/WorkModeTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/WorkModeTile.java @@ -42,11 +42,12 @@ import com.android.systemui.qs.logging.QSLogger; import com.android.systemui.qs.tileimpl.QSTileImpl; import com.android.systemui.statusbar.phone.ManagedProfileController; +import com.android.systemui.statusbar.policy.KeyguardStateController; import javax.inject.Inject; /** Quick settings tile: Work profile on/off */ -public class WorkModeTile extends QSTileImpl implements +public class WorkModeTile extends SecureQSTile implements ManagedProfileController.Callback { private final Icon mIcon = ResourceIcon.get(R.drawable.stat_sys_managed_profile_status); @@ -62,10 +63,11 @@ public WorkModeTile( StatusBarStateController statusBarStateController, ActivityStarter activityStarter, QSLogger qsLogger, - ManagedProfileController managedProfileController + ManagedProfileController managedProfileController, + KeyguardStateController keyguardStateController ) { super(host, backgroundLooper, mainHandler, falsingManager, metricsLogger, - statusBarStateController, activityStarter, qsLogger); + statusBarStateController, activityStarter, qsLogger, keyguardStateController); mProfileController = managedProfileController; mProfileController.observe(getLifecycle(), this); } @@ -81,7 +83,11 @@ public Intent getLongClickIntent() { } @Override - public void handleClick(@Nullable View view) { + protected void handleClick(@Nullable View view, boolean keyguardShowing) { + if (checkKeyguard(view, keyguardShowing)) { + return; + } + mProfileController.setWorkModeEnabled(!mState.value); } diff --git a/packages/SystemUI/src/com/android/systemui/screenrecord/IRecordingCallback.aidl b/packages/SystemUI/src/com/android/systemui/screenrecord/IRecordingCallback.aidl new file mode 100644 index 000000000000..ee4a46393989 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/screenrecord/IRecordingCallback.aidl @@ -0,0 +1,6 @@ +package com.android.systemui.screenrecord; + +interface IRecordingCallback { + void onRecordingStart(); + void onRecordingEnd(); +} diff --git a/packages/SystemUI/src/com/android/systemui/screenrecord/IRemoteRecording.aidl b/packages/SystemUI/src/com/android/systemui/screenrecord/IRemoteRecording.aidl new file mode 100644 index 000000000000..13cbf8dfb39b --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/screenrecord/IRemoteRecording.aidl @@ -0,0 +1,12 @@ +package com.android.systemui.screenrecord; + +import com.android.systemui.screenrecord.IRecordingCallback; + +interface IRemoteRecording { + void startRecording(); + void stopRecording(); + boolean isRecording(); + boolean isStarting(); + void addRecordingCallback(in IRecordingCallback callback); + void removeRecordingCallback(in IRecordingCallback callback); +} diff --git a/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingService.java b/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingService.java index 5bb3413595ba..607d351460d5 100644 --- a/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingService.java +++ b/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingService.java @@ -21,7 +21,9 @@ import android.app.NotificationManager; import android.app.PendingIntent; import android.app.Service; +import android.content.ContentResolver; import android.content.Context; +import android.content.ComponentName; import android.content.Intent; import android.content.res.Resources; import android.graphics.Bitmap; @@ -44,6 +46,7 @@ import com.android.systemui.statusbar.phone.KeyguardDismissUtil; import java.io.IOException; +import java.util.ArrayList; import java.util.concurrent.Executor; import javax.inject.Inject; @@ -68,9 +71,12 @@ public class RecordingService extends Service implements MediaRecorder.OnInfoLis private static final String ACTION_STOP = "com.android.systemui.screenrecord.STOP"; private static final String ACTION_STOP_NOTIF = "com.android.systemui.screenrecord.STOP_FROM_NOTIF"; + private static final String ACTION_SHOW_DIALOG = "com.android.systemui.screenrecord.SHOW_DIALOG"; private static final String ACTION_SHARE = "com.android.systemui.screenrecord.SHARE"; + private static final String ACTION_DELETE = "com.android.systemui.screenrecord.DELETE"; private static final String PERMISSION_SELF = "com.android.systemui.permission.SELF"; + private final RecordingServiceBinder mBinder; private final RecordingController mController; private final KeyguardDismissUtil mKeyguardDismissUtil; private ScreenRecordingAudioSource mAudioSource; @@ -92,6 +98,7 @@ public RecordingService(RecordingController controller, @LongRunning Executor ex mNotificationManager = notificationManager; mUserContextTracker = userContextTracker; mKeyguardDismissUtil = keyguardDismissUtil; + mBinder = new RecordingServiceBinder(); } /** @@ -172,8 +179,7 @@ public int onStartCommand(Intent intent, int flags, int startId) { } Log.d(TAG, "notifying for user " + userId); stopRecording(userId); - mNotificationManager.cancel(NOTIFICATION_RECORDING_ID); - stopSelf(); + stopForeground(true); break; case ACTION_SHARE: @@ -194,18 +200,47 @@ public int onStartCommand(Intent intent, int flags, int startId) { // Close quick shade sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)); break; + case ACTION_SHOW_DIALOG: + if (mController != null) { + mController.createScreenRecordDialog(this, null).show(); + } + break; + case ACTION_DELETE: + // Close quick shade + sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)); + + ContentResolver resolver = getContentResolver(); + Uri uri = Uri.parse(intent.getStringExtra(EXTRA_PATH)); + resolver.delete(uri, null, null); + + Toast.makeText( + this, + R.string.screenrecord_delete_description, + Toast.LENGTH_LONG).show(); + + // Remove notification + mNotificationManager.cancelAsUser(null, NOTIFICATION_VIEW_ID, currentUser); + Log.d(TAG, "Deleted recording " + uri); + break; } return Service.START_STICKY; } @Override public IBinder onBind(Intent intent) { - return null; + return mBinder; } @Override public void onCreate() { super.onCreate(); + mController.addCallback((RecordingController.RecordingStateChangeCallback) mBinder); + } + + @Override + public void onDestroy() { + mController.removeCallback((RecordingController.RecordingStateChangeCallback) mBinder); + super.onDestroy(); } @VisibleForTesting @@ -350,6 +385,16 @@ protected Notification createSaveNotification(ScreenMediaRecorder.SavedRecording PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE)) .build(); + Notification.Action deleteAction = new Notification.Action.Builder( + Icon.createWithResource(this, R.drawable.ic_screenrecord), + getResources().getString(R.string.screenrecord_delete_label), + PendingIntent.getService( + this, + REQUEST_CODE, + getDeleteIntent(this, uri.toString()), + PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE)) + .build(); + Bundle extras = new Bundle(); extras.putString(Notification.EXTRA_SUBSTITUTE_APP_NAME, getResources().getString(R.string.screenrecord_name)); @@ -364,6 +409,7 @@ protected Notification createSaveNotification(ScreenMediaRecorder.SavedRecording viewIntent, PendingIntent.FLAG_IMMUTABLE)) .addAction(shareAction) + .addAction(deleteAction) .setAutoCancel(true) .addExtras(extras); @@ -441,9 +487,76 @@ private static Intent getShareIntent(Context context, String path) { .putExtra(EXTRA_PATH, path); } + private static Intent getDeleteIntent(Context context, String path) { + return new Intent(context, RecordingService.class).setAction(ACTION_DELETE) + .putExtra(EXTRA_PATH, path); + } + @Override public void onInfo(MediaRecorder mr, int what, int extra) { Log.d(TAG, "Media recorder info: " + what); onStartCommand(getStopIntent(this), 0, 0); } + + private class RecordingServiceBinder extends IRemoteRecording.Stub + implements RecordingController.RecordingStateChangeCallback { + + private ArrayList mCallbackList = new ArrayList<>(); + + @Override + public void startRecording() throws RemoteException { + Intent intent = new Intent(RecordingService.this, RecordingService.class); + intent.setAction(ACTION_SHOW_DIALOG); + RecordingService.this.startService(intent); + } + + @Override + public void stopRecording() throws RemoteException { + Intent intent = new Intent(RecordingService.this, RecordingService.class); + intent.setAction(ACTION_STOP_NOTIF); + RecordingService.this.startService(intent); + } + + @Override + public boolean isRecording() throws RemoteException { + return mController.isRecording(); + } + + @Override + public boolean isStarting() throws RemoteException { + return mController.isStarting(); + } + + public void addRecordingCallback(IRecordingCallback callback) throws RemoteException { + if (!mCallbackList.contains(callback)) { + mCallbackList.add(callback); + } + } + + public void removeRecordingCallback(IRecordingCallback callback) throws RemoteException { + mCallbackList.remove(callback); + } + + @Override + public void onRecordingStart() { + for (IRecordingCallback callback : mCallbackList) { + try { + callback.onRecordingStart(); + } catch (RemoteException e) { + // do nothing + } + } + } + + @Override + public void onRecordingEnd() { + for (IRecordingCallback callback : mCallbackList) { + try { + callback.onRecordingEnd(); + } catch (RemoteException e) { + // do nothing + } + } + } + } } diff --git a/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenMediaRecorder.java b/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenMediaRecorder.java index 2133cf63d1c3..991667519e55 100644 --- a/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenMediaRecorder.java +++ b/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenMediaRecorder.java @@ -40,6 +40,7 @@ import android.media.projection.MediaProjection; import android.media.projection.MediaProjectionManager; import android.net.Uri; +import android.os.Environment; import android.os.IBinder; import android.os.RemoteException; import android.os.ServiceManager; @@ -50,6 +51,8 @@ import android.view.Surface; import android.view.WindowManager; +import com.android.systemui.R; + import java.io.File; import java.io.IOException; import java.io.OutputStream; @@ -81,6 +84,8 @@ public class ScreenMediaRecorder { private ScreenRecordingMuxer mMuxer; private ScreenInternalAudioRecorder mAudio; private ScreenRecordingAudioSource mAudioSource; + private int mMaxRefreshRate; + private String mAvcProfileLevel; private Context mContext; MediaRecorder.OnInfoListener mListener; @@ -92,6 +97,10 @@ public ScreenMediaRecorder(Context context, mUser = user; mListener = listener; mAudioSource = audioSource; + mMaxRefreshRate = mContext.getResources().getInteger( + R.integer.config_screenRecorderMaxFramerate); + mAvcProfileLevel = mContext.getResources().getString( + R.string.config_screenRecorderAVCProfileLevel); } private void prepare() throws IOException, RemoteException, RuntimeException { @@ -127,6 +136,7 @@ private void prepare() throws IOException, RemoteException, RuntimeException { WindowManager wm = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE); wm.getDefaultDisplay().getRealMetrics(metrics); int refreshRate = (int) wm.getDefaultDisplay().getRefreshRate(); + if (mMaxRefreshRate != 0 && refreshRate > mMaxRefreshRate) refreshRate = mMaxRefreshRate; int[] dimens = getSupportedSize(metrics.widthPixels, metrics.heightPixels, refreshRate); int width = dimens[0]; int height = dimens[1]; @@ -135,8 +145,8 @@ private void prepare() throws IOException, RemoteException, RuntimeException { * VIDEO_FRAME_RATE_TO_RESOLUTION_RATIO; mMediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264); mMediaRecorder.setVideoEncodingProfileLevel( - MediaCodecInfo.CodecProfileLevel.AVCProfileHigh, - MediaCodecInfo.CodecProfileLevel.AVCLevel3); + MediaCodecInfo.CodecProfileLevel.AVCProfileMain, + getAvcProfileLevelCodeByName(mAvcProfileLevel)); mMediaRecorder.setVideoSize(width, height); mMediaRecorder.setVideoFrameRate(refreshRate); mMediaRecorder.setVideoEncodingBitRate(vidBitRate); @@ -176,6 +186,21 @@ private void prepare() throws IOException, RemoteException, RuntimeException { } + /** + * Match human-readable AVC level name to its constant value. + */ + private int getAvcProfileLevelCodeByName(final String levelName) { + switch (levelName) { + case "3": return MediaCodecInfo.CodecProfileLevel.AVCLevel3; + case "3.1": return MediaCodecInfo.CodecProfileLevel.AVCLevel31; + case "3.2": return MediaCodecInfo.CodecProfileLevel.AVCLevel32; + case "4": return MediaCodecInfo.CodecProfileLevel.AVCLevel4; + case "4.1": return MediaCodecInfo.CodecProfileLevel.AVCLevel41; + default: + case "4.2": return MediaCodecInfo.CodecProfileLevel.AVCLevel42; + } + } + /** * Find the highest supported screen resolution and refresh rate for the given dimensions on * this device, up to actual size and given rate. @@ -299,6 +324,7 @@ protected SavedRecording save() throws IOException { values.put(MediaStore.Video.Media.MIME_TYPE, "video/mp4"); values.put(MediaStore.Video.Media.DATE_ADDED, System.currentTimeMillis()); values.put(MediaStore.Video.Media.DATE_TAKEN, System.currentTimeMillis()); + values.put(MediaStore.Video.Media.RELATIVE_PATH, Environment.DIRECTORY_MOVIES + File.separator + "ScreenRecords"); ContentResolver resolver = mContext.getContentResolver(); Uri collectionUri = MediaStore.Video.Media.getContentUri( diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ActionProxyReceiver.java b/packages/SystemUI/src/com/android/systemui/screenshot/ActionProxyReceiver.java index daaa897374cb..08edecd9fda3 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/ActionProxyReceiver.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/ActionProxyReceiver.java @@ -20,6 +20,7 @@ import static com.android.systemui.screenshot.ScreenshotController.ACTION_TYPE_EDIT; import static com.android.systemui.screenshot.ScreenshotController.ACTION_TYPE_SHARE; +import static com.android.systemui.screenshot.ScreenshotController.ACTION_TYPE_VIEW; import static com.android.systemui.screenshot.ScreenshotController.EXTRA_ACTION_INTENT; import static com.android.systemui.screenshot.ScreenshotController.EXTRA_DISALLOW_ENTER_PIP; import static com.android.systemui.screenshot.ScreenshotController.EXTRA_ID; @@ -98,9 +99,15 @@ public void onReceive(Context context, final Intent intent) { } if (intent.getBooleanExtra(EXTRA_SMART_ACTIONS_ENABLED, false)) { - String actionType = Intent.ACTION_EDIT.equals(intent.getAction()) - ? ACTION_TYPE_EDIT - : ACTION_TYPE_SHARE; + String action = intent.getAction(); + String actionType; + if (Intent.ACTION_VIEW.equals(action)) { + actionType = ACTION_TYPE_VIEW; + } else if (Intent.ACTION_EDIT.equals(action)) { + actionType = ACTION_TYPE_EDIT; + } else { + actionType = ACTION_TYPE_SHARE; + } mScreenshotSmartActions.notifyScreenshotAction( context, intent.getStringExtra(EXTRA_ID), actionType, false, null); } diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ImageExporter.java b/packages/SystemUI/src/com/android/systemui/screenshot/ImageExporter.java index 55602a98b8c5..dcd22958c54a 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/ImageExporter.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/ImageExporter.java @@ -60,6 +60,9 @@ class ImageExporter { // ex: 'Screenshot_20201215-090626.png' private static final String FILENAME_PATTERN = "Screenshot_%1$tY% exportToRawFile(Executor executor, Bitmap bitmap, * * @param executor the thread for execution * @param bitmap the bitmap to export + * @param foregroundAppName the name of app running in foreground * * @return a listenable future result */ - ListenableFuture export(Executor executor, UUID requestId, Bitmap bitmap) { - return export(executor, requestId, bitmap, ZonedDateTime.now()); + ListenableFuture export(Executor executor, UUID requestId, Bitmap bitmap, + String foregroundAppName) { + return export(executor, requestId, bitmap, ZonedDateTime.now(), foregroundAppName); } /** @@ -151,14 +156,15 @@ ListenableFuture export(Executor executor, UUID requestId, Bitmap bitmap * * @param executor the thread for execution * @param bitmap the bitmap to export + * @param foregroundAppName the name of app running in foreground * * @return a listenable future result */ ListenableFuture export(Executor executor, UUID requestId, Bitmap bitmap, - ZonedDateTime captureTime) { + ZonedDateTime captureTime, String foregroundAppName) { - final Task task = new Task(mResolver, requestId, bitmap, captureTime, mCompressFormat, - mQuality, /* publish */ true); + final Task task = new Task(mResolver, requestId, bitmap, captureTime, foregroundAppName, + mCompressFormat, mQuality, /* publish */ true); return CallbackToFutureAdapter.getFuture( (completer) -> { @@ -231,14 +237,14 @@ private static class Task { private final boolean mPublish; Task(ContentResolver resolver, UUID requestId, Bitmap bitmap, ZonedDateTime captureTime, - CompressFormat format, int quality, boolean publish) { + String foregroundAppName, CompressFormat format, int quality, boolean publish) { mResolver = resolver; mRequestId = requestId; mBitmap = bitmap; mCaptureTime = captureTime; mFormat = format; mQuality = quality; - mFileName = createFilename(mCaptureTime, mFormat); + mFileName = createFilename(mCaptureTime, mFormat, foregroundAppName); mPublish = publish; } @@ -377,7 +383,12 @@ private static void publishEntry(ContentResolver resolver, Uri uri) } @VisibleForTesting - static String createFilename(ZonedDateTime time, CompressFormat format) { + static String createFilename(ZonedDateTime time, CompressFormat format, + String foregroundAppName) { + if (foregroundAppName != null) { + return String.format(FILENAME_WITH_APP_NAME_PATTERN, time, foregroundAppName, + fileExtension(format)); + } return String.format(FILENAME_PATTERN, time, fileExtension(format)); } diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java b/packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java index ba6e98e79ac0..c8cffc560efd 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java @@ -387,7 +387,8 @@ private void startExport(PendingAction action) { mOutputBitmap = renderBitmap(drawable, bounds); ListenableFuture exportFuture = mImageExporter.export( - mBackgroundExecutor, UUID.randomUUID(), mOutputBitmap, ZonedDateTime.now()); + mBackgroundExecutor, UUID.randomUUID(), mOutputBitmap, ZonedDateTime.now(), + mLongScreenshotHolder.getForegroundAppName()); exportFuture.addListener(() -> onExportCompleted(action, exportFuture), mUiExecutor); } diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotData.java b/packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotData.java index f549faf2414a..7b3c58e41384 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotData.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotData.java @@ -31,6 +31,7 @@ public class LongScreenshotData { private final AtomicReference mLongScreenshot; private final AtomicReference mTransitionDestinationCallback; + private String mForegroundAppName; @Inject public LongScreenshotData() { @@ -73,4 +74,18 @@ public void setTransitionDestinationCallback( public ScreenshotController.TransitionDestination takeTransitionDestinationCallback() { return mTransitionDestinationCallback.getAndSet(null); } + + /** + * Set the holder's foreground app name. + */ + public void setForegroundAppName(String foregroundAppName) { + mForegroundAppName = foregroundAppName; + } + + /** + * Return the current foreground app name. + */ + public String getForegroundAppName() { + return mForegroundAppName; + } } diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java b/packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java index 50ee1f7ba97a..85556878f0c3 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java @@ -66,7 +66,7 @@ /** * An AsyncTask that saves an image to the media store in the background. */ -class SaveImageInBackgroundTask extends AsyncTask { +class SaveImageInBackgroundTask extends AsyncTask { private static final String TAG = logTag(SaveImageInBackgroundTask.class); private static final String SCREENSHOT_ID_TEMPLATE = "Screenshot_%s"; @@ -115,7 +115,7 @@ class SaveImageInBackgroundTask extends AsyncTask { } @Override - protected Void doInBackground(Void... paramsUnused) { + protected Void doInBackground(String... params) { if (isCancelled()) { if (DEBUG_STORAGE) { Log.d(TAG, "cancelled! returning null"); @@ -140,7 +140,8 @@ protected Void doInBackground(Void... paramsUnused) { // Call synchronously here since already on a background thread. ListenableFuture future = - mImageExporter.export(Runnable::run, requestId, image); + mImageExporter.export(Runnable::run, requestId, image, + params != null ? params[0] : null); ImageExporter.Result result = future.get(); final Uri uri = result.uri; mImageTime = result.timestamp; @@ -165,6 +166,7 @@ protected Void doInBackground(Void... paramsUnused) { mImageData.uri = uri; mImageData.smartActions = smartActions; + mImageData.viewTransition = createViewAction(mContext, mContext.getResources(), uri); mImageData.shareTransition = createShareAction(mContext, mContext.getResources(), uri); mImageData.editTransition = createEditAction(mContext, mContext.getResources(), uri); mImageData.deleteAction = createDeleteAction(mContext, mContext.getResources(), uri); @@ -220,6 +222,51 @@ protected void onCancelled(Void params) { mParams.clearImage(); } + @VisibleForTesting + Supplier createViewAction(Context context, Resources r, Uri uri) { + return () -> { + ActionTransition transition = mSharedElementTransition.get(); + // Note: the view, share and edit actions are proxied through ActionProxyReceiver in + // order to do some common work like dismissing the keyguard and sending + // closeSystemWindows + + // Create an edit intent, if a specific package is provided as the editor, then + // launch that directly + Intent viewIntent = new Intent(Intent.ACTION_VIEW); + viewIntent.setDataAndType(uri, "image/png"); + viewIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); + viewIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); + + PendingIntent pendingIntent = PendingIntent.getActivityAsUser( + context, 0, viewIntent, PendingIntent.FLAG_IMMUTABLE, + transition.bundle, UserHandle.CURRENT); + + // Make sure pending intents for the system user are still unique across users + // by setting the (otherwise unused) request code to the current user id. + int requestCode = mContext.getUserId(); + + // Create a view action + PendingIntent viewAction = PendingIntent.getBroadcastAsUser(context, requestCode, + new Intent(context, ActionProxyReceiver.class) + .putExtra(ScreenshotController.EXTRA_ACTION_INTENT, pendingIntent) + .putExtra(ScreenshotController.EXTRA_ID, mScreenshotId) + .putExtra(ScreenshotController.EXTRA_SMART_ACTIONS_ENABLED, + mSmartActionsEnabled) + .putExtra(ScreenshotController.EXTRA_OVERRIDE_TRANSITION, true) + .setAction(Intent.ACTION_VIEW) + .addFlags(Intent.FLAG_RECEIVER_FOREGROUND), + PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE, + UserHandle.SYSTEM); + Notification.Action.Builder editActionBuilder = new Notification.Action.Builder( + Icon.createWithResource(r, com.android.internal.R.drawable.ic_screenshot), + r.getString(com.android.internal.R.string.global_action_screenshot), + viewAction); + + transition.action = editActionBuilder.build(); + return transition; + }; + } + /** * Assumes that the action intent is sent immediately after being supplied. */ diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java index 5b6e5ce95b14..4e4383a433cd 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java @@ -37,6 +37,7 @@ import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityOptions; +import android.app.ActivityTaskManager; import android.app.ExitTransitionCoordinator; import android.app.ExitTransitionCoordinator.ExitTransitionCallbacks; import android.app.ICompatCameraControlCallback; @@ -47,18 +48,23 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.pm.ActivityInfo; +import android.content.pm.PackageManager; import android.content.res.Configuration; import android.graphics.Bitmap; import android.graphics.Insets; import android.graphics.Rect; import android.hardware.display.DisplayManager; import android.media.AudioAttributes; +import android.media.AudioManager; import android.media.AudioSystem; +import android.media.MediaActionSound; import android.media.MediaPlayer; import android.net.Uri; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; +import android.os.VibrationEffect; +import android.os.Vibrator; import android.provider.Settings; import android.util.DisplayMetrics; import android.util.Log; @@ -95,6 +101,8 @@ import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.screenshot.ScreenshotController.SavedImageData.ActionTransition; import com.android.systemui.screenshot.TakeScreenshotService.RequestCallback; +import com.android.systemui.shared.system.ActivityManagerWrapper; +import com.android.systemui.shared.system.TaskStackChangeListener; import com.android.systemui.util.Assert; import com.google.common.util.concurrent.ListenableFuture; @@ -142,7 +150,7 @@ public void onAnimationStart( } @Override - public void onAnimationCancelled() { + public void onAnimationCancelled(boolean isKeyguardOccluded) { } }; @@ -165,6 +173,7 @@ void clearImage() { */ static class SavedImageData { public Uri uri; + public Supplier viewTransition; public Supplier shareTransition; public Supplier editTransition; public Notification.Action deleteAction; @@ -228,6 +237,7 @@ interface TransitionDestination { // ScreenshotNotificationSmartActionsProvider. static final String EXTRA_ACTION_TYPE = "android:screenshot_action_type"; static final String EXTRA_ID = "android:screenshot_id"; + static final String ACTION_TYPE_VIEW = "View"; static final String ACTION_TYPE_DELETE = "Delete"; static final String ACTION_TYPE_SHARE = "Share"; static final String ACTION_TYPE_EDIT = "Edit"; @@ -257,6 +267,8 @@ interface TransitionDestination { private final WindowManager.LayoutParams mWindowLayoutParams; private final AccessibilityManager mAccessibilityManager; private final ListenableFuture mCameraSound; + private final AudioManager mAudioManager; + private final Vibrator mVibrator; private final ScrollCaptureClient mScrollCaptureClient; private final PhoneWindow mWindow; private final DisplayManager mDisplayManager; @@ -285,6 +297,34 @@ interface TransitionDestination { | ActivityInfo.CONFIG_SCREEN_LAYOUT | ActivityInfo.CONFIG_ASSETS_PATHS); + private ComponentName mTaskComponentName; + private PackageManager mPm; + + private final TaskStackChangeListener mTaskListener = new TaskStackChangeListener() { + @Override + public void onTaskStackChanged() { + mBgExecutor.execute(() -> { + try { + final ActivityTaskManager.RootTaskInfo focusedStack = + ActivityTaskManager.getService().getFocusedRootTaskInfo(); + if (focusedStack != null && focusedStack.topActivity != null) { + mTaskComponentName = focusedStack.topActivity; + } + } catch (Exception e) {} + }); + } + }; + + private String getForegroundAppLabel() { + if (mTaskComponentName != null) { + try { + final ActivityInfo ai = mPm.getActivityInfo(mTaskComponentName, 0); + return ai.applicationInfo.loadLabel(mPm).toString(); + } catch (PackageManager.NameNotFoundException e) {} + } + return null; + } + @Inject ScreenshotController( Context context, @@ -342,6 +382,19 @@ interface TransitionDestination { // Setup the Camera shutter sound mCameraSound = loadCameraSound(); + // Grab system services needed for screenshot sound + mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); + mVibrator = (Vibrator) mContext.getSystemService(Context.VIBRATOR_SERVICE); + + // Grab PackageManager + mPm = mContext.getPackageManager(); + + // Register task stack listener + ActivityManagerWrapper.getInstance().registerTaskStackListener(mTaskListener); + + // Initialize current foreground package name + mTaskListener.onTaskStackChanged(); + mCopyBroadcastReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { @@ -762,6 +815,7 @@ private void runBatchScrollCapture(ScrollCaptureResponse response) { mScreenshotView.startLongScreenshotTransition( transitionDestination, onTransitionEnd, longScreenshot)); + mLongScreenshotHolder.setForegroundAppName(getForegroundAppLabel()); final Intent intent = new Intent(mContext, LongScreenshotActivity.class); intent.setFlags( @@ -856,7 +910,8 @@ private void playCameraSound() { try { MediaPlayer player = mCameraSound.get(); if (player != null) { - player.start(); + if (Settings.System.getInt(mContext.getContentResolver(), Settings.System.SCREENSHOT_SOUND, 1) == 1) + player.start(); } } catch (InterruptedException | ExecutionException e) { } @@ -868,8 +923,21 @@ private void playCameraSound() { * failure). */ private void saveScreenshotAndToast(Consumer finisher) { - // Play the shutter sound to notify that we've taken a screenshot - playCameraSound(); + switch (mAudioManager.getRingerMode()) { + case AudioManager.RINGER_MODE_SILENT: + // do nothing + break; + case AudioManager.RINGER_MODE_VIBRATE: + if (mVibrator != null && mVibrator.hasVibrator()) { + mVibrator.vibrate(VibrationEffect.createOneShot(50, + VibrationEffect.DEFAULT_AMPLITUDE)); + } + break; + case AudioManager.RINGER_MODE_NORMAL: + // Play the shutter sound to notify that we've taken a screenshot + playCameraSound(); + break; + } saveScreenshotInWorkerThread( /* onComplete */ finisher, @@ -902,8 +970,21 @@ private void startAnimation(Rect screenRect, boolean showFlash) { mScreenshotAnimation = mScreenshotView.createScreenshotDropInAnimation(screenRect, showFlash); - // Play the shutter sound to notify that we've taken a screenshot - playCameraSound(); + switch (mAudioManager.getRingerMode()) { + case AudioManager.RINGER_MODE_SILENT: + // do nothing + break; + case AudioManager.RINGER_MODE_VIBRATE: + if (mVibrator != null && mVibrator.hasVibrator()) { + mVibrator.vibrate(VibrationEffect.createOneShot(50, + VibrationEffect.DEFAULT_AMPLITUDE)); + } + break; + case AudioManager.RINGER_MODE_NORMAL: + // Play the shutter sound to notify that we've taken a screenshot + playCameraSound(); + break; + } if (DEBUG_ANIM) { Log.d(TAG, "starting post-screenshot animation"); @@ -957,7 +1038,7 @@ private void saveScreenshotInWorkerThread(Consumer finisher, mSaveInBgTask = new SaveImageInBackgroundTask(mContext, mImageExporter, mScreenshotSmartActions, data, getActionTransitionSupplier()); - mSaveInBgTask.execute(); + mSaveInBgTask.execute(getForegroundAppLabel()); } diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotEvent.java b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotEvent.java index 8b5a24c0e2ff..218428bb9183 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotEvent.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotEvent.java @@ -52,6 +52,8 @@ public enum ScreenshotEvent implements UiEventLogger.UiEventEnum { SCREENSHOT_EDIT_TAPPED(308), @UiEvent(doc = "screenshot share button tapped") SCREENSHOT_SHARE_TAPPED(309), + @UiEvent(doc = "screenshot delete button tapped") + SCREENSHOT_DELETE_TAPPED(369), @UiEvent(doc = "screenshot smart action chip tapped") SCREENSHOT_SMART_ACTION_TAPPED(374), @UiEvent(doc = "screenshot scroll tapped") diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotView.java b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotView.java index 5e7fc6faef1f..5322448d848f 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotView.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotView.java @@ -156,6 +156,7 @@ interface ScreenshotViewCallback { private OverlayActionChip mEditChip; private OverlayActionChip mScrollChip; private OverlayActionChip mQuickShareChip; + private OverlayActionChip mDeleteChip; private UiEventLogger mUiEventLogger; private ScreenshotViewCallback mCallbacks; @@ -174,6 +175,7 @@ interface ScreenshotViewCallback { private enum PendingInteraction { PREVIEW, EDIT, + DELETE, SHARE, QUICK_SHARE } @@ -365,6 +367,7 @@ protected void onFinishInflate() { mShareChip = requireNonNull(mActionsContainer.findViewById(R.id.screenshot_share_chip)); mEditChip = requireNonNull(mActionsContainer.findViewById(R.id.screenshot_edit_chip)); mScrollChip = requireNonNull(mActionsContainer.findViewById(R.id.screenshot_scroll_chip)); + mDeleteChip = requireNonNull(mActionsContainer.findViewById(R.id.screenshot_delete_chip)); int swipePaddingPx = (int) FloatingWindowUtil.dpToPx(mDisplayMetrics, SWIPE_PADDING_DP); TouchDelegate previewDelegate = new TouchDelegate( @@ -677,6 +680,7 @@ ValueAnimator createScreenshotActionsShadeAnimation() { if (mQuickShareChip != null) { mQuickShareChip.setIsPending(false); } + mDeleteChip.setIsPending(false); mPendingInteraction = PendingInteraction.SHARE; }); chips.add(mShareChip); @@ -691,16 +695,31 @@ ValueAnimator createScreenshotActionsShadeAnimation() { if (mQuickShareChip != null) { mQuickShareChip.setIsPending(false); } + mDeleteChip.setIsPending(false); mPendingInteraction = PendingInteraction.EDIT; }); chips.add(mEditChip); + mDeleteChip.setContentDescription(mContext.getString(R.string.screenshot_delete_label)); + mDeleteChip.setIcon(Icon.createWithResource(mContext, R.drawable.ic_screenshot_delete), true); + mDeleteChip.setOnClickListener(v -> { + mDeleteChip.setIsPending(true); + mEditChip.setIsPending(false); + mShareChip.setIsPending(false); + if (mQuickShareChip != null) { + mQuickShareChip.setIsPending(false); + } + mPendingInteraction = PendingInteraction.DELETE; + }); + chips.add(mDeleteChip); + mScreenshotPreview.setOnClickListener(v -> { mShareChip.setIsPending(false); mEditChip.setIsPending(false); if (mQuickShareChip != null) { mQuickShareChip.setIsPending(false); } + mDeleteChip.setIsPending(false); mPendingInteraction = PendingInteraction.PREVIEW; }); @@ -778,10 +797,14 @@ void setChipIntents(ScreenshotController.SavedImageData imageData) { startSharedTransition( imageData.editTransition.get()); }); + mDeleteChip.setPendingIntent(imageData.deleteAction.actionIntent, () -> { + mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_DELETE_TAPPED); + animateDismissal(); + }); mScreenshotPreview.setOnClickListener(v -> { mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_PREVIEW_TAPPED, 0, mPackageName); startSharedTransition( - imageData.editTransition.get()); + imageData.viewTransition.get()); }); if (mQuickShareChip != null) { mQuickShareChip.setPendingIntent(imageData.quickShareAction.actionIntent, @@ -803,6 +826,9 @@ void setChipIntents(ScreenshotController.SavedImageData imageData) { case EDIT: mEditChip.callOnClick(); break; + case DELETE: + mDeleteChip.callOnClick(); + break; case QUICK_SHARE: mQuickShareChip.callOnClick(); break; @@ -838,6 +864,7 @@ void addQuickShareChip(Notification.Action quickShareAction) { mQuickShareChip.setOnClickListener(v -> { mShareChip.setIsPending(false); mEditChip.setIsPending(false); + mDeleteChip.setIsPending(false); mQuickShareChip.setIsPending(true); mPendingInteraction = PendingInteraction.QUICK_SHARE; }); @@ -1020,8 +1047,10 @@ void reset() { mShareChip.setOnClickListener(null); mScrollingScrim.setVisibility(View.GONE); mEditChip.setOnClickListener(null); + mDeleteChip.setOnClickListener(null); mShareChip.setIsPending(false); mEditChip.setIsPending(false); + mDeleteChip.setIsPending(false); mPendingInteraction = null; for (OverlayActionChip chip : mSmartChips) { mActionsView.removeView(chip); diff --git a/packages/SystemUI/src/com/android/systemui/scrim/ScrimDrawable.java b/packages/SystemUI/src/com/android/systemui/scrim/ScrimDrawable.java index bbba0071094b..b0a3230f0e9c 100644 --- a/packages/SystemUI/src/com/android/systemui/scrim/ScrimDrawable.java +++ b/packages/SystemUI/src/com/android/systemui/scrim/ScrimDrawable.java @@ -39,7 +39,7 @@ */ public class ScrimDrawable extends Drawable { private static final String TAG = "ScrimDrawable"; - private static final long COLOR_ANIMATION_DURATION = 2000; + private static final long COLOR_ANIMATION_DURATION = 375; private final Paint mPaint; private int mAlpha = 255; diff --git a/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessController.java b/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessController.java index 7801c68586f1..4cf73da49294 100644 --- a/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessController.java +++ b/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessController.java @@ -41,6 +41,7 @@ import android.service.vr.IVrStateCallbacks; import android.util.Log; import android.util.MathUtils; +import android.widget.ImageView; import com.android.internal.display.BrightnessSynchronizer; import com.android.internal.logging.MetricsLogger; @@ -57,6 +58,7 @@ public class BrightnessController implements ToggleSlider.Listener, MirroredBrig private static final String TAG = "CentralSurfaces.BrightnessController"; private static final int SLIDER_ANIMATION_DURATION = 3000; + private static final int MSG_UPDATE_ICON = 0; private static final int MSG_UPDATE_SLIDER = 1; private static final int MSG_ATTACH_LISTENER = 2; private static final int MSG_DETACH_LISTENER = 3; @@ -70,6 +72,7 @@ public class BrightnessController implements ToggleSlider.Listener, MirroredBrig private final float mMinimumBacklightForVr; private final float mMaximumBacklightForVr; + private final ImageView mIcon; private final int mDisplayId; private final Context mContext; private final ToggleSlider mControl; @@ -216,6 +219,7 @@ public void run() { Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL, UserHandle.USER_CURRENT); mAutomatic = automatic != Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL; + mHandler.obtainMessage(MSG_UPDATE_ICON, mAutomatic ? 1 : 0).sendToTarget(); } }; @@ -254,6 +258,9 @@ public void handleMessage(Message msg) { mExternalChange = true; try { switch (msg.what) { + case MSG_UPDATE_ICON: + updateIcon(msg.arg1 != 0); + break; case MSG_UPDATE_SLIDER: updateSlider(Float.intBitsToFloat(msg.arg1), msg.arg2 != 0); break; @@ -303,6 +310,13 @@ public void onUserSwitched(int newUserId) { mDisplayManager = context.getSystemService(DisplayManager.class); mVrManager = IVrManager.Stub.asInterface(ServiceManager.getService( Context.VR_SERVICE)); + + mIcon = control.getIcon(); + mIcon.setOnClickListener(v -> Settings.System.putIntForUser(mContext.getContentResolver(), + Settings.System.SCREEN_BRIGHTNESS_MODE, mAutomatic ? + Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL : + Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC, + UserHandle.USER_CURRENT)); } public void registerCallbacks() { @@ -317,6 +331,7 @@ public void unregisterCallbacks() { @Override public void onChanged(boolean tracking, int value, boolean stopTracking) { + updateIcon(mAutomatic); if (mExternalChange) return; if (mSliderAnimator != null) { @@ -381,6 +396,14 @@ private void setBrightness(float brightness) { mDisplayManager.setTemporaryBrightness(mDisplayId, brightness); } + private void updateIcon(boolean automatic) { + if (mIcon != null) { + mIcon.setImageResource(mAutomatic ? + com.android.systemui.R.drawable.ic_qs_brightness_auto_on : + com.android.systemui.R.drawable.ic_qs_brightness_auto_off); + } + } + private void updateVrMode(boolean isEnabled) { if (mIsVrModeEnabled != isEnabled) { mIsVrModeEnabled = isEnabled; diff --git a/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessSliderController.java b/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessSliderController.java index 6c8190af27f7..d6db4d4db6ef 100644 --- a/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessSliderController.java +++ b/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessSliderController.java @@ -21,6 +21,7 @@ import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; +import android.widget.ImageView; import android.widget.SeekBar; import androidx.annotation.Nullable; @@ -49,6 +50,7 @@ public class BrightnessSliderController extends ViewController mCallbacks = new ArrayList<>(); - private Handler mHandler = new H(Looper.getMainLooper()); + private final ArrayList mCallbacks = new ArrayList<>(); + private final Handler mHandler = new H(Looper.getMainLooper()); /** A map of display id - disable flag pair */ - private SparseArray> mDisplayDisabled = new SparseArray<>(); + private final SparseArray> mDisplayDisabled = new SparseArray<>(); /** * The last ID of the display where IME window for which we received setImeWindowStatus * event. @@ -208,6 +212,7 @@ default void disable(int displayId, @DisableFlags int state1, @Disable2Flags int default void animateExpandNotificationsPanel() { } default void animateCollapsePanels(int flags, boolean force) { } default void togglePanel() { } + default void toggleSettingsPanel() { } default void animateExpandSettingsPanel(String obj) { } /** @@ -298,7 +303,7 @@ default void handleSystemKey(int arg1) { } default void showPinningEnterExitToast(boolean entering) { } default void showPinningEscapeToast() { } default void handleShowGlobalActionsMenu() { } - default void handleShowShutdownUi(boolean isReboot, String reason) { } + default void handleShowShutdownUi(boolean isReboot, String reason, boolean rebootCustom) { } default void showWirelessChargingAnimation(int batteryLevel) { } @@ -477,6 +482,10 @@ default void registerNearbyMediaDevicesProvider( */ default void unregisterNearbyMediaDevicesProvider( @NonNull INearbyMediaDevicesProvider provider) {} + + default void toggleCameraFlash() { } + default void killForegroundApp() { } + default void setBlockedGesturalNavigation(boolean blocked) {} } public CommandQueue(Context context) { @@ -645,6 +654,13 @@ public void togglePanel() { } } + public void toggleSettingsPanel() { + synchronized (mLock) { + mHandler.removeMessages(MSG_TOGGLE_SETTINGS_PANEL); + mHandler.obtainMessage(MSG_TOGGLE_SETTINGS_PANEL, 0, 0).sendToTarget(); + } + } + public void animateExpandSettingsPanel(String subPanel) { synchronized (mLock) { mHandler.removeMessages(MSG_EXPAND_SETTINGS); @@ -896,10 +912,10 @@ public void setTopAppHidesStatusBar(boolean hidesStatusBar) { } @Override - public void showShutdownUi(boolean isReboot, String reason) { + public void showShutdownUi(boolean isReboot, String reason, boolean rebootCustom) { synchronized (mLock) { mHandler.removeMessages(MSG_SHOW_SHUTDOWN_UI); - mHandler.obtainMessage(MSG_SHOW_SHUTDOWN_UI, isReboot ? 1 : 0, 0, reason) + mHandler.obtainMessage(MSG_SHOW_SHUTDOWN_UI, isReboot ? 1 : 0, rebootCustom ? 1 : 0, reason) .sendToTarget(); } } @@ -1266,6 +1282,33 @@ public void unregisterNearbyMediaDevicesProvider( .sendToTarget(); } + @Override + public void toggleCameraFlash() { + synchronized (mLock) { + if (mHandler.hasMessages(MSG_TOGGLE_CAMERA_FLASH)) { + mHandler.removeMessages(MSG_TOGGLE_CAMERA_FLASH); + } + mHandler.sendEmptyMessage(MSG_TOGGLE_CAMERA_FLASH); + } + } + + @Override + public void killForegroundApp() { + synchronized (mLock) { + mHandler.removeMessages(MSG_KILL_FOREGROUND_APP); + mHandler.sendEmptyMessage(MSG_KILL_FOREGROUND_APP); + } + } + + public void setBlockedGesturalNavigation(boolean blocked) { + synchronized (mLock) { + if (mHandler.hasMessages(MSG_SET_BLOCKED_GESTURAL_NAVIGATION)) { + mHandler.removeMessages(MSG_SET_BLOCKED_GESTURAL_NAVIGATION); + } + mHandler.obtainMessage(MSG_SET_BLOCKED_GESTURAL_NAVIGATION, blocked).sendToTarget(); + } + } + private final class H extends Handler { private H(Looper l) { super(l); @@ -1313,6 +1356,11 @@ public void handleMessage(Message msg) { mCallbacks.get(i).togglePanel(); } break; + case MSG_TOGGLE_SETTINGS_PANEL: + for (int i = 0; i < mCallbacks.size(); i++) { + mCallbacks.get(i).toggleSettingsPanel(); + } + break; case MSG_EXPAND_SETTINGS: for (int i = 0; i < mCallbacks.size(); i++) { mCallbacks.get(i).animateExpandSettingsPanel((String) msg.obj); @@ -1448,7 +1496,7 @@ public void handleMessage(Message msg) { break; case MSG_SHOW_SHUTDOWN_UI: for (int i = 0; i < mCallbacks.size(); i++) { - mCallbacks.get(i).handleShowShutdownUi(msg.arg1 != 0, (String) msg.obj); + mCallbacks.get(i).handleShowShutdownUi(msg.arg1 != 0, (String) msg.obj, msg.arg2 != 0); } break; case MSG_SET_TOP_APP_HIDES_STATUS_BAR: @@ -1712,6 +1760,17 @@ public void handleMessage(Message msg) { mCallbacks.get(i).requestTileServiceListeningState(component); } break; + case MSG_TOGGLE_CAMERA_FLASH: + mCallbacks.forEach(cb -> cb.toggleCameraFlash()); + break; + case MSG_KILL_FOREGROUND_APP: + for (int i = 0; i < mCallbacks.size(); i++) { + mCallbacks.get(i).killForegroundApp(); + } + break; + case MSG_SET_BLOCKED_GESTURAL_NAVIGATION: + mCallbacks.forEach(cb -> cb.setBlockedGesturalNavigation((Boolean) msg.obj)); + break; } } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/EdgeLightView.kt b/packages/SystemUI/src/com/android/systemui/statusbar/EdgeLightView.kt new file mode 100644 index 000000000000..df5ee7ab51a0 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/EdgeLightView.kt @@ -0,0 +1,168 @@ +/* + * Copyright (C) 2022 FlamingoOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +package com.android.systemui.statusbar + +import android.content.Context +import android.graphics.Color +import android.util.AttributeSet +import android.view.animation.Animation +import android.view.animation.ScaleAnimation +import android.widget.ImageView +import android.widget.RelativeLayout + +import com.android.systemui.R + +class EdgeLightView @JvmOverloads constructor( + context: Context, + attrs: AttributeSet? = null, + defStyleRes: Int = 0, + defStyleAttr: Int = 0, +) : RelativeLayout(context, attrs, defStyleRes, defStyleAttr) { + + private var leftView: ImageView? = null + private var rightView: ImageView? = null + private var animating = false + private var repeatCount = 0 + // Incremented during each animation cycle + // Reset when hidden or exceeds [repeatCount] + private var counter = 0 + + private var color: Int = Color.WHITE + + // Vertical expansion animation + private val expandAnimation = ScaleAnimation( + 1f /** fromX */, 1f /** toX */, + 0f /** fromY */, 1f /** toY */, + Animation.RELATIVE_TO_SELF /** pivotXType */, 0f /** pivotX */, + Animation.RELATIVE_TO_SELF /** pivotYType */, 0.5f /** pivotY */ + ) + + // Horiozontal collapse animation to the edges, + // right after vertical expansion animation + private val collapseAnimationLeft = ScaleAnimation( + 1f /** fromX */, 0f /** toX */, + 1f /** fromY */, 1f /** toY */, + Animation.RELATIVE_TO_SELF /** pivotXType */, 0f /** pivotX */, + Animation.RELATIVE_TO_SELF /** pivotYType */, 0f /** pivotY */ + ) + private val collapseAnimationRight = ScaleAnimation( + 1f /** fromX */, 0f /** toX */, + 1f /** fromY */, 1f /** toY */, + Animation.RELATIVE_TO_SELF /** pivotXType */, 1f /** pivotX */, + Animation.RELATIVE_TO_SELF /** pivotYType */, 0f /** pivotY */ + ) + + // Convenience extension function to reduce some boilerplate + inline fun Animation.addListener( + crossinline onStart: (Animation?) -> Unit = {}, + crossinline onEnd: (Animation?) -> Unit = {}, + crossinline onRepeat: (Animation?) -> Unit = {}, + ) { + setAnimationListener(object : Animation.AnimationListener { + override fun onAnimationStart(animation: Animation?) = onStart(animation) + override fun onAnimationEnd(animation: Animation?) = onEnd(animation) + override fun onAnimationRepeat(animation: Animation?) = onRepeat(animation) + }) + } + + init { + expandAnimation.addListener( + onStart = { + animating = true + }, + onEnd = { + leftView?.startAnimation(collapseAnimationLeft) + rightView?.startAnimation(collapseAnimationRight) + } + ) + collapseAnimationLeft.addListener(onEnd = { + if (repeatCount == Animation.INFINITE) { + leftView?.startAnimation(expandAnimation) + } else { + if (visibility == VISIBLE) visibility = GONE + animating = false + } + }) + collapseAnimationRight.addListener(onEnd = { + if (repeatCount == Animation.INFINITE) { + rightView?.startAnimation(expandAnimation) + } else { + if (visibility == VISIBLE) visibility = GONE + animating = false + } + }) + } + + override fun onAttachedToWindow() { + super.onAttachedToWindow() + leftView = findViewById(R.id.edge_light_start) + rightView = findViewById(R.id.edge_light_end) + setColor(color) + } + + /** + * Animate appear and repeat animation if specified with [setRepeatCount]. + */ + fun show() { + if (animating) return + if (visibility == GONE) visibility = VISIBLE + leftView?.startAnimation(expandAnimation) + rightView?.startAnimation(expandAnimation) + } + + /** + * Clear all animations and hide views + */ + fun hide() { + if (visibility == VISIBLE) visibility = GONE + if (!animating) return + leftView?.clearAnimation() + rightView?.clearAnimation() + animating = false + } + + /** + * Set vertical expansion animation duration + */ + fun setExpandAnimationDuration(duration: Long) { + expandAnimation.duration = duration + } + + /** + * Set horizontal collapse animation duration + */ + fun setCollapseAnimationDuration(duration: Long) { + collapseAnimationLeft.duration = duration + collapseAnimationRight.duration = duration + } + + /** + * Set repeat count for animation. + * Expected either 0 or Animation.INFINITE. + */ + fun setRepeatCount(repeatCount: Int) { + this.repeatCount = repeatCount + } + + fun setColor(color: Int) { + // If this method is called before the view is attached then it'll have + // no effect, so we store this color and call it from [onAttachedToWindow] + this.color = color + leftView?.setColorFilter(color) + rightView?.setColorFilter(color) + } +} \ No newline at end of file diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/GestureRecorder.java b/packages/SystemUI/src/com/android/systemui/statusbar/GestureRecorder.java index a49af47f4803..4adb8868c0b7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/GestureRecorder.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/GestureRecorder.java @@ -33,7 +33,7 @@ * Convenience class for capturing gestures for later analysis. */ public class GestureRecorder { - public static final boolean DEBUG = true; // for now + public static final boolean DEBUG = false; // for now public static final String TAG = GestureRecorder.class.getSimpleName(); public class Gesture { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java index 1fb771ef2991..aa56f534191b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java @@ -56,6 +56,7 @@ import android.os.RemoteException; import android.os.UserHandle; import android.os.UserManager; +import android.provider.Settings; import android.text.TextUtils; import android.text.format.Formatter; import android.util.Log; @@ -162,10 +163,13 @@ public class KeyguardIndicationController { private boolean mBatteryOverheated; private boolean mEnableBatteryDefender; private int mChargingSpeed; - private int mChargingWattage; + private double mChargingWattage; private int mBatteryLevel; private boolean mBatteryPresent = true; private long mChargingTimeRemaining; + private int mChargingCurrent; + private double mChargingVoltage; + private float mTemperature; private String mMessageToShowOnScreenOn; private boolean mInited; @@ -826,6 +830,16 @@ protected String computePowerIndication() { ? R.string.keyguard_indication_charging_time_fast : R.string.keyguard_plugged_in_charging_fast; break; + case BatteryStatus.CHARGING_DASH: + chargingId = hasChargingTime + ? R.string.keyguard_indication_dash_charging_time + : R.string.keyguard_plugged_in_dash_charging; + break; + case BatteryStatus.CHARGING_WARP: + chargingId = hasChargingTime + ? R.string.keyguard_indication_warp_charging_time + : R.string.keyguard_plugged_in_warp_charging; + break; case BatteryStatus.CHARGING_SLOWLY: chargingId = hasChargingTime ? R.string.keyguard_indication_charging_time_slowly @@ -851,14 +865,45 @@ protected String computePowerIndication() { : R.string.keyguard_plugged_in; } + String batteryInfo = ""; + int current = 0; + double voltage = 0; + boolean showbatteryInfo = Settings.System.getIntForUser(mContext.getContentResolver(), + Settings.System.LOCKSCREEN_BATTERY_INFO, 1, UserHandle.USER_CURRENT) == 1; + if (showbatteryInfo) { + if (mChargingCurrent > 0) { + current = (mChargingCurrent < 5 ? (mChargingCurrent * 1000) + : (mChargingCurrent < 4000 ? mChargingCurrent : (mChargingCurrent / 1000))); + batteryInfo = batteryInfo + current + "mA"; + } + if (mChargingVoltage > 0 && mChargingCurrent > 0) { + voltage = mChargingVoltage / 1000 / 1000; + batteryInfo = (batteryInfo == "" ? "" : batteryInfo + " · ") + + String.format("%.1f" , ((double) current / 1000) * voltage) + "W"; + } + if (mChargingVoltage > 0) { + batteryInfo = (batteryInfo == "" ? "" : batteryInfo + " · ") + + String.format("%.1f" , voltage) + "V"; + } + if (mTemperature > 0) { + batteryInfo = (batteryInfo == "" ? "" : batteryInfo + " · ") + + mTemperature / 10 + "°C"; + } + if (batteryInfo != "") { + batteryInfo = "\n" + batteryInfo; + } + } + String percentage = NumberFormat.getPercentInstance().format(mBatteryLevel / 100f); if (hasChargingTime) { String chargingTimeFormatted = Formatter.formatShortElapsedTimeRoundingUpToMinutes( mContext, mChargingTimeRemaining); - return mContext.getResources().getString(chargingId, chargingTimeFormatted, + String chargingText = mContext.getResources().getString(chargingId, chargingTimeFormatted, percentage); + return chargingText + batteryInfo; } else { - return mContext.getResources().getString(chargingId, percentage); + String chargingText = mContext.getResources().getString(chargingId, percentage); + return chargingText + batteryInfo; } } @@ -948,8 +993,11 @@ public void onRefreshBatteryInfo(BatteryStatus status) { mPowerPluggedInDock = status.isPluggedInDock() && isChargingOrFull; mPowerPluggedIn = status.isPluggedIn() && isChargingOrFull; mPowerCharged = status.isCharged(); + mChargingCurrent = status.maxChargingCurrent; + mChargingVoltage = status.maxChargingVoltage; mChargingWattage = status.maxChargingWattage; mChargingSpeed = status.getChargingSpeed(mContext); + mTemperature = status.temperature; mBatteryLevel = status.level; mBatteryPresent = status.present; mBatteryOverheated = status.isOverheated(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerImpl.java index 38a208b72edc..f4ca7edb146d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerImpl.java @@ -642,6 +642,8 @@ public void updatePublicMode() { // - device keyguard is shown in secure mode; // - profile is locked with a work challenge. SparseArray currentProfiles = getCurrentProfiles(); + SparseBooleanArray oldPublicModes = mLockscreenPublicMode.clone(); + SparseBooleanArray oldWorkChallenges = mUsersWithSeparateWorkChallenge.clone(); mUsersWithSeparateWorkChallenge.clear(); for (int i = currentProfiles.size() - 1; i >= 0; i--) { final int userId = currentProfiles.valueAt(i).id; @@ -660,7 +662,10 @@ public void updatePublicMode() { } getEntryManager().updateNotifications("NotificationLockscreenUserManager.updatePublicMode"); // TODO(b/234738798): Migrate KeyguardNotificationVisibilityProvider to use this listener - // notifyNotificationStateChanged(); + if (!mLockscreenPublicMode.equals(oldPublicModes) + || !mUsersWithSeparateWorkChallenge.equals(oldWorkChallenges)) { + notifyNotificationStateChanged(); + } } @Override diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java index 054543c7d2b1..794ee76f6428 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java @@ -207,13 +207,15 @@ public void updateNotificationViews() { || !mLockscreenUserManager.needsSeparateWorkChallenge(userId))) { userPublic = false; } - boolean needsRedaction = mLockscreenUserManager.needsRedaction(ent); + final boolean hideContents = ent.getSbn().getIsContentSecure(); + boolean needsRedaction = hideContents || mLockscreenUserManager.needsRedaction(ent); boolean sensitive = userPublic && needsRedaction; boolean deviceSensitive = devicePublic && !mLockscreenUserManager.userAllowsPrivateNotificationsInPublic( currentUserId); - ent.setSensitive(sensitive, deviceSensitive); + ent.setSensitive(sensitive, hideContents || deviceSensitive); ent.getRow().setNeedsRedaction(needsRedaction); + ent.getRow().setForceHideContents(hideContents); mLowPriorityInflationHelper.recheckLowPriorityViewAndInflate(ent, ent.getRow()); boolean isChildInGroup = mGroupManager.isChildInGroup(ent); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputNotificationRebuilder.java b/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputNotificationRebuilder.java index 90abec17771c..a05c5bbf6f86 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputNotificationRebuilder.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputNotificationRebuilder.java @@ -134,8 +134,7 @@ StatusBarNotification rebuildWithRemoteInputInserted(NotificationEntry entry, newNotification, sbn.getUser(), sbn.getOverrideGroupKey(), - sbn.getPostTime()); + sbn.getPostTime(), + sbn.getIsContentSecure()); } - - } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java index 3013ad0070a0..86d233f65e20 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java @@ -63,6 +63,8 @@ public class StatusBarMobileView extends FrameLayout implements DarkReceiver, private boolean mForceHidden; private boolean mProviderModel; + private ImageView mVolte; + /** * Designated constructor */ @@ -108,6 +110,12 @@ public void getDrawingRect(Rect outRect) { outRect.bottom += translationY; } + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + mMobileGroup.measure(widthMeasureSpec, heightMeasureSpec); + setMeasuredDimension(mMobileGroup.getMeasuredWidth(), mMobileGroup.getMeasuredHeight()); + } + private void init(boolean providerModel) { mProviderModel = providerModel; mDualToneHandler = new DualToneHandler(getContext()); @@ -123,6 +131,7 @@ private void init(boolean providerModel) { mIn = findViewById(R.id.mobile_in); mOut = findViewById(R.id.mobile_out); mInoutContainer = findViewById(R.id.inout_container); + mVolte = findViewById(R.id.mobile_volte); mMobileDrawable = new SignalDrawable(getContext()); mMobile.setImageDrawable(mMobileDrawable); @@ -166,7 +175,12 @@ private void initViewState() { } else { mMobileGroup.setVisibility(View.VISIBLE); } - mMobileDrawable.setLevel(mState.strengthId); + if (mState.strengthId > 0) { + mMobile.setVisibility(View.VISIBLE); + mMobileDrawable.setLevel(mState.strengthId); + }else { + mMobile.setVisibility(View.GONE); + } if (mState.typeId > 0) { mMobileType.setContentDescription(mState.typeContentDescription); mMobileType.setImageResource(mState.typeId); @@ -181,6 +195,12 @@ private void initViewState() { mOut.setVisibility(mState.activityOut ? View.VISIBLE : View.GONE); mInoutContainer.setVisibility((mState.activityIn || mState.activityOut) ? View.VISIBLE : View.GONE); + if (mState.volteId > 0 ) { + mVolte.setImageResource(mState.volteId); + mVolte.setVisibility(View.VISIBLE); + }else { + mVolte.setVisibility(View.GONE); + } } private boolean updateState(MobileIconState state) { @@ -192,8 +212,11 @@ private boolean updateState(MobileIconState state) { mMobileGroup.setVisibility(newVisibility); needsLayout = true; } - if (mState.strengthId != state.strengthId) { + if (state.strengthId > 0) { mMobileDrawable.setLevel(state.strengthId); + mMobile.setVisibility(View.VISIBLE); + }else { + mMobile.setVisibility(View.GONE); } if (mState.typeId != state.typeId) { needsLayout |= state.typeId == 0 || mState.typeId == 0; @@ -214,6 +237,15 @@ private boolean updateState(MobileIconState state) { mInoutContainer.setVisibility((state.activityIn || state.activityOut) ? View.VISIBLE : View.GONE); + if (mState.volteId != state.volteId) { + if (state.volteId != 0) { + mVolte.setImageResource(state.volteId); + mVolte.setVisibility(View.VISIBLE); + } else { + mVolte.setVisibility(View.GONE); + } + } + needsLayout |= state.roaming != mState.roaming || state.activityIn != mState.activityIn || state.activityOut != mState.activityOut @@ -233,6 +265,7 @@ public void onDarkChanged(ArrayList areas, float darkIntensity, int tint) mOut.setImageTintList(color); mMobileType.setImageTintList(color); mMobileRoaming.setImageTintList(color); + mVolte.setImageTintList(color); mDotView.setDecorColor(tint); mDotView.setIconColor(tint, false); } @@ -254,6 +287,7 @@ public void setStaticDrawableColor(int color) { mOut.setImageTintList(list); mMobileType.setImageTintList(list); mMobileRoaming.setImageTintList(list); + mVolte.setImageTintList(list); mDotView.setDecorColor(color); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileSignalController.java index 9d8667a3ccb0..584abd8d1221 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileSignalController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileSignalController.java @@ -19,16 +19,29 @@ import static com.android.settingslib.mobile.MobileMappings.getIconKey; import static com.android.settingslib.mobile.MobileMappings.mapIconSets; +import android.content.BroadcastReceiver; +import android.content.ContentResolver; import android.content.Context; import android.content.Intent; +import android.content.IntentFilter; +import android.content.res.Resources; import android.database.ContentObserver; +import android.graphics.drawable.Drawable; import android.net.NetworkCapabilities; import android.os.Handler; import android.os.Looper; +import android.os.UserHandle; +import android.provider.Settings; import android.provider.Settings.Global; import android.telephony.AccessNetworkConstants; import android.telephony.CellSignalStrength; import android.telephony.CellSignalStrengthCdma; +import android.telephony.NetworkRegistrationInfo; +import android.telephony.ims.ImsMmTelManager; +import android.telephony.ims.ImsReasonInfo; +import android.telephony.ims.feature.ImsFeature; +import android.telephony.ims.feature.MmTelFeature; +import android.telephony.PhoneStateListener; import android.telephony.ServiceState; import android.telephony.SignalStrength; import android.telephony.SubscriptionInfo; @@ -38,15 +51,18 @@ import android.telephony.ims.ImsMmTelManager; import android.telephony.ims.ImsReasonInfo; import android.telephony.ims.ImsRegistrationAttributes; +import android.telephony.ims.ImsStateCallback; import android.telephony.ims.RegistrationManager.RegistrationCallback; import android.text.Html; import android.text.TextUtils; import android.util.Log; +import com.android.internal.util.ConcurrentUtils; import com.android.internal.annotations.VisibleForTesting; import com.android.settingslib.AccessibilityContentDescriptions; import com.android.settingslib.SignalIcon.MobileIconGroup; import com.android.settingslib.graph.SignalDrawable; +import com.android.settingslib.mobile.MobileMappings; import com.android.settingslib.mobile.MobileMappings.Config; import com.android.settingslib.mobile.MobileStatusTracker; import com.android.settingslib.mobile.MobileStatusTracker.MobileStatus; @@ -54,12 +70,14 @@ import com.android.settingslib.mobile.TelephonyIcons; import com.android.settingslib.net.SignalStrengthUtil; import com.android.systemui.R; +import com.android.systemui.dagger.qualifiers.Background; import com.android.systemui.flags.FeatureFlags; import com.android.systemui.flags.Flags; import com.android.systemui.util.CarrierConfigTracker; import java.io.PrintWriter; import java.text.SimpleDateFormat; +import java.util.ArrayList; import java.util.BitSet; import java.util.List; import java.util.Map; @@ -103,6 +121,20 @@ public class MobileSignalController extends SignalController= 1)) { + typeIcon = vowifiIconGroup.dataType; + statusIcon = new IconState(true, + mCurrentState.enabled && !mCurrentState.airplaneMode? statusIcon.icon : -1, + statusIcon.contentDescription); + } showTriangle = showDataIconStatusBar && !mCurrentState.airplaneMode; } else { statusIcon = new IconState( @@ -439,7 +673,15 @@ private SbInfo getSbInfo(String contentDescription, int dataTypeIcon) { boolean showDataIconInStatusBar = (mCurrentState.dataConnected && mCurrentState.isDefault) || dataDisabled; typeIcon = - (showDataIconInStatusBar || mConfig.alwaysShowDataRatIcon) ? dataTypeIcon : 0; + ((showDataIconInStatusBar || mConfig.alwaysShowDataRatIcon) && getVolteResId() == 0) ? dataTypeIcon : 0; + MobileIconGroup vowifiIconGroup = getVowifiIconGroup(); + if (vowifiIconGroup != null && (mVoWiFiIcon >= 1)) { + typeIcon = vowifiIconGroup.dataType; + statusIcon = new IconState(true, + mCurrentState.enabled && !mCurrentState.airplaneMode? statusIcon.icon : -1, + statusIcon.contentDescription); + } + showTriangle = mCurrentState.enabled && !mCurrentState.airplaneMode; } @@ -806,6 +1048,61 @@ void setImsType(int imsType) { mImsType = imsType; } + private boolean isCallIdle() { + return mCallState == TelephonyManager.CALL_STATE_IDLE; + } + + private int getDataNetworkType() { + return mCurrentState != null ? + mCurrentState.getDataNetworkType() : TelephonyManager.NETWORK_TYPE_UNKNOWN; + } + + public boolean isVowifiAvailable() { + return (mCurrentState.voiceCapable && mCurrentState.imsRegistered + && getDataNetworkType() == TelephonyManager.NETWORK_TYPE_IWLAN) + || mIsVowifiAvailable; + } + + private MobileIconGroup getVowifiIconGroup() { + if (isVowifiAvailable() && !isCallIdle()) { + return TelephonyIcons.VOWIFI_CALLING; + } else if (isVowifiAvailable()) { + switch(mVoWiFistyle) { + // OOS + case 1: + return TelephonyIcons.VOWIFI_ONEPLUS; + // Motorola + case 2: + return TelephonyIcons.VOWIFI_MOTO; + // ASUS + case 3: + return TelephonyIcons.VOWIFI_ASUS; + // EMUI (Huawei P10) + case 4: + return TelephonyIcons.VOWIFI_EMUI; + // Simple1 + case 5: + return TelephonyIcons.VOWIFI_Simple1; + // Simple2 + case 6: + return TelephonyIcons.VOWIFI_Simple2; + // Simple3 + case 7: + return TelephonyIcons.VOWIFI_Simple3; + // Vivo + case 8: + return TelephonyIcons.VOWIFI_VIVO; + // Margaritov + case 9: + return TelephonyIcons.VOWIFI_Margaritov; + default: + return TelephonyIcons.VOWIFI; + } + } else { + return null; + } + } + @Override public void dump(PrintWriter pw) { super.dump(pw); @@ -832,6 +1129,26 @@ public void dump(PrintWriter pw) { dumpTableData(pw); } + private final ImsStateCallback mImsStateCallback = new ImsStateCallback() { + @Override + public void onUnavailable(int reason) { + Log.d(mTag, "ImsStateCallback.onUnavailable: reason=" + reason); + removeListeners(); + } + + @Override + public void onAvailable() { + Log.d(mTag, "ImsStateCallback.onAvailable"); + setListeners(); + } + + @Override + public void onError() { + Log.e(mTag, "ImsStateCallback.onError"); + removeListeners(); + } + }; + /** Box for QS icon info */ private static final class QsInfo { final int ratTypeIcon; @@ -857,4 +1174,26 @@ private static final class SbInfo { icon = iconState; } } + + private ImsMmTelManager.CapabilityCallback mCapabilityCallback = new ImsMmTelManager.CapabilityCallback() { + @Override + public void onCapabilitiesStatusChanged(MmTelFeature.MmTelCapabilities config) { + mCurrentState.voiceCapable = + config.isCapable(MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_VOICE); + mCurrentState.videoCapable = + config.isCapable(MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_VIDEO); + Log.d(mTag, "onCapabilitiesStatusChanged isVoiceCapable=" + mCurrentState.voiceCapable + + " isVideoCapable=" + mCurrentState.videoCapable); + notifyListenersIfNecessary(); + } + }; + + private final BroadcastReceiver mVolteSwitchObserver = new BroadcastReceiver() { + public void onReceive(Context context, Intent intent) { + Log.d(mTag, "action=" + intent.getAction()); + if (mShowVolteIcon) { + notifyListeners(); + } + } + }; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileState.kt b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileState.kt index f20d20631c95..0f236816289c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileState.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileState.kt @@ -41,7 +41,10 @@ internal class MobileState( @JvmField var roaming: Boolean = false, @JvmField var dataState: Int = TelephonyManager.DATA_DISCONNECTED, // Tracks the on/off state of the defaultDataSubscription - @JvmField var defaultDataOff: Boolean = false + @JvmField var defaultDataOff: Boolean = false, + @JvmField var imsRegistered: Boolean = false, + @JvmField var voiceCapable: Boolean = false, + @JvmField var videoCapable: Boolean = false ) : ConnectivityState() { @JvmField var telephonyDisplayInfo = TelephonyDisplayInfo(TelephonyManager.NETWORK_TYPE_UNKNOWN, @@ -86,6 +89,9 @@ internal class MobileState( roaming = o.roaming dataState = o.dataState defaultDataOff = o.defaultDataOff + imsRegistered = o.imsRegistered + voiceCapable = o.voiceCapable + videoCapable = o.videoCapable telephonyDisplayInfo = o.telephonyDisplayInfo serviceState = o.serviceState @@ -125,6 +131,10 @@ internal class MobileState( return serviceState != null && serviceState!!.roaming } + fun getDataNetworkType(): Int { + return serviceState?.getDataNetworkType() ?: 0 + } + fun setFromMobileStatus(mobileStatus: MobileStatus) { activityIn = mobileStatus.activityIn activityOut = mobileStatus.activityOut @@ -151,6 +161,9 @@ internal class MobileState( builder.append("userSetup=$userSetup,") builder.append("dataState=$dataState,") builder.append("defaultDataOff=$defaultDataOff,") + builder.append("imsRegistered=$imsRegistered,") + builder.append("voiceCapable=$voiceCapable,") + builder.append("videoCapable=$videoCapable,") // Computed properties builder.append("showQuickSettingsRatIcon=${showQuickSettingsRatIcon()},") @@ -227,6 +240,9 @@ internal class MobileState( if (roaming != other.roaming) return false if (dataState != other.dataState) return false if (defaultDataOff != other.defaultDataOff) return false + if (imsRegistered != other.imsRegistered) return false + if (voiceCapable != other.voiceCapable) return false + if (videoCapable != other.videoCapable) return false if (telephonyDisplayInfo != other.telephonyDisplayInfo) return false if (serviceState != other.serviceState) return false if (signalStrength != other.signalStrength) return false @@ -248,6 +264,9 @@ internal class MobileState( result = 31 * result + roaming.hashCode() result = 31 * result + dataState result = 31 * result + defaultDataOff.hashCode() + result = 31 * result + imsRegistered.hashCode() + result = 31 * result + voiceCapable.hashCode() + result = 31 * result + videoCapable.hashCode() result = 31 * result + telephonyDisplayInfo.hashCode() result = 31 * result + (serviceState?.hashCode() ?: 0) result = 31 * result + (signalStrength?.hashCode() ?: 0) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/SignalCallback.kt b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/SignalCallback.kt index 599beecb0e00..9e3aa8a04eca 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/SignalCallback.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/SignalCallback.kt @@ -151,7 +151,8 @@ data class MobileDataIndicators( @JvmField val qsDescription: CharSequence?, @JvmField val subId: Int, @JvmField val roaming: Boolean, - @JvmField val showTriangle: Boolean + @JvmField val showTriangle: Boolean, + @JvmField val volteId: Int ) { override fun toString(): String { return java.lang.StringBuilder("MobileDataIndicators[") @@ -167,6 +168,7 @@ data class MobileDataIndicators( .append(",subId=").append(subId) .append(",roaming=").append(roaming) .append(",showTriangle=").append(showTriangle) + .append(",volteId=").append(volteId) .append(']').toString() } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiSignalController.java index 87cdb17245f5..597a0c9e3835 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiSignalController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiSignalController.java @@ -150,7 +150,7 @@ private void notifyListenersForCarrierWifi(SignalCallback callback) { statusIcon, qsIcon, typeIcon, qsTypeIcon, mCurrentState.activityIn, mCurrentState.activityOut, dataContentDescription, dataContentDescriptionHtml, description, - mCurrentState.subId, /* roaming= */ false, /* showTriangle= */ true + mCurrentState.subId, /* roaming= */ false, /* showTriangle= */ true, 0 ); callback.setMobileDataIndicators(mobileDataIndicators); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/SensitiveContentCoordinator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/SensitiveContentCoordinator.kt index 3f8a39f62dfb..34cdb33b2161 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/SensitiveContentCoordinator.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/SensitiveContentCoordinator.kt @@ -103,9 +103,11 @@ private class SensitiveContentCoordinatorImpl @Inject constructor( else -> lockscreenUserManager.needsSeparateWorkChallenge(notifUserId) } } - val needsRedaction = lockscreenUserManager.needsRedaction(entry) + val isSecure = entry.sbn.isContentSecure + val needsRedaction = isSecure || lockscreenUserManager.needsRedaction(entry) val isSensitive = userPublic && needsRedaction - entry.setSensitive(isSensitive, deviceSensitive) + entry.setSensitive(isSensitive, isSecure || deviceSensitive) + entry.row.setForceHideContents(isSecure) } } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotifUiAdjustmentProvider.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotifUiAdjustmentProvider.kt index f7b6376c717c..bff0c64488a2 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotifUiAdjustmentProvider.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotifUiAdjustmentProvider.kt @@ -74,6 +74,6 @@ class NotifUiAdjustmentProvider @Inject constructor( smartReplies = entry.ranking.smartReplies, isConversation = entry.ranking.isConversation, isMinimized = isEntryMinimized(entry), - needsRedaction = lockscreenUserManager.needsRedaction(entry), + needsRedaction = entry.sbn.isContentSecure || lockscreenUserManager.needsRedaction(entry), ) } \ No newline at end of file diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotificationRowBinderImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotificationRowBinderImpl.java index b84a797bbb6f..bc2896786416 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotificationRowBinderImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotificationRowBinderImpl.java @@ -252,7 +252,7 @@ private void inflateContentViews( params.setUseIncreasedCollapsedHeight(useIncreasedCollapsedHeight); params.setUseLowPriority(isLowPriority); - if (mNotificationLockscreenUserManager.needsRedaction(entry)) { + if (mNotificationLockscreenUserManager.needsRedaction(entry) || entry.getSbn().getIsContentSecure()) { params.requireContentViews(FLAG_CONTENT_VIEW_PUBLIC); } else { params.markContentViewsFreeable(FLAG_CONTENT_VIEW_PUBLIC); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt index 11ffde625798..f2ed02de9706 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt @@ -44,6 +44,7 @@ import com.android.systemui.statusbar.notification.interruption.HeadsUpViewBinde import com.android.systemui.statusbar.notification.row.NotifBindPipelineInitializer import com.android.systemui.statusbar.notification.stack.NotificationListContainer import com.android.systemui.statusbar.phone.CentralSurfaces +import com.android.systemui.statusbar.phone.EdgeLightViewController import com.android.systemui.statusbar.phone.NotificationGroupAlertTransferHelper import com.android.systemui.statusbar.policy.DeviceProvisionedController import com.android.systemui.statusbar.policy.HeadsUpManager @@ -87,7 +88,8 @@ class NotificationsControllerImpl @Inject constructor( private val clickerBuilder: NotificationClicker.Builder, private val animatedImageNotificationManager: AnimatedImageNotificationManager, private val peopleSpaceWidgetManager: PeopleSpaceWidgetManager, - private val bubblesOptional: Optional + private val bubblesOptional: Optional, + private val edgeLightViewController: EdgeLightViewController, ) : NotificationsController { override fun initialize( @@ -147,6 +149,7 @@ class NotificationsControllerImpl @Inject constructor( } peopleSpaceWidgetManager.attach(notificationListener) + edgeLightViewController.attach(notificationListener) } override fun dump( diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptLogger.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptLogger.kt index 6c99e3adb73e..bef3d5095cb7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptLogger.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptLogger.kt @@ -20,8 +20,10 @@ import android.service.notification.StatusBarNotification import com.android.systemui.log.LogBuffer import com.android.systemui.log.LogLevel.DEBUG import com.android.systemui.log.LogLevel.INFO +import com.android.systemui.log.LogLevel.WARNING import com.android.systemui.log.dagger.NotificationHeadsUpLog import com.android.systemui.log.dagger.NotificationLog +import com.android.systemui.statusbar.notification.collection.NotificationEntry import javax.inject.Inject class NotificationInterruptLogger @Inject constructor( @@ -212,6 +214,33 @@ class NotificationInterruptLogger @Inject constructor( }) } + fun logNoFullscreen(entry: NotificationEntry, reason: String) { + hunBuffer.log(TAG, DEBUG, { + str1 = entry.key + str2 = reason + }, { + "No FullScreenIntent: $str2: $str1" + }) + } + + fun logNoFullscreenWarning(entry: NotificationEntry, reason: String) { + hunBuffer.log(TAG, WARNING, { + str1 = entry.key + str2 = reason + }, { + "No FullScreenIntent: WARNING: $str2: $str1" + }) + } + + fun logFullscreen(entry: NotificationEntry, reason: String) { + hunBuffer.log(TAG, DEBUG, { + str1 = entry.key + str2 = reason + }, { + "FullScreenIntent: $str2: $str1" + }) + } + fun keyguardHideNotification(key: String) { hunBuffer.log(TAG, DEBUG, { str1 = key diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImpl.java index e210f193b0a1..e1ddbd23e51a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImpl.java @@ -177,9 +177,69 @@ public boolean shouldHeadsUp(NotificationEntry entry) { */ @Override public boolean shouldLaunchFullScreenIntentWhenAdded(NotificationEntry entry) { - return entry.getSbn().getNotification().fullScreenIntent != null - && (!shouldHeadsUp(entry) - || mStatusBarStateController.getState() == StatusBarState.KEYGUARD); + if (entry.getSbn().getNotification().fullScreenIntent == null) { + return false; + } + + // Never show FSI when suppressed by DND + if (entry.shouldSuppressFullScreenIntent()) { + mLogger.logNoFullscreen(entry, "Suppressed by DND"); + return false; + } + + // Never show FSI if importance is not HIGH + if (entry.getImportance() < NotificationManager.IMPORTANCE_HIGH) { + mLogger.logNoFullscreen(entry, "Not important enough"); + return false; + } + + // If the notification has suppressive GroupAlertBehavior, block FSI and warn. + StatusBarNotification sbn = entry.getSbn(); + if (sbn.isGroup() && sbn.getNotification().suppressAlertingDueToGrouping()) { + // b/231322873: Detect and report an event when a notification has both an FSI and a + // suppressive groupAlertBehavior, and now correctly block the FSI from firing. + final int uid = entry.getSbn().getUid(); + android.util.EventLog.writeEvent(0x534e4554, "231322873", uid, "groupAlertBehavior"); + mLogger.logNoFullscreenWarning(entry, "GroupAlertBehavior will prevent HUN"); + return false; + } + + // If the screen is off, then launch the FullScreenIntent + if (!mPowerManager.isInteractive()) { + mLogger.logFullscreen(entry, "Device is not interactive"); + return true; + } + + // If the device is currently dreaming, then launch the FullScreenIntent + if (isDreaming()) { + mLogger.logFullscreen(entry, "Device is dreaming"); + return true; + } + + // If the keyguard is showing, then launch the FullScreenIntent + if (mStatusBarStateController.getState() == StatusBarState.KEYGUARD) { + mLogger.logFullscreen(entry, "Keyguard is showing"); + return true; + } + + // If the notification should HUN, then we don't need FSI + if (shouldHeadsUp(entry)) { + mLogger.logNoFullscreen(entry, "Expected to HUN"); + return false; + } + + // If the notification won't HUN for some other reason (DND/snooze/etc), launch FSI. + mLogger.logFullscreen(entry, "Expected not to HUN"); + return true; + } + + private boolean isDreaming() { + try { + return mDreamManager.isDreaming(); + } catch (RemoteException e) { + Log.e(TAG, "Failed to query dream manager.", e); + return false; + } } private boolean shouldHeadsUpWhenAwake(NotificationEntry entry) { @@ -219,13 +279,7 @@ private boolean shouldHeadsUpWhenAwake(NotificationEntry entry) { return false; } - boolean isDreaming = false; - try { - isDreaming = mDreamManager.isDreaming(); - } catch (RemoteException e) { - Log.e(TAG, "Failed to query dream manager.", e); - } - boolean inUse = mPowerManager.isScreenOn() && !isDreaming; + boolean inUse = mPowerManager.isScreenOn() && !isDreaming(); if (!inUse) { mLogger.logNoHeadsUpNotInUse(sbn); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java index eb496abad460..3c9ddad8d83d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java @@ -361,6 +361,8 @@ public Float get(ExpandableNotificationRow object) { private float mTopRoundnessDuringLaunchAnimation; private float mBottomRoundnessDuringLaunchAnimation; + private boolean mForceHideContents = false; + /** * Returns whether the given {@code statusBarNotification} is a system notification. * Note, this should be run in the background thread if possible as it makes multiple IPC @@ -2045,12 +2047,15 @@ void ensureGutsInflated() { private void updateChildrenVisibility() { boolean hideContentWhileLaunching = mExpandAnimationRunning && mGuts != null && mGuts.isExposed(); - mPrivateLayout.setVisibility(!mShowingPublic && !mIsSummaryWithChildren + mPrivateLayout.setVisibility(!mForceHideContents + && !mShowingPublic + && !mIsSummaryWithChildren && !hideContentWhileLaunching ? VISIBLE : INVISIBLE); if (mChildrenContainer != null) { - mChildrenContainer.setVisibility(!mShowingPublic && mIsSummaryWithChildren - && !hideContentWhileLaunching ? VISIBLE - : INVISIBLE); + mChildrenContainer.setVisibility(!mForceHideContents + && !mShowingPublic + && mIsSummaryWithChildren + && !hideContentWhileLaunching ? VISIBLE : INVISIBLE); } // The limits might have changed if the view suddenly became a group or vice versa updateLimits(); @@ -2229,6 +2234,7 @@ public boolean isSoundEffectsEnabled() { } public boolean isExpandable() { + if (mForceHideContents) return false; if (mIsSummaryWithChildren && !shouldShowPublic()) { return !mChildrenExpanded; } @@ -2391,6 +2397,7 @@ public boolean performClick() { @Override public int getIntrinsicHeight() { + if (mForceHideContents) return getCollapsedHeight(); if (isUserLocked()) { return getActualHeight(); } @@ -2629,7 +2636,7 @@ public void setHideSensitive(boolean hideSensitive, boolean animated, long delay mChildrenContainer.animate().cancel(); } resetAllContentAlphas(); - mPublicLayout.setVisibility(mShowingPublic ? View.VISIBLE : View.INVISIBLE); + mPublicLayout.setVisibility((mShowingPublic || mForceHideContents) ? VISIBLE : INVISIBLE); updateChildrenVisibility(); } else { animateShowingPublic(delay, duration, mShowingPublic); @@ -2695,7 +2702,7 @@ public boolean canViewBeCleared() { } private boolean shouldShowPublic() { - return mSensitive && mHideSensitiveForIntrinsicHeight; + return mForceHideContents || (mSensitive && mHideSensitiveForIntrinsicHeight); } public void makeActionsVisibile() { @@ -3343,6 +3350,13 @@ public void setAboveShelf(boolean aboveShelf) { } } + public void setForceHideContents(boolean forceHide) { + if (mForceHideContents == forceHide) return; + mForceHideContents = forceHide; + updateChildrenVisibility(); + onNotificationUpdated(); + } + private static class NotificationViewState extends ExpandableViewState { @Override diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java index c9d70d1ad44c..cab8a57f1cc8 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java @@ -81,6 +81,7 @@ import com.android.systemui.flags.FeatureFlags; import com.android.systemui.flags.Flags; import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper; +import com.android.systemui.qs.TileUtils; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.EmptyShadeView; import com.android.systemui.statusbar.NotificationShelf; @@ -439,6 +440,7 @@ public void getOutline(View view, Outline outline) { private int mCornerRadius; private int mMinimumPaddings; private int mQsTilePadding; + private int mQsTileColumns; private boolean mSkinnyNotifsInLandscape; private int mSidePaddings; private final Rect mBackgroundAnimationRect = new Rect(); @@ -1006,6 +1008,8 @@ void initView(Context context, NotificationSwipeHelper swipeHelper, mBottomPadding = res.getDimensionPixelSize(R.dimen.notification_panel_padding_bottom); mMinimumPaddings = res.getDimensionPixelSize(R.dimen.notification_side_paddings); mQsTilePadding = res.getDimensionPixelOffset(R.dimen.qs_tile_margin_horizontal); + mQsTileColumns = res.getInteger(R.integer.quick_settings_num_columns); + mQsTileColumns = TileUtils.getQSColumnsCount(mContext, mQsTileColumns); mSkinnyNotifsInLandscape = res.getBoolean(R.bool.config_skinnyNotifsInLandscape); mSidePaddings = mMinimumPaddings; // Updated in onMeasure by updateSidePadding() mMinInteractionHeight = res.getDimensionPixelSize( @@ -1027,7 +1031,7 @@ void updateSidePadding(int viewWidth) { return; } final int innerWidth = viewWidth - mMinimumPaddings * 2; - final int qsTileWidth = (innerWidth - mQsTilePadding * 3) / 4; + final int qsTileWidth = (innerWidth - mQsTilePadding * (mQsTileColumns - 1)) / mQsTileColumns; mSidePaddings = mMinimumPaddings + qsTileWidth + mQsTilePadding; } @@ -1323,10 +1327,24 @@ private void updateStackPosition(boolean listenerNeedsAnimation) { if (mOnStackYChanged != null) { mOnStackYChanged.accept(listenerNeedsAnimation); } + updateStackEndHeightAndStackHeight(fraction); + } + + @VisibleForTesting + public void updateStackEndHeightAndStackHeight(float fraction) { + final float oldStackHeight = mAmbientState.getStackHeight(); if (mQsExpansionFraction <= 0 && !shouldSkipHeightUpdate()) { final float endHeight = updateStackEndHeight( getHeight(), getEmptyBottomMargin(), mTopPadding); updateStackHeight(endHeight, fraction); + } else { + // Always updateStackHeight to prevent jumps in the stack height when this fraction + // suddenly reapplies after a freeze. + final float endHeight = mAmbientState.getStackEndHeight(); + updateStackHeight(endHeight, fraction); + } + if (oldStackHeight != mAmbientState.getStackHeight()) { + requestChildrenUpdate(); } } @@ -1343,6 +1361,7 @@ private float updateStackEndHeight(float height, float bottomMargin, float topPa return stackEndHeight; } + @VisibleForTesting public void updateStackHeight(float endHeight, float fraction) { // During the (AOD<=>LS) transition where dozeAmount is changing, // apply dozeAmount to stack height instead of expansionFraction @@ -5041,6 +5060,19 @@ public void setIsFullWidth(boolean isFullWidth) { @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) public void setUnlockHintRunning(boolean running) { mAmbientState.setUnlockHintRunning(running); + if (!running) { + // re-calculate the stack height which was frozen while running this animation + updateStackPosition(); + } + } + + @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) + public void setPanelFlinging(boolean flinging) { + mAmbientState.setIsFlinging(flinging); + if (!flinging) { + // re-calculate the stack height which was frozen while flinging + updateStackPosition(); + } } @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java index 2493ccbe5a48..e5f8424a2a24 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java @@ -338,6 +338,13 @@ public void onUserChanged(int userId) { } }; + /** + * Recalculate sensitiveness without animation; called when waking up while keyguard occluded. + */ + public void updateSensitivenessForOccludedWakeup() { + mView.updateSensitiveness(false, mLockscreenUserManager.isAnyProfilePublicMode()); + } + /** * Set the overexpansion of the panel to be applied to the view. */ @@ -1190,6 +1197,10 @@ public void setUnlockHintRunning(boolean running) { mView.setUnlockHintRunning(running); } + public void setPanelFlinging(boolean flinging) { + mView.setPanelFlinging(flinging); + } + public boolean isFooterViewNotGone() { return mView.isFooterViewNotGone(); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/AppPicker.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/AppPicker.java new file mode 100644 index 000000000000..52d88ed79c2c --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/AppPicker.java @@ -0,0 +1,289 @@ +/* + * Copyright (C) 2019 The Dirty Unicorns Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +package com.android.systemui.statusbar.phone; + +import android.app.ListActivity; +import android.content.Context; +import android.content.pm.ActivityInfo; +import android.content.pm.ApplicationInfo; +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; +import android.os.AsyncTask; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.AdapterView; +import android.widget.ArrayAdapter; +import android.widget.ImageView; +import android.widget.ListView; +import android.widget.TextView; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import com.android.systemui.R; + +public class AppPicker extends ListActivity { + + protected PackageManager packageManager = null; + protected List applist = null; + protected Adapter listadapter = null; + + protected List mActivitiesList = null; + protected boolean mIsActivitiesList = false; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(android.R.layout.list_content); + setTitle(R.string.active_edge_app_select_title); + + packageManager = getPackageManager(); + new LoadApplications().execute(); + } + + protected void onListItemClick(ListView l, View v, int position, long id) { + if (!mIsActivitiesList) { + // we are in the Apps list + } else if (mIsActivitiesList) { + // we are in the Activities list + } + + mIsActivitiesList = false; + + finish(); + } + + @Override + public void onBackPressed() { + if (mIsActivitiesList) { + setListAdapter(listadapter); + setTitle(R.string.active_edge_app_select_title); + // Reset the dialog again + mIsActivitiesList = false; + } else { + finish(); + } + } + + private List checkForLaunchIntent(List list) { + ArrayList applist = new ArrayList<>(); + + // If we need to blacklist apps, this is where we list them + String[] blacklist_packages = { + "com.google.android.as", // Actions Services + "com.google.android.GoogleCamera", // Google camera + "com.google.android.imaging.easel.service", // Pixel Visual Core Service + "com.android.traceur" // System Tracing (Google spyware lol) + }; + + for (ApplicationInfo info : list) { + try { + /* Remove blacklisted apps from the list of apps we give to + the user to select from. */ + if ((!Arrays.asList(blacklist_packages).contains(info.packageName) + && null != packageManager.getLaunchIntentForPackage(info.packageName))) { + applist.add(info); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + // Lets alphabatize the list of installed user apps + Collections.sort(applist, new ApplicationInfo.DisplayNameComparator(packageManager)); + + return applist; + } + + class LoadApplications extends AsyncTask { + + @Override + protected Void doInBackground(Void... params) { + applist = checkForLaunchIntent(packageManager.getInstalledApplications( + PackageManager.GET_META_DATA)); + listadapter = new Adapter(AppPicker.this, + R.layout.app_list_item, applist, packageManager); + return null; + } + + @Override + protected void onPostExecute(Void result) { + super.onPostExecute(result); + setListAdapter(listadapter); + + getListView().setLongClickable(true); + getListView().setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() { + @Override + public boolean onItemLongClick(AdapterView arg0, View arg1, + int pos, long id) { + onLongClick(pos); + return true; + } + }); + } + + @Override + protected void onPreExecute() { + super.onPreExecute(); + } + } + + protected void onLongClick(int pos) { + /*if (mIsActivitiesList) return; + String packageName = applist.get(position).packageName; + showActivitiesDialog(packageName);*/ + } + + protected void showActivitiesDialog(String packageName) { + mIsActivitiesList = true; + ArrayList list = null; + try { + PackageInfo pi = packageManager.getPackageInfo ( + packageName, PackageManager.GET_ACTIVITIES); + + list = new ArrayList<>(Arrays.asList(pi.activities)); + + } catch (PackageManager.NameNotFoundException e) { + } + + mActivitiesList = list; + + if (list == null) { + // no activities to show, let's stay in the Apps list + mIsActivitiesList = false; + return; + } + + setTitle(R.string.active_edge_activity_select_title); + // switch to a new adapter to show app activities + ActivitiesAdapter adapter = new ActivitiesAdapter(this, R.layout.app_list_item, list, packageManager); + setListAdapter(adapter); + } + + class Adapter extends ArrayAdapter { + + private List appList; + private Context context; + private PackageManager packageManager; + + private Adapter(Context context, int resource, List objects, PackageManager pm) { + super(context, resource, objects); + + this.context = context; + this.appList = objects; + packageManager = pm; + } + + @Override + public int getCount() { + return ((null != appList) ? appList.size() : 0); + } + + @Override + public ApplicationInfo getItem(int position) { + return ((null != appList) ? appList.get(position) : null); + } + + @Override + public long getItemId(int position) { + return position; + } + + @Override + public View getView(int position, View convertView, ViewGroup parent) { + View view = convertView; + + ApplicationInfo data = appList.get(position); + + if (view == null) { + LayoutInflater layoutInflater = (LayoutInflater) context + .getSystemService(Context.LAYOUT_INFLATER_SERVICE); + view = layoutInflater.inflate(R.layout.app_list_item, null); + } + + if (data != null) { + TextView appName = view.findViewById(R.id.app_name); + ImageView iconView = view.findViewById(R.id.app_icon); + + appName.setText(data.loadLabel(packageManager)); + iconView.setImageDrawable(data.loadIcon(packageManager)); + } + return view; + } + } + + class ActivitiesAdapter extends ArrayAdapter { + + private List appList; + private Context context; + private PackageManager packageManager; + + private ActivitiesAdapter(Context context, int resource, List objects, PackageManager pm) { + super(context, resource, objects); + + this.context = context; + this.appList = objects; + this.packageManager = pm; + } + + @Override + public int getCount() { + return ((null != appList) ? appList.size() : 0); + } + + @Override + public ActivityInfo getItem(int position) { + return ((null != appList) ? appList.get(position) : null); + } + + @Override + public long getItemId(int position) { + return position; + } + + @Override + public View getView(int position, View convertView, ViewGroup parent) { + View view = convertView; + + ActivityInfo data = appList.get(position); + + if (view == null) { + LayoutInflater layoutInflater = (LayoutInflater) context + .getSystemService(Context.LAYOUT_INFLATER_SERVICE); + view = layoutInflater.inflate(android.R.layout.simple_list_item_1, null); + } + + if (data != null) { + TextView appName = view.findViewById(android.R.id.text1); + + String name = /*data.loadLabel(packageManager).toString(); + if (name == null) { + name = */data.name; + //} + appName.setText(name); + } + + return view; + } + } +} + + diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java index 8782be50794f..9070eadd9944 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java @@ -428,7 +428,7 @@ public void onSafetyCenterEnableChanged(boolean isSafetyCenterEnabled) { if (isSafetyCenterEnabled && !mAutoTracker.isAdded(mSafetySpec)) { initSafetyTile(); } else if (!isSafetyCenterEnabled && mAutoTracker.isAdded(mSafetySpec)) { - mHost.removeTile(CustomTile.getComponentFromSpec(mSafetySpec)); + mHost.removeTile(mSafetySpec); mHost.unmarkTileAsAutoAdded(mSafetySpec); } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java index 9c6ba3af5154..9cb45acb7920 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java @@ -51,6 +51,7 @@ import com.android.systemui.statusbar.LightRevealScrim; import com.android.systemui.statusbar.NotificationPresenter; import com.android.systemui.statusbar.notification.row.NotificationGutsManager; +import com.android.systemui.statusbar.policy.GameSpaceManager; import java.io.PrintWriter; @@ -289,6 +290,8 @@ void startActivity(Intent intent, boolean dismissShade, void postAnimateOpenPanels(); + void toggleSettingsPanel(); + boolean isExpandedVisible(); boolean isPanelExpanded(); @@ -575,6 +578,10 @@ void startPendingIntentDismissingKeyguard( void extendDozePulse(); + void setBlockedGesturalNavigation(boolean blocked); + + GameSpaceManager getGameSpaceManager(); + public static class KeyboardShortcutsMessage { final int mDeviceId; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java index 9060d5f67913..8342556d5073 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java @@ -61,9 +61,11 @@ import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController; import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent; import com.android.systemui.statusbar.policy.DeviceProvisionedController; +import com.android.systemui.statusbar.policy.FlashlightController; import com.android.systemui.statusbar.policy.HeadsUpManager; import com.android.systemui.statusbar.policy.KeyguardStateController; import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler; +import com.android.systemui.statusbar.policy.TaskHelper; import java.util.Optional; @@ -97,8 +99,10 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba private final LightBarController mLightBarController; private final DisableFlagsLogger mDisableFlagsLogger; private final int mDisplayId; + private final FlashlightController mFlashlightController; private final boolean mVibrateOnOpening; private final VibrationEffect mCameraLaunchGestureVibrationEffect; + private final TaskHelper mTaskHelper; private static final VibrationAttributes HARDWARE_FEEDBACK_VIBRATION_ATTRIBUTES = @@ -131,7 +135,9 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba Optional vibratorOptional, LightBarController lightBarController, DisableFlagsLogger disableFlagsLogger, - @DisplayId int displayId) { + @DisplayId int displayId, + FlashlightController flashlightController, + TaskHelper taskHelper) { mCentralSurfaces = centralSurfaces; mContext = context; @@ -158,6 +164,8 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba mLightBarController = lightBarController; mDisableFlagsLogger = disableFlagsLogger; mDisplayId = displayId; + mFlashlightController = flashlightController; + mTaskHelper = taskHelper; mVibrateOnOpening = resources.getBoolean(R.bool.config_vibrateOnIconAnimation); mCameraLaunchGestureVibrationEffect = getCameraGestureVibrationEffect( @@ -187,7 +195,7 @@ public void addQsTile(ComponentName tile) { public void remQsTile(ComponentName tile) { QSPanelController qsPanelController = mCentralSurfaces.getQSPanelController(); if (qsPanelController != null && qsPanelController.getHost() != null) { - qsPanelController.getHost().removeTile(tile); + qsPanelController.getHost().removeTileByUser(tile); } } @@ -550,6 +558,29 @@ public void togglePanel() { } } + @Override + public void toggleCameraFlash() { + if (CentralSurfaces.DEBUG) { + Log.d(CentralSurfaces.TAG, "Toggling camera flashlight"); + } + if (mFlashlightController.isAvailable()) { + mFlashlightController.setFlashlight(!mFlashlightController.isEnabled()); + } + } + + @Override + public void toggleSettingsPanel() { + if (mCentralSurfaces.isPanelExpanded()) { + mShadeController.animateCollapsePanels(); + } else { + animateExpandSettingsPanel(null); + } + } + + public void setBlockedGesturalNavigation(boolean blocked) { + mCentralSurfaces.setBlockedGesturalNavigation(blocked); + } + private boolean isGoingToSleep() { return mWakefulnessLifecycle.getWakefulness() == WakefulnessLifecycle.WAKEFULNESS_GOING_TO_SLEEP; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java index 705de9b43ed0..281e07bd8890 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java @@ -74,6 +74,7 @@ import android.net.Uri; import android.os.Bundle; import android.os.Handler; +import android.os.Process; import android.os.Looper; import android.os.PowerManager; import android.os.RemoteException; @@ -121,6 +122,11 @@ import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.internal.statusbar.IStatusBarService; import com.android.internal.statusbar.RegisterStatusBarResult; +import com.android.internal.util.hwkeys.ActionConstants; +import com.android.internal.util.hwkeys.ActionUtils; +import com.android.internal.util.hwkeys.PackageMonitor; +import com.android.internal.util.hwkeys.PackageMonitor.PackageChangedListener; +import com.android.internal.util.hwkeys.PackageMonitor.PackageState; import com.android.keyguard.KeyguardUpdateMonitor; import com.android.keyguard.KeyguardUpdateMonitorCallback; import com.android.keyguard.ViewMediatorCallback; @@ -159,6 +165,7 @@ import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.keyguard.ScreenLifecycle; import com.android.systemui.keyguard.WakefulnessLifecycle; +import com.android.systemui.model.SysUiState; import com.android.systemui.navigationbar.NavigationBarController; import com.android.systemui.navigationbar.NavigationBarView; import com.android.systemui.plugins.DarkIconDispatcher; @@ -228,6 +235,7 @@ import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.statusbar.policy.DeviceProvisionedController.DeviceProvisionedListener; import com.android.systemui.statusbar.policy.ExtensionController; +import com.android.systemui.statusbar.policy.GameSpaceManager; import com.android.systemui.statusbar.policy.KeyguardStateController; import com.android.systemui.statusbar.policy.UserInfoControllerImpl; import com.android.systemui.statusbar.policy.UserSwitcherController; @@ -270,6 +278,7 @@ */ @SysUISingleton public class CentralSurfacesImpl extends CoreStartable implements + PackageChangedListener, CentralSurfaces { private static final String BANNER_ACTION_CANCEL = @@ -505,6 +514,8 @@ public void togglePanel() { private final StatusBarSignalPolicy mStatusBarSignalPolicy; private final StatusBarHideIconsForBouncerManager mStatusBarHideIconsForBouncerManager; + protected GameSpaceManager mGameSpaceManager; + // expanded notifications // the sliding/resizing panel within the notification window protected NotificationPanelViewController mNotificationPanelViewController; @@ -551,6 +562,8 @@ public void togglePanel() { private final DisplayMetrics mDisplayMetrics; + private PackageMonitor mPackageMonitor; + // XXX: gesture research private final GestureRecorder mGestureRec = DEBUG_GESTURES ? new GestureRecorder("/sdcard/statusbar_gestures.dat") @@ -675,6 +688,7 @@ public int getId() { private final InteractionJankMonitor mJankMonitor; + private final SysUiState mSysUiState; /** * Public constructor for CentralSurfaces. @@ -780,7 +794,8 @@ public CentralSurfacesImpl( DeviceStateManager deviceStateManager, DreamOverlayStateController dreamOverlayStateController, WiredChargingRippleController wiredChargingRippleController, - IDreamManager dreamManager) { + IDreamManager dreamManager, + SysUiState sysUiState) { super(context); mNotificationsController = notificationsController; mFragmentService = fragmentService; @@ -867,6 +882,7 @@ public CentralSurfacesImpl( mWallpaperManager = wallpaperManager; mJankMonitor = jankMonitor; mDreamOverlayStateController = dreamOverlayStateController; + mSysUiState = sysUiState; mLockscreenShadeTransitionController = lockscreenShadeTransitionController; mStartingSurfaceOptional = startingSurfaceOptional; @@ -887,6 +903,7 @@ public CentralSurfacesImpl( mActivityIntentHelper = new ActivityIntentHelper(mContext); mActivityLaunchAnimator = activityLaunchAnimator; + mGameSpaceManager = new GameSpaceManager(mContext, mKeyguardStateController); // The status bar background may need updating when the ongoing call status changes. mOngoingCallController.addCallback((animate) -> maybeUpdateBarMode()); @@ -931,6 +948,10 @@ public void start() { updateDisplaySize(); mStatusBarHideIconsForBouncerManager.setDisplayId(mDisplayId); + mPackageMonitor = new PackageMonitor(); + mPackageMonitor.register(mContext, mMainHandler); + mPackageMonitor.addListener(this); + // start old BaseStatusBar.start(). mWindowManagerService = WindowManagerGlobal.getWindowManagerService(); mDevicePolicyManager = (DevicePolicyManager) mContext.getSystemService( @@ -1436,6 +1457,7 @@ protected void registerBroadcastReceiver() { filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS); filter.addAction(Intent.ACTION_SCREEN_OFF); mBroadcastDispatcher.registerReceiver(mBroadcastReceiver, filter, null, UserHandle.ALL); + mGameSpaceManager.observe(); } protected QS createDefaultQSFragment() { @@ -1760,6 +1782,7 @@ public void onLaunchAnimationStart(boolean isExpandingFullyAbove) { // activity is exited. if (mKeyguardStateController.isShowing() && !mKeyguardStateController.isKeyguardGoingAway()) { + Log.d(TAG, "Setting occluded = true in #startActivity."); mKeyguardViewMediator.setOccluded(true /* isOccluded */, true /* animate */); } @@ -2051,6 +2074,11 @@ public void postAnimateOpenPanels() { mMessageRouter.sendMessage(MSG_OPEN_SETTINGS_PANEL); } + @Override + public void toggleSettingsPanel() { + mCommandQueueCallbacks.toggleSettingsPanel(); + } + @Override public boolean isExpandedVisible() { return mExpandedVisible; @@ -2931,6 +2959,26 @@ public void postStartActivityDismissingKeyguard(Intent intent, int delay, delay); } + @Override + public void onPackageChanged(String pkg, PackageState state) { + if (state == PackageState.PACKAGE_REMOVED + || state == PackageState.PACKAGE_CHANGED) { + final Context ctx = mContext; + final Thread thread = new Thread(new Runnable() { + @Override + public void run() { + if (!ActionUtils.hasNavbarByDefault(ctx)) { + ActionUtils.resolveAndUpdateButtonActions(ctx, + ActionConstants + .getDefaults(ActionConstants.HWKEYS)); + } + } + }); + thread.setPriority(Process.THREAD_PRIORITY_BACKGROUND); + thread.start(); + } + } + @Override public void showKeyguard() { mStatusBarStateController.setKeyguardRequested(true); @@ -3383,7 +3431,8 @@ private void showBouncerOrLockScreenIfKeyguard() { // lock screen where users can use the UDFPS affordance to enter the device mStatusBarKeyguardViewManager.reset(true); } else if ((mState == StatusBarState.KEYGUARD - && !mStatusBarKeyguardViewManager.bouncerIsOrWillBeShowing()) + && !mStatusBarKeyguardViewManager.bouncerIsOrWillBeShowing() + && isKeyguardSecure()) || mState == StatusBarState.SHADE_LOCKED) { mStatusBarKeyguardViewManager.showGenericBouncer(true /* scrimmed */); } @@ -3686,6 +3735,18 @@ public void onStartedWakingUp() { public void onFinishedWakingUp() { mWakeUpCoordinator.setFullyAwake(true); mWakeUpCoordinator.setWakingUp(false); + if (mKeyguardStateController.isOccluded() + && !mDozeParameters.canControlUnlockedScreenOff()) { + // When the keyguard is occluded we don't use the KEYGUARD state which would + // normally cause these redaction updates. If AOD is on, the KEYGUARD state is used + // to show the doze, AND UnlockedScreenOffAnimationController.onFinishedWakingUp() + // would force a KEYGUARD state that would take care of recalculating redaction. + // So if AOD is off or unsupported we need to trigger these updates at screen on + // when the keyguard is occluded. + mLockscreenUserManager.updatePublicMode(); + mNotificationPanelViewController.getNotificationStackScrollLayoutController() + .updateSensitivenessForOccludedWakeup(); + } if (mLaunchCameraWhenFinishedWaking) { mNotificationPanelViewController.launchCamera( false /* animate */, mLastCameraLaunchSource); @@ -4036,6 +4097,17 @@ protected void dismissKeyboardShortcuts() { KeyboardShortcuts.dismiss(); } + @Override + public void setBlockedGesturalNavigation(boolean blocked) { + if (getNotificationPanelViewController() != null) { + getNotificationPanelViewController().setBlockedGesturalNavigation(blocked); + getNotificationPanelViewController().updateSystemUiStateFlags(); + } + if (getNavigationBarView() != null) { + getNavigationBarView().setBlockedGesturalNavigation(blocked, mSysUiState); + } + } + /** * Dismiss the keyguard then execute an action. * @@ -4243,6 +4315,11 @@ public NotificationGutsManager getGutsManager() { return mGutsManager; } + @Override + public GameSpaceManager getGameSpaceManager() { + return mGameSpaceManager; + } + boolean isTransientShown() { return mTransientShown; } @@ -4323,7 +4400,9 @@ public void onUserSetupChanged() { Log.d(TAG, String.format("User setup changed: userSetup=%s mUserSetup=%s", userSetup, mUserSetup)); } - + if (mNotificationPanelViewController != null) { + mNotificationPanelViewController.setUserSetupComplete(userSetup); + } if (userSetup != mUserSetup) { mUserSetup = userSetup; if (!mUserSetup) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ClockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ClockController.java new file mode 100644 index 000000000000..7c28714eaa99 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ClockController.java @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2018 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.statusbar.phone; + +import android.content.Context; +import android.provider.Settings; +import android.util.Log; +import android.view.View; + +import com.android.systemui.Dependency; +import com.android.systemui.R; +import com.android.systemui.statusbar.phone.StatusBarIconController; +import com.android.systemui.statusbar.policy.Clock; +import com.android.systemui.tuner.TunerService; + + +public class ClockController implements TunerService.Tunable { + + private static final String TAG = "ClockController"; + + private static final String CLOCK_POSITION = + "system:" + Settings.System.STATUS_BAR_CLOCK; + + private static final int CLOCK_POSITION_RIGHT = 0; + private static final int CLOCK_POSITION_CENTER = 1; + private static final int CLOCK_POSITION_LEFT = 2; + + private Context mContext; + private Clock mActiveClock, mCenterClock, mLeftClock, mRightClock; + + private int mClockPosition = CLOCK_POSITION_LEFT; + private boolean mBlackListed = false; + + public ClockController(Context context, View statusBar) { + mContext = context; + + mCenterClock = statusBar.findViewById(R.id.clock_center); + mLeftClock = statusBar.findViewById(R.id.clock); + mRightClock = statusBar.findViewById(R.id.clock_right); + + mActiveClock = mLeftClock; + + Dependency.get(TunerService.class).addTunable(this, + StatusBarIconController.ICON_HIDE_LIST, CLOCK_POSITION); + } + + public Clock getClock() { + switch (mClockPosition) { + case CLOCK_POSITION_RIGHT: + return mRightClock; + case CLOCK_POSITION_CENTER: + return mCenterClock; + case CLOCK_POSITION_LEFT: + default: + return mLeftClock; + } + } + + private void updateActiveClock() { + mActiveClock.setClockVisibleByUser(false); + mActiveClock = getClock(); + mActiveClock.setClockVisibleByUser(true); + + // Override any previous setting + mActiveClock.setClockVisibleByUser(!mBlackListed); + } + + @Override + public void onTuningChanged(String key, String newValue) { + Log.d(TAG, "onTuningChanged key=" + key + " value=" + newValue); + + if (CLOCK_POSITION.equals(key)) { + mClockPosition = TunerService.parseInteger(newValue, CLOCK_POSITION_LEFT); + } else { + mBlackListed = StatusBarIconController.getIconHideList( + mContext, newValue).contains("clock"); + } + updateActiveClock(); + } +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java index 7de4668abe28..0d6044f8dc5a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java @@ -46,6 +46,8 @@ public class DozeScrimController implements StateListener { private int mPulseReason; private boolean mFullyPulsing; + private long mLastPulseOutFailTime; + private final ScrimController.Callback mScrimCallback = new ScrimController.Callback() { @Override public void onDisplayBlanked() { @@ -79,6 +81,10 @@ public void onFinished() { mDozeParameters.getPulseVisibleDurationExtended()); } mFullyPulsing = true; + if (mLastPulseOutFailTime > 0 && + System.currentTimeMillis() - mLastPulseOutFailTime <= 500) + pulseOutNow(); + mLastPulseOutFailTime = 0; } /** @@ -143,6 +149,8 @@ public void pulse(@NonNull DozeHost.PulseCallback callback, int reason) { public void pulseOutNow() { if (mPulseCallback != null && mFullyPulsing) { mPulseOut.run(); + } else { + mLastPulseOutFailTime = System.currentTimeMillis(); } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java index 55b310ff986d..5ded0c79e2a0 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java @@ -46,6 +46,7 @@ import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator; import com.android.systemui.statusbar.notification.collection.NotificationEntry; +import com.android.systemui.statusbar.phone.EdgeLightViewController; import com.android.systemui.statusbar.policy.BatteryController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.unfold.FoldAodAnimationController; @@ -94,6 +95,7 @@ public final class DozeServiceHost implements DozeHost { private NotificationShadeWindowViewController mNotificationShadeWindowViewController; private final AuthController mAuthController; private final NotificationIconAreaController mNotificationIconAreaController; + private final EdgeLightViewController mEdgeLightViewController; private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; private NotificationPanelViewController mNotificationPanel; private View mAmbientIndicationContainer; @@ -116,7 +118,8 @@ public DozeServiceHost(DozeLog dozeLog, PowerManager powerManager, NotificationShadeWindowController notificationShadeWindowController, NotificationWakeUpCoordinator notificationWakeUpCoordinator, AuthController authController, - NotificationIconAreaController notificationIconAreaController) { + NotificationIconAreaController notificationIconAreaController, + EdgeLightViewController edgeLightViewController) { super(); mDozeLog = dozeLog; mPowerManager = powerManager; @@ -138,6 +141,7 @@ public DozeServiceHost(DozeLog dozeLog, PowerManager powerManager, mNotificationIconAreaController = notificationIconAreaController; mFoldAodAnimationController = sysUIUnfoldComponent .map(SysUIUnfoldComponent::getFoldAodAnimationController).orElse(null); + mEdgeLightViewController = edgeLightViewController; } // TODO: we should try to not pass status bar in here if we can avoid it. @@ -277,6 +281,7 @@ private void setPulsing(boolean pulsing) { mCentralSurfaces.updateScrimController(); mPulseExpansionHandler.setPulsing(pulsing); mNotificationWakeUpCoordinator.setPulsing(pulsing); + mEdgeLightViewController.setPulsing(pulsing, reason); } }, reason); // DozeScrimController is in pulse state, now let's ask ScrimController to start diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/EdgeLightViewController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/EdgeLightViewController.kt new file mode 100644 index 000000000000..6799572d1dfe --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/EdgeLightViewController.kt @@ -0,0 +1,346 @@ +/* + * Copyright (C) 2022 FlamingoOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +package com.android.systemui.statusbar.phone + +import android.app.WallpaperManager +import android.content.Context +import android.database.ContentObserver +import android.graphics.Color +import android.net.Uri +import android.os.UserHandle +import android.provider.Settings +import android.service.notification.NotificationListenerService.RankingMap +import android.service.notification.StatusBarNotification +import android.util.Log +import android.view.animation.Animation + +import androidx.annotation.GuardedBy + +import com.android.settingslib.Utils +import com.android.systemui.dagger.SysUISingleton +import com.android.systemui.doze.DozeLog +import com.android.systemui.keyguard.ScreenLifecycle +import com.android.systemui.settings.UserTracker +import com.android.systemui.statusbar.EdgeLightView +import com.android.systemui.statusbar.NotificationListener +import com.android.systemui.statusbar.policy.ConfigurationController +import com.android.systemui.util.settings.SystemSettings + +import javax.inject.Inject + +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.launch +import kotlinx.coroutines.sync.Mutex +import kotlinx.coroutines.sync.withLock +import kotlinx.coroutines.withContext + +@SysUISingleton +class EdgeLightViewController @Inject constructor( + private val context: Context, + private val systemSettings: SystemSettings, + screenLifecycle: ScreenLifecycle, + dozeParameters: DozeParameters, + configurationController: ConfigurationController, + userTracker: UserTracker, +) : ScreenLifecycle.Observer, + NotificationListener.NotificationHandler, + ConfigurationController.ConfigurationListener, + UserTracker.Callback { + + private val coroutineScope = CoroutineScope(Dispatchers.Main) + private val wallpaperManager = context.getSystemService(WallpaperManager::class.java) + private val animationDuration = + (dozeParameters.pulseVisibleDuration / 3).toLong() - COLLAPSE_ANIMATION_DURATION + + private var screenOn = false + private var edgeLightView: EdgeLightView? = null + private var pulsing = false + + private val settingsMutex = Mutex() + + @GuardedBy("settingsMutex") + private var edgeLightEnabled = false + + @GuardedBy("settingsMutex") + private var colorMode = ColorMode.ACCENT + + // Whether to always trigger edge light on pulse even if it + // is not because notification was posted. For example: tap to wake + // for ambient display. + @GuardedBy("settingsMutex") + private var alwaysTriggerOnPulse = false + + private val settingsObserver = object : ContentObserver(null) { + override fun onChange(selfChange: Boolean, uri: Uri) { + logD("setting changed for ${uri.lastPathSegment}") + coroutineScope.launch { + settingsMutex.withLock { + when (uri.lastPathSegment) { + Settings.System.EDGE_LIGHT_ENABLED -> + edgeLightEnabled = isEdgeLightEnabled() + Settings.System.EDGE_LIGHT_ALWAYS_TRIGGER_ON_PULSE -> + alwaysTriggerOnPulse = alwaysTriggerOnPulse() + Settings.System.EDGE_LIGHT_REPEAT_ANIMATION -> + edgeLightView?.setRepeatCount(getRepeatCount()) + Settings.System.EDGE_LIGHT_COLOR_MODE -> { + colorMode = getColorMode() + edgeLightView?.setColor(getColorForMode(colorMode)) + } + Settings.System.EDGE_LIGHT_CUSTOM_COLOR -> + edgeLightView?.setColor(getCustomColor()) + } + return@withLock + } + } + } + } + + init { + coroutineScope.launch { + loadSettings() + register( + Settings.System.EDGE_LIGHT_ENABLED, + Settings.System.EDGE_LIGHT_ALWAYS_TRIGGER_ON_PULSE, + Settings.System.EDGE_LIGHT_REPEAT_ANIMATION, + Settings.System.EDGE_LIGHT_COLOR_MODE, + Settings.System.EDGE_LIGHT_CUSTOM_COLOR, + ) + } + screenLifecycle.addObserver(this) + configurationController.addCallback(this) + userTracker.addCallback(this) { + coroutineScope.launch { + it.run() + } + } + } + + private fun register(vararg keys: String) { + keys.forEach { + systemSettings.registerContentObserverForUser( + it, + settingsObserver, + UserHandle.USER_ALL + ) + } + } + + private fun loadSettings() { + coroutineScope.launch { + settingsMutex.withLock { + edgeLightEnabled = isEdgeLightEnabled() + alwaysTriggerOnPulse = alwaysTriggerOnPulse() + edgeLightView?.let { + it.setRepeatCount(getRepeatCount()) + it.setColor(getColorForMode(getColorMode())) + } + } + } + } + + private suspend fun isEdgeLightEnabled(): Boolean { + return withContext(Dispatchers.IO) { + systemSettings.getIntForUser(Settings.System.EDGE_LIGHT_ENABLED, 0, UserHandle.USER_CURRENT) == 1 + } + } + + private suspend fun alwaysTriggerOnPulse(): Boolean { + return withContext(Dispatchers.IO) { + systemSettings.getIntForUser( + Settings.System.EDGE_LIGHT_ALWAYS_TRIGGER_ON_PULSE, + 0, + UserHandle.USER_CURRENT + ) == 1 + } + } + + private suspend fun getRepeatCount(): Int { + val repeat = withContext(Dispatchers.IO) { + systemSettings.getIntForUser( + Settings.System.EDGE_LIGHT_REPEAT_ANIMATION, + 0, + UserHandle.USER_CURRENT + ) == 1 + } + return if (repeat) Animation.INFINITE else 0 + } + + private suspend fun getColorMode(): ColorMode { + val colorModeInt = withContext(Dispatchers.IO) { + systemSettings.getIntForUser( + Settings.System.EDGE_LIGHT_COLOR_MODE, + 0, + UserHandle.USER_CURRENT + ) + } + return ColorMode.values().find { it.ordinal == colorModeInt } ?: ColorMode.ACCENT + } + + private suspend fun getCustomColor(): Int { + val colorString = withContext(Dispatchers.IO) { + systemSettings.getStringForUser( + Settings.System.EDGE_LIGHT_CUSTOM_COLOR, + UserHandle.USER_CURRENT + ) + } ?: return Color.WHITE + return try { + Color.parseColor(colorString) + } catch (_: IllegalArgumentException) { + Log.e(TAG, "Custom color $colorString is invalid") + Color.WHITE + } + } + + // Accent color is returned for notification color mode + // as well since the color is set when notification is posted. + private suspend fun getColorForMode(mode: ColorMode): Int = + when (mode) { + ColorMode.WALLPAPER -> wallpaperManager.getWallpaperColors(WallpaperManager.FLAG_SYSTEM) + ?.primaryColor?.toArgb() ?: Utils.getColorAccentDefaultColor(context) + ColorMode.CUSTOM -> getCustomColor() + else -> Utils.getColorAccentDefaultColor(context) + } + + override fun onScreenTurnedOn() { + logD("onScreenTurnedOn") + screenOn = true + if (pulsing) { + logD("onScreenTurnedOn: pulsing: show()") + show() + } + } + + override fun onScreenTurnedOff() { + logD("onScreenTurnedOff") + screenOn = false + } + + override fun onNotificationsInitialized() { + // No-op + } + + override fun onNotificationPosted(sbn: StatusBarNotification, rankingMap: RankingMap) { + logD("onNotificationPosted, sbn = $sbn") + coroutineScope.launch { + settingsMutex.withLock { + if (colorMode == ColorMode.NOTIFICATION) { + edgeLightView?.setColor(sbn.notification.color) + } + if (screenOn && pulsing) show() + } + } + } + + override fun onNotificationRemoved(sbn: StatusBarNotification, rankingMap: RankingMap) { + // No-op + } + + override fun onNotificationRemoved(sbn: StatusBarNotification, rankingMap: RankingMap, reason: Int) { + onNotificationRemoved(sbn, rankingMap) + } + + override fun onNotificationRankingUpdate(rankingMap: RankingMap) { + // No-op + } + + override fun onUiModeChanged() { + // Reload accent color + coroutineScope.launch { + settingsMutex.withLock { + edgeLightView?.setColor(getColorForMode(colorMode)) + } + } + } + + override fun onUserChanged(newUser: Int, userContext: Context) { + loadSettings() + } + + fun attach(notificationListener: NotificationListener) { + logD("attach") + notificationListener.addNotificationHandler(this) + } + + fun setEdgeLightView(edgeLightView: EdgeLightView) { + this.edgeLightView = edgeLightView.apply { + setExpandAnimationDuration(animationDuration) + setCollapseAnimationDuration(COLLAPSE_ANIMATION_DURATION) + }.also { + coroutineScope.launch { + settingsMutex.withLock { + it.setRepeatCount(getRepeatCount()) + it.setColor(getColorForMode(colorMode)) + } + } + } + } + + fun setPulsing(pulsing: Boolean, reason: Int) { + logD("setPulsing, pulsing = $pulsing, reason = $reason") + coroutineScope.launch { + settingsMutex.withLock { + if (pulsing && (alwaysTriggerOnPulse || + reason == DozeLog.PULSE_REASON_NOTIFICATION)) { + this@EdgeLightViewController.pulsing = true + // Use accent color if color mode is set to notification color + // and pulse is not because of notification. + if (colorMode == ColorMode.NOTIFICATION && reason != DozeLog.PULSE_REASON_NOTIFICATION) { + edgeLightView?.setColor(Utils.getColorAccentDefaultColor(context)) + } + if (screenOn) { + logD("setPulsing: screenOn: show()") + show() + } + } else { + this@EdgeLightViewController.pulsing = false + hide() + } + } + } + } + + private fun show() { + coroutineScope.launch { + settingsMutex.withLock { + if (edgeLightEnabled) edgeLightView?.show() + } + } + } + + private fun hide() { + edgeLightView?.hide() + } + + companion object { + private const val TAG = "EdgeLightViewController" + private val DEBUG = Log.isLoggable(TAG, Log.DEBUG) + + private const val COLLAPSE_ANIMATION_DURATION = 700L + + private fun logD(msg: String?) { + if (DEBUG) Log.d(TAG, msg) + } + } +} + +private enum class ColorMode { + ACCENT, + NOTIFICATION, + WALLPAPER, + CUSTOM +} \ No newline at end of file diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpAppearanceController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpAppearanceController.java index 9863a0ed1ce0..3bb7e7e04b24 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpAppearanceController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpAppearanceController.java @@ -20,10 +20,12 @@ import android.graphics.Rect; import android.view.View; +import android.widget.LinearLayout; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.widget.ViewClippingUtil; import com.android.systemui.R; +import com.android.systemui.dagger.qualifiers.RootView; import com.android.systemui.plugins.DarkIconDispatcher; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.statusbar.CommandQueue; @@ -62,6 +64,7 @@ public class HeadsUpAppearanceController extends ViewController @@ -106,7 +109,8 @@ public HeadsUpAppearanceController( NotificationPanelViewController notificationPanelViewController, HeadsUpStatusBarView headsUpStatusBarView, Clock clockView, - @Named(OPERATOR_NAME_FRAME_VIEW) Optional operatorNameViewOptional) { + @Named(OPERATOR_NAME_FRAME_VIEW) Optional operatorNameViewOptional, + @RootView PhoneStatusBarView statusBarView) { super(headsUpStatusBarView); mNotificationIconAreaController = notificationIconAreaController; mHeadsUpManager = headsUpManager; @@ -125,6 +129,7 @@ public HeadsUpAppearanceController( mClockView = clockView; mOperatorNameViewOptional = operatorNameViewOptional; mDarkIconDispatcher = darkIconDispatcher; + mCustomIconArea = statusBarView.findViewById(R.id.left_icon_area); mView.addOnLayoutChangeListener(new View.OnLayoutChangeListener() { @Override @@ -191,12 +196,13 @@ private void updateTopEntry() { boolean animateIsolation = false; if (newEntry == null) { // no heads up anymore, lets start the disappear animation - + mNotificationPanelViewController.reTickerView(false); setShown(false); animateIsolation = !isExpanded(); } else if (previousEntry == null) { // We now have a headsUp and didn't have one before. Let's start the disappear // animation + mNotificationPanelViewController.reTickerView(true); setShown(true); animateIsolation = !isExpanded(); } @@ -213,10 +219,14 @@ private void setShown(boolean isShown) { updateParentClipping(false /* shouldClip */); mView.setVisibility(View.VISIBLE); show(mView); - hide(mClockView, View.INVISIBLE); + if (mCustomIconArea.getVisibility() != View.GONE) { + hide(mCustomIconArea, View.INVISIBLE); + } mOperatorNameViewOptional.ifPresent(view -> hide(view, View.INVISIBLE)); } else { - show(mClockView); + if (mCustomIconArea.getVisibility() != View.GONE) { + show(mCustomIconArea); + } mOperatorNameViewOptional.ifPresent(this::show); hide(mView, View.GONE, () -> { updateParentClipping(true /* shouldClip */); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java index 414bc84fcd85..0a584355adde 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java @@ -44,6 +44,7 @@ import android.content.res.ColorStateList; import android.content.res.Configuration; import android.graphics.drawable.Drawable; +import android.hardware.biometrics.BiometricSourceType; import android.os.AsyncTask; import android.os.Bundle; import android.os.IBinder; @@ -74,6 +75,7 @@ import androidx.annotation.Nullable; import com.android.internal.annotations.VisibleForTesting; +import com.android.internal.util.syberia.UdfpsUtils; import com.android.internal.widget.LockPatternUtils; import com.android.keyguard.KeyguardUpdateMonitor; import com.android.keyguard.KeyguardUpdateMonitorCallback; @@ -173,6 +175,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL private FalsingManager mFalsingManager; private boolean mUserSetupComplete; private boolean mPrewarmBound; + private boolean mIsFingerprintRunning; private Messenger mPrewarmMessenger; private final ServiceConnection mPrewarmConnection = new ServiceConnection() { @@ -199,6 +202,7 @@ public void onServiceDisconnected(ComponentName name) { private boolean mDozing; private int mIndicationBottomMargin; private int mIndicationPadding; + private int mIndicationBottomMarginUdfps; private float mDarkAmount; private int mBurnInXOffset; private int mBurnInYOffset; @@ -316,6 +320,8 @@ protected void onFinishInflate() { mIndicationTextBottom = findViewById(R.id.keyguard_indication_text_bottom); mIndicationBottomMargin = getResources().getDimensionPixelSize( R.dimen.keyguard_indication_margin_bottom); + mIndicationBottomMarginUdfps = getResources().getDimensionPixelSize( + R.dimen.keyguard_indication_margin_bottom_fingerprint_in_display); mBurnInYOffset = getResources().getDimensionPixelSize( R.dimen.default_burn_in_prevention_offset); updateCameraVisibility(); @@ -345,6 +351,7 @@ public void setPreviewContainer(ViewGroup previewContainer) { mPreviewContainer = previewContainer; inflateCameraPreview(); updateLeftAffordance(); + updateIndicationAreaPadding(); } @Override @@ -409,15 +416,9 @@ private void initAccessibility() { @Override protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); - mIndicationBottomMargin = getResources().getDimensionPixelSize( - R.dimen.keyguard_indication_margin_bottom); - mBurnInYOffset = getResources().getDimensionPixelSize( - R.dimen.default_burn_in_prevention_offset); - MarginLayoutParams mlp = (MarginLayoutParams) mIndicationArea.getLayoutParams(); - if (mlp.bottomMargin != mIndicationBottomMargin) { - mlp.bottomMargin = mIndicationBottomMargin; - mIndicationArea.setLayoutParams(mlp); - } + + // Update the bottom margin of the indication area + updateIndicationAreaPadding(); // Respect font size setting. mIndicationTextBottom.setTextSize(TypedValue.COMPLEX_UNIT_PX, @@ -509,6 +510,23 @@ private void updateCameraVisibility() { && mRightButton.getIcon().isVisible ? View.VISIBLE : View.GONE); } + private void updateIndicationAreaPadding() { + mIndicationBottomMargin = getResources().getDimensionPixelSize( + R.dimen.keyguard_indication_margin_bottom); + mIndicationBottomMarginUdfps = getResources().getDimensionPixelSize( + R.dimen.keyguard_indication_margin_bottom_fingerprint_in_display); + mBurnInYOffset = getResources().getDimensionPixelSize( + R.dimen.default_burn_in_prevention_offset); + MarginLayoutParams mlp = (MarginLayoutParams) mIndicationArea.getLayoutParams(); + + int bottomMargin = hasInDisplayFingerprint() ? mIndicationBottomMarginUdfps : mIndicationBottomMargin; + boolean newLp = mlp.bottomMargin != bottomMargin; + if (newLp) { + mlp.bottomMargin = bottomMargin; + mIndicationArea.setLayoutParams(mlp); + } + } + /** * Set an alternate icon for the left assist affordance (replace the mic icon) */ @@ -575,6 +593,10 @@ private void updateControlsVisibility() { } } + private boolean hasInDisplayFingerprint() { + return UdfpsUtils.hasUdfpsSupport(mContext); + } + public boolean isLeftVoiceAssist() { return mLeftIsVoiceAssist; } @@ -907,6 +929,12 @@ public void onUserUnlocked() { updateCameraVisibility(); updateLeftAffordance(); } + @Override + public void onBiometricRunningStateChanged(boolean running, + BiometricSourceType biometricSourceType) { + mIsFingerprintRunning = running; + updateIndicationAreaPadding(); + } }; public void updateLeftAffordance() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java index 339f371c0d12..5ee22f9c4601 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java @@ -93,6 +93,11 @@ public void switchIndication(KeyguardIndication indication) { switchIndication(indication == null ? null : indication.getMessage(), indication); } + public void switchIndication(KeyguardIndication indication, boolean animate) { + switchIndication(indication == null ? null : indication.getMessage(), indication, + animate, null); + } + /** * Changes the text with an animation. */ diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java index 18877f9fb437..ad1518ff76e8 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java @@ -62,7 +62,6 @@ public class KeyguardStatusBarView extends RelativeLayout { private final ArrayList mEmptyTintRect = new ArrayList<>(); - private boolean mShowPercentAvailable; private boolean mBatteryCharging; private TextView mCarrierLabel; @@ -188,8 +187,6 @@ void loadDimens() { R.dimen.ongoing_appops_dot_min_padding); mCutoutSideNudge = getResources().getDimensionPixelSize( R.dimen.display_cutout_margin_consumption); - mShowPercentAvailable = getContext().getResources().getBoolean( - com.android.internal.R.bool.config_battery_percentage_setting_available); mRoundedCornerPadding = res.getDimensionPixelSize( R.dimen.rounded_corner_content_padding); } @@ -226,7 +223,7 @@ private void updateVisibilities() { mMultiUserAvatar.setVisibility(View.GONE); } } - mBatteryView.setForceShowPercent(mBatteryCharging && mShowPercentAvailable); + mBatteryView.setForceShowPercent(mBatteryCharging); } private void updateSystemIconsLayoutParams() { @@ -255,11 +252,15 @@ private void updateSystemIconsLayoutParams() { WindowInsets updateWindowInsets( WindowInsets insets, StatusBarContentInsetsProvider insetsProvider) { + updateWindowInsets(insetsProvider); + return super.onApplyWindowInsets(insets); + } + + private void updateWindowInsets(StatusBarContentInsetsProvider insetsProvider) { mLayoutState = LAYOUT_NONE; if (updateLayoutConsideringCutout(insetsProvider)) { requestLayout(); } - return super.onApplyWindowInsets(insets); } private boolean updateLayoutConsideringCutout(StatusBarContentInsetsProvider insetsProvider) { @@ -435,9 +436,11 @@ public boolean hasOverlappingRendering() { } /** Should only be called from {@link KeyguardStatusBarViewController}. */ - void onThemeChanged(StatusBarIconController.TintedIconManager iconManager) { + void onThemeChanged(StatusBarIconController.TintedIconManager iconManager, + StatusBarContentInsetsProvider insetsProvider) { mBatteryView.setColorsFromContext(mContext); updateIconsAndTextColors(iconManager); + updateWindowInsets(insetsProvider); } /** Should only be called from {@link KeyguardStatusBarViewController}. */ diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarViewController.java index def574c1890f..41c30273c4a5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarViewController.java @@ -364,7 +364,7 @@ protected void onViewDetached() { /** Should be called when the theme changes. */ public void onThemeChanged() { - mView.onThemeChanged(mTintedIconManager); + mView.onThemeChanged(mTintedIconManager, mInsetsProvider); } /** Sets whether user switcher is enabled. */ diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LeftBackSwipeCustomApp.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LeftBackSwipeCustomApp.java new file mode 100644 index 000000000000..f98b70a54481 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LeftBackSwipeCustomApp.java @@ -0,0 +1,58 @@ +package com.android.systemui.statusbar.phone; + +import android.content.pm.ActivityInfo; +import android.os.UserHandle; +import android.provider.Settings; +import android.view.View; +import android.widget.ListView; + +import com.android.systemui.statusbar.phone.AppPicker; +import com.android.systemui.R; + +public class LeftBackSwipeCustomApp extends AppPicker { + + @Override + protected void onListItemClick(ListView l, View v, int position, long id) { + if (!mIsActivitiesList) { + // we are in the Apps list + String packageName = applist.get(position).packageName; + String friendlyAppString = (String) applist.get(position).loadLabel(packageManager); + setPackage(packageName, friendlyAppString); + setPackageActivity(null); + } else if (mIsActivitiesList) { + // we are in the Activities list + setPackageActivity(mActivitiesList.get(position)); + } + + mIsActivitiesList = false; + finish(); + } + + @Override + protected void onLongClick(int position) { + if (mIsActivitiesList) return; + String packageName = applist.get(position).packageName; + String friendlyAppString = (String) applist.get(position).loadLabel(packageManager); + // always set xxx_SQUEEZE_CUSTOM_APP so we can fallback if something goes wrong with + // packageManager.getPackageInfo + setPackage(packageName, friendlyAppString); + setPackageActivity(null); + showActivitiesDialog(packageName); + } + + protected void setPackage(String packageName, String friendlyAppString) { + Settings.System.putStringForUser(getContentResolver(), + Settings.System.LEFT_LONG_BACK_SWIPE_APP_ACTION, packageName, + UserHandle.USER_CURRENT); + Settings.System.putStringForUser(getContentResolver(), + Settings.System.LEFT_LONG_BACK_SWIPE_APP_FR_ACTION, friendlyAppString, + UserHandle.USER_CURRENT); + } + + protected void setPackageActivity(ActivityInfo ai) { + Settings.System.putStringForUser( + getContentResolver(), Settings.System.LEFT_LONG_BACK_SWIPE_APP_ACTIVITY_ACTION, + ai != null ? ai.name : "NONE", + UserHandle.USER_CURRENT); + } +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LeftBackVerticalSwipeCustomApp.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LeftBackVerticalSwipeCustomApp.java new file mode 100644 index 000000000000..20ae9ea57d30 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LeftBackVerticalSwipeCustomApp.java @@ -0,0 +1,26 @@ +package com.android.systemui.statusbar.phone; + +import android.content.pm.ActivityInfo; +import android.os.UserHandle; +import android.provider.Settings; + +public class LeftBackVerticalSwipeCustomApp extends LeftBackSwipeCustomApp { + + @Override + protected void setPackage(String packageName, String friendlyAppString) { + Settings.System.putStringForUser(getContentResolver(), + Settings.System.LEFT_VERTICAL_BACK_SWIPE_APP_ACTION, packageName, + UserHandle.USER_CURRENT); + Settings.System.putStringForUser(getContentResolver(), + Settings.System.LEFT_VERTICAL_BACK_SWIPE_APP_FR_ACTION, friendlyAppString, + UserHandle.USER_CURRENT); + } + + @Override + protected void setPackageActivity(ActivityInfo ai) { + Settings.System.putStringForUser( + getContentResolver(), Settings.System.LEFT_VERTICAL_BACK_SWIPE_APP_ACTIVITY_ACTION, + ai != null ? ai.name : "NONE", + UserHandle.USER_CURRENT); + } +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java index 2dc3261eb886..dfaaca86981b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java @@ -140,8 +140,10 @@ public AnimationFilter getAnimationFilter() { private static final int MAX_ICONS_ON_AOD = 3; /* Maximum number of icons in short shelf on lockscreen when also showing overflow dot. */ - public static final int MAX_ICONS_ON_LOCKSCREEN = 3; - public static final int MAX_STATIC_ICONS = 4; + public final int MAX_ICONS_ON_LOCKSCREEN = + getResources().getInteger(R.integer.config_maxVisibleNotificationIconsOnLock); + public final int MAX_STATIC_ICONS = + getResources().getInteger(R.integer.config_maxVisibleNotificationIcons); private static final int MAX_DOTS = 1; private boolean mIsStaticLayout = true; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java index 2cac0017db9c..9d60d16ac906 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java @@ -47,8 +47,12 @@ import android.annotation.NonNull; import android.app.ActivityManager; import android.app.Fragment; +import android.app.Notification; +import android.app.PendingIntent; import android.app.StatusBarManager; import android.content.ContentResolver; +import android.content.Context; +import android.content.pm.PackageManager.NameNotFoundException; import android.content.pm.ResolveInfo; import android.content.res.Configuration; import android.content.res.Resources; @@ -56,6 +60,7 @@ import android.graphics.Canvas; import android.graphics.Color; import android.graphics.ColorFilter; +import android.graphics.ColorMatrixColorFilter; import android.graphics.Insets; import android.graphics.Paint; import android.graphics.PointF; @@ -68,14 +73,18 @@ import android.os.Handler; import android.os.PowerManager; import android.os.Trace; +import android.os.UserHandle; import android.os.UserManager; import android.os.VibrationEffect; import android.provider.Settings; +import android.service.notification.StatusBarNotification; +import android.text.TextUtils; import android.transition.ChangeBounds; import android.transition.TransitionManager; import android.util.IndentingPrintWriter; import android.util.Log; import android.util.MathUtils; +import android.view.GestureDetector; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.VelocityTracker; @@ -84,11 +93,16 @@ import android.view.ViewPropertyAnimator; import android.view.ViewStub; import android.view.ViewTreeObserver; +import android.view.ViewTreeObserver.InternalInsetsInfo; +import android.view.ViewTreeObserver.OnComputeInternalInsetsListener; import android.view.WindowInsets; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityManager; import android.view.accessibility.AccessibilityNodeInfo; import android.widget.FrameLayout; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.TextView; import androidx.annotation.Nullable; import androidx.constraintlayout.widget.ConstraintSet; @@ -112,6 +126,7 @@ import com.android.keyguard.dagger.KeyguardUserSwitcherComponent; import com.android.systemui.DejankUtils; import com.android.systemui.R; +import com.android.systemui.RetickerAnimations; import com.android.systemui.animation.ActivityLaunchAnimator; import com.android.systemui.animation.Interpolators; import com.android.systemui.animation.LaunchAnimator; @@ -191,6 +206,7 @@ import com.android.systemui.statusbar.policy.KeyguardUserSwitcherView; import com.android.systemui.statusbar.policy.OnHeadsUpChangedListener; import com.android.systemui.statusbar.window.StatusBarWindowStateController; +import com.android.systemui.tuner.TunerService; import com.android.systemui.unfold.SysUIUnfoldComponent; import com.android.systemui.util.Compile; import com.android.systemui.util.LargeScreenUtils; @@ -275,10 +291,10 @@ public class NotificationPanelViewController extends PanelViewController { private final NotificationStackScrollLayoutController mNotificationStackScrollLayoutController; private final NotificationIconAreaController mNotificationIconAreaController; - // Cap and total height of Roboto font. Needs to be adjusted when font for the big clock is + // Cap and total height of GSans Clock font. Needs to be adjusted when font for the big clock is // changed. - private static final int CAP_HEIGHT = 1456; - private static final int FONT_HEIGHT = 2163; + private static final int CAP_HEIGHT = 716; + private static final int FONT_HEIGHT = 827; /** * Maximum time before which we will expand the panel even for slow motions when getting a @@ -292,6 +308,17 @@ public class NotificationPanelViewController extends PanelViewController { private static final String COUNTER_PANEL_OPEN_QS = "panel_open_qs"; private static final String COUNTER_PANEL_OPEN_PEEK = "panel_open_peek"; + private static final String STATUS_BAR_QUICK_QS_PULLDOWN = + "system:" + Settings.System.STATUS_BAR_QUICK_QS_PULLDOWN; + private static final String DOUBLE_TAP_SLEEP_GESTURE = + "system:" + Settings.System.DOUBLE_TAP_SLEEP_GESTURE; + private static final String DOUBLE_TAP_SLEEP_LOCKSCREEN = + "system:" + Settings.System.DOUBLE_TAP_SLEEP_LOCKSCREEN; + private static final String RETICKER_STATUS = + "system:" + Settings.System.RETICKER_STATUS; + private static final String RETICKER_COLORED = + "system:" + Settings.System.RETICKER_COLORED; + private static final Rect M_DUMMY_DIRTY_RECT = new Rect(0, 0, 1, 1); private static final Rect EMPTY_RECT = new Rect(); @@ -338,6 +365,9 @@ public class NotificationPanelViewController extends PanelViewController { private int mMaxAllowedKeyguardNotifications; private ViewGroup mPreviewContainer; + + private final TunerService mTunerService; + private KeyguardAffordanceHelper mAffordanceHelper; private KeyguardQsUserSwitchController mKeyguardQsUserSwitchController; private KeyguardUserSwitcherController mKeyguardUserSwitcherController; @@ -354,6 +384,7 @@ public class NotificationPanelViewController extends PanelViewController { private float mQuickQsHeaderHeight; private ScreenOffAnimationController mScreenOffAnimationController; private UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController; + private final EdgeLightViewController mEdgeLightViewController; private int mTrackingPointer; private VelocityTracker mQsVelocityTracker; @@ -530,6 +561,10 @@ public class NotificationPanelViewController extends PanelViewController { private NotificationShadeDepthController mDepthController; private int mDisplayId; + private boolean mDoubleTapToSleepEnabled; + private GestureDetector mDoubleTapGesture; + + private boolean mIsLockscreenDoubleTapEnabled; /** * Cache the resource id of the theme to avoid unnecessary work in onThemeChanged. @@ -653,6 +688,8 @@ public class NotificationPanelViewController extends PanelViewController { private final ContentResolver mContentResolver; private float mMinFraction; + private int mOneFingerQuickSettingsIntercept; + private final Executor mUiExecutor; private final SecureSettings mSecureSettings; @@ -669,6 +706,16 @@ public class NotificationPanelViewController extends PanelViewController { private final NPVCDownEventState.Buffer mLastDownEvents; + private final String[] mAppExceptions; + + /*Reticker*/ + private LinearLayout mReTickerComeback; + private ImageView mReTickerComebackIcon; + private TextView mReTickerContentTV; + private NotificationStackScrollLayout mNotificationStackScroller; + private boolean mReTickerStatus; + private boolean mReTickerColored; + private View.AccessibilityDelegate mAccessibilityDelegate = new View.AccessibilityDelegate() { @Override public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) { @@ -702,6 +749,8 @@ public void onDoubleTapRequired() { } }; + private boolean mBlockedGesturalNavigation = false; + @Inject public NotificationPanelViewController(NotificationPanelView view, @Main Resources resources, @@ -772,7 +821,10 @@ public NotificationPanelViewController(NotificationPanelView view, NotificationStackSizeCalculator notificationStackSizeCalculator, UnlockedScreenOffAnimationController unlockedScreenOffAnimationController, ShadeTransitionController shadeTransitionController, - SystemClock systemClock) { + TunerService tunerService, + Context context, + SystemClock systemClock, + EdgeLightViewController edgeLightViewController) { super(view, falsingManager, dozeLog, @@ -821,6 +873,7 @@ public NotificationPanelViewController(NotificationPanelView view, LargeScreenUtils.shouldUseSplitNotificationShade(mResources); mView.setWillNotDraw(!DEBUG_DRAWABLE); mLargeScreenShadeHeaderController = largeScreenShadeHeaderController; + mTunerService = tunerService; mLayoutInflater = layoutInflater; mFeatureFlags = featureFlags; mFalsingManager = falsingManager; @@ -871,6 +924,16 @@ public NotificationPanelViewController(NotificationPanelView view, }); mBottomAreaShadeAlphaAnimator.setDuration(160); mBottomAreaShadeAlphaAnimator.setInterpolator(Interpolators.ALPHA_OUT); + mDoubleTapGesture = new GestureDetector(context, + new GestureDetector.SimpleOnGestureListener() { + @Override + public boolean onDoubleTap(MotionEvent e) { + if (mPowerManager != null) { + mPowerManager.goToSleep(e.getEventTime()); + } + return true; + } + }); mEntryManager = notificationEntryManager; mConversationNotificationManager = conversationNotificationManager; mAuthController = authController; @@ -879,6 +942,8 @@ public NotificationPanelViewController(NotificationPanelView view, mUnlockedScreenOffAnimationController = unlockedScreenOffAnimationController; mRemoteInputManager = remoteInputManager; mLastDownEvents = new NPVCDownEventState.Buffer(MAX_DOWN_EVENT_BUFFER_SIZE); + mEdgeLightViewController = edgeLightViewController; + mAppExceptions = mResources.getStringArray(R.array.app_exceptions); int currentMode = navigationModeController.addListener( mode -> mIsGestureNavigation = QuickStepContract.isGesturalMode(mode)); @@ -977,19 +1042,12 @@ void onFinishInflate() { } } - mKeyguardStatusBarViewController = - mKeyguardStatusBarViewComponentFactory.build( - mKeyguardStatusBar, - mNotificationPanelViewStateProvider) - .getKeyguardStatusBarViewController(); - mKeyguardStatusBarViewController.init(); - mNotificationContainerParent = mView.findViewById(R.id.notification_container_parent); updateViewControllers( mView.findViewById(R.id.keyguard_status_view), userAvatarContainer, keyguardUserSwitcherView); - + mEdgeLightViewController.setEdgeLightView(mView.findViewById(R.id.edge_light_container)); NotificationStackScrollLayout stackScrollLayout = mView.findViewById( R.id.notification_stack_scroller); mNotificationStackScrollLayoutController.attach(stackScrollLayout); @@ -1006,6 +1064,11 @@ void onFinishInflate() { mPreviewContainer = mView.findViewById(R.id.preview_container); mKeyguardBottomArea.setPreviewContainer(mPreviewContainer); + mReTickerComeback = mView.findViewById(R.id.ticker_comeback); + mReTickerComebackIcon = mView.findViewById(R.id.ticker_comeback_icon); + mReTickerContentTV = mView.findViewById(R.id.ticker_content); + mNotificationStackScroller = mView.findViewById(R.id.notification_stack_scroller); + initBottomArea(); mWakeUpCoordinator.setStackScroller(mNotificationStackScrollLayoutController); @@ -1085,6 +1148,13 @@ private void updateViewControllers(KeyguardStatusView keyguardStatusView, mKeyguardStatusViewController = statusViewComponent.getKeyguardStatusViewController(); mKeyguardStatusViewController.init(); + mKeyguardStatusBarViewController = + mKeyguardStatusBarViewComponentFactory.build( + mKeyguardStatusBar, + mNotificationPanelViewStateProvider) + .getKeyguardStatusBarViewController(); + mKeyguardStatusBarViewController.init(); + if (mKeyguardUserSwitcherController != null) { // Try to close the switcher so that callbacks are triggered if necessary. // Otherwise, NPV can get into a state where some of the views are still hidden @@ -1204,6 +1274,15 @@ void reInflateViews() { keyguardStatusView = (KeyguardStatusView) mLayoutInflater.inflate( R.layout.keyguard_status_view, mNotificationContainerParent, false); mNotificationContainerParent.addView(keyguardStatusView, statusIndex); + + // Re-inflate the keyguard status bar. + statusIndex = mView.indexOfChild(mKeyguardStatusBar); + mView.removeView(mKeyguardStatusBar); + mKeyguardStatusBar = (KeyguardStatusBarView) mLayoutInflater.inflate( + R.layout.keyguard_status_bar, mView, false); + mView.addView(mKeyguardStatusBar); + mKeyguardStatusBar.setVisibility(isOnKeyguard() ? View.VISIBLE : View.INVISIBLE); + // When it's reinflated, this is centered by default. If it shouldn't be, this will update // below when resources are updated. mStatusViewCentered = true; @@ -1782,14 +1861,14 @@ protected void flingToHeight(float vel, boolean expand, float target, mHeadsUpTouchHelper.notifyFling(!expand); mKeyguardStateController.notifyPanelFlingStart(!expand /* flingingToDismiss */); setClosingWithAlphaFadeout(!expand && !isOnKeyguard() && getFadeoutAlpha() == 1.0f); - mAmbientState.setIsFlinging(true); + mNotificationStackScrollLayoutController.setPanelFlinging(true); super.flingToHeight(vel, expand, target, collapseSpeedUpFactor, expandBecauseOfFalsing); } @Override protected void onFlingEnd(boolean cancelled) { super.onFlingEnd(cancelled); - mAmbientState.setIsFlinging(false); + mNotificationStackScrollLayoutController.setPanelFlinging(false); } private boolean onQsIntercept(MotionEvent event) { @@ -2119,7 +2198,25 @@ private boolean isOpenQsEvent(MotionEvent event) { MotionEvent.BUTTON_SECONDARY) || event.isButtonPressed( MotionEvent.BUTTON_TERTIARY)); - return twoFingerDrag || stylusButtonClickDrag || mouseButtonClickDrag; + final float w = mView.getMeasuredWidth(); + final float x = event.getX(); + float region = w * 1.f / 4.f; // TODO overlay region fraction? + boolean showQsOverride = false; + + switch (mOneFingerQuickSettingsIntercept) { + case 1: // Right side pulldown + showQsOverride = mView.isLayoutRtl() ? x < region : w - region < x; + break; + case 2: // Left side pulldown + showQsOverride = mView.isLayoutRtl() ? w - region < x : x < region; + break; + case 3: // pull down anywhere + showQsOverride = true; + break; + } + showQsOverride &= mBarState == StatusBarState.SHADE; + + return twoFingerDrag || showQsOverride || stylusButtonClickDrag || mouseButtonClickDrag; } private void handleQsDown(MotionEvent event) { @@ -2438,6 +2535,7 @@ private void updateQsExpansion() { mLargeScreenShadeHeaderController.setShadeExpandedFraction(shadeExpandedFraction); mLargeScreenShadeHeaderController.setQsExpandedFraction(qsExpansionFraction); mLargeScreenShadeHeaderController.setShadeExpanded(mQsVisible); + reTickerViewVisibility(); } private void onStackYChanged(boolean shouldAnimate) { @@ -4202,6 +4300,13 @@ public boolean onTouch(View v, MotionEvent event) { return false; } + if ((mIsLockscreenDoubleTapEnabled && !mPulsing && !mDozing + && mBarState == StatusBarState.KEYGUARD) || + (!mQsExpanded && mDoubleTapToSleepEnabled + && event.getY() < mStatusBarHeaderHeightKeyguard)) { + mDoubleTapGesture.onTouchEvent(event); + } + // Make sure the next touch won't the blocked after the current ends. if (event.getAction() == MotionEvent.ACTION_UP || event.getAction() == MotionEvent.ACTION_CANCEL) { @@ -4358,6 +4463,10 @@ private void unregisterSettingsChangeListener() { mContentResolver.unregisterContentObserver(mSettingsChangeObserver); } + public void setBlockedGesturalNavigation(boolean blocked) { + mBlockedGesturalNavigation = blocked; + } + /** * Updates notification panel-specific flags on {@link SysUiState}. */ @@ -4368,7 +4477,8 @@ public void updateSystemUiStateFlags() { } mSysUiState.setFlag(SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED, isFullyExpanded() && !isInSettings()) - .setFlag(SYSUI_STATE_QUICK_SETTINGS_EXPANDED, isInSettings()) + .setFlag(SYSUI_STATE_QUICK_SETTINGS_EXPANDED, + mBlockedGesturalNavigation || isInSettings()) .commitUpdate(mDisplayId); } @@ -4896,7 +5006,8 @@ public void setOverStrechAmount(float amount) { positionClockAndNotifications(true /* forceUpdate */); } - private class OnAttachStateChangeListener implements View.OnAttachStateChangeListener { + private class OnAttachStateChangeListener implements View.OnAttachStateChangeListener, + TunerService.Tunable { @Override public void onViewAttachedToWindow(View v) { mFragmentService.getFragmentHostManager(mView) @@ -4904,6 +5015,11 @@ public void onViewAttachedToWindow(View v) { mStatusBarStateController.addCallback(mStatusBarStateListener); mStatusBarStateListener.onStateChanged(mStatusBarStateController.getState()); mConfigurationController.addCallback(mConfigurationListener); + mTunerService.addTunable(this, STATUS_BAR_QUICK_QS_PULLDOWN); + mTunerService.addTunable(this, DOUBLE_TAP_SLEEP_GESTURE); + mTunerService.addTunable(this, DOUBLE_TAP_SLEEP_LOCKSCREEN); + mTunerService.addTunable(this, RETICKER_STATUS); + mTunerService.addTunable(this, RETICKER_COLORED); // Theme might have changed between inflating this view and attaching it to the // window, so // force a call to onThemeChanged @@ -4920,8 +5036,37 @@ public void onViewDetachedFromWindow(View v) { .removeTagListener(QS.TAG, mFragmentListener); mStatusBarStateController.removeCallback(mStatusBarStateListener); mConfigurationController.removeCallback(mConfigurationListener); + mTunerService.removeTunable(this); mFalsingManager.removeTapListener(mFalsingTapListener); } + + @Override + public void onTuningChanged(String key, String newValue) { + switch (key) { + case STATUS_BAR_QUICK_QS_PULLDOWN: + mOneFingerQuickSettingsIntercept = + TunerService.parseInteger(newValue, 1); + break; + case DOUBLE_TAP_SLEEP_GESTURE: + mDoubleTapToSleepEnabled = + TunerService.parseIntegerSwitch(newValue, true); + break; + case DOUBLE_TAP_SLEEP_LOCKSCREEN: + mIsLockscreenDoubleTapEnabled = + TunerService.parseIntegerSwitch(newValue, true); + break; + case RETICKER_STATUS: + mReTickerStatus = + TunerService.parseIntegerSwitch(newValue, false); + break; + case RETICKER_COLORED: + mReTickerColored = + TunerService.parseIntegerSwitch(newValue, false); + break; + default: + break; + } + } } private class OnLayoutChangeListener extends PanelViewController.OnLayoutChangeListener { @@ -4937,7 +5082,7 @@ public void onLayoutChange(View v, int left, int top, int right, int bottom, int // Update Clock Pivot mKeyguardStatusViewController.setPivotX(mView.getWidth() / 2); mKeyguardStatusViewController.setPivotY( - (FONT_HEIGHT - CAP_HEIGHT) / 2048f + (FONT_HEIGHT - CAP_HEIGHT) / 1000f * mKeyguardStatusViewController.getClockTextSize()); // Calculate quick setting heights. @@ -5178,4 +5323,102 @@ private void notifyPanelCollapsingChanged(boolean isCollapsing) { } } } + + /* reTicker */ + + public void reTickerView(boolean visibility) { + if (!mReTickerStatus) return; + if (visibility && mReTickerComeback.getVisibility() == View.VISIBLE) { + reTickerDismissal(); + } + String reTickerContent; + if (visibility && getExpandedFraction() != 1) { + mNotificationStackScroller.setVisibility(View.GONE); + StatusBarNotification sbn = mHeadsUpManager.getTopEntry().getRow().getEntry().getSbn(); + Notification notification = sbn.getNotification(); + String pkgname = sbn.getPackageName(); + Drawable icon = null; + try { + if (pkgname.equals("com.android.systemui")) { + icon = mView.getContext().getDrawable(notification.icon); + } else { + icon = mView.getContext().getPackageManager().getApplicationIcon(pkgname); + } + } catch (NameNotFoundException e) { + return; + } + String content = notification.extras.getString("android.text"); + if (TextUtils.isEmpty(content)) return; + reTickerContent = content; + String reTickerAppName = notification.extras.getString("android.title"); + PendingIntent reTickerIntent = notification.contentIntent; + String mergedContentText = reTickerAppName + " " + reTickerContent; + mReTickerComebackIcon.setImageDrawable(icon); + Drawable dw = mView.getContext().getDrawable(R.drawable.reticker_background); + if (mReTickerColored) { + int col = notification.color; + // check if we need to override the color + if ((mAppExceptions.length & 1) == 0) { + for (int i = 0; i < mAppExceptions.length; i += 2) { + if (mAppExceptions[i].equals(pkgname)) { + col = Color.parseColor(mAppExceptions[i + 1]); + break; + } + } + } + dw.setTint(col); + } else { + dw.setTintList(null); + } + mReTickerComeback.setBackground(dw); + mReTickerContentTV.setText(mergedContentText); + mReTickerContentTV.setTextAppearance(mView.getContext(), R.style.TextAppearance_Notifications_reTicker); + mReTickerContentTV.setSelected(true); + RetickerAnimations.doBounceAnimationIn(mReTickerComeback); + if (reTickerIntent != null) { + mReTickerComeback.setOnClickListener(v -> { + try { + reTickerIntent.send(); + } catch (PendingIntent.CanceledException e) { + } + RetickerAnimations.doBounceAnimationOut(mReTickerComeback, mNotificationStackScroller); + reTickerViewVisibility(); + }); + } + } else { + reTickerDismissal(); + } + } + + private void reTickerViewVisibility() { + if (!mReTickerStatus) { + reTickerDismissal(); + return; + } + mNotificationStackScroller.setVisibility(getExpandedFraction() == 0 ? View.GONE : View.VISIBLE); + if (getExpandedFraction() > 0) mReTickerComeback.setVisibility(View.GONE); + if (mReTickerComeback.getVisibility() == View.VISIBLE) { + mReTickerComeback.getViewTreeObserver().addOnComputeInternalInsetsListener(mInsetsListener); + } else { + mReTickerComeback.getViewTreeObserver().removeOnComputeInternalInsetsListener(mInsetsListener); + } + } + + public void reTickerDismissal() { + RetickerAnimations.doBounceAnimationOut(mReTickerComeback, mNotificationStackScroller); + mReTickerComeback.getViewTreeObserver().removeOnComputeInternalInsetsListener(mInsetsListener); + } + + private final OnComputeInternalInsetsListener mInsetsListener = internalInsetsInfo -> { + internalInsetsInfo.touchableRegion.setEmpty(); + internalInsetsInfo.setTouchableInsets(InternalInsetsInfo.TOUCHABLE_INSETS_REGION); + int[] mainLocation = new int[2]; + mReTickerComeback.getLocationOnScreen(mainLocation); + internalInsetsInfo.touchableRegion.set(new Region( + mainLocation[0], + mainLocation[1], + mainLocation[0] + mReTickerComeback.getWidth(), + mainLocation[1] + mReTickerComeback.getHeight() + )); + }; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java index be5b33eb0da0..d38c24da182c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java @@ -17,9 +17,11 @@ package com.android.systemui.statusbar.phone; import android.app.StatusBarManager; +import android.content.Context; import android.hardware.display.AmbientDisplayConfiguration; import android.media.AudioManager; import android.media.session.MediaSessionLegacyHelper; +import android.os.PowerManager; import android.os.SystemClock; import android.os.UserHandle; import android.provider.Settings; @@ -92,9 +94,17 @@ public class NotificationShadeWindowViewController { private final NotificationPanelViewController mNotificationPanelViewController; private final PanelExpansionStateManager mPanelExpansionStateManager; private final Optional mLowLightClockController; + private final PowerManager mPowerManager; private boolean mIsTrackingBarGesture = false; + private static final String DOUBLE_TAP_SLEEP_GESTURE = + "system:" + Settings.System.DOUBLE_TAP_SLEEP_GESTURE; + private boolean mDoubleTapToSleepEnabled; + private int mQuickQsOffsetHeight; + + private boolean mDoubleTapEnabledNative; + @Inject public NotificationShadeWindowViewController( LockscreenShadeTransitionController transitionController, @@ -114,6 +124,7 @@ public NotificationShadeWindowViewController( CentralSurfaces centralSurfaces, NotificationShadeWindowController controller, KeyguardUnlockAnimationController keyguardUnlockAnimationController, + Context context, AmbientState ambientState) { mLockscreenShadeTransitionController = transitionController; mFalsingCollector = falsingCollector; @@ -133,6 +144,7 @@ public NotificationShadeWindowViewController( mNotificationShadeWindowController = controller; mKeyguardUnlockAnimationController = keyguardUnlockAnimationController; mAmbientState = ambientState; + mPowerManager = context.getSystemService(PowerManager.class); // This view is not part of the newly inflated expanded status bar. mBrightnessMirror = mView.findViewById(R.id.brightness_mirror_container); @@ -153,17 +165,28 @@ public void setupExpandedStatusBar() { AmbientDisplayConfiguration configuration = new AmbientDisplayConfiguration(mView.getContext()); switch (key) { + case Settings.Secure.DOUBLE_TAP_TO_WAKE: + mDoubleTapEnabledNative = TunerService.parseIntegerSwitch(newValue, false); + break; case Settings.Secure.DOZE_DOUBLE_TAP_GESTURE: - mDoubleTapEnabled = configuration.doubleTapGestureEnabled( - UserHandle.USER_CURRENT); + mDoubleTapEnabled = Settings.Secure.getIntForUser(mView.getContext().getContentResolver(), + Settings.Secure.DOZE_DOUBLE_TAP_GESTURE, 1, UserHandle.USER_CURRENT) == 1; break; case Settings.Secure.DOZE_TAP_SCREEN_GESTURE: mSingleTapEnabled = configuration.tapGestureEnabled(UserHandle.USER_CURRENT); + break; + case DOUBLE_TAP_SLEEP_GESTURE: + mDoubleTapToSleepEnabled = TunerService.parseIntegerSwitch(newValue, true); + break; } }; mTunerService.addTunable(tunable, + Settings.Secure.DOUBLE_TAP_TO_WAKE, Settings.Secure.DOZE_DOUBLE_TAP_GESTURE, - Settings.Secure.DOZE_TAP_SCREEN_GESTURE); + Settings.Secure.DOZE_TAP_SCREEN_GESTURE, + DOUBLE_TAP_SLEEP_GESTURE); + mQuickQsOffsetHeight = mView.getResources().getDimensionPixelSize( + com.android.internal.R.dimen.quick_qs_offset_height); GestureDetector.SimpleOnGestureListener gestureListener = new GestureDetector.SimpleOnGestureListener() { @@ -179,7 +202,12 @@ public boolean onSingleTapConfirmed(MotionEvent e) { @Override public boolean onDoubleTap(MotionEvent e) { - if (mDoubleTapEnabled || mSingleTapEnabled) { + if (!mStatusBarStateController.isDozing() && mDoubleTapToSleepEnabled + && e.getY() < mQuickQsOffsetHeight) { + mPowerManager.goToSleep(e.getEventTime()); + return true; + } + if (mDoubleTapEnabled || mSingleTapEnabled || mDoubleTapEnabledNative) { mService.wakeUpIfDozing( SystemClock.uptimeMillis(), mView, "DOUBLE_TAP"); return true; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java index 82ca842d48c9..5d417e0b59e2 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java @@ -599,9 +599,7 @@ protected void flingToHeight(float vel, boolean expand, float target, float collapseSpeedUpFactor, boolean expandBecauseOfFalsing) { if (target == mExpandedHeight && mOverExpansion == 0.0f) { // We're at the target and didn't fling and there's no overshoot - endJankMonitoring(CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE); - mKeyguardStateController.notifyPanelFlingEnd(); - notifyExpandingFinished(); + onFlingEnd(false /* cancelled */); return; } mIsFlinging = true; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java index 290df3e3e1af..741221f6a6f4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java @@ -369,7 +369,7 @@ private void updateAlarm() { final boolean zenNone = zen == Global.ZEN_MODE_NO_INTERRUPTIONS; mIconController.setIcon(mSlotAlarmClock, zenNone ? R.drawable.stat_sys_alarm_dim : R.drawable.stat_sys_alarm, buildAlarmContentDescription()); - mIconController.setIconVisibility(mSlotAlarmClock, mCurrentUserSetup && hasAlarm); + mIconController.setIconVisibility(mSlotAlarmClock, hasAlarm); } private String buildAlarmContentDescription() { @@ -455,14 +455,32 @@ private final void updateBluetooth() { String contentDescription = mResources.getString(R.string.accessibility_quick_settings_bluetooth_on); boolean bluetoothVisible = false; - if (mBluetooth != null) { - if (mBluetooth.isBluetoothConnected() - && (mBluetooth.isBluetoothAudioActive() - || !mBluetooth.isBluetoothAudioProfileOnly())) { - contentDescription = mResources.getString( - R.string.accessibility_bluetooth_connected); - bluetoothVisible = mBluetooth.isBluetoothEnabled(); + if (mBluetooth != null && mBluetooth.isBluetoothConnected()) { + int batteryLevel = mBluetooth.getBatteryLevel(); + if (batteryLevel == 100) { + iconId = R.drawable.stat_sys_data_bluetooth_connected_battery_9; + } else if (batteryLevel >= 90) { + iconId = R.drawable.stat_sys_data_bluetooth_connected_battery_8; + } else if (batteryLevel >= 80) { + iconId = R.drawable.stat_sys_data_bluetooth_connected_battery_7; + } else if (batteryLevel >= 70) { + iconId = R.drawable.stat_sys_data_bluetooth_connected_battery_6; + } else if (batteryLevel >= 60) { + iconId = R.drawable.stat_sys_data_bluetooth_connected_battery_5; + } else if (batteryLevel >= 50) { + iconId = R.drawable.stat_sys_data_bluetooth_connected_battery_4; + } else if (batteryLevel >= 40) { + iconId = R.drawable.stat_sys_data_bluetooth_connected_battery_3; + } else if (batteryLevel >= 30) { + iconId = R.drawable.stat_sys_data_bluetooth_connected_battery_2; + } else if (batteryLevel >= 20) { + iconId = R.drawable.stat_sys_data_bluetooth_connected_battery_1; + } else if (batteryLevel >= 10) { + iconId = R.drawable.stat_sys_data_bluetooth_connected_battery_0; } + contentDescription = mResources.getString( + R.string.accessibility_bluetooth_connected); + bluetoothVisible = mBluetooth.isBluetoothEnabled(); } mIconController.setIcon(mSlotBluetooth, iconId, contentDescription); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java index 7aeb08dd5ddb..4fcac7673a3b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java @@ -26,6 +26,7 @@ import android.util.Pair; import android.view.DisplayCutout; import android.view.MotionEvent; +import android.view.Surface; import android.view.View; import android.view.ViewGroup; import android.view.WindowInsets; @@ -47,7 +48,6 @@ public class PhoneStatusBarView extends FrameLayout { private final StatusBarContentInsetsProvider mContentInsetsProvider; private DarkReceiver mBattery; - private DarkReceiver mClock; private int mRotationOrientation = -1; @Nullable private View mCutoutSpace; @@ -77,7 +77,6 @@ void setTouchEventHandler(TouchEventHandler handler) { public void onFinishInflate() { super.onFinishInflate(); mBattery = findViewById(R.id.battery); - mClock = findViewById(R.id.clock); mCutoutSpace = findViewById(R.id.cutout_space_view); updateResources(); @@ -88,7 +87,6 @@ protected void onAttachedToWindow() { super.onAttachedToWindow(); // Always have Battery meters in the status bar observe the dark/light modes. Dependency.get(DarkIconDispatcher.class).addDarkReceiver(mBattery); - Dependency.get(DarkIconDispatcher.class).addDarkReceiver(mClock); if (updateDisplayParameters()) { updateLayoutForCutout(); } @@ -98,7 +96,6 @@ protected void onAttachedToWindow() { protected void onDetachedFromWindow() { super.onDetachedFromWindow(); Dependency.get(DarkIconDispatcher.class).removeDarkReceiver(mBattery); - Dependency.get(DarkIconDispatcher.class).removeDarkReceiver(mClock); mDisplayCutout = null; } @@ -258,6 +255,15 @@ private void updateSafeInsets() { getPaddingTop(), insets.second, getPaddingBottom()); + + // Apply negative paddings to centered area layout so that we'll actually be on the center. + final int winRotation = getDisplay().getRotation(); + LayoutParams centeredAreaParams = + (LayoutParams) findViewById(R.id.centered_area).getLayoutParams(); + centeredAreaParams.leftMargin = + winRotation == Surface.ROTATION_0 ? -insets.first : 0; + centeredAreaParams.rightMargin = + winRotation == Surface.ROTATION_0 ? -insets.second : 0; } /** diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/RightBackSwipeCustomApp.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/RightBackSwipeCustomApp.java new file mode 100644 index 000000000000..6d1322a30d90 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/RightBackSwipeCustomApp.java @@ -0,0 +1,26 @@ +package com.android.systemui.statusbar.phone; + +import android.content.pm.ActivityInfo; +import android.os.UserHandle; +import android.provider.Settings; + +public class RightBackSwipeCustomApp extends LeftBackSwipeCustomApp { + + @Override + protected void setPackage(String packageName, String friendlyAppString) { + Settings.System.putStringForUser(getContentResolver(), + Settings.System.RIGHT_LONG_BACK_SWIPE_APP_ACTION, packageName, + UserHandle.USER_CURRENT); + Settings.System.putStringForUser(getContentResolver(), + Settings.System.RIGHT_LONG_BACK_SWIPE_APP_FR_ACTION, friendlyAppString, + UserHandle.USER_CURRENT); + } + + @Override + protected void setPackageActivity(ActivityInfo ai) { + Settings.System.putStringForUser( + getContentResolver(), Settings.System.RIGHT_LONG_BACK_SWIPE_APP_ACTIVITY_ACTION, + ai != null ? ai.name : "NONE", + UserHandle.USER_CURRENT); + } +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/RightBackVerticalSwipeCustomApp.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/RightBackVerticalSwipeCustomApp.java new file mode 100644 index 000000000000..540960247636 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/RightBackVerticalSwipeCustomApp.java @@ -0,0 +1,26 @@ +package com.android.systemui.statusbar.phone; + +import android.content.pm.ActivityInfo; +import android.os.UserHandle; +import android.provider.Settings; + +public class RightBackVerticalSwipeCustomApp extends LeftBackSwipeCustomApp { + + @Override + protected void setPackage(String packageName, String friendlyAppString) { + Settings.System.putStringForUser(getContentResolver(), + Settings.System.RIGHT_VERTICAL_BACK_SWIPE_APP_ACTION, packageName, + UserHandle.USER_CURRENT); + Settings.System.putStringForUser(getContentResolver(), + Settings.System.RIGHT_VERTICAL_BACK_SWIPE_APP_FR_ACTION, friendlyAppString, + UserHandle.USER_CURRENT); + } + + @Override + protected void setPackageActivity(ActivityInfo ai) { + Settings.System.putStringForUser( + getContentResolver(), Settings.System.RIGHT_VERTICAL_BACK_SWIPE_APP_ACTIVITY_ACTION, + ai != null ? ai.name : "NONE", + UserHandle.USER_CURRENT); + } +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java index 5e7dc115d7f9..6c801339ba78 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java @@ -206,6 +206,7 @@ public void setUnocclusionAnimationRunning(boolean unocclusionAnimationRunning) private final StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; private GradientColors mColors; + private GradientColors mBehindColors; private boolean mNeedsDrawableColorUpdate; private float mAdditionalScrimBehindAlphaKeyguard = 0f; @@ -310,6 +311,7 @@ public void onUiModeChanged() { ); mColors = new GradientColors(); + mBehindColors = new GradientColors(); } /** @@ -828,7 +830,7 @@ private void applyState() { mNotificationsAlpha = behindAlpha; mNotificationsTint = behindTint; mBehindAlpha = 1; - mBehindTint = Color.BLACK; + mBehindTint = Color.TRANSPARENT; } else { mBehindAlpha = behindAlpha; if (mState == ScrimState.SHADE_LOCKED) { @@ -1025,7 +1027,7 @@ protected void updateScrims() { && !mBlankScreen; mScrimInFront.setColors(mColors, animateScrimInFront); - mScrimBehind.setColors(mColors, animateBehindScrim); + mScrimBehind.setColors(mBehindColors, animateBehindScrim); mNotificationsScrim.setColors(mColors, animateScrimNotifications); dispatchBackScrimState(mScrimBehind.getViewAlpha()); @@ -1392,11 +1394,19 @@ private void updateThemeColors() { if (mScrimBehind == null) return; int background = Utils.getColorAttr(mScrimBehind.getContext(), android.R.attr.colorBackgroundFloating).getDefaultColor(); + int surfaceBackground = Utils.getColorAttr(mScrimBehind.getContext(), + com.android.internal.R.attr.colorSurfaceHeader).getDefaultColor(); int accent = Utils.getColorAccent(mScrimBehind.getContext()).getDefaultColor(); mColors.setMainColor(background); mColors.setSecondaryColor(accent); mColors.setSupportsDarkText( ColorUtils.calculateContrast(mColors.getMainColor(), Color.WHITE) > 4.5); + + mBehindColors.setMainColor(surfaceBackground); + mBehindColors.setSecondaryColor(accent); + mBehindColors.setSupportsDarkText( + ColorUtils.calculateContrast(mBehindColors.getMainColor(), Color.WHITE) > 4.5); + mNeedsDrawableColorUpdate = true; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java index 4a5f712d587c..7b291fd3d81c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java @@ -17,7 +17,6 @@ package com.android.systemui.statusbar.phone; import android.graphics.Color; -import android.os.Trace; import com.android.systemui.dock.DockManager; import com.android.systemui.scrim.ScrimView; @@ -82,7 +81,7 @@ public void prepare(ScrimState previousState) { mBehindAlpha = mClipQsScrim ? 1 : mScrimBehindAlphaKeyguard; mNotifAlpha = mClipQsScrim ? mScrimBehindAlphaKeyguard : 0; if (mClipQsScrim) { - updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK); + updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT); } } }, @@ -119,7 +118,7 @@ public void prepare(ScrimState previousState) { @Override public void prepare(ScrimState previousState) { mBehindAlpha = mClipQsScrim ? 1 : mDefaultScrimAlpha; - mBehindTint = mClipQsScrim ? Color.BLACK : Color.TRANSPARENT; + mBehindTint = Color.TRANSPARENT; mNotifAlpha = mClipQsScrim ? mDefaultScrimAlpha : 0; mNotifTint = Color.TRANSPARENT; mFrontAlpha = 0f; @@ -143,17 +142,17 @@ public void prepare(ScrimState previousState) { mBehindAlpha = mClipQsScrim ? 1 : mDefaultScrimAlpha; mNotifAlpha = 1f; mFrontAlpha = 0f; - mBehindTint = Color.BLACK; + mBehindTint = Color.TRANSPARENT; if (mClipQsScrim) { - updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK); + updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT); } } // to make sure correct color is returned before "prepare" is called @Override public int getBehindTint() { - return Color.BLACK; + return Color.TRANSPARENT; } }, @@ -249,22 +248,22 @@ public void prepare(ScrimState previousState) { mAnimateChange = !mLaunchingAffordanceWithPreview && !fromAod; mFrontTint = Color.TRANSPARENT; - mBehindTint = Color.BLACK; + mBehindTint = Color.TRANSPARENT; mBlankScreen = false; if (previousState == ScrimState.AOD) { // Set all scrims black, before they fade transparent. updateScrimColor(mScrimInFront, 1f /* alpha */, Color.BLACK /* tint */); - updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK /* tint */); + updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT /* tint */); // Scrims should still be black at the end of the transition. mFrontTint = Color.BLACK; - mBehindTint = Color.BLACK; + mBehindTint = Color.TRANSPARENT; mBlankScreen = true; } if (mClipQsScrim) { - updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK); + updateScrimColor(mScrimBehind, 1f /* alpha */, Color.TRANSPARENT); } } }, @@ -378,14 +377,6 @@ public void updateScrimColor(ScrimView scrim, float alpha, int tint) { tint = scrim == mScrimInFront ? ScrimController.DEBUG_FRONT_TINT : ScrimController.DEBUG_BEHIND_TINT; } - Trace.traceCounter(Trace.TRACE_TAG_APP, - scrim == mScrimInFront ? "front_scrim_alpha" : "back_scrim_alpha", - (int) (alpha * 255)); - - Trace.traceCounter(Trace.TRACE_TAG_APP, - scrim == mScrimInFront ? "front_scrim_tint" : "back_scrim_tint", - Color.alpha(tint)); - scrim.setTint(tint); scrim.setViewAlpha(alpha); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java index 31d9266057da..9327e1ef4688 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java @@ -16,6 +16,7 @@ import static com.android.systemui.statusbar.phone.StatusBarIconHolder.TYPE_ICON; import static com.android.systemui.statusbar.phone.StatusBarIconHolder.TYPE_MOBILE; +import static com.android.systemui.statusbar.phone.StatusBarIconHolder.TYPE_NETWORK_TRAFFIC; import static com.android.systemui.statusbar.phone.StatusBarIconHolder.TYPE_WIFI; import android.annotation.Nullable; @@ -48,6 +49,7 @@ import com.android.systemui.statusbar.phone.StatusBarSignalPolicy.CallIndicatorIconState; import com.android.systemui.statusbar.phone.StatusBarSignalPolicy.MobileIconState; import com.android.systemui.statusbar.phone.StatusBarSignalPolicy.WifiIconState; +import com.android.systemui.statusbar.policy.NetworkTrafficSB; import com.android.systemui.util.Assert; import java.util.ArrayList; @@ -167,8 +169,10 @@ protected void onRemoveIcon(int viewIndex) { @Override public void onSetIcon(int viewIndex, StatusBarIcon icon) { - super.onSetIcon(viewIndex, icon); - mDarkIconDispatcher.applyDark((DarkReceiver) mGroup.getChildAt(viewIndex)); + View view = mGroup.getChildAt(viewIndex); + if (view instanceof StatusBarIconView) { + ((StatusBarIconView) view).set(icon); + } } @Override @@ -313,6 +317,9 @@ protected StatusIconDisplayable addHolder(int index, String slot, boolean blocke case TYPE_MOBILE: return addMobileIcon(index, slot, holder.getMobileState()); + + case TYPE_NETWORK_TRAFFIC: + return addNetworkTraffic(index, slot); } return null; @@ -339,6 +346,12 @@ protected StatusBarWifiView addSignalIcon(int index, String slot, WifiIconState return view; } + protected NetworkTrafficSB addNetworkTraffic(int index, String slot) { + NetworkTrafficSB view = onCreateNetworkTraffic(slot); + mGroup.addView(view, index, onCreateLayoutParams()); + return view; + } + @VisibleForTesting protected StatusBarMobileView addMobileIcon(int index, String slot, MobileIconState state) { StatusBarMobileView view = onCreateStatusBarMobileView(slot); @@ -367,6 +380,12 @@ private StatusBarMobileView onCreateStatusBarMobileView(String slot) { return view; } + private NetworkTrafficSB onCreateNetworkTraffic(String slot) { + NetworkTrafficSB view = new NetworkTrafficSB(mContext); + view.setPadding(2, 0, 2, 0); + return view; + } + protected LinearLayout.LayoutParams onCreateLayoutParams() { return new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, mIconSize); } @@ -408,19 +427,23 @@ protected void onRemoveIcon(int viewIndex) { } public void onSetIcon(int viewIndex, StatusBarIcon icon) { - StatusBarIconView view = (StatusBarIconView) mGroup.getChildAt(viewIndex); - view.set(icon); + View view = mGroup.getChildAt(viewIndex); + if (view instanceof StatusBarIconView) { + ((StatusBarIconView) view).set(icon); + } } public void onSetIconHolder(int viewIndex, StatusBarIconHolder holder) { switch (holder.getType()) { case TYPE_ICON: - onSetIcon(viewIndex, holder.getIcon()); + View view = mGroup.getChildAt(viewIndex); + if (view instanceof StatusBarIconView) { + onSetIcon(viewIndex, holder.getIcon()); + } return; case TYPE_WIFI: onSetSignalIcon(viewIndex, holder.getWifiState()); return; - case TYPE_MOBILE: onSetMobileIcon(viewIndex, holder.getMobileState()); default: diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconHolder.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconHolder.java index af342dd31a76..294f42d83fbc 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconHolder.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconHolder.java @@ -33,6 +33,7 @@ public class StatusBarIconHolder { public static final int TYPE_ICON = 0; public static final int TYPE_WIFI = 1; public static final int TYPE_MOBILE = 2; + public static final int TYPE_NETWORK_TRAFFIC = 3; private StatusBarIcon mIcon; private WifiIconState mWifiState; @@ -95,6 +96,12 @@ public static StatusBarIconHolder fromCallIndicatorState( return holder; } + public static StatusBarIconHolder fromNetworkTraffic() { + StatusBarIconHolder holder = new StatusBarIconHolder(); + holder.mType = TYPE_NETWORK_TRAFFIC; + return holder; + } + public int getType() { return mType; } @@ -134,6 +141,8 @@ public boolean isVisible() { return mWifiState.visible; case TYPE_MOBILE: return mMobileState.visible; + case TYPE_NETWORK_TRAFFIC: + return true; default: return true; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconList.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconList.java index c876c3228eb8..8675b7b46379 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconList.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconList.java @@ -27,6 +27,8 @@ import java.util.ArrayList; import java.util.List; +import com.android.systemui.statusbar.policy.NetworkTrafficSB; + public class StatusBarIconList { private ArrayList mSlots = new ArrayList<>(); @@ -35,6 +37,9 @@ public StatusBarIconList(String[] slots) { for (int i=0; i < N; i++) { mSlots.add(new Slot(slots[i], null)); } + + // Network traffic slot + mSlots.add(0, new Slot(NetworkTrafficSB.SLOT, StatusBarIconHolder.fromNetworkTraffic())); } public int getSlotIndex(String slot) { @@ -45,9 +50,9 @@ public int getSlotIndex(String slot) { return i; } } - // Auto insert new items at the beginning. - mSlots.add(0, new Slot(slot, null)); - return 0; + // Auto insert new items behind network traffic + mSlots.add(1, new Slot(slot, null)); + return 1; } protected ArrayList getSlots() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java index cf776e3b60d1..f9c3d150bad4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java @@ -73,6 +73,7 @@ import com.android.systemui.statusbar.notification.row.ExpandableNotificationRowDragController; import com.android.systemui.statusbar.notification.row.OnUserInteractionCallback; import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent; +import com.android.systemui.statusbar.policy.GameSpaceManager; import com.android.systemui.statusbar.policy.HeadsUpUtil; import com.android.systemui.statusbar.policy.KeyguardStateController; import com.android.systemui.wmshell.BubblesManager; @@ -580,6 +581,11 @@ private void removeHunAfterClick(ExpandableNotificationRow row) { @VisibleForTesting void handleFullScreenIntent(NotificationEntry entry) { + GameSpaceManager gameSpace = mCentralSurfaces.getGameSpaceManager(); + if (gameSpace != null && gameSpace.shouldSuppressFullScreenIntent()) { + return; + } + if (mNotificationInterruptStateProvider.shouldLaunchFullScreenIntentWhenAdded(entry)) { if (shouldSuppressFullScreenIntent(entry)) { mLogger.logFullScreenIntentSuppressedByDnD(entry); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java index aa061d74f6c6..32ee482af9ac 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java @@ -518,7 +518,7 @@ public boolean suppressAwakeHeadsUp(NotificationEntry entry) { @Override public boolean suppressAwakeInterruptions(NotificationEntry entry) { - return isDeviceInVrMode(); + return isDeviceInVrMode() || entry.getSbn().getIsContentSecure(); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarSignalPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarSignalPolicy.java index ee242a4b1b75..44b773ffd2b4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarSignalPolicy.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarSignalPolicy.java @@ -73,6 +73,7 @@ public class StatusBarSignalPolicy implements SignalCallback, private boolean mHideWifi; private boolean mHideEthernet; private boolean mActivityEnabled; + private boolean mHideVpn; // Track as little state as possible, and only for padding purposes private boolean mIsAirplaneMode = false; @@ -131,12 +132,16 @@ public void destroy() { } private void updateVpn() { - boolean vpnVisible = mSecurityController.isVpnEnabled(); + boolean vpnVisible = mSecurityController.isVpnEnabled() && !mHideVpn; int vpnIconId = currentVpnIconId(mSecurityController.isVpnBranded()); - mIconController.setIcon(mSlotVpn, vpnIconId, + if (vpnVisible && vpnIconId > 0) { + mIconController.setIcon(mSlotVpn, vpnIconId, mContext.getResources().getString(R.string.accessibility_vpn_on)); - mIconController.setIconVisibility(mSlotVpn, vpnVisible); + mIconController.setIconVisibility(mSlotVpn, true); + } else { + mIconController.setIconVisibility(mSlotVpn, false); + } } private int currentVpnIconId(boolean isBranded) { @@ -161,13 +166,16 @@ public void onTuningChanged(String key, String newValue) { boolean hideMobile = hideList.contains(mSlotMobile); boolean hideWifi = hideList.contains(mSlotWifi); boolean hideEthernet = hideList.contains(mSlotEthernet); + boolean hideVpn = hideList.contains(mSlotVpn); if (hideAirplane != mHideAirplane || hideMobile != mHideMobile - || hideEthernet != mHideEthernet || hideWifi != mHideWifi) { + || hideEthernet != mHideEthernet || hideWifi != mHideWifi + || hideVpn != mHideVpn) { mHideAirplane = hideAirplane; mHideMobile = hideMobile; mHideEthernet = hideEthernet; mHideWifi = hideWifi; + mHideVpn = hideVpn; // Re-register to get new callbacks. mNetworkController.removeCallback(this); mNetworkController.addCallback(this); @@ -275,6 +283,7 @@ public void setMobileDataIndicators(@NonNull MobileDataIndicators indicators) { state.roaming = indicators.roaming; state.activityIn = indicators.activityIn && mActivityEnabled; state.activityOut = indicators.activityOut && mActivityEnabled; + state.volteId = indicators.volteId; if (DEBUG) { Log.d(TAG, "MobileIconStates: " @@ -608,6 +617,7 @@ public static class MobileIconState extends SignalIconState { public boolean roaming; public boolean needsLeadingPadding; public CharSequence typeContentDescription; + public int volteId; private MobileIconState(int subId) { super(); @@ -629,6 +639,7 @@ public boolean equals(Object o) { && showTriangle == that.showTriangle && roaming == that.roaming && needsLeadingPadding == that.needsLeadingPadding + && volteId == that.volteId && Objects.equals(typeContentDescription, that.typeContentDescription); } @@ -655,6 +666,7 @@ public void copyTo(MobileIconState other) { other.roaming = roaming; other.needsLeadingPadding = needsLeadingPadding; other.typeContentDescription = typeContentDescription; + other.volteId = volteId; } private static List copyStates(List inStates) { @@ -671,7 +683,7 @@ private static List copyStates(List inStates) @Override public String toString() { return "MobileIconState(subId=" + subId + ", strengthId=" + strengthId + ", showTriangle=" + showTriangle + ", roaming=" + roaming - + ", typeId=" + typeId + ", visible=" + visible + ")"; + + ", typeId=" + typeId + ", visible=" + visible + ", volteId=" + volteId + ")"; } } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java index 597c949168d4..ac47f67b42b7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java @@ -29,6 +29,7 @@ import android.annotation.SuppressLint; import android.app.Fragment; import android.database.ContentObserver; +import android.content.Context; import android.os.Bundle; import android.os.Parcelable; import android.os.UserHandle; @@ -43,8 +44,10 @@ import androidx.annotation.VisibleForTesting; +import com.android.systemui.Dependency; import com.android.systemui.R; import com.android.systemui.animation.Interpolators; +import com.android.systemui.battery.BatteryMeterView; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.flags.FeatureFlags; import com.android.systemui.plugins.statusbar.StatusBarStateController; @@ -58,6 +61,7 @@ import com.android.systemui.statusbar.connectivity.SignalCallback; import com.android.systemui.statusbar.events.SystemStatusAnimationCallback; import com.android.systemui.statusbar.events.SystemStatusAnimationScheduler; +import com.android.systemui.statusbar.phone.ClockController; import com.android.systemui.statusbar.phone.NotificationIconAreaController; import com.android.systemui.statusbar.phone.NotificationPanelViewController; import com.android.systemui.statusbar.phone.PhoneStatusBarView; @@ -65,6 +69,7 @@ import com.android.systemui.statusbar.phone.StatusBarIconController; import com.android.systemui.statusbar.phone.StatusBarIconController.DarkIconManager; import com.android.systemui.statusbar.phone.StatusBarLocationPublisher; +import com.android.systemui.statusbar.phone.StatusIconContainer; import com.android.systemui.statusbar.phone.fragment.dagger.StatusBarFragmentComponent; import com.android.systemui.statusbar.phone.ongoingcall.OngoingCallController; import com.android.systemui.statusbar.phone.ongoingcall.OngoingCallListener; @@ -75,6 +80,9 @@ import com.android.systemui.util.CarrierConfigTracker.CarrierConfigChangedListener; import com.android.systemui.util.CarrierConfigTracker.DefaultDataSubscriptionChangedListener; import com.android.systemui.util.settings.SecureSettings; +import com.android.systemui.tuner.TunerService; + +import org.jetbrains.annotations.NotNull; import java.util.ArrayList; import java.util.Arrays; @@ -89,7 +97,7 @@ @SuppressLint("ValidFragment") public class CollapsedStatusBarFragment extends Fragment implements CommandQueue.Callbacks, StatusBarStateController.StateListener, - SystemStatusAnimationCallback { + SystemStatusAnimationCallback, TunerService.Tunable { public static final String TAG = "CollapsedStatusBarFragment"; private static final String EXTRA_PANEL_STATE = "panel_state"; @@ -103,7 +111,8 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue private final NotificationPanelViewController mNotificationPanelViewController; private final NetworkController mNetworkController; private LinearLayout mSystemIconArea; - private View mClockView; + private LinearLayout mCustomIconArea; + private LinearLayout mCenterClockLayout; private View mOngoingCallChip; private View mNotificationIconAreaInner; private int mDisabled1; @@ -124,6 +133,11 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue private final StatusBarHideIconsForBouncerManager mStatusBarHideIconsForBouncerManager; private final SecureSettings mSecureSettings; private final Executor mMainExecutor; + private ClockController mClockController; + private boolean mIsClockBlacklisted; + private BatteryMeterView mBatteryMeterView; + private StatusIconContainer mStatusIcons; + private int mSignalClusterEndPadding = 0; private List mBlockedIcons = new ArrayList<>(); @@ -141,6 +155,17 @@ public void onOngoingCallStateChanged(boolean animate) { } }; private OperatorNameViewController mOperatorNameViewController; + + private BatteryMeterView.BatteryMeterViewCallbacks mBatteryMeterViewCallback = + new BatteryMeterView.BatteryMeterViewCallbacks() { + @Override + public void onHiddenBattery(boolean hidden) { + mStatusIcons.setPadding( + mStatusIcons.getPaddingLeft(), mStatusIcons.getPaddingTop(), + (hidden ? 0 : mSignalClusterEndPadding), mStatusIcons.getPaddingBottom()); + } + }; + private StatusBarSystemEventAnimator mSystemEventAnimator; private final CarrierConfigChangedListener mCarrierConfigCallback = @@ -233,13 +258,25 @@ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { updateBlockedIcons(); mStatusBarIconController.addIconGroup(mDarkIconManager); mSystemIconArea = mStatusBar.findViewById(R.id.system_icon_area); - mClockView = mStatusBar.findViewById(R.id.clock); + mCustomIconArea = mStatusBar.findViewById(R.id.left_icon_area); + mCenterClockLayout = mStatusBar.findViewById(R.id.centered_area); + mClockController = new ClockController(getContext(), mStatusBar); + mSignalClusterEndPadding = getResources().getDimensionPixelSize(R.dimen.signal_cluster_battery_padding); + mStatusIcons = mStatusBar.findViewById(R.id.statusIcons); + int batteryStyle = Settings.System.getInt(getContext().getContentResolver(), + Settings.System.STATUS_BAR_BATTERY_STYLE, 0); + mStatusIcons.setPadding(mStatusIcons.getPaddingLeft(), mStatusIcons.getPaddingTop(), + (batteryStyle == 5/*hidden*/ ? 0 : mSignalClusterEndPadding), mStatusIcons.getPaddingBottom()); + mBatteryMeterView = mStatusBar.findViewById(R.id.battery); + mBatteryMeterView.addCallback(mBatteryMeterViewCallback); mOngoingCallChip = mStatusBar.findViewById(R.id.ongoing_call_chip); showSystemIconArea(false); showClock(false); initEmergencyCryptkeeperText(); initOperatorName(); initNotificationIconArea(); + Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_HIDE_LIST); + mSystemEventAnimator = new StatusBarSystemEventAnimator(mSystemIconArea, getResources()); mCarrierConfigTracker.addCallback(mCarrierConfigCallback); @@ -257,7 +294,7 @@ void updateBlockedIcons() { boolean showVibrateIcon = mSecureSettings.getIntForUser( Settings.Secure.STATUS_BAR_SHOW_VIBRATE_ICON, - 0, + 1, UserHandle.USER_CURRENT) == 0; // Filter out vibrate icon from the blocklist if the setting is on @@ -319,10 +356,26 @@ public void onDestroyView() { if (mNetworkController.hasEmergencyCryptKeeperText()) { mNetworkController.removeCallback(mSignalCallback); } + if (mBatteryMeterView != null) { + mBatteryMeterView.removeCallback(mBatteryMeterViewCallback); + } mCarrierConfigTracker.removeCallback(mCarrierConfigCallback); mCarrierConfigTracker.removeDataSubscriptionChangedListener(mDefaultDataListener); } + @Override + public void onTuningChanged(String key, String newValue) { + boolean wasClockBlacklisted = mIsClockBlacklisted; + Context context = getContext(); + if (context == null) + return; + mIsClockBlacklisted = StatusBarIconController.getIconHideList( + context, newValue).contains("clock"); + if (wasClockBlacklisted && !mIsClockBlacklisted) { + showClock(false); + } + } + /** Initializes views related to the notification icon area. */ public void initNotificationIconArea() { ViewGroup notificationIconArea = mStatusBar.findViewById(R.id.notification_icon_area); @@ -387,8 +440,9 @@ public void disable(int displayId, int state1, int state2, boolean animate) { // The clock may have already been hidden, but we might want to shift its // visibility to GONE from INVISIBLE or vice versa - if ((diff1 & DISABLE_CLOCK) != 0 || mClockView.getVisibility() != clockHiddenMode()) { - if ((state1 & DISABLE_CLOCK) != 0) { + if ((diff1 & DISABLE_CLOCK) != 0 || + mClockController.getClock().getVisibility() != clockHiddenMode()) { + if ((state1 & DISABLE_CLOCK) != 0 || mIsClockBlacklisted) { hideClock(animate); } else { showClock(animate); @@ -400,7 +454,11 @@ protected int adjustDisableFlags(int state) { boolean headsUpVisible = mStatusBarFragmentComponent.getHeadsUpAppearanceController().shouldBeVisible(); if (headsUpVisible) { - state |= DISABLE_CLOCK; + View clockView = mClockController.getClock(); + boolean isRightClock = clockView.getId() == R.id.clock_right; + if (!isRightClock) { + state |= DISABLE_CLOCK; + } } if (!mKeyguardStateController.isLaunchTransitionFadingAway() @@ -487,11 +545,11 @@ private void showSystemIconArea(boolean animate) { } private void hideClock(boolean animate) { - animateHiddenState(mClockView, clockHiddenMode(), animate); + animateHiddenState(mClockController.getClock(), clockHiddenMode(), animate); } private void showClock(boolean animate) { - animateShow(mClockView, animate); + animateShow(mClockController.getClock(), animate); } /** Hides the ongoing call chip. */ @@ -509,19 +567,19 @@ public void showOngoingCallChip(boolean animate) { * don't set the clock GONE otherwise it'll mess up the animation. */ private int clockHiddenMode() { - if (!mPanelExpansionStateManager.isClosed() && !mKeyguardStateController.isShowing() - && !mStatusBarStateController.isDozing()) { - return View.INVISIBLE; - } - return View.GONE; + return View.INVISIBLE; } public void hideNotificationIconArea(boolean animate) { animateHide(mNotificationIconAreaInner, animate); + animateHide(mCustomIconArea, animate); + animateHide(mCenterClockLayout, animate); } public void showNotificationIconArea(boolean animate) { animateShow(mNotificationIconAreaInner, animate); + animateShow(mCustomIconArea, animate); + animateShow(mCenterClockLayout, animate); } public void hideOperatorName(boolean animate) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothController.java index 0c5b8515071d..c6a35c440b58 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothController.java @@ -44,6 +44,8 @@ public interface BluetoothController extends CallbackController, Dumpa int getBondState(CachedBluetoothDevice device); List getConnectedDevices(); + int getBatteryLevel(); + public interface Callback { void onBluetoothStateChange(boolean enabled); void onBluetoothDevicesChanged(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java index e7fa6d239012..0c0d3f367d7d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java @@ -73,6 +73,7 @@ public class BluetoothControllerImpl implements BluetoothController, BluetoothCa private int mConnectionState = BluetoothAdapter.STATE_DISCONNECTED; private boolean mAudioProfileOnly; private boolean mIsActive; + private int mBatteryLevel; private final H mHandler; private int mState; @@ -118,6 +119,7 @@ public void dump(PrintWriter pw, String[] args) { pw.print(" mEnabled="); pw.println(mEnabled); pw.print(" mConnectionState="); pw.println(stateToString(mConnectionState)); pw.print(" mAudioProfileOnly="); pw.println(mAudioProfileOnly); + pw.print(" mBatteryLevel="); pw.println(mBatteryLevel); pw.print(" mIsActive="); pw.println(mIsActive); pw.print(" mConnectedDevices="); pw.println(getConnectedDevices()); pw.print(" mCallbacks.size="); pw.println(mHandler.mCallbacks.size()); @@ -276,6 +278,7 @@ private void updateConnected() { mHandler.sendEmptyMessage(H.MSG_STATE_CHANGED); } updateAudioProfile(); + updateBattery(); } private void updateActive() { @@ -319,6 +322,22 @@ private void updateAudioProfile() { } + @Override + public int getBatteryLevel() { + if (!mConnectedDevices.isEmpty()) { + return mConnectedDevices.get(0).getBatteryLevel(); + } + return -1; + } + + private void updateBattery() { + int batteryLevel = getBatteryLevel(); + if (batteryLevel != mBatteryLevel) { + mBatteryLevel = batteryLevel; + mHandler.sendEmptyMessage(H.MSG_STATE_CHANGED); + } + } + @Override public void onBluetoothStateChanged(int bluetoothState) { if (DEBUG) Log.d(TAG, "BluetoothStateChanged=" + stateToString(bluetoothState)); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessMirrorController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessMirrorController.java index 5bd20ff2d090..b8887cd51fd6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessMirrorController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessMirrorController.java @@ -19,18 +19,23 @@ import android.annotation.NonNull; import android.content.Context; import android.content.res.Resources; +import android.os.UserHandle; +import android.provider.Settings; import android.util.ArraySet; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; +import android.widget.ImageView; +import com.android.systemui.Dependency; import com.android.systemui.R; import com.android.systemui.settings.brightness.BrightnessSliderController; import com.android.systemui.settings.brightness.ToggleSlider; import com.android.systemui.statusbar.NotificationShadeDepthController; import com.android.systemui.statusbar.phone.NotificationPanelViewController; import com.android.systemui.statusbar.phone.NotificationShadeWindowView; +import com.android.systemui.tuner.TunerService; import java.util.Objects; import java.util.function.Consumer; @@ -41,6 +46,9 @@ public class BrightnessMirrorController implements CallbackController { + private static final String QS_SHOW_AUTO_BRIGHTNESS = + Settings.Secure.QS_SHOW_AUTO_BRIGHTNESS; + private final NotificationShadeWindowView mStatusBarWindow; private final Consumer mVisibilityCallback; private final NotificationPanelViewController mNotificationPanel; @@ -52,6 +60,9 @@ public class BrightnessMirrorController private FrameLayout mBrightnessMirror; private int mBrightnessMirrorBackgroundPadding; private int mLastBrightnessSliderWidth = -1; + private boolean mShouldShowAutoBrightness; + private boolean mIsAutomaticBrightnessAvailable; + private ImageView mIcon; public BrightnessMirrorController(NotificationShadeWindowView statusBarWindow, NotificationPanelViewController notificationPanelViewController, @@ -68,6 +79,17 @@ public BrightnessMirrorController(NotificationShadeWindowView statusBarWindow, mBrightnessMirror.setVisibility(View.INVISIBLE); }); mVisibilityCallback = visibilityCallback; + + TunerService.Tunable tunable = (key, newValue) -> { + if (QS_SHOW_AUTO_BRIGHTNESS.equals(key)) { + mShouldShowAutoBrightness = TunerService.parseIntegerSwitch(newValue, true); + updateIcon(); + } + }; + Dependency.get(TunerService.class).addTunable(tunable, QS_SHOW_AUTO_BRIGHTNESS); + + mIsAutomaticBrightnessAvailable = mBrightnessMirror.getContext().getResources().getBoolean( + com.android.internal.R.bool.config_automatic_brightness_available); } public void showMirror() { @@ -75,6 +97,7 @@ public void showMirror() { mVisibilityCallback.accept(true); mNotificationPanel.setPanelAlpha(0, true /* animate */); mDepthController.setBrightnessMirrorVisible(true); + updateIcon(); } public void hideMirror() { @@ -143,6 +166,7 @@ private BrightnessSliderController setMirrorLayout() { mBrightnessMirror.addView(controller.getRootView(), ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); + mIcon = mBrightnessMirror.findViewById(R.id.brightness_icon); return controller; } @@ -178,4 +202,21 @@ public void onUiModeChanged() { public interface BrightnessMirrorListener { void onBrightnessMirrorReinflated(View brightnessMirror); } + + private void updateIcon() { + if (mIsAutomaticBrightnessAvailable && mShouldShowAutoBrightness) { + int automatic = Settings.System.getIntForUser(mBrightnessMirror.getContext() + .getContentResolver(), + Settings.System.SCREEN_BRIGHTNESS_MODE, + Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL, + UserHandle.USER_CURRENT); + boolean isAutomatic = automatic != Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL; + mIcon.setImageResource(isAutomatic + ? com.android.systemui.R.drawable.ic_qs_brightness_auto_on + : com.android.systemui.R.drawable.ic_qs_brightness_auto_off); + mIcon.setVisibility(View.VISIBLE); + } else { + mIcon.setVisibility(View.GONE); + } + } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java index 7290a1a82070..a07d952ac018 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java @@ -195,7 +195,7 @@ public List getCastDevices() { @Override public void startCasting(CastDevice device) { - if (device == null || device.tag == null) return; + if (device == null || !(device.tag instanceof RouteInfo)) return; final RouteInfo route = (RouteInfo) device.tag; if (DEBUG) Log.d(TAG, "startCasting: " + routeToString(route)); mMediaRouter.selectRoute(ROUTE_TYPE_REMOTE_DISPLAY, route); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java index 576962dee747..46b558aff3b5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java @@ -29,6 +29,7 @@ import android.os.Parcelable; import android.os.SystemClock; import android.os.UserHandle; +import android.provider.Settings; import android.text.Spannable; import android.text.SpannableStringBuilder; import android.text.TextUtils; @@ -36,12 +37,10 @@ import android.text.style.CharacterStyle; import android.text.style.RelativeSizeSpan; import android.util.AttributeSet; -import android.view.ContextThemeWrapper; import android.view.Display; import android.view.View; import android.widget.TextView; -import com.android.settingslib.Utils; import com.android.systemui.Dependency; import com.android.systemui.FontSizeUtils; import com.android.systemui.R; @@ -51,7 +50,6 @@ import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver; import com.android.systemui.settings.CurrentUserTracker; import com.android.systemui.statusbar.CommandQueue; -import com.android.systemui.statusbar.phone.StatusBarIconController; import com.android.systemui.statusbar.policy.ConfigurationController.ConfigurationListener; import com.android.systemui.tuner.TunerService; import com.android.systemui.tuner.TunerService.Tunable; @@ -59,6 +57,7 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; +import java.util.Date; import java.util.Locale; import java.util.TimeZone; @@ -71,7 +70,6 @@ public class Clock extends TextView implements CommandQueue.Callbacks, DarkReceiver, ConfigurationListener { - public static final String CLOCK_SECONDS = "clock_seconds"; private static final String CLOCK_SUPER_PARCELABLE = "clock_super_parcelable"; private static final String CURRENT_USER_ID = "current_user_id"; private static final String VISIBLE_BY_POLICY = "visible_by_policy"; @@ -79,12 +77,25 @@ public class Clock extends TextView implements private static final String SHOW_SECONDS = "show_seconds"; private static final String VISIBILITY = "visibility"; + public static final String STATUS_BAR_CLOCK_SECONDS = + "system:" + Settings.System.STATUS_BAR_CLOCK_SECONDS; + private static final String STATUS_BAR_AM_PM = + "system:" + Settings.System.STATUS_BAR_AM_PM; + public static final String STATUS_BAR_CLOCK_DATE_DISPLAY = + "system:" + Settings.System.STATUS_BAR_CLOCK_DATE_DISPLAY; + public static final String STATUS_BAR_CLOCK_DATE_STYLE = + "system:" + Settings.System.STATUS_BAR_CLOCK_DATE_STYLE; + public static final String STATUS_BAR_CLOCK_DATE_POSITION = + "system:" + Settings.System.STATUS_BAR_CLOCK_DATE_POSITION; + public static final String STATUS_BAR_CLOCK_DATE_FORMAT = + "system:" + Settings.System.STATUS_BAR_CLOCK_DATE_FORMAT; + private final CurrentUserTracker mCurrentUserTracker; private final CommandQueue mCommandQueue; private int mCurrentUserId; private boolean mClockVisibleByPolicy = true; - private boolean mClockVisibleByUser = true; + private boolean mClockVisibleByUser = getVisibility() == View.VISIBLE; private boolean mAttached; private boolean mScreenReceiverRegistered; @@ -99,9 +110,25 @@ public class Clock extends TextView implements private static final int AM_PM_STYLE_SMALL = 1; private static final int AM_PM_STYLE_GONE = 2; - private final int mAmPmStyle; + private static final int CLOCK_DATE_DISPLAY_GONE = 0; + private static final int CLOCK_DATE_DISPLAY_SMALL = 1; + private static final int CLOCK_DATE_DISPLAY_NORMAL = 2; + + private static final int CLOCK_DATE_STYLE_REGULAR = 0; + private static final int CLOCK_DATE_STYLE_LOWERCASE = 1; + private static final int CLOCK_DATE_STYLE_UPPERCASE = 2; + + private static final int STYLE_DATE_LEFT = 0; + private static final int STYLE_DATE_RIGHT = 1; + + private int mAmPmStyle = AM_PM_STYLE_GONE; + private final boolean mShowDark; private boolean mShowSeconds; private Handler mSecondsHandler; + private int mClockDateDisplay = CLOCK_DATE_DISPLAY_GONE; + private int mClockDateStyle = CLOCK_DATE_STYLE_REGULAR; + private int mClockDatePosition; + private String mClockDateFormat = null; // Fields to cache the width so the clock remains at an approximately constant width private int mCharsAtCurrentWidth = -1; @@ -126,7 +153,8 @@ public Clock(Context context, AttributeSet attrs, int defStyle) { R.styleable.Clock, 0, 0); try { - mAmPmStyle = a.getInt(R.styleable.Clock_amPmStyle, AM_PM_STYLE_GONE); + mAmPmStyle = a.getInt(R.styleable.Clock_amPmStyle, mAmPmStyle); + mShowDark = a.getBoolean(R.styleable.Clock_showDark, true); mNonAdaptedColor = getCurrentTextColor(); } finally { a.recycle(); @@ -193,9 +221,17 @@ protected void onAttachedToWindow() { // The receiver will return immediately if the view does not have a Handler yet. mBroadcastDispatcher.registerReceiverWithHandler(mIntentReceiver, filter, Dependency.get(Dependency.TIME_TICK_HANDLER), UserHandle.ALL); - Dependency.get(TunerService.class).addTunable(this, CLOCK_SECONDS, - StatusBarIconController.ICON_HIDE_LIST); + Dependency.get(TunerService.class).addTunable(this, + STATUS_BAR_CLOCK_SECONDS, + STATUS_BAR_AM_PM, + STATUS_BAR_CLOCK_DATE_DISPLAY, + STATUS_BAR_CLOCK_DATE_STYLE, + STATUS_BAR_CLOCK_DATE_POSITION, + STATUS_BAR_CLOCK_DATE_FORMAT); mCommandQueue.addCallback(this); + if (mShowDark) { + Dependency.get(DarkIconDispatcher.class).addDarkReceiver(this); + } mCurrentUserTracker.startTracking(); mCurrentUserId = mCurrentUserTracker.getCurrentUserId(); } @@ -209,6 +245,7 @@ protected void onAttachedToWindow() { updateClock(); updateClockVisibility(); updateShowSeconds(); + updateClockVisibility(); } @Override @@ -227,6 +264,9 @@ protected void onDetachedFromWindow() { mAttached = false; Dependency.get(TunerService.class).removeTunable(this); mCommandQueue.removeCallback(this); + if (mShowDark) { + Dependency.get(DarkIconDispatcher.class).removeDarkReceiver(this); + } mCurrentUserTracker.stopTracking(); } } @@ -254,10 +294,14 @@ public void onReceive(Context context, Intent intent) { handler.post(() -> { if (!newLocale.equals(mLocale)) { mLocale = newLocale; - // Force refresh of dependent variables. - mContentDescriptionFormatString = ""; - mDateTimePatternGenerator = null; } + // Force refresh of dependent variables. + mContentDescriptionFormatString = ""; + mDateTimePatternGenerator = null; + updateClockVisibility(); + updateShowSeconds(); + updateClock(true); + return; }); } handler.post(() -> updateClock()); @@ -283,7 +327,7 @@ public void setClockVisibilityByPolicy(boolean visible) { updateClockVisibility(); } - private boolean shouldBeVisible() { + public boolean shouldBeVisible() { return mClockVisibleByPolicy && mClockVisibleByUser; } @@ -293,19 +337,23 @@ private void updateClockVisibility() { super.setVisibility(visibility); } - final void updateClock() { - if (mDemoMode) return; + final void updateClock(boolean forceTextUpdate) { + if (mDemoMode || mCalendar == null) return; mCalendar.setTimeInMillis(System.currentTimeMillis()); CharSequence smallTime = getSmallTime(); // Setting text actually triggers a layout pass (because the text view is set to // wrap_content width and TextView always relayouts for this). Avoid needless // relayout if the text didn't actually change. - if (!TextUtils.equals(smallTime, getText())) { + if (forceTextUpdate || !TextUtils.equals(smallTime, getText())) { setText(smallTime); } setContentDescription(mContentDescriptionFormat.format(mCalendar.getTime())); } + final void updateClock() { + updateClock(false); + } + /** * In order to avoid the clock growing and shrinking due to proportional fonts, we want to * cache the drawn width at a given number of characters (removing the cache when it changes), @@ -334,14 +382,39 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { @Override public void onTuningChanged(String key, String newValue) { - if (CLOCK_SECONDS.equals(key)) { - mShowSeconds = TunerService.parseIntegerSwitch(newValue, false); - updateShowSeconds(); - } else if (StatusBarIconController.ICON_HIDE_LIST.equals(key)) { - setClockVisibleByUser(!StatusBarIconController.getIconHideList(getContext(), newValue) - .contains("clock")); - updateClockVisibility(); + switch (key) { + case STATUS_BAR_CLOCK_SECONDS: + mShowSeconds = + TunerService.parseIntegerSwitch(newValue, false); + updateShowSeconds(); + break; + case STATUS_BAR_AM_PM: + mAmPmStyle = + TunerService.parseInteger(newValue, AM_PM_STYLE_GONE); + break; + case STATUS_BAR_CLOCK_DATE_DISPLAY: + mClockDateDisplay = + TunerService.parseInteger(newValue, CLOCK_DATE_DISPLAY_GONE); + break; + case STATUS_BAR_CLOCK_DATE_STYLE: + mClockDateStyle = + TunerService.parseInteger(newValue, CLOCK_DATE_STYLE_REGULAR); + break; + case STATUS_BAR_CLOCK_DATE_POSITION: + mClockDatePosition = + TunerService.parseInteger(newValue, STYLE_DATE_LEFT); + break; + case STATUS_BAR_CLOCK_DATE_FORMAT: + mClockDateFormat = newValue; + break; + default: + break; } + // Force refresh of dependent variables. + mContentDescriptionFormatString = ""; + mDateTimePatternGenerator = null; + updateClock(true); + updateClockVisibility(); } @Override @@ -361,13 +434,6 @@ public void onDarkChanged(ArrayList areas, float darkIntensity, int tint) setTextColor(mNonAdaptedColor); } - // Update text color based when shade scrim changes color. - public void onColorsChanged(boolean lightTheme) { - final Context context = new ContextThemeWrapper(mContext, - lightTheme ? R.style.Theme_SystemUI_LightWallpaper : R.style.Theme_SystemUI); - setTextColor(Utils.getColorAttrDefaultColor(context, R.attr.wallpaperTextColor)); - } - @Override public void onDensityOrFontScaleChanged() { FontSizeUtils.updateFontSize(this, R.dimen.status_bar_clock_size); @@ -457,13 +523,61 @@ private final CharSequence getSmallTime() { } mClockFormat = new SimpleDateFormat(format); } - String result = mClockFormat.format(mCalendar.getTime()); + + CharSequence dateString = null; + + String result = ""; + String timeResult = mClockFormat.format(mCalendar.getTime()); + String dateResult = ""; + + if (mClockDateDisplay != CLOCK_DATE_DISPLAY_GONE) { + Date now = new Date(); + + if (mClockDateFormat == null || mClockDateFormat.isEmpty()) { + // Set dateString to short uppercase Weekday if empty + dateString = DateFormat.format("EEE", now); + } else { + dateString = DateFormat.format(mClockDateFormat, now); + } + if (mClockDateStyle == CLOCK_DATE_STYLE_LOWERCASE) { + // When Date style is small, convert date to uppercase + dateResult = dateString.toString().toLowerCase(); + } else if (mClockDateStyle == CLOCK_DATE_STYLE_UPPERCASE) { + dateResult = dateString.toString().toUpperCase(); + } else { + dateResult = dateString.toString(); + } + result = (mClockDatePosition == STYLE_DATE_LEFT) ? dateResult + " " + timeResult + : timeResult + " " + dateResult; + } else { + // No date, just show time + result = timeResult; + } + + SpannableStringBuilder formatted = new SpannableStringBuilder(result); + + if (mClockDateDisplay != CLOCK_DATE_DISPLAY_NORMAL) { + if (dateString != null) { + int dateStringLen = dateString.length(); + int timeStringOffset = (mClockDatePosition == STYLE_DATE_RIGHT) + ? timeResult.length() + 1 : 0; + if (mClockDateDisplay == CLOCK_DATE_DISPLAY_GONE) { + formatted.delete(0, dateStringLen); + } else { + if (mClockDateDisplay == CLOCK_DATE_DISPLAY_SMALL) { + CharacterStyle style = new RelativeSizeSpan(0.7f); + formatted.setSpan(style, timeStringOffset, + timeStringOffset + dateStringLen, + Spannable.SPAN_EXCLUSIVE_INCLUSIVE); + } + } + } + } if (mAmPmStyle != AM_PM_STYLE_NORMAL) { int magic1 = result.indexOf(MAGIC1); int magic2 = result.indexOf(MAGIC2); if (magic1 >= 0 && magic2 > magic1) { - SpannableStringBuilder formatted = new SpannableStringBuilder(result); if (mAmPmStyle == AM_PM_STYLE_GONE) { formatted.delete(magic1, magic2+1); } else { @@ -475,12 +589,10 @@ private final CharSequence getSmallTime() { formatted.delete(magic2, magic2 + 1); formatted.delete(magic1, magic1 + 1); } - return formatted; } } - return result; - + return formatted; } private boolean mDemoMode; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/GameSpaceManager.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/GameSpaceManager.kt new file mode 100644 index 000000000000..a518d6c4439e --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/GameSpaceManager.kt @@ -0,0 +1,152 @@ +/* + * Copyright (C) 2021 Chaldeaprjkt + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +package com.android.systemui.statusbar.policy + +import android.app.ActivityTaskManager +import android.content.BroadcastReceiver +import android.content.ComponentName +import android.content.Context +import android.content.Intent +import android.content.IntentFilter +import android.os.Handler +import android.os.Looper +import android.os.Message +import android.os.PowerManager +import android.os.RemoteException +import android.os.UserHandle +import android.provider.Settings +import com.android.systemui.dagger.SysUISingleton +import com.android.systemui.shared.system.TaskStackChangeListener +import com.android.systemui.shared.system.TaskStackChangeListeners + +import java.util.Arrays +import javax.inject.Inject + +@SysUISingleton +class GameSpaceManager @Inject constructor( + private val context: Context, + private val keyguardStateController: KeyguardStateController, +) { + private val handler by lazy { GameSpaceHandler(Looper.getMainLooper()) } + private val taskManager by lazy { ActivityTaskManager.getService() } + + private var activeGame: String? = null + private var isRegistered = false + + private val taskStackChangeListener = object : TaskStackChangeListener { + override fun onTaskStackChanged() { + handler.sendEmptyMessage(MSG_UPDATE_FOREGROUND_APP) + } + } + + private val interactivityReceiver = object : BroadcastReceiver() { + override fun onReceive(context: Context?, intent: Intent?) { + when (intent?.action) { + Intent.ACTION_SCREEN_OFF -> { + activeGame = null + handler.sendEmptyMessage(MSG_DISPATCH_FOREGROUND_APP) + } + } + } + } + + private val keyguardStateCallback = object : KeyguardStateController.Callback { + override fun onKeyguardShowingChanged() { + if (keyguardStateController.isShowing) return + handler.sendEmptyMessage(MSG_UPDATE_FOREGROUND_APP) + } + } + + private inner class GameSpaceHandler(looper: Looper?) : Handler(looper, null, true) { + override fun handleMessage(msg: Message) { + when (msg.what) { + MSG_UPDATE_FOREGROUND_APP -> checkForegroundApp() + MSG_DISPATCH_FOREGROUND_APP -> dispatchForegroundApp() + } + } + } + + private fun checkForegroundApp() { + try { + val info = taskManager.focusedRootTaskInfo + info?.topActivity ?: return + val packageName = info.topActivity?.packageName + activeGame = checkGameList(packageName) + handler.sendEmptyMessage(MSG_DISPATCH_FOREGROUND_APP) + } catch (e: RemoteException) { + } + } + + private fun dispatchForegroundApp() { + val pm = context.getSystemService(Context.POWER_SERVICE) as PowerManager + if (!pm.isInteractive && activeGame != null) return + val action = if (activeGame != null) ACTION_GAME_START else ACTION_GAME_STOP + Intent(action).apply { + setPackage(GAMESPACE_PACKAGE) + component = ComponentName.unflattenFromString(RECEIVER_CLASS) + putExtra(EXTRA_CALLER_NAME, context.packageName) + if (activeGame != null) putExtra(EXTRA_ACTIVE_GAME, activeGame) + addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING + or Intent.FLAG_RECEIVER_FOREGROUND + or Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND) + context.sendBroadcastAsUser(this, UserHandle.SYSTEM, + android.Manifest.permission.MANAGE_GAME_MODE) + } + } + + fun observe() { + val taskStackChangeListeners = TaskStackChangeListeners.getInstance(); + if (isRegistered) { + taskStackChangeListeners.unregisterTaskStackListener(taskStackChangeListener) + } + taskStackChangeListeners.registerTaskStackListener(taskStackChangeListener) + isRegistered = true; + handler.sendEmptyMessage(MSG_UPDATE_FOREGROUND_APP) + context.registerReceiver(interactivityReceiver, IntentFilter().apply { + addAction(Intent.ACTION_SCREEN_OFF) + }) + keyguardStateController.addCallback(keyguardStateCallback) + } + + fun isGameActive() = activeGame != null + + fun shouldSuppressFullScreenIntent() = + Settings.System.getInt(context.contentResolver, + Settings.System.GAMESPACE_SUPPRESS_FULLSCREEN_INTENT, 0) == 1 && isGameActive() + + private fun checkGameList(packageName: String?): String? { + packageName ?: return null + val games = Settings.System.getString(context.contentResolver, Settings.System.GAMESPACE_GAME_LIST) + if (games.isNullOrEmpty()) + return null + + return games.split(";") + .map { it.split("=").first() } + .firstOrNull { it == packageName } + } + + companion object { + private const val ACTION_GAME_START = "io.chaldeaprjkt.gamespace.action.GAME_START" + private const val ACTION_GAME_STOP = "io.chaldeaprjkt.gamespace.action.GAME_STOP" + private const val GAMESPACE_PACKAGE = "io.chaldeaprjkt.gamespace" + private const val RECEIVER_CLASS = "io.chaldeaprjkt.gamespace/.gamebar.GameBroadcastReceiver" + private const val EXTRA_CALLER_NAME = "source" + private const val EXTRA_ACTIVE_GAME = "package_name" + private const val MSG_UPDATE_FOREGROUND_APP = 0 + private const val MSG_DISPATCH_FOREGROUND_APP = 1 + } +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardStateControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardStateControllerImpl.java index 2a225b909f90..a418b088e127 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardStateControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardStateControllerImpl.java @@ -259,8 +259,7 @@ public boolean canDismissLockScreen() { @Override public boolean isKeyguardScreenRotationAllowed() { - return SystemProperties.getBoolean("lockscreen.rot_override", false) - || mContext.getResources().getBoolean(R.bool.config_enableLockScreenRotation); + return false; } @Override diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkTraffic.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkTraffic.java new file mode 100644 index 000000000000..749bb11957df --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkTraffic.java @@ -0,0 +1,367 @@ +package com.android.systemui.statusbar.policy; + +import java.text.DecimalFormat; + +import android.content.BroadcastReceiver; +import android.content.ContentResolver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.content.res.Resources; +import android.database.ContentObserver; +import android.graphics.drawable.Drawable; +import android.graphics.PorterDuff.Mode; +import android.graphics.Rect; +import android.graphics.Typeface; +import android.view.Gravity; +import android.net.ConnectivityManager; +import android.net.NetworkInfo; +import android.net.TrafficStats; +import android.os.Handler; +import android.os.UserHandle; +import android.os.Message; +import android.os.SystemClock; +import android.provider.Settings; +import android.text.Spanned; +import android.text.SpannableString; +import android.text.style.RelativeSizeSpan; +import android.text.TextUtils; +import android.util.AttributeSet; +import android.util.TypedValue; +import android.view.View; +import android.widget.TextView; + +import com.android.systemui.R; + +/* +* +* Seeing how an Integer object in java requires at least 16 Bytes, it seemed awfully wasteful +* to only use it for a single boolean. 32-bits is plenty of room for what we need it to do. +* +*/ +public class NetworkTraffic extends TextView { + + private static final int INTERVAL = 1500; //ms + private static final int KB = 1024; + private static final int MB = KB * KB; + private static final int GB = MB * KB; + private static final String symbol = "/S"; + + private final int mWidth; + + protected boolean mIsEnabled; + private boolean mAttached; + private long totalRxBytes; + private long totalTxBytes; + private long lastUpdateTime; + private int mAutoHideThreshold; + protected int mTintColor; + + private boolean mScreenOn = true; + protected boolean mVisible = true; + private ConnectivityManager mConnectivityManager; + + private Handler mTrafficHandler = new Handler() { + @Override + public void handleMessage(Message msg) { + long timeDelta = SystemClock.elapsedRealtime() - lastUpdateTime; + + if (timeDelta < INTERVAL * .95) { + if (msg.what != 1) { + // we just updated the view, nothing further to do + return; + } + if (timeDelta < 1) { + // Can't div by 0 so make sure the value displayed is minimal + timeDelta = Long.MAX_VALUE; + } + } + lastUpdateTime = SystemClock.elapsedRealtime(); + + // Calculate the data rate from the change in total bytes and time + long newTotalRxBytes = TrafficStats.getTotalRxBytes(); + long newTotalTxBytes = TrafficStats.getTotalTxBytes(); + long rxData = newTotalRxBytes - totalRxBytes; + long txData = newTotalTxBytes - totalTxBytes; + + if (shouldHide(rxData, txData, timeDelta)) { + setText(""); + setVisibility(View.INVISIBLE); + mVisible = false; + } else if (shouldShowUpload(rxData, txData, timeDelta)) { + // Show information for uplink if it's called for + CharSequence output = formatOutput(timeDelta, txData, symbol); + + // Update view if there's anything new to show + if (output != getText()) { + setText(output); + } + makeVisible(); + } else { + // Add information for downlink if it's called for + CharSequence output = formatOutput(timeDelta, rxData, symbol); + + // Update view if there's anything new to show + if (output != getText()) { + setText(output); + } + makeVisible(); + } + + // Post delayed message to refresh in ~1000ms + totalRxBytes = newTotalRxBytes; + totalTxBytes = newTotalTxBytes; + clearHandlerCallbacks(); + mTrafficHandler.postDelayed(mRunnable, INTERVAL); + } + + private CharSequence formatOutput(long timeDelta, long data, String symbol) { + long speed = (long)(data / (timeDelta / 1000F)); + + return formatDecimal(speed); + } + + private CharSequence formatDecimal(long speed) { + DecimalFormat decimalFormat; + String unit; + String formatSpeed; + SpannableString spanUnitString; + SpannableString spanSpeedString; + + if (speed >= 1000 * MB) { + unit = "GB"; + decimalFormat = new DecimalFormat("0.00"); + formatSpeed = decimalFormat.format(speed / (float)GB); + } else if (speed >= 100 * MB) { + decimalFormat = new DecimalFormat("000"); + unit = "MB"; + formatSpeed = decimalFormat.format(speed / (float)MB); + } else if (speed >= 10 * MB) { + decimalFormat = new DecimalFormat("00.0"); + unit = "MB"; + formatSpeed = decimalFormat.format(speed / (float)MB); + } else if (speed >= 1000 * KB) { + decimalFormat = new DecimalFormat("0.00"); + unit = "MB"; + formatSpeed = decimalFormat.format(speed / (float)MB); + } else if (speed >= 100 * KB) { + decimalFormat = new DecimalFormat("000"); + unit = "KB"; + formatSpeed = decimalFormat.format(speed / (float)KB); + } else if (speed >= 10 * KB) { + decimalFormat = new DecimalFormat("00.0"); + unit = "KB"; + formatSpeed = decimalFormat.format(speed / (float)KB); + } else { + decimalFormat = new DecimalFormat("0.00"); + unit = "KB"; + formatSpeed = decimalFormat.format(speed / (float)KB); + } + spanSpeedString = new SpannableString(formatSpeed); + spanSpeedString.setSpan(getSpeedRelativeSizeSpan(), 0, (formatSpeed).length(), + Spanned.SPAN_INCLUSIVE_INCLUSIVE); + + spanUnitString = new SpannableString(unit + symbol); + spanUnitString.setSpan(getUnitRelativeSizeSpan(), 0, (unit + symbol).length(), + Spanned.SPAN_INCLUSIVE_INCLUSIVE); + return TextUtils.concat(spanSpeedString, "\n", spanUnitString); + } + + private boolean shouldHide(long rxData, long txData, long timeDelta) { + long speedRxKB = (long)(rxData / (timeDelta / 1000f)) / KB; + long speedTxKB = (long)(txData / (timeDelta / 1000f)) / KB; + return !getConnectAvailable() || + (speedRxKB < mAutoHideThreshold && + speedTxKB < mAutoHideThreshold); + } + + private boolean shouldShowUpload(long rxData, long txData, long timeDelta) { + long speedRxKB = (long)(rxData / (timeDelta / 1000f)) / KB; + long speedTxKB = (long)(txData / (timeDelta / 1000f)) / KB; + + return (speedTxKB > speedRxKB); + } + }; + + protected boolean restoreViewQuickly() { + return getConnectAvailable() && mAutoHideThreshold == 0; + } + + protected void makeVisible() { + setVisibility(View.VISIBLE); + mVisible = true; + } + + /* + * @hide + */ + public NetworkTraffic(Context context) { + this(context, null); + } + + /* + * @hide + */ + public NetworkTraffic(Context context, AttributeSet attrs) { + this(context, attrs, 0); + } + + /* + * @hide + */ + public NetworkTraffic(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + final Resources resources = getResources(); + mTintColor = getCurrentTextColor(); + mWidth = resources.getDimensionPixelSize(R.dimen.network_traffic_width); + setMode(); + Handler mHandler = new Handler(); + mConnectivityManager = + (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); + SettingsObserver settingsObserver = new SettingsObserver(mHandler); + settingsObserver.observe(); + update(); + } + + @Override + protected void onAttachedToWindow() { + super.onAttachedToWindow(); + if (!mAttached) { + mAttached = true; + IntentFilter filter = new IntentFilter(); + filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); + filter.addAction(Intent.ACTION_SCREEN_OFF); + filter.addAction(Intent.ACTION_SCREEN_ON); + mContext.registerReceiver(mIntentReceiver, filter, null, getHandler()); + } + update(); + } + + @Override + protected void onDetachedFromWindow() { + super.onDetachedFromWindow(); + if (mAttached) { + mContext.unregisterReceiver(mIntentReceiver); + mAttached = false; + } + } + + protected RelativeSizeSpan getSpeedRelativeSizeSpan() { + return new RelativeSizeSpan(0.78f); + } + + protected RelativeSizeSpan getUnitRelativeSizeSpan() { + return new RelativeSizeSpan(0.70f); + } + + private Runnable mRunnable = new Runnable() { + @Override + public void run() { + mTrafficHandler.sendEmptyMessage(0); + } + }; + + class SettingsObserver extends ContentObserver { + SettingsObserver(Handler handler) { + super(handler); + } + + void observe() { + ContentResolver resolver = mContext.getContentResolver(); + resolver.registerContentObserver(Settings.System + .getUriFor(Settings.System.NETWORK_TRAFFIC_STATE), false, + this, UserHandle.USER_ALL); + resolver.registerContentObserver(Settings.System + .getUriFor(Settings.System.NETWORK_TRAFFIC_AUTOHIDE_THRESHOLD), false, + this, UserHandle.USER_ALL); + } + + /* + * @hide + */ + @Override + public void onChange(boolean selfChange) { + setMode(); + update(); + } + } + + private final BroadcastReceiver mIntentReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + String action = intent.getAction(); + if (action == null) return; + if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION) && mScreenOn) { + update(); + } else if (action.equals(Intent.ACTION_SCREEN_ON)) { + mScreenOn = true; + update(); + } else if (action.equals(Intent.ACTION_SCREEN_OFF)) { + mScreenOn = false; + clearHandlerCallbacks(); + } + } + }; + + private boolean getConnectAvailable() { + NetworkInfo network = (mConnectivityManager != null) ? mConnectivityManager.getActiveNetworkInfo() : null; + return network != null; + } + + protected void update() { + if (mIsEnabled) { + if (mAttached) { + totalRxBytes = TrafficStats.getTotalRxBytes(); + totalTxBytes = TrafficStats.getTotalTxBytes(); + mTrafficHandler.sendEmptyMessage(1); + } + if (mAutoHideThreshold == 0) + makeVisible(); + return; + } + clearHandlerCallbacks(); + setVisibility(View.GONE); + mVisible = false; + } + + protected void setMode() { + ContentResolver resolver = mContext.getContentResolver(); + mIsEnabled = Settings.System.getIntForUser(resolver, + Settings.System.NETWORK_TRAFFIC_STATE, 0, + UserHandle.USER_CURRENT) == 1; + mAutoHideThreshold = Settings.System.getIntForUser(resolver, + Settings.System.NETWORK_TRAFFIC_AUTOHIDE_THRESHOLD, 1, + UserHandle.USER_CURRENT); + setGravity(Gravity.CENTER); + setMaxLines(2); + setSpacingAndFonts(); + updateTrafficDrawable(); + setWidth(mWidth); + } + + private void clearHandlerCallbacks() { + mTrafficHandler.removeCallbacks(mRunnable); + mTrafficHandler.removeMessages(0); + mTrafficHandler.removeMessages(1); + } + + protected void updateTrafficDrawable() { + setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0); + setTextColor(mTintColor); + } + + protected void setSpacingAndFonts() { + setTextAppearance(R.style.TextAppearance_QS_Status); + setLineSpacing(0.88f, 0.88f); + } + + public void onDensityOrFontScaleChanged() { + setSpacingAndFonts(); + update(); + } + + public void setTintColor(int color) { + mTintColor = color; + updateTrafficDrawable(); + } +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkTrafficSB.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkTrafficSB.java new file mode 100644 index 000000000000..2604c67e472a --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkTrafficSB.java @@ -0,0 +1,158 @@ +package com.android.systemui.statusbar.policy; + +import static com.android.systemui.statusbar.StatusBarIconView.STATE_DOT; +import static com.android.systemui.statusbar.StatusBarIconView.STATE_HIDDEN; +import static com.android.systemui.statusbar.StatusBarIconView.STATE_ICON; + +import android.content.Context; +import android.graphics.Rect; +import android.graphics.Typeface; +import android.text.style.RelativeSizeSpan; +import android.util.AttributeSet; +import android.view.View; + +import com.android.systemui.Dependency; +import com.android.systemui.R; +import com.android.systemui.plugins.DarkIconDispatcher; +import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver; +import com.android.systemui.statusbar.StatusIconDisplayable; + +import java.util.ArrayList; + +public class NetworkTrafficSB extends NetworkTraffic implements DarkReceiver, StatusIconDisplayable { + + public static final String SLOT = "networktraffic"; + private int mVisibleState = -1; + private boolean mSystemIconVisible = true; + + /* + * @hide + */ + public NetworkTrafficSB(Context context) { + this(context, null); + } + + /* + * @hide + */ + public NetworkTrafficSB(Context context, AttributeSet attrs) { + this(context, attrs, 0); + } + + /* + * @hide + */ + public NetworkTrafficSB(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + } + + @Override + protected void onAttachedToWindow() { + super.onAttachedToWindow(); + } + + @Override + protected void onDetachedFromWindow() { + super.onDetachedFromWindow(); + } + + @Override + protected void setMode() { + super.setMode(); + mIsEnabled = mIsEnabled; + } + + @Override + protected void setSpacingAndFonts() { + setTextAppearance(R.style.TextAppearance_QS_Status); + setLineSpacing(0.83f, 0.83f); + } + + @Override + protected RelativeSizeSpan getSpeedRelativeSizeSpan() { + return new RelativeSizeSpan(0.70f); + } + + @Override + protected RelativeSizeSpan getUnitRelativeSizeSpan() { + return new RelativeSizeSpan(0.60f); + } + + @Override + public void onDarkChanged(ArrayList areas, float darkIntensity, int tint) { + if (!mIsEnabled) return; + mTintColor = DarkIconDispatcher.getTint(areas, this, tint); + setTextColor(mTintColor); + updateTrafficDrawable(); + } + + @Override + public String getSlot() { + return SLOT; + } + + @Override + public boolean isIconVisible() { + return mIsEnabled; + } + + @Override + public int getVisibleState() { + return mVisibleState; + } + + @Override + public void setVisibleState(int state, boolean mIsEnabled) { + if (state == mVisibleState) { + return; + } + mVisibleState = state; + + switch (state) { + case STATE_ICON: + mSystemIconVisible = true; + break; + case STATE_DOT: + case STATE_HIDDEN: + default: + mSystemIconVisible = false; + break; + } + update(); + } + + @Override + protected void makeVisible() { + boolean show = mSystemIconVisible; + setVisibility(show ? View.VISIBLE + : View.GONE); + mVisible = show; + } + + @Override + public void setStaticDrawableColor(int color) { + mTintColor = color; + setTextColor(mTintColor); + updateTrafficDrawable(); + } + + @Override + public void setDecorColor(int color) { + setTintColor(color); + } + + private void maybeRestoreVisibility() { + if (!mVisible && mIsEnabled && mSystemIconVisible + && restoreViewQuickly()) { + setVisibility(View.VISIBLE); + mVisible = true; + // then let the traffic handler do its checks + update(); + } + } + + public void setTintColor(int color) { + mTintColor = color; + updateTrafficDrawable(); + } +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/TaskHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/TaskHelper.java new file mode 100644 index 000000000000..464259825092 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/TaskHelper.java @@ -0,0 +1,318 @@ +/* + * Copyright (C) 2020-2021 The Dirty Unicorns Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +package com.android.systemui.statusbar.policy; + +import android.annotation.Nullable; +import android.app.Activity; +import android.app.ActivityManager; +import android.app.ActivityManagerNative; +import android.app.IActivityManager; +import android.app.ActivityTaskManager; +import android.app.ActivityTaskManager.RootTaskInfo; +import android.app.IActivityTaskManager; +import android.content.BroadcastReceiver; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.content.pm.PackageManager; +import android.content.pm.ResolveInfo; +import android.os.Handler; +import android.os.Looper; +import android.os.Message; +import android.os.RemoteException; +import android.os.UserHandle; +import android.service.wallpaper.WallpaperService; +import android.text.TextUtils; +import android.widget.Toast; + +import com.android.internal.os.BackgroundThread; +import com.android.systemui.Dependency; +import com.android.systemui.R; +import com.android.systemui.shared.system.ActivityManagerWrapper; +import com.android.systemui.shared.system.PackageManagerWrapper; +import com.android.systemui.shared.system.TaskStackChangeListener; +import com.android.systemui.statusbar.CommandQueue; + +import java.util.ArrayList; +import java.util.List; + +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + +@Singleton +public class TaskHelper implements CommandQueue.Callbacks, KeyguardStateController.Callback, + ConfigurationController.ConfigurationListener { + public interface Callback { + public void onHomeVisibilityChanged(boolean isVisible); + } + + private static final String TAG = TaskHelper.class.getSimpleName(); + private static final String SYSTEMUI = "com.android.systemui"; + private static final String SETTINGS = "com.android.settings"; + + private static final String[] DEFAULT_HOME_CHANGE_ACTIONS = new String[] { + PackageManagerWrapper.ACTION_PREFERRED_ACTIVITY_CHANGED, + Intent.ACTION_BOOT_COMPLETED, + Intent.ACTION_PACKAGE_ADDED, + Intent.ACTION_PACKAGE_CHANGED, + Intent.ACTION_PACKAGE_REMOVED + }; + + @Nullable + private ComponentName mDefaultHome; + private final ComponentName mRecentsComponentName; + private int mRunningTaskId; + private ComponentName mTaskComponentName; + private Context mContext; + private final KeyguardStateController mKeyguardStateController; + private PackageManager mPm; + private boolean mKeyguardShowing; + private TaskHelperHandler mHandler; + private String mForegroundAppPackageName; + private IActivityTaskManager mActivityTaskManager; + private final Injector mInjector; + private static final int MSG_UPDATE_FOREGROUND_APP = 0; + private static final int MSG_UPDATE_CALLBACKS = 1; + private final List mCallbacks = new ArrayList<>(); + + private final BroadcastReceiver mDefaultHomeBroadcastReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + mDefaultHome = getCurrentDefaultHome(); + } + }; + + private final TaskStackChangeListener mTaskStackChangeListener = new TaskStackChangeListener() { + @Override + public void onTaskStackChanged() { + mHandler.sendEmptyMessage(MSG_UPDATE_FOREGROUND_APP); + } + }; + + private final class TaskHelperHandler extends Handler { + public TaskHelperHandler(Looper looper) { + super(looper, null, true /*async*/); + } + + @Override + public void handleMessage(Message msg) { + switch (msg.what) { + case MSG_UPDATE_FOREGROUND_APP: + updateForegroundApp(); + break; + case MSG_UPDATE_CALLBACKS: + updateCallbacks(isLauncherShowing()); + break; + } + } + } + + private void updateForegroundApp() { + // The ActivityTaskManager's lock tends to get contended, so this is done in a background + // thread + mInjector.getBackgroundThreadHandler().post(new Runnable() { + public void run() { + try { + final boolean isHomeShowingBefore = mTaskComponentName != null + ? isLauncherShowing() + : false; + // The foreground app is the top activity of the focused tasks stack. + final RootTaskInfo info = mActivityTaskManager.getFocusedRootTaskInfo(); + mTaskComponentName = info != null ? info.topActivity : null; + if (mTaskComponentName == null) { + return; + } + mForegroundAppPackageName = mTaskComponentName.getPackageName(); + mRunningTaskId = info.childTaskIds[info.childTaskIds.length - 1]; + final boolean isHomeShowingAfter = isLauncherShowing(); + if (isHomeShowingBefore != isHomeShowingAfter) { + // MUST call back into main thread + mHandler.sendEmptyMessage(MSG_UPDATE_CALLBACKS); + } + } catch (RemoteException e) { + // Nothing to do + } + } + }); + } + + public static class Injector { + public Handler getBackgroundThreadHandler() { + return BackgroundThread.getHandler(); + } + } + + @Inject + public TaskHelper(Context context) { + mContext = context; + mActivityTaskManager = ActivityTaskManager.getService(); + mInjector = new Injector(); + mHandler = new TaskHelperHandler(Looper.getMainLooper()); + IntentFilter homeFilter = new IntentFilter(); + for (String action : DEFAULT_HOME_CHANGE_ACTIONS) { + homeFilter.addAction(action); + } + mDefaultHome = getCurrentDefaultHome(); + mRecentsComponentName = ComponentName.unflattenFromString(context.getString( + com.android.internal.R.string.config_recentsComponentName)); + context.registerReceiver(mDefaultHomeBroadcastReceiver, homeFilter); + ActivityManagerWrapper.getInstance().registerTaskStackListener(mTaskStackChangeListener); + Dependency.get(CommandQueue.class).addCallback(this); + mKeyguardStateController = Dependency.get(KeyguardStateController.class); + mKeyguardStateController.addCallback(this); + mPm = context.getPackageManager(); + Dependency.get(ConfigurationController.class).addCallback(this); + updateForegroundApp(); + } + + public void addCallback(TaskHelper.Callback callback) { + mCallbacks.add(callback); + } + + public void removeCallback(TaskHelper.Callback callback) { + mCallbacks.remove(callback); + } + + private void updateCallbacks(boolean isShowing) { + mCallbacks.stream() + .forEach(o -> ((Callback) o).onHomeVisibilityChanged(isShowing)); + } + + @Nullable + private ComponentName getCurrentDefaultHome() { + List homeActivities = new ArrayList<>(); + ComponentName defaultHome = PackageManagerWrapper.getInstance() + .getHomeActivities(homeActivities); + if (defaultHome != null) { + return defaultHome; + } + + int topPriority = Integer.MIN_VALUE; + ComponentName topComponent = null; + for (ResolveInfo resolveInfo : homeActivities) { + if (resolveInfo.priority > topPriority) { + topComponent = resolveInfo.activityInfo.getComponentName(); + topPriority = resolveInfo.priority; + } else if (resolveInfo.priority == topPriority) { + topComponent = null; + } + } + return topComponent; + } + + @Override + public void killForegroundApp() { + if (isLauncherShowing() + || !(mContext.checkCallingOrSelfPermission( + android.Manifest.permission.FORCE_STOP_PACKAGES) == PackageManager.PERMISSION_GRANTED) + || isLockTaskOn() + || mKeyguardShowing + || mTaskComponentName == null + || mTaskComponentName.equals(mRecentsComponentName) + || mForegroundAppPackageName.equals(SYSTEMUI) + || isPackageLiveWalls(mForegroundAppPackageName)) { + return; + } + + boolean killed = false; + IActivityManager iam = ActivityManagerNative.getDefault(); + try { + iam.forceStopPackage(mForegroundAppPackageName, UserHandle.USER_CURRENT); // kill + // app + iam.removeTask(mRunningTaskId); // remove app from recents + killed = true; + } catch (RemoteException e) { + killed = false; + } + if (killed) { + String appLabel = getForegroundAppLabel(); + if (appLabel == null || appLabel.length() == 0) { + appLabel = mContext.getString(R.string.empty_app_killed); + } + String toasty = mContext.getString(R.string.task_helper_app_killed, appLabel); + Toast.makeText(mContext, toasty, Toast.LENGTH_SHORT).show(); + + // Refresh current app info just in case TaskStackChangeListener callbacks don't get called properly + mHandler.sendEmptyMessage(MSG_UPDATE_FOREGROUND_APP); + } + } + + @Override + public void onKeyguardShowingChanged() { + mKeyguardShowing = mKeyguardStateController.isShowing(); + mHandler.sendEmptyMessage(MSG_UPDATE_FOREGROUND_APP); + } + + @Override + public void onThemeChanged() { + // refresh callback states on theme change. Allow a slight delay + // so statusbar can reinflate and settle down + mHandler.sendEmptyMessageDelayed(MSG_UPDATE_CALLBACKS, 500); + } + + public String getForegroundApp() { + if (mForegroundAppPackageName == null) return ""; + return mForegroundAppPackageName; + } + + public String getForegroundAppLabel() { + try { + return mPm.getActivityInfo(mTaskComponentName, 0).applicationInfo + .loadLabel(mPm).toString(); + } catch (Exception e) { + return null; + } + } + + public boolean isLauncherShowing() { + // component name can be null during custom launcher installation process + return ((mTaskComponentName != null && mTaskComponentName.equals(mDefaultHome)) + // boot time check + || (mDefaultHome != null && mDefaultHome.getPackageName().equals(SETTINGS))); + } + + private boolean isPackageLiveWalls(String pkg) { + if (pkg == null) { + return false; + } + List liveWallsList = mPm.queryIntentServices( + new Intent(WallpaperService.SERVICE_INTERFACE), + PackageManager.GET_META_DATA); + if (liveWallsList == null) { + return false; + } + for (ResolveInfo info : liveWallsList) { + if (info.serviceInfo != null) { + String packageName = info.serviceInfo.packageName; + if (TextUtils.equals(pkg, packageName)) { + return true; + } + } + } + return false; + } + + private static boolean isLockTaskOn() { + try { + return ActivityManager.getService().isInLockTaskMode(); + } catch (Exception e) { + } + return false; + } +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserInfoControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserInfoControllerImpl.java old mode 100644 new mode 100755 index 29285f886f4e..82c51d45b92c --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserInfoControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserInfoControllerImpl.java @@ -123,7 +123,12 @@ public void reloadUserInfo() { mUserInfoTask.cancel(false); mUserInfoTask = null; } - queryForUserInformation(); + + try { + queryForUserInformation(); + } catch (Exception e) { + Log.e(TAG, "Couldn't query user info", e); + } } private void queryForUserInformation() { diff --git a/packages/SystemUI/src/com/android/systemui/theme/CustomThemeOverlayController.kt b/packages/SystemUI/src/com/android/systemui/theme/CustomThemeOverlayController.kt new file mode 100644 index 000000000000..02ea20331d65 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/theme/CustomThemeOverlayController.kt @@ -0,0 +1,233 @@ +/* + * Copyright (C) 2021 The Proton AOSP Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.theme + +import android.annotation.ColorInt +import android.app.WallpaperColors +import android.app.WallpaperManager +import android.content.Context +import android.content.om.FabricatedOverlay +import android.content.res.Resources +import android.os.Handler +import android.os.UserManager +import android.provider.Settings +import android.util.Log +import android.util.TypedValue +import com.android.systemui.Dependency +import com.android.systemui.broadcast.BroadcastDispatcher +import com.android.systemui.dagger.SysUISingleton +import com.android.systemui.dagger.qualifiers.Background +import com.android.systemui.dagger.qualifiers.Main +import com.android.systemui.dump.DumpManager +import com.android.systemui.flags.FeatureFlags +import com.android.systemui.keyguard.WakefulnessLifecycle +import com.android.systemui.monet.Style +import com.android.systemui.settings.UserTracker +import com.android.systemui.statusbar.policy.ConfigurationController +import com.android.systemui.statusbar.policy.DeviceProvisionedController +import com.android.systemui.theme.ThemeOverlayApplier +import com.android.systemui.theme.ThemeOverlayController +import com.android.systemui.tuner.TunerService +import com.android.systemui.tuner.TunerService.Tunable +import com.android.systemui.util.settings.SecureSettings +import com.android.systemui.util.settings.SystemSettings +import dev.kdrag0n.colorkt.Color +import dev.kdrag0n.colorkt.cam.Zcam +import dev.kdrag0n.colorkt.conversion.ConversionGraph.convert +import dev.kdrag0n.colorkt.data.Illuminants +import dev.kdrag0n.colorkt.rgb.Srgb +import dev.kdrag0n.colorkt.tristimulus.CieXyzAbs.Companion.toAbs +import dev.kdrag0n.colorkt.ucs.lab.CieLab +import dev.kdrag0n.monet.theme.DynamicColorScheme +import dev.kdrag0n.monet.theme.MaterialYouTargets +import java.util.concurrent.Executor +import javax.inject.Inject +import kotlin.math.log10 +import kotlin.math.pow + +@SysUISingleton +class CustomThemeOverlayController @Inject constructor( + private val context: Context, + broadcastDispatcher: BroadcastDispatcher, + @Background bgHandler: Handler, + @Main mainExecutor: Executor, + @Background bgExecutor: Executor, + themeOverlayApplier: ThemeOverlayApplier, + secureSettings: SecureSettings, + wallpaperManager: WallpaperManager, + userManager: UserManager, + deviceProvisionedController: DeviceProvisionedController, + userTracker: UserTracker, + dumpManager: DumpManager, + featureFlags: FeatureFlags, + @Main resources: Resources, + wakefulnessLifecycle: WakefulnessLifecycle, + configurationController: ConfigurationController +) : ThemeOverlayController( + context, + broadcastDispatcher, + bgHandler, + mainExecutor, + bgExecutor, + themeOverlayApplier, + secureSettings, + wallpaperManager, + userManager, + deviceProvisionedController, + userTracker, + dumpManager, + featureFlags, + resources, + wakefulnessLifecycle, + configurationController, +), Tunable { + private lateinit var cond: Zcam.ViewingConditions + private lateinit var targets: MaterialYouTargets + + private var colorOverride: Int = 0 + private var chromaFactor: Double = Double.MIN_VALUE + private var accurateShades: Boolean = true + private var whiteLuminance: Double = Double.MIN_VALUE + private var linearLightness: Boolean = false + private var customColor: Boolean = false + private val mTunerService: TunerService = Dependency.get(TunerService::class.java) + override fun start() { + mTunerService.addTunable(this, PREF_COLOR_OVERRIDE, PREF_WHITE_LUMINANCE, + PREF_CHROMA_FACTOR, PREF_ACCURATE_SHADES, PREF_LINEAR_LIGHTNESS, PREF_CUSTOM_COLOR) + super.start() + } + + override fun onTuningChanged(key: String?, newValue: String?) { + key?.let { + if (it.contains(PREF_PREFIX)) { + customColor = Settings.Secure.getInt(mContext.contentResolver, PREF_CUSTOM_COLOR, 0) == 1 + colorOverride = Settings.Secure.getInt(mContext.contentResolver, + PREF_COLOR_OVERRIDE, -1) + chromaFactor = (Settings.Secure.getFloat(mContext.contentResolver, + PREF_CHROMA_FACTOR, 100.0f) / 100f).toDouble() + accurateShades = Settings.Secure.getInt(mContext.contentResolver, PREF_ACCURATE_SHADES, 1) != 0 + + whiteLuminance = parseWhiteLuminanceUser( + Settings.Secure.getInt(mContext.contentResolver, + PREF_WHITE_LUMINANCE, WHITE_LUMINANCE_USER_DEFAULT) + ) + linearLightness = Settings.Secure.getInt(mContext.contentResolver, + PREF_LINEAR_LIGHTNESS, 0) != 0 + reevaluateSystemTheme(true /* forceReload */) + } + } + } + + // Seed colors + override fun getNeutralColor(colors: WallpaperColors) = colors.primaryColor.toArgb() + override fun getAccentColor(colors: WallpaperColors) = getNeutralColor(colors) + + override fun getOverlay(primaryColor: Int, type: Int, style: Style): FabricatedOverlay { + cond = Zcam.ViewingConditions( + surroundFactor = Zcam.ViewingConditions.SURROUND_AVERAGE, + // sRGB + adaptingLuminance = 0.4 * whiteLuminance, + // Gray world + backgroundLuminance = CieLab( + L = 50.0, + a = 0.0, + b = 0.0, + ).toXyz().y * whiteLuminance, + referenceWhite = Illuminants.D65.toAbs(whiteLuminance), + ) + + targets = MaterialYouTargets( + chromaFactor = chromaFactor, + useLinearLightness = linearLightness, + cond = cond, + ) + + // Generate color scheme + val colorScheme = DynamicColorScheme( + targets = targets, + seedColor = if (customColor) Srgb(colorOverride) else Srgb(primaryColor), + chromaFactor = chromaFactor, + cond = cond, + accurateShades = accurateShades, + ) + + val (groupKey, colorsList) = when (type) { + ACCENT -> "accent" to colorScheme.accentColors + NEUTRAL -> "neutral" to colorScheme.neutralColors + else -> error("Unknown type $type") + } + + return FabricatedOverlay.Builder(context.packageName, groupKey, "android").run { + colorsList.withIndex().forEach { listEntry -> + val group = "$groupKey${listEntry.index + 1}" + + listEntry.value.forEach { (shade, color) -> + val colorSrgb = color.convert() + Log.d(TAG, "Color $group $shade = ${colorSrgb.toHex()}") + setColor("system_${group}_$shade", colorSrgb) + } + } + + // Override special modulated surface colors for performance and consistency + if (type == NEUTRAL) { + // surface light = neutral1 20 (L* 98) + colorsList[0][20]?.let { setColor("surface_light", it) } + + // surface highlight dark = neutral1 650 (L* 35) + colorsList[0][650]?.let { setColor("surface_highlight_dark", it) } + + // surface_header_dark_sysui = neutral1 950 (L* 5) + colorsList[0][950]?.let { setColor("surface_header_dark_sysui", it) } + } + + build() + } + } + + companion object { + private const val TAG = "CustomThemeOverlayController" + + private const val PREF_PREFIX = "monet_engine" + private const val PREF_CUSTOM_COLOR = "${PREF_PREFIX}_custom_color" + private const val PREF_COLOR_OVERRIDE = "${PREF_PREFIX}_color_override" + private const val PREF_CHROMA_FACTOR = "${PREF_PREFIX}_chroma_factor" + private const val PREF_ACCURATE_SHADES = "${PREF_PREFIX}_accurate_shades" + private const val PREF_LINEAR_LIGHTNESS = "${PREF_PREFIX}_linear_lightness" + private const val PREF_WHITE_LUMINANCE = "${PREF_PREFIX}_white_luminance_user" + + private const val WHITE_LUMINANCE_MIN = 1.0 + private const val WHITE_LUMINANCE_MAX = 10000.0 + private const val WHITE_LUMINANCE_USER_MAX = 1000 + private const val WHITE_LUMINANCE_USER_DEFAULT = 425 // ~200.0 divisible by step (decoded = 199.526) + + private fun parseWhiteLuminanceUser(userValue: Int): Double { + val userSrc = userValue.toDouble() / WHITE_LUMINANCE_USER_MAX + val userInv = 1.0 - userSrc + return (10.0).pow(userInv * log10(WHITE_LUMINANCE_MAX)) + .coerceAtLeast(WHITE_LUMINANCE_MIN) + } + + private fun FabricatedOverlay.Builder.setColor(name: String, @ColorInt color: Int) = + setResourceValue("android:color/$name", TypedValue.TYPE_INT_COLOR_ARGB8, color) + + private fun FabricatedOverlay.Builder.setColor(name: String, color: Color): FabricatedOverlay.Builder { + val rgb = color.convert().toRgb8() + val argb = rgb or (0xff shl 24) + return setColor(name, argb) + } + } +} diff --git a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayApplier.java b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayApplier.java index ba39367e290e..bf4d9717eabf 100644 --- a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayApplier.java +++ b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayApplier.java @@ -106,6 +106,12 @@ public class ThemeOverlayApplier implements Dumpable { @VisibleForTesting static final String OVERLAY_CATEGORY_ICON_THEME_PICKER = "android.theme.customization.icon_pack.themepicker"; + @VisibleForTesting + static final String OVERLAY_CATEGORY_ICON_SIGNAL = + "android.theme.customization.signal_icon"; + @VisibleForTesting + static final String OVERLAY_CATEGORY_ICON_WIFI = + "android.theme.customization.wifi_icon"; /* * All theme customization categories used by the system, in order that they should be applied, @@ -120,7 +126,9 @@ public class ThemeOverlayApplier implements Dumpable { OVERLAY_CATEGORY_ICON_ANDROID, OVERLAY_CATEGORY_ICON_SYSUI, OVERLAY_CATEGORY_ICON_SETTINGS, - OVERLAY_CATEGORY_ICON_THEME_PICKER); + OVERLAY_CATEGORY_ICON_THEME_PICKER, + OVERLAY_CATEGORY_ICON_SIGNAL, + OVERLAY_CATEGORY_ICON_WIFI); /* Categories that need to be applied to the current user as well as the system user. */ @VisibleForTesting @@ -140,6 +148,7 @@ public class ThemeOverlayApplier implements Dumpable { private final Executor mBgExecutor; private final String mLauncherPackage; private final String mThemePickerPackage; + private boolean mIsBlackTheme; @Inject public ThemeOverlayApplier(OverlayManager overlayManager, @@ -171,6 +180,8 @@ public ThemeOverlayApplier(OverlayManager overlayManager, mCategoryToTargetPackage.put(OVERLAY_CATEGORY_ICON_SETTINGS, SETTINGS_PACKAGE); mCategoryToTargetPackage.put(OVERLAY_CATEGORY_ICON_LAUNCHER, mLauncherPackage); mCategoryToTargetPackage.put(OVERLAY_CATEGORY_ICON_THEME_PICKER, mThemePickerPackage); + mCategoryToTargetPackage.put(OVERLAY_CATEGORY_ICON_SIGNAL, SYSUI_PACKAGE); + mCategoryToTargetPackage.put(OVERLAY_CATEGORY_ICON_WIFI, SYSUI_PACKAGE); dumpManager.registerDumpable(TAG, this); } @@ -209,8 +220,12 @@ public void applyCurrentUserOverlays( HashSet identifiersPending = new HashSet<>(); if (pendingCreation != null) { for (FabricatedOverlay overlay : pendingCreation) { - identifiersPending.add(overlay.getIdentifier()); - transaction.registerFabricatedOverlay(overlay); + try { + identifiersPending.add(overlay.getIdentifier()); + transaction.registerFabricatedOverlay(overlay); + } catch (NullPointerException e) { + Log.e(TAG, "NPE for overlay.getIdentifier()", e); + } } } @@ -236,6 +251,21 @@ public void applyCurrentUserOverlays( }); } + public void setIsBlackTheme(boolean black) { + mIsBlackTheme = black; + } + + public void applyBlackTheme(boolean enable) { + mBgExecutor.execute(() -> { + try { + mOverlayManager.setEnabled("com.android.system.theme.black", + enable, UserHandle.SYSTEM); + } catch (SecurityException | IllegalStateException e) { + Log.e(TAG, "setEnabled failed", e); + } + }); + } + @VisibleForTesting protected OverlayManagerTransaction.Builder getTransactionBuilder() { return new OverlayManagerTransaction.Builder(); @@ -250,6 +280,10 @@ private void setEnabled(OverlayManagerTransaction.Builder transaction, + category + ": " + enabled); } + if (OVERLAY_CATEGORY_SYSTEM_PALETTE.equals(category)) { + enabled = enabled && !mIsBlackTheme; + } + OverlayInfo overlayInfo = mOverlayManager.getOverlayInfo(identifier, UserHandle.of(currentUser)); if (overlayInfo == null && !pendingCreation) { diff --git a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java index 094490ba7adc..6b4b4405a277 100644 --- a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java +++ b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java @@ -71,6 +71,8 @@ import com.android.systemui.monet.ColorScheme; import com.android.systemui.monet.Style; import com.android.systemui.settings.UserTracker; +import com.android.systemui.statusbar.policy.ConfigurationController; +import com.android.systemui.statusbar.policy.ConfigurationController.ConfigurationListener; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.statusbar.policy.DeviceProvisionedController.DeviceProvisionedListener; import com.android.systemui.util.settings.SecureSettings; @@ -146,6 +148,8 @@ public class ThemeOverlayController extends CoreStartable implements Dumpable { // Determines if we should ignore THEME_CUSTOMIZATION_OVERLAY_PACKAGES setting changes. private boolean mSkipSettingChange; + private final ConfigurationController mConfigurationController; + private final DeviceProvisionedListener mDeviceProvisionedListener = new DeviceProvisionedListener() { @Override @@ -350,7 +354,8 @@ public ThemeOverlayController(Context context, BroadcastDispatcher broadcastDisp SecureSettings secureSettings, WallpaperManager wallpaperManager, UserManager userManager, DeviceProvisionedController deviceProvisionedController, UserTracker userTracker, DumpManager dumpManager, FeatureFlags featureFlags, - @Main Resources resources, WakefulnessLifecycle wakefulnessLifecycle) { + @Main Resources resources, WakefulnessLifecycle wakefulnessLifecycle, + ConfigurationController configurationController) { super(context); mIsMonetEnabled = featureFlags.isEnabled(Flags.MONET); @@ -366,6 +371,7 @@ public ThemeOverlayController(Context context, BroadcastDispatcher broadcastDisp mUserTracker = userTracker; mResources = resources; mWakefulnessLifecycle = wakefulnessLifecycle; + mConfigurationController = configurationController; dumpManager.registerDumpable(TAG, this); } @@ -402,6 +408,31 @@ public void onChange(boolean selfChange, Collection collection, int flags, } }, UserHandle.USER_ALL); + mSecureSettings.registerContentObserverForUser( + Settings.Secure.getUriFor(Settings.Secure.SYSTEM_BLACK_THEME), + false, + new ContentObserver(mBgHandler) { + @Override + public void onChange(boolean selfChange, Collection collection, int flags, + int userId) { + if (DEBUG) Log.d(TAG, "Overlay changed for user: " + userId); + if (mUserTracker.getUserId() != userId) { + return; + } + if (!mDeviceProvisionedController.isUserSetup(userId)) { + Log.i(TAG, "Theme application deferred when setting changed."); + mDeferredThemeEvaluation = true; + return; + } + if (mSkipSettingChange) { + if (DEBUG) Log.d(TAG, "Skipping setting change"); + mSkipSettingChange = false; + return; + } + reevaluateSystemTheme(true /* forceReload */); + } + }, + UserHandle.USER_ALL); if (!mIsMonetEnabled) { return; @@ -456,9 +487,10 @@ public void onFinishedGoingToSleep() { } } }); + mConfigurationController.addCallback(mConfigurationListener); } - private void reevaluateSystemTheme(boolean forceReload) { + protected void reevaluateSystemTheme(boolean forceReload) { final WallpaperColors currentColors = mCurrentColors.get(mUserTracker.getUserId()); final int mainColor; if (currentColors == null) { @@ -630,16 +662,19 @@ private void updateThemeOverlays() { } } - if (colorSchemeIsApplied(managedProfiles)) { - Log.d(TAG, "Skipping overlay creation. Theme was already: " + mColorScheme); - return; - } - if (DEBUG) { Log.d(TAG, "Applying overlays: " + categoryToPackage.keySet().stream() .map(key -> key + " -> " + categoryToPackage.get(key)).collect( Collectors.joining(", "))); } + + boolean nightMode = (mContext.getResources().getConfiguration().uiMode + & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES; + boolean isBlackTheme = mSecureSettings.getInt(Settings.Secure.SYSTEM_BLACK_THEME, 0) == 1 + && nightMode; + + mThemeManager.setIsBlackTheme(isBlackTheme); + if (mNeedsOverlayCreation) { mNeedsOverlayCreation = false; mThemeManager.applyCurrentUserOverlays(categoryToPackage, new FabricatedOverlay[] { @@ -649,6 +684,8 @@ private void updateThemeOverlays() { mThemeManager.applyCurrentUserOverlays(categoryToPackage, null, currentUser, managedProfiles); } + + mThemeManager.applyBlackTheme(isBlackTheme); } private Style fetchThemeStyleFromSetting() { @@ -677,6 +714,13 @@ private Style fetchThemeStyleFromSetting() { return style; } + private final ConfigurationListener mConfigurationListener = new ConfigurationListener() { + @Override + public void onUiModeChanged() { + reevaluateSystemTheme(true /* forceReload */); + } + }; + @Override public void dump(@NonNull PrintWriter pw, @NonNull String[] args) { pw.println("mSystemColors=" + mCurrentColors); diff --git a/packages/SystemUI/src/com/android/systemui/tristate/TriStateUiController.java b/packages/SystemUI/src/com/android/systemui/tristate/TriStateUiController.java new file mode 100644 index 000000000000..203522132a3e --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/tristate/TriStateUiController.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2019 CypherOS + * Copyright 2014-2019 Paranoid Android + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.tristate; + +import com.android.systemui.plugins.Plugin; +import com.android.systemui.plugins.VolumeDialog.Callback; +import com.android.systemui.plugins.annotations.DependsOn; +import com.android.systemui.plugins.annotations.ProvidesInterface; + +@DependsOn(target = Callback.class) +@ProvidesInterface(action = "com.android.systemui.action.PLUGIN_TRI_STATE_UI", version = 1) +public interface TriStateUiController extends Plugin { + + public interface UserActivityListener { + void onTriStateUserActivity(); + } +} \ No newline at end of file diff --git a/packages/SystemUI/src/com/android/systemui/tristate/TriStateUiControllerImpl.java b/packages/SystemUI/src/com/android/systemui/tristate/TriStateUiControllerImpl.java new file mode 100644 index 000000000000..caf4920f3457 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/tristate/TriStateUiControllerImpl.java @@ -0,0 +1,538 @@ +/* + * Copyright (C) 2019 CypherOS + * Copyright (C) 2020 Paranoid Android + * Copyright (C) 2020-2021 crDroid Android Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.tristate; + +import static android.view.Surface.ROTATION_90; +import static android.view.Surface.ROTATION_180; +import static android.view.Surface.ROTATION_270; + +import android.app.Dialog; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.content.res.ColorStateList; +import android.content.res.Resources; +import android.content.res.TypedArray; +import android.graphics.drawable.ColorDrawable; +import android.hardware.display.DisplayManagerGlobal; +import android.media.AudioManager; +import android.os.Build; +import android.os.Bundle; +import android.os.Handler; +import android.os.Looper; +import android.os.Message; +import android.provider.Settings; +import android.util.DisplayUtils; +import android.util.Log; +import android.view.Display; +import android.view.DisplayInfo; +import android.view.OrientationEventListener; +import android.view.ViewGroup; +import android.view.Window; +import android.view.WindowManager.LayoutParams; +import android.widget.ImageView; +import android.widget.TextView; + +import com.android.systemui.Dependency; +import com.android.systemui.R; +import com.android.systemui.tristate.TriStateUiController; +import com.android.systemui.tristate.TriStateUiController.UserActivityListener; +import com.android.systemui.plugins.VolumeDialogController; +import com.android.systemui.plugins.VolumeDialogController.Callbacks; +import com.android.systemui.plugins.VolumeDialogController.State; +import com.android.systemui.statusbar.policy.ConfigurationController; +import com.android.systemui.statusbar.policy.ConfigurationController.ConfigurationListener; + +public class TriStateUiControllerImpl implements ConfigurationListener, TriStateUiController { + + private static String TAG = "TriStateUiControllerImpl"; + + private static final int MSG_DIALOG_SHOW = 1; + private static final int MSG_DIALOG_DISMISS = 2; + private static final int MSG_RESET_SCHEDULE = 3; + private static final int MSG_STATE_CHANGE = 4; + + private static final int POSITION_TOP = 0; + private static final int POSITION_MIDDLE = 1; + private static final int POSITION_BOTTOM = 2; + + // Slider + private static final int MODE_TOTAL_SILENCE = 600; + private static final int MODE_ALARMS_ONLY = 601; + private static final int MODE_PRIORITY_ONLY = 602; + private static final int MODE_NONE = 603; + private static final int MODE_VIBRATE = 604; + private static final int MODE_RING = 605; + // AICP additions: arbitrary value which hopefully doesn't conflict with upstream anytime soon + private static final int MODE_SILENT = 620; + private static final int MODE_FLASHLIGHT = 621; + + private static final String EXTRA_SLIDER_POSITION = "position"; + private static final String EXTRA_SLIDER_POSITION_VALUE = "position_value"; + + private static final int TRI_STATE_UI_POSITION_LEFT = 0; + private static final int TRI_STATE_UI_POSITION_RIGHT = 1; + + private static final long DIALOG_TIMEOUT = 1500; + private static final long DIALOG_DELAY = 300; + + private Context mContext; + private final VolumeDialogController mVolumeDialogController; + private final Callbacks mVolumeDialogCallback = new Callbacks() { + @Override + public void onShowRequested(int reason, boolean keyguardLocked, int lockTaskModeState) { } + + @Override + public void onDismissRequested(int reason) { } + + @Override + public void onScreenOff() { } + + @Override + public void onStateChanged(State state) { } + + @Override + public void onLayoutDirectionChanged(int layoutDirection) { } + + @Override + public void onShowVibrateHint() { } + + @Override + public void onShowSilentHint() { } + + @Override + public void onShowSafetyWarning(int flags) { } + + @Override + public void onAccessibilityModeChanged(Boolean showA11yStream) { } + + @Override + public void onCaptionComponentStateChanged( + Boolean isComponentEnabled, Boolean fromTooltip) {} + + @Override + public void onConfigurationChanged() { + updateTheme(); + updateTriStateLayout(); + } + }; + + private int mDensity; + private Dialog mDialog; + private int mDialogPosition; + private ViewGroup mDialogView; + private final H mHandler; + private UserActivityListener mListener; + OrientationEventListener mOrientationListener; + private int mOrientationType = 0; + private boolean mShowing = false; + private int mBackgroundColor = 0; + private int mThemeMode = 0; + private int mIconColor = 0; + private int mTextColor = 0; + private ImageView mTriStateIcon; + private TextView mTriStateText; + private int mTriStateMode = -1; + private int mPosition = -1; + private int mPositionValue = -1; + private Window mWindow; + private LayoutParams mWindowLayoutParams; + private int mWindowType; + private String mIntentAction; + + private final BroadcastReceiver mSliderStateReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + + String action = intent.getAction(); + if (action.equals(mIntentAction)) { + Bundle extras = intent.getExtras(); + mPosition = extras.getInt(EXTRA_SLIDER_POSITION); + mPositionValue = extras.getInt(EXTRA_SLIDER_POSITION_VALUE); + Log.d(TAG, "received slider position " + mPosition + + " with value " + mPositionValue); + mTriStateMode = mPosition; + updateSliderModeChanged(); + } + + } + }; + + private final class H extends Handler { + private TriStateUiControllerImpl mUiController; + + public H(TriStateUiControllerImpl uiController) { + super(Looper.getMainLooper()); + mUiController = uiController; + } + + public void handleMessage(Message msg) { + switch (msg.what) { + case MSG_DIALOG_SHOW: + mUiController.handleShow(); + return; + case MSG_DIALOG_DISMISS: + mUiController.handleDismiss(); + return; + case MSG_RESET_SCHEDULE: + mUiController.handleResetTimeout(); + return; + case MSG_STATE_CHANGE: + mUiController.handleStateChanged(); + return; + default: + return; + } + } + } + + public TriStateUiControllerImpl(Context context) { + mContext = context; + mHandler = new H(this); + mOrientationListener = new OrientationEventListener(mContext, 3) { + @Override + public void onOrientationChanged(int orientation) { + checkOrientationType(); + } + }; + mVolumeDialogController = (VolumeDialogController) Dependency.get(VolumeDialogController.class); + mIntentAction = context.getResources().getString(com.android.internal.R.string.config_alertSliderIntent); + boolean mIntentActionSupported = mIntentAction != null && !mIntentAction.isEmpty(); + + IntentFilter filter = new IntentFilter(); + if (mIntentActionSupported) + filter.addAction(mIntentAction); + mContext.registerReceiver(mSliderStateReceiver, filter); + } + + private void checkOrientationType() { + Display display = DisplayManagerGlobal.getInstance().getRealDisplay(0); + if (display != null) { + int rotation = display.getRotation(); + if (rotation != mOrientationType) { + mOrientationType = rotation; + updateTriStateLayout(); + } + } + } + + public void init(int windowType, UserActivityListener listener) { + mWindowType = windowType; + mDensity = mContext.getResources().getConfiguration().densityDpi; + mListener = listener; + ((ConfigurationController) Dependency.get(ConfigurationController.class)).addCallback(this); + mVolumeDialogController.addCallback(mVolumeDialogCallback, mHandler); + initDialog(); + } + + public void destroy() { + ((ConfigurationController) Dependency.get(ConfigurationController.class)).removeCallback(this); + mVolumeDialogController.removeCallback(mVolumeDialogCallback); + mContext.unregisterReceiver(mSliderStateReceiver); + } + + private void initDialog() { + mDialog = new Dialog(mContext); + mShowing = false; + mWindow = mDialog.getWindow(); + mWindow.requestFeature(Window.FEATURE_NO_TITLE); + mWindow.setBackgroundDrawable(new ColorDrawable(0)); + mWindow.clearFlags(LayoutParams.FLAG_DIM_BEHIND + | LayoutParams.FLAG_LAYOUT_INSET_DECOR); + mWindow.addFlags(LayoutParams.FLAG_NOT_FOCUSABLE + | LayoutParams.FLAG_LAYOUT_IN_SCREEN + | LayoutParams.FLAG_NOT_TOUCH_MODAL + | LayoutParams.FLAG_SHOW_WHEN_LOCKED + | LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH + | LayoutParams.FLAG_HARDWARE_ACCELERATED); + mWindow.setType(LayoutParams.TYPE_VOLUME_OVERLAY); + mWindow.setWindowAnimations(com.android.internal.R.style.Animation_Toast); + mDialog.setCanceledOnTouchOutside(false); + mWindowLayoutParams = mWindow.getAttributes(); + mWindowLayoutParams.type = mWindowType; + mWindowLayoutParams.format = -3; + mWindowLayoutParams.setTitle(TriStateUiControllerImpl.class.getSimpleName()); + mWindowLayoutParams.gravity = 53; + mWindowLayoutParams.y = mDialogPosition; + mWindow.setAttributes(mWindowLayoutParams); + mWindow.setSoftInputMode(LayoutParams.SOFT_INPUT_ADJUST_NOTHING); + mDialog.setContentView(R.layout.tri_state_dialog); + mDialogView = (ViewGroup) mDialog.findViewById(R.id.tri_state_layout); + mTriStateIcon = (ImageView) mDialog.findViewById(R.id.tri_state_icon); + mTriStateText = (TextView) mDialog.findViewById(R.id.tri_state_text); + updateTheme(); + } + + public void show() { + mHandler.obtainMessage(MSG_DIALOG_SHOW, 0, 0).sendToTarget(); + } + + private void registerOrientationListener(boolean enable) { + if (mOrientationListener.canDetectOrientation() && enable) { + Log.v(TAG, "Can detect orientation"); + mOrientationListener.enable(); + return; + } + Log.v(TAG, "Cannot detect orientation"); + mOrientationListener.disable(); + } + + private void updateTriStateLayout() { + if (mContext != null) { + DisplayInfo displayInfo = new DisplayInfo(); + mContext.getDisplay().getDisplayInfo(displayInfo); + final Display.Mode maxDisplayMode = + DisplayUtils.getMaximumResolutionDisplayMode(displayInfo.supportedModes); + final float scaleFactor = DisplayUtils.getPhysicalPixelDisplaySizeRatio( + maxDisplayMode.getPhysicalWidth(), maxDisplayMode.getPhysicalHeight(), + displayInfo.getNaturalWidth(), displayInfo.getNaturalHeight()); + + int iconId = 0; + int textId = 0; + int bg = 0; + Resources res = mContext.getResources(); + if (res != null) { + int positionY; + int positionY2 = mWindowLayoutParams.y; + int positionX = mWindowLayoutParams.x; + int gravity = mWindowLayoutParams.gravity; + switch (mTriStateMode) { + case MODE_RING: + case MODE_NONE: + iconId = R.drawable.ic_volume_ringer; + textId = R.string.volume_ringer_status_normal; + break; + case MODE_VIBRATE: + iconId = R.drawable.ic_volume_ringer_vibrate; + textId = R.string.volume_ringer_status_vibrate; + break; + case MODE_SILENT: + iconId = R.drawable.ic_volume_ringer_mute; + textId = R.string.volume_ringer_status_silent; + break; + case MODE_PRIORITY_ONLY: + iconId = R.drawable.ic_qs_dnd_on; + textId = R.string.volume_ringer_priority_only; + break; + case MODE_ALARMS_ONLY: + iconId = R.drawable.ic_qs_dnd_on; + textId = R.string.volume_ringer_alarms_only; + break; + case MODE_TOTAL_SILENCE: + iconId = R.drawable.ic_qs_dnd_on; + textId = R.string.volume_ringer_dnd; + break; + case MODE_FLASHLIGHT: + iconId = R.drawable.ic_tristate_flashlight; + textId = R.string.tristate_flashlight; + break; + } + + int triStatePos = res.getInteger(com.android.internal.R.integer.config_alertSliderLocation); + boolean isTsKeyRight = true; + if (triStatePos == TRI_STATE_UI_POSITION_LEFT) { + isTsKeyRight = false; + } else if (triStatePos == TRI_STATE_UI_POSITION_RIGHT) { + isTsKeyRight = true; + } + switch (mOrientationType) { + case ROTATION_90: + if (isTsKeyRight) { + gravity = 51; + } else { + gravity = 83; + } + positionY2 = res.getDimensionPixelSize(R.dimen.tri_state_up_dialog_position_deep_land); + if (isTsKeyRight) { + positionY2 += res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_height); + } + if (mPosition == POSITION_TOP) { + positionX = res.getDimensionPixelSize(R.dimen.tri_state_up_dialog_position_l); + } else if (mPosition == POSITION_MIDDLE) { + positionX = res.getDimensionPixelSize(R.dimen.tri_state_middle_dialog_position_l); + } else if (mPosition == POSITION_BOTTOM) { + positionX = res.getDimensionPixelSize(R.dimen.tri_state_down_dialog_position_l); + } + bg = R.drawable.dialog_tri_state_middle_bg; + break; + case ROTATION_180: + if (isTsKeyRight) { + gravity = 83; + } else { + gravity = 85; + } + positionX = res.getDimensionPixelSize(R.dimen.tri_state_up_dialog_position_deep); + positionY = res.getDimensionPixelSize(R.dimen.status_bar_height); + if (mPosition == POSITION_TOP) { + positionY += res.getDimensionPixelSize(R.dimen.tri_state_up_dialog_position); + bg = !isTsKeyRight ? R.drawable.right_dialog_tri_state_down_bg : R.drawable.left_dialog_tri_state_down_bg; + } else if (mPosition == POSITION_MIDDLE) { + positionY += res.getDimensionPixelSize(R.dimen.tri_state_middle_dialog_position); + bg = R.drawable.dialog_tri_state_middle_bg; + } else if (mPosition == POSITION_BOTTOM) { + positionY += res.getDimensionPixelSize(R.dimen.tri_state_down_dialog_position); + bg = !isTsKeyRight ? R.drawable.right_dialog_tri_state_up_bg : R.drawable.left_dialog_tri_state_up_bg; + } + positionY2 = positionY; + break; + case ROTATION_270: + if (isTsKeyRight) { + gravity = 85; + } else { + gravity = 53; + } + positionY2 = res.getDimensionPixelSize(R.dimen.tri_state_up_dialog_position_deep_land); + if (!isTsKeyRight) { + positionY2 += res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_height); + } + if (mPosition == POSITION_TOP) { + positionX = res.getDimensionPixelSize(R.dimen.tri_state_up_dialog_position_l); + } else if (mPosition == POSITION_MIDDLE) { + positionX = res.getDimensionPixelSize(R.dimen.tri_state_middle_dialog_position_l); + } else if (mPosition == POSITION_BOTTOM) { + positionX = res.getDimensionPixelSize(R.dimen.tri_state_down_dialog_position_l); + } + bg = R.drawable.dialog_tri_state_middle_bg; + break; + default: + if (isTsKeyRight) { + gravity = 53; + } else { + gravity = 51; + } + positionX = res.getDimensionPixelSize(R.dimen.tri_state_up_dialog_position_deep); + if (mPosition == POSITION_TOP) { + positionY2 = res.getDimensionPixelSize(R.dimen.tri_state_up_dialog_position); + bg = isTsKeyRight ? R.drawable.right_dialog_tri_state_up_bg : R.drawable.left_dialog_tri_state_up_bg; + } else if (mPosition == POSITION_MIDDLE) { + positionY2 = res.getDimensionPixelSize(R.dimen.tri_state_middle_dialog_position); + bg = R.drawable.dialog_tri_state_middle_bg; + } else if (mPosition == POSITION_BOTTOM) { + positionY2 = res.getDimensionPixelSize(R.dimen.tri_state_down_dialog_position); + bg = isTsKeyRight ? R.drawable.right_dialog_tri_state_down_bg : R.drawable.left_dialog_tri_state_down_bg; + } + positionY2 += res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_height); + break; + } + if (mTriStateMode != -1) { + if (mTriStateIcon != null) { + mTriStateIcon.setImageResource(iconId); + } + if (mTriStateText != null) { + String inputText = res.getString(textId); + if (inputText != null && mTriStateText.length() == inputText.length()) { + StringBuilder sb = new StringBuilder(); + sb.append(inputText); + sb.append(" "); + inputText = sb.toString(); + } + mTriStateText.setText(inputText); + } + if (mDialogView != null) { + mDialogView.setBackgroundDrawable(res.getDrawable(bg)); + } + mDialogPosition = positionY2; + } + + positionY = res.getDimensionPixelSize(R.dimen.tri_state_dialog_padding); + mWindowLayoutParams.gravity = gravity; + mWindowLayoutParams.y = (int) ((positionY2 - positionY) * scaleFactor); + mWindowLayoutParams.x = (int) ((positionX - positionY) * scaleFactor); + mWindow.setAttributes(mWindowLayoutParams); + handleResetTimeout(); + } + } + } + + private void updateSliderModeChanged() { + mHandler.obtainMessage(MSG_STATE_CHANGE, 0, 0).sendToTarget(); + if (mTriStateMode != -1) { + show(); + } + } + + private void handleShow() { + mHandler.removeMessages(MSG_DIALOG_SHOW); + mHandler.removeMessages(MSG_DIALOG_DISMISS); + handleResetTimeout(); + if (!mShowing) { + updateTheme(); + registerOrientationListener(true); + checkOrientationType(); + mShowing = true; + mDialog.show(); + if (mListener != null) { + mListener.onTriStateUserActivity(); + } + } + } + + private void handleDismiss() { + mHandler.removeMessages(MSG_DIALOG_SHOW); + mHandler.removeMessages(MSG_DIALOG_DISMISS); + if (mShowing) { + registerOrientationListener(false); + mShowing = false; + mDialog.dismiss(); + } + } + + private void handleStateChanged() { + if (mPositionValue != mTriStateMode) { + mTriStateMode = mPositionValue; + updateTriStateLayout(); + if (mListener != null) { + mListener.onTriStateUserActivity(); + } + } + } + + public void handleResetTimeout() { + mHandler.removeMessages(MSG_DIALOG_DISMISS); + mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_DIALOG_DISMISS, MSG_RESET_SCHEDULE, 0), (long) DIALOG_TIMEOUT); + if (mListener != null) { + mListener.onTriStateUserActivity(); + } + } + + @Override + public void onDensityOrFontScaleChanged() { + handleDismiss(); + initDialog(); + updateTriStateLayout(); + } + + private void updateTheme() { + // Todo: Add some logic to update the theme only when a new theme is applied + mIconColor = getAttrColor(android.R.attr.colorAccent); + mTextColor = getAttrColor(android.R.attr.textColorPrimary); + mBackgroundColor = getAttrColor(android.R.attr.colorPrimary); + mDialogView.setBackgroundTintList(ColorStateList.valueOf(mBackgroundColor)); + mTriStateIcon.setColorFilter(mIconColor); + mTriStateText.setTextColor(mTextColor); + } + + public int getAttrColor(int attr) { + TypedArray ta = mContext.obtainStyledAttributes(new int[]{attr}); + int colorAccent = ta.getColor(0, 0); + ta.recycle(); + return colorAccent; + } +} diff --git a/packages/SystemUI/src/com/android/systemui/tuner/BatteryPreference.java b/packages/SystemUI/src/com/android/systemui/tuner/BatteryPreference.java deleted file mode 100644 index b71aafdf6b96..000000000000 --- a/packages/SystemUI/src/com/android/systemui/tuner/BatteryPreference.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the - * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -package com.android.systemui.tuner; - -import static android.provider.Settings.System.SHOW_BATTERY_PERCENT; - -import android.content.Context; -import android.provider.Settings; -import android.text.TextUtils; -import android.util.ArraySet; -import android.util.AttributeSet; - -import androidx.preference.DropDownPreference; - -import com.android.internal.logging.MetricsLogger; -import com.android.internal.logging.nano.MetricsProto.MetricsEvent; -import com.android.systemui.Dependency; -import com.android.systemui.statusbar.phone.StatusBarIconController; - -public class BatteryPreference extends DropDownPreference implements TunerService.Tunable { - - private static final String PERCENT = "percent"; - private static final String DEFAULT = "default"; - private static final String DISABLED = "disabled"; - - private final String mBattery; - private boolean mBatteryEnabled; - private boolean mHasPercentage; - private ArraySet mHideList; - private boolean mHasSetValue; - - public BatteryPreference(Context context, AttributeSet attrs) { - super(context, attrs); - mBattery = context.getString(com.android.internal.R.string.status_bar_battery); - setEntryValues(new CharSequence[] {PERCENT, DEFAULT, DISABLED }); - } - - @Override - public void onAttached() { - super.onAttached(); - mHasPercentage = Settings.System.getInt(getContext().getContentResolver(), - SHOW_BATTERY_PERCENT, 0) != 0; - Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_HIDE_LIST); - } - - @Override - public void onDetached() { - Dependency.get(TunerService.class).removeTunable(this); - super.onDetached(); - } - - @Override - public void onTuningChanged(String key, String newValue) { - if (StatusBarIconController.ICON_HIDE_LIST.equals(key)) { - mHideList = StatusBarIconController.getIconHideList(getContext(), newValue); - mBatteryEnabled = !mHideList.contains(mBattery); - } - if (!mHasSetValue) { - // Because of the complicated tri-state it can end up looping and setting state back to - // what the user didn't choose. To avoid this, just set the state once and rely on the - // preference to handle updates. - mHasSetValue = true; - if (mBatteryEnabled && mHasPercentage) { - setValue(PERCENT); - } else if (mBatteryEnabled) { - setValue(DEFAULT); - } else { - setValue(DISABLED); - } - } - } - - @Override - protected boolean persistString(String value) { - final boolean v = PERCENT.equals(value); - MetricsLogger.action(getContext(), MetricsEvent.TUNER_BATTERY_PERCENTAGE, v); - Settings.System.putInt(getContext().getContentResolver(), SHOW_BATTERY_PERCENT, v ? 1 : 0); - if (DISABLED.equals(value)) { - mHideList.add(mBattery); - } else { - mHideList.remove(mBattery); - } - Dependency.get(TunerService.class).setValue(StatusBarIconController.ICON_HIDE_LIST, - TextUtils.join(",", mHideList)); - return true; - } -} diff --git a/packages/SystemUI/src/com/android/systemui/tuner/ClockPreference.java b/packages/SystemUI/src/com/android/systemui/tuner/ClockPreference.java deleted file mode 100644 index c92d7bbfe0b7..000000000000 --- a/packages/SystemUI/src/com/android/systemui/tuner/ClockPreference.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the - * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -package com.android.systemui.tuner; - -import android.content.Context; -import android.text.TextUtils; -import android.util.ArraySet; -import android.util.AttributeSet; - -import androidx.preference.DropDownPreference; - -import com.android.systemui.Dependency; -import com.android.systemui.statusbar.phone.StatusBarIconController; -import com.android.systemui.statusbar.policy.Clock; - -public class ClockPreference extends DropDownPreference implements TunerService.Tunable { - - private static final String SECONDS = "seconds"; - private static final String DEFAULT = "default"; - private static final String DISABLED = "disabled"; - - private final String mClock; - private boolean mClockEnabled; - private boolean mHasSeconds; - private ArraySet mHideList; - private boolean mHasSetValue; - private boolean mReceivedSeconds; - private boolean mReceivedClock; - - public ClockPreference(Context context, AttributeSet attrs) { - super(context, attrs); - mClock = context.getString(com.android.internal.R.string.status_bar_clock); - setEntryValues(new CharSequence[] { SECONDS, DEFAULT, DISABLED }); - } - - @Override - public void onAttached() { - super.onAttached(); - Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_HIDE_LIST, - Clock.CLOCK_SECONDS); - } - - @Override - public void onDetached() { - Dependency.get(TunerService.class).removeTunable(this); - super.onDetached(); - } - - @Override - public void onTuningChanged(String key, String newValue) { - if (StatusBarIconController.ICON_HIDE_LIST.equals(key)) { - mReceivedClock = true; - mHideList = StatusBarIconController.getIconHideList(getContext(), newValue); - mClockEnabled = !mHideList.contains(mClock); - } else if (Clock.CLOCK_SECONDS.equals(key)) { - mReceivedSeconds = true; - mHasSeconds = newValue != null && Integer.parseInt(newValue) != 0; - } - if (!mHasSetValue && mReceivedClock && mReceivedSeconds) { - // Because of the complicated tri-state it can end up looping and setting state back to - // what the user didn't choose. To avoid this, just set the state once and rely on the - // preference to handle updates. - mHasSetValue = true; - if (mClockEnabled && mHasSeconds) { - setValue(SECONDS); - } else if (mClockEnabled) { - setValue(DEFAULT); - } else { - setValue(DISABLED); - } - } - } - - @Override - protected boolean persistString(String value) { - Dependency.get(TunerService.class).setValue(Clock.CLOCK_SECONDS, SECONDS.equals(value) ? 1 - : 0); - if (DISABLED.equals(value)) { - mHideList.add(mClock); - } else { - mHideList.remove(mClock); - } - Dependency.get(TunerService.class).setValue(StatusBarIconController.ICON_HIDE_LIST, - TextUtils.join(",", mHideList)); - return true; - } -} diff --git a/packages/SystemUI/src/com/android/systemui/tuner/DemoModeFragment.java b/packages/SystemUI/src/com/android/systemui/tuner/DemoModeFragment.java index 1f444340653d..54bde250b9e4 100644 --- a/packages/SystemUI/src/com/android/systemui/tuner/DemoModeFragment.java +++ b/packages/SystemUI/src/com/android/systemui/tuner/DemoModeFragment.java @@ -84,11 +84,10 @@ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { mDemoModeTracker.startTracking(); updateDemoModeEnabled(); updateDemoModeOn(); - - setHasOptionsMenu(true); + //setHasOptionsMenu(true); } - @Override + /*@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: @@ -96,7 +95,7 @@ public boolean onOptionsItemSelected(MenuItem item) { break; } return super.onOptionsItemSelected(item); - } + }*/ @Override public void onResume() { @@ -222,4 +221,10 @@ public void onDemoModeFinished() { updateDemoModeOn(); } }; + + @Override + public void onActivityCreated(Bundle savedInstanceState) { + super.onActivityCreated(savedInstanceState); + getActivity().getActionBar().setDisplayHomeAsUpEnabled(true); + } } diff --git a/packages/SystemUI/src/com/android/systemui/tuner/StatusbarItems.java b/packages/SystemUI/src/com/android/systemui/tuner/StatusbarItems.java new file mode 100644 index 000000000000..acf6f9614f37 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/tuner/StatusbarItems.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package com.android.systemui.tuner; + +import android.os.Bundle; +import androidx.preference.PreferenceFragment; +import com.android.systemui.R; + +public class StatusbarItems extends PreferenceFragment { + + @Override + public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { + addPreferencesFromResource(R.xml.statusbar_items); + } +} diff --git a/packages/SystemUI/src/com/android/systemui/tuner/StatusbarItemsActivity.java b/packages/SystemUI/src/com/android/systemui/tuner/StatusbarItemsActivity.java new file mode 100644 index 000000000000..a11886935f61 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/tuner/StatusbarItemsActivity.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2016 The Pure Android Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.systemui.tuner; + +import android.app.Activity; +import android.os.Bundle; +import android.view.Menu; +import android.view.MenuItem; + +import com.android.systemui.Dependency; +import com.android.systemui.fragments.FragmentService; +import com.android.systemui.R; + +import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity; + +import javax.inject.Inject; + +public class StatusbarItemsActivity extends CollapsingToolbarBaseActivity { + + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + getFragmentManager().beginTransaction().replace(R.id.content_frame, new StatusbarItems()) + .commit(); + } + + @Override + protected void onDestroy() { + super.onDestroy(); + Dependency.destroy(FragmentService.class, s -> s.destroyAll()); + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + case android.R.id.home: + onBackPressed(); + return true; + } + return super.onOptionsItemSelected(item); + } +} + diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java index 3231aecdc4b2..26f1d3b2a465 100644 --- a/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java +++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java @@ -36,7 +36,9 @@ import javax.inject.Inject; -public class TunerActivity extends Activity implements +import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity; + +public class TunerActivity extends CollapsingToolbarBaseActivity implements PreferenceFragment.OnPreferenceStartFragmentCallback, PreferenceFragment.OnPreferenceStartScreenCallback { @@ -53,17 +55,18 @@ public class TunerActivity extends Activity implements } protected void onCreate(Bundle savedInstanceState) { + requestWindowFeature(Window.FEATURE_NO_TITLE); super.onCreate(savedInstanceState); setTheme(R.style.Theme_AppCompat_DayNight); getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); - requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.tuner_activity); +/* Toolbar toolbar = findViewById(R.id.action_bar); if (toolbar != null) { setActionBar(toolbar); } - +*/ if (getFragmentManager().findFragmentByTag(TAG_TUNER) == null) { final String action = getIntent().getAction(); boolean showDemoMode = action != null && action.equals( diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerFragment.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerFragment.java index 989462a9fd34..9352c88b103f 100644 --- a/packages/SystemUI/src/com/android/systemui/tuner/TunerFragment.java +++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerFragment.java @@ -70,13 +70,13 @@ public void onCreate(Bundle savedInstanceState) { setHasOptionsMenu(true); } - +/* @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); getActivity().getActionBar().setDisplayHomeAsUpEnabled(true); } - +*/ @Override public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { addPreferencesFromResource(R.xml.tuner_prefs); @@ -120,11 +120,6 @@ public void onPause() { MetricsLogger.visibility(getContext(), MetricsEvent.TUNER, false); } - @Override - public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { - menu.add(Menu.NONE, MENU_REMOVE, Menu.NONE, R.string.remove_from_settings); - } - @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerService.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerService.java index 5d09e064604a..b3bd5206cd8e 100644 --- a/packages/SystemUI/src/com/android/systemui/tuner/TunerService.java +++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerService.java @@ -75,4 +75,12 @@ public static boolean parseIntegerSwitch(String value, boolean defaultValue) { return defaultValue; } } + + public static int parseInteger(String value, int defaultValue) { + try { + return value != null ? Integer.parseInt(value) : defaultValue; + } catch (NumberFormatException e) { + return defaultValue; + } + } } diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerServiceImpl.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerServiceImpl.java index b23d870fb82f..35348ffa4bce 100644 --- a/packages/SystemUI/src/com/android/systemui/tuner/TunerServiceImpl.java +++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerServiceImpl.java @@ -46,6 +46,7 @@ import com.android.systemui.settings.UserTracker; import com.android.systemui.statusbar.phone.StatusBarIconController; import com.android.systemui.statusbar.phone.SystemUIDialog; +import com.android.systemui.statusbar.policy.Clock; import com.android.systemui.util.leak.LeakDetector; import java.util.HashSet; @@ -68,6 +69,11 @@ public class TunerServiceImpl extends TunerService { // Things that use the tunable infrastructure but are now real user settings and // shouldn't be reset with tuner settings. private static final String[] RESET_EXCEPTION_LIST = new String[] { + Clock.STATUS_BAR_CLOCK_SECONDS, + Clock.STATUS_BAR_CLOCK_DATE_DISPLAY, + Clock.STATUS_BAR_CLOCK_DATE_STYLE, + Clock.STATUS_BAR_CLOCK_DATE_POSITION, + Clock.STATUS_BAR_CLOCK_DATE_FORMAT, QSTileHost.TILES_SETTING, Settings.Secure.DOZE_ALWAYS_ON, Settings.Secure.MEDIA_CONTROLS_RESUME, @@ -152,41 +158,67 @@ private void upgradeTuner(int oldVersion, int newVersion, Handler mainHandler) { if (oldVersion < 2) { setTunerEnabled(false); } - // 3 Removed because of a revert. - if (oldVersion < 4) { - // Delay this so that we can wait for everything to be registered first. - final int user = mCurrentUser; - mainHandler.postDelayed( - () -> clearAllFromUser(user), 5000); - } setValue(TUNER_VERSION, newVersion); } + private boolean isSystem(String key) { + return key.startsWith("system:"); + } + + private String chomp(String key) { + return key.replaceFirst("^(system):", ""); + } + @Override public String getValue(String setting) { - return Settings.Secure.getStringForUser(mContentResolver, setting, mCurrentUser); + if (isSystem(setting)) { + return Settings.System.getStringForUser( + mContentResolver, chomp(setting), mCurrentUser); + } else { + return Settings.Secure.getStringForUser(mContentResolver, setting, mCurrentUser); + } } @Override public void setValue(String setting, String value) { - Settings.Secure.putStringForUser(mContentResolver, setting, value, mCurrentUser); + if (isSystem(setting)) { + Settings.System.putStringForUser( + mContentResolver, chomp(setting), value, mCurrentUser); + } else { + Settings.Secure.putStringForUser(mContentResolver, setting, value, mCurrentUser); + } } @Override public int getValue(String setting, int def) { - return Settings.Secure.getIntForUser(mContentResolver, setting, def, mCurrentUser); + if (isSystem(setting)) { + return Settings.System.getIntForUser( + mContentResolver, chomp(setting), def, mCurrentUser); + } else { + return Settings.Secure.getIntForUser(mContentResolver, setting, def, mCurrentUser); + } } @Override public String getValue(String setting, String def) { - String ret = Secure.getStringForUser(mContentResolver, setting, mCurrentUser); + String ret; + if (isSystem(setting)) { + ret = Settings.System.getStringForUser( + mContentResolver, chomp(setting), mCurrentUser); + } else { + ret = Secure.getStringForUser(mContentResolver, setting, mCurrentUser); + } if (ret == null) return def; return ret; } @Override public void setValue(String setting, int value) { - Settings.Secure.putIntForUser(mContentResolver, setting, value, mCurrentUser); + if (isSystem(setting)) { + Settings.System.putIntForUser(mContentResolver, chomp(setting), value, mCurrentUser); + } else { + Settings.Secure.putIntForUser(mContentResolver, setting, value, mCurrentUser); + } } @Override @@ -205,14 +237,18 @@ private void addTunable(Tunable tunable, String key) { mTunables.add(tunable); mLeakDetector.trackCollection(mTunables, "TunerService.mTunables"); } - Uri uri = Settings.Secure.getUriFor(key); + final Uri uri; + if (isSystem(key)) { + uri = Settings.System.getUriFor(chomp(key)); + } else { + uri = Settings.Secure.getUriFor(key); + } if (!mListeningUris.containsKey(uri)) { mListeningUris.put(uri, key); mContentResolver.registerContentObserver(uri, false, mObserver, mCurrentUser); } // Send the first state. - String value = DejankUtils.whitelistIpcs(() -> Settings.Secure - .getStringForUser(mContentResolver, key, mCurrentUser)); + String value = DejankUtils.whitelistIpcs(() -> getValue(key)); tunable.onTuningChanged(key, value); } @@ -242,18 +278,23 @@ private void reloadSetting(Uri uri) { if (tunables == null) { return; } - String value = Settings.Secure.getStringForUser(mContentResolver, key, mCurrentUser); + String value = getValue(key); for (Tunable tunable : tunables) { - tunable.onTuningChanged(key, value); + if (tunable != null) { + tunable.onTuningChanged(key, value); + } } } private void reloadAll() { for (String key : mTunableLookup.keySet()) { - String value = Settings.Secure.getStringForUser(mContentResolver, key, - mCurrentUser); + if (ArrayUtils.contains(RESET_EXCEPTION_LIST, key) || key.startsWith("system:")) + continue; + String value = getValue(key); for (Tunable tunable : mTunableLookup.get(key)) { - tunable.onTuningChanged(key, value); + if (tunable != null) { + tunable.onTuningChanged(key, value); + } } } } @@ -270,9 +311,6 @@ public void clearAllFromUser(int user) { // A couple special cases. for (String key : mTunableLookup.keySet()) { - if (ArrayUtils.contains(RESET_EXCEPTION_LIST, key)) { - continue; - } Settings.Secure.putStringForUser(mContentResolver, key, null, user); } } diff --git a/packages/SystemUI/src/com/android/systemui/util/wakelock/WakeLock.java b/packages/SystemUI/src/com/android/systemui/util/wakelock/WakeLock.java index 8d77c4a194a9..e9f253433740 100644 --- a/packages/SystemUI/src/com/android/systemui/util/wakelock/WakeLock.java +++ b/packages/SystemUI/src/com/android/systemui/util/wakelock/WakeLock.java @@ -110,7 +110,9 @@ public void release(String why) { } else { mActiveClients.put(why, count - 1); } - inner.release(); + if (inner.isHeld()) { + inner.release(); + } } /** @see PowerManager.WakeLock#wrap(Runnable) */ diff --git a/packages/SystemUI/src/com/android/systemui/volume/SegmentedButtons.java b/packages/SystemUI/src/com/android/systemui/volume/SegmentedButtons.java index 89bc75760b4b..0f181ece475a 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/SegmentedButtons.java +++ b/packages/SystemUI/src/com/android/systemui/volume/SegmentedButtons.java @@ -31,8 +31,10 @@ public class SegmentedButtons extends LinearLayout { private static final int LABEL_RES_KEY = R.id.label; - private static final Typeface REGULAR = Typeface.create("sans-serif", Typeface.NORMAL); - private static final Typeface MEDIUM = Typeface.create("sans-serif-medium", Typeface.NORMAL); + private final String txtFont; + private final String txtMediumFont; + private final Typeface REGULAR; + private final Typeface MEDIUM; private final Context mContext; protected final LayoutInflater mInflater; @@ -47,6 +49,10 @@ public SegmentedButtons(Context context, AttributeSet attrs) { mInflater = LayoutInflater.from(mContext); setOrientation(HORIZONTAL); mConfigurableTexts = new ConfigurableTexts(mContext); + txtFont = getResources().getString(com.android.internal.R.string.config_bodyFontFamily); + txtMediumFont = getResources().getString(com.android.internal.R.string.config_bodyFontFamilyMedium); + REGULAR = Typeface.create(txtFont, Typeface.NORMAL); + MEDIUM = Typeface.create(txtMediumFont, Typeface.NORMAL); } public void setCallback(Callback callback) { diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java index f71d98827e4b..9d5d34ad4087 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java @@ -29,6 +29,8 @@ import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.demomode.DemoMode; import com.android.systemui.demomode.DemoModeController; +import com.android.systemui.tristate.TriStateUiController; +import com.android.systemui.tristate.TriStateUiControllerImpl; import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.plugins.ActivityStarter; import com.android.systemui.plugins.PluginDependencyProvider; @@ -49,7 +51,7 @@ */ @SysUISingleton public class VolumeDialogComponent implements VolumeComponent, TunerService.Tunable, - VolumeDialogControllerImpl.UserActivityListener{ + VolumeDialogControllerImpl.UserActivityListener, TriStateUiController.UserActivityListener { public static final String VOLUME_DOWN_SILENT = "sysui_volume_down_silent"; public static final String VOLUME_UP_SILENT = "sysui_volume_up_silent"; @@ -66,6 +68,7 @@ public class VolumeDialogComponent implements VolumeComponent, TunerService.Tuna protected final Context mContext; private final VolumeDialogControllerImpl mController; + private TriStateUiControllerImpl mTriStateController; private final InterestingConfigChanges mConfigChanges = new InterestingConfigChanges( ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_LOCALE | ActivityInfo.CONFIG_ASSETS_PATHS | ActivityInfo.CONFIG_UI_MODE); @@ -95,6 +98,8 @@ public VolumeDialogComponent( mActivityStarter = activityStarter; mController = volumeDialogController; mController.setUserActivityListener(this); + boolean hasAlertSlider = mContext.getResources(). + getBoolean(com.android.internal.R.bool.config_hasAlertSlider); // Allow plugins to reference the VolumeDialogController. pluginDependencyProvider.allowPluginDependency(VolumeDialogController.class); extensionController.newExtension(VolumeDialog.class) @@ -106,6 +111,13 @@ public VolumeDialogComponent( } mDialog = dialog; mDialog.init(LayoutParams.TYPE_VOLUME_OVERLAY, mVolumeDialogCallback); + if (hasAlertSlider) { + if (mTriStateController != null) { + mTriStateController.destroy(); + } + mTriStateController = new TriStateUiControllerImpl(mContext); + mTriStateController.init(LayoutParams.TYPE_VOLUME_OVERLAY, this); + } }).build(); applyConfiguration(); tunerService.addTunable(this, VOLUME_DOWN_SILENT, VOLUME_UP_SILENT, @@ -193,6 +205,11 @@ private void startSettings(Intent intent) { mActivityStarter.startActivity(intent, true /* onlyProvisioned */, true /* dismissShade */); } + @Override + public void onTriStateUserActivity() { + onUserActivity(); + } + private final VolumeDialogImpl.Callback mVolumeDialogCallback = new VolumeDialogImpl.Callback() { @Override public void onZenSettingsClicked() { diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java index bf7c4598b5da..7cd4b48b0765 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java @@ -215,6 +215,8 @@ public VolumeDialogControllerImpl( VolumePolicy.A11Y_MODE_INDEPENDENT_A11Y_VOLUME : VolumePolicy.A11Y_MODE_MEDIA_A11Y_VOLUME); + updateLinkNotificationConfigW(); + mWakefulnessLifecycle.addObserver(mWakefullnessLifecycleObserver); } @@ -559,6 +561,16 @@ private static boolean isRinger(int stream) { return stream == AudioManager.STREAM_RING || stream == AudioManager.STREAM_NOTIFICATION; } + private boolean updateLinkNotificationConfigW() { + boolean linkNotificationWithVolume = Settings.Secure.getInt(mContext.getContentResolver(), + Settings.Secure.VOLUME_LINK_NOTIFICATION, 1) == 1; + if (mState.linkedNotification == linkNotificationWithVolume) { + return false; + } + mState.linkedNotification = linkNotificationWithVolume; + return true; + } + private boolean updateEffectsSuppressorW(ComponentName effectsSuppressor) { if (Objects.equals(mState.effectsSuppressor, effectsSuppressor)) return false; mState.effectsSuppressor = effectsSuppressor; @@ -1020,6 +1032,8 @@ private final class SettingObserver extends ContentObserver { Settings.Global.getUriFor(Settings.Global.ZEN_MODE); private final Uri ZEN_MODE_CONFIG_URI = Settings.Global.getUriFor(Settings.Global.ZEN_MODE_CONFIG_ETAG); + private final Uri VOLUME_LINK_NOTIFICATION_URI = + Settings.Secure.getUriFor(Settings.Secure.VOLUME_LINK_NOTIFICATION); public SettingObserver(Handler handler) { super(handler); @@ -1028,6 +1042,8 @@ public SettingObserver(Handler handler) { public void init() { mContext.getContentResolver().registerContentObserver(ZEN_MODE_URI, false, this); mContext.getContentResolver().registerContentObserver(ZEN_MODE_CONFIG_URI, false, this); + mContext.getContentResolver().registerContentObserver(VOLUME_LINK_NOTIFICATION_URI, + false, this); } public void destroy() { @@ -1043,6 +1059,9 @@ public void onChange(boolean selfChange, Uri uri) { if (ZEN_MODE_CONFIG_URI.equals(uri)) { changed |= updateZenConfig(); } + if (VOLUME_LINK_NOTIFICATION_URI.equals(uri)) { + changed = updateLinkNotificationConfigW(); + } if (changed) { mCallbacks.onStateChanged(mState); diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java index c94a915b2747..e450574c77dd 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java @@ -23,11 +23,13 @@ import static android.media.AudioManager.STREAM_ACCESSIBILITY; import static android.media.AudioManager.STREAM_ALARM; import static android.media.AudioManager.STREAM_MUSIC; +import static android.media.AudioManager.STREAM_NOTIFICATION; import static android.media.AudioManager.STREAM_RING; import static android.media.AudioManager.STREAM_VOICE_CALL; import static android.view.View.ACCESSIBILITY_LIVE_REGION_POLITE; import static android.view.View.GONE; import static android.view.View.INVISIBLE; +import static android.view.View.LAYOUT_DIRECTION_LTR; import static android.view.View.LAYOUT_DIRECTION_RTL; import static android.view.View.VISIBLE; import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT; @@ -45,6 +47,9 @@ import android.app.ActivityManager; import android.app.Dialog; import android.app.KeyguardManager; +import android.content.ComponentName; +import android.bluetooth.BluetoothAdapter; +import android.bluetooth.BluetoothProfile; import android.content.ContentResolver; import android.content.Context; import android.content.DialogInterface; @@ -65,6 +70,9 @@ import android.graphics.drawable.RotateDrawable; import android.media.AudioManager; import android.media.AudioSystem; +import android.media.session.MediaController; +import android.media.session.MediaSessionManager; +import android.media.session.PlaybackState; import android.os.Debug; import android.os.Handler; import android.os.Looper; @@ -75,6 +83,7 @@ import android.provider.Settings; import android.provider.Settings.Global; import android.text.InputFilter; +import android.text.TextUtils; import android.util.Log; import android.util.Slog; import android.util.SparseBooleanArray; @@ -93,8 +102,12 @@ import android.view.WindowManager; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityManager; +import android.view.View.OnLongClickListener; import android.view.accessibility.AccessibilityNodeInfo; import android.view.animation.DecelerateInterpolator; +import android.view.animation.Animation; +import android.view.animation.RotateAnimation; +import android.view.animation.LinearInterpolator; import android.widget.FrameLayout; import android.widget.ImageButton; import android.widget.ImageView; @@ -123,6 +136,7 @@ import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; +import com.android.systemui.tuner.TunerService; import com.android.systemui.util.AlphaTintDrawableWrapper; import com.android.systemui.util.RoundedCornerProgressDrawable; @@ -140,9 +154,12 @@ */ public class VolumeDialogImpl implements VolumeDialog, ConfigurationController.ConfigurationListener, - ViewTreeObserver.OnComputeInternalInsetsListener { + ViewTreeObserver.OnComputeInternalInsetsListener, OnLongClickListener { private static final String TAG = Util.logTag(VolumeDialogImpl.class); + private static final String VOLUME_PANEL_ON_LEFT = + Settings.Secure.VOLUME_PANEL_ON_LEFT; + private static final long USER_ATTEMPT_GRACE_PERIOD = 1000; private static final int UPDATE_ANIMATION_DURATION = 80; @@ -161,6 +178,9 @@ public class VolumeDialogImpl implements VolumeDialog, /** Volume dialog slider animation. */ private static final String TYPE_UPDATE = "update"; + private static final ComponentName SOUND_SETTING_COMPONENT = new ComponentName( + "com.android.settings", "com.android.settings.Settings$SoundSettingsActivity"); + private final int mDialogShowAnimationDurationMs; private final int mDialogHideAnimationDurationMs; private int mDialogWidth; @@ -235,7 +255,11 @@ public class VolumeDialogImpl implements VolumeDialog, private ViewGroup mODICaptionsView; private CaptionsToggleImageButton mODICaptionsIcon; private View mSettingsView; + private RotateAnimation rotateAnimation; private ImageButton mSettingsIcon; + private ImageButton mAppVolumeIcon; + private ImageButton mExpandRows; + private View mExpandRowsView; private FrameLayout mZenIcon; private final List mRows = new ArrayList<>(); private ConfigurableTexts mConfigurableTexts; @@ -266,12 +290,27 @@ public class VolumeDialogImpl implements VolumeDialog, private boolean mHasSeenODICaptionsTooltip; private ViewStub mODICaptionsTooltipViewStub; private View mODICaptionsTooltipView = null; + private TunerService mTunerService; + + // Volume panel placement left or right + private boolean mVolumePanelOnLeft; private final boolean mUseBackgroundBlur; private Consumer mCrossWindowBlurEnabledListener; private BackgroundBlurDrawable mDialogRowsViewBackground; private final InteractionJankMonitor mInteractionJankMonitor; + // Variable to track the default row with which the panel is initially shown + private VolumeRow mDefaultRow = null; + + private FrameLayout mRoundedBorderBottom; + + // Volume panel expand state + private boolean mExpanded; + + // Number of animating rows + private int mAnimatingRows = 0; + public VolumeDialogImpl( Context context, VolumeDialogController volumeDialogController, @@ -280,6 +319,7 @@ public VolumeDialogImpl( ConfigurationController configurationController, MediaOutputDialogFactory mediaOutputDialogFactory, ActivityStarter activityStarter, + TunerService tunerService, InteractionJankMonitor interactionJankMonitor) { mContext = new ContextThemeWrapper(context, R.style.volume_dialog_theme); @@ -291,6 +331,7 @@ public VolumeDialogImpl( mConfigurationController = configurationController; mMediaOutputDialogFactory = mediaOutputDialogFactory; mActivityStarter = activityStarter; + mTunerService = tunerService; mShowActiveStreamOnly = showActiveStreamOnly(); mHasSeenODICaptionsTooltip = Prefs.getBoolean(context, Prefs.Key.HAS_SEEN_ODI_CAPTIONS_TOOLTIP, false); @@ -318,6 +359,10 @@ public VolumeDialogImpl( }; } + if (!mShowActiveStreamOnly) { + mTunerService.addTunable(mTunable, VOLUME_PANEL_ON_LEFT); + } + initDimens(); } @@ -373,25 +418,56 @@ private void unionViewBoundstoTouchableRegion(final View view) { final int[] locInWindow = new int[2]; view.getLocationInWindow(locInWindow); - float x = locInWindow[0]; - float y = locInWindow[1]; + float xExtraSize = 0; + float yExtraSize = 0; // The ringer and rows container has extra height at the top to fit the expanded ringer // drawer. This area should not be touchable unless the ringer drawer is open. - if (view == mTopContainer && !mIsRingerDrawerOpen) { + // In landscape the ringer expands to the left and it has to be ensured that if there + // are multiple rows they are touchable. + // The invisible expandable rows reserve space if the panel is not expanded, this space + // needs to be touchable. + if (view == mTopContainer) { if (!isLandscape()) { - y += getRingerDrawerOpenExtraSize(); + if (!mIsRingerDrawerOpen) { + yExtraSize = getRingerDrawerOpenExtraSize(); + } + if (!mExpanded) { + xExtraSize = getExpandableRowsExtraSize(); + } } else { - x += getRingerDrawerOpenExtraSize(); + if (!mIsRingerDrawerOpen && !mExpanded) { + xExtraSize = + Math.max(getRingerDrawerOpenExtraSize(), getExpandableRowsExtraSize()); + } else if (!mIsRingerDrawerOpen) { + if (getRingerDrawerOpenExtraSize() > getVisibleRowsExtraSize()) { + xExtraSize = getRingerDrawerOpenExtraSize() - getVisibleRowsExtraSize(); + } + } else if (!mExpanded) { + if ((getVisibleRowsExtraSize() + getExpandableRowsExtraSize()) + > getRingerDrawerOpenExtraSize()) { + xExtraSize = (getVisibleRowsExtraSize() + getExpandableRowsExtraSize()) + - getRingerDrawerOpenExtraSize(); + } + } } } - mTouchableRegion.op( - (int) x, - (int) y, - locInWindow[0] + view.getWidth(), - locInWindow[1] + view.getHeight(), - Region.Op.UNION); + if (mVolumePanelOnLeft) { + mTouchableRegion.op( + locInWindow[0], + locInWindow[1] + (int) yExtraSize, + locInWindow[0] + view.getWidth() - (int) xExtraSize, + locInWindow[1] + view.getHeight(), + Region.Op.UNION); + } else { + mTouchableRegion.op( + locInWindow[0] + (int) xExtraSize, + locInWindow[1] + (int) yExtraSize, + locInWindow[0] + view.getWidth(), + locInWindow[1] + view.getHeight(), + Region.Op.UNION); + } } private void initDialog(int lockTaskModeState) { @@ -402,6 +478,7 @@ private void initDialog(int lockTaskModeState) { mConfigurableTexts = new ConfigurableTexts(mContext); mHovering = false; mShowing = false; + mExpanded = false; mWindow = mDialog.getWindow(); mWindow.requestFeature(Window.FEATURE_NO_TITLE); mWindow.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); @@ -420,17 +497,24 @@ private void initDialog(int lockTaskModeState) { lp.setTitle(VolumeDialogImpl.class.getSimpleName()); lp.windowAnimations = -1; lp.gravity = mContext.getResources().getInteger(R.integer.volume_dialog_gravity); + if (!mShowActiveStreamOnly) { + lp.gravity &= ~(Gravity.LEFT | Gravity.RIGHT); + lp.gravity |= mVolumePanelOnLeft ? Gravity.LEFT : Gravity.RIGHT; + } mWindow.setAttributes(lp); mWindow.setLayout(WRAP_CONTENT, WRAP_CONTENT); mDialog.setContentView(R.layout.volume_dialog); mDialogView = mDialog.findViewById(R.id.volume_dialog); mDialogView.setAlpha(0); + mDialogView.setLayoutDirection( + mVolumePanelOnLeft ? LAYOUT_DIRECTION_LTR : LAYOUT_DIRECTION_RTL); mDialog.setCanceledOnTouchOutside(true); mDialog.setOnShowListener(dialog -> { mDialogView.getViewTreeObserver().addOnComputeInternalInsetsListener(this); if (!shouldSlideInVolumeTray()) { - mDialogView.setTranslationX(mDialogView.getWidth() / 2.0f); + mDialogView.setTranslationX( + getTranslationForPanelLocation() * mDialogView.getWidth() / 2.0f); } mDialogView.setAlpha(0); mDialogView.animate() @@ -526,6 +610,9 @@ public void onViewDetachedFromWindow(View v) { updateBackgroundForDrawerClosedAmount(); setTopContainerBackgroundDrawable(); + + // Rows need to be updated after mRingerAndDrawerContainerBackground is set + updateRowsH(getActiveRow()); } }); } @@ -562,6 +649,41 @@ public void onViewDetachedFromWindow(View v) { mSettingsView = mDialog.findViewById(R.id.settings_container); mSettingsIcon = mDialog.findViewById(R.id.settings); + mSettingsIcon.setOnLongClickListener(this); + + mRoundedBorderBottom = mDialog.findViewById(R.id.rounded_border_bottom); + + mExpandRowsView = mDialog.findViewById(R.id.expandable_indicator_container); + mExpandRows = mDialog.findViewById(R.id.expandable_indicator); + mExpandRows.setOnLongClickListener(this); + + if (mVolumePanelOnLeft) { + if (mRingerAndDrawerContainer != null) { + mRingerAndDrawerContainer.setLayoutDirection(LAYOUT_DIRECTION_RTL); + } + + ViewGroup container = mDialog.findViewById(R.id.volume_dialog_container); + setGravity(container, Gravity.LEFT); + setLayoutGravity(container, Gravity.LEFT); + + setGravity(mDialogView, Gravity.LEFT); + setLayoutGravity(mDialogView, Gravity.LEFT); + + setGravity((ViewGroup) mTopContainer, Gravity.LEFT); + + setLayoutGravity(mSelectedRingerContainer, Gravity.BOTTOM | Gravity.LEFT); + + setLayoutGravity(mRingerDrawerNewSelectionBg, Gravity.BOTTOM | Gravity.LEFT); + + setGravity(mRinger, Gravity.LEFT); + setLayoutGravity(mRinger, Gravity.BOTTOM | Gravity.LEFT); + + setGravity(mDialogRowsViewContainer, Gravity.LEFT); + setLayoutGravity(mDialogRowsViewContainer, Gravity.LEFT); + + setGravity(mODICaptionsView, Gravity.LEFT); + setLayoutGravity(mODICaptionsView, Gravity.LEFT); + } if (mRows.isEmpty()) { if (!AudioSystem.isSingleVolume(mContext)) { @@ -571,8 +693,13 @@ public void onViewDetachedFromWindow(View v) { addRow(AudioManager.STREAM_MUSIC, R.drawable.ic_volume_media, R.drawable.ic_volume_media_mute, true, true); if (!AudioSystem.isSingleVolume(mContext)) { - addRow(AudioManager.STREAM_RING, - R.drawable.ic_volume_ringer, R.drawable.ic_volume_ringer_mute, true, false); + if (Util.isVoiceCapable(mContext)) { + addRow(AudioManager.STREAM_RING, R.drawable.ic_volume_ringer, + R.drawable.ic_volume_ringer_mute, true, false); + } else { + addRow(AudioManager.STREAM_RING, R.drawable.ic_volume_notification, + R.drawable.ic_volume_notification_mute, true, false); + } addRow(STREAM_ALARM, R.drawable.ic_alarm, R.drawable.ic_volume_alarm_mute, true, false); addRow(AudioManager.STREAM_VOICE_CALL, @@ -608,6 +735,40 @@ private void initDimens() { mRingerCount = mShowVibrate ? 3 : 2; } + // Helper to set gravity. + private void setGravity(ViewGroup viewGroup, int gravity) { + if (viewGroup instanceof LinearLayout) { + ((LinearLayout) viewGroup).setGravity(gravity); + } + } + + // Helper to set layout gravity. + private void setLayoutGravity(ViewGroup viewGroup, int gravity) { + if (viewGroup != null) { + Object obj = viewGroup.getLayoutParams(); + if (obj instanceof FrameLayout.LayoutParams) { + ((FrameLayout.LayoutParams) obj).gravity = gravity; + } else if (obj instanceof LinearLayout.LayoutParams) { + ((LinearLayout.LayoutParams) obj).gravity = gravity; + } + } + } + + private final TunerService.Tunable mTunable = new TunerService.Tunable() { + @Override + public void onTuningChanged(String key, String newValue) { + if (VOLUME_PANEL_ON_LEFT.equals(key)) { + final boolean volumePanelOnLeft = TunerService.parseIntegerSwitch(newValue, false); + if (mVolumePanelOnLeft != volumePanelOnLeft) { + mVolumePanelOnLeft = volumePanelOnLeft; + mHandler.post(() -> { + mControllerCallbackH.onConfigurationChanged(); + }); + } + } + } + }; + protected ViewGroup getDialogView() { return mDialogView; } @@ -629,8 +790,7 @@ private boolean isLandscape() { } private boolean isRtl() { - return mContext.getResources().getConfiguration().getLayoutDirection() - == LAYOUT_DIRECTION_RTL; + return mDialogView.getLayoutDirection() == LAYOUT_DIRECTION_RTL; } public void setStreamImportant(int stream, boolean important) { @@ -818,6 +978,12 @@ private void setupRingerDrawer() { mDialogView.getPaddingTop(), mDialogView.getPaddingRight(), mDialogView.getPaddingBottom() + getRingerDrawerOpenExtraSize()); + } else if (mVolumePanelOnLeft) { + mDialogView.setPadding( + mDialogView.getPaddingLeft(), + mDialogView.getPaddingTop(), + mDialogView.getPaddingRight() + getRingerDrawerOpenExtraSize(), + mDialogView.getPaddingBottom()); } else { mDialogView.setPadding( mDialogView.getPaddingLeft() + getRingerDrawerOpenExtraSize(), @@ -887,15 +1053,22 @@ private ImageView getDrawerIconViewForMode(int mode) { } /** - * Translation to apply form the origin (either top or left) to overlap the selection background - * with the given mode in the drawer. + * Translation to apply form the origin (either top or left/right) to overlap the selection + * background with the given mode in the drawer. */ private float getTranslationInDrawerForRingerMode(int mode) { - return mode == RINGER_MODE_VIBRATE + return (mode == RINGER_MODE_VIBRATE ? -mRingerDrawerItemSize * 2 : mode == RINGER_MODE_SILENT ? -mRingerDrawerItemSize - : 0; + : 0) + * (isLandscape() + ? getTranslationForPanelLocation() + : 1); + } + + private float getTranslationForPanelLocation() { + return mVolumePanelOnLeft ? -1 : 1; } /** Animates in the ringer drawer. */ @@ -926,12 +1099,13 @@ private void showRingerDrawer() { getTranslationInDrawerForRingerMode(mState.ringerModeInternal)); } - // Move the drawer so that the top/rightmost ringer choice overlaps with the selected ringer + // Move the drawer so that the top/outmost ringer choice overlaps with the selected ringer // icon. if (!isLandscape()) { mRingerDrawerContainer.setTranslationY(mRingerDrawerItemSize * (mRingerCount - 1)); } else { - mRingerDrawerContainer.setTranslationX(mRingerDrawerItemSize * (mRingerCount - 1)); + mRingerDrawerContainer.setTranslationX( + getTranslationForPanelLocation() * mRingerDrawerItemSize * (mRingerCount - 1)); } mRingerDrawerContainer.setAlpha(0f); mRingerDrawerContainer.setVisibility(VISIBLE); @@ -1013,7 +1187,7 @@ private void hideRingerDrawer() { .start(); } else { mRingerDrawerContainer.animate() - .translationX(mRingerDrawerItemSize * 2) + .translationX(getTranslationForPanelLocation() * mRingerDrawerItemSize * 2) .start(); } @@ -1034,19 +1208,114 @@ private void hideRingerDrawer() { mIsRingerDrawerOpen = false; } + /** + * Returns a {@link MediaController} that state is playing and type is local playback, + * and also have active sessions. + */ + @Nullable + private MediaController getActiveLocalMediaController() { + MediaSessionManager mediaSessionManager = + mContext.getSystemService(MediaSessionManager.class); + MediaController localController = null; + final List remoteMediaSessionLists = new ArrayList<>(); + for (MediaController controller : mediaSessionManager.getActiveSessions(null)) { + final MediaController.PlaybackInfo pi = controller.getPlaybackInfo(); + if (pi == null) { + // do nothing + continue; + } + final PlaybackState playbackState = controller.getPlaybackState(); + if (playbackState == null) { + // do nothing + continue; + } + if (D.BUG) { + Log.d(TAG, "getActiveLocalMediaController() package name : " + + controller.getPackageName() + + ", play back type : " + pi.getPlaybackType() + + ", play back state : " + playbackState.getState()); + } + if (playbackState.getState() != PlaybackState.STATE_PLAYING) { + // do nothing + continue; + } + if (pi.getPlaybackType() == MediaController.PlaybackInfo.PLAYBACK_TYPE_REMOTE) { + if (localController != null + && TextUtils.equals( + localController.getPackageName(), controller.getPackageName())) { + localController = null; + } + if (!remoteMediaSessionLists.contains(controller.getPackageName())) { + remoteMediaSessionLists.add(controller.getPackageName()); + } + continue; + } + if (pi.getPlaybackType() == MediaController.PlaybackInfo.PLAYBACK_TYPE_LOCAL) { + if (localController == null + && !remoteMediaSessionLists.contains(controller.getPackageName())) { + localController = controller; + } + } + } + return localController; + } + + private boolean isBluetoothA2dpConnected() { + BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); + return mBluetoothAdapter != null && mBluetoothAdapter.isEnabled() + && mBluetoothAdapter.getProfileConnectionState(BluetoothProfile.A2DP) + == BluetoothProfile.STATE_CONNECTED; + } + private void initSettingsH(int lockTaskModeState) { + if (mRoundedBorderBottom != null){ + mRoundedBorderBottom.setVisibility(!mDeviceProvisionedController.isCurrentUserSetup() || + mActivityManager.getLockTaskModeState() != LOCK_TASK_MODE_NONE + ? VISIBLE : GONE); + } if (mSettingsView != null) { mSettingsView.setVisibility( mDeviceProvisionedController.isCurrentUserSetup() && - lockTaskModeState == LOCK_TASK_MODE_NONE ? VISIBLE : GONE); + lockTaskModeState == LOCK_TASK_MODE_NONE && isBluetoothA2dpConnected() ? VISIBLE : GONE); } if (mSettingsIcon != null) { mSettingsIcon.setOnClickListener(v -> { Events.writeEvent(Events.EVENT_SETTINGS_CLICK); - Intent intent = new Intent(Settings.Panel.ACTION_VOLUME); + final MediaController mediaController = getActiveLocalMediaController(); + String packageName = + mediaController != null + && !TextUtils.isEmpty(mediaController.getPackageName()) + ? mediaController.getPackageName() + : ""; + mMediaOutputDialogFactory.create(packageName, false, mDialogView); dismissH(DISMISS_REASON_SETTINGS_CLICKED); - mMediaOutputDialogFactory.dismiss(); - mActivityStarter.startActivity(intent, true /* dismissShade */); + }); + } + + if (mExpandRowsView != null) { + mExpandRowsView.setVisibility(mDeviceProvisionedController.isCurrentUserSetup() + && mActivityManager.getLockTaskModeState() == LOCK_TASK_MODE_NONE + ? VISIBLE : GONE); + } + if (mExpandRows != null) { + mExpandRows.setOnClickListener(v -> { + mExpanded = !mExpanded; + updateRowsH(mDefaultRow, true); + if (!mExpanded) { + rotateIcon(); + } else { + rotateIconReverse(); + } + }); + mExpandRows.setOnLongClickListener(new View.OnLongClickListener() { + @Override + public boolean onLongClick(View v) { + Intent intent = new Intent().setComponent(SOUND_SETTING_COMPONENT); + mMediaOutputDialogFactory.dismiss(); + dismissH(DISMISS_REASON_SETTINGS_CLICKED); + mActivityStarter.startActivity(intent, true /* dismissShade */); + return true; + } }); } } @@ -1308,6 +1577,10 @@ private void showH(int reason, boolean keyguardLocked, int lockTaskModeState) { mConfigChanged = false; } + if (mDefaultRow == null) { + mDefaultRow = getActiveRow(); + } + initSettingsH(lockTaskModeState); mShowing = true; mIsAnimatingDismiss = false; @@ -1352,6 +1625,10 @@ private int computeTimeoutH() { protected void dismissH(int reason) { Trace.beginSection("VolumeDialogImpl#dismissH"); + // Avoid multiple animation calls on touch spams. + if (!mShowing) { + return; + } if (D.BUG) { Log.d(TAG, "mDialog.dismiss() reason: " + Events.DISMISS_REASONS[reason] + " from: " + Debug.getCaller()); @@ -1377,15 +1654,20 @@ protected void dismissH(int reason) { .withEndAction(() -> mHandler.postDelayed(() -> { mDialog.dismiss(); tryToRemoveCaptionsTooltip(); + mExpanded = false; + mAnimatingRows = 0; + mDefaultRow = null; mIsAnimatingDismiss = false; hideRingerDrawer(); + mController.notifyVisible(false); }, 50)); - if (!shouldSlideInVolumeTray()) animator.translationX(mDialogView.getWidth() / 2.0f); - animator.setListener(getJankListener(getDialogView(), TYPE_DISMISS, - mDialogHideAnimationDurationMs)).start(); + if (!shouldSlideInVolumeTray()) { + animator.translationX(getTranslationForPanelLocation() * mDialogView.getWidth() / 2.0f); + animator.setListener(getJankListener(getDialogView(), TYPE_DISMISS, + mDialogHideAnimationDurationMs)).start(); + } checkODICaptionsTooltip(true); - mController.notifyVisible(false); synchronized (mSafetyWarningLock) { if (mSafetyWarning != null) { if (D.BUG) Log.d(TAG, "SafetyWarning dismissed"); @@ -1400,6 +1682,14 @@ private boolean showActiveStreamOnly() { || mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEVISION); } + private boolean isExpandableRowH(VolumeRow row) { + return row != null && row != mDefaultRow && !row.defaultStream + && (row.stream == STREAM_RING + || (row.stream == STREAM_NOTIFICATION && !mState.linkedNotification) + || row.stream == STREAM_ALARM + || row.stream == STREAM_MUSIC); + } + private boolean shouldBeVisibleH(VolumeRow row, VolumeRow activeRow) { boolean isActive = row.stream == activeRow.stream; @@ -1419,10 +1709,18 @@ private boolean shouldBeVisibleH(VolumeRow row, VolumeRow activeRow) { return true; } - if (row.defaultStream) { + if (mExpanded && isExpandableRowH(row)) { + return true; + } + + // if the row is the default stream or the row with which this panel was created, + // show it additonally to the active row if it is one of the following streams + if (row.defaultStream || mDefaultRow == row) { return activeRow.stream == STREAM_RING + || activeRow.stream == STREAM_NOTIFICATION || activeRow.stream == STREAM_ALARM || activeRow.stream == STREAM_VOICE_CALL + || activeRow.stream == STREAM_MUSIC || activeRow.stream == STREAM_ACCESSIBILITY || mDynamic.get(activeRow.stream); } @@ -1433,29 +1731,39 @@ private boolean shouldBeVisibleH(VolumeRow row, VolumeRow activeRow) { private void updateRowsH(final VolumeRow activeRow) { Trace.beginSection("VolumeDialogImpl#updateRowsH"); + updateRowsH(activeRow, false); + } + + private void updateRowsH(final VolumeRow activeRow, boolean animate) { if (D.BUG) Log.d(TAG, "updateRowsH"); if (!mShowing) { trimObsoleteH(); } + boolean isOutmostIndexMax = mVolumePanelOnLeft ? isRtl() : !isRtl(); + // Index of the last row that is actually visible. - int rightmostVisibleRowIndex = !isRtl() ? -1 : Short.MAX_VALUE; + int outmostVisibleRowIndex = isOutmostIndexMax ? -1 : Short.MAX_VALUE; // apply changes to all rows for (final VolumeRow row : mRows) { final boolean isActive = row == activeRow; + final boolean isExpandableRow = isExpandableRowH(row); final boolean shouldBeVisible = shouldBeVisibleH(row, activeRow); - Util.setVisOrGone(row.view, shouldBeVisible); - if (shouldBeVisible && mRingerAndDrawerContainerBackground != null) { - // For RTL, the rightmost row has the lowest index since child views are laid out + if (!isExpandableRow) { + Util.setVisOrGone(row.view, shouldBeVisible); + } else if (!mExpanded) { + row.view.setVisibility(View.INVISIBLE); + } + + if ((shouldBeVisible || isExpandableRow) + && mRingerAndDrawerContainerBackground != null) { + // For RTL, the outmost row has the lowest index since child views are laid out // from right to left. - rightmostVisibleRowIndex = - !isRtl() - ? Math.max(rightmostVisibleRowIndex, - mDialogRowsView.indexOfChild(row.view)) - : Math.min(rightmostVisibleRowIndex, - mDialogRowsView.indexOfChild(row.view)); + outmostVisibleRowIndex = isOutmostIndexMax + ? Math.max(outmostVisibleRowIndex, mDialogRowsView.indexOfChild(row.view)) + : Math.min(outmostVisibleRowIndex, mDialogRowsView.indexOfChild(row.view)); // Add spacing between each of the visible rows - we'll remove the spacing from the // last row after the loop. @@ -1463,12 +1771,13 @@ private void updateRowsH(final VolumeRow activeRow) { if (layoutParams instanceof LinearLayout.LayoutParams) { final LinearLayout.LayoutParams linearLayoutParams = ((LinearLayout.LayoutParams) layoutParams); - if (!isRtl()) { + if (isOutmostIndexMax) { linearLayoutParams.setMarginEnd(mRingerRowsPadding); } else { linearLayoutParams.setMarginStart(mRingerRowsPadding); } } + row.view.setLayoutParams(layoutParams); // Set the background on each of the rows. We'll remove this from the last row after // the loop, since the last row's background is drawn by the main volume container. @@ -1476,13 +1785,13 @@ private void updateRowsH(final VolumeRow activeRow) { mContext.getDrawable(R.drawable.volume_row_rounded_background)); } - if (row.view.isShown()) { + if (row.view.isShown() || isExpandableRow) { updateVolumeRowTintH(row, isActive); } } - if (rightmostVisibleRowIndex > -1 && rightmostVisibleRowIndex < Short.MAX_VALUE) { - final View lastVisibleChild = mDialogRowsView.getChildAt(rightmostVisibleRowIndex); + if (outmostVisibleRowIndex > -1 && outmostVisibleRowIndex < Short.MAX_VALUE) { + final View lastVisibleChild = mDialogRowsView.getChildAt(outmostVisibleRowIndex); final ViewGroup.LayoutParams layoutParams = lastVisibleChild.getLayoutParams(); // Remove the spacing on the last row, and remove its background since the container is // drawing a background for this row. @@ -1491,8 +1800,106 @@ private void updateRowsH(final VolumeRow activeRow) { ((LinearLayout.LayoutParams) layoutParams); linearLayoutParams.setMarginStart(0); linearLayoutParams.setMarginEnd(0); + lastVisibleChild.setLayoutParams(linearLayoutParams); lastVisibleChild.setBackgroundColor(Color.TRANSPARENT); } + + int elevationCount = 0; + if (animate) { + // Increase the elevation of the outmost row so that other rows animate behind it. + lastVisibleChild.setElevation(1f / ++elevationCount); + + // Add a solid background to the outmost row temporary so that other rows animate + // behind it + lastVisibleChild.setBackgroundDrawable( + mContext.getDrawable(R.drawable.volume_background)); + } + + int[] lastVisibleChildLocation = new int[2]; + lastVisibleChild.getLocationInWindow(lastVisibleChildLocation); + + // Track previous rows to calculate translations + int visibleRowsCount = 0; + int hiddenRowsCount = 0; + int rowWidth = mDialogWidth + mRingerRowsPadding; + + for (final VolumeRow row : mRows) { + final boolean isExpandableRow = isExpandableRowH(row); + final boolean shouldBeVisible = shouldBeVisibleH(row, activeRow); + + if (shouldBeVisible) { + visibleRowsCount++; + } else if (isExpandableRow) { + hiddenRowsCount++; + } + + // Only move rows that are either expandable or visible and not the default stream + if ((!isExpandableRow && !shouldBeVisible) || row.defaultStream) { + continue; + } + + // Cancel any ongoing animations + row.view.animate().cancel(); + + // Expandable rows need to animate behind the last visible row, an additional + // always visible stream animates next to the default stream + float translationX = getTranslationForPanelLocation() * hiddenRowsCount * rowWidth; + + if (animate) { + // If the translation is not set and the panel is expanding start the + // animation behind the main row + if (isExpandableRow && mExpanded && row.view.getTranslationX() == 0f) { + row.view.setTranslationX( + getTranslationForPanelLocation() * visibleRowsCount * rowWidth); + } + + // The elevation should decrease from the outmost row to the inner rows, so that + // every row animates behind the outer rows + row.view.setElevation(1f / ++elevationCount); + + row.view.setVisibility(View.VISIBLE); + + // Track how many rows are animating to avoid running animation end actions + // if there is still a row animating + mAnimatingRows++; + row.view.animate() + .translationX(translationX) + .setDuration(mExpanded ? mDialogShowAnimationDurationMs + : mDialogHideAnimationDurationMs) + .setInterpolator(mExpanded + ? new SystemUIInterpolators.LogDecelerateInterpolator() + : new SystemUIInterpolators.LogAccelerateInterpolator()) + .setListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationCancel(Animator animation) { + mAnimatingRows--; + animation.removeAllListeners(); + } + + @Override + public void onAnimationEnd(Animator animation) { + row.view.setElevation(0); + if (!shouldBeVisible) { + row.view.setVisibility(View.INVISIBLE); + } + mAnimatingRows--; + if (mAnimatingRows == 0) { + // Restore the elevation and background + lastVisibleChild.setElevation(0); + lastVisibleChild.setBackgroundColor(Color.TRANSPARENT); + // Set the active stream to ensure the volume keys change + // the volume of the tinted row. The tint was set before + // already, but setting the active row cancels ongoing + // animations. + mController.setActiveStream(activeRow.stream); + } + } + }); + } else { + row.view.setTranslationX(translationX); + row.view.setVisibility(shouldBeVisible ? View.VISIBLE : View.INVISIBLE); + } + } } updateBackgroundForDrawerClosedAmount(); @@ -1518,6 +1925,7 @@ protected void updateRingerH() { addAccessibilityDescription(mRingerIcon, RINGER_MODE_VIBRATE, mContext.getString(R.string.volume_ringer_hint_mute)); mRingerIcon.setTag(Events.ICON_STATE_VIBRATE); + pinNotifAndRingerToMin(); break; case AudioManager.RINGER_MODE_SILENT: mRingerIcon.setImageResource(R.drawable.ic_volume_ringer_mute); @@ -1525,6 +1933,7 @@ protected void updateRingerH() { mRingerIcon.setTag(Events.ICON_STATE_MUTE); addAccessibilityDescription(mRingerIcon, RINGER_MODE_SILENT, mContext.getString(R.string.volume_ringer_hint_unmute)); + pinNotifAndRingerToMin(); break; case AudioManager.RINGER_MODE_NORMAL: default: @@ -1535,6 +1944,7 @@ protected void updateRingerH() { addAccessibilityDescription(mRingerIcon, RINGER_MODE_NORMAL, mContext.getString(R.string.volume_ringer_hint_unmute)); mRingerIcon.setTag(Events.ICON_STATE_MUTE); + pinNotifAndRingerToMin(); } else { mRingerIcon.setImageResource(R.drawable.ic_volume_ringer); mSelectedRingerIcon.setImageResource(R.drawable.ic_volume_ringer); @@ -1546,12 +1956,46 @@ protected void updateRingerH() { mContext.getString(R.string.volume_ringer_hint_mute)); } mRingerIcon.setTag(Events.ICON_STATE_UNMUTE); + final VolumeRow ringer = findRow(STREAM_RING); + final VolumeRow notif = findRow(STREAM_NOTIFICATION); + if (ringer != null) { + Util.setText(ringer.header, Utils.formatPercentage(ss.level, ss.levelMax)); + } + if (notif != null) { + Util.setText(notif.header, Utils.formatPercentage(notif.ss.level, notif.ss.levelMax)); + } } break; } } } + private void pinNotifAndRingerToMin() { + final VolumeRow ringer = findRow(STREAM_RING); + final VolumeRow notif = findRow(STREAM_NOTIFICATION); + + if (ringer != null && ringer.ss.muted) { + final int ringerLevel = ringer.ss.levelMin * 100; + if (ringer.slider.getProgress() != ringerLevel) { + ringer.slider.setProgress(ringerLevel, true); + } else { + ringer.slider.setProgress(ringerLevel); + } + Util.setText(ringer.header, Utils.formatPercentage(ringer.ss.levelMin, + ringer.ss.levelMax)); + } + if (notif != null && notif.ss.muted) { + final int notifLevel = notif.ss.levelMin * 100; + if (notif.slider.getProgress() != notifLevel) { + notif.slider.setProgress(notifLevel, true); + } else { + notif.slider.setProgress(notifLevel); + } + Util.setText(notif.header, Utils.formatPercentage(notif.ss.levelMin, + notif.ss.levelMax)); + } + } + private void addAccessibilityDescription(View view, int currState, String hintLabel) { view.setContentDescription( mContext.getString(getStringDescriptionResourceForRingerMode(currState))); @@ -1606,16 +2050,20 @@ private void trimObsoleteH() { final VolumeRow row = mRows.get(i); if (row.ss == null || !row.ss.dynamic) continue; if (!mDynamic.get(row.stream)) { - mRows.remove(i); - mDialogRowsView.removeView(row.view); + removeRow(row); mConfigurableTexts.remove(row.header); } } } + private void removeRow(VolumeRow volumeRow) { + mRows.remove(volumeRow); + mDialogRowsView.removeView(volumeRow.view); + } + protected void onStateChangedH(State state) { if (D.BUG) Log.d(TAG, "onStateChangedH() state: " + state.toString()); - if (mState != null && state != null + if (mShowing && mState != null && state != null && mState.ringerModeInternal != -1 && mState.ringerModeInternal != state.ringerModeInternal && state.ringerModeInternal == AudioManager.RINGER_MODE_VIBRATE) { @@ -1636,6 +2084,10 @@ protected void onStateChangedH(State state) { } } + if (Util.isVoiceCapable(mContext)) { + updateNotificationRowH(); + } + if (mActiveStream != state.activeStream) { mPrevActiveStream = mActiveStream; mActiveStream = state.activeStream; @@ -1654,6 +2106,16 @@ CharSequence composeWindowTitle() { return mContext.getString(R.string.volume_dialog_title, getStreamLabelH(getActiveRow().ss)); } + private void updateNotificationRowH() { + VolumeRow notificationRow = findRow(AudioManager.STREAM_NOTIFICATION); + if (notificationRow != null && mState.linkedNotification) { + removeRow(notificationRow); + } else if (notificationRow == null && !mState.linkedNotification) { + addRow(AudioManager.STREAM_NOTIFICATION, R.drawable.ic_volume_notification, + R.drawable.ic_volume_notification_mute, true, false); + } + } + private void updateVolumeRowH(VolumeRow row) { if (D.BUG) Log.i(TAG, "updateVolumeRowH s=" + row.stream); if (mState == null) return; @@ -1671,19 +2133,22 @@ private void updateVolumeRowH(VolumeRow row) { final boolean isSystemStream = row.stream == AudioManager.STREAM_SYSTEM; final boolean isAlarmStream = row.stream == STREAM_ALARM; final boolean isMusicStream = row.stream == AudioManager.STREAM_MUSIC; - final boolean isRingVibrate = isRingStream - && mState.ringerModeInternal == AudioManager.RINGER_MODE_VIBRATE; + final boolean isNotificationStream = row.stream == AudioManager.STREAM_NOTIFICATION; + final boolean isVibrate = mState.ringerModeInternal == AudioManager.RINGER_MODE_VIBRATE; + final boolean isRingVibrate = isRingStream && isVibrate; final boolean isRingSilent = isRingStream && mState.ringerModeInternal == AudioManager.RINGER_MODE_SILENT; final boolean isZenPriorityOnly = mState.zenMode == Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS; final boolean isZenAlarms = mState.zenMode == Global.ZEN_MODE_ALARMS; final boolean isZenNone = mState.zenMode == Global.ZEN_MODE_NO_INTERRUPTIONS; - final boolean zenMuted = isZenAlarms ? (isRingStream || isSystemStream) - : isZenNone ? (isRingStream || isSystemStream || isAlarmStream || isMusicStream) + final boolean zenMuted = + isZenAlarms ? (isRingStream || isSystemStream || isNotificationStream) + : isZenNone ? (isRingStream || isSystemStream || isAlarmStream || isMusicStream || isNotificationStream) : isZenPriorityOnly ? ((isAlarmStream && mState.disallowAlarms) || (isMusicStream && mState.disallowMedia) || (isRingStream && mState.disallowRinger) || (isSystemStream && mState.disallowSystem)) + : isVibrate ? isNotificationStream : false; // update slider max @@ -1698,9 +2163,7 @@ private void updateVolumeRowH(VolumeRow row) { } // update header text - Util.setText(row.header, getStreamLabelH(ss)); - row.slider.setContentDescription(row.header.getText()); - mConfigurableTexts.add(row.header, ss.name); + row.slider.setContentDescription(getStreamLabelH(ss)); // update icon final boolean iconEnabled = (mAutomute || ss.muteSupported) && !zenMuted; @@ -1801,7 +2264,7 @@ private void updateVolumeRowTintH(VolumeRow row, boolean isActive) { } final ColorStateList colorTint = useActiveColoring ? Utils.getColorAccent(mContext) - : Utils.getColorAttr(mContext, com.android.internal.R.attr.colorAccentSecondary); + : Utils.getColorAttr(mContext, com.android.internal.R.attr.colorAccentPrimary); final int alpha = useActiveColoring ? Color.alpha(colorTint.getDefaultColor()) : getAlphaAttr(android.R.attr.secondaryContentAlpha); @@ -1852,7 +2315,7 @@ private void updateVolumeRowSliderH(VolumeRow row, boolean enable, int vlevel) { } } final int newProgress = vlevel * 100; - if (progress != newProgress) { + if (progress != newProgress && !row.ss.muted) { if (mShowing && rowVisible) { // animate! if (row.anim != null && row.anim.isRunning() @@ -1880,6 +2343,10 @@ private void updateVolumeRowSliderH(VolumeRow row, boolean enable, int vlevel) { row.slider.setProgress(newProgress, true); } } + + // update header text + Util.setText(row.header, Utils.formatPercentage((enable && !row.ss.muted) + ? vlevel : 0, row.ss.levelMax)); } private void recheckH(VolumeRow row) { @@ -1968,6 +2435,36 @@ private int getRingerDrawerOpenExtraSize() { return (mRingerCount - 1) * mRingerDrawerItemSize; } + /** + * Return the size of the additionally visible rows next to the default stream. + * An additional row is visible for example while receiving a voice call. + */ + private int getVisibleRowsExtraSize() { + VolumeRow activeRow = getActiveRow(); + int visibleRows = 0; + for (final VolumeRow row : mRows) { + if (shouldBeVisibleH(row, activeRow)) { + visibleRows++; + } + } + return (visibleRows - 1) * (mDialogWidth + mRingerRowsPadding); + } + + /** + * Return the size of invisible rows. + * Expandable rows are invisible while the panel is not expanded. + */ + private int getExpandableRowsExtraSize() { + VolumeRow activeRow = getActiveRow(); + int expandableRows = 0; + for (final VolumeRow row : mRows) { + if (isExpandableRowH(row)) { + expandableRows++; + } + } + return expandableRows * (mDialogWidth + mRingerRowsPadding); + } + private void updateBackgroundForDrawerClosedAmount() { if (mRingerAndDrawerContainerBackground == null) { return; @@ -1976,6 +2473,9 @@ private void updateBackgroundForDrawerClosedAmount() { final Rect bounds = mRingerAndDrawerContainerBackground.copyBounds(); if (!isLandscape()) { bounds.top = (int) (mRingerDrawerClosedAmount * getRingerDrawerOpenExtraSize()); + } else if (mVolumePanelOnLeft) { + bounds.right = (int) ((mDialogCornerRadius / 2) + mRingerDrawerItemSize + + (1f - mRingerDrawerClosedAmount) * getRingerDrawerOpenExtraSize()); } else { bounds.left = (int) (mRingerDrawerClosedAmount * getRingerDrawerOpenExtraSize()); } @@ -1983,7 +2483,7 @@ private void updateBackgroundForDrawerClosedAmount() { } /* - * The top container is responsible for drawing the solid color background behind the rightmost + * The top container is responsible for drawing the solid color background behind the outmost * (primary) volume row. This is because the volume drawer animates in from below, initially * overlapping the primary row. We need the drawer to draw below the row's SeekBar, since it * looks strange to overlap it, but above the row's background color, since otherwise it will be @@ -2017,8 +2517,9 @@ private void setTopContainerBackgroundDrawable() { ? mDialogRowsViewContainer.getTop() : mDialogRowsViewContainer.getTop() - mDialogCornerRadius); - // Set gravity to top-right, since additional rows will be added on the left. - background.setLayerGravity(0, Gravity.TOP | Gravity.RIGHT); + // Set gravity to top and opposite side where additional rows will be added. + background.setLayerGravity( + 0, mVolumePanelOnLeft ? Gravity.TOP | Gravity.LEFT : Gravity.TOP | Gravity.RIGHT); // In landscape, the ringer drawer animates out to the left (instead of down). Since the // drawer comes from the right (beyond the bounds of the dialog), we should clip it so it @@ -2174,15 +2675,50 @@ protected void onStop() { @Override public boolean onTouchEvent(@NonNull MotionEvent event) { if (mShowing) { - if (event.getAction() == MotionEvent.ACTION_OUTSIDE) { - dismissH(Events.DISMISS_REASON_TOUCH_OUTSIDE); - return true; + switch(event.getAction()){ + case MotionEvent.ACTION_OUTSIDE: + case MotionEvent.ACTION_DOWN: + // Touches inside won't trigger onTouchEvent + dismissH(Events.DISMISS_REASON_TOUCH_OUTSIDE); + return false; } } return false; } } + private void rotateIcon() { + rotateAnimation = new RotateAnimation(0, 180, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); + rotateAnimation.setDuration(400); + rotateAnimation.setFillAfter(true); + rotateAnimation.setInterpolator(new LinearInterpolator()); + mExpandRows.startAnimation(rotateAnimation); + } + + private void rotateIconReverse() { + rotateAnimation = new RotateAnimation(180, 0, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); + rotateAnimation.setDuration(400); + rotateAnimation.setFillAfter(true); + rotateAnimation.setInterpolator(new LinearInterpolator()); + mExpandRows.startAnimation(rotateAnimation); + } + + public boolean onLongClick(View v) { + if (v == mSettingsIcon) { + startSoundActivity(); + } + return false; + } + + private void startSoundActivity() { + dismissH(Events.DISMISS_REASON_TOUCH_OUTSIDE); + Intent nIntent = new Intent(Intent.ACTION_MAIN); + nIntent.setClassName("com.android.settings", + "com.android.settings.Settings$SoundSettingsActivity"); + mMediaOutputDialogFactory.dismiss(); + mActivityStarter.startActivity(nIntent, true /* dismissShade */); + } + private final class VolumeSeekBarChangeListener implements OnSeekBarChangeListener { private final VolumeRow mRow; @@ -2204,6 +2740,17 @@ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { } } final int userLevel = getImpliedLevel(seekBar, progress); + + if ((mRow.stream == STREAM_RING || mRow.stream == STREAM_NOTIFICATION)) { + if (mRow.ss.level > mRow.ss.levelMin && userLevel == 0) { + seekBar.setProgress((mRow.ss.levelMin + 1) * 100); + Util.setText(mRow.header, + Utils.formatPercentage(mRow.ss.levelMin + 1, mRow.ss.levelMax)); + return; + } + } + + Util.setText(mRow.header, Utils.formatPercentage(userLevel, mRow.ss.levelMax)); if (mRow.ss.level != userLevel || mRow.ss.muted && userLevel > 0) { mRow.userAttempt = SystemClock.uptimeMillis(); if (mRow.requestedLevel != userLevel) { diff --git a/packages/SystemUI/src/com/android/systemui/volume/dagger/VolumeModule.java b/packages/SystemUI/src/com/android/systemui/volume/dagger/VolumeModule.java index f3855bddfe48..8f62d297aa95 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/dagger/VolumeModule.java +++ b/packages/SystemUI/src/com/android/systemui/volume/dagger/VolumeModule.java @@ -27,6 +27,7 @@ import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; +import com.android.systemui.tuner.TunerService; import com.android.systemui.volume.VolumeComponent; import com.android.systemui.volume.VolumeDialogComponent; import com.android.systemui.volume.VolumeDialogImpl; @@ -53,6 +54,7 @@ static VolumeDialog provideVolumeDialog( ConfigurationController configurationController, MediaOutputDialogFactory mediaOutputDialogFactory, ActivityStarter activityStarter, + TunerService tunerService, InteractionJankMonitor interactionJankMonitor) { VolumeDialogImpl impl = new VolumeDialogImpl( context, @@ -62,6 +64,7 @@ static VolumeDialog provideVolumeDialog( configurationController, mediaOutputDialogFactory, activityStarter, + tunerService, interactionJankMonitor); impl.setStreamImportant(AudioManager.STREAM_SYSTEM, false); impl.setAutomute(true); diff --git a/packages/SystemUI/tests/Android.mk b/packages/SystemUI/tests/Android.mk index ff5165d4e7cf..8e6b65d0365f 100644 --- a/packages/SystemUI/tests/Android.mk +++ b/packages/SystemUI/tests/Android.mk @@ -42,6 +42,7 @@ LOCAL_JAVA_LIBRARIES := \ android.test.runner \ telephony-common \ android.test.base \ + ims-common LOCAL_AAPT_FLAGS := --extra-packages com.android.systemui diff --git a/packages/SystemUI/tests/src/com/android/systemui/animation/ActivityLaunchAnimatorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/animation/ActivityLaunchAnimatorTest.kt index d5df9fe0c2e8..c48cbb19b40a 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/animation/ActivityLaunchAnimatorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/animation/ActivityLaunchAnimatorTest.kt @@ -159,7 +159,7 @@ class ActivityLaunchAnimatorTest : SysuiTestCase() { @Test fun doesNotStartIfAnimationIsCancelled() { val runner = activityLaunchAnimator.createRunner(controller) - runner.onAnimationCancelled() + runner.onAnimationCancelled(false /* isKeyguardOccluded */) runner.onAnimationStart(0, emptyArray(), emptyArray(), emptyArray(), iCallback) waitForIdleSync() diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/MediaControlPanelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/MediaControlPanelTest.kt index 241ed2443e6c..6f4579bb14b5 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/media/MediaControlPanelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/media/MediaControlPanelTest.kt @@ -546,6 +546,19 @@ public class MediaControlPanelTest : SysuiTestCase() { verify(albumView).setLayerType(View.LAYER_TYPE_HARDWARE, null) } + @Test + fun bindAlbumView_artUsesResource() { + val albumArt = Icon.createWithResource(context, R.drawable.ic_android) + val state = mediaData.copy(artwork = albumArt) + + player.attachPlayer(viewHolder) + player.bindPlayer(state, PACKAGE) + bgExecutor.runAllReady() + mainExecutor.runAllReady() + + verify(albumView).setImageDrawable(any(Drawable::class.java)) + } + @Test fun bindAlbumView_setAfterExecutors() { val bmp = Bitmap.createBitmap(10, 10, Bitmap.Config.ARGB_8888) diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/dialog/MediaOutputAdapterTest.java b/packages/SystemUI/tests/src/com/android/systemui/media/dialog/MediaOutputAdapterTest.java index 11326e76b25e..c4cb8339c4d6 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/media/dialog/MediaOutputAdapterTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/media/dialog/MediaOutputAdapterTest.java @@ -19,6 +19,7 @@ import static com.google.common.truth.Truth.assertThat; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -51,6 +52,8 @@ public class MediaOutputAdapterTest extends SysuiTestCase { private static final String TEST_DEVICE_ID_1 = "test_device_id_1"; private static final String TEST_DEVICE_ID_2 = "test_device_id_2"; private static final String TEST_SESSION_NAME = "test_session_name"; + private static final int TEST_MAX_VOLUME = 20; + private static final int TEST_CURRENT_VOLUME = 10; // Mock private MediaOutputController mMediaOutputController = mock(MediaOutputController.class); @@ -64,12 +67,14 @@ public class MediaOutputAdapterTest extends SysuiTestCase { private MediaOutputAdapter mMediaOutputAdapter; private MediaOutputAdapter.MediaDeviceViewHolder mViewHolder; private List mMediaDevices = new ArrayList<>(); + MediaOutputSeekbar mSpyMediaOutputSeekbar; @Before public void setUp() { mMediaOutputAdapter = new MediaOutputAdapter(mMediaOutputController, mMediaOutputDialog); mViewHolder = (MediaOutputAdapter.MediaDeviceViewHolder) mMediaOutputAdapter .onCreateViewHolder(new LinearLayout(mContext), 0); + mSpyMediaOutputSeekbar = spy(mViewHolder.mSeekBar); when(mMediaOutputController.getMediaDevices()).thenReturn(mMediaDevices); when(mMediaOutputController.hasAdjustVolumeUserRestriction()).thenReturn(false); @@ -168,6 +173,16 @@ public void onBindViewHolder_bindConnectedDevice_verifyView() { assertThat(mViewHolder.mSeekBar.getVisibility()).isEqualTo(View.VISIBLE); } + @Test + public void onBindViewHolder_initSeekbar_setsVolume() { + when(mMediaDevice1.getMaxVolume()).thenReturn(TEST_MAX_VOLUME); + when(mMediaDevice1.getCurrentVolume()).thenReturn(TEST_CURRENT_VOLUME); + mMediaOutputAdapter.onBindViewHolder(mViewHolder, 0); + + assertThat(mViewHolder.mSeekBar.getVisibility()).isEqualTo(View.VISIBLE); + assertThat(mViewHolder.mSeekBar.getVolume()).isEqualTo(TEST_CURRENT_VOLUME); + } + @Test public void onBindViewHolder_bindNonActiveConnectedDevice_verifyView() { mMediaOutputAdapter.onBindViewHolder(mViewHolder, 1); @@ -259,4 +274,30 @@ public void onItemClick_clickDevice_verifyConnectDevice() { verify(mMediaOutputController).connectDevice(mMediaDevice2); } + + @Test + public void onItemClick_onGroupActionTriggered_verifySeekbarDisabled() { + when(mMediaOutputController.getSelectedMediaDevice()).thenReturn(mMediaDevices); + List selectableDevices = new ArrayList<>(); + selectableDevices.add(mMediaDevice1); + when(mMediaOutputController.getSelectableMediaDevice()).thenReturn(selectableDevices); + when(mMediaOutputController.hasAdjustVolumeUserRestriction()).thenReturn(true); + mMediaOutputAdapter.onBindViewHolder(mViewHolder, 0); + + mViewHolder.mContainerLayout.performClick(); + + assertThat(mViewHolder.mSeekBar.isEnabled()).isFalse(); + } + + @Test + public void onBindViewHolder_volumeControlChangeToEnabled_enableSeekbarAgain() { + when(mMediaOutputController.isVolumeControlEnabled(mMediaDevice1)).thenReturn(false); + mMediaOutputAdapter.onBindViewHolder(mViewHolder, 0); + assertThat(mViewHolder.mSeekBar.isEnabled()).isFalse(); + + when(mMediaOutputController.isVolumeControlEnabled(mMediaDevice1)).thenReturn(true); + mMediaOutputAdapter.onBindViewHolder(mViewHolder, 0); + + assertThat(mViewHolder.mSeekBar.isEnabled()).isTrue(); + } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSContainerImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/QSContainerImplTest.kt index 489c8c86028e..bf237abba8fa 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSContainerImplTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSContainerImplTest.kt @@ -57,6 +57,7 @@ class QSContainerImplTest : SysuiTestCase() { @Test fun testContainerBottomPadding() { + val originalPadding = qsPanelContainer.paddingBottom qsContainer.updateResources( qsPanelController, quickStatusBarHeaderController @@ -66,7 +67,7 @@ class QSContainerImplTest : SysuiTestCase() { anyInt(), anyInt(), anyInt(), - eq(mContext.resources.getDimensionPixelSize(R.dimen.footer_actions_height)) + eq(originalPadding) ) } } \ No newline at end of file diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java index 664af75a6529..32c66d25d4aa 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java @@ -32,8 +32,6 @@ import android.content.Context; import android.graphics.Rect; import android.os.Bundle; -import android.os.Handler; -import android.os.Looper; import android.testing.AndroidTestingRunner; import android.testing.TestableLooper.RunWithLooper; import android.view.LayoutInflater; @@ -42,36 +40,23 @@ import androidx.test.filters.SmallTest; -import com.android.internal.logging.UiEventLogger; import com.android.keyguard.BouncerPanelExpansionCalculator; import com.android.systemui.R; import com.android.systemui.SysuiBaseFragmentTest; import com.android.systemui.animation.ShadeInterpolation; -import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.dump.DumpManager; import com.android.systemui.media.MediaHost; import com.android.systemui.plugins.FalsingManager; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.qs.customize.QSCustomizerController; import com.android.systemui.qs.dagger.QSFragmentComponent; -import com.android.systemui.qs.external.CustomTileStatePersister; -import com.android.systemui.qs.external.TileLifecycleManager; import com.android.systemui.qs.external.TileServiceRequestController; -import com.android.systemui.qs.logging.QSLogger; -import com.android.systemui.qs.tileimpl.QSFactoryImpl; -import com.android.systemui.settings.UserTracker; -import com.android.systemui.shared.plugins.PluginManager; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.StatusBarState; -import com.android.systemui.statusbar.phone.AutoTileManager; -import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.KeyguardBypassController; -import com.android.systemui.statusbar.phone.StatusBarIconController; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler; -import com.android.systemui.tuner.TunerService; import com.android.systemui.util.animation.UniqueObjectHostView; -import com.android.systemui.util.settings.SecureSettings; import org.junit.Before; import org.junit.Test; @@ -79,8 +64,6 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import java.util.Optional; - @RunWith(AndroidTestingRunner.class) @RunWithLooper(setAsMainLooper = true) @SmallTest @@ -125,34 +108,11 @@ public void testListening() { mFragments.dispatchResume(); processAllMessages(); - QSTileHost host = - new QSTileHost( - mContext, - mock(StatusBarIconController.class), - mock(QSFactoryImpl.class), - new Handler(), - Looper.myLooper(), - mock(PluginManager.class), - mock(TunerService.class), - () -> mock(AutoTileManager.class), - mock(DumpManager.class), - mock(BroadcastDispatcher.class), - Optional.of(mock(CentralSurfaces.class)), - mock(QSLogger.class), - mock(UiEventLogger.class), - mock(UserTracker.class), - mock(SecureSettings.class), - mock(CustomTileStatePersister.class), - mTileServiceRequestControllerBuilder, - mock(TileLifecycleManager.Factory.class)); - qs.setListening(true); processAllMessages(); qs.setListening(false); processAllMessages(); - host.destroy(); - processAllMessages(); } @Test diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelTest.kt index 60cfd7249919..b98be75a51c7 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelTest.kt @@ -150,6 +150,14 @@ class QSPanelTest : SysuiTestCase() { assertThat(footer.isVisibleToUser).isTrue() } + @Test + fun testBottomPadding() { + val padding = 10 + context.orCreateTestableResources.addOverride(R.dimen.qs_panel_padding_bottom, padding) + qsPanel.updatePadding() + assertThat(qsPanel.paddingBottom).isEqualTo(padding) + } + private infix fun View.isLeftOf(other: View): Boolean { val rect = Rect() getBoundsOnScreen(rect) diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java index 8cf3fe274848..7dbc561fbfc1 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java @@ -32,12 +32,11 @@ import android.content.ComponentName; import android.content.Context; import android.content.Intent; +import android.database.ContentObserver; import android.os.Handler; import android.os.Looper; import android.os.UserHandle; import android.testing.AndroidTestingRunner; -import android.testing.TestableLooper; -import android.testing.TestableLooper.RunWithLooper; import android.view.View; import androidx.annotation.Nullable; @@ -48,7 +47,6 @@ import com.android.internal.util.CollectionUtils; import com.android.systemui.R; import com.android.systemui.SysuiTestCase; -import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.classifier.FalsingManagerFake; import com.android.systemui.dump.DumpManager; import com.android.systemui.plugins.ActivityStarter; @@ -68,8 +66,10 @@ import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.StatusBarIconController; import com.android.systemui.tuner.TunerService; +import com.android.systemui.util.concurrency.FakeExecutor; import com.android.systemui.util.settings.FakeSettings; import com.android.systemui.util.settings.SecureSettings; +import com.android.systemui.util.time.FakeSystemClock; import org.junit.Before; import org.junit.Test; @@ -81,18 +81,19 @@ import java.io.StringWriter; import java.util.List; import java.util.Optional; +import java.util.concurrent.Executor; import javax.inject.Provider; @RunWith(AndroidTestingRunner.class) @SmallTest -@RunWithLooper(setAsMainLooper = true) public class QSTileHostTest extends SysuiTestCase { private static String MOCK_STATE_STRING = "MockState"; private static ComponentName CUSTOM_TILE = ComponentName.unflattenFromString("TEST_PKG/.TEST_CLS"); private static final String CUSTOM_TILE_SPEC = CustomTile.toSpec(CUSTOM_TILE); + private static final String SETTING = QSTileHost.TILES_SETTING; @Mock private StatusBarIconController mIconController; @@ -107,8 +108,6 @@ public class QSTileHostTest extends SysuiTestCase { @Mock private DumpManager mDumpManager; @Mock - private BroadcastDispatcher mBroadcastDispatcher; - @Mock private QSTile.State mMockState; @Mock private CentralSurfaces mCentralSurfaces; @@ -132,31 +131,47 @@ public class QSTileHostTest extends SysuiTestCase { @Mock private TileLifecycleManager mTileLifecycleManager; - private Handler mHandler; - private TestableLooper mLooper; + private FakeExecutor mMainExecutor; + private QSTileHost mQSTileHost; @Before public void setUp() { MockitoAnnotations.initMocks(this); - mLooper = TestableLooper.get(this); - mHandler = new Handler(mLooper.getLooper()); + mMainExecutor = new FakeExecutor(new FakeSystemClock()); + when(mTileServiceRequestControllerBuilder.create(any())) .thenReturn(mTileServiceRequestController); when(mTileLifecycleManagerFactory.create(any(Intent.class), any(UserHandle.class))) .thenReturn(mTileLifecycleManager); mSecureSettings = new FakeSettings(); - mSecureSettings.putStringForUser( - QSTileHost.TILES_SETTING, "", "", false, mUserTracker.getUserId(), false); - mQSTileHost = new TestQSTileHost(mContext, mIconController, mDefaultFactory, mHandler, - mLooper.getLooper(), mPluginManager, mTunerService, mAutoTiles, mDumpManager, - mBroadcastDispatcher, mCentralSurfaces, mQSLogger, mUiEventLogger, mUserTracker, - mSecureSettings, mCustomTileStatePersister, mTileServiceRequestControllerBuilder, - mTileLifecycleManagerFactory); + saveSetting(""); + mQSTileHost = new TestQSTileHost(mContext, mIconController, mDefaultFactory, mMainExecutor, + mPluginManager, mTunerService, mAutoTiles, mDumpManager, mCentralSurfaces, + mQSLogger, mUiEventLogger, mUserTracker, mSecureSettings, mCustomTileStatePersister, + mTileServiceRequestControllerBuilder, mTileLifecycleManagerFactory); + + mSecureSettings.registerContentObserverForUser(SETTING, new ContentObserver(null) { + @Override + public void onChange(boolean selfChange) { + super.onChange(selfChange); + mMainExecutor.execute(() -> mQSTileHost.onTuningChanged(SETTING, getSetting())); + mMainExecutor.runAllReady(); + } + }, mUserTracker.getUserId()); setUpTileFactory(); } + private void saveSetting(String value) { + mSecureSettings.putStringForUser( + SETTING, value, "", false, mUserTracker.getUserId(), false); + } + + private String getSetting() { + return mSecureSettings.getStringForUser(SETTING, mUserTracker.getUserId()); + } + private void setUpTileFactory() { when(mMockState.toString()).thenReturn(MOCK_STATE_STRING); // Only create this kind of tiles @@ -173,6 +188,10 @@ private void setUpTileFactory() { return new NotAvailableTile(mQSTileHost); } else if (CUSTOM_TILE_SPEC.equals(spec)) { return mCustomTile; + } else if ("internet".equals(spec) + || "wifi".equals(spec) + || "cell".equals(spec)) { + return new TestTile1(mQSTileHost); } else { return null; } @@ -196,14 +215,14 @@ public void testLoadTileSpecs_nullSetting() { public void testInvalidSpecUsesDefault() { mContext.getOrCreateTestableResources() .addOverride(R.string.quick_settings_tiles, "spec1,spec2"); - mQSTileHost.onTuningChanged(QSTileHost.TILES_SETTING, "not-valid"); + saveSetting("not-valid"); assertEquals(2, mQSTileHost.getTiles().size()); } @Test public void testRemoveWifiAndCellularWithoutInternet() { - mQSTileHost.onTuningChanged(QSTileHost.TILES_SETTING, "wifi, spec1, cell, spec2"); + saveSetting("wifi, spec1, cell, spec2"); assertEquals("internet", mQSTileHost.mTileSpecs.get(0)); assertEquals("spec1", mQSTileHost.mTileSpecs.get(1)); @@ -212,7 +231,7 @@ public void testRemoveWifiAndCellularWithoutInternet() { @Test public void testRemoveWifiAndCellularWithInternet() { - mQSTileHost.onTuningChanged(QSTileHost.TILES_SETTING, "wifi, spec1, cell, spec2, internet"); + saveSetting("wifi, spec1, cell, spec2, internet"); assertEquals("spec1", mQSTileHost.mTileSpecs.get(0)); assertEquals("spec2", mQSTileHost.mTileSpecs.get(1)); @@ -221,7 +240,7 @@ public void testRemoveWifiAndCellularWithInternet() { @Test public void testRemoveWifiWithoutInternet() { - mQSTileHost.onTuningChanged(QSTileHost.TILES_SETTING, "spec1, wifi, spec2"); + saveSetting("spec1, wifi, spec2"); assertEquals("spec1", mQSTileHost.mTileSpecs.get(0)); assertEquals("internet", mQSTileHost.mTileSpecs.get(1)); @@ -230,7 +249,7 @@ public void testRemoveWifiWithoutInternet() { @Test public void testRemoveCellWithInternet() { - mQSTileHost.onTuningChanged(QSTileHost.TILES_SETTING, "spec1, spec2, cell, internet"); + saveSetting("spec1, spec2, cell, internet"); assertEquals("spec1", mQSTileHost.mTileSpecs.get(0)); assertEquals("spec2", mQSTileHost.mTileSpecs.get(1)); @@ -239,7 +258,7 @@ public void testRemoveCellWithInternet() { @Test public void testNoWifiNoCellularNoInternet() { - mQSTileHost.onTuningChanged(QSTileHost.TILES_SETTING, "spec1,spec2"); + saveSetting("spec1,spec2"); assertEquals("spec1", mQSTileHost.mTileSpecs.get(0)); assertEquals("spec2", mQSTileHost.mTileSpecs.get(1)); @@ -249,7 +268,7 @@ public void testNoWifiNoCellularNoInternet() { public void testSpecWithInvalidDoesNotUseDefault() { mContext.getOrCreateTestableResources() .addOverride(R.string.quick_settings_tiles, "spec1,spec2"); - mQSTileHost.onTuningChanged(QSTileHost.TILES_SETTING, "spec2,not-valid"); + saveSetting("spec2,not-valid"); assertEquals(1, mQSTileHost.getTiles().size()); QSTile element = CollectionUtils.firstOrNull(mQSTileHost.getTiles()); @@ -258,7 +277,7 @@ public void testSpecWithInvalidDoesNotUseDefault() { @Test public void testDump() { - mQSTileHost.onTuningChanged(QSTileHost.TILES_SETTING, "spec1,spec2"); + saveSetting("spec1,spec2"); StringWriter w = new StringWriter(); PrintWriter pw = new PrintWriter(w); mQSTileHost.dump(pw, new String[]{}); @@ -274,7 +293,7 @@ public void testDump() { public void testDefault() { mContext.getOrCreateTestableResources() .addOverride(R.string.quick_settings_tiles_default, "spec1"); - mQSTileHost.onTuningChanged(QSTileHost.TILES_SETTING, "default"); + saveSetting("default"); assertEquals(1, mQSTileHost.getTiles().size()); QSTile element = CollectionUtils.firstOrNull(mQSTileHost.getTiles()); assertTrue(element instanceof TestTile1); @@ -285,7 +304,7 @@ public void testDefault() { public void testNoRepeatedSpecs_addTile() { mContext.getOrCreateTestableResources() .addOverride(R.string.quick_settings_tiles, "spec1,spec2"); - mQSTileHost.onTuningChanged(QSTileHost.TILES_SETTING, "spec1,spec2"); + saveSetting("spec1,spec2"); mQSTileHost.addTile("spec1"); @@ -298,9 +317,10 @@ public void testNoRepeatedSpecs_addTile() { public void testAddTileAtValidPosition() { mContext.getOrCreateTestableResources() .addOverride(R.string.quick_settings_tiles, "spec1,spec3"); - mQSTileHost.onTuningChanged(QSTileHost.TILES_SETTING, "spec1,spec3"); + saveSetting("spec1,spec3"); mQSTileHost.addTile("spec2", 1); + mMainExecutor.runAllReady(); assertEquals(3, mQSTileHost.mTileSpecs.size()); assertEquals("spec1", mQSTileHost.mTileSpecs.get(0)); @@ -312,9 +332,10 @@ public void testAddTileAtValidPosition() { public void testAddTileAtInvalidPositionAddsToEnd() { mContext.getOrCreateTestableResources() .addOverride(R.string.quick_settings_tiles, "spec1,spec3"); - mQSTileHost.onTuningChanged(QSTileHost.TILES_SETTING, "spec1,spec3"); + saveSetting("spec1,spec3"); mQSTileHost.addTile("spec2", 100); + mMainExecutor.runAllReady(); assertEquals(3, mQSTileHost.mTileSpecs.size()); assertEquals("spec1", mQSTileHost.mTileSpecs.get(0)); @@ -326,9 +347,10 @@ public void testAddTileAtInvalidPositionAddsToEnd() { public void testAddTileAtEnd() { mContext.getOrCreateTestableResources() .addOverride(R.string.quick_settings_tiles, "spec1,spec3"); - mQSTileHost.onTuningChanged(QSTileHost.TILES_SETTING, "spec1,spec3"); + saveSetting("spec1,spec3"); mQSTileHost.addTile("spec2", QSTileHost.POSITION_AT_END); + mMainExecutor.runAllReady(); assertEquals(3, mQSTileHost.mTileSpecs.size()); assertEquals("spec1", mQSTileHost.mTileSpecs.get(0)); @@ -338,9 +360,10 @@ public void testAddTileAtEnd() { @Test public void testNoRepeatedSpecs_customTile() { - mQSTileHost.onTuningChanged(QSTileHost.TILES_SETTING, CUSTOM_TILE_SPEC); + saveSetting(CUSTOM_TILE_SPEC); mQSTileHost.addTile(CUSTOM_TILE, /* end */ false); + mMainExecutor.runAllReady(); assertEquals(1, mQSTileHost.mTileSpecs.size()); assertEquals(CUSTOM_TILE_SPEC, mQSTileHost.mTileSpecs.get(0)); @@ -348,9 +371,10 @@ public void testNoRepeatedSpecs_customTile() { @Test public void testAddedAtBeginningOnDefault_customTile() { - mQSTileHost.onTuningChanged(QSTileHost.TILES_SETTING, "spec1"); // seed + saveSetting("spec1"); // seed mQSTileHost.addTile(CUSTOM_TILE); + mMainExecutor.runAllReady(); assertEquals(2, mQSTileHost.mTileSpecs.size()); assertEquals(CUSTOM_TILE_SPEC, mQSTileHost.mTileSpecs.get(0)); @@ -358,9 +382,10 @@ public void testAddedAtBeginningOnDefault_customTile() { @Test public void testAddedAtBeginning_customTile() { - mQSTileHost.onTuningChanged(QSTileHost.TILES_SETTING, "spec1"); // seed + saveSetting("spec1"); // seed mQSTileHost.addTile(CUSTOM_TILE, /* end */ false); + mMainExecutor.runAllReady(); assertEquals(2, mQSTileHost.mTileSpecs.size()); assertEquals(CUSTOM_TILE_SPEC, mQSTileHost.mTileSpecs.get(0)); @@ -368,9 +393,10 @@ public void testAddedAtBeginning_customTile() { @Test public void testAddedAtEnd_customTile() { - mQSTileHost.onTuningChanged(QSTileHost.TILES_SETTING, "spec1"); // seed + saveSetting("spec1"); // seed mQSTileHost.addTile(CUSTOM_TILE, /* end */ true); + mMainExecutor.runAllReady(); assertEquals(2, mQSTileHost.mTileSpecs.size()); assertEquals(CUSTOM_TILE_SPEC, mQSTileHost.mTileSpecs.get(1)); @@ -409,13 +435,13 @@ public void testLoadTileSpec_repeatedDefaultAndSetting() { @Test public void testNotAvailableTile_specNotNull() { - mQSTileHost.onTuningChanged(QSTileHost.TILES_SETTING, "na"); + saveSetting("na"); verify(mQSLogger, never()).logTileDestroyed(isNull(), anyString()); } @Test public void testCustomTileRemoved_stateDeleted() { - mQSTileHost.changeTiles(List.of(CUSTOM_TILE_SPEC), List.of()); + mQSTileHost.changeTilesByUser(List.of(CUSTOM_TILE_SPEC), List.of()); verify(mCustomTileStatePersister) .removeState(new TileServiceKey(CUSTOM_TILE, mQSTileHost.getUserId())); @@ -423,29 +449,99 @@ public void testCustomTileRemoved_stateDeleted() { @Test public void testRemoveTiles() { - List tiles = List.of("spec1", "spec2", "spec3"); - mQSTileHost.saveTilesToSettings(tiles); + saveSetting("spec1,spec2,spec3"); mQSTileHost.removeTiles(List.of("spec1", "spec2")); + mMainExecutor.runAllReady(); assertEquals(List.of("spec3"), mQSTileHost.mTileSpecs); } + @Test + public void testTilesRemovedInQuickSuccession() { + saveSetting("spec1,spec2,spec3"); + mQSTileHost.removeTile("spec1"); + mQSTileHost.removeTile("spec3"); + + mMainExecutor.runAllReady(); + assertEquals(List.of("spec2"), mQSTileHost.mTileSpecs); + assertEquals("spec2", getSetting()); + } + + @Test + public void testAddTileInMainThread() { + saveSetting("spec1,spec2"); + + mQSTileHost.addTile("spec3"); + assertEquals(List.of("spec1", "spec2"), mQSTileHost.mTileSpecs); + + mMainExecutor.runAllReady(); + assertEquals(List.of("spec1", "spec2", "spec3"), mQSTileHost.mTileSpecs); + } + + @Test + public void testRemoveTileInMainThread() { + saveSetting("spec1,spec2"); + + mQSTileHost.removeTile("spec1"); + assertEquals(List.of("spec1", "spec2"), mQSTileHost.mTileSpecs); + + mMainExecutor.runAllReady(); + assertEquals(List.of("spec2"), mQSTileHost.mTileSpecs); + } + + @Test + public void testRemoveTilesInMainThread() { + saveSetting("spec1,spec2,spec3"); + + mQSTileHost.removeTiles(List.of("spec3", "spec1")); + assertEquals(List.of("spec1", "spec2", "spec3"), mQSTileHost.mTileSpecs); + + mMainExecutor.runAllReady(); + assertEquals(List.of("spec2"), mQSTileHost.mTileSpecs); + } + + @Test + public void testRemoveTileByUserInMainThread() { + saveSetting("spec1," + CUSTOM_TILE_SPEC); + + mQSTileHost.removeTileByUser(CUSTOM_TILE); + assertEquals(List.of("spec1", CUSTOM_TILE_SPEC), mQSTileHost.mTileSpecs); + + mMainExecutor.runAllReady(); + assertEquals(List.of("spec1"), mQSTileHost.mTileSpecs); + } + + @Test + public void testNonValidTileNotStoredInSettings() { + saveSetting("spec1,not-valid"); + + assertEquals(List.of("spec1"), mQSTileHost.mTileSpecs); + assertEquals("spec1", getSetting()); + } + + @Test + public void testNotAvailableTileNotStoredInSettings() { + saveSetting("spec1,na"); + + assertEquals(List.of("spec1"), mQSTileHost.mTileSpecs); + assertEquals("spec1", getSetting()); + } + private class TestQSTileHost extends QSTileHost { TestQSTileHost(Context context, StatusBarIconController iconController, - QSFactory defaultFactory, Handler mainHandler, Looper bgLooper, + QSFactory defaultFactory, Executor mainExecutor, PluginManager pluginManager, TunerService tunerService, Provider autoTiles, DumpManager dumpManager, - BroadcastDispatcher broadcastDispatcher, CentralSurfaces centralSurfaces, - QSLogger qsLogger, UiEventLogger uiEventLogger, UserTracker userTracker, - SecureSettings secureSettings, CustomTileStatePersister customTileStatePersister, + CentralSurfaces centralSurfaces, QSLogger qsLogger, UiEventLogger uiEventLogger, + UserTracker userTracker, SecureSettings secureSettings, + CustomTileStatePersister customTileStatePersister, TileServiceRequestController.Builder tileServiceRequestControllerBuilder, TileLifecycleManager.Factory tileLifecycleManagerFactory) { - super(context, iconController, defaultFactory, mainHandler, bgLooper, pluginManager, - tunerService, autoTiles, dumpManager, broadcastDispatcher, - Optional.of(centralSurfaces), qsLogger, uiEventLogger, userTracker, - secureSettings, customTileStatePersister, tileServiceRequestControllerBuilder, - tileLifecycleManagerFactory); + super(context, iconController, defaultFactory, mainExecutor, pluginManager, + tunerService, autoTiles, dumpManager, Optional.of(centralSurfaces), qsLogger, + uiEventLogger, userTracker, secureSettings, customTileStatePersister, + tileServiceRequestControllerBuilder, tileLifecycleManagerFactory); } @Override @@ -455,25 +551,16 @@ public void onPluginConnected(QSFactory plugin, Context pluginContext) { @Override public void onPluginDisconnected(QSFactory plugin) { } - - @Override - void saveTilesToSettings(List tileSpecs) { - super.saveTilesToSettings(tileSpecs); - // After tiles are changed, make sure to call onTuningChanged with the new setting if it - // changed - String specs = mSecureSettings.getStringForUser( - QSTileHost.TILES_SETTING, mUserTracker.getUserId()); - onTuningChanged(TILES_SETTING, specs); - } } + private class TestTile extends QSTileImpl { protected TestTile(QSHost host) { super( host, - mLooper.getLooper(), - new Handler(mLooper.getLooper()), + mock(Looper.class), + mock(Handler.class), new FalsingManagerFake(), mock(MetricsLogger.class), mock(StatusBarStateController.class), diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QuickQSPanelControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/QuickQSPanelControllerTest.kt index 1f28210acc64..a07a327ffeee 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/QuickQSPanelControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QuickQSPanelControllerTest.kt @@ -68,6 +68,8 @@ class QuickQSPanelControllerTest : SysuiTestCase() { private lateinit var tileLayout: TileLayout @Mock private lateinit var tileView: QSTileView + @Mock + private lateinit var quickQsBrightnessController: QuickQSBrightnessController @Captor private lateinit var captor: ArgumentCaptor @@ -93,7 +95,8 @@ class QuickQSPanelControllerTest : SysuiTestCase() { metricsLogger, uiEventLogger, qsLogger, - dumpManager + dumpManager, + quickQsBrightnessController ) controller.init() @@ -139,6 +142,11 @@ class QuickQSPanelControllerTest : SysuiTestCase() { verify(mediaHost).expansion = MediaHostState.COLLAPSED } + @Test + fun testBrightnessVisibilityRefreshedWhenConfigurationChanged() { + verify(quickQsBrightnessController).refreshVisibility(anyBoolean()) + } + class TestQuickQSPanelController( view: QuickQSPanel, qsTileHost: QSTileHost, diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QuickStatusBarHeaderControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/QuickStatusBarHeaderControllerTest.kt index 07c8af953d1e..bed8bbca4cad 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/QuickStatusBarHeaderControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QuickStatusBarHeaderControllerTest.kt @@ -23,7 +23,6 @@ import androidx.test.filters.SmallTest import com.android.systemui.R import com.android.systemui.SysuiTestCase import com.android.systemui.battery.BatteryMeterViewController -import com.android.systemui.colorextraction.SysuiColorExtractor import com.android.systemui.demomode.DemoModeController import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags @@ -71,8 +70,6 @@ class QuickStatusBarHeaderControllerTest : SysuiTestCase() { @Mock private lateinit var qsCarrierGroupController: QSCarrierGroupController @Mock - private lateinit var colorExtractor: SysuiColorExtractor - @Mock private lateinit var iconContainer: StatusIconContainer @Mock private lateinit var qsCarrierGroup: QSCarrierGroup @@ -118,7 +115,6 @@ class QuickStatusBarHeaderControllerTest : SysuiTestCase() { demoModeController, quickQSPanelController, qsCarrierGroupControllerBuilder, - colorExtractor, qsExpansionPathInterpolator, featureFlags, variableDateViewControllerFactory, diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/customize/TileAdapterTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/customize/TileAdapterTest.java index 3d53062d7d02..d42cbe3b698a 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/customize/TileAdapterTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/customize/TileAdapterTest.java @@ -55,6 +55,6 @@ public void setup() throws Exception { @Test public void testResetNotifiesHost() { mTileAdapter.resetTileSpecs(Collections.emptyList()); - verify(mQSTileHost).changeTiles(any(), any()); + verify(mQSTileHost).changeTilesByUser(any(), any()); } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServicesTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServicesTest.java index 6b7e5b9335f2..471ddfd3f224 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServicesTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServicesTest.java @@ -29,6 +29,7 @@ import android.content.ComponentName; import android.content.Intent; import android.os.Handler; +import android.os.HandlerExecutor; import android.os.RemoteException; import android.os.UserHandle; import android.service.quicksettings.IQSTileService; @@ -65,6 +66,7 @@ import java.util.ArrayList; import java.util.Optional; +import java.util.concurrent.Executor; import javax.inject.Provider; @@ -130,17 +132,16 @@ public void setUp() throws Exception { .thenReturn(mTileLifecycleManager); Provider provider = () -> new Handler(mTestableLooper.getLooper()); + Executor executor = new HandlerExecutor(provider.get()); QSTileHost host = new QSTileHost(mContext, mStatusBarIconController, mQSFactory, - provider.get(), - mTestableLooper.getLooper(), + executor, mPluginManager, mTunerService, () -> mAutoTileManager, mDumpManager, - mock(BroadcastDispatcher.class), Optional.of(mCentralSurfaces), mQSLogger, mUiEventLogger, diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenshot/ImageExporterTest.java b/packages/SystemUI/tests/src/com/android/systemui/screenshot/ImageExporterTest.java index 7d563399ee1c..b2f19904d8ba 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/screenshot/ImageExporterTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/screenshot/ImageExporterTest.java @@ -70,7 +70,7 @@ public class ImageExporterTest extends SysuiTestCase { @Test public void testImageFilename() { assertEquals("image file name", "Screenshot_20201215-131500.png", - ImageExporter.createFilename(CAPTURE_TIME, CompressFormat.PNG)); + ImageExporter.createFilename(CAPTURE_TIME, CompressFormat.PNG, null)); } @Test @@ -97,7 +97,7 @@ public void testImageExport() throws ExecutionException, InterruptedException, I Bitmap original = createCheckerBitmap(10, 10, 10); ListenableFuture direct = - exporter.export(DIRECT_EXECUTOR, requestId, original, CAPTURE_TIME); + exporter.export(DIRECT_EXECUTOR, requestId, original, CAPTURE_TIME, null); assertTrue("future should be done", direct.isDone()); assertFalse("future should not be canceled", direct.isCancelled()); ImageExporter.Result result = direct.get(); @@ -150,7 +150,7 @@ public void testImageExport() throws ExecutionException, InterruptedException, I @Test public void testMediaStoreMetadata() { - String name = ImageExporter.createFilename(CAPTURE_TIME, CompressFormat.PNG); + String name = ImageExporter.createFilename(CAPTURE_TIME, CompressFormat.PNG, null); ContentValues values = ImageExporter.createMetadata(CAPTURE_TIME, CompressFormat.PNG, name); assertEquals("Pictures/Screenshots", values.getAsString(MediaStore.MediaColumns.RELATIVE_PATH)); diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenshot/ScreenshotNotificationSmartActionsTest.java b/packages/SystemUI/tests/src/com/android/systemui/screenshot/ScreenshotNotificationSmartActionsTest.java index 3d658ec8e811..ceaea587aa21 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/screenshot/ScreenshotNotificationSmartActionsTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/screenshot/ScreenshotNotificationSmartActionsTest.java @@ -169,6 +169,34 @@ public void testSupportedBitmapConfiguration() assertEquals(smartActions.size(), 0); } + // Tests for view action extras + @Test + public void testViewActionExtras() { + if (Looper.myLooper() == null) { + Looper.prepare(); + } + + ScreenshotController.SaveImageInBackgroundData + data = new ScreenshotController.SaveImageInBackgroundData(); + data.image = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888); + data.finisher = null; + data.mActionsReadyListener = null; + SaveImageInBackgroundTask task = + new SaveImageInBackgroundTask(mContext, null, mScreenshotSmartActions, data, + ActionTransition::new); + + Notification.Action viewAction = task.createViewAction(mContext, mContext.getResources(), + Uri.parse("Screenshot_123.png")).get().action; + + Intent intent = viewAction.actionIntent.getIntent(); + assertNotNull(intent); + Bundle bundle = intent.getExtras(); + assertTrue(bundle.containsKey(ScreenshotController.EXTRA_ID)); + assertTrue(bundle.containsKey(ScreenshotController.EXTRA_SMART_ACTIONS_ENABLED)); + assertEquals(ScreenshotController.ACTION_TYPE_VIEW, viewAction.title); + assertEquals(Intent.ACTION_VIEW, intent.getAction()); + } + // Tests for share action extras @Test public void testShareActionExtras() { diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerTest.java index 7687d1204541..dd2b66765fae 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerTest.java @@ -29,7 +29,9 @@ import static junit.framework.Assert.assertTrue; import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.clearInvocations; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -59,6 +61,7 @@ import com.android.systemui.dump.DumpManager; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.statusbar.NotificationLockscreenUserManager.KeyguardNotificationSuppressor; +import com.android.systemui.statusbar.NotificationLockscreenUserManager.NotificationStateChangedListener; import com.android.systemui.statusbar.notification.NotificationEntryManager; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder; @@ -324,6 +327,38 @@ public void testIsLockscreenPublicMode() { assertTrue(mLockscreenUserManager.isLockscreenPublicMode(mCurrentUser.id)); } + @Test + public void testUpdateIsPublicMode() { + when(mKeyguardStateController.isMethodSecure()).thenReturn(true); + + NotificationStateChangedListener listener = mock(NotificationStateChangedListener.class); + mLockscreenUserManager.addNotificationStateChangedListener(listener); + mLockscreenUserManager.mCurrentProfiles.append(0, mock(UserInfo.class)); + + // first call explicitly sets user 0 to not public; notifies + mLockscreenUserManager.updatePublicMode(); + assertFalse(mLockscreenUserManager.isLockscreenPublicMode(0)); + verify(listener).onNotificationStateChanged(); + clearInvocations(listener); + + // calling again has no changes; does not notify + mLockscreenUserManager.updatePublicMode(); + assertFalse(mLockscreenUserManager.isLockscreenPublicMode(0)); + verify(listener, never()).onNotificationStateChanged(); + + // Calling again with keyguard now showing makes user 0 public; notifies + when(mKeyguardStateController.isShowing()).thenReturn(true); + mLockscreenUserManager.updatePublicMode(); + assertTrue(mLockscreenUserManager.isLockscreenPublicMode(0)); + verify(listener).onNotificationStateChanged(); + clearInvocations(listener); + + // calling again has no changes; does not notify + mLockscreenUserManager.updatePublicMode(); + assertTrue(mLockscreenUserManager.isLockscreenPublicMode(0)); + verify(listener, never()).onNotificationStateChanged(); + } + @Test public void testShowSilentNotifications_settingSaysShow() { mSettings.putInt(Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS, 1); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java index 90627cb0fa78..25add0da4e71 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java @@ -24,6 +24,7 @@ import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_PEEK; import static com.android.systemui.statusbar.NotificationEntryHelper.modifyRanking; +import static com.android.systemui.statusbar.StatusBarState.KEYGUARD; import static com.android.systemui.statusbar.StatusBarState.SHADE; import static com.google.common.truth.Truth.assertThat; @@ -31,6 +32,7 @@ import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -95,6 +97,8 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase { NotifPipelineFlags mFlags; @Mock KeyguardNotificationVisibilityProvider mKeyguardNotificationVisibilityProvider; + @Mock + PendingIntent mPendingIntent; private NotificationInterruptStateProviderImpl mNotifInterruptionStateProvider; @@ -422,6 +426,122 @@ public void testShouldNotHeadsUp_justLaunchedFullscreen() { assertThat(mNotifInterruptionStateProvider.shouldHeadsUp(entry)).isFalse(); } + @Test + public void testShouldNotFullScreen_notPendingIntent() throws RemoteException { + NotificationEntry entry = createNotification(IMPORTANCE_HIGH); + when(mPowerManager.isInteractive()).thenReturn(true); + when(mDreamManager.isDreaming()).thenReturn(false); + when(mStatusBarStateController.getState()).thenReturn(SHADE); + + assertThat(mNotifInterruptionStateProvider.shouldLaunchFullScreenIntentWhenAdded(entry)) + .isFalse(); + verify(mLogger, never()).logNoFullscreen(any(), any()); + verify(mLogger, never()).logNoFullscreenWarning(any(), any()); + verify(mLogger, never()).logFullscreen(any(), any()); + } + + @Test + public void testShouldNotFullScreen_notHighImportance() throws RemoteException { + NotificationEntry entry = createFsiNotification(IMPORTANCE_DEFAULT, /* silenced */ false); + when(mPowerManager.isInteractive()).thenReturn(true); + when(mDreamManager.isDreaming()).thenReturn(false); + when(mStatusBarStateController.getState()).thenReturn(SHADE); + + assertThat(mNotifInterruptionStateProvider.shouldLaunchFullScreenIntentWhenAdded(entry)) + .isFalse(); + verify(mLogger).logNoFullscreen(entry, "Not important enough"); + verify(mLogger, never()).logNoFullscreenWarning(any(), any()); + verify(mLogger, never()).logFullscreen(any(), any()); + } + + @Test + public void testShouldNotFullScreen_isGroupAlertSilenced() throws RemoteException { + NotificationEntry entry = createFsiNotification(IMPORTANCE_HIGH, /* silenced */ true); + when(mPowerManager.isInteractive()).thenReturn(false); + when(mDreamManager.isDreaming()).thenReturn(true); + when(mStatusBarStateController.getState()).thenReturn(KEYGUARD); + + assertThat(mNotifInterruptionStateProvider.shouldLaunchFullScreenIntentWhenAdded(entry)) + .isFalse(); + verify(mLogger, never()).logNoFullscreen(any(), any()); + verify(mLogger).logNoFullscreenWarning(entry, "GroupAlertBehavior will prevent HUN"); + verify(mLogger, never()).logFullscreen(any(), any()); + } + + @Test + public void testShouldFullScreen_notInteractive() throws RemoteException { + NotificationEntry entry = createFsiNotification(IMPORTANCE_HIGH, /* silenced */ false); + when(mPowerManager.isInteractive()).thenReturn(false); + when(mDreamManager.isDreaming()).thenReturn(false); + when(mStatusBarStateController.getState()).thenReturn(SHADE); + + assertThat(mNotifInterruptionStateProvider.shouldLaunchFullScreenIntentWhenAdded(entry)) + .isTrue(); + verify(mLogger, never()).logNoFullscreen(any(), any()); + verify(mLogger, never()).logNoFullscreenWarning(any(), any()); + verify(mLogger).logFullscreen(entry, "Device is not interactive"); + } + + @Test + public void testShouldFullScreen_isDreaming() throws RemoteException { + NotificationEntry entry = createFsiNotification(IMPORTANCE_HIGH, /* silenced */ false); + when(mPowerManager.isInteractive()).thenReturn(true); + when(mDreamManager.isDreaming()).thenReturn(true); + when(mStatusBarStateController.getState()).thenReturn(SHADE); + + assertThat(mNotifInterruptionStateProvider.shouldLaunchFullScreenIntentWhenAdded(entry)) + .isTrue(); + verify(mLogger, never()).logNoFullscreen(any(), any()); + verify(mLogger, never()).logNoFullscreenWarning(any(), any()); + verify(mLogger).logFullscreen(entry, "Device is dreaming"); + } + + @Test + public void testShouldFullScreen_onKeyguard() throws RemoteException { + NotificationEntry entry = createFsiNotification(IMPORTANCE_HIGH, /* silenced */ false); + when(mPowerManager.isInteractive()).thenReturn(true); + when(mDreamManager.isDreaming()).thenReturn(false); + when(mStatusBarStateController.getState()).thenReturn(KEYGUARD); + + assertThat(mNotifInterruptionStateProvider.shouldLaunchFullScreenIntentWhenAdded(entry)) + .isTrue(); + verify(mLogger, never()).logNoFullscreen(any(), any()); + verify(mLogger, never()).logNoFullscreenWarning(any(), any()); + verify(mLogger).logFullscreen(entry, "Keyguard is showing"); + } + + @Test + public void testShouldNotFullScreen_willHun() throws RemoteException { + NotificationEntry entry = createFsiNotification(IMPORTANCE_HIGH, /* silenced */ false); + when(mPowerManager.isInteractive()).thenReturn(true); + when(mPowerManager.isScreenOn()).thenReturn(true); + when(mDreamManager.isDreaming()).thenReturn(false); + when(mStatusBarStateController.getState()).thenReturn(SHADE); + + assertThat(mNotifInterruptionStateProvider.shouldLaunchFullScreenIntentWhenAdded(entry)) + .isFalse(); + verify(mLogger).logNoFullscreen(entry, "Expected to HUN"); + verify(mLogger, never()).logNoFullscreenWarning(any(), any()); + verify(mLogger, never()).logFullscreen(any(), any()); + } + + @Test + public void testShouldFullScreen_packageSnoozed() throws RemoteException { + NotificationEntry entry = createFsiNotification(IMPORTANCE_HIGH, /* silenced */ false); + when(mPowerManager.isInteractive()).thenReturn(true); + when(mPowerManager.isScreenOn()).thenReturn(true); + when(mDreamManager.isDreaming()).thenReturn(false); + when(mStatusBarStateController.getState()).thenReturn(SHADE); + when(mHeadsUpManager.isSnoozed("a")).thenReturn(true); + + assertThat(mNotifInterruptionStateProvider.shouldLaunchFullScreenIntentWhenAdded(entry)) + .isTrue(); + verify(mLogger).logNoHeadsUpPackageSnoozed(entry.getSbn()); + verify(mLogger, never()).logNoFullscreen(any(), any()); + verify(mLogger, never()).logNoFullscreenWarning(any(), any()); + verify(mLogger).logFullscreen(entry, "Expected not to HUN"); + } + /** * Bubbles can happen. */ @@ -526,6 +646,10 @@ private NotificationEntry createNotification(int importance) { .setContentText("content text") .build(); + return createNotification(importance, n); + } + + private NotificationEntry createNotification(int importance, Notification n) { return new NotificationEntryBuilder() .setPkg("a") .setOpPkg("a") @@ -536,6 +660,20 @@ private NotificationEntry createNotification(int importance) { .build(); } + private NotificationEntry createFsiNotification(int importance, boolean silent) { + Notification n = new Notification.Builder(getContext(), "a") + .setContentTitle("title") + .setContentText("content text") + .setFullScreenIntent(mPendingIntent, true) + .setGroup("fsi") + .setGroupAlertBehavior(silent + ? Notification.GROUP_ALERT_SUMMARY + : Notification.GROUP_ALERT_ALL) + .build(); + + return createNotification(importance, n); + } + private final NotificationInterruptSuppressor mSuppressAwakeHeadsUp = new NotificationInterruptSuppressor() { diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java index f5fe6f3a1a5f..b83743c90623 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java @@ -39,6 +39,7 @@ import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -122,12 +123,12 @@ public void setUp() throws Exception { allowTestableLooperAsMainThread(); // Interact with real instance of AmbientState. - mAmbientState = new AmbientState( + mAmbientState = spy(new AmbientState( mContext, mDumpManager, mNotificationSectionsManager, mBypassController, - mStatusBarKeyguardViewManager); + mStatusBarKeyguardViewManager)); // Inject dependencies before initializing the layout mDependency.injectTestDependency(SysuiStatusBarStateController.class, mBarState); @@ -190,7 +191,7 @@ public void testUpdateStackHeight_withDozeAmount_whenDozeChanging() { endHeight, dozeAmount); mStackScroller.updateStackHeight(endHeight, expansionFraction); - assertTrue(mAmbientState.getStackHeight() == expected); + assertThat(mAmbientState.getStackHeight()).isEqualTo(expected); } @Test @@ -205,7 +206,74 @@ public void testUpdateStackHeight_withExpansionAmount_whenDozeNotChanging() { endHeight, expansionFraction); mStackScroller.updateStackHeight(endHeight, expansionFraction); - assertTrue(mAmbientState.getStackHeight() == expected); + assertThat(mAmbientState.getStackHeight()).isEqualTo(expected); + } + + @Test + public void updateStackEndHeightAndStackHeight_normallyUpdatesBoth() { + final float expansionFraction = 0.5f; + mAmbientState.setStatusBarState(StatusBarState.KEYGUARD); + + // Validate that by default we update everything + clearInvocations(mAmbientState); + mStackScroller.updateStackEndHeightAndStackHeight(expansionFraction); + verify(mAmbientState).setStackEndHeight(anyFloat()); + verify(mAmbientState).setStackHeight(anyFloat()); + } + + @Test + public void updateStackEndHeightAndStackHeight_onlyUpdatesStackHeightDuringSwipeUp() { + final float expansionFraction = 0.5f; + mAmbientState.setStatusBarState(StatusBarState.KEYGUARD); + mAmbientState.setSwipingUp(true); + + // Validate that when the gesture is in progress, we update only the stackHeight + clearInvocations(mAmbientState); + mStackScroller.updateStackEndHeightAndStackHeight(expansionFraction); + verify(mAmbientState, never()).setStackEndHeight(anyFloat()); + verify(mAmbientState).setStackHeight(anyFloat()); + } + + @Test + public void setPanelFlinging_updatesStackEndHeightOnlyOnFinish() { + final float expansionFraction = 0.5f; + mAmbientState.setStatusBarState(StatusBarState.KEYGUARD); + mAmbientState.setSwipingUp(true); + mStackScroller.setPanelFlinging(true); + mAmbientState.setSwipingUp(false); + + // Validate that when the animation is running, we update only the stackHeight + clearInvocations(mAmbientState); + mStackScroller.updateStackEndHeightAndStackHeight(expansionFraction); + verify(mAmbientState, never()).setStackEndHeight(anyFloat()); + verify(mAmbientState).setStackHeight(anyFloat()); + + // Validate that when the animation ends the stackEndHeight is recalculated immediately + clearInvocations(mAmbientState); + mStackScroller.setPanelFlinging(false); + verify(mAmbientState).setIsFlinging(eq(false)); + verify(mAmbientState).setStackEndHeight(anyFloat()); + verify(mAmbientState).setStackHeight(anyFloat()); + } + + @Test + public void setUnlockHintRunning_updatesStackEndHeightOnlyOnFinish() { + final float expansionFraction = 0.5f; + mAmbientState.setStatusBarState(StatusBarState.KEYGUARD); + mStackScroller.setUnlockHintRunning(true); + + // Validate that when the animation is running, we update only the stackHeight + clearInvocations(mAmbientState); + mStackScroller.updateStackEndHeightAndStackHeight(expansionFraction); + verify(mAmbientState, never()).setStackEndHeight(anyFloat()); + verify(mAmbientState).setStackHeight(anyFloat()); + + // Validate that when the animation ends the stackEndHeight is recalculated immediately + clearInvocations(mAmbientState); + mStackScroller.setUnlockHintRunning(false); + verify(mAmbientState).setUnlockHintRunning(eq(false)); + verify(mAmbientState).setStackEndHeight(anyFloat()); + verify(mAmbientState).setStackHeight(anyFloat()); } @Test diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/AutoTileManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/AutoTileManagerTest.java index 371119cc6d01..4ccbc6d45e63 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/AutoTileManagerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/AutoTileManagerTest.java @@ -490,7 +490,7 @@ public void testSafetyTileRemoved_onSafetyCenterDisable() { mAutoTileManager.init(); when(mAutoAddTracker.isAdded(TEST_CUSTOM_SAFETY_SPEC)).thenReturn(true); mAutoTileManager.mSafetyCallback.onSafetyCenterEnableChanged(false); - verify(mQsTileHost, times(1)).removeTile(safetyComponent); + verify(mQsTileHost, times(1)).removeTile(TEST_CUSTOM_SAFETY_SPEC); } @Test diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/HeadsUpAppearanceControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/HeadsUpAppearanceControllerTest.java index ed22cd3c55fc..fabea7af720b 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/HeadsUpAppearanceControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/HeadsUpAppearanceControllerTest.java @@ -101,7 +101,8 @@ public void setUp() throws Exception { mPanelView, mHeadsUpStatusBarView, new Clock(mContext, null), - Optional.of(mOperatorNameView)); + Optional.of(mOperatorNameView), + new View(mContext)); mHeadsUpAppearanceController.setAppearFraction(0.0f, 0.0f); } @@ -183,7 +184,8 @@ public void constructor_animationValuesUpdated() { mPanelView, mHeadsUpStatusBarView, new Clock(mContext, null), - Optional.empty()); + Optional.empty(), + new View(mContext)); Assert.assertEquals(expandedHeight, newController.mExpandedHeight, 0.0f); Assert.assertEquals(appearFraction, newController.mAppearFraction, 0.0f); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java index d47644f047a2..8900d8ff9fda 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java @@ -985,6 +985,21 @@ public void testCancelSwipeWhileLocked_notifiesKeyguardState() { verify(mKeyguardStateController).notifyPanelFlingEnd(); } + @Test + public void testSwipe_exactlyToTarget_notifiesNssl() { + // No over-expansion + mNotificationPanelViewController.setOverExpansion(0f); + // Fling to a target that is equal to the current position (i.e. a no-op fling). + mNotificationPanelViewController.flingToHeight( + 0f, + true, + mNotificationPanelViewController.mExpandedHeight, + 1f, + false); + // Verify that the NSSL is notified that the panel is *not* flinging. + verify(mNotificationStackScrollLayoutController).setPanelFlinging(false); + } + @Test public void testDoubleTapRequired_Keyguard() { FalsingManager.FalsingTapListener listener = getFalsingTapListener(); diff --git a/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeBluetoothController.java b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeBluetoothController.java index 6cbd175c1084..33b17c321ac7 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeBluetoothController.java +++ b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeBluetoothController.java @@ -110,4 +110,9 @@ public int getBondState(CachedBluetoothDevice device) { public List getConnectedDevices() { return Collections.emptyList(); } + + @Override + public int getBatteryLevel() { + return 0; + } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogImplTest.java index 312db2d7066a..1c9894f2620c 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogImplTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogImplTest.java @@ -88,6 +88,8 @@ public class VolumeDialogImplTest extends SysuiTestCase { ActivityStarter mActivityStarter; @Mock InteractionJankMonitor mInteractionJankMonitor; + @Mock + TunerService mTunerService; @Before public void setup() throws Exception { @@ -103,6 +105,7 @@ public void setup() throws Exception { mConfigurationController, mMediaOutputDialogFactory, mActivityStarter, + mTunerService, mInteractionJankMonitor); mDialog.init(0, null); State state = createShellState(); diff --git a/packages/overlays/Android.mk b/packages/overlays/Android.mk index 69641e69a9f2..591d115a9253 100644 --- a/packages/overlays/Android.mk +++ b/packages/overlays/Android.mk @@ -20,18 +20,105 @@ LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 LOCAL_LICENSE_CONDITIONS := notice LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../NOTICE LOCAL_REQUIRED_MODULES := \ - DisplayCutoutEmulationCornerOverlay \ - DisplayCutoutEmulationDoubleOverlay \ + DisplayCutoutEmulationCornerOverlay \ + DisplayCutoutEmulationDoubleOverlay \ DisplayCutoutEmulationHoleOverlay \ - DisplayCutoutEmulationTallOverlay \ - DisplayCutoutEmulationWaterfallOverlay \ - FontNotoSerifSourceOverlay \ - NavigationBarMode3ButtonOverlay \ - NavigationBarModeGesturalOverlay \ - NavigationBarModeGesturalOverlayNarrowBack \ - NavigationBarModeGesturalOverlayWideBack \ - NavigationBarModeGesturalOverlayExtraWideBack \ - preinstalled-packages-platform-overlays.xml + DisplayCutoutEmulationTallOverlay \ + DisplayCutoutEmulationWaterfallOverlay \ + FontAclonicaSourceOverlay \ + FontAmaranteSourceOverlay \ + FontBariolSourceOverlay \ + FontCagliostroSourceOverlay \ + FontCaviarDreamsSourceOverlay \ + FontComicSansSourceOverlay \ + FontCoolstorySourceOverlay \ + FontDomkratSourceOverlay \ + FontExo2SourceOverlay \ + FontFakedesSourceOverlay \ + FontFifa2018SourceOverlay \ + FontGoogleSansSourceOverlay \ + FontHondaSourceOverlay \ + FontHortensiaSourceOverlay \ + FontLGSmartGothicSourceOverlay \ + FontMinusmanSourceOverlay \ + FontMontserratSourceOverlay \ + FontNokiaPureSourceOverlay \ + FontNotoSerifSourceOverlay \ + FontNovaSourceOverlay \ + FontRobotoCondensedLightSourceOverlay \ + FontRosemarySourceOverlay \ + FontRoundedEleganceSourceOverlay \ + FontOneplusSlateSource \ + FontOswaldSourceOverlay \ + FontSamsungOneSourceOverlay \ + FontSanFranciscoDisplayProSourceOverlay \ + FontSonySketchSourceOverlay \ + FontStoropiaSourceOverlay \ + FontSurferSourceOverlay \ + FontTaurusSourceOverlay \ + FontTechnicalSourceOverlay \ + FontUbuntuRegularSourceOverlay \ + IconPackCircularAndroidOverlay \ + IconPackCircularLauncherOverlay \ + IconPackCircularSettingsOverlay \ + IconPackCircularSystemUIOverlay \ + IconPackCircularThemePickerOverlay \ + IconPackVictorAndroidOverlay \ + IconPackVictorLauncherOverlay \ + IconPackVictorSettingsOverlay \ + IconPackVictorSystemUIOverlay \ + IconPackVictorThemePickerOverlay \ + IconPackSamAndroidOverlay \ + IconPackSamLauncherOverlay \ + IconPackSamSettingsOverlay \ + IconPackSamSystemUIOverlay \ + IconPackSamThemePickerOverlay \ + IconPackKaiAndroidOverlay \ + IconPackKaiLauncherOverlay \ + IconPackKaiSettingsOverlay \ + IconPackKaiSystemUIOverlay \ + IconPackKaiThemePickerOverlay \ + IconPackFilledAndroidOverlay \ + IconPackFilledLauncherOverlay \ + IconPackFilledSettingsOverlay \ + IconPackFilledSystemUIOverlay \ + IconPackFilledThemePickerOverlay \ + IconPackRoundedAndroidOverlay \ + IconPackRoundedLauncherOverlay \ + IconPackRoundedSettingsOverlay \ + IconPackRoundedSystemUIOverlay \ + IconPackRoundedThemePickerOverlay \ + IconPackOOSAndroidOverlay \ + IconPackOOSLauncherOverlay \ + IconPackOOSSettingsOverlay \ + IconPackOOSSystemUIOverlay \ + IconPackOOSThemePickerOverlay \ + IconPackOutlineAndroidOverlay \ + IconPackOutlineSettingsOverlay \ + IconPackOutlineSystemUIOverlay \ + IconPackAcherusAndroidOverlay \ + IconPackAcherusSystemUIOverlay \ + IconShapeCloudyOverlay \ + IconShapeCylinderOverlay \ + IconShapeFlowerOverlay \ + IconShapeHeartOverlay \ + IconShapeHexagonOverlay \ + IconShapeLeafOverlay \ + IconShapePebbleOverlay \ + IconShapeRoundedHexagonOverlay \ + IconShapeRoundedRectOverlay \ + IconShapeSquareOverlay \ + IconShapeSquircleOverlay \ + IconShapeStretchedOverlay \ + IconShapeTaperedRectOverlay \ + IconShapeTeardropOverlay \ + IconShapeVesselOverlay \ + NavigationBarMode3ButtonOverlay \ + NavigationBarModeGesturalOverlay \ + NavigationBarModeGesturalOverlayNarrowBack \ + NavigationBarModeGesturalOverlayWideBack \ + NavigationBarModeGesturalOverlayExtraWideBack \ + preinstalled-packages-platform-overlays.xml include $(BUILD_PHONY_PACKAGE) include $(CLEAR_VARS) diff --git a/packages/overlays/CleanSpec.mk b/packages/overlays/CleanSpec.mk index f4ae800e2d4a..a53ceb61001d 100644 --- a/packages/overlays/CleanSpec.mk +++ b/packages/overlays/CleanSpec.mk @@ -45,6 +45,7 @@ #$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/overlay/DisplayCutout*) +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/overlay/IconPack*) # ************************************************ # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST diff --git a/packages/overlays/FontAclonicaSourceOverlay/Android.mk b/packages/overlays/FontAclonicaSourceOverlay/Android.mk new file mode 100644 index 000000000000..b63db93c7eab --- /dev/null +++ b/packages/overlays/FontAclonicaSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontAclonicaSource +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontAclonicaSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontAclonicaSourceOverlay/AndroidManifest.xml b/packages/overlays/FontAclonicaSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..f993671c8427 --- /dev/null +++ b/packages/overlays/FontAclonicaSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontAclonicaSourceOverlay/res/values/config.xml b/packages/overlays/FontAclonicaSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..6d7f664a2e8d --- /dev/null +++ b/packages/overlays/FontAclonicaSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + aclonica + + aclonica-semi-bold + + aclonica + + aclonica-bold + diff --git a/packages/overlays/FontAclonicaSourceOverlay/res/values/strings.xml b/packages/overlays/FontAclonicaSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..529f229e2fd4 --- /dev/null +++ b/packages/overlays/FontAclonicaSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Aclonica + diff --git a/packages/overlays/FontAmaranteSourceOverlay/Android.mk b/packages/overlays/FontAmaranteSourceOverlay/Android.mk new file mode 100644 index 000000000000..1082697be2df --- /dev/null +++ b/packages/overlays/FontAmaranteSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontAmaranteSource +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontAmaranteSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontAmaranteSourceOverlay/AndroidManifest.xml b/packages/overlays/FontAmaranteSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..8af9c7a0c765 --- /dev/null +++ b/packages/overlays/FontAmaranteSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontAmaranteSourceOverlay/res/values/config.xml b/packages/overlays/FontAmaranteSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..24c210f9ef68 --- /dev/null +++ b/packages/overlays/FontAmaranteSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + amarante + + amarante-semi-bold + + amarante + + amarante-bold + diff --git a/packages/overlays/FontAmaranteSourceOverlay/res/values/strings.xml b/packages/overlays/FontAmaranteSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..6689bf8764fb --- /dev/null +++ b/packages/overlays/FontAmaranteSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Amarante + diff --git a/packages/overlays/FontArbutusSourceOverlay/Android.mk b/packages/overlays/FontArbutusSourceOverlay/Android.mk new file mode 100644 index 000000000000..23aee558257a --- /dev/null +++ b/packages/overlays/FontArbutusSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2018, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontArbutusSource +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontArbutusSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontArbutusSourceOverlay/AndroidManifest.xml b/packages/overlays/FontArbutusSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..46c06b969461 --- /dev/null +++ b/packages/overlays/FontArbutusSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontArbutusSourceOverlay/res/values/config.xml b/packages/overlays/FontArbutusSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..a6aa64c03c50 --- /dev/null +++ b/packages/overlays/FontArbutusSourceOverlay/res/values/config.xml @@ -0,0 +1,28 @@ + + + + source-sans-pro + + source-sans-pro-semi-bold + + arbutus-slab + + arbutus-slab + + diff --git a/packages/overlays/FontArbutusSourceOverlay/res/values/strings.xml b/packages/overlays/FontArbutusSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..d80eb20677c1 --- /dev/null +++ b/packages/overlays/FontArbutusSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Arbutus Slab / Source Sans Pro + diff --git a/packages/overlays/FontArvoLatoOverlay/Android.mk b/packages/overlays/FontArvoLatoOverlay/Android.mk new file mode 100644 index 000000000000..3433ecfd1f6b --- /dev/null +++ b/packages/overlays/FontArvoLatoOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2018, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontArvoLato +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontArvoLatoOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontArvoLatoOverlay/AndroidManifest.xml b/packages/overlays/FontArvoLatoOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..3f2e5de39c0b --- /dev/null +++ b/packages/overlays/FontArvoLatoOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontArvoLatoOverlay/res/values/config.xml b/packages/overlays/FontArvoLatoOverlay/res/values/config.xml new file mode 100644 index 000000000000..4e70d72aaae8 --- /dev/null +++ b/packages/overlays/FontArvoLatoOverlay/res/values/config.xml @@ -0,0 +1,28 @@ + + + + lato + + lato-bold + + arvo + + arvo-bold + + diff --git a/packages/overlays/FontArvoLatoOverlay/res/values/strings.xml b/packages/overlays/FontArvoLatoOverlay/res/values/strings.xml new file mode 100644 index 000000000000..9ea097f1fe48 --- /dev/null +++ b/packages/overlays/FontArvoLatoOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Arvo / Lato + diff --git a/packages/overlays/FontBariolSourceOverlay/Android.mk b/packages/overlays/FontBariolSourceOverlay/Android.mk new file mode 100644 index 000000000000..2fae2e39d0aa --- /dev/null +++ b/packages/overlays/FontBariolSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontBariolSource +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontBariolSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontBariolSourceOverlay/AndroidManifest.xml b/packages/overlays/FontBariolSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..22c6cb1beca5 --- /dev/null +++ b/packages/overlays/FontBariolSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontBariolSourceOverlay/res/values/config.xml b/packages/overlays/FontBariolSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..f1fbd4df24fb --- /dev/null +++ b/packages/overlays/FontBariolSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + bariol + + bariol-semi-bold + + bariol + + bariol-bold + diff --git a/packages/overlays/FontBariolSourceOverlay/res/values/strings.xml b/packages/overlays/FontBariolSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..2a070c941f19 --- /dev/null +++ b/packages/overlays/FontBariolSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Bariol + diff --git a/packages/overlays/FontCagliostroSourceOverlay/Android.mk b/packages/overlays/FontCagliostroSourceOverlay/Android.mk new file mode 100644 index 000000000000..ff3004fab8fd --- /dev/null +++ b/packages/overlays/FontCagliostroSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontCagliostroSource +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontCagliostroSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontCagliostroSourceOverlay/AndroidManifest.xml b/packages/overlays/FontCagliostroSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..23dfd453fee2 --- /dev/null +++ b/packages/overlays/FontCagliostroSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontCagliostroSourceOverlay/res/values/config.xml b/packages/overlays/FontCagliostroSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..1502aa8738da --- /dev/null +++ b/packages/overlays/FontCagliostroSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + cagliostro + + cagliostro-semi-bold + + cagliostro + + cagliostro-bold + diff --git a/packages/overlays/FontCagliostroSourceOverlay/res/values/strings.xml b/packages/overlays/FontCagliostroSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..49ce1da8ad4b --- /dev/null +++ b/packages/overlays/FontCagliostroSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Cagliostro + diff --git a/packages/overlays/FontCaviarDreamsSourceOverlay/Android.mk b/packages/overlays/FontCaviarDreamsSourceOverlay/Android.mk new file mode 100644 index 000000000000..3c52bf681fab --- /dev/null +++ b/packages/overlays/FontCaviarDreamsSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontCaviarDreamsSourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontCaviarDreamsSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) \ No newline at end of file diff --git a/packages/overlays/FontCaviarDreamsSourceOverlay/AndroidManifest.xml b/packages/overlays/FontCaviarDreamsSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..22109224f1ee --- /dev/null +++ b/packages/overlays/FontCaviarDreamsSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/FontCaviarDreamsSourceOverlay/res/values/config.xml b/packages/overlays/FontCaviarDreamsSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..1bf3bd5e9c50 --- /dev/null +++ b/packages/overlays/FontCaviarDreamsSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + caviardreams + + caviardreams-semi-bold + + caviardreams + + caviardreams-bold + \ No newline at end of file diff --git a/packages/overlays/FontCaviarDreamsSourceOverlay/res/values/strings.xml b/packages/overlays/FontCaviarDreamsSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..8cfe37839f4c --- /dev/null +++ b/packages/overlays/FontCaviarDreamsSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Caviar Dreams + \ No newline at end of file diff --git a/packages/overlays/FontComicSansSourceOverlay/Android.mk b/packages/overlays/FontComicSansSourceOverlay/Android.mk new file mode 100644 index 000000000000..49d60fa65e33 --- /dev/null +++ b/packages/overlays/FontComicSansSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontComicSansSourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontComicSansSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontComicSansSourceOverlay/AndroidManifest.xml b/packages/overlays/FontComicSansSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..446569e0b6f7 --- /dev/null +++ b/packages/overlays/FontComicSansSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontComicSansSourceOverlay/res/values/config.xml b/packages/overlays/FontComicSansSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..f24884cfb152 --- /dev/null +++ b/packages/overlays/FontComicSansSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + comicsans + + comicsans-semi-bold + + comicsans + + comicsans-bold + diff --git a/packages/overlays/FontComicSansSourceOverlay/res/values/strings.xml b/packages/overlays/FontComicSansSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..c01a7f098ba0 --- /dev/null +++ b/packages/overlays/FontComicSansSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Comic Sans + diff --git a/packages/overlays/FontCoolstorySourceOverlay/Android.mk b/packages/overlays/FontCoolstorySourceOverlay/Android.mk new file mode 100644 index 000000000000..d89165b43cba --- /dev/null +++ b/packages/overlays/FontCoolstorySourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontCoolstorySource +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontCoolstorySourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontCoolstorySourceOverlay/AndroidManifest.xml b/packages/overlays/FontCoolstorySourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..2665d3dcf9f3 --- /dev/null +++ b/packages/overlays/FontCoolstorySourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontCoolstorySourceOverlay/res/values/config.xml b/packages/overlays/FontCoolstorySourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..577970c5cb4e --- /dev/null +++ b/packages/overlays/FontCoolstorySourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + coolstory + + coolstory-semi-bold + + coolstory + + coolstory-bold + diff --git a/packages/overlays/FontCoolstorySourceOverlay/res/values/strings.xml b/packages/overlays/FontCoolstorySourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..073b37d12789 --- /dev/null +++ b/packages/overlays/FontCoolstorySourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Coolstory + diff --git a/packages/overlays/FontDomkratSourceOverlay/Android.mk b/packages/overlays/FontDomkratSourceOverlay/Android.mk new file mode 100644 index 000000000000..8af523c4db87 --- /dev/null +++ b/packages/overlays/FontDomkratSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontDomkratSourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontDomkratSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontDomkratSourceOverlay/AndroidManifest.xml b/packages/overlays/FontDomkratSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..8298d8a8e7bc --- /dev/null +++ b/packages/overlays/FontDomkratSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontDomkratSourceOverlay/res/values/config.xml b/packages/overlays/FontDomkratSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..ec95417df5f1 --- /dev/null +++ b/packages/overlays/FontDomkratSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + domkrat + + domkrat-semi-bold + + domkrat + + domkrat-bold + diff --git a/packages/overlays/FontDomkratSourceOverlay/res/values/strings.xml b/packages/overlays/FontDomkratSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..bcde6d8bce83 --- /dev/null +++ b/packages/overlays/FontDomkratSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Domkrat + diff --git a/packages/overlays/FontExo2SourceOverlay/Android.mk b/packages/overlays/FontExo2SourceOverlay/Android.mk new file mode 100644 index 000000000000..bec4e857b5e5 --- /dev/null +++ b/packages/overlays/FontExo2SourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontExo2SourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontExo2SourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) \ No newline at end of file diff --git a/packages/overlays/FontExo2SourceOverlay/AndroidManifest.xml b/packages/overlays/FontExo2SourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..fd9ce1413a38 --- /dev/null +++ b/packages/overlays/FontExo2SourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/FontExo2SourceOverlay/res/values/config.xml b/packages/overlays/FontExo2SourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..1122b89cc255 --- /dev/null +++ b/packages/overlays/FontExo2SourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + exo2 + + exo2-semi-bold + + exo2 + + exo2-bold + \ No newline at end of file diff --git a/packages/overlays/FontExo2SourceOverlay/res/values/strings.xml b/packages/overlays/FontExo2SourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..19782e283975 --- /dev/null +++ b/packages/overlays/FontExo2SourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Exo2 + \ No newline at end of file diff --git a/packages/overlays/FontFakedesSourceOverlay/Android.mk b/packages/overlays/FontFakedesSourceOverlay/Android.mk new file mode 100644 index 000000000000..1d657f2ad47e --- /dev/null +++ b/packages/overlays/FontFakedesSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontFakedesSourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontFakedesSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontFakedesSourceOverlay/AndroidManifest.xml b/packages/overlays/FontFakedesSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..43c1c98d980c --- /dev/null +++ b/packages/overlays/FontFakedesSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontFakedesSourceOverlay/res/values/config.xml b/packages/overlays/FontFakedesSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..fc089f0bdd45 --- /dev/null +++ b/packages/overlays/FontFakedesSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + fakedes + + fakedes-semi-bold + + fakedes + + fakedes-bold + diff --git a/packages/overlays/FontFakedesSourceOverlay/res/values/strings.xml b/packages/overlays/FontFakedesSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..8d4d719c5f15 --- /dev/null +++ b/packages/overlays/FontFakedesSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Fakedes + diff --git a/packages/overlays/FontFifa2018SourceOverlay/Android.mk b/packages/overlays/FontFifa2018SourceOverlay/Android.mk new file mode 100644 index 000000000000..91e97f4bc48c --- /dev/null +++ b/packages/overlays/FontFifa2018SourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontFifa2018SourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontFifa2018SourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontFifa2018SourceOverlay/AndroidManifest.xml b/packages/overlays/FontFifa2018SourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..2d41dda36e74 --- /dev/null +++ b/packages/overlays/FontFifa2018SourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontFifa2018SourceOverlay/res/values/config.xml b/packages/overlays/FontFifa2018SourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..f5ad2090742d --- /dev/null +++ b/packages/overlays/FontFifa2018SourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + fifa2018 + + fifa2018-semi-bold + + fifa2018 + + fifa2018-bold + diff --git a/packages/overlays/FontFifa2018SourceOverlay/res/values/strings.xml b/packages/overlays/FontFifa2018SourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..332b72b5bc2d --- /dev/null +++ b/packages/overlays/FontFifa2018SourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Fifa 2018 + diff --git a/packages/overlays/FontGoogleSansSourceOverlay/Android.mk b/packages/overlays/FontGoogleSansSourceOverlay/Android.mk new file mode 100644 index 000000000000..c79b3a0ec2d4 --- /dev/null +++ b/packages/overlays/FontGoogleSansSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontGoogleSansSourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontGoogleSansSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontGoogleSansSourceOverlay/AndroidManifest.xml b/packages/overlays/FontGoogleSansSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..676e5032a596 --- /dev/null +++ b/packages/overlays/FontGoogleSansSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontGoogleSansSourceOverlay/res/values/config.xml b/packages/overlays/FontGoogleSansSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..8da153c80996 --- /dev/null +++ b/packages/overlays/FontGoogleSansSourceOverlay/res/values/config.xml @@ -0,0 +1,29 @@ + + + + googlesans + + googlesans-semi-bold + + googlesans-medium + + googlesans-bold + + ss03 + diff --git a/packages/overlays/FontGoogleSansSourceOverlay/res/values/strings.xml b/packages/overlays/FontGoogleSansSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..6c7c9aea6702 --- /dev/null +++ b/packages/overlays/FontGoogleSansSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Google Sans + diff --git a/packages/overlays/FontHondaSourceOverlay/Android.mk b/packages/overlays/FontHondaSourceOverlay/Android.mk new file mode 100644 index 000000000000..5efde6c7685b --- /dev/null +++ b/packages/overlays/FontHondaSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontHondaSourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontHondaSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontHondaSourceOverlay/AndroidManifest.xml b/packages/overlays/FontHondaSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..231e06b6ac21 --- /dev/null +++ b/packages/overlays/FontHondaSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontHondaSourceOverlay/res/values/config.xml b/packages/overlays/FontHondaSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..56d6809520c9 --- /dev/null +++ b/packages/overlays/FontHondaSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + honda + + honda-semi-bold + + honda + + honda-bold + diff --git a/packages/overlays/FontHondaSourceOverlay/res/values/strings.xml b/packages/overlays/FontHondaSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..c9ff85a9417a --- /dev/null +++ b/packages/overlays/FontHondaSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Honda + diff --git a/packages/overlays/FontHortensiaSourceOverlay/Android.mk b/packages/overlays/FontHortensiaSourceOverlay/Android.mk new file mode 100644 index 000000000000..d68f97765066 --- /dev/null +++ b/packages/overlays/FontHortensiaSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontHortensiaSourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontHortensiaSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontHortensiaSourceOverlay/AndroidManifest.xml b/packages/overlays/FontHortensiaSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..bdf780753781 --- /dev/null +++ b/packages/overlays/FontHortensiaSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontHortensiaSourceOverlay/res/values/config.xml b/packages/overlays/FontHortensiaSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..8f6a221956b8 --- /dev/null +++ b/packages/overlays/FontHortensiaSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + hortensia + + hortensia-semi-bold + + hortensia + + hortensia-bold + diff --git a/packages/overlays/FontHortensiaSourceOverlay/res/values/strings.xml b/packages/overlays/FontHortensiaSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..28a7a44db346 --- /dev/null +++ b/packages/overlays/FontHortensiaSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Hortensia + diff --git a/packages/overlays/FontLGSmartGothicSourceOverlay/Android.mk b/packages/overlays/FontLGSmartGothicSourceOverlay/Android.mk new file mode 100644 index 000000000000..34d2ba6f9ce0 --- /dev/null +++ b/packages/overlays/FontLGSmartGothicSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontLGSmartGothicSource +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontLGSmartGothicSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontLGSmartGothicSourceOverlay/AndroidManifest.xml b/packages/overlays/FontLGSmartGothicSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..d5d1eefcbf61 --- /dev/null +++ b/packages/overlays/FontLGSmartGothicSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontLGSmartGothicSourceOverlay/res/values/config.xml b/packages/overlays/FontLGSmartGothicSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..89a27488aee3 --- /dev/null +++ b/packages/overlays/FontLGSmartGothicSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + lgsmartgothic + + lgsmartgothic-semi-bold + + lgsmartgothic + + lgsmartgothic-bold + diff --git a/packages/overlays/FontLGSmartGothicSourceOverlay/res/values/strings.xml b/packages/overlays/FontLGSmartGothicSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..6d785cada845 --- /dev/null +++ b/packages/overlays/FontLGSmartGothicSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + LGSmartGothic + diff --git a/packages/overlays/FontMinusmanSourceOverlay/Android.mk b/packages/overlays/FontMinusmanSourceOverlay/Android.mk new file mode 100644 index 000000000000..e1f8a8309046 --- /dev/null +++ b/packages/overlays/FontMinusmanSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontMinusmanSourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontMinusmanSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontMinusmanSourceOverlay/AndroidManifest.xml b/packages/overlays/FontMinusmanSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..c4f371a9701d --- /dev/null +++ b/packages/overlays/FontMinusmanSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontMinusmanSourceOverlay/res/values/config.xml b/packages/overlays/FontMinusmanSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..6ec0a175e305 --- /dev/null +++ b/packages/overlays/FontMinusmanSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + minusman + + minusman-semi-bold + + minusman + + minusman-bold + diff --git a/packages/overlays/FontMinusmanSourceOverlay/res/values/strings.xml b/packages/overlays/FontMinusmanSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..0ea5d51f6118 --- /dev/null +++ b/packages/overlays/FontMinusmanSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Minusman + diff --git a/packages/overlays/FontMontserratSourceOverlay/Android.mk b/packages/overlays/FontMontserratSourceOverlay/Android.mk new file mode 100644 index 000000000000..fa2f024a198e --- /dev/null +++ b/packages/overlays/FontMontserratSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontMontserratSourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontMontserratSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontMontserratSourceOverlay/AndroidManifest.xml b/packages/overlays/FontMontserratSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..309abf6c23e8 --- /dev/null +++ b/packages/overlays/FontMontserratSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontMontserratSourceOverlay/res/values/config.xml b/packages/overlays/FontMontserratSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..bad613ac2bc1 --- /dev/null +++ b/packages/overlays/FontMontserratSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + montserrat + + montserrat-semi-bold + + montserrat + + montserrat-bold + diff --git a/packages/overlays/FontMontserratSourceOverlay/res/values/strings.xml b/packages/overlays/FontMontserratSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..73bfcf67a379 --- /dev/null +++ b/packages/overlays/FontMontserratSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Montserrat + diff --git a/packages/overlays/FontNokiaPureSourceOverlay/Android.mk b/packages/overlays/FontNokiaPureSourceOverlay/Android.mk new file mode 100644 index 000000000000..83cf4fce0c46 --- /dev/null +++ b/packages/overlays/FontNokiaPureSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontNokiaPureSourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontNokiaPureSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontNokiaPureSourceOverlay/AndroidManifest.xml b/packages/overlays/FontNokiaPureSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..5c2f96107a98 --- /dev/null +++ b/packages/overlays/FontNokiaPureSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontNokiaPureSourceOverlay/res/values/config.xml b/packages/overlays/FontNokiaPureSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..72e8bffbfcf0 --- /dev/null +++ b/packages/overlays/FontNokiaPureSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + nokiapure + + nokiapure-semi-bold + + nokiapure + + nokiapure-bold + diff --git a/packages/overlays/FontNokiaPureSourceOverlay/res/values/strings.xml b/packages/overlays/FontNokiaPureSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..95490f3a94aa --- /dev/null +++ b/packages/overlays/FontNokiaPureSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Nokia Pure + diff --git a/packages/overlays/FontNovaSourceOverlay/Android.mk b/packages/overlays/FontNovaSourceOverlay/Android.mk new file mode 100644 index 000000000000..82ddfb93b2b5 --- /dev/null +++ b/packages/overlays/FontNovaSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontNovaSourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontNovaSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontNovaSourceOverlay/AndroidManifest.xml b/packages/overlays/FontNovaSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..986d09c603b4 --- /dev/null +++ b/packages/overlays/FontNovaSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontNovaSourceOverlay/res/values/config.xml b/packages/overlays/FontNovaSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..3ab18a30a530 --- /dev/null +++ b/packages/overlays/FontNovaSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + nova + + nova-semi-bold + + nova + + nova-bold + diff --git a/packages/overlays/FontNovaSourceOverlay/res/values/strings.xml b/packages/overlays/FontNovaSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..7250c8cae180 --- /dev/null +++ b/packages/overlays/FontNovaSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Nova + diff --git a/packages/overlays/FontOneplusSlateSourceOverlay/Android.mk b/packages/overlays/FontOneplusSlateSourceOverlay/Android.mk new file mode 100644 index 000000000000..b2d0cc8aded2 --- /dev/null +++ b/packages/overlays/FontOneplusSlateSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontOneplusSlateSource +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontOneplusSlateSource +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontOneplusSlateSourceOverlay/AndroidManifest.xml b/packages/overlays/FontOneplusSlateSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..a6e5ccf48db7 --- /dev/null +++ b/packages/overlays/FontOneplusSlateSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontOneplusSlateSourceOverlay/res/values/config.xml b/packages/overlays/FontOneplusSlateSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..73636517a7ba --- /dev/null +++ b/packages/overlays/FontOneplusSlateSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + oneplusslate + + oneplusslate-semi-bold + + oneplusslate + + oneplusslate-bold + diff --git a/packages/overlays/FontOneplusSlateSourceOverlay/res/values/strings.xml b/packages/overlays/FontOneplusSlateSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..70b49d996be9 --- /dev/null +++ b/packages/overlays/FontOneplusSlateSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + OnePlus Slate + diff --git a/packages/overlays/FontOswaldSourceOverlay/Android.mk b/packages/overlays/FontOswaldSourceOverlay/Android.mk new file mode 100644 index 000000000000..f903709518ee --- /dev/null +++ b/packages/overlays/FontOswaldSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontOswaldSourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontOswaldSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) \ No newline at end of file diff --git a/packages/overlays/FontOswaldSourceOverlay/AndroidManifest.xml b/packages/overlays/FontOswaldSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..820b7e8e1324 --- /dev/null +++ b/packages/overlays/FontOswaldSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/FontOswaldSourceOverlay/res/values/config.xml b/packages/overlays/FontOswaldSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..a667b8d1a14e --- /dev/null +++ b/packages/overlays/FontOswaldSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + oswald + + oswald-semi-bold + + oswald + + oswald-bold + \ No newline at end of file diff --git a/packages/overlays/FontOswaldSourceOverlay/res/values/strings.xml b/packages/overlays/FontOswaldSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..e2951880cd9a --- /dev/null +++ b/packages/overlays/FontOswaldSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Oswald + \ No newline at end of file diff --git a/packages/overlays/FontRobotoCondensedLightSourceOverlay/Android.mk b/packages/overlays/FontRobotoCondensedLightSourceOverlay/Android.mk new file mode 100644 index 000000000000..2e20f5657c50 --- /dev/null +++ b/packages/overlays/FontRobotoCondensedLightSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontRobotoCondensedLightSourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontRobotoCondensedLightSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) \ No newline at end of file diff --git a/packages/overlays/FontRobotoCondensedLightSourceOverlay/AndroidManifest.xml b/packages/overlays/FontRobotoCondensedLightSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..5d80ff449627 --- /dev/null +++ b/packages/overlays/FontRobotoCondensedLightSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/FontRobotoCondensedLightSourceOverlay/res/values/config.xml b/packages/overlays/FontRobotoCondensedLightSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..b4fe11bd51d5 --- /dev/null +++ b/packages/overlays/FontRobotoCondensedLightSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + robotocondensedlight + + robotocondensedlight-semi-bold + + robotocondensedlight + + robotocondensedlight-bold + \ No newline at end of file diff --git a/packages/overlays/FontRobotoCondensedLightSourceOverlay/res/values/strings.xml b/packages/overlays/FontRobotoCondensedLightSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..4b1778adb815 --- /dev/null +++ b/packages/overlays/FontRobotoCondensedLightSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Roboto Condensed Light + \ No newline at end of file diff --git a/packages/overlays/FontRosemarySourceOverlay/Android.mk b/packages/overlays/FontRosemarySourceOverlay/Android.mk new file mode 100644 index 000000000000..0535ae083be4 --- /dev/null +++ b/packages/overlays/FontRosemarySourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontRosemarySource +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontRosemarySourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontRosemarySourceOverlay/AndroidManifest.xml b/packages/overlays/FontRosemarySourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..bbe3db4f6016 --- /dev/null +++ b/packages/overlays/FontRosemarySourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontRosemarySourceOverlay/res/values/config.xml b/packages/overlays/FontRosemarySourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..400219b5b704 --- /dev/null +++ b/packages/overlays/FontRosemarySourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + rosemary + + rosemary-semi-bold + + rosemary + + rosemary-bold + diff --git a/packages/overlays/FontRosemarySourceOverlay/res/values/strings.xml b/packages/overlays/FontRosemarySourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..35261e57d103 --- /dev/null +++ b/packages/overlays/FontRosemarySourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Rosemary + diff --git a/packages/overlays/FontRoundedEleganceSourceOverlay/Android.mk b/packages/overlays/FontRoundedEleganceSourceOverlay/Android.mk new file mode 100644 index 000000000000..349e17c55648 --- /dev/null +++ b/packages/overlays/FontRoundedEleganceSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontRoundedEleganceSourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontRoundedEleganceSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) \ No newline at end of file diff --git a/packages/overlays/FontRoundedEleganceSourceOverlay/AndroidManifest.xml b/packages/overlays/FontRoundedEleganceSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..48379306e45a --- /dev/null +++ b/packages/overlays/FontRoundedEleganceSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/FontRoundedEleganceSourceOverlay/res/values/config.xml b/packages/overlays/FontRoundedEleganceSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..4ee919db2c84 --- /dev/null +++ b/packages/overlays/FontRoundedEleganceSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + roundedelegance + + roundedelegance-semi-bold + + roundedelegance + + roundedelegance-bold + \ No newline at end of file diff --git a/packages/overlays/FontRoundedEleganceSourceOverlay/res/values/strings.xml b/packages/overlays/FontRoundedEleganceSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..f6ccdd374e03 --- /dev/null +++ b/packages/overlays/FontRoundedEleganceSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Rounded Elegance + \ No newline at end of file diff --git a/packages/overlays/FontRubikRubikOverlay/Android.mk b/packages/overlays/FontRubikRubikOverlay/Android.mk new file mode 100644 index 000000000000..21d617ef2c72 --- /dev/null +++ b/packages/overlays/FontRubikRubikOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2018, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontRubikRubik +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontRubikRubikOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontRubikRubikOverlay/AndroidManifest.xml b/packages/overlays/FontRubikRubikOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..1f28d46f087a --- /dev/null +++ b/packages/overlays/FontRubikRubikOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontRubikRubikOverlay/res/values/config.xml b/packages/overlays/FontRubikRubikOverlay/res/values/config.xml new file mode 100644 index 000000000000..4f90e292e2f4 --- /dev/null +++ b/packages/overlays/FontRubikRubikOverlay/res/values/config.xml @@ -0,0 +1,28 @@ + + + + rubik + + rubik-medium + + rubik + + rubik-medium + + diff --git a/packages/overlays/FontRubikRubikOverlay/res/values/strings.xml b/packages/overlays/FontRubikRubikOverlay/res/values/strings.xml new file mode 100644 index 000000000000..4bac7da0aa73 --- /dev/null +++ b/packages/overlays/FontRubikRubikOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Rubik / Rubik + diff --git a/packages/overlays/FontSamsungOneSourceOverlay/Android.mk b/packages/overlays/FontSamsungOneSourceOverlay/Android.mk new file mode 100644 index 000000000000..895b9914ea91 --- /dev/null +++ b/packages/overlays/FontSamsungOneSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontSamsungOneSourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontSamsungOneSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontSamsungOneSourceOverlay/AndroidManifest.xml b/packages/overlays/FontSamsungOneSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..f3bf38685b31 --- /dev/null +++ b/packages/overlays/FontSamsungOneSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontSamsungOneSourceOverlay/res/values/config.xml b/packages/overlays/FontSamsungOneSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..b454c94297f2 --- /dev/null +++ b/packages/overlays/FontSamsungOneSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + samsungone + + samsungone-semi-bold + + samsungone + + samsungone-bold + diff --git a/packages/overlays/FontSamsungOneSourceOverlay/res/values/strings.xml b/packages/overlays/FontSamsungOneSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..d886d286f15c --- /dev/null +++ b/packages/overlays/FontSamsungOneSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + SamsungOne + diff --git a/packages/overlays/FontSanFranciscoDisplayProSourceOverlay/Android.mk b/packages/overlays/FontSanFranciscoDisplayProSourceOverlay/Android.mk new file mode 100644 index 000000000000..23eb37f6e613 --- /dev/null +++ b/packages/overlays/FontSanFranciscoDisplayProSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontSanFranciscoDisplayProSourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontSanFranciscoDisplayProSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontSanFranciscoDisplayProSourceOverlay/AndroidManifest.xml b/packages/overlays/FontSanFranciscoDisplayProSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..6e43b2fa7f46 --- /dev/null +++ b/packages/overlays/FontSanFranciscoDisplayProSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontSanFranciscoDisplayProSourceOverlay/res/values/config.xml b/packages/overlays/FontSanFranciscoDisplayProSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..58b45c4dadb3 --- /dev/null +++ b/packages/overlays/FontSanFranciscoDisplayProSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + sanfrancisco + + sanfrancisco-semi-bold + + sanfrancisco + + sanfrancisco-bold + diff --git a/packages/overlays/FontSanFranciscoDisplayProSourceOverlay/res/values/strings.xml b/packages/overlays/FontSanFranciscoDisplayProSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..f88721ebab82 --- /dev/null +++ b/packages/overlays/FontSanFranciscoDisplayProSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + SanFranciscoDisplayPro + diff --git a/packages/overlays/FontSonySketchSourceOverlay/Android.mk b/packages/overlays/FontSonySketchSourceOverlay/Android.mk new file mode 100644 index 000000000000..dc3238097c6f --- /dev/null +++ b/packages/overlays/FontSonySketchSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontSonySketchSource +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontSonySketchSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontSonySketchSourceOverlay/AndroidManifest.xml b/packages/overlays/FontSonySketchSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..aaaaaa48872e --- /dev/null +++ b/packages/overlays/FontSonySketchSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontSonySketchSourceOverlay/res/values/config.xml b/packages/overlays/FontSonySketchSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..6fbb03946ae8 --- /dev/null +++ b/packages/overlays/FontSonySketchSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + sonysketch + + sonysketch-semi-bold + + sonysketch + + sonysketch-bold + diff --git a/packages/overlays/FontSonySketchSourceOverlay/res/values/strings.xml b/packages/overlays/FontSonySketchSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..ad1e4e30401d --- /dev/null +++ b/packages/overlays/FontSonySketchSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + SonySketch + diff --git a/packages/overlays/FontStoropiaSourceOverlay/Android.mk b/packages/overlays/FontStoropiaSourceOverlay/Android.mk new file mode 100644 index 000000000000..90e4beb255d4 --- /dev/null +++ b/packages/overlays/FontStoropiaSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontStoropiaSourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontStoropiaSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) \ No newline at end of file diff --git a/packages/overlays/FontStoropiaSourceOverlay/AndroidManifest.xml b/packages/overlays/FontStoropiaSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..a019a60b4747 --- /dev/null +++ b/packages/overlays/FontStoropiaSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/FontStoropiaSourceOverlay/res/values/config.xml b/packages/overlays/FontStoropiaSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..57836a08f94f --- /dev/null +++ b/packages/overlays/FontStoropiaSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + storopia + + storopia-semi-bold + + storopia + + storopia-bold + \ No newline at end of file diff --git a/packages/overlays/FontStoropiaSourceOverlay/res/values/strings.xml b/packages/overlays/FontStoropiaSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..a94bad2129d3 --- /dev/null +++ b/packages/overlays/FontStoropiaSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Storopia + \ No newline at end of file diff --git a/packages/overlays/FontSurferSourceOverlay/Android.mk b/packages/overlays/FontSurferSourceOverlay/Android.mk new file mode 100644 index 000000000000..6e7546380ef3 --- /dev/null +++ b/packages/overlays/FontSurferSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontSurferSource +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontSurferSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontSurferSourceOverlay/AndroidManifest.xml b/packages/overlays/FontSurferSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..c3cfbfb54554 --- /dev/null +++ b/packages/overlays/FontSurferSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontSurferSourceOverlay/res/values/config.xml b/packages/overlays/FontSurferSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..67936e52719f --- /dev/null +++ b/packages/overlays/FontSurferSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + surfer + + surfer-semi-bold + + surfer + + surfer-bold + diff --git a/packages/overlays/FontSurferSourceOverlay/res/values/strings.xml b/packages/overlays/FontSurferSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..6ba30820c414 --- /dev/null +++ b/packages/overlays/FontSurferSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Surfer + diff --git a/packages/overlays/FontTaurusSourceOverlay/Android.mk b/packages/overlays/FontTaurusSourceOverlay/Android.mk new file mode 100644 index 000000000000..e87464a2ac04 --- /dev/null +++ b/packages/overlays/FontTaurusSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontTaurusSourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontTaurusSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontTaurusSourceOverlay/AndroidManifest.xml b/packages/overlays/FontTaurusSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..48646cd47bd5 --- /dev/null +++ b/packages/overlays/FontTaurusSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontTaurusSourceOverlay/res/values/config.xml b/packages/overlays/FontTaurusSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..d05016a8305b --- /dev/null +++ b/packages/overlays/FontTaurusSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + taurus + + taurus-semi-bold + + taurus + + taurus-bold + diff --git a/packages/overlays/FontTaurusSourceOverlay/res/values/strings.xml b/packages/overlays/FontTaurusSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..736036644fae --- /dev/null +++ b/packages/overlays/FontTaurusSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Taurus + diff --git a/packages/overlays/FontTechnicalSourceOverlay/Android.mk b/packages/overlays/FontTechnicalSourceOverlay/Android.mk new file mode 100644 index 000000000000..137becfe9991 --- /dev/null +++ b/packages/overlays/FontTechnicalSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontTechnicalSourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontTechnicalSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/FontTechnicalSourceOverlay/AndroidManifest.xml b/packages/overlays/FontTechnicalSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..89f1b5eb5ee3 --- /dev/null +++ b/packages/overlays/FontTechnicalSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/FontTechnicalSourceOverlay/res/values/config.xml b/packages/overlays/FontTechnicalSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..77a44fd5b066 --- /dev/null +++ b/packages/overlays/FontTechnicalSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + technical + + technical-semi-bold + + technical + + technical-bold + diff --git a/packages/overlays/FontTechnicalSourceOverlay/res/values/strings.xml b/packages/overlays/FontTechnicalSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..88cd35216937 --- /dev/null +++ b/packages/overlays/FontTechnicalSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Technical + diff --git a/packages/overlays/FontUbuntuRegularSourceOverlay/Android.mk b/packages/overlays/FontUbuntuRegularSourceOverlay/Android.mk new file mode 100644 index 000000000000..237732ce7305 --- /dev/null +++ b/packages/overlays/FontUbuntuRegularSourceOverlay/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := FontUbuntuRegularSourceOverlay +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := FontUbuntuRegularSourceOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) \ No newline at end of file diff --git a/packages/overlays/FontUbuntuRegularSourceOverlay/AndroidManifest.xml b/packages/overlays/FontUbuntuRegularSourceOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..28a481f86433 --- /dev/null +++ b/packages/overlays/FontUbuntuRegularSourceOverlay/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/FontUbuntuRegularSourceOverlay/res/values/config.xml b/packages/overlays/FontUbuntuRegularSourceOverlay/res/values/config.xml new file mode 100644 index 000000000000..c10e56d69982 --- /dev/null +++ b/packages/overlays/FontUbuntuRegularSourceOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + ubunturegular + + ubunturegular-semi-bold + + ubunturegular + + ubunturegular-bold + \ No newline at end of file diff --git a/packages/overlays/FontUbuntuRegularSourceOverlay/res/values/strings.xml b/packages/overlays/FontUbuntuRegularSourceOverlay/res/values/strings.xml new file mode 100644 index 000000000000..6483517342f3 --- /dev/null +++ b/packages/overlays/FontUbuntuRegularSourceOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + Ubuntu Regular + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/Android.bp b/packages/overlays/IconPackAcherusAndroidOverlay/Android.bp new file mode 100644 index 000000000000..8fadf0919326 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/Android.bp @@ -0,0 +1,21 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +runtime_resource_overlay { + name: "IconPackAcherusAndroidOverlay", + theme: "IconPackAcherusAndroid", + product_specific: true, +} diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/AndroidManifest.xml b/packages/overlays/IconPackAcherusAndroidOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..bb51ffab5e58 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_0.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_0.xml new file mode 100644 index 000000000000..dc5fa03ccbbf --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_0.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_1.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_1.xml new file mode 100644 index 000000000000..dc5fa03ccbbf --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_1.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/color/switch_track_material.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/color/switch_track_material.xml new file mode 100644 index 000000000000..7a17d1f22f27 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/color/switch_track_material.xml @@ -0,0 +1,24 @@ + + + + + + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_ab_back_material.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_ab_back_material.xml new file mode 100644 index 000000000000..b0fa315ec172 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_ab_back_material.xml @@ -0,0 +1,23 @@ + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_audio_ring_notif_mute.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_audio_ring_notif_mute.xml new file mode 100644 index 000000000000..54c8b1855b5d --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_audio_ring_notif_mute.xml @@ -0,0 +1,10 @@ + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml new file mode 100644 index 000000000000..a8f33c774a6a --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml new file mode 100644 index 000000000000..a8f33c774a6a --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_mode_edit.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_mode_edit.xml new file mode 100644 index 000000000000..ef0f27d2ba56 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_mode_edit.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_airplane.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_airplane.xml new file mode 100644 index 000000000000..829dca5b2a02 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_airplane.xml @@ -0,0 +1,9 @@ + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml new file mode 100644 index 000000000000..e55ebb56fe1d --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_battery_saver.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_battery_saver.xml new file mode 100644 index 000000000000..0fad54843387 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_battery_saver.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_bluetooth.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_bluetooth.xml new file mode 100644 index 000000000000..a8f33c774a6a --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_bluetooth.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_dnd.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_dnd.xml new file mode 100644 index 000000000000..8899600d197d --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_dnd.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_flashlight.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_flashlight.xml new file mode 100644 index 000000000000..d30ecca8e69e --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_flashlight.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_night_display_on.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_night_display_on.xml new file mode 100644 index 000000000000..80fd153f600e --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_night_display_on.xml @@ -0,0 +1,9 @@ + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml new file mode 100644 index 000000000000..0797e035ffaf --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_settings_bluetooth.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_settings_bluetooth.xml new file mode 100644 index 000000000000..b352371bad80 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_settings_bluetooth.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml new file mode 100644 index 000000000000..69efcdebf5a4 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml new file mode 100644 index 000000000000..69efcdebf5a4 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml new file mode 100644 index 000000000000..8c7bdc1c12c7 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml new file mode 100644 index 000000000000..8c7bdc1c12c7 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml new file mode 100644 index 000000000000..efb42d0cc907 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml new file mode 100644 index 000000000000..efb42d0cc907 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml new file mode 100644 index 000000000000..895bd40e745f --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml new file mode 100644 index 000000000000..895bd40e745f --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml new file mode 100644 index 000000000000..1878c0daf0c6 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml new file mode 100644 index 000000000000..1878c0daf0c6 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml new file mode 100644 index 000000000000..1878c0daf0c6 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_location.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_location.xml new file mode 100644 index 000000000000..5da4d27b26c3 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_location.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml new file mode 100644 index 000000000000..93af992957ef --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml @@ -0,0 +1,18 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation_drawable.xml new file mode 100644 index 000000000000..ff855317a58b --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation_drawable.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_wifi_signal_0.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_wifi_signal_0.xml new file mode 100644 index 000000000000..a352759501fd --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_wifi_signal_0.xml @@ -0,0 +1,5 @@ + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_wifi_signal_1.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_wifi_signal_1.xml new file mode 100644 index 000000000000..0c581dfcebaf --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_wifi_signal_1.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_wifi_signal_2.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_wifi_signal_2.xml new file mode 100644 index 000000000000..054003ed5974 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_wifi_signal_2.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_wifi_signal_3.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_wifi_signal_3.xml new file mode 100644 index 000000000000..2595afbf45ed --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_wifi_signal_3.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_wifi_signal_4.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_wifi_signal_4.xml new file mode 100644 index 000000000000..d6d3378dfa00 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/ic_wifi_signal_4.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/perm_group_location.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/perm_group_location.xml new file mode 100644 index 000000000000..5da4d27b26c3 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/perm_group_location.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/switch_track_material.xml b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/switch_track_material.xml new file mode 100644 index 000000000000..1fb419eb2513 --- /dev/null +++ b/packages/overlays/IconPackAcherusAndroidOverlay/res/drawable/switch_track_material.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/Android.bp b/packages/overlays/IconPackAcherusSystemUIOverlay/Android.bp new file mode 100644 index 000000000000..7bc88546c92b --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/Android.bp @@ -0,0 +1,21 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +runtime_resource_overlay { + name: "IconPackAcherusSystemUIOverlay", + theme: "IconPackAcherusSystemUI", + product_specific: true, +} diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/AndroidManifest.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..9513056f6b56 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_access_alarms_big.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_access_alarms_big.xml new file mode 100644 index 000000000000..e5d55b884ddd --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_access_alarms_big.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_access_alarms_small.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_access_alarms_small.xml new file mode 100644 index 000000000000..e5d55b884ddd --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_access_alarms_small.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_alarm.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_alarm.xml new file mode 100644 index 000000000000..103e7a439517 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_alarm.xml @@ -0,0 +1,10 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml new file mode 100644 index 000000000000..97d2cf6d7165 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_bluetooth_transient_animation.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_bluetooth_transient_animation.xml new file mode 100644 index 000000000000..a8f33c774a6a --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_bluetooth_transient_animation.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_brightness_thumb.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_brightness_thumb.xml new file mode 100644 index 000000000000..2e8a0198985b --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_brightness_thumb.xml @@ -0,0 +1,25 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_camera_alt_24dp.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_camera_alt_24dp.xml new file mode 100644 index 000000000000..9952144cd4fd --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_camera_alt_24dp.xml @@ -0,0 +1,11 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_cast.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_cast.xml new file mode 100644 index 000000000000..5e1e42acc970 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_cast.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_cast_connected.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_cast_connected.xml new file mode 100644 index 000000000000..bd7e23a2a51c --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_cast_connected.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_cast_connected_fill.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_cast_connected_fill.xml new file mode 100644 index 000000000000..69873e99794f --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_cast_connected_fill.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_data_saver.xml new file mode 100644 index 000000000000..ebe7371cc465 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_data_saver.xml @@ -0,0 +1,9 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_data_saver_off.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_data_saver_off.xml new file mode 100644 index 000000000000..4638f6581cd2 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_data_saver_off.xml @@ -0,0 +1,9 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_headset.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_headset.xml new file mode 100644 index 000000000000..47bd9f95559a --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_headset.xml @@ -0,0 +1,9 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_headset_mic.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_headset_mic.xml new file mode 100644 index 000000000000..ad924911d846 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_headset_mic.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_hotspot.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_hotspot.xml new file mode 100644 index 000000000000..3bdb1e09c3ae --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_hotspot.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_location.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_location.xml new file mode 100644 index 000000000000..b62ac9658af1 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_location.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_memory.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_memory.xml new file mode 100644 index 000000000000..e5768e54ac60 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_memory.xml @@ -0,0 +1,9 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_mic_26dp.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_mic_26dp.xml new file mode 100644 index 000000000000..e3082a08fa86 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_mic_26dp.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_no_disturb.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_no_disturb.xml new file mode 100644 index 000000000000..790f77210c50 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_no_disturb.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_phone_ssos.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_phone_ssos.xml new file mode 100644 index 000000000000..83a3f5285a8e --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_phone_ssos.xml @@ -0,0 +1,11 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_alarm.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_alarm.xml new file mode 100644 index 000000000000..dc1d276d880b --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_alarm.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_auto_rotate.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_auto_rotate.xml new file mode 100644 index 000000000000..e55ebb56fe1d --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_auto_rotate.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_battery_saver.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_battery_saver.xml new file mode 100644 index 000000000000..0fad54843387 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_battery_saver.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_bluetooth_connected.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_bluetooth_connected.xml new file mode 100644 index 000000000000..97d2cf6d7165 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_bluetooth_connected.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml new file mode 100644 index 000000000000..006333734183 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_bluetooth_detail_empty.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_bluetooth_detail_empty.xml new file mode 100644 index 000000000000..a8f33c774a6a --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_bluetooth_detail_empty.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_bluetooth_on.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_bluetooth_on.xml new file mode 100644 index 000000000000..a8f33c774a6a --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_bluetooth_on.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_brightness_auto_off.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_brightness_auto_off.xml new file mode 100644 index 000000000000..4ce24d90fc0b --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_brightness_auto_off.xml @@ -0,0 +1,24 @@ + + + + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_brightness_auto_on.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_brightness_auto_on.xml new file mode 100644 index 000000000000..8f22aee1b923 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_brightness_auto_on.xml @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_brightness_high.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_brightness_high.xml new file mode 100644 index 000000000000..962b29a921a9 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_brightness_high.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_brightness_low.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_brightness_low.xml new file mode 100644 index 000000000000..806255020bd6 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_brightness_low.xml @@ -0,0 +1,12 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_brightness_medium.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_brightness_medium.xml new file mode 100644 index 000000000000..795ae1bbfdcd --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_brightness_medium.xml @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_caffeine.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_caffeine.xml new file mode 100644 index 000000000000..7d2ca5757e52 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_caffeine.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_caffeine_on.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_caffeine_on.xml new file mode 100644 index 000000000000..7d2ca5757e52 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_caffeine_on.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_cast_detail_empty.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_cast_detail_empty.xml new file mode 100644 index 000000000000..a1a1b5e9b019 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_cast_detail_empty.xml @@ -0,0 +1,26 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_cast_off.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_cast_off.xml new file mode 100644 index 000000000000..5e1e42acc970 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_cast_off.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_cast_on.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_cast_on.xml new file mode 100644 index 000000000000..5e1e42acc970 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_cast_on.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_cellular.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_cellular.xml new file mode 100644 index 000000000000..50b7374a0e89 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_cellular.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_cpu_info.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_cpu_info.xml new file mode 100644 index 000000000000..e5768e54ac60 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_cpu_info.xml @@ -0,0 +1,9 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_data_switch_1.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_data_switch_1.xml new file mode 100644 index 000000000000..7e1b7e4ec23e --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_data_switch_1.xml @@ -0,0 +1,14 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_data_switch_2.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_data_switch_2.xml new file mode 100644 index 000000000000..df3afec9e3be --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_data_switch_2.xml @@ -0,0 +1,14 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_dnd_on.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_dnd_on.xml new file mode 100644 index 000000000000..4ab2a4f239eb --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_dnd_on.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_location_battery_saving.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_location_battery_saving.xml new file mode 100644 index 000000000000..b62ac9658af1 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_location_battery_saving.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_location_high_accuracy.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_location_high_accuracy.xml new file mode 100644 index 000000000000..5da4d27b26c3 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_location_high_accuracy.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_location_sensors_only.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_location_sensors_only.xml new file mode 100644 index 000000000000..5da4d27b26c3 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_location_sensors_only.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_nfc.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_nfc.xml new file mode 100644 index 000000000000..527ad225b5d3 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_nfc.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_no_sim.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_no_sim.xml new file mode 100644 index 000000000000..968e318c5798 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_no_sim.xml @@ -0,0 +1,10 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_ringer_audible.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_ringer_audible.xml new file mode 100644 index 000000000000..3c696bc17e01 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_ringer_audible.xml @@ -0,0 +1,9 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_ringer_silent.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_ringer_silent.xml new file mode 100644 index 000000000000..3bb23f5007f1 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_ringer_silent.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_ringer_vibrate.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_ringer_vibrate.xml new file mode 100644 index 000000000000..49d481e48cb1 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_ringer_vibrate.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_screenshot.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_screenshot.xml new file mode 100644 index 000000000000..3eb819403ce2 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_screenshot.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_sleep.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_sleep.xml new file mode 100644 index 000000000000..8c4fa7ed68a1 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_sleep.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_volume_panel.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_volume_panel.xml new file mode 100644 index 000000000000..3c696bc17e01 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_qs_volume_panel.xml @@ -0,0 +1,9 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_screen_recorder.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_screen_recorder.xml new file mode 100644 index 000000000000..8312a536a9db --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_screen_recorder.xml @@ -0,0 +1,9 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_screenrecord.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_screenrecord.xml new file mode 100644 index 000000000000..8312a536a9db --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_screenrecord.xml @@ -0,0 +1,9 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_settings.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_settings.xml new file mode 100644 index 000000000000..aba18d118557 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_settings.xml @@ -0,0 +1,9 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_settings_memory.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_settings_memory.xml new file mode 100644 index 000000000000..e5768e54ac60 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_settings_memory.xml @@ -0,0 +1,9 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_airplane.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_airplane.xml new file mode 100644 index 000000000000..23a4ee380b8e --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_airplane.xml @@ -0,0 +1,9 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml new file mode 100644 index 000000000000..69efcdebf5a4 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml new file mode 100644 index 000000000000..69efcdebf5a4 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml new file mode 100644 index 000000000000..8c7bdc1c12c7 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml new file mode 100644 index 000000000000..8c7bdc1c12c7 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml new file mode 100644 index 000000000000..efb42d0cc907 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml new file mode 100644 index 000000000000..efb42d0cc907 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml new file mode 100644 index 000000000000..895bd40e745f --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml new file mode 100644 index 000000000000..895bd40e745f --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml new file mode 100644 index 000000000000..1878c0daf0c6 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml new file mode 100644 index 000000000000..1878c0daf0c6 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml new file mode 100644 index 000000000000..1878c0daf0c6 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_flashlight.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_flashlight.xml new file mode 100644 index 000000000000..53da8cb87d98 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_flashlight.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_location.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_location.xml new file mode 100644 index 000000000000..5da4d27b26c3 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_signal_location.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_swap_vert.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_swap_vert.xml new file mode 100644 index 000000000000..50b7374a0e89 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_swap_vert.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_accessibility.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_accessibility.xml new file mode 100644 index 000000000000..47cf3ddd3a03 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_accessibility.xml @@ -0,0 +1,19 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_alarm.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_alarm.xml new file mode 100644 index 000000000000..e3260b2d93f0 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_alarm.xml @@ -0,0 +1,10 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml new file mode 100644 index 000000000000..ca7d1a5da01b --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml @@ -0,0 +1,10 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml new file mode 100644 index 000000000000..95c150a749c6 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml @@ -0,0 +1,16 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_media.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_media.xml new file mode 100644 index 000000000000..38f74cc14204 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_media.xml @@ -0,0 +1,10 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_media_bt.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_media_bt.xml new file mode 100644 index 000000000000..c108218905b3 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_media_bt.xml @@ -0,0 +1,19 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_media_bt_mute.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_media_bt_mute.xml new file mode 100644 index 000000000000..f91385f8b322 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_media_bt_mute.xml @@ -0,0 +1,19 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_media_mute.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_media_mute.xml new file mode 100644 index 000000000000..0741dd384710 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_media_mute.xml @@ -0,0 +1,10 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml new file mode 100644 index 000000000000..98a0410d7457 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml @@ -0,0 +1,9 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml new file mode 100644 index 000000000000..6f512e8d0174 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_ringer.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_ringer.xml new file mode 100644 index 000000000000..3c696bc17e01 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_ringer.xml @@ -0,0 +1,9 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml new file mode 100644 index 000000000000..3bb23f5007f1 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml new file mode 100644 index 000000000000..49d481e48cb1 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_system.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_system.xml new file mode 100644 index 000000000000..03c6a2df2dbb --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_system.xml @@ -0,0 +1,15 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_system_mute.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_system_mute.xml new file mode 100644 index 000000000000..6604353741b8 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_system_mute.xml @@ -0,0 +1,16 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_voice.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_voice.xml new file mode 100644 index 000000000000..4b38f9d117c7 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_volume_voice.xml @@ -0,0 +1,10 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_wifi_signal_0.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_wifi_signal_0.xml new file mode 100644 index 000000000000..a352759501fd --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_wifi_signal_0.xml @@ -0,0 +1,5 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_wifi_signal_1.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_wifi_signal_1.xml new file mode 100644 index 000000000000..0c581dfcebaf --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_wifi_signal_1.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_wifi_signal_2.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_wifi_signal_2.xml new file mode 100644 index 000000000000..054003ed5974 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_wifi_signal_2.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_wifi_signal_3.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_wifi_signal_3.xml new file mode 100644 index 000000000000..2595afbf45ed --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_wifi_signal_3.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_wifi_signal_4.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_wifi_signal_4.xml new file mode 100644 index 000000000000..d6d3378dfa00 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/ic_wifi_signal_4.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_notify_image.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_notify_image.xml new file mode 100644 index 000000000000..2db8e3cd2733 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_notify_image.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_airplane_mode.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_airplane_mode.xml new file mode 100644 index 000000000000..3add51ec840a --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_airplane_mode.xml @@ -0,0 +1,9 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_alarm.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_alarm.xml new file mode 100644 index 000000000000..e5d55b884ddd --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_alarm.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_alarm_dim.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_alarm_dim.xml new file mode 100644 index 000000000000..1fcdfce0d4fa --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_alarm_dim.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_branded_vpn.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_branded_vpn.xml new file mode 100644 index 000000000000..50bca6540953 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_branded_vpn.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_cast.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_cast.xml new file mode 100644 index 000000000000..4f1940c89bd8 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_cast.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_0.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_0.xml new file mode 100644 index 000000000000..fc89a4edad1c --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_0.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_1.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_1.xml new file mode 100644 index 000000000000..33b95f035383 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_1.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_2.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_2.xml new file mode 100644 index 000000000000..672731d1df4d --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_2.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_3.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_3.xml new file mode 100644 index 000000000000..0927dfc1f83c --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_3.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_4.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_4.xml new file mode 100644 index 000000000000..4fa9895c05c5 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_4.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_5.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_5.xml new file mode 100644 index 000000000000..e78c656b889a --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_5.xml @@ -0,0 +1,31 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_6.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_6.xml new file mode 100644 index 000000000000..7548f2e26f81 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_6.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_7.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_7.xml new file mode 100644 index 000000000000..abe2b53be816 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_7.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_8.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_8.xml new file mode 100644 index 000000000000..cde486555f6c --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_8.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_9.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_9.xml new file mode 100644 index 000000000000..1b64e7059fc2 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_9.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_saver.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_saver.xml new file mode 100644 index 000000000000..a9df7259568d --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_saver.xml @@ -0,0 +1,20 @@ + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_saver_vec.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_saver_vec.xml new file mode 100644 index 000000000000..26d8ed8d6de8 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_data_saver_vec.xml @@ -0,0 +1,9 @@ + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_dnd.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_dnd.xml new file mode 100644 index 000000000000..d6a23fdeff77 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_dnd.xml @@ -0,0 +1,20 @@ + + + \ No newline at end of file diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_dnd_priority.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_dnd_priority.xml new file mode 100644 index 000000000000..8899600d197d --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_dnd_priority.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_dnd_total_silence.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_dnd_total_silence.xml new file mode 100644 index 000000000000..8899600d197d --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_dnd_total_silence.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_dnd_vec.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_dnd_vec.xml new file mode 100644 index 000000000000..8899600d197d --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_dnd_vec.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_flashlight.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_flashlight.xml new file mode 100644 index 000000000000..7f6798e70495 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_flashlight.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_hotspot.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_hotspot.xml new file mode 100644 index 000000000000..e7312179f2a7 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_hotspot.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_location.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_location.xml new file mode 100644 index 000000000000..69c64e195b87 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_location.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_nfc.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_nfc.xml new file mode 100644 index 000000000000..7df305bbce05 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_nfc.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_ringer_silent.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_ringer_silent.xml new file mode 100644 index 000000000000..577d5b4a8519 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_ringer_silent.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_ringer_vibrate.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_ringer_vibrate.xml new file mode 100644 index 000000000000..ce868fbce129 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_ringer_vibrate.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_volte.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_volte.xml new file mode 100644 index 000000000000..65d6464de783 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_volte.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_volte_slot1.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_volte_slot1.xml new file mode 100644 index 000000000000..1b1ea38e3590 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_volte_slot1.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_volte_slot12.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_volte_slot12.xml new file mode 100644 index 000000000000..c32152e9d5d0 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_volte_slot12.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_volte_slot2.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_volte_slot2.xml new file mode 100644 index 000000000000..aeaa29ce6cf0 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_volte_slot2.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_vowifi.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_vowifi.xml new file mode 100644 index 000000000000..07be10630f01 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_vowifi.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_vowifi_slot1.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_vowifi_slot1.xml new file mode 100644 index 000000000000..3c4a3d5d70af --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_vowifi_slot1.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_vowifi_slot12.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_vowifi_slot12.xml new file mode 100644 index 000000000000..219771dc0c6c --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_vowifi_slot12.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_vowifi_slot2.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_vowifi_slot2.xml new file mode 100644 index 000000000000..a1bca333da10 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_vowifi_slot2.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml new file mode 100644 index 000000000000..50bca6540953 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/values-night/colors.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/values-night/colors.xml new file mode 100644 index 000000000000..d3dc66d930e9 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/values-night/colors.xml @@ -0,0 +1,28 @@ + + + + + #DBDBDB + + #222222 + + #98a098 + + #ffffffff + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/values/colors.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/values/colors.xml new file mode 100644 index 000000000000..e3e9821488e5 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/values/colors.xml @@ -0,0 +1,29 @@ + + + + + #272727 + + #FFFFFF + + #909090 + + #ff000000 + + diff --git a/packages/overlays/IconPackAcherusSystemUIOverlay/res/values/dimens.xml b/packages/overlays/IconPackAcherusSystemUIOverlay/res/values/dimens.xml new file mode 100644 index 000000000000..3b976b80fe64 --- /dev/null +++ b/packages/overlays/IconPackAcherusSystemUIOverlay/res/values/dimens.xml @@ -0,0 +1,23 @@ + + + + + + 2dp + + diff --git a/packages/overlays/IconPackCircularAndroidOverlay/Android.bp b/packages/overlays/IconPackCircularAndroidOverlay/Android.bp new file mode 100644 index 000000000000..70403588da33 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackCircularAndroidOverlay", + theme: "IconPackCircularAndroid", + product_specific: true, +} diff --git a/packages/overlays/IconPackCircularAndroidOverlay/AndroidManifest.xml b/packages/overlays/IconPackCircularAndroidOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..94056767ac4e --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_0.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_0.xml new file mode 100644 index 000000000000..1be546840e6d --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_0.xml @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_1.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_1.xml new file mode 100644 index 000000000000..c9fd424f7ad3 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_1.xml @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_2.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_2.xml new file mode 100644 index 000000000000..b34d3088e87e --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_2.xml @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_3.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_3.xml new file mode 100644 index 000000000000..9d2b3a4f8016 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_3.xml @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_4.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_4.xml new file mode 100644 index 000000000000..943893dfb361 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_4.xml @@ -0,0 +1,21 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_audio_alarm.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_audio_alarm.xml new file mode 100644 index 000000000000..4393903785ca --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_audio_alarm.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml new file mode 100644 index 000000000000..9bdc79a23008 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_battery_80_24dp.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_battery_80_24dp.xml new file mode 100644 index 000000000000..4d8dbdba9207 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_battery_80_24dp.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml new file mode 100644 index 000000000000..4d844a1c4e0f --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml new file mode 100644 index 000000000000..bd5aefac7187 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml @@ -0,0 +1,28 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml new file mode 100644 index 000000000000..b7acaeb65d09 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml new file mode 100644 index 000000000000..cf620c4ddbdd --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml new file mode 100644 index 000000000000..aec7bf48bd90 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml new file mode 100644 index 000000000000..6397e078b38b --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_laptop.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_laptop.xml new file mode 100644 index 000000000000..2f13fb8685f9 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_laptop.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_misc_hid.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_misc_hid.xml new file mode 100644 index 000000000000..5096f2f0f2e9 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_misc_hid.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_network_pan.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_network_pan.xml new file mode 100644 index 000000000000..c7a0266cbfca --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_network_pan.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml new file mode 100644 index 000000000000..a5f66069e19c --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_corp_badge.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_corp_badge.xml new file mode 100644 index 000000000000..586e7a68b7ac --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_corp_badge.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_expand_more.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_expand_more.xml new file mode 100644 index 000000000000..6419515cc594 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_expand_more.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_faster_emergency.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_faster_emergency.xml new file mode 100644 index 000000000000..f3364feb8608 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_faster_emergency.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_file_copy.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_file_copy.xml new file mode 100644 index 000000000000..b8e9845d5039 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_file_copy.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml new file mode 100644 index 000000000000..9d43e51dc469 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_hotspot_transient_animation_drawable.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_hotspot_transient_animation_drawable.xml new file mode 100644 index 000000000000..15f273569fab --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_hotspot_transient_animation_drawable.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_info_outline_24.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_info_outline_24.xml new file mode 100644 index 000000000000..4adc9ce2923f --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_info_outline_24.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_lock.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_lock.xml new file mode 100644 index 000000000000..5a67f95788ee --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_lock.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_lock_bugreport.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_lock_bugreport.xml new file mode 100644 index 000000000000..d1f92433bfda --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_lock_bugreport.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_lock_open.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_lock_open.xml new file mode 100644 index 000000000000..21abd6e2d3ba --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_lock_open.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_lock_power_off.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_lock_power_off.xml new file mode 100644 index 000000000000..e2296fb3839c --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_lock_power_off.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_lockscreen_ime.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_lockscreen_ime.xml new file mode 100644 index 000000000000..455bdd50ceba --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_lockscreen_ime.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_mode_edit.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_mode_edit.xml new file mode 100644 index 000000000000..aca3d52c1a24 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_mode_edit.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_notifications_alerted.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_notifications_alerted.xml new file mode 100644 index 000000000000..86863b3b6c98 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_notifications_alerted.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_phone.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_phone.xml new file mode 100644 index 000000000000..85c184b9f9a8 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_phone.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_airplane.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_airplane.xml new file mode 100644 index 000000000000..c2f93c27f16e --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_airplane.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml new file mode 100644 index 000000000000..5628fb76da6b --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_battery_saver.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_battery_saver.xml new file mode 100644 index 000000000000..73310b03f625 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_battery_saver.xml @@ -0,0 +1,30 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_bluetooth.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_bluetooth.xml new file mode 100644 index 000000000000..19731249bfc7 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_bluetooth.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_dnd.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_dnd.xml new file mode 100644 index 000000000000..dadaaa8f35cf --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_dnd.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_flashlight.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_flashlight.xml new file mode 100644 index 000000000000..5c2b0246a3d4 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_flashlight.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_night_display_on.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_night_display_on.xml new file mode 100644 index 000000000000..a39a742354a9 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_night_display_on.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml new file mode 100644 index 000000000000..3cf7541219f0 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml @@ -0,0 +1,27 @@ + + + + + diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_restart.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_restart.xml new file mode 100644 index 000000000000..ac6a8204ec19 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_restart.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_screenshot.xml new file mode 100644 index 000000000000..294898ebaeb8 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_screenshot.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_settings_bluetooth.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_settings_bluetooth.xml new file mode 100644 index 000000000000..19731249bfc7 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_settings_bluetooth.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml new file mode 100644 index 000000000000..d9dfa54697e4 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml @@ -0,0 +1,50 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml new file mode 100644 index 000000000000..ed510f092078 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml @@ -0,0 +1,52 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml new file mode 100644 index 000000000000..70f91afab7d5 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml @@ -0,0 +1,48 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml new file mode 100644 index 000000000000..7a5e57042440 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml @@ -0,0 +1,49 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml new file mode 100644 index 000000000000..f014eea9354f --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml @@ -0,0 +1,46 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml new file mode 100644 index 000000000000..06be36524121 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml @@ -0,0 +1,46 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml new file mode 100644 index 000000000000..9b83fab35144 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml @@ -0,0 +1,44 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml new file mode 100644 index 000000000000..f5b82ead4d3f --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml @@ -0,0 +1,43 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml new file mode 100644 index 000000000000..6f7f48d1ea96 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml @@ -0,0 +1,42 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml new file mode 100644 index 000000000000..ab2f3f737486 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml @@ -0,0 +1,40 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml new file mode 100644 index 000000000000..a53768be3a96 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml @@ -0,0 +1,37 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_location.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_location.xml new file mode 100644 index 000000000000..213b01b04eef --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_location.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml new file mode 100644 index 000000000000..20418a34f200 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml @@ -0,0 +1,34 @@ + + + + + + + + + diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation_drawable.xml new file mode 100644 index 000000000000..6dfe9d70e95f --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation_drawable.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_wifi_signal_0.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_wifi_signal_0.xml new file mode 100644 index 000000000000..9c5f866c42fa --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_wifi_signal_0.xml @@ -0,0 +1,46 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_wifi_signal_1.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_wifi_signal_1.xml new file mode 100644 index 000000000000..931b10123ba0 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_wifi_signal_1.xml @@ -0,0 +1,43 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_wifi_signal_2.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_wifi_signal_2.xml new file mode 100644 index 000000000000..3c56e1babbd2 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_wifi_signal_2.xml @@ -0,0 +1,40 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_wifi_signal_3.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_wifi_signal_3.xml new file mode 100644 index 000000000000..dce7b4390e15 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_wifi_signal_3.xml @@ -0,0 +1,37 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_wifi_signal_4.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_wifi_signal_4.xml new file mode 100644 index 000000000000..6dacb3ff4275 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_wifi_signal_4.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_activity_recognition.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_activity_recognition.xml new file mode 100644 index 000000000000..cbd60d880fb2 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_activity_recognition.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_aural.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_aural.xml new file mode 100644 index 000000000000..64802640a9ec --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_aural.xml @@ -0,0 +1,40 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_calendar.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_calendar.xml new file mode 100644 index 000000000000..397050fd88f4 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_calendar.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_call_log.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_call_log.xml new file mode 100644 index 000000000000..b56eec39334c --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_call_log.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_camera.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_camera.xml new file mode 100644 index 000000000000..c8cb2e2cfc1f --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_camera.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_contacts.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_contacts.xml new file mode 100644 index 000000000000..6124df86e931 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_contacts.xml @@ -0,0 +1,37 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_location.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_location.xml new file mode 100644 index 000000000000..77ff42ad3e25 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_location.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_microphone.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_microphone.xml new file mode 100644 index 000000000000..06aa0cd3f238 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_microphone.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_phone_calls.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_phone_calls.xml new file mode 100644 index 000000000000..3aea5f44902b --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_phone_calls.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_sensors.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_sensors.xml new file mode 100644 index 000000000000..4d70fc90850e --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_sensors.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_sms.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_sms.xml new file mode 100644 index 000000000000..30ed8c92a198 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_sms.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_storage.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_storage.xml new file mode 100644 index 000000000000..52cd4c1c7153 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_storage.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_visual.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_visual.xml new file mode 100644 index 000000000000..1c461791c868 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_visual.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/values/config.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/values/config.xml new file mode 100644 index 000000000000..30f29f778858 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/values/config.xml @@ -0,0 +1,41 @@ + + + + + + M 8,1 C 8,0.45 7.55,0 7,0 H 5 C 4.45,0 4,0.45 4,1 H 3 C 1.34,1 0,2.34 0,4 V 17 C 0,18.66 1.34,20 3,20 H 9 C 10.66,20 12,18.66 12,17 V 4 C 12,2.34 10.66,1 9,1 Z M 10.5,4 V 17 C 10.5,17.83 9.83,18.5 9,18.5 H 3 C 2.17,18.5 1.5,17.83 1.5,17 V 4 C 1.5,3.17 2.17,2.5 3,2.5 H 9 C 9.83,2.5 10.5,3.17 10.5,4 Z + + + M 10.5,4 V 17 C 10.5,17.83 9.83,18.5 9,18.5 H 3 C 2.17,18.5 1.5,17.83 1.5,17 V 4 C 1.5,3.17 2.17,2.5 3,2.5 H 9 C 9.83,2.5 10.5,3.17 10.5,4 Z + + + M 8.08,9.5 H 7 V 5.99 C 7,5.73 6.65,5.64 6.53,5.87 L 3.7,11.13 C 3.61,11.3 3.73,11.5 3.92,11.5 H 5 V 15.01 C 5,15.27 5.35,15.36 5.47,15.13 L 8.3,9.87 C 8.39,9.7 8.27,9.5 8.08,9.5 Z + + + M 3.75,11.25 H 5.25 V 12.75 C 5.25,13.16 5.59,13.5 6,13.5 6.41,13.5 6.75,13.16 6.75,12.75 V 11.25 H 8.25 C 8.66,11.25 9,10.91 9,10.5 9,10.09 8.6601,9.75 8.25,9.75 H 6.75 V 8.25 C 6.75,7.84 6.41,7.5 6,7.5 5.59,7.5 5.25,7.84 5.25,8.25 V 9.75 H 3.75 C 3.34,9.75 3,10.09 3,10.5 3,10.91 3.34,11.25 3.75,11.25 Z + + + + M 17.81,18.75 L 19.81,16.75 C 20.01,16.56 20.09,16.28 20.02,16.02 C 19.96,15.75 19.75,15.54 19.48,15.47 C 19.22,15.41 18.94,15.49 18.75,15.69 L 16.75,17.69 L 14.75,15.69 C 14.56,15.49 14.28,15.41 14.02,15.47 C 13.75,15.54 13.54,15.75 13.47,16.02 C 13.41,16.28 13.49,16.56 13.69,16.75 L 15.69,18.75 L 13.69,20.75 C 13.4,21.04 13.4,21.52 13.69,21.81 C 13.98,22.1 14.46,22.1 14.75,21.81 L 16.75,19.81 L 18.75,21.81 C 19.04,22.1 19.52,22.1 19.81,21.81 C 20.1,21.52 20.1,21.04 19.81,20.75 Z + + + 10.5 + 11 + diff --git a/packages/overlays/IconPackCircularLauncherOverlay/Android.bp b/packages/overlays/IconPackCircularLauncherOverlay/Android.bp new file mode 100644 index 000000000000..4f8b6637a2b5 --- /dev/null +++ b/packages/overlays/IconPackCircularLauncherOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackCircularLauncherOverlay", + theme: "IconPackCircularLauncher", + product_specific: true, +} diff --git a/packages/overlays/IconPackCircularLauncherOverlay/AndroidManifest.xml b/packages/overlays/IconPackCircularLauncherOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..0b69ecaf96fe --- /dev/null +++ b/packages/overlays/IconPackCircularLauncherOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_corp.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_corp.xml new file mode 100644 index 000000000000..a05a38996ed8 --- /dev/null +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_corp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_corp_off.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_corp_off.xml new file mode 100644 index 000000000000..a8102519361b --- /dev/null +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_corp_off.xml @@ -0,0 +1,26 @@ + + + + + diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_drag_handle.xml new file mode 100644 index 000000000000..5e640bab8392 --- /dev/null +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_drag_handle.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_hourglass_top.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_hourglass_top.xml new file mode 100644 index 000000000000..14c6603040f6 --- /dev/null +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_hourglass_top.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_info_no_shadow.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_info_no_shadow.xml new file mode 100644 index 000000000000..730f1eacab98 --- /dev/null +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_info_no_shadow.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_install_no_shadow.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_install_no_shadow.xml new file mode 100644 index 000000000000..41b6338f7d86 --- /dev/null +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_install_no_shadow.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_palette.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_palette.xml new file mode 100644 index 000000000000..e086ebd95cf7 --- /dev/null +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_palette.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_pin.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_pin.xml new file mode 100644 index 000000000000..86b4318e8ccb --- /dev/null +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_pin.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_remove_no_shadow.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_remove_no_shadow.xml new file mode 100644 index 000000000000..f73989127dd5 --- /dev/null +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_remove_no_shadow.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_screenshot.xml new file mode 100644 index 000000000000..e8608a598fbf --- /dev/null +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_screenshot.xml @@ -0,0 +1,29 @@ + + + + + + diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_select.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_select.xml new file mode 100644 index 000000000000..0f375610865d --- /dev/null +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_select.xml @@ -0,0 +1,23 @@ + + + + diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_setting.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_setting.xml new file mode 100644 index 000000000000..f1f0f507d4b9 --- /dev/null +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_setting.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_share.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_share.xml new file mode 100644 index 000000000000..726d1aa5e1c2 --- /dev/null +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_share.xml @@ -0,0 +1,39 @@ + + + + + + + + diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_smartspace_preferences.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_smartspace_preferences.xml new file mode 100644 index 000000000000..0717cf99847c --- /dev/null +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_smartspace_preferences.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_split_screen.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_split_screen.xml new file mode 100644 index 000000000000..af5cb0553a1a --- /dev/null +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_split_screen.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml new file mode 100644 index 000000000000..955f5aa70a6f --- /dev/null +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_warning.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_warning.xml new file mode 100644 index 000000000000..035d9d416e61 --- /dev/null +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_warning.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_widget.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_widget.xml new file mode 100644 index 000000000000..fcddfc36f939 --- /dev/null +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_widget.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/Android.bp b/packages/overlays/IconPackCircularSettingsOverlay/Android.bp new file mode 100644 index 000000000000..93220c87dcf9 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackCircularSettingsOverlay", + theme: "IconPackCircularSettings", + product_specific: true, +} diff --git a/packages/overlays/IconPackCircularSettingsOverlay/AndroidManifest.xml b/packages/overlays/IconPackCircularSettingsOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..c1a56985a4fd --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/drag_handle.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/drag_handle.xml new file mode 100644 index 000000000000..03f7de774a3a --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/drag_handle.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_add_24dp.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_add_24dp.xml new file mode 100644 index 000000000000..e0fbaf1c108e --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_add_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_airplanemode_active.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_airplanemode_active.xml new file mode 100644 index 000000000000..530fe66820a1 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_airplanemode_active.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_android.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_android.xml new file mode 100644 index 000000000000..23f607532a78 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_android.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_apps.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_apps.xml new file mode 100644 index 000000000000..95c08678ca9a --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_apps.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_arrow_back.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_arrow_back.xml new file mode 100644 index 000000000000..a9e1ffe6d69e --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_arrow_back.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml new file mode 100644 index 000000000000..6419515cc594 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_battery_charging_full.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_battery_charging_full.xml new file mode 100644 index 000000000000..34dda4e91010 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_battery_charging_full.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml new file mode 100644 index 000000000000..ab1a240756bb --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml new file mode 100644 index 000000000000..4f4b15258f1d --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_call_24dp.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_call_24dp.xml new file mode 100644 index 000000000000..42d975b6564e --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_call_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_cancel.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_cancel.xml new file mode 100644 index 000000000000..4f4e9a679d49 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_cancel.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_cast_24dp.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_cast_24dp.xml new file mode 100644 index 000000000000..cbd266c46590 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_cast_24dp.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_cellular_off.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_cellular_off.xml new file mode 100644 index 000000000000..6df47564407e --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_cellular_off.xml @@ -0,0 +1,33 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml new file mode 100644 index 000000000000..82df1de6211c --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml new file mode 100644 index 000000000000..b8e9845d5039 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_data_saver.xml new file mode 100644 index 000000000000..ba3c5808d26c --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_data_saver.xml @@ -0,0 +1,33 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_delete.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_delete.xml new file mode 100644 index 000000000000..35453a938e2e --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_delete.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_devices_other.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_devices_other.xml new file mode 100644 index 000000000000..454b2e260334 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_devices_other.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_devices_other_32dp.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_devices_other_32dp.xml new file mode 100644 index 000000000000..f0754ed06253 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_devices_other_32dp.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml new file mode 100644 index 000000000000..87d82e58cd67 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_eject_24dp.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_eject_24dp.xml new file mode 100644 index 000000000000..abbab51e90e1 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_eject_24dp.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_expand_less.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_expand_less.xml new file mode 100644 index 000000000000..402883f7be01 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_expand_less.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_expand_more_inverse.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_expand_more_inverse.xml new file mode 100644 index 000000000000..bd04de971d7c --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_expand_more_inverse.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_find_in_page_24px.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_find_in_page_24px.xml new file mode 100644 index 000000000000..fd1a00dc738b --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_find_in_page_24px.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml new file mode 100644 index 000000000000..52cd4c1c7153 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_friction_lock_closed.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_friction_lock_closed.xml new file mode 100644 index 000000000000..f0734d2c4a9f --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_friction_lock_closed.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml new file mode 100644 index 000000000000..4e5497a76991 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_headset_24dp.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_headset_24dp.xml new file mode 100644 index 000000000000..cf620c4ddbdd --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_headset_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_help.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_help.xml new file mode 100644 index 000000000000..4e99add13424 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_help.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_help_actionbar.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_help_actionbar.xml new file mode 100644 index 000000000000..b980a2cce710 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_help_actionbar.xml @@ -0,0 +1,33 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_homepage_search.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_homepage_search.xml new file mode 100644 index 000000000000..d9de63a96957 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_homepage_search.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_info_outline_24.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_info_outline_24.xml new file mode 100644 index 000000000000..2de16c98d250 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_info_outline_24.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_local_movies.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_local_movies.xml new file mode 100644 index 000000000000..5b0e442ee60e --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_local_movies.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml new file mode 100644 index 000000000000..3aea5f44902b --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_lock.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_lock.xml new file mode 100644 index 000000000000..57b9ae09ef9d --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_lock.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_media_stream.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_media_stream.xml new file mode 100644 index 000000000000..2497769ed745 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_media_stream.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_media_stream_off.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_media_stream_off.xml new file mode 100644 index 000000000000..3e8915ca6e02 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_media_stream_off.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_network_cell.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_network_cell.xml new file mode 100644 index 000000000000..1d72e5fa284f --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_network_cell.xml @@ -0,0 +1,44 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_notifications.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_notifications.xml new file mode 100644 index 000000000000..7530e3f9b21e --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_notifications.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_notifications_alert.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_notifications_alert.xml new file mode 100644 index 000000000000..e66d9204769d --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_notifications_alert.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml new file mode 100644 index 000000000000..2a21776232b4 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml @@ -0,0 +1,33 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_phone_info.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_phone_info.xml new file mode 100644 index 000000000000..1cafbfe562c9 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_phone_info.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_photo_library.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_photo_library.xml new file mode 100644 index 000000000000..1c461791c868 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_photo_library.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_scan_24dp.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_scan_24dp.xml new file mode 100644 index 000000000000..f160fe9cdd1e --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_scan_24dp.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_search_24dp.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_search_24dp.xml new file mode 100644 index 000000000000..c27e80ebc8a6 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_search_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_accent.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_accent.xml new file mode 100644 index 000000000000..e10898feaf7b --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_accent.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_accessibility.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_accessibility.xml new file mode 100644 index 000000000000..4c57d8db3a2f --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_accessibility.xml @@ -0,0 +1,37 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_accounts.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_accounts.xml new file mode 100644 index 000000000000..c63ec5b91418 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_accounts.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_backup.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_backup.xml new file mode 100644 index 000000000000..b46a7f172d11 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_backup.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_battery_white.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_battery_white.xml new file mode 100644 index 000000000000..780fa2ee4241 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_battery_white.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_data_usage.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_data_usage.xml new file mode 100644 index 000000000000..855e4bb2a39d --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_data_usage.xml @@ -0,0 +1,28 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_date_time.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_date_time.xml new file mode 100644 index 000000000000..bfabc4509e86 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_date_time.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_delete.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_delete.xml new file mode 100644 index 000000000000..a87186bf2966 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_delete.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_disable.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_disable.xml new file mode 100644 index 000000000000..0572fb72f82e --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_disable.xml @@ -0,0 +1,37 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_display_white.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_display_white.xml new file mode 100644 index 000000000000..8dabc535d4e8 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_display_white.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_enable.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_enable.xml new file mode 100644 index 000000000000..41962b27b270 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_enable.xml @@ -0,0 +1,37 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_home.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_home.xml new file mode 100644 index 000000000000..c9ddc2bb427a --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_home.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_language.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_language.xml new file mode 100644 index 000000000000..2c83c3481ba4 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_language.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_location.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_location.xml new file mode 100644 index 000000000000..32234a1a28f1 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_location.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_multiuser.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_multiuser.xml new file mode 100644 index 000000000000..d6d655871b74 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_multiuser.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_night_display.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_night_display.xml new file mode 100644 index 000000000000..4bd1946b57b6 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_night_display.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_open.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_open.xml new file mode 100644 index 000000000000..6e919c466572 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_open.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_print.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_print.xml new file mode 100644 index 000000000000..77dfad94cb46 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_print.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_privacy.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_privacy.xml new file mode 100644 index 000000000000..86b9a1d99f6a --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_privacy.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_security_white.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_security_white.xml new file mode 100644 index 000000000000..6fc58fa2533a --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_security_white.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_sim.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_sim.xml new file mode 100644 index 000000000000..415d057a2fc0 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_sim.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml new file mode 100644 index 000000000000..67ddf46439e6 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_wireless.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_wireless.xml new file mode 100644 index 000000000000..91670fca1be0 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_settings_wireless.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_storage.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_storage.xml new file mode 100644 index 000000000000..5d666924120e --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_storage.xml @@ -0,0 +1,41 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_storage_white.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_storage_white.xml new file mode 100644 index 000000000000..807c3bf3e533 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_storage_white.xml @@ -0,0 +1,40 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_suggestion_night_display.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_suggestion_night_display.xml new file mode 100644 index 000000000000..4bd1946b57b6 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_suggestion_night_display.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_sync.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_sync.xml new file mode 100644 index 000000000000..e8f5e8616162 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_sync.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml new file mode 100644 index 000000000000..a0233ba8acc9 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml @@ -0,0 +1,37 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_system_update.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_system_update.xml new file mode 100644 index 000000000000..c2fd678dba68 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_system_update.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml new file mode 100644 index 000000000000..18c03328ff0a --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml new file mode 100644 index 000000000000..2bbb8ace52e7 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml @@ -0,0 +1,38 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_volume_up_24dp.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_volume_up_24dp.xml new file mode 100644 index 000000000000..1a0613712df5 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_volume_up_24dp.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_vpn_key.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_vpn_key.xml new file mode 100644 index 000000000000..b4c4fecc8687 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_vpn_key.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_wifi_tethering.xml b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_wifi_tethering.xml new file mode 100644 index 000000000000..be2b350728b7 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_wifi_tethering.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/Android.bp b/packages/overlays/IconPackCircularSystemUIOverlay/Android.bp new file mode 100644 index 000000000000..4eaa4205fe96 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackCircularSystemUIOverlay", + theme: "IconPackCircularSystemUI", + product_specific: true, +} diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/AndroidManifest.xml b/packages/overlays/IconPackCircularSystemUIOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..356b7e28395e --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_alarm.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_alarm.xml new file mode 100644 index 000000000000..2d7fc4d91657 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_alarm.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_alarm_dim.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_alarm_dim.xml new file mode 100644 index 000000000000..2d7fc4d91657 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_alarm_dim.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_arrow_back.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_arrow_back.xml new file mode 100644 index 000000000000..a9e1ffe6d69e --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_arrow_back.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml new file mode 100644 index 000000000000..66963b7fb838 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_brightness_thumb.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_brightness_thumb.xml new file mode 100644 index 000000000000..fae73a4c0e09 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_brightness_thumb.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_camera.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_camera.xml new file mode 100644 index 000000000000..77197a58a04a --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_camera.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_cast.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_cast.xml new file mode 100644 index 000000000000..05b490f781f7 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_cast.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_cast_connected.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_cast_connected.xml new file mode 100644 index 000000000000..a7547db2a8e5 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_cast_connected.xml @@ -0,0 +1,37 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_cast_connected_fill.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_cast_connected_fill.xml new file mode 100644 index 000000000000..18f81e76d583 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_cast_connected_fill.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_close_white.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_close_white.xml new file mode 100644 index 000000000000..ddfb980bea88 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_close_white.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_data_saver.xml new file mode 100644 index 000000000000..cdc3bfbd3d5f --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_data_saver.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_data_saver_off.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_data_saver_off.xml new file mode 100644 index 000000000000..7dab949f9da5 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_data_saver_off.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_drag_handle.xml new file mode 100644 index 000000000000..950cb0c45cbb --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_drag_handle.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_headset.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_headset.xml new file mode 100644 index 000000000000..a80fe92f26ab --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_headset.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_headset_mic.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_headset_mic.xml new file mode 100644 index 000000000000..bbbebb574aa1 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_headset_mic.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_hotspot.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_hotspot.xml new file mode 100644 index 000000000000..32929a807a08 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_hotspot.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_info.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_info.xml new file mode 100644 index 000000000000..4adc9ce2923f --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_info.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_info_outline.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_info_outline.xml new file mode 100644 index 000000000000..4adc9ce2923f --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_info_outline.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_invert_colors.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_invert_colors.xml new file mode 100644 index 000000000000..b2d086838c50 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_invert_colors.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_location.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_location.xml new file mode 100644 index 000000000000..ce07fc9959a2 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_location.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml new file mode 100644 index 000000000000..4344e32a75aa --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_notifications_alert.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_notifications_alert.xml new file mode 100644 index 000000000000..86863b3b6c98 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_notifications_alert.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_notifications_silence.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_notifications_silence.xml new file mode 100644 index 000000000000..09a3e881923d --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_notifications_silence.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_power_low.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_power_low.xml new file mode 100644 index 000000000000..8d8434fe1473 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_power_low.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_power_saver.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_power_saver.xml new file mode 100644 index 000000000000..a558337902c4 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_power_saver.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml new file mode 100644 index 000000000000..c7a0266cbfca --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_bluetooth_on.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_bluetooth_on.xml new file mode 100644 index 000000000000..7d9489eca037 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_bluetooth_on.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_cancel.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_cancel.xml new file mode 100644 index 000000000000..4f4e9a679d49 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_cancel.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_no_sim.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_no_sim.xml new file mode 100644 index 000000000000..585f6317e28b --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_no_sim.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml new file mode 100644 index 000000000000..8fcf955e5709 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml @@ -0,0 +1,49 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml new file mode 100644 index 000000000000..d746348cdccb --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml @@ -0,0 +1,46 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml new file mode 100644 index 000000000000..b17aa3623e5a --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml @@ -0,0 +1,43 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml new file mode 100644 index 000000000000..661950a48b27 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml @@ -0,0 +1,40 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml new file mode 100644 index 000000000000..41779c67a1e9 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml @@ -0,0 +1,37 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml new file mode 100644 index 000000000000..6582aaf7eeb8 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml @@ -0,0 +1,52 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_screenrecord.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_screenrecord.xml new file mode 100644 index 000000000000..a875a23c3a17 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_screenrecord.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_screenshot_delete.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_screenshot_delete.xml new file mode 100644 index 000000000000..a87186bf2966 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_screenshot_delete.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_settings.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_settings.xml new file mode 100644 index 000000000000..4c9b5d7b1c48 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_settings.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_settings_16dp.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_settings_16dp.xml new file mode 100644 index 000000000000..12c4e35e4e0a --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_settings_16dp.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_swap_vert.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_swap_vert.xml new file mode 100644 index 000000000000..e7f2e4c4a08c --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_swap_vert.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml new file mode 100644 index 000000000000..ffeb16322b0f --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml @@ -0,0 +1,40 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_alarm.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_alarm.xml new file mode 100644 index 000000000000..870d3a08907e --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_alarm.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml new file mode 100644 index 000000000000..9bdc79a23008 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml new file mode 100644 index 000000000000..25fb5f789ad9 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_media.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_media.xml new file mode 100644 index 000000000000..2497769ed745 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_media.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_media_mute.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_media_mute.xml new file mode 100644 index 000000000000..3e8915ca6e02 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_media_mute.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_notification.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_notification.xml new file mode 100644 index 000000000000..6e67ab7a0f3a --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_notification.xml @@ -0,0 +1,31 @@ + + + + + + + diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_notification_mute.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_notification_mute.xml new file mode 100644 index 000000000000..9c7ea09d1cfc --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_notification_mute.xml @@ -0,0 +1,33 @@ + + + + + + + + diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml new file mode 100644 index 000000000000..e210bcb04849 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml new file mode 100644 index 000000000000..660f64a8cead --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_ringer.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_ringer.xml new file mode 100644 index 000000000000..7530e3f9b21e --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_ringer.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml new file mode 100644 index 000000000000..2dc6545c0fe3 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml new file mode 100644 index 000000000000..533d886d0188 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml @@ -0,0 +1,37 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_voice.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_voice.xml new file mode 100644 index 000000000000..3aea5f44902b --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_volume_voice.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/stat_sys_camera.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/stat_sys_camera.xml new file mode 100644 index 000000000000..c4728eb3f389 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/stat_sys_camera.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml new file mode 100644 index 000000000000..488d15ae9dee --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/stat_sys_mic_none.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/stat_sys_mic_none.xml new file mode 100644 index 000000000000..3869e7f4d2d9 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/stat_sys_mic_none.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml new file mode 100644 index 000000000000..0cb5c7c6748e --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularThemePickerOverlay/Android.bp b/packages/overlays/IconPackCircularThemePickerOverlay/Android.bp new file mode 100644 index 000000000000..5105b7931922 --- /dev/null +++ b/packages/overlays/IconPackCircularThemePickerOverlay/Android.bp @@ -0,0 +1,31 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackCircularThemePickerOverlay", + theme: "IconPackCircularThemePicker", + certificate: "platform", + product_specific: true, +} diff --git a/packages/overlays/IconPackCircularThemePickerOverlay/AndroidManifest.xml b/packages/overlays/IconPackCircularThemePickerOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..f7c5b550b193 --- /dev/null +++ b/packages/overlays/IconPackCircularThemePickerOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_add_24px.xml b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_add_24px.xml new file mode 100644 index 000000000000..900aaa0371b4 --- /dev/null +++ b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_add_24px.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_close_24px.xml b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_close_24px.xml new file mode 100644 index 000000000000..ddfb980bea88 --- /dev/null +++ b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_close_24px.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_colorize_24px.xml b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_colorize_24px.xml new file mode 100644 index 000000000000..f572af605268 --- /dev/null +++ b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_colorize_24px.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_delete_24px.xml b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_delete_24px.xml new file mode 100644 index 000000000000..a87186bf2966 --- /dev/null +++ b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_delete_24px.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_font.xml b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_font.xml new file mode 100644 index 000000000000..edaf3c7e0b42 --- /dev/null +++ b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_font.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_nav_clock.xml b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_nav_clock.xml new file mode 100644 index 000000000000..2884d71cefea --- /dev/null +++ b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_nav_clock.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_nav_grid.xml b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_nav_grid.xml new file mode 100644 index 000000000000..d50dbd4e0cac --- /dev/null +++ b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_nav_grid.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_nav_theme.xml b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_nav_theme.xml new file mode 100644 index 000000000000..7375bc931665 --- /dev/null +++ b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_nav_theme.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml new file mode 100644 index 000000000000..bdb74424c82e --- /dev/null +++ b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml @@ -0,0 +1,40 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_shapes_24px.xml b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_shapes_24px.xml new file mode 100644 index 000000000000..b7e6bf9e9a12 --- /dev/null +++ b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_shapes_24px.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_tune.xml b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_tune.xml new file mode 100644 index 000000000000..9c8821152466 --- /dev/null +++ b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_tune.xml @@ -0,0 +1,40 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_wifi_24px.xml b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_wifi_24px.xml new file mode 100644 index 000000000000..fde996584f57 --- /dev/null +++ b/packages/overlays/IconPackCircularThemePickerOverlay/res/drawable/ic_wifi_24px.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/Android.bp b/packages/overlays/IconPackFilledAndroidOverlay/Android.bp new file mode 100644 index 000000000000..3c4025d6026c --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackFilledAndroidOverlay", + theme: "IconPackFilledAndroid", + product_specific: true, +} diff --git a/packages/overlays/IconPackFilledAndroidOverlay/AndroidManifest.xml b/packages/overlays/IconPackFilledAndroidOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..6613407ea5b9 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_audio_alarm.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_audio_alarm.xml new file mode 100644 index 000000000000..ee77bd1e6cd2 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_audio_alarm.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml new file mode 100644 index 000000000000..e498f803f687 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_battery_80_24dp.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_battery_80_24dp.xml new file mode 100644 index 000000000000..eb8550fb9f44 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_battery_80_24dp.xml @@ -0,0 +1,31 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml new file mode 100644 index 000000000000..8ff3c1cf06f5 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml new file mode 100644 index 000000000000..bd5aefac7187 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml @@ -0,0 +1,28 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml new file mode 100644 index 000000000000..4b98a0f92706 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml new file mode 100644 index 000000000000..1924ba8fd421 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml new file mode 100644 index 000000000000..26527ead9cc4 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml new file mode 100644 index 000000000000..562ed17ae1ec --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_laptop.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_laptop.xml new file mode 100644 index 000000000000..464658b53b27 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_laptop.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_misc_hid.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_misc_hid.xml new file mode 100644 index 000000000000..6b9735c1acfb --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_misc_hid.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_network_pan.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_network_pan.xml new file mode 100644 index 000000000000..59a18bad6c66 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_network_pan.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml new file mode 100644 index 000000000000..a05cf658b2ec --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_corp_badge.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_corp_badge.xml new file mode 100644 index 000000000000..1eba6a49a034 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_corp_badge.xml @@ -0,0 +1,27 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_expand_more.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_expand_more.xml new file mode 100644 index 000000000000..82436f52dd4a --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_expand_more.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_faster_emergency.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_faster_emergency.xml new file mode 100644 index 000000000000..cf9166a7a70f --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_faster_emergency.xml @@ -0,0 +1,27 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_file_copy.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_file_copy.xml new file mode 100644 index 000000000000..e479f506bac5 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_file_copy.xml @@ -0,0 +1,27 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml new file mode 100644 index 000000000000..eb2345204e7c --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_hotspot_transient_animation_drawable.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_hotspot_transient_animation_drawable.xml new file mode 100644 index 000000000000..317126228e34 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_hotspot_transient_animation_drawable.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_info_outline_24.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_info_outline_24.xml new file mode 100644 index 000000000000..ce233b7f2614 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_info_outline_24.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_lock.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_lock.xml new file mode 100644 index 000000000000..b2fa85f9fd16 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_lock.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_lock_bugreport.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_lock_bugreport.xml new file mode 100644 index 000000000000..bea2b9ebe97f --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_lock_bugreport.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_lock_open.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_lock_open.xml new file mode 100644 index 000000000000..13bfbf901adb --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_lock_open.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_lock_power_off.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_lock_power_off.xml new file mode 100644 index 000000000000..e9da50e597bf --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_lock_power_off.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_lockscreen_ime.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_lockscreen_ime.xml new file mode 100644 index 000000000000..16541e614965 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_lockscreen_ime.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_mode_edit.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_mode_edit.xml new file mode 100644 index 000000000000..bb3c043f68f5 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_mode_edit.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_notifications_alerted.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_notifications_alerted.xml new file mode 100644 index 000000000000..0847a3564998 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_notifications_alerted.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_phone.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_phone.xml new file mode 100644 index 000000000000..adf521c853ae --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_phone.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_airplane.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_airplane.xml new file mode 100644 index 000000000000..52178649cd62 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_airplane.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml new file mode 100644 index 000000000000..aa938b4c6b87 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_battery_saver.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_battery_saver.xml new file mode 100644 index 000000000000..4f7d96381e6e --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_battery_saver.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_bluetooth.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_bluetooth.xml new file mode 100644 index 000000000000..18a60d82faed --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_bluetooth.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_dnd.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_dnd.xml new file mode 100644 index 000000000000..0655ac0b12b9 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_dnd.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_flashlight.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_flashlight.xml new file mode 100644 index 000000000000..c0bcb68b54dc --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_flashlight.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_night_display_on.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_night_display_on.xml new file mode 100644 index 000000000000..8eaddd542f76 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_night_display_on.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml new file mode 100644 index 000000000000..5eea8895aaa1 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_restart.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_restart.xml new file mode 100644 index 000000000000..e4780d97044c --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_restart.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_screenshot.xml new file mode 100644 index 000000000000..e98d2c03e1da --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_screenshot.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_settings_bluetooth.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_settings_bluetooth.xml new file mode 100644 index 000000000000..18a60d82faed --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_settings_bluetooth.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml new file mode 100644 index 000000000000..560309ec6945 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml @@ -0,0 +1,28 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml new file mode 100644 index 000000000000..560309ec6945 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml @@ -0,0 +1,28 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml new file mode 100644 index 000000000000..6f6ecaf22e89 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml @@ -0,0 +1,31 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml new file mode 100644 index 000000000000..f986c489ee02 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml new file mode 100644 index 000000000000..876cd0320f03 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml @@ -0,0 +1,31 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml new file mode 100644 index 000000000000..d6b61c86a74f --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml new file mode 100644 index 000000000000..883740f85836 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml @@ -0,0 +1,31 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml new file mode 100644 index 000000000000..8ca2eb6c61d9 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml new file mode 100644 index 000000000000..fe2f04e6fd91 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml new file mode 100644 index 000000000000..350b1b596d70 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml new file mode 100644 index 000000000000..fe2f04e6fd91 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_location.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_location.xml new file mode 100644 index 000000000000..ecab3a3d9b21 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_location.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml new file mode 100644 index 000000000000..1407d0f1004b --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation_drawable.xml new file mode 100644 index 000000000000..12092cb77cc5 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation_drawable.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_wifi_signal_0.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_wifi_signal_0.xml new file mode 100644 index 000000000000..679651998d23 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_wifi_signal_0.xml @@ -0,0 +1,28 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_wifi_signal_1.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_wifi_signal_1.xml new file mode 100644 index 000000000000..5067e876e5c2 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_wifi_signal_1.xml @@ -0,0 +1,31 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_wifi_signal_2.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_wifi_signal_2.xml new file mode 100644 index 000000000000..1e8546a6df8e --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_wifi_signal_2.xml @@ -0,0 +1,31 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_wifi_signal_3.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_wifi_signal_3.xml new file mode 100644 index 000000000000..1a87f764c7ec --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_wifi_signal_3.xml @@ -0,0 +1,31 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_wifi_signal_4.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_wifi_signal_4.xml new file mode 100644 index 000000000000..325f2dd36cc2 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_wifi_signal_4.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_activity_recognition.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_activity_recognition.xml new file mode 100644 index 000000000000..67d28c60b7a0 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_activity_recognition.xml @@ -0,0 +1,27 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_aural.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_aural.xml new file mode 100644 index 000000000000..3f5c75b66f4c --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_aural.xml @@ -0,0 +1,27 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_calendar.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_calendar.xml new file mode 100644 index 000000000000..0144ba2fbf36 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_calendar.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_call_log.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_call_log.xml new file mode 100644 index 000000000000..590ced09e4af --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_call_log.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_camera.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_camera.xml new file mode 100644 index 000000000000..b063e2bb6985 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_camera.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_contacts.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_contacts.xml new file mode 100644 index 000000000000..54cfeec0355e --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_contacts.xml @@ -0,0 +1,27 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_location.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_location.xml new file mode 100644 index 000000000000..3815921846b7 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_location.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_microphone.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_microphone.xml new file mode 100644 index 000000000000..e6493bc95ff2 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_microphone.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_phone_calls.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_phone_calls.xml new file mode 100644 index 000000000000..ae84541e0801 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_phone_calls.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_sensors.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_sensors.xml new file mode 100644 index 000000000000..88f0c541caf5 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_sensors.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_sms.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_sms.xml new file mode 100644 index 000000000000..7a320e0c81e2 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_sms.xml @@ -0,0 +1,27 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_storage.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_storage.xml new file mode 100644 index 000000000000..0ad7e6d3484b --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_storage.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_visual.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_visual.xml new file mode 100644 index 000000000000..d5bdb872825e --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_visual.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/values/config.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/values/config.xml new file mode 100644 index 000000000000..f1d8c7345396 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/values/config.xml @@ -0,0 +1,44 @@ + + + + + M 4,0 V 2 H 2.33 C 1.6,2 1,2.6 1,3.33 V 18.66 C 1,19.4 1.6,20 2.33,20 H 9.66 C 10.4,20 11,19.4 11,18.67 V 3.33 C 11,2.6 10.4,2 9.67,2 H 8 V 0 Z + + + M 3.5,0 V 0.5 1.5 H 2.3301 C 1.3261,1.5 0.5,2.3261 0.5,3.3301 V 18.16 C 0.5,19.17 1.3261,20 2.3301,20 H 9.6602 C 10.67,20 11.5,19.174 11.5,18.17 V 3.3301 C 11.5,2.3261 10.674,1.5 9.6699,1.5 H 8.5 V 0 Z M 9.1698,2.9999 C 9.6259,2.9999 9.9999,3.374 9.9999,3.83 V 17.67 C 9.9999,18.126 9.6299,18.5 9.1601,18.5 H 2.83 C 2.3741,18.5 2,18.13 2,17.66 V 3.83 C 2,3.374 2.3741,2.9999 2.83,2.9999 Z + + + M 4,0 V 2 H 2.33 C 1.6,2 1,2.6 1,3.33 V 18.66 C 1,19.4 1.6,20 2.33,20 H 9.66 C 10.4,20 11,19.4 11,18.67 V 3.33 C 11,2.6 10.4,2 9.67,2 H 8 V 0 Z + + + M 8.58,10 C 8.77,10 8.89,10.2 8.8,10.37 L 5.94,15.74 C 5.7,16.19 5,16.02 5,15.5 V 12 H 3.42 C 3.23,12 3.11,11.8 3.2,11.63 L 6.06,6.26 C 6.3,5.81 7,5.98 7,6.5 V 10 Z + + + M 9,11 C 9,11.55 8.55,12 8,12 H 7 V 13 C 7,13.55 6.55,14 6,14 5.45,14 5,13.55 5,13 V 12 H 4 C 3.45,12 3,11.55 3,11 3,10.45 3.45,10.005 4,10 H 5 V 9 C 5,8.45 5.45,8 6,8 6.55,8 7,8.45 7,9 V 10 H 8 C 8.55,10 9,10.45 9,11 Z + + true + + + M 21.7,20.28 L 19.92,18.5 L 21.7,16.72 C 22.1,16.32 22.1,15.68 21.71,15.29 C 21.32,14.9 20.68,14.9 20.28,15.3 L 18.5,17.08 L 16.72,15.3 C 16.32,14.9 15.68,14.9 15.29,15.29 C 14.9,15.68 14.9,16.32 15.3,16.72 L 17.08,18.5 L 15.3,20.28 C 14.9,20.68 14.9,21.32 15.29,21.71 C 15.68,22.1 16.32,22.1 16.72,21.7 L 18.5,19.92 L 20.28,21.7 C 20.68,22.1 21.32,22.1 21.71,21.71 C 22.1,21.32 22.1,20.68 21.7,20.28 + + + 11 + 11 + diff --git a/packages/overlays/IconPackFilledLauncherOverlay/Android.bp b/packages/overlays/IconPackFilledLauncherOverlay/Android.bp new file mode 100644 index 000000000000..3c5078ce5933 --- /dev/null +++ b/packages/overlays/IconPackFilledLauncherOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackFilledLauncherOverlay", + theme: "IconPackFilledLauncher", + product_specific: true, +} diff --git a/packages/overlays/IconPackFilledLauncherOverlay/AndroidManifest.xml b/packages/overlays/IconPackFilledLauncherOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..0b9f636931c0 --- /dev/null +++ b/packages/overlays/IconPackFilledLauncherOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_corp.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_corp.xml new file mode 100644 index 000000000000..0dfaf8188f8d --- /dev/null +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_corp.xml @@ -0,0 +1,23 @@ + + + + diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_corp_off.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_corp_off.xml new file mode 100644 index 000000000000..b3f353a16943 --- /dev/null +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_corp_off.xml @@ -0,0 +1,26 @@ + + + + + diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_drag_handle.xml new file mode 100644 index 000000000000..1e14a3b8195d --- /dev/null +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_drag_handle.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_hourglass_top.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_hourglass_top.xml new file mode 100644 index 000000000000..b90019c9489a --- /dev/null +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_hourglass_top.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_info_no_shadow.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_info_no_shadow.xml new file mode 100644 index 000000000000..dd095ab801b4 --- /dev/null +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_info_no_shadow.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_install_no_shadow.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_install_no_shadow.xml new file mode 100644 index 000000000000..2855bfc9caa7 --- /dev/null +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_install_no_shadow.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_palette.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_palette.xml new file mode 100644 index 000000000000..7e7094272529 --- /dev/null +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_palette.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_pin.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_pin.xml new file mode 100644 index 000000000000..80232d887001 --- /dev/null +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_pin.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_remove_no_shadow.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_remove_no_shadow.xml new file mode 100644 index 000000000000..f9532a1159df --- /dev/null +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_remove_no_shadow.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_screenshot.xml new file mode 100644 index 000000000000..1d291c93fb4d --- /dev/null +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_screenshot.xml @@ -0,0 +1,29 @@ + + + + + + diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_select.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_select.xml new file mode 100644 index 000000000000..51d4a1183fb9 --- /dev/null +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_select.xml @@ -0,0 +1,23 @@ + + + + diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_setting.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_setting.xml new file mode 100644 index 000000000000..b3625ac9cf15 --- /dev/null +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_setting.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_share.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_share.xml new file mode 100644 index 000000000000..89ee5274e48f --- /dev/null +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_share.xml @@ -0,0 +1,39 @@ + + + + + + + + diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_smartspace_preferences.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_smartspace_preferences.xml new file mode 100644 index 000000000000..e0b39fc41b1f --- /dev/null +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_smartspace_preferences.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_split_screen.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_split_screen.xml new file mode 100644 index 000000000000..c2c7ede6f796 --- /dev/null +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_split_screen.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml new file mode 100644 index 000000000000..b7cc52a96ebe --- /dev/null +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_warning.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_warning.xml new file mode 100644 index 000000000000..697f5d832d38 --- /dev/null +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_warning.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_widget.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_widget.xml new file mode 100644 index 000000000000..329c0d65f467 --- /dev/null +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_widget.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/Android.bp b/packages/overlays/IconPackFilledSettingsOverlay/Android.bp new file mode 100644 index 000000000000..b5148c23e053 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackFilledSettingsOverlay", + theme: "IconPackFilledSettings", + product_specific: true, +} diff --git a/packages/overlays/IconPackFilledSettingsOverlay/AndroidManifest.xml b/packages/overlays/IconPackFilledSettingsOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..de81e21a8bca --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/drag_handle.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/drag_handle.xml new file mode 100644 index 000000000000..413e9b9e4687 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/drag_handle.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_add_24dp.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_add_24dp.xml new file mode 100644 index 000000000000..ec1167f83a74 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_add_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_airplanemode_active.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_airplanemode_active.xml new file mode 100644 index 000000000000..e853e072180f --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_airplanemode_active.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_android.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_android.xml new file mode 100644 index 000000000000..afa84e43a226 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_android.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_apps.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_apps.xml new file mode 100644 index 000000000000..74b13fd4c1ec --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_apps.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_arrow_back.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_arrow_back.xml new file mode 100644 index 000000000000..deb77c820ecb --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_arrow_back.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml new file mode 100644 index 000000000000..82436f52dd4a --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_battery_charging_full.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_battery_charging_full.xml new file mode 100644 index 000000000000..6778b0456844 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_battery_charging_full.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml new file mode 100644 index 000000000000..0cd743b46998 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml new file mode 100644 index 000000000000..15b8279bb012 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_call_24dp.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_call_24dp.xml new file mode 100644 index 000000000000..b3d54051f5b0 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_call_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_cancel.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_cancel.xml new file mode 100644 index 000000000000..2a668cb3c4de --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_cancel.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_cast_24dp.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_cast_24dp.xml new file mode 100644 index 000000000000..5ab76eb54363 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_cast_24dp.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_cellular_off.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_cellular_off.xml new file mode 100644 index 000000000000..466ae50cb46a --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_cellular_off.xml @@ -0,0 +1,33 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml new file mode 100644 index 000000000000..b5b514a57e9d --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml new file mode 100644 index 000000000000..e479f506bac5 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml @@ -0,0 +1,27 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_data_saver.xml new file mode 100644 index 000000000000..5c85eb36b41c --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_data_saver.xml @@ -0,0 +1,33 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_delete.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_delete.xml new file mode 100644 index 000000000000..6f92fed79e48 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_delete.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_devices_other.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_devices_other.xml new file mode 100644 index 000000000000..33a4b29aba00 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_devices_other.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_devices_other_32dp.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_devices_other_32dp.xml new file mode 100644 index 000000000000..c78050eeab0e --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_devices_other_32dp.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml new file mode 100644 index 000000000000..b4baf231d1b6 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_eject_24dp.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_eject_24dp.xml new file mode 100644 index 000000000000..7af92461d3f9 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_eject_24dp.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_expand_less.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_expand_less.xml new file mode 100644 index 000000000000..7721ad625c4e --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_expand_less.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_expand_more_inverse.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_expand_more_inverse.xml new file mode 100644 index 000000000000..4c4967befbb3 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_expand_more_inverse.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_find_in_page_24px.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_find_in_page_24px.xml new file mode 100644 index 000000000000..dd35dae227b0 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_find_in_page_24px.xml @@ -0,0 +1,27 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml new file mode 100644 index 000000000000..0ad7e6d3484b --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_friction_lock_closed.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_friction_lock_closed.xml new file mode 100644 index 000000000000..34e0ba1ee1b2 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_friction_lock_closed.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml new file mode 100644 index 000000000000..6b5903c569c0 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_headset_24dp.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_headset_24dp.xml new file mode 100644 index 000000000000..1924ba8fd421 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_headset_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_help.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_help.xml new file mode 100644 index 000000000000..42854a4777d2 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_help.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_help_actionbar.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_help_actionbar.xml new file mode 100644 index 000000000000..4d6d9dd0a9e5 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_help_actionbar.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_homepage_search.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_homepage_search.xml new file mode 100644 index 000000000000..58cc0b461164 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_homepage_search.xml @@ -0,0 +1,27 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_info_outline_24.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_info_outline_24.xml new file mode 100644 index 000000000000..39907123f221 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_info_outline_24.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_local_movies.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_local_movies.xml new file mode 100644 index 000000000000..7031634c7692 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_local_movies.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml new file mode 100644 index 000000000000..ae84541e0801 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_lock.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_lock.xml new file mode 100644 index 000000000000..39b62c097544 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_lock.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_media_stream.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_media_stream.xml new file mode 100644 index 000000000000..0422d8e904a3 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_media_stream.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_media_stream_off.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_media_stream_off.xml new file mode 100644 index 000000000000..e3a4e24a04da --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_media_stream_off.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_network_cell.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_network_cell.xml new file mode 100644 index 000000000000..d62758e51976 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_network_cell.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_notifications.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_notifications.xml new file mode 100644 index 000000000000..71dfb13f8006 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_notifications.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_notifications_alert.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_notifications_alert.xml new file mode 100644 index 000000000000..2f5bdb0ecbe3 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_notifications_alert.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml new file mode 100644 index 000000000000..c6cd0159854e --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml @@ -0,0 +1,33 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_phone_info.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_phone_info.xml new file mode 100644 index 000000000000..e932b9b88a0f --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_phone_info.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_photo_library.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_photo_library.xml new file mode 100644 index 000000000000..d5bdb872825e --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_photo_library.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_scan_24dp.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_scan_24dp.xml new file mode 100644 index 000000000000..146e20fc68d0 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_scan_24dp.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_search_24dp.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_search_24dp.xml new file mode 100644 index 000000000000..30d47963b271 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_search_24dp.xml @@ -0,0 +1,27 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_accent.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_accent.xml new file mode 100644 index 000000000000..f2741d19b2e5 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_accent.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_accessibility.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_accessibility.xml new file mode 100644 index 000000000000..db456387f369 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_accessibility.xml @@ -0,0 +1,37 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_accounts.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_accounts.xml new file mode 100644 index 000000000000..0d4a244e7040 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_accounts.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_backup.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_backup.xml new file mode 100644 index 000000000000..9087b969d196 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_backup.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_battery_white.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_battery_white.xml new file mode 100644 index 000000000000..bb1138831db7 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_battery_white.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_data_usage.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_data_usage.xml new file mode 100644 index 000000000000..f6b837e94bba --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_data_usage.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_date_time.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_date_time.xml new file mode 100644 index 000000000000..96cbbf116ac6 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_date_time.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_delete.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_delete.xml new file mode 100644 index 000000000000..94c63118cf76 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_delete.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_disable.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_disable.xml new file mode 100644 index 000000000000..b816e4e838fe --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_disable.xml @@ -0,0 +1,36 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_display_white.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_display_white.xml new file mode 100644 index 000000000000..2c931e48fa15 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_display_white.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_enable.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_enable.xml new file mode 100644 index 000000000000..d0b6209b38ad --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_enable.xml @@ -0,0 +1,36 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_home.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_home.xml new file mode 100644 index 000000000000..85430f020b2c --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_home.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_language.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_language.xml new file mode 100644 index 000000000000..e23b9b6ebf58 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_language.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_location.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_location.xml new file mode 100644 index 000000000000..8732ea5cb99d --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_location.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_multiuser.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_multiuser.xml new file mode 100644 index 000000000000..accc694238d9 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_multiuser.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_night_display.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_night_display.xml new file mode 100644 index 000000000000..b5456ac30b9e --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_night_display.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_open.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_open.xml new file mode 100644 index 000000000000..890fcf75c764 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_open.xml @@ -0,0 +1,29 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_print.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_print.xml new file mode 100644 index 000000000000..b9d6d9ab2922 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_print.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_privacy.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_privacy.xml new file mode 100644 index 000000000000..2ebdc8f3fc96 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_privacy.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_security_white.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_security_white.xml new file mode 100644 index 000000000000..ecaed01a945f --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_security_white.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_sim.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_sim.xml new file mode 100644 index 000000000000..b58d034827da --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_sim.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml new file mode 100644 index 000000000000..659a926bf7a3 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_wireless.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_wireless.xml new file mode 100644 index 000000000000..6e80d1349fc2 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_settings_wireless.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_storage.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_storage.xml new file mode 100644 index 000000000000..ab2186deb3e8 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_storage.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_storage_white.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_storage_white.xml new file mode 100644 index 000000000000..9eb336c44141 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_storage_white.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_suggestion_night_display.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_suggestion_night_display.xml new file mode 100644 index 000000000000..b5456ac30b9e --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_suggestion_night_display.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_sync.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_sync.xml new file mode 100644 index 000000000000..27954a983b99 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_sync.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml new file mode 100644 index 000000000000..f2dd9e818fc4 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml @@ -0,0 +1,27 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_system_update.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_system_update.xml new file mode 100644 index 000000000000..149564cebd0c --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_system_update.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml new file mode 100644 index 000000000000..45c23d7d81e5 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml new file mode 100644 index 000000000000..552e8a920f69 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml @@ -0,0 +1,38 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_volume_up_24dp.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_volume_up_24dp.xml new file mode 100644 index 000000000000..b94035100e40 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_volume_up_24dp.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_vpn_key.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_vpn_key.xml new file mode 100644 index 000000000000..f9f558460a9b --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_vpn_key.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_wifi_tethering.xml b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_wifi_tethering.xml new file mode 100644 index 000000000000..c8bcd52899d5 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_wifi_tethering.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/Android.bp b/packages/overlays/IconPackFilledSystemUIOverlay/Android.bp new file mode 100644 index 000000000000..eb040a5a132d --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackFilledSystemUIOverlay", + theme: "IconPackFilledSystemUI", + product_specific: true, +} diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/AndroidManifest.xml b/packages/overlays/IconPackFilledSystemUIOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..a1210c724341 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_alarm.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_alarm.xml new file mode 100644 index 000000000000..426a3033f8c5 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_alarm.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_alarm_dim.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_alarm_dim.xml new file mode 100644 index 000000000000..426a3033f8c5 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_alarm_dim.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_arrow_back.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_arrow_back.xml new file mode 100644 index 000000000000..deb77c820ecb --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_arrow_back.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml new file mode 100644 index 000000000000..6881b393737d --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_brightness_thumb.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_brightness_thumb.xml new file mode 100644 index 000000000000..1b881eac9fc2 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_brightness_thumb.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_camera.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_camera.xml new file mode 100644 index 000000000000..fac551cf4a63 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_camera.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_cast.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_cast.xml new file mode 100644 index 000000000000..c13bcf9ef7d6 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_cast.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_cast_connected.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_cast_connected.xml new file mode 100644 index 000000000000..bbe2cff62720 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_cast_connected.xml @@ -0,0 +1,37 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_cast_connected_fill.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_cast_connected_fill.xml new file mode 100644 index 000000000000..1b21db0d95d0 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_cast_connected_fill.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_close_white.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_close_white.xml new file mode 100644 index 000000000000..4bfff2cb3ad8 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_close_white.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_data_saver.xml new file mode 100644 index 000000000000..28b8ba1bccfc --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_data_saver.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_data_saver_off.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_data_saver_off.xml new file mode 100644 index 000000000000..5bb56f452141 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_data_saver_off.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_drag_handle.xml new file mode 100644 index 000000000000..824ad49d441e --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_drag_handle.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_headset.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_headset.xml new file mode 100644 index 000000000000..1b0f2525d19a --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_headset.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_headset_mic.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_headset_mic.xml new file mode 100644 index 000000000000..57ad6f07bd62 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_headset_mic.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_hotspot.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_hotspot.xml new file mode 100644 index 000000000000..616b4f75dc2d --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_hotspot.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_info.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_info.xml new file mode 100644 index 000000000000..ce233b7f2614 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_info.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_info_outline.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_info_outline.xml new file mode 100644 index 000000000000..ce233b7f2614 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_info_outline.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_invert_colors.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_invert_colors.xml new file mode 100644 index 000000000000..24ec6e55de5f --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_invert_colors.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_location.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_location.xml new file mode 100644 index 000000000000..fd68b1759bde --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_location.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml new file mode 100644 index 000000000000..4cd05f3374c9 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_notifications_alert.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_notifications_alert.xml new file mode 100644 index 000000000000..0847a3564998 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_notifications_alert.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_notifications_silence.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_notifications_silence.xml new file mode 100644 index 000000000000..73ab8f382c3d --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_notifications_silence.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_power_low.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_power_low.xml new file mode 100644 index 000000000000..15b8279bb012 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_power_low.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_power_saver.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_power_saver.xml new file mode 100644 index 000000000000..22e183c694d5 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_power_saver.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml new file mode 100644 index 000000000000..59a18bad6c66 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_bluetooth_on.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_bluetooth_on.xml new file mode 100644 index 000000000000..1342c3e5a517 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_bluetooth_on.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_cancel.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_cancel.xml new file mode 100644 index 000000000000..2a668cb3c4de --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_cancel.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_no_sim.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_no_sim.xml new file mode 100644 index 000000000000..e91f33b0c420 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_no_sim.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml new file mode 100644 index 000000000000..147b4b93bea0 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml new file mode 100644 index 000000000000..ea0ee5dfc282 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml @@ -0,0 +1,31 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml new file mode 100644 index 000000000000..e5412e2e9dd2 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml @@ -0,0 +1,31 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml new file mode 100644 index 000000000000..c864952208fe --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml @@ -0,0 +1,31 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml new file mode 100644 index 000000000000..33863d39b8e1 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml @@ -0,0 +1,31 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml new file mode 100644 index 000000000000..4c9ff9d72009 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_screenrecord.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_screenrecord.xml new file mode 100644 index 000000000000..1a7c63c08894 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_screenrecord.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_screenshot_delete.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_screenshot_delete.xml new file mode 100644 index 000000000000..94c63118cf76 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_screenshot_delete.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_settings.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_settings.xml new file mode 100644 index 000000000000..30e866095675 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_settings.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_settings_16dp.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_settings_16dp.xml new file mode 100644 index 000000000000..c78e533cae00 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_settings_16dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_swap_vert.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_swap_vert.xml new file mode 100644 index 000000000000..f19c6cdb4a89 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_swap_vert.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml new file mode 100644 index 000000000000..d3b2dd1ac603 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml @@ -0,0 +1,40 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_alarm.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_alarm.xml new file mode 100644 index 000000000000..e27c2edf09d0 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_alarm.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml new file mode 100644 index 000000000000..e498f803f687 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml new file mode 100644 index 000000000000..cbe7d8c427b4 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_media.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_media.xml new file mode 100644 index 000000000000..0422d8e904a3 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_media.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_media_mute.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_media_mute.xml new file mode 100644 index 000000000000..e3a4e24a04da --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_media_mute.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_notification.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_notification.xml new file mode 100644 index 000000000000..199e8e868c69 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_notification.xml @@ -0,0 +1,30 @@ + + + + + + + diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_notification_mute.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_notification_mute.xml new file mode 100644 index 000000000000..574eb40fc05d --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_notification_mute.xml @@ -0,0 +1,33 @@ + + + + + + + + diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml new file mode 100644 index 000000000000..42ef41cfe9c0 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml new file mode 100644 index 000000000000..f164ba877096 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml @@ -0,0 +1,29 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_ringer.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_ringer.xml new file mode 100644 index 000000000000..71dfb13f8006 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_ringer.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml new file mode 100644 index 000000000000..9944bb5b4f69 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml new file mode 100644 index 000000000000..9f8dbb7184f0 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml @@ -0,0 +1,37 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_voice.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_voice.xml new file mode 100644 index 000000000000..ae84541e0801 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_volume_voice.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/stat_sys_camera.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/stat_sys_camera.xml new file mode 100644 index 000000000000..ae3e7e2d60c6 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/stat_sys_camera.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml new file mode 100644 index 000000000000..10d6d3d2f18c --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/stat_sys_mic_none.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/stat_sys_mic_none.xml new file mode 100644 index 000000000000..4ce578bb23b9 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/stat_sys_mic_none.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml new file mode 100644 index 000000000000..ee48413b47b0 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledThemePickerOverlay/Android.bp b/packages/overlays/IconPackFilledThemePickerOverlay/Android.bp new file mode 100644 index 000000000000..bee48089109b --- /dev/null +++ b/packages/overlays/IconPackFilledThemePickerOverlay/Android.bp @@ -0,0 +1,31 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackFilledThemePickerOverlay", + theme: "IconPackFilledThemePicker", + certificate: "platform", + product_specific: true, +} diff --git a/packages/overlays/IconPackFilledThemePickerOverlay/AndroidManifest.xml b/packages/overlays/IconPackFilledThemePickerOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..503a063ac869 --- /dev/null +++ b/packages/overlays/IconPackFilledThemePickerOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_add_24px.xml b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_add_24px.xml new file mode 100644 index 000000000000..1768723b65e9 --- /dev/null +++ b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_add_24px.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_close_24px.xml b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_close_24px.xml new file mode 100644 index 000000000000..4bfff2cb3ad8 --- /dev/null +++ b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_close_24px.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_colorize_24px.xml b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_colorize_24px.xml new file mode 100644 index 000000000000..aa3a925b50c8 --- /dev/null +++ b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_colorize_24px.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_delete_24px.xml b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_delete_24px.xml new file mode 100644 index 000000000000..94c63118cf76 --- /dev/null +++ b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_delete_24px.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_font.xml b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_font.xml new file mode 100644 index 000000000000..760382385f79 --- /dev/null +++ b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_font.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_nav_clock.xml b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_nav_clock.xml new file mode 100644 index 000000000000..11260159e3bd --- /dev/null +++ b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_nav_clock.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_nav_grid.xml b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_nav_grid.xml new file mode 100644 index 000000000000..0397b6c3744c --- /dev/null +++ b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_nav_grid.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_nav_theme.xml b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_nav_theme.xml new file mode 100644 index 000000000000..6f0462cd9932 --- /dev/null +++ b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_nav_theme.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml new file mode 100644 index 000000000000..ea195ca209e7 --- /dev/null +++ b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml @@ -0,0 +1,40 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_shapes_24px.xml b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_shapes_24px.xml new file mode 100644 index 000000000000..cea09b56dd1d --- /dev/null +++ b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_shapes_24px.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_tune.xml b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_tune.xml new file mode 100644 index 000000000000..ae03b51f7010 --- /dev/null +++ b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_tune.xml @@ -0,0 +1,40 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_wifi_24px.xml b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_wifi_24px.xml new file mode 100644 index 000000000000..03e142e2be35 --- /dev/null +++ b/packages/overlays/IconPackFilledThemePickerOverlay/res/drawable/ic_wifi_24px.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/Android.bp b/packages/overlays/IconPackKaiAndroidOverlay/Android.bp new file mode 100644 index 000000000000..ee588c1f1c55 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright (C) 2020, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackKaiAndroidOverlay", + theme: "IconPackKaiAndroid", + product_specific: true, +} diff --git a/packages/overlays/IconPackKaiAndroidOverlay/AndroidManifest.xml b/packages/overlays/IconPackKaiAndroidOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..f722d21af515 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_audio_alarm.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_audio_alarm.xml new file mode 100644 index 000000000000..683e2b60a52c --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_audio_alarm.xml @@ -0,0 +1,34 @@ + + + + + + + diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml new file mode 100644 index 000000000000..c1588817ff4d --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_battery_80_24dp.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_battery_80_24dp.xml new file mode 100644 index 000000000000..c47f6a3db571 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_battery_80_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml new file mode 100644 index 000000000000..db1f8342b7b6 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml new file mode 100644 index 000000000000..3fd9f795d04e --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml new file mode 100644 index 000000000000..412096abd7a4 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml new file mode 100644 index 000000000000..08db7e195964 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml new file mode 100644 index 000000000000..e1ef2142f01d --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_laptop.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_laptop.xml new file mode 100644 index 000000000000..70b271d75744 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_laptop.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_misc_hid.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_misc_hid.xml new file mode 100644 index 000000000000..4d3edfe62888 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_misc_hid.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_network_pan.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_network_pan.xml new file mode 100644 index 000000000000..fc0cd0be1f2d --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_network_pan.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml new file mode 100644 index 000000000000..52113c72f974 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_corp_badge.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_corp_badge.xml new file mode 100644 index 000000000000..4e6792b18bba --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_corp_badge.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_expand_more.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_expand_more.xml new file mode 100644 index 000000000000..e428f0c669b0 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_expand_more.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_faster_emergency.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_faster_emergency.xml new file mode 100644 index 000000000000..6297ff81da14 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_faster_emergency.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_file_copy.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_file_copy.xml new file mode 100644 index 000000000000..e291f5463af7 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_file_copy.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml new file mode 100644 index 000000000000..1978993d7875 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock.xml new file mode 100644 index 000000000000..c865ac3bedd3 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock_bugreport.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock_bugreport.xml new file mode 100644 index 000000000000..58b187910981 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock_bugreport.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock_open.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock_open.xml new file mode 100644 index 000000000000..3d13b791087a --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock_open.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock_power_off.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock_power_off.xml new file mode 100644 index 000000000000..5b89fc4d9933 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lock_power_off.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lockscreen_ime.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lockscreen_ime.xml new file mode 100644 index 000000000000..8f27fb521bf0 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_lockscreen_ime.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_mode_edit.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_mode_edit.xml new file mode 100644 index 000000000000..e9c1b8ef915d --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_mode_edit.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_notifications_alerted.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_notifications_alerted.xml new file mode 100644 index 000000000000..c92bdf6dc62a --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_notifications_alerted.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_phone.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_phone.xml new file mode 100644 index 000000000000..639df5da8ca7 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_phone.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_airplane.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_airplane.xml new file mode 100644 index 000000000000..81e3f317ae83 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_airplane.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml new file mode 100644 index 000000000000..286ecc63ab06 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_battery_saver.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_battery_saver.xml new file mode 100644 index 000000000000..019a159f1dc4 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_battery_saver.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_bluetooth.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_bluetooth.xml new file mode 100644 index 000000000000..125eb9e8e003 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_bluetooth.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_dnd.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_dnd.xml new file mode 100644 index 000000000000..f327772516f0 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_dnd.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_flashlight.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_flashlight.xml new file mode 100644 index 000000000000..3228b7ad8dd0 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_flashlight.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_night_display_on.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_night_display_on.xml new file mode 100644 index 000000000000..3607724462f1 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_night_display_on.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml new file mode 100644 index 000000000000..518c7a74d714 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_restart.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_restart.xml new file mode 100644 index 000000000000..3562b2eed52c --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_restart.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_rules.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_rules.xml new file mode 100644 index 000000000000..58c2653aa848 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_rules.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_screenshot.xml new file mode 100644 index 000000000000..4184a1ec06fb --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_screenshot.xml @@ -0,0 +1,30 @@ + + + + + + diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_settings_bluetooth.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_settings_bluetooth.xml new file mode 100644 index 000000000000..125eb9e8e003 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_settings_bluetooth.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml new file mode 100644 index 000000000000..5936e37d0e87 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml new file mode 100644 index 000000000000..214b9dd2b61e --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml new file mode 100644 index 000000000000..d3dc8b97b100 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml new file mode 100644 index 000000000000..c74c6ab9de4c --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml new file mode 100644 index 000000000000..23eee448cf00 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml new file mode 100644 index 000000000000..201792858551 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml new file mode 100644 index 000000000000..0d847d3c2a1a --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml new file mode 100644 index 000000000000..40846745e3b0 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml new file mode 100644 index 000000000000..d022d9c2fd1b --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml new file mode 100644 index 000000000000..1032619482d4 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml new file mode 100644 index 000000000000..d022d9c2fd1b --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_location.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_location.xml new file mode 100644 index 000000000000..2d1de9490bba --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_location.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml new file mode 100644 index 000000000000..4a06d8392c18 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_0.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_0.xml new file mode 100644 index 000000000000..c36d0f8fe851 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_0.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_1.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_1.xml new file mode 100644 index 000000000000..855297b60105 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_1.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_2.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_2.xml new file mode 100644 index 000000000000..dde9cc204ede --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_2.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_3.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_3.xml new file mode 100644 index 000000000000..14792fc907a2 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_3.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_4.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_4.xml new file mode 100644 index 000000000000..5f603bae20db --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_wifi_signal_4.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_work_apps_off.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_work_apps_off.xml new file mode 100644 index 000000000000..845545d78a1b --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_work_apps_off.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_activity_recognition.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_activity_recognition.xml new file mode 100644 index 000000000000..feb7613c5c92 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_activity_recognition.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_aural.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_aural.xml new file mode 100644 index 000000000000..cb8a8b99dc2e --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_aural.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_calendar.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_calendar.xml new file mode 100644 index 000000000000..be579f06b362 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_calendar.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_call_log.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_call_log.xml new file mode 100644 index 000000000000..24f71170cc36 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_call_log.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_camera.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_camera.xml new file mode 100644 index 000000000000..fba80e368a75 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_camera.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_contacts.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_contacts.xml new file mode 100644 index 000000000000..806949f88de4 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_contacts.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_location.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_location.xml new file mode 100644 index 000000000000..a6cfd8e29df6 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_location.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_microphone.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_microphone.xml new file mode 100644 index 000000000000..c26ee83d191e --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_microphone.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_phone_calls.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_phone_calls.xml new file mode 100644 index 000000000000..8c3a583b5906 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_phone_calls.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_sensors.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_sensors.xml new file mode 100644 index 000000000000..4f2c246b01d4 --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_sensors.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_sms.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_sms.xml new file mode 100644 index 000000000000..373c6c22c45f --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_sms.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_storage.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_storage.xml new file mode 100644 index 000000000000..f08b2a72152b --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_storage.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_visual.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_visual.xml new file mode 100644 index 000000000000..4403b5a72a3d --- /dev/null +++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/perm_group_visual.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiLauncherOverlay/Android.bp b/packages/overlays/IconPackKaiLauncherOverlay/Android.bp new file mode 100644 index 000000000000..dcdad7aaed4e --- /dev/null +++ b/packages/overlays/IconPackKaiLauncherOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackKaiLauncherOverlay", + theme: "IconPackKaiLauncher", + product_specific: true, +} diff --git a/packages/overlays/IconPackKaiLauncherOverlay/AndroidManifest.xml b/packages/overlays/IconPackKaiLauncherOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..184a046cd29c --- /dev/null +++ b/packages/overlays/IconPackKaiLauncherOverlay/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_corp.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_corp.xml new file mode 100644 index 000000000000..819114b44f94 --- /dev/null +++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_corp.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_drag_handle.xml new file mode 100644 index 000000000000..59dcfd7bee29 --- /dev/null +++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_drag_handle.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_hourglass_top.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_hourglass_top.xml new file mode 100644 index 000000000000..452e8f83aaa3 --- /dev/null +++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_hourglass_top.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_info_no_shadow.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_info_no_shadow.xml new file mode 100644 index 000000000000..2c608fdb765b --- /dev/null +++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_info_no_shadow.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_install_no_shadow.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_install_no_shadow.xml new file mode 100644 index 000000000000..59194a37bace --- /dev/null +++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_install_no_shadow.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_palette.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_palette.xml new file mode 100644 index 000000000000..0e1a2df536b2 --- /dev/null +++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_palette.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_pin.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_pin.xml new file mode 100644 index 000000000000..e52578965c39 --- /dev/null +++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_pin.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_screenshot.xml new file mode 100644 index 000000000000..4184a1ec06fb --- /dev/null +++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_screenshot.xml @@ -0,0 +1,30 @@ + + + + + + diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_select.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_select.xml new file mode 100644 index 000000000000..f949a0cbd859 --- /dev/null +++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_select.xml @@ -0,0 +1,24 @@ + + + + diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_setting.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_setting.xml new file mode 100644 index 000000000000..c3f6dc5b5353 --- /dev/null +++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_setting.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_share.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_share.xml new file mode 100644 index 000000000000..c4a09a22ceca --- /dev/null +++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_share.xml @@ -0,0 +1,40 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_smartspace_preferences.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_smartspace_preferences.xml new file mode 100644 index 000000000000..63c69ff8ae22 --- /dev/null +++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_smartspace_preferences.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_split_screen.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_split_screen.xml new file mode 100644 index 000000000000..f7c41026b0c2 --- /dev/null +++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_split_screen.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml new file mode 100644 index 000000000000..5e2a84c37e33 --- /dev/null +++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_warning.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_warning.xml new file mode 100644 index 000000000000..a7cf8004c062 --- /dev/null +++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_warning.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_widget.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_widget.xml new file mode 100644 index 000000000000..820949928460 --- /dev/null +++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_widget.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/Android.bp b/packages/overlays/IconPackKaiSettingsOverlay/Android.bp new file mode 100644 index 000000000000..974bb540f4e7 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackKaiSettingsOverlay", + theme: "IconPackKaiSettings", + product_specific: true, +} diff --git a/packages/overlays/IconPackKaiSettingsOverlay/AndroidManifest.xml b/packages/overlays/IconPackKaiSettingsOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..4b6571ffddb4 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/drag_handle.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/drag_handle.xml new file mode 100644 index 000000000000..955a7c6b7db7 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/drag_handle.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_accessibility_generic.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_accessibility_generic.xml new file mode 100644 index 000000000000..900a3a6cb082 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_accessibility_generic.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_add_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_add_24dp.xml new file mode 100644 index 000000000000..1b4838236c7c --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_add_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_airplanemode_active.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_airplanemode_active.xml new file mode 100644 index 000000000000..5664871470df --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_airplanemode_active.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_android.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_android.xml new file mode 100644 index 000000000000..1430d0c6eae1 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_android.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_apps.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_apps.xml new file mode 100644 index 000000000000..5b1850f5f15d --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_apps.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_arrow_back.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_arrow_back.xml new file mode 100644 index 000000000000..c5f2b3bfce8c --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_arrow_back.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml new file mode 100644 index 000000000000..e428f0c669b0 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_battery_charging_full.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_battery_charging_full.xml new file mode 100644 index 000000000000..d3339fa10faa --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_battery_charging_full.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml new file mode 100644 index 000000000000..5736c4b4b331 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml new file mode 100644 index 000000000000..13786d835570 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_call_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_call_24dp.xml new file mode 100644 index 000000000000..476b5d2b5c5d --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_call_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_cancel.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_cancel.xml new file mode 100644 index 000000000000..e89e95a6a37e --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_cancel.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_cast_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_cast_24dp.xml new file mode 100644 index 000000000000..ad9775f28e21 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_cast_24dp.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_cellular_off.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_cellular_off.xml new file mode 100644 index 000000000000..2f52c457e23f --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_cellular_off.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml new file mode 100644 index 000000000000..688ab578ee6b --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml new file mode 100644 index 000000000000..e291f5463af7 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_data_saver.xml new file mode 100644 index 000000000000..96774bc62bbc --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_data_saver.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_delete.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_delete.xml new file mode 100644 index 000000000000..5e37393dd327 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_delete.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_devices_other.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_devices_other.xml new file mode 100644 index 000000000000..954ff328dbd2 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_devices_other.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml new file mode 100644 index 000000000000..f7d872ad9056 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_eject_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_eject_24dp.xml new file mode 100644 index 000000000000..aa97bd8dbf31 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_eject_24dp.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_expand_less.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_expand_less.xml new file mode 100644 index 000000000000..3acf122ad480 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_expand_less.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_expand_more_inverse.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_expand_more_inverse.xml new file mode 100644 index 000000000000..2b444a3e63a4 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_expand_more_inverse.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_find_in_page_24px.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_find_in_page_24px.xml new file mode 100644 index 000000000000..f11b6b788418 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_find_in_page_24px.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml new file mode 100644 index 000000000000..f08b2a72152b --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_friction_lock_closed.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_friction_lock_closed.xml new file mode 100644 index 000000000000..70ce244c2373 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_friction_lock_closed.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml new file mode 100644 index 000000000000..f4c04ef7a0eb --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_headset_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_headset_24dp.xml new file mode 100644 index 000000000000..412096abd7a4 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_headset_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_help.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_help.xml new file mode 100644 index 000000000000..89b80319a539 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_help.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_help_actionbar.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_help_actionbar.xml new file mode 100644 index 000000000000..81158cbda178 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_help_actionbar.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_homepage_search.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_homepage_search.xml new file mode 100644 index 000000000000..92f4a8aee8fb --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_homepage_search.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_info_outline_24.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_info_outline_24.xml new file mode 100644 index 000000000000..23eb6af23070 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_info_outline_24.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_local_movies.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_local_movies.xml new file mode 100644 index 000000000000..3c328e2895c8 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_local_movies.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml new file mode 100644 index 000000000000..8c3a583b5906 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_media_stream.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_media_stream.xml new file mode 100644 index 000000000000..bf0164714429 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_media_stream.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_media_stream_off.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_media_stream_off.xml new file mode 100644 index 000000000000..5bce7cf657ae --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_media_stream_off.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_network_cell.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_network_cell.xml new file mode 100644 index 000000000000..d39915419f07 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_network_cell.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_notifications.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_notifications.xml new file mode 100644 index 000000000000..ab988389f561 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_notifications.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_notifications_alert.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_notifications_alert.xml new file mode 100644 index 000000000000..c92bdf6dc62a --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_notifications_alert.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml new file mode 100644 index 000000000000..e4383e57010c --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_phone_info.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_phone_info.xml new file mode 100644 index 000000000000..e2246ce7fb16 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_phone_info.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_photo_library.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_photo_library.xml new file mode 100644 index 000000000000..4403b5a72a3d --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_photo_library.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_restore.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_restore.xml new file mode 100644 index 000000000000..c3ab52f4ce59 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_restore.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_search_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_search_24dp.xml new file mode 100644 index 000000000000..204f71bfd78c --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_search_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_accent.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_accent.xml new file mode 100644 index 000000000000..e5bbf85c961d --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_accent.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_accessibility.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_accessibility.xml new file mode 100644 index 000000000000..a92595bea8ac --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_accessibility.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_accounts.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_accounts.xml new file mode 100644 index 000000000000..b17efd1fe3ca --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_accounts.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_backup.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_backup.xml new file mode 100644 index 000000000000..5042a2a855b4 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_backup.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_battery_white.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_battery_white.xml new file mode 100644 index 000000000000..4af480634f85 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_battery_white.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_data_usage.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_data_usage.xml new file mode 100644 index 000000000000..4388d99cbcb2 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_data_usage.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_date_time.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_date_time.xml new file mode 100644 index 000000000000..58eb7f47ad0c --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_date_time.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_delete.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_delete.xml new file mode 100644 index 000000000000..7b592b9cc669 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_delete.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_disable.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_disable.xml new file mode 100644 index 000000000000..1a4bfafc9216 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_disable.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_display_white.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_display_white.xml new file mode 100644 index 000000000000..9eb8a0b0d2e8 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_display_white.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_enable.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_enable.xml new file mode 100644 index 000000000000..e7f3973705b8 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_enable.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_force_stop.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_force_stop.xml new file mode 100644 index 000000000000..e663f5065bca --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_force_stop.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_gestures.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_gestures.xml new file mode 100644 index 000000000000..45bbcb180ecb --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_gestures.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_home.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_home.xml new file mode 100644 index 000000000000..491c8416bdf6 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_home.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_language.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_language.xml new file mode 100644 index 000000000000..8a24d89ddc99 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_language.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_location.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_location.xml new file mode 100644 index 000000000000..d437035642bc --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_location.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_multiuser.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_multiuser.xml new file mode 100644 index 000000000000..484946f82d0e --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_multiuser.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_night_display.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_night_display.xml new file mode 100644 index 000000000000..b064d700a716 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_night_display.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_open.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_open.xml new file mode 100644 index 000000000000..66f0fca13eb3 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_open.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_print.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_print.xml new file mode 100644 index 000000000000..cfec0733f893 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_print.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_privacy.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_privacy.xml new file mode 100644 index 000000000000..28d111da49a9 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_privacy.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_security_white.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_security_white.xml new file mode 100644 index 000000000000..7f654c120583 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_security_white.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_sim.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_sim.xml new file mode 100644 index 000000000000..ae34d859b321 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_sim.xml @@ -0,0 +1,24 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml new file mode 100644 index 000000000000..70d36280c8b1 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_wireless.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_wireless.xml new file mode 100644 index 000000000000..63346a485f0d --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_wireless.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_storage.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_storage.xml new file mode 100644 index 000000000000..6c96cee02330 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_storage.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_storage_white.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_storage_white.xml new file mode 100644 index 000000000000..0ef8a7cc9c6b --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_storage_white.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_suggestion_night_display.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_suggestion_night_display.xml new file mode 100644 index 000000000000..b064d700a716 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_suggestion_night_display.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_sync.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_sync.xml new file mode 100644 index 000000000000..7226da923085 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_sync.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml new file mode 100644 index 000000000000..3a310abfee70 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_system_update.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_system_update.xml new file mode 100644 index 000000000000..aa32400e2c61 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_system_update.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml new file mode 100644 index 000000000000..95a36f661f6d --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml new file mode 100644 index 000000000000..629207f8a931 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_volume_up_24dp.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_volume_up_24dp.xml new file mode 100644 index 000000000000..b9753f5d8e9d --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_volume_up_24dp.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_vpn_key.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_vpn_key.xml new file mode 100644 index 000000000000..e6d922031f08 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_vpn_key.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_wifi_tethering.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_wifi_tethering.xml new file mode 100644 index 000000000000..6193eb59d198 --- /dev/null +++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_wifi_tethering.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/Android.bp b/packages/overlays/IconPackKaiSystemUIOverlay/Android.bp new file mode 100644 index 000000000000..b04ca6132c6d --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright (C) 2020, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackKaiSystemUIOverlay", + theme: "IconPackKaiSystemUI", + product_specific: true, +} diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/AndroidManifest.xml b/packages/overlays/IconPackKaiSystemUIOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..ce80fcf7513a --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_lock.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_lock.xml new file mode 100644 index 000000000000..fbe5f098c395 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_lock.xml @@ -0,0 +1,318 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_scanning.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_scanning.xml new file mode 100644 index 000000000000..e27284d108fb --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_scanning.xml @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_to_error.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_to_error.xml new file mode 100644 index 000000000000..ad9daba1b5a1 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_to_error.xml @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_unlock.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_unlock.xml new file mode 100644 index 000000000000..abca59b3b67a --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_unlock.xml @@ -0,0 +1,296 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_alarm.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_alarm.xml new file mode 100644 index 000000000000..04994d272791 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_alarm.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_alarm_dim.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_alarm_dim.xml new file mode 100644 index 000000000000..04994d272791 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_alarm_dim.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_arrow_back.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_arrow_back.xml new file mode 100644 index 000000000000..c5f2b3bfce8c --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_arrow_back.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml new file mode 100644 index 000000000000..b277cafa7994 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_brightness_thumb.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_brightness_thumb.xml new file mode 100644 index 000000000000..372059eab1da --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_brightness_thumb.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_camera.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_camera.xml new file mode 100644 index 000000000000..faee6d2588ae --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_camera.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_cast.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_cast.xml new file mode 100644 index 000000000000..f935476aed9a --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_cast.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_cast_connected.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_cast_connected.xml new file mode 100644 index 000000000000..ac7c82dc2041 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_cast_connected.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_close_white.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_close_white.xml new file mode 100644 index 000000000000..9f2a4c037a96 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_close_white.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_data_saver.xml new file mode 100644 index 000000000000..89c800871221 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_data_saver.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_data_saver_off.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_data_saver_off.xml new file mode 100644 index 000000000000..d6b0785f1755 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_data_saver_off.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_drag_handle.xml new file mode 100644 index 000000000000..9b216bd29dd8 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_drag_handle.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_headset.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_headset.xml new file mode 100644 index 000000000000..7a235624683d --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_headset.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_headset_mic.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_headset_mic.xml new file mode 100644 index 000000000000..fc232e523c0c --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_headset_mic.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_hotspot.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_hotspot.xml new file mode 100644 index 000000000000..1da172f95601 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_hotspot.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_info.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_info.xml new file mode 100644 index 000000000000..0c0a6827f617 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_info.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_info_outline.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_info_outline.xml new file mode 100644 index 000000000000..0c0a6827f617 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_info_outline.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_invert_colors.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_invert_colors.xml new file mode 100644 index 000000000000..09b5ddf59c23 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_invert_colors.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_location.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_location.xml new file mode 100644 index 000000000000..836eb7d0a06d --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_location.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml new file mode 100644 index 000000000000..814a573fd856 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_notifications_alert.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_notifications_alert.xml new file mode 100644 index 000000000000..c92bdf6dc62a --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_notifications_alert.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_notifications_silence.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_notifications_silence.xml new file mode 100644 index 000000000000..e2953b516f0c --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_notifications_silence.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_power_low.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_power_low.xml new file mode 100644 index 000000000000..13786d835570 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_power_low.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_power_saver.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_power_saver.xml new file mode 100644 index 000000000000..0ba057bf5615 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_power_saver.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml new file mode 100644 index 000000000000..fc0cd0be1f2d --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_cancel.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_cancel.xml new file mode 100644 index 000000000000..e89e95a6a37e --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_cancel.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_no_sim.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_no_sim.xml new file mode 100644 index 000000000000..c1730e44648c --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_no_sim.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml new file mode 100644 index 000000000000..796ba8622fe7 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml new file mode 100644 index 000000000000..538f85bfc018 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml new file mode 100644 index 000000000000..3ae9f72ebac7 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml new file mode 100644 index 000000000000..408a09e1ba4d --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml new file mode 100644 index 000000000000..61ca3d0617a7 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml new file mode 100644 index 000000000000..a788993c656c --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_screenrecord.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_screenrecord.xml new file mode 100644 index 000000000000..a379f9a2cfb9 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_screenrecord.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_screenshot.xml new file mode 100644 index 000000000000..4184a1ec06fb --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_screenshot.xml @@ -0,0 +1,30 @@ + + + + + + diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_screenshot_delete.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_screenshot_delete.xml new file mode 100644 index 000000000000..7b592b9cc669 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_screenshot_delete.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_settings.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_settings.xml new file mode 100644 index 000000000000..8a31cbccc4ab --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_settings.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_swap_vert.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_swap_vert.xml new file mode 100644 index 000000000000..48a75be438c2 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_swap_vert.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml new file mode 100644 index 000000000000..30cd25e63e7d --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml @@ -0,0 +1,23 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml new file mode 100644 index 000000000000..c1588817ff4d --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml new file mode 100644 index 000000000000..da98705ca1ad --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml new file mode 100644 index 000000000000..e5486dd98055 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml new file mode 100644 index 000000000000..e9dc04f68219 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_media.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_media.xml new file mode 100644 index 000000000000..bf0164714429 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_media.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_media_mute.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_media_mute.xml new file mode 100644 index 000000000000..5bce7cf657ae --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_media_mute.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml new file mode 100644 index 000000000000..53eabd9a8c27 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml new file mode 100644 index 000000000000..923c60358c19 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_ringer.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_ringer.xml new file mode 100644 index 000000000000..ab988389f561 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_ringer.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml new file mode 100644 index 000000000000..da336f584099 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml new file mode 100644 index 000000000000..de7453ae34a7 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_voice.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_voice.xml new file mode 100644 index 000000000000..8c3a583b5906 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_voice.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml new file mode 100644 index 000000000000..77533e115f2e --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/stat_sys_mic_none.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/stat_sys_mic_none.xml new file mode 100644 index 000000000000..c901bbdc848e --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/stat_sys_mic_none.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml new file mode 100644 index 000000000000..84203d3c4967 --- /dev/null +++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/Android.bp b/packages/overlays/IconPackKaiThemePickerOverlay/Android.bp new file mode 100644 index 000000000000..875cd1d44d92 --- /dev/null +++ b/packages/overlays/IconPackKaiThemePickerOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackKaiThemePickerOverlay", + theme: "IconPackKaiThemePicker", + product_specific: true, +} diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/AndroidManifest.xml b/packages/overlays/IconPackKaiThemePickerOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..83b89858e8ca --- /dev/null +++ b/packages/overlays/IconPackKaiThemePickerOverlay/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_add_24px.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_add_24px.xml new file mode 100644 index 000000000000..f57b3c883f96 --- /dev/null +++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_add_24px.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_close_24px.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_close_24px.xml new file mode 100644 index 000000000000..9f2a4c037a96 --- /dev/null +++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_close_24px.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_colorize_24px.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_colorize_24px.xml new file mode 100644 index 000000000000..60ed90b87fd1 --- /dev/null +++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_colorize_24px.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_font.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_font.xml new file mode 100644 index 000000000000..cd3e9273efd9 --- /dev/null +++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_font.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_clock.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_clock.xml new file mode 100644 index 000000000000..8bc34990a503 --- /dev/null +++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_clock.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_grid.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_grid.xml new file mode 100644 index 000000000000..41721f04f06e --- /dev/null +++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_grid.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_theme.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_theme.xml new file mode 100644 index 000000000000..f57d2163fab3 --- /dev/null +++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_theme.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml new file mode 100644 index 000000000000..28871562486b --- /dev/null +++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml @@ -0,0 +1,23 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_shapes_24px.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_shapes_24px.xml new file mode 100644 index 000000000000..fb5989f0f191 --- /dev/null +++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_shapes_24px.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_tune.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_tune.xml new file mode 100644 index 000000000000..f66089067da7 --- /dev/null +++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_tune.xml @@ -0,0 +1,23 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_wifi_24px.xml b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_wifi_24px.xml new file mode 100644 index 000000000000..eb5347dcfdd2 --- /dev/null +++ b/packages/overlays/IconPackKaiThemePickerOverlay/res/drawable/ic_wifi_24px.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/Android.mk b/packages/overlays/IconPackOOSAndroidOverlay/Android.mk new file mode 100644 index 000000000000..68e4c9e8cb77 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/Android.mk @@ -0,0 +1,28 @@ +# +# Copyright (C) 2020, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := IconPackOOSAndroid + +LOCAL_PRODUCT_MODULE := true + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := IconPackOOSAndroidOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/IconPackOOSAndroidOverlay/AndroidManifest.xml b/packages/overlays/IconPackOOSAndroidOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..c6b359da3424 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_0.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_0.xml new file mode 100644 index 000000000000..dc5fa03ccbbf --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_0.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_1.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_1.xml new file mode 100644 index 000000000000..dc5fa03ccbbf --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/anim/ic_signal_wifi_transient_animation_1.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/color/switch_track_material.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/color/switch_track_material.xml new file mode 100644 index 000000000000..7a17d1f22f27 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/color/switch_track_material.xml @@ -0,0 +1,24 @@ + + + + + + + + + diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_ab_back_material.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_ab_back_material.xml new file mode 100644 index 000000000000..b0fa315ec172 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_ab_back_material.xml @@ -0,0 +1,23 @@ + + + + diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_audio_alarm.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_audio_alarm.xml new file mode 100644 index 000000000000..1ba69a1b3bcf --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_audio_alarm.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml new file mode 100644 index 000000000000..3a26cbaf7238 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml @@ -0,0 +1,38 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_audio_ring_notif_mute.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_audio_ring_notif_mute.xml new file mode 100644 index 000000000000..54c8b1855b5d --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_audio_ring_notif_mute.xml @@ -0,0 +1,10 @@ + + + diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_battery_80_24dp.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_battery_80_24dp.xml new file mode 100644 index 000000000000..c19ca31d41b2 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_battery_80_24dp.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml new file mode 100644 index 000000000000..feed70c49138 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml new file mode 100644 index 000000000000..3b986a005ebf --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml @@ -0,0 +1,28 @@ + + + + + + + diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml new file mode 100644 index 000000000000..6ea152b85345 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml new file mode 100644 index 000000000000..eaeebccf189e --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml new file mode 100644 index 000000000000..46c4a797973c --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml new file mode 100644 index 000000000000..6c619bb660f6 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_laptop.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_laptop.xml new file mode 100644 index 000000000000..2f13fb8685f9 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_laptop.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_misc_hid.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_misc_hid.xml new file mode 100644 index 000000000000..ebf337b532fc --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_misc_hid.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_network_pan.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_network_pan.xml new file mode 100644 index 000000000000..85c2bcdbdce0 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_network_pan.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml new file mode 100644 index 000000000000..edb8d9e4295a --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_corp_badge.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_corp_badge.xml new file mode 100644 index 000000000000..031e5a8ba2c4 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_corp_badge.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_expand_more.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_expand_more.xml new file mode 100644 index 000000000000..50a8742be529 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_expand_more.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_faster_emergency.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_faster_emergency.xml new file mode 100644 index 000000000000..46e243c0f1ac --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_faster_emergency.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_file_copy.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_file_copy.xml new file mode 100644 index 000000000000..1feaab1663c1 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_file_copy.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml new file mode 100644 index 000000000000..9d43e51dc469 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_hotspot_transient_animation_drawable.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_hotspot_transient_animation_drawable.xml new file mode 100644 index 000000000000..11cb9d225d63 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_hotspot_transient_animation_drawable.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_info_outline_24.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_info_outline_24.xml new file mode 100644 index 000000000000..fe9c57870035 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_info_outline_24.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_lock.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_lock.xml new file mode 100644 index 000000000000..d0b85e70920d --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_lock.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_lock_bugreport.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_lock_bugreport.xml new file mode 100644 index 000000000000..083007b56622 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_lock_bugreport.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_lock_open.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_lock_open.xml new file mode 100644 index 000000000000..6f19afe7c484 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_lock_open.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_lock_power_off.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_lock_power_off.xml new file mode 100644 index 000000000000..e2296fb3839c --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_lock_power_off.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_lockscreen_ime.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_lockscreen_ime.xml new file mode 100644 index 000000000000..fae8445a0a42 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_lockscreen_ime.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_mode_edit.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_mode_edit.xml new file mode 100644 index 000000000000..acdd80161bf4 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_mode_edit.xml @@ -0,0 +1,11 @@ + + + + diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_notifications_alerted.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_notifications_alerted.xml new file mode 100644 index 000000000000..752dab5082a4 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_notifications_alerted.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_phone.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_phone.xml new file mode 100644 index 000000000000..c6e8f57f5ec1 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_phone.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_airplane.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_airplane.xml new file mode 100644 index 000000000000..78d74cf79810 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_airplane.xml @@ -0,0 +1,10 @@ + + + + diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml new file mode 100644 index 000000000000..781f0a874e8a --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml @@ -0,0 +1,11 @@ + + + + diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_battery_saver.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_battery_saver.xml new file mode 100644 index 000000000000..94f4fbe73169 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_battery_saver.xml @@ -0,0 +1,11 @@ + + + + diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_bluetooth.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_bluetooth.xml new file mode 100644 index 000000000000..5e1a5f20c6d6 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_bluetooth.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_dnd.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_dnd.xml new file mode 100644 index 000000000000..c126223de735 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_dnd.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_flashlight.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_flashlight.xml new file mode 100644 index 000000000000..a8d145dd003d --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_flashlight.xml @@ -0,0 +1,11 @@ + + + + diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_night_display_on.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_night_display_on.xml new file mode 100644 index 000000000000..8c7cc4502642 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_night_display_on.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml new file mode 100644 index 000000000000..309716f87000 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_restart.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_restart.xml new file mode 100644 index 000000000000..ff8edbf3537e --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_restart.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_screenshot.xml new file mode 100644 index 000000000000..74053fcb17e7 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_screenshot.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_settings_bluetooth.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_settings_bluetooth.xml new file mode 100644 index 000000000000..5e1a5f20c6d6 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_settings_bluetooth.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml new file mode 100644 index 000000000000..a8e01c20024f --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml new file mode 100644 index 000000000000..a8e01c20024f --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml new file mode 100644 index 000000000000..08fc66e61da6 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml new file mode 100644 index 000000000000..cdd770f02e16 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml new file mode 100644 index 000000000000..9982d036d6bf --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml new file mode 100644 index 000000000000..9d8c3070f039 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml new file mode 100644 index 000000000000..0e8a58aeaa5d --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml new file mode 100644 index 000000000000..b1aaa3ada717 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml new file mode 100644 index 000000000000..24faf35db290 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml new file mode 100644 index 000000000000..3f95fa8dca7c --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml new file mode 100644 index 000000000000..24faf35db290 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_location.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_location.xml new file mode 100644 index 000000000000..a00c85f3d1f1 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_location.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml new file mode 100644 index 000000000000..93af992957ef --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml @@ -0,0 +1,18 @@ + + + + + diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation_drawable.xml new file mode 100644 index 000000000000..ff855317a58b --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation_drawable.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_wifi_signal_0.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_wifi_signal_0.xml new file mode 100644 index 000000000000..3c9d9142d49e --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_wifi_signal_0.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_wifi_signal_1.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_wifi_signal_1.xml new file mode 100644 index 000000000000..6db8329e846d --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_wifi_signal_1.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_wifi_signal_2.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_wifi_signal_2.xml new file mode 100644 index 000000000000..2544bc328375 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_wifi_signal_2.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_wifi_signal_3.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_wifi_signal_3.xml new file mode 100644 index 000000000000..b9f375aaca2b --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_wifi_signal_3.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_wifi_signal_4.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_wifi_signal_4.xml new file mode 100644 index 000000000000..d9c9b2085aba --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/ic_wifi_signal_4.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_activity_recognition.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_activity_recognition.xml new file mode 100644 index 000000000000..669704775311 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_activity_recognition.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_aural.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_aural.xml new file mode 100644 index 000000000000..8cd240d47b2d --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_aural.xml @@ -0,0 +1,40 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_calendar.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_calendar.xml new file mode 100644 index 000000000000..4e61af0dbf34 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_calendar.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_call_log.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_call_log.xml new file mode 100644 index 000000000000..8d3c43c3d216 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_call_log.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_camera.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_camera.xml new file mode 100644 index 000000000000..7d42ff758b8c --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_camera.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_contacts.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_contacts.xml new file mode 100644 index 000000000000..5d68581757ba --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_contacts.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_location.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_location.xml new file mode 100644 index 000000000000..5dce9cb985b3 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_location.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_microphone.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_microphone.xml new file mode 100644 index 000000000000..b45e8322628d --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_microphone.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_phone_calls.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_phone_calls.xml new file mode 100644 index 000000000000..fe45a97a3287 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_phone_calls.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_sensors.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_sensors.xml new file mode 100644 index 000000000000..c84cb0e99bde --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_sensors.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_sms.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_sms.xml new file mode 100644 index 000000000000..96b70f7fbfbd --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_sms.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_storage.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_storage.xml new file mode 100644 index 000000000000..9240bb48b35e --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_storage.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_visual.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_visual.xml new file mode 100644 index 000000000000..2cd1bc0f17b0 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/perm_group_visual.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/switch_track_material.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/switch_track_material.xml new file mode 100644 index 000000000000..1fb419eb2513 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/drawable/switch_track_material.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/overlays/IconPackOOSAndroidOverlay/res/values/config.xml b/packages/overlays/IconPackOOSAndroidOverlay/res/values/config.xml new file mode 100644 index 000000000000..b7bfaad56249 --- /dev/null +++ b/packages/overlays/IconPackOOSAndroidOverlay/res/values/config.xml @@ -0,0 +1,41 @@ + + + + + M 11,1.505 H 8 V 0.995 C 8,0.445 7.55,-0.005 7,-0.005 H 5 C 4.45,-0.005 4,0.445 4,0.995 V 1.505 H 1 C 0.45,1.505 0,1.955 0,2.505 V 19.005 C 0,19.555 0.45,20.005 1,20.005 H 11 C 11.55,20.005 12,19.555 12,19.005 V 2.505 C 12,1.955 11.543,1.505 11,1.505 Z M 10.5,18.505 H 1.5 V 3.005 H 10.5 Z + + + + M 10.5,18.505 H 1.5 V 3.005 H 10.5 Z + + + M 3.92,11.5 H 5 V 15.01 C 5,15.17 5.13,15.26 5.25,15.26 5.33,15.26 5.42,15.22 5.47,15.13 L 8.3,9.87 C 8.39,9.7 8.27,9.5 8.08,9.5 H 7 V 5.99 C 7,5.83 6.87,5.74 6.75,5.74 6.67,5.74 6.58,5.78 6.53,5.87 L 3.7,11.13 C 3.61,11.3 3.73,11.5 3.92,11.5 Z + + + M 3.75,11.25 H 5.25 V 12.75 C 5.25,13.16 5.59,13.5 6,13.5 6.41,13.5 6.75,13.16 6.75,12.75 V 11.25 H 8.25 C 8.66,11.25 9,10.91 9,10.5 9,10.09 8.66,9.7499 8.25,9.7499 H 6.75 V 8.2499 C 6.75,7.8399 6.41,7.4999 6,7.4999 5.59,7.4999 5.2794,7.841 5.25,8.2499 V 9.7499 H 3.75 C 3.34,9.7499 3,10.09 3,10.5 3,10.91 3.3401,11.25 3.75,11.25 Z + + + + M 20.72,16.22 L 19,17.94 L 17.28,16.22 C 16.99,15.93 16.51,15.93 16.22,16.22 C 15.93,16.51 15.93,16.99 16.22,17.28 L 17.94,19 L 16.22,20.72 C 15.93,21.01 15.93,21.49 16.22,21.78 C 16.37,21.93 16.56,22 16.75,22 C 16.94,22 17.13,21.93 17.28,21.78 L 19,20.06 L 20.72,21.78 C 20.87,21.93 21.06,22 21.25,22 C 21.44,22 21.63,21.93 21.78,21.78 C 22.07,21.49 22.07,21.01 21.78,20.72 L 20.06,19 L 21.78,17.28 C 22.07,16.99 22.07,16.51 21.78,16.22 C 21.49,15.93 21.01,15.93 20.72,16.22 Z + + + 10 + 10 + diff --git a/packages/overlays/IconPackOOSLauncherOverlay/Android.mk b/packages/overlays/IconPackOOSLauncherOverlay/Android.mk new file mode 100644 index 000000000000..1c5d019e1366 --- /dev/null +++ b/packages/overlays/IconPackOOSLauncherOverlay/Android.mk @@ -0,0 +1,29 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := IconPackOOSLauncher + +LOCAL_PRODUCT_MODULE := true + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := IconPackOOSLauncherOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/IconPackOOSLauncherOverlay/AndroidManifest.xml b/packages/overlays/IconPackOOSLauncherOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..cb3395ccff95 --- /dev/null +++ b/packages/overlays/IconPackOOSLauncherOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_corp.xml b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_corp.xml new file mode 100644 index 000000000000..be31fb9171bf --- /dev/null +++ b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_corp.xml @@ -0,0 +1,26 @@ + + + + + diff --git a/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_corp_off.xml b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_corp_off.xml new file mode 100644 index 000000000000..8d298f7cbc97 --- /dev/null +++ b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_corp_off.xml @@ -0,0 +1,26 @@ + + + + + diff --git a/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_drag_handle.xml new file mode 100644 index 000000000000..1e7fcaf0a52f --- /dev/null +++ b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_drag_handle.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_hourglass_top.xml b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_hourglass_top.xml new file mode 100644 index 000000000000..28da99fe3218 --- /dev/null +++ b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_hourglass_top.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_info_no_shadow.xml b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_info_no_shadow.xml new file mode 100644 index 000000000000..168f86f1cc36 --- /dev/null +++ b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_info_no_shadow.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_install_no_shadow.xml b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_install_no_shadow.xml new file mode 100644 index 000000000000..abb597a1d3bd --- /dev/null +++ b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_install_no_shadow.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_palette.xml b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_palette.xml new file mode 100644 index 000000000000..e086ebd95cf7 --- /dev/null +++ b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_palette.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_pin.xml b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_pin.xml new file mode 100644 index 000000000000..6ac4e122b83a --- /dev/null +++ b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_pin.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_remove_no_shadow.xml b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_remove_no_shadow.xml new file mode 100644 index 000000000000..fcfadbe8e60a --- /dev/null +++ b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_remove_no_shadow.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_screenshot.xml new file mode 100644 index 000000000000..ed90b85c8b87 --- /dev/null +++ b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_screenshot.xml @@ -0,0 +1,29 @@ + + + + + + diff --git a/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_select.xml b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_select.xml new file mode 100644 index 000000000000..7bd92ef8687a --- /dev/null +++ b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_select.xml @@ -0,0 +1,23 @@ + + + + diff --git a/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_setting.xml b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_setting.xml new file mode 100644 index 000000000000..70621ae19749 --- /dev/null +++ b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_setting.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_share.xml b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_share.xml new file mode 100644 index 000000000000..36dd3baa8994 --- /dev/null +++ b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_share.xml @@ -0,0 +1,39 @@ + + + + + + + + diff --git a/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_smartspace_preferences.xml b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_smartspace_preferences.xml new file mode 100644 index 000000000000..49f732726de5 --- /dev/null +++ b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_smartspace_preferences.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_split_screen.xml b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_split_screen.xml new file mode 100644 index 000000000000..85443eb0a1d2 --- /dev/null +++ b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_split_screen.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml new file mode 100644 index 000000000000..75e6ce3f00d0 --- /dev/null +++ b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_warning.xml b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_warning.xml new file mode 100644 index 000000000000..2426f6f898eb --- /dev/null +++ b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_warning.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_widget.xml b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_widget.xml new file mode 100644 index 000000000000..1e84ba461d9b --- /dev/null +++ b/packages/overlays/IconPackOOSLauncherOverlay/res/drawable/ic_widget.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/Android.mk b/packages/overlays/IconPackOOSSettingsOverlay/Android.mk new file mode 100644 index 000000000000..540fad95fbc3 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/Android.mk @@ -0,0 +1,29 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := IconPackOOSSettings + +LOCAL_PRODUCT_MODULE := true + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := IconPackOOSSettingsOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/IconPackOOSSettingsOverlay/AndroidManifest.xml b/packages/overlays/IconPackOOSSettingsOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..7fd351c5a343 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/drag_handle.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/drag_handle.xml new file mode 100644 index 000000000000..f3241f849261 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/drag_handle.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_add_24dp.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_add_24dp.xml new file mode 100644 index 000000000000..7dce6609be67 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_add_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_airplanemode_active.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_airplanemode_active.xml new file mode 100644 index 000000000000..e64828b6ec14 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_airplanemode_active.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_android.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_android.xml new file mode 100644 index 000000000000..31df4a683042 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_android.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_apps.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_apps.xml new file mode 100644 index 000000000000..8db613dfa5d2 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_apps.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_arrow_back.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_arrow_back.xml new file mode 100644 index 000000000000..34f79b4478c9 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_arrow_back.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml new file mode 100644 index 000000000000..50a8742be529 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_battery_charging_full.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_battery_charging_full.xml new file mode 100644 index 000000000000..cda34da5e039 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_battery_charging_full.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml new file mode 100644 index 000000000000..d43d6f64b38a --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml new file mode 100644 index 000000000000..8e9fa3bb4ac9 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_call_24dp.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_call_24dp.xml new file mode 100644 index 000000000000..eeed4bf2982a --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_call_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_cancel.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_cancel.xml new file mode 100644 index 000000000000..5cd8861e813f --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_cancel.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_cast_24dp.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_cast_24dp.xml new file mode 100644 index 000000000000..a9cb021a0784 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_cast_24dp.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_cellular_off.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_cellular_off.xml new file mode 100644 index 000000000000..34d40ec813e4 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_cellular_off.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml new file mode 100644 index 000000000000..1e86983cd551 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml new file mode 100644 index 000000000000..1feaab1663c1 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_data_saver.xml new file mode 100644 index 000000000000..ba3c5808d26c --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_data_saver.xml @@ -0,0 +1,33 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_delete.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_delete.xml new file mode 100644 index 000000000000..fd87423c3ad1 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_delete.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_devices_other.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_devices_other.xml new file mode 100644 index 000000000000..1b4ec92e3734 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_devices_other.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_devices_other_32dp.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_devices_other_32dp.xml new file mode 100644 index 000000000000..dfd4b20a7721 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_devices_other_32dp.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml new file mode 100644 index 000000000000..5f704f0ed828 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_eject_24dp.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_eject_24dp.xml new file mode 100644 index 000000000000..0d4bd9bc48d0 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_eject_24dp.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_expand_less.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_expand_less.xml new file mode 100644 index 000000000000..e67b753b39dc --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_expand_less.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_expand_more_inverse.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_expand_more_inverse.xml new file mode 100644 index 000000000000..ab5b9aa68908 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_expand_more_inverse.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_find_in_page_24px.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_find_in_page_24px.xml new file mode 100644 index 000000000000..36d5c7cf4cbf --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_find_in_page_24px.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml new file mode 100644 index 000000000000..9240bb48b35e --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_friction_lock_closed.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_friction_lock_closed.xml new file mode 100644 index 000000000000..aff97842cdff --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_friction_lock_closed.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml new file mode 100644 index 000000000000..308c2ab34563 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_headset_24dp.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_headset_24dp.xml new file mode 100644 index 000000000000..eaeebccf189e --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_headset_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_help.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_help.xml new file mode 100644 index 000000000000..d062e65dedd5 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_help.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_help_actionbar.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_help_actionbar.xml new file mode 100644 index 000000000000..c7d672efa574 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_help_actionbar.xml @@ -0,0 +1,33 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_homepage_search.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_homepage_search.xml new file mode 100644 index 000000000000..5abe45c9baf3 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_homepage_search.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_info_outline_24.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_info_outline_24.xml new file mode 100644 index 000000000000..060188bf33a9 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_info_outline_24.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_local_movies.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_local_movies.xml new file mode 100644 index 000000000000..c669efa23a88 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_local_movies.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml new file mode 100644 index 000000000000..fe45a97a3287 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_lock.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_lock.xml new file mode 100644 index 000000000000..4a7f04c69a5d --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_lock.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_media_stream.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_media_stream.xml new file mode 100644 index 000000000000..0d93646a6128 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_media_stream.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_media_stream_off.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_media_stream_off.xml new file mode 100644 index 000000000000..9e4b9ea9519e --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_media_stream_off.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_network_cell.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_network_cell.xml new file mode 100644 index 000000000000..fbe5ef03ad80 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_network_cell.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_notifications.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_notifications.xml new file mode 100644 index 000000000000..cd78f7a65cbb --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_notifications.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml new file mode 100644 index 000000000000..56a67c912176 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml @@ -0,0 +1,33 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_phone_info.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_phone_info.xml new file mode 100644 index 000000000000..f41f7a05e68f --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_phone_info.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_photo_library.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_photo_library.xml new file mode 100644 index 000000000000..2cd1bc0f17b0 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_photo_library.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_scan_24dp.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_scan_24dp.xml new file mode 100644 index 000000000000..3d79f7946b31 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_scan_24dp.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_search_24dp.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_search_24dp.xml new file mode 100644 index 000000000000..f30a69c13132 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_search_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_accent.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_accent.xml new file mode 100644 index 000000000000..172c0051a2c2 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_accent.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_accessibility.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_accessibility.xml new file mode 100644 index 000000000000..f17b5b93d84f --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_accessibility.xml @@ -0,0 +1,37 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_accounts.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_accounts.xml new file mode 100644 index 000000000000..f02da58550ba --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_accounts.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_backup.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_backup.xml new file mode 100644 index 000000000000..4967a0e7f1d3 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_backup.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_battery_white.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_battery_white.xml new file mode 100644 index 000000000000..e27cb8d54838 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_battery_white.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_data_usage.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_data_usage.xml new file mode 100644 index 000000000000..855e4bb2a39d --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_data_usage.xml @@ -0,0 +1,28 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_date_time.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_date_time.xml new file mode 100644 index 000000000000..6bf52264e12a --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_date_time.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_delete.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_delete.xml new file mode 100644 index 000000000000..48a430fc420b --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_delete.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_disable.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_disable.xml new file mode 100644 index 000000000000..0572fb72f82e --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_disable.xml @@ -0,0 +1,37 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_display_white.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_display_white.xml new file mode 100644 index 000000000000..19acd6ae8210 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_display_white.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_enable.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_enable.xml new file mode 100644 index 000000000000..ec608cdf67dd --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_enable.xml @@ -0,0 +1,37 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_home.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_home.xml new file mode 100644 index 000000000000..7e06f7ddcea2 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_home.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_language.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_language.xml new file mode 100644 index 000000000000..730942bda59c --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_language.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_location.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_location.xml new file mode 100644 index 000000000000..762d67d7fa87 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_location.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_multiuser.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_multiuser.xml new file mode 100644 index 000000000000..83d9d2a9311e --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_multiuser.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_night_display.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_night_display.xml new file mode 100644 index 000000000000..54d5b55fcab7 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_night_display.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_open.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_open.xml new file mode 100644 index 000000000000..b0894888931d --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_open.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_print.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_print.xml new file mode 100644 index 000000000000..4ee616c504a0 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_print.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_privacy.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_privacy.xml new file mode 100644 index 000000000000..12a82f2c1f0b --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_privacy.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_security_white.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_security_white.xml new file mode 100644 index 000000000000..e93e63f5f603 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_security_white.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_sim.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_sim.xml new file mode 100644 index 000000000000..563dbe474144 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_sim.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml new file mode 100644 index 000000000000..9ec3ffcc47fa --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_wireless.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_wireless.xml new file mode 100644 index 000000000000..c8c8abc0b6ac --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_settings_wireless.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_storage.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_storage.xml new file mode 100644 index 000000000000..0cf6f54beeb2 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_storage.xml @@ -0,0 +1,41 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_storage_white.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_storage_white.xml new file mode 100644 index 000000000000..355ee3b920ee --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_storage_white.xml @@ -0,0 +1,40 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_suggestion_night_display.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_suggestion_night_display.xml new file mode 100644 index 000000000000..54d5b55fcab7 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_suggestion_night_display.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_sync.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_sync.xml new file mode 100644 index 000000000000..5d0bab425243 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_sync.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml new file mode 100644 index 000000000000..e9a07cc3b988 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml @@ -0,0 +1,37 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_system_update.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_system_update.xml new file mode 100644 index 000000000000..486b663b00cc --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_system_update.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml new file mode 100644 index 000000000000..906b06a73787 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml new file mode 100644 index 000000000000..91bb81e9f39a --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml @@ -0,0 +1,38 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_volume_up_24dp.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_volume_up_24dp.xml new file mode 100644 index 000000000000..25f81b71256a --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_volume_up_24dp.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_vpn_key.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_vpn_key.xml new file mode 100644 index 000000000000..78f5c52b94e0 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_vpn_key.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_wifi_tethering.xml b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_wifi_tethering.xml new file mode 100644 index 000000000000..3ee1e368e385 --- /dev/null +++ b/packages/overlays/IconPackOOSSettingsOverlay/res/drawable/ic_wifi_tethering.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/Android.mk b/packages/overlays/IconPackOOSSystemUIOverlay/Android.mk new file mode 100644 index 000000000000..e08d9ebecbb1 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/Android.mk @@ -0,0 +1,29 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := IconPackOOSSystemUI + +LOCAL_PRODUCT_MODULE := true + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := IconPackOOSSystemUIOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/AndroidManifest.xml b/packages/overlays/IconPackOOSSystemUIOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..79447a2b4b7b --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_alarm.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_alarm.xml new file mode 100644 index 000000000000..103e7a439517 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_alarm.xml @@ -0,0 +1,10 @@ + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml new file mode 100644 index 000000000000..288a1f2c11bd --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml @@ -0,0 +1,12 @@ + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_camera_alt_24dp.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_camera_alt_24dp.xml new file mode 100644 index 000000000000..9952144cd4fd --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_camera_alt_24dp.xml @@ -0,0 +1,11 @@ + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_cast.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_cast.xml new file mode 100644 index 000000000000..41144f27bbf8 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_cast.xml @@ -0,0 +1,17 @@ + + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_cast_connected.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_cast_connected.xml new file mode 100644 index 000000000000..bd7e23a2a51c --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_cast_connected.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_hotspot.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_hotspot.xml new file mode 100644 index 000000000000..a51573fb6899 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_hotspot.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_location.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_location.xml new file mode 100644 index 000000000000..d5d676bdc316 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_location.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_mic_26dp.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_mic_26dp.xml new file mode 100644 index 000000000000..e3082a08fa86 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_mic_26dp.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_no_disturb.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_no_disturb.xml new file mode 100644 index 000000000000..790f77210c50 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_no_disturb.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_phone.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_phone.xml new file mode 100644 index 000000000000..83a3f5285a8e --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_phone.xml @@ -0,0 +1,11 @@ + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_qs_brightness_auto_off.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_qs_brightness_auto_off.xml new file mode 100644 index 000000000000..94ffe29ef056 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_qs_brightness_auto_off.xml @@ -0,0 +1,24 @@ + + + + + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_qs_brightness_auto_on.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_qs_brightness_auto_on.xml new file mode 100644 index 000000000000..70391b132b43 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_qs_brightness_auto_on.xml @@ -0,0 +1,21 @@ + + + + + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_qs_data_switch_1.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_qs_data_switch_1.xml new file mode 100644 index 000000000000..7e1b7e4ec23e --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_qs_data_switch_1.xml @@ -0,0 +1,14 @@ + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_qs_data_switch_2.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_qs_data_switch_2.xml new file mode 100644 index 000000000000..df3afec9e3be --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_qs_data_switch_2.xml @@ -0,0 +1,14 @@ + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_qs_nfc.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_qs_nfc.xml new file mode 100644 index 000000000000..527ad225b5d3 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_qs_nfc.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_qs_no_sim.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_qs_no_sim.xml new file mode 100644 index 000000000000..968e318c5798 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_qs_no_sim.xml @@ -0,0 +1,10 @@ + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_settings.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_settings.xml new file mode 100644 index 000000000000..e2524aa6723d --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_settings.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_swap_vert.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_swap_vert.xml new file mode 100644 index 000000000000..497989650873 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_swap_vert.xml @@ -0,0 +1,11 @@ + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_accessibility.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_accessibility.xml new file mode 100644 index 000000000000..47cf3ddd3a03 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_accessibility.xml @@ -0,0 +1,19 @@ + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_alarm.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_alarm.xml new file mode 100644 index 000000000000..e3260b2d93f0 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_alarm.xml @@ -0,0 +1,10 @@ + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml new file mode 100644 index 000000000000..ca7d1a5da01b --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml @@ -0,0 +1,10 @@ + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml new file mode 100644 index 000000000000..95c150a749c6 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml @@ -0,0 +1,16 @@ + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_media.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_media.xml new file mode 100644 index 000000000000..38f74cc14204 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_media.xml @@ -0,0 +1,10 @@ + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_media_bt.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_media_bt.xml new file mode 100644 index 000000000000..c108218905b3 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_media_bt.xml @@ -0,0 +1,19 @@ + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_media_bt_mute.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_media_bt_mute.xml new file mode 100644 index 000000000000..f91385f8b322 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_media_bt_mute.xml @@ -0,0 +1,19 @@ + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_media_mute.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_media_mute.xml new file mode 100644 index 000000000000..0741dd384710 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_media_mute.xml @@ -0,0 +1,10 @@ + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml new file mode 100644 index 000000000000..98a0410d7457 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml @@ -0,0 +1,9 @@ + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml new file mode 100644 index 000000000000..6f512e8d0174 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_ringer.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_ringer.xml new file mode 100644 index 000000000000..f5ea2e0cb90a --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_ringer.xml @@ -0,0 +1,10 @@ + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml new file mode 100644 index 000000000000..e72eb798b8bc --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml @@ -0,0 +1,10 @@ + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml new file mode 100644 index 000000000000..c9526fdc3d19 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml @@ -0,0 +1,10 @@ + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_system.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_system.xml new file mode 100644 index 000000000000..03c6a2df2dbb --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_system.xml @@ -0,0 +1,15 @@ + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_system_mute.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_system_mute.xml new file mode 100644 index 000000000000..6604353741b8 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_system_mute.xml @@ -0,0 +1,16 @@ + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_voice.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_voice.xml new file mode 100644 index 000000000000..4b38f9d117c7 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/ic_volume_voice.xml @@ -0,0 +1,10 @@ + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_airplane_mode.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_airplane_mode.xml new file mode 100644 index 000000000000..12612b1e23b9 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_airplane_mode.xml @@ -0,0 +1,15 @@ + + + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_0.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_0.xml new file mode 100644 index 000000000000..c249d0f9fe3d --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_0.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_1.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_1.xml new file mode 100644 index 000000000000..b439a6e80ee7 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_1.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_2.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_2.xml new file mode 100644 index 000000000000..75b1784c0936 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_2.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_3.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_3.xml new file mode 100644 index 000000000000..e6b419fbb268 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_3.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_4.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_4.xml new file mode 100644 index 000000000000..5236e9cef9f9 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_4.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_5.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_5.xml new file mode 100644 index 000000000000..abdc7a7580e8 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_5.xml @@ -0,0 +1,31 @@ + + + + + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_6.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_6.xml new file mode 100644 index 000000000000..650420bf3f65 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_6.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_7.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_7.xml new file mode 100644 index 000000000000..66a28cf82dbd --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_7.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_8.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_8.xml new file mode 100644 index 000000000000..1d3e91d87e0b --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_8.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_9.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_9.xml new file mode 100644 index 000000000000..95d6cda11ad9 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_data_bluetooth_connected_battery_9.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_dnd.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_dnd.xml new file mode 100644 index 000000000000..189237543dba --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_dnd.xml @@ -0,0 +1,22 @@ + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_nfc.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_nfc.xml new file mode 100644 index 000000000000..7df305bbce05 --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_nfc.xml @@ -0,0 +1,12 @@ + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_ringer_silent.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_ringer_silent.xml new file mode 100644 index 000000000000..d9790a0f2d6a --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_ringer_silent.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_ringer_vibrate.xml b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_ringer_vibrate.xml new file mode 100644 index 000000000000..3ed3f68565dd --- /dev/null +++ b/packages/overlays/IconPackOOSSystemUIOverlay/res/drawable/stat_sys_ringer_vibrate.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/packages/overlays/IconPackOOSThemePickerOverlay/Android.mk b/packages/overlays/IconPackOOSThemePickerOverlay/Android.mk new file mode 100644 index 000000000000..7267fb08101a --- /dev/null +++ b/packages/overlays/IconPackOOSThemePickerOverlay/Android.mk @@ -0,0 +1,29 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := IconPackOOSThemePicker +LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := IconPackOOSThemePickerOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/IconPackOOSThemePickerOverlay/AndroidManifest.xml b/packages/overlays/IconPackOOSThemePickerOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..1dc2fd6fcac8 --- /dev/null +++ b/packages/overlays/IconPackOOSThemePickerOverlay/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + diff --git a/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_add_24px.xml b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_add_24px.xml new file mode 100644 index 000000000000..707369ab3446 --- /dev/null +++ b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_add_24px.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_close_24px.xml b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_close_24px.xml new file mode 100644 index 000000000000..1dca14d9de77 --- /dev/null +++ b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_close_24px.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_colorize_24px.xml b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_colorize_24px.xml new file mode 100644 index 000000000000..5c21b23f0bc7 --- /dev/null +++ b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_colorize_24px.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_delete_24px.xml b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_delete_24px.xml new file mode 100644 index 000000000000..48a430fc420b --- /dev/null +++ b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_delete_24px.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_font.xml b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_font.xml new file mode 100644 index 000000000000..bbae929cf76e --- /dev/null +++ b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_font.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_nav_clock.xml b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_nav_clock.xml new file mode 100644 index 000000000000..9c9d663f850c --- /dev/null +++ b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_nav_clock.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_nav_grid.xml b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_nav_grid.xml new file mode 100644 index 000000000000..c81ca1e4bde1 --- /dev/null +++ b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_nav_grid.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_nav_theme.xml b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_nav_theme.xml new file mode 100644 index 000000000000..32d154b0a8ea --- /dev/null +++ b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_nav_theme.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml new file mode 100644 index 000000000000..21daf9d00e89 --- /dev/null +++ b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml @@ -0,0 +1,40 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_shapes_24px.xml b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_shapes_24px.xml new file mode 100644 index 000000000000..19ce4e3ca7ad --- /dev/null +++ b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_shapes_24px.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_tune.xml b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_tune.xml new file mode 100644 index 000000000000..2a56cc54bae8 --- /dev/null +++ b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_tune.xml @@ -0,0 +1,40 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_wifi_24px.xml b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_wifi_24px.xml new file mode 100644 index 000000000000..0a1c3055870d --- /dev/null +++ b/packages/overlays/IconPackOOSThemePickerOverlay/res/drawable/ic_wifi_24px.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/Android.bp b/packages/overlays/IconPackOutlineAndroidOverlay/Android.bp new file mode 100644 index 000000000000..374f517a3634 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/Android.bp @@ -0,0 +1,21 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +runtime_resource_overlay { + name: "IconPackOutlineAndroidOverlay", + theme: "IconPackOutlineAndroid", + product_specific: true, +} diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/AndroidManifest.xml b/packages/overlays/IconPackOutlineAndroidOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..5e7ee7239ff0 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_add.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_add.xml new file mode 100644 index 000000000000..e2b336f8b722 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_add.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_agenda.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_agenda.xml new file mode 100644 index 000000000000..3c4ddde33d21 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_agenda.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_always_landscape_portrait.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_always_landscape_portrait.xml new file mode 100644 index 000000000000..ef817c08c810 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_always_landscape_portrait.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_archive.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_archive.xml new file mode 100644 index 000000000000..aa6a2e90c5db --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_archive.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_attachment.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_attachment.xml new file mode 100644 index 000000000000..4e5dc8b54104 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_attachment.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_block.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_block.xml new file mode 100644 index 000000000000..fd0bc2fb87ea --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_block.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_blocked_user.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_blocked_user.xml new file mode 100644 index 000000000000..be63852734f6 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_blocked_user.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_call.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_call.xml new file mode 100644 index 000000000000..6990bd4914e4 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_call.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_camera.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_camera.xml new file mode 100644 index 000000000000..06053de153db --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_camera.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_cc_am.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_cc_am.xml new file mode 100644 index 000000000000..30670ba75587 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_cc_am.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_chat_dashboard.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_chat_dashboard.xml new file mode 100644 index 000000000000..fd8aa5a63921 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_chat_dashboard.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_clear_playlist.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_clear_playlist.xml new file mode 100644 index 000000000000..37e0548e8b70 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_clear_playlist.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_compass.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_compass.xml new file mode 100644 index 000000000000..3a2377a2c553 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_compass.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_compose.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_compose.xml new file mode 100644 index 000000000000..0fd22a93bece --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_compose.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_crop.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_crop.xml new file mode 100644 index 000000000000..73414d89dee2 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_menu_crop.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_popup_sync_1.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_popup_sync_1.xml new file mode 100644 index 000000000000..c5dba05659ab --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_popup_sync_1.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_popup_sync_2.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_popup_sync_2.xml new file mode 100644 index 000000000000..bd8d0006c87d --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_popup_sync_2.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_popup_sync_3.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_popup_sync_3.xml new file mode 100644 index 000000000000..86dac1d3ccd4 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_popup_sync_3.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_popup_sync_4.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_popup_sync_4.xml new file mode 100644 index 000000000000..424f1eecf752 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_popup_sync_4.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_popup_sync_5.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_popup_sync_5.xml new file mode 100644 index 000000000000..a33305349d20 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_popup_sync_5.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_popup_sync_6.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_popup_sync_6.xml new file mode 100644 index 000000000000..c3c1ee151e27 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/ic_popup_sync_6.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/switch_thumb_material_anim.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/switch_thumb_material_anim.xml new file mode 100644 index 000000000000..ed2122cbe844 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable-anydpi/switch_thumb_material_anim.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/btn_switch_to_off_mtrl_00001.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/btn_switch_to_off_mtrl_00001.xml new file mode 100644 index 000000000000..21952b86a325 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/btn_switch_to_off_mtrl_00001.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/btn_switch_to_on_mtrl_00012.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/btn_switch_to_on_mtrl_00012.xml new file mode 100644 index 000000000000..896bdf90d701 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/btn_switch_to_on_mtrl_00012.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/emergency_icon.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/emergency_icon.xml new file mode 100644 index 000000000000..1971c69e4556 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/emergency_icon.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_ab_back_material.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_ab_back_material.xml new file mode 100644 index 000000000000..cea8e0fe4808 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_ab_back_material.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_account_circle.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_account_circle.xml new file mode 100644 index 000000000000..ce302d02070d --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_account_circle.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_alarm.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_alarm.xml new file mode 100644 index 000000000000..d29c4d085340 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_alarm.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_alarm_dim.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_alarm_dim.xml new file mode 100644 index 000000000000..d29c4d085340 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_alarm_dim.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_alarm.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_alarm.xml new file mode 100644 index 000000000000..58d026844564 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_alarm.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml new file mode 100644 index 000000000000..42ee057b02ba --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_media.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_media.xml new file mode 100644 index 000000000000..faa35f38d7d3 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_media.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_media_mute.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_media_mute.xml new file mode 100644 index 000000000000..2b9b3c04700d --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_media_mute.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_notification_mute_new.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_notification_mute_new.xml new file mode 100644 index 000000000000..4b862ee68cb1 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_notification_mute_new.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_notification_new.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_notification_new.xml new file mode 100644 index 000000000000..3f5d16deda4c --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_notification_new.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_ring_notif.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_ring_notif.xml new file mode 100644 index 000000000000..960dbf312b61 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_ring_notif.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_ring_notif_mute.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_ring_notif_mute.xml new file mode 100644 index 000000000000..6e561d38dc1c --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_ring_notif_mute.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_ring_notif_vibrate.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_ring_notif_vibrate.xml new file mode 100644 index 000000000000..230dff3fdba3 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_audio_ring_notif_vibrate.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_camera_alt_24dp.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_camera_alt_24dp.xml new file mode 100644 index 000000000000..d90f64b47d71 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_camera_alt_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_close.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_close.xml new file mode 100644 index 000000000000..2ee533bfc24a --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_close.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_dnd.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_dnd.xml new file mode 100644 index 000000000000..d7955c5ebedb --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_dnd.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_dnd_total_silence.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_dnd_total_silence.xml new file mode 100644 index 000000000000..83997a97a5eb --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_dnd_total_silence.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_apk.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_apk.xml new file mode 100644 index 000000000000..8d29059beb54 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_apk.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_audio.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_audio.xml new file mode 100644 index 000000000000..a517b52457aa --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_audio.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_certificate.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_certificate.xml new file mode 100644 index 000000000000..37fb12067082 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_certificate.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_codes.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_codes.xml new file mode 100644 index 000000000000..9aa211608986 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_codes.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_compressed.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_compressed.xml new file mode 100644 index 000000000000..793534e96863 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_compressed.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_contact.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_contact.xml new file mode 100644 index 000000000000..68a0eeb6e52c --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_contact.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_event.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_event.xml new file mode 100644 index 000000000000..03adfb3eba34 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_event.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_excel.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_excel.xml new file mode 100644 index 000000000000..2d30fd2733eb --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_excel.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_generic.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_generic.xml new file mode 100644 index 000000000000..9f58e9feb58e --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_generic.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_image.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_image.xml new file mode 100644 index 000000000000..07516df8098a --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_image.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_pdf.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_pdf.xml new file mode 100644 index 000000000000..99f8143ab737 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_pdf.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_powerpoint.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_powerpoint.xml new file mode 100644 index 000000000000..ca1b8b608125 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_powerpoint.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_presentation.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_presentation.xml new file mode 100644 index 000000000000..318bd2cba577 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_presentation.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_spreadsheet.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_spreadsheet.xml new file mode 100644 index 000000000000..20c0f8e62f5e --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_spreadsheet.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_text.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_text.xml new file mode 100644 index 000000000000..cf64b78e329c --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_text.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_video.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_video.xml new file mode 100644 index 000000000000..e6c1fb0e438f --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_video.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_word.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_word.xml new file mode 100644 index 000000000000..3b843c69a6d1 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_doc_word.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_eject_24dp.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_eject_24dp.xml new file mode 100644 index 000000000000..d6471f022d68 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_eject_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_faster_emergency.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_faster_emergency.xml new file mode 100644 index 000000000000..93d320db2554 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_faster_emergency.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_feedback.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_feedback.xml new file mode 100644 index 000000000000..797c32f4f0b1 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_feedback.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_location.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_location.xml new file mode 100644 index 000000000000..f90e126ecbb8 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_location.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_airplane_mode.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_airplane_mode.xml new file mode 100644 index 000000000000..322566979590 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_airplane_mode.xml @@ -0,0 +1,5 @@ + + + + diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_airplane_mode_off.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_airplane_mode_off.xml new file mode 100644 index 000000000000..155e101314ce --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_airplane_mode_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_bugreport.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_bugreport.xml new file mode 100644 index 000000000000..37a4b37cc622 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_bugreport.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_lockdown.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_lockdown.xml new file mode 100644 index 000000000000..5730fdedb05f --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_lockdown.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_onthego.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_onthego.xml new file mode 100644 index 000000000000..517470721971 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_onthego.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_power_off.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_power_off.xml new file mode 100644 index 000000000000..7ecc1043d8fb --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_power_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_screenrecord.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_screenrecord.xml new file mode 100644 index 000000000000..e3cf8ddfdfa0 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_lock_screenrecord.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_menu_end_conversation.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_menu_end_conversation.xml new file mode 100644 index 000000000000..e059ad361c57 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_menu_end_conversation.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_menu_moreoverflow_material.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_menu_moreoverflow_material.xml new file mode 100644 index 000000000000..46900c22c4ab --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_menu_moreoverflow_material.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_menu_refresh.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_menu_refresh.xml new file mode 100644 index 000000000000..acf3ece34e03 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_menu_refresh.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_menu_search_material.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_menu_search_material.xml new file mode 100644 index 000000000000..4bdfb0772c47 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_menu_search_material.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_mic_26dp.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_mic_26dp.xml new file mode 100644 index 000000000000..49f0985fefd0 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_mic_26dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_perm_device_info.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_perm_device_info.xml new file mode 100644 index 000000000000..ccc09d00e6db --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_perm_device_info.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_phone.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_phone.xml new file mode 100644 index 000000000000..392619598ce2 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_phone.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_airplane.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_airplane.xml new file mode 100644 index 000000000000..57b49413b6ac --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_airplane.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_alarm.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_alarm.xml new file mode 100644 index 000000000000..d29c4d085340 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_alarm.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml new file mode 100644 index 000000000000..e398f1d555af --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_battery_saver.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_battery_saver.xml new file mode 100644 index 000000000000..75663cd446a9 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_battery_saver.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_bluetooth.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_bluetooth.xml new file mode 100644 index 000000000000..1a86983224bc --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_bluetooth.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_dnd.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_dnd.xml new file mode 100644 index 000000000000..494aa30e5184 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_dnd.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_flashlight.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_flashlight.xml new file mode 100644 index 000000000000..29f30853f16f --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_flashlight.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_location_battery_saving.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_location_battery_saving.xml new file mode 100644 index 000000000000..256d763d08c2 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_location_battery_saving.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_location_high_accuracy.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_location_high_accuracy.xml new file mode 100644 index 000000000000..19273694078b --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_location_high_accuracy.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_location_sensors_only.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_location_sensors_only.xml new file mode 100644 index 000000000000..f90e126ecbb8 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_location_sensors_only.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_nfc.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_nfc.xml new file mode 100644 index 000000000000..ae171aa84919 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_nfc.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_night_display_on.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_night_display_on.xml new file mode 100644 index 000000000000..103f6af6ecd8 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_night_display_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml new file mode 100644 index 000000000000..addadf4625fa --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_refresh.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_refresh.xml new file mode 100644 index 000000000000..a1b4f345e6cc --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_refresh.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_restart.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_restart.xml new file mode 100644 index 000000000000..acf3ece34e03 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_restart.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_schedule.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_schedule.xml new file mode 100644 index 000000000000..f295f634c792 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_schedule.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_screenshot.xml new file mode 100644 index 000000000000..a5e592b10224 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_screenshot.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_search_api_material.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_search_api_material.xml new file mode 100644 index 000000000000..4bdfb0772c47 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_search_api_material.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_airplane.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_airplane.xml new file mode 100644 index 000000000000..cb3908c790b3 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_airplane.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml new file mode 100644 index 000000000000..7ca9d8f4fde8 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml new file mode 100644 index 000000000000..0982f6c92ee7 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml new file mode 100644 index 000000000000..2e1c9d985f9c --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml new file mode 100644 index 000000000000..018d63231153 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml new file mode 100644 index 000000000000..2adba794f251 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml new file mode 100644 index 000000000000..dc2c8a0c8bf5 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml new file mode 100644 index 000000000000..d43ea488241b --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml new file mode 100644 index 000000000000..301e5e5d527f --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml new file mode 100644 index 000000000000..75f0b8965fa7 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml new file mode 100644 index 000000000000..b254d1e180b7 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml new file mode 100644 index 000000000000..5b479f5018f9 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_flashlight.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_flashlight.xml new file mode 100644 index 000000000000..5751e744f0c5 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_signal_flashlight.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_accessibility.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_accessibility.xml new file mode 100644 index 000000000000..6f846003336e --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_accessibility.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_alarm.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_alarm.xml new file mode 100644 index 000000000000..58d026844564 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_alarm.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_alarm_mute.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_alarm_mute.xml new file mode 100644 index 000000000000..42ee057b02ba --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_alarm_mute.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_bt_sco.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_bt_sco.xml new file mode 100644 index 000000000000..9b9d4e7024f5 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_bt_sco.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_media.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_media.xml new file mode 100644 index 000000000000..faa35f38d7d3 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_media.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_media_bt.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_media_bt.xml new file mode 100644 index 000000000000..385735fc1f9a --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_media_bt.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_media_bt_mute.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_media_bt_mute.xml new file mode 100644 index 000000000000..e15300fd4e95 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_media_bt_mute.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_media_mute.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_media_mute.xml new file mode 100644 index 000000000000..2b9b3c04700d --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_media_mute.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_notification.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_notification.xml new file mode 100644 index 000000000000..3f5d16deda4c --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_notification.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_notification_mute.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_notification_mute.xml new file mode 100644 index 000000000000..4b862ee68cb1 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_notification_mute.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_remote.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_remote.xml new file mode 100644 index 000000000000..290237d19371 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_remote.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_remote_mute.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_remote_mute.xml new file mode 100644 index 000000000000..91e7384800fa --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_remote_mute.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_ringer.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_ringer.xml new file mode 100644 index 000000000000..960dbf312b61 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_ringer.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_ringer_mute.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_ringer_mute.xml new file mode 100644 index 000000000000..6e561d38dc1c --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_ringer_mute.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_ringer_vibrate.xml new file mode 100644 index 000000000000..230dff3fdba3 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_volume_ringer_vibrate.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_wifi_signal_0.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_wifi_signal_0.xml new file mode 100644 index 000000000000..b0562bb3edc6 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_wifi_signal_0.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_wifi_signal_1.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_wifi_signal_1.xml new file mode 100644 index 000000000000..612e4460a2f9 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_wifi_signal_1.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_wifi_signal_2.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_wifi_signal_2.xml new file mode 100644 index 000000000000..18e53fa290ff --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_wifi_signal_2.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_wifi_signal_3.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_wifi_signal_3.xml new file mode 100644 index 000000000000..0433020fa497 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_wifi_signal_3.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_wifi_signal_4.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_wifi_signal_4.xml new file mode 100644 index 000000000000..1f2c5d3761a8 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/ic_wifi_signal_4.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_activity_recognition.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_activity_recognition.xml new file mode 100644 index 000000000000..438f7a609a9e --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_activity_recognition.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_aural.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_aural.xml new file mode 100644 index 000000000000..4e11370100f2 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_aural.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_calendar.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_calendar.xml new file mode 100644 index 000000000000..119570ed3324 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_calendar.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_call_log.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_call_log.xml new file mode 100644 index 000000000000..9ca5bb7c4f28 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_call_log.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_camera.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_camera.xml new file mode 100644 index 000000000000..3cf18c8b08a4 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_camera.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_contacts.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_contacts.xml new file mode 100644 index 000000000000..52465ad99e09 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_contacts.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_location.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_location.xml new file mode 100644 index 000000000000..3b438da25bc9 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_location.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_microphone.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_microphone.xml new file mode 100644 index 000000000000..62bf891bf69a --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_microphone.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_phone_calls.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_phone_calls.xml new file mode 100644 index 000000000000..ce672092970d --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_phone_calls.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_sensors.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_sensors.xml new file mode 100644 index 000000000000..6bbc89fb24af --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_sensors.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_sms.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_sms.xml new file mode 100644 index 000000000000..f0d32db7f8e2 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_sms.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_storage.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_storage.xml new file mode 100644 index 000000000000..ea2aa671b52f --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_storage.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_visual.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_visual.xml new file mode 100644 index 000000000000..2da783c164fb --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/perm_group_visual.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/stat_sys_location.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/stat_sys_location.xml new file mode 100644 index 000000000000..f90e126ecbb8 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/stat_sys_location.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/stat_sys_nfc.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/stat_sys_nfc.xml new file mode 100644 index 000000000000..ae171aa84919 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/stat_sys_nfc.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/stat_sys_speakerphone.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/stat_sys_speakerphone.xml new file mode 100644 index 000000000000..47c5e9c495cb --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/drawable/stat_sys_speakerphone.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineAndroidOverlay/res/values/config.xml b/packages/overlays/IconPackOutlineAndroidOverlay/res/values/config.xml new file mode 100644 index 000000000000..a331063856d5 --- /dev/null +++ b/packages/overlays/IconPackOutlineAndroidOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + M6.315 6.705c.386.037.691.359.701.752L7.004 10h.746c.242.007.275.04.389.109.312.189.44.603.293.953-.635 1.283-1.346 2.528-2.02 3.791-.341.594-1.391.355-1.412-.353V12h-.75c-.242-.007-.275-.04-.389-.109-.312-.189-.44-.602-.293-.952.64-1.299 1.356-2.559 2.036-3.838.142-.249.401-.407.711-.396zm-.814 3.788s0 .017 0 0z + + M10.5 4.05c0-.146-.058-.286-.161-.389-.103-.103-.243-.161-.389-.161h-7.9c-.146 0-.286.058-.389.161-.103.103-.161.243-.161.389v13.9c0 .146.058.286.161.389.103.103.243.161.389.161h7.9c.146 0 .286-.058.389-.161.103-.103.161-.243.161-.389V4.05z + + M7.456.002c.36.004.712.204.897.515.095.161.146.346.146.534v.951c.486 0 .971-.001 1.456 0 .651.003 1.285.33 1.663.86.244.343.39.759.38 1.183v13.908c-.003.63-.313 1.255-.825 1.637-.348.26-.783.404-1.218.406-2.637.005-5.273.005-7.91 0-.648-.002-1.287-.329-1.666-.865-.243-.342-.375-.761-.377-1.178-.007-4.636-.007-9.272 0-13.908.003-.643.321-1.271.845-1.652.347-.252.775-.391 1.204-.391h1.45v-.951s0-.063.006-.116c.044-.39.324-.745.7-.875.108-.037.222-.057.337-.058.971-.003 1.941-.003 2.912 0zm2.492 3.499s-7.167-.005-7.902 0c-.284.003-.543.25-.545.548v13.903c.003.285.251.543.548.545 2.635.005 5.27.021 7.905 0 .282-.003.543-.247.545-.548V4.046c0-.285-.252-.544-.551-.545z + + M6.051 8.252c.382.035.69.362.699.748v1.25c.635 0 1.366-.152 1.749.19.442.395.173 1.295-.499 1.31H6.75c0 .803.157 1.792-.564 1.977-.448.114-.925-.257-.936-.727v-1.25c-.803 0-1.792.157-1.977-.564-.114-.448.257-.925.727-.936h1.25c0-.936-.065-2.038.801-1.998z + diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/Android.bp b/packages/overlays/IconPackOutlineSettingsOverlay/Android.bp new file mode 100644 index 000000000000..b05758aef143 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/Android.bp @@ -0,0 +1,21 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +runtime_resource_overlay { + name: "IconPackOutlineSettingsOverlay", + theme: "IconPackOutlineSettings", + product_specific: true, +} diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/AndroidManifest.xml b/packages/overlays/IconPackOutlineSettingsOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..a931375e342b --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/bottomnav_lockscreen.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/bottomnav_lockscreen.xml new file mode 100644 index 000000000000..b12bdcd01e45 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/bottomnav_lockscreen.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/bottomnav_multitasking.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/bottomnav_multitasking.xml new file mode 100644 index 000000000000..d77393643cf0 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/bottomnav_multitasking.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/bottomnav_navigation.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/bottomnav_navigation.xml new file mode 100644 index 000000000000..2b12a2887ece --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/bottomnav_navigation.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/bottomnav_statusbar.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/bottomnav_statusbar.xml new file mode 100644 index 000000000000..31404c3e4295 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/bottomnav_statusbar.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/bottomnav_system.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/bottomnav_system.xml new file mode 100644 index 000000000000..4156a2a35570 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/bottomnav_system.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_battery_options.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_battery_options.xml new file mode 100644 index 000000000000..ee233f3834ea --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_battery_options.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_buttons.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_buttons.xml new file mode 100644 index 000000000000..9429ff5b3800 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_buttons.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_carrier_label.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_carrier_label.xml new file mode 100644 index 000000000000..6152c0de7448 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_carrier_label.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_clock_options.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_clock_options.xml new file mode 100644 index 000000000000..b9bca5ab60f6 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_clock_options.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_device_extras.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_device_extras.xml new file mode 100644 index 000000000000..a9bd695aa59a --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_device_extras.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_expanded_desktop.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_expanded_desktop.xml new file mode 100644 index 000000000000..f6325081fc9c --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_expanded_desktop.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_fingerprint_prefs.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_fingerprint_prefs.xml new file mode 100644 index 000000000000..e6df7e66ceee --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_fingerprint_prefs.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_headsup.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_headsup.xml new file mode 100644 index 000000000000..443ca98fc5ce --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_headsup.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_icon_manager.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_icon_manager.xml new file mode 100644 index 000000000000..8ede763d6fb7 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_icon_manager.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_lockscreen_items.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_lockscreen_items.xml new file mode 100644 index 000000000000..01dbdab613ab --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_lockscreen_items.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_miscellaneous.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_miscellaneous.xml new file mode 100644 index 000000000000..71e7b1c3cf84 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_miscellaneous.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_navigationbar.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_navigationbar.xml new file mode 100644 index 000000000000..1f0e25d553c7 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_navigationbar.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_notifications.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_notifications.xml new file mode 100644 index 000000000000..725990eaa9eb --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_notifications.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_omniswitch.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_omniswitch.xml new file mode 100644 index 000000000000..f13202436448 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_omniswitch.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_powermenu.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_powermenu.xml new file mode 100644 index 000000000000..eaa5d4f994e3 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_powermenu.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_quicksettings.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_quicksettings.xml new file mode 100644 index 000000000000..9ee4408b96b6 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_quicksettings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_recents.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_recents.xml new file mode 100644 index 000000000000..62ae7b360667 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_recents.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_ticker.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_ticker.xml new file mode 100644 index 000000000000..b41e024e5b1e --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_ticker.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_traffic.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_traffic.xml new file mode 100644 index 000000000000..b62b3984515f --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/dt_traffic.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/essential_settings.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/essential_settings.xml new file mode 100644 index 000000000000..3526cfc6107d --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/essential_settings.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_about_team.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_about_team.xml new file mode 100644 index 000000000000..8f8b574eb91d --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_about_team.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_aggressive_battery.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_aggressive_battery.xml new file mode 100644 index 000000000000..553eebd20d83 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_aggressive_battery.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_alarm_fh.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_alarm_fh.xml new file mode 100644 index 000000000000..904c19227d25 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_alarm_fh.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_alarmblock.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_alarmblock.xml new file mode 100644 index 000000000000..c946d4b480a0 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_alarmblock.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_ancientsettings.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_ancientsettings.xml new file mode 100644 index 000000000000..e581f51a328f --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_ancientsettings.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_animations.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_animations.xml new file mode 100644 index 000000000000..68c023f21555 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_animations.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_aod.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_aod.xml new file mode 100644 index 000000000000..7d1143e5ae3d --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_aod.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_arrow_down_24dp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_arrow_down_24dp.xml new file mode 100644 index 000000000000..ec7e43644087 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_arrow_down_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_bars_tile.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_bars_tile.xml new file mode 100644 index 000000000000..60b53ccd358c --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_bars_tile.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_battery.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_battery.xml new file mode 100644 index 000000000000..dc2660ee5865 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_battery.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_battery_bar.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_battery_bar.xml new file mode 100644 index 000000000000..dc2660ee5865 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_battery_bar.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_battery_settings.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_battery_settings.xml new file mode 100644 index 000000000000..dc2660ee5865 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_battery_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_bluetooth_connect.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_bluetooth_connect.xml new file mode 100644 index 000000000000..d36aefb30645 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_bluetooth_connect.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_blur.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_blur.xml new file mode 100644 index 000000000000..13ecb2d860c5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_blur.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_button_settings.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_button_settings.xml new file mode 100644 index 000000000000..bf7f848d2b98 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_button_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_buttons.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_buttons.xml new file mode 100644 index 000000000000..7a9966fdcbb8 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_buttons.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_cache.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_cache.xml new file mode 100644 index 000000000000..15631f893800 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_cache.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_carrierlabel.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_carrierlabel.xml new file mode 100644 index 000000000000..469955c8e945 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_carrierlabel.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_clock.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_clock.xml new file mode 100644 index 000000000000..32eeb5171399 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_clock.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_cursor.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_cursor.xml new file mode 100644 index 000000000000..eca16837c0be --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_cursor.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_customisation.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_customisation.xml new file mode 100644 index 000000000000..fe4ad1cf6efd --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_customisation.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_descendant_utility_internal.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_descendant_utility_internal.xml new file mode 100644 index 000000000000..1ece8d512c25 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_descendant_utility_internal.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_display_rotation_tile.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_display_rotation_tile.xml new file mode 100644 index 000000000000..41e54520c4d1 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_display_rotation_tile.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dns.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dns.xml new file mode 100644 index 000000000000..2eaa56a9d52b --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dns.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_do_not_disturb.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_do_not_disturb.xml new file mode 100644 index 000000000000..44b1be03f1c2 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_do_not_disturb.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_accessibility.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_accessibility.xml new file mode 100644 index 000000000000..63c298d74e88 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_accessibility.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_account.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_account.xml new file mode 100644 index 000000000000..9bc2c133785b --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_account.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_apps.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_apps.xml new file mode 100644 index 000000000000..8ced74616bc9 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_apps.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_battery.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_battery.xml new file mode 100644 index 000000000000..d997ce8355f8 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_battery.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_devices_other.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_devices_other.xml new file mode 100644 index 000000000000..649e20ec43fc --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_devices_other.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_display.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_display.xml new file mode 100644 index 000000000000..33c877789a52 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_display.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_extras.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_extras.xml new file mode 100644 index 000000000000..6658ab05213b --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_extras.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_security.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_security.xml new file mode 100644 index 000000000000..1bf5a2f9f94e --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_security.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_storage.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_storage.xml new file mode 100644 index 000000000000..9ac67e69ac5e --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_storage.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_system.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_system.xml new file mode 100644 index 000000000000..bb9416adee7f --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_system.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_volume.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_volume.xml new file mode 100644 index 000000000000..6b99360b07fa --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_volume.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_wireless.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_wireless.xml new file mode 100644 index 000000000000..0a79b1e99c51 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dot_wireless.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dotui.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dotui.xml new file mode 100644 index 000000000000..b6f05003b8f9 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dotui.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dui.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dui.xml new file mode 100644 index 000000000000..8a92ebe3ca32 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_dui.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_edge_gestures.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_edge_gestures.xml new file mode 100644 index 000000000000..2c1434601cf3 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_edge_gestures.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_extensions_info.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_extensions_info.xml new file mode 100644 index 000000000000..a4f9b03271c3 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_extensions_info.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_face.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_face.xml new file mode 100644 index 000000000000..9bc2af877274 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_face.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_fh_ashes.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_fh_ashes.xml new file mode 100644 index 000000000000..4ed26a4c0825 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_fh_ashes.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_fh_battery.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_fh_battery.xml new file mode 100644 index 000000000000..1755408125aa --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_fh_battery.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_fh_headsup.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_fh_headsup.xml new file mode 100644 index 000000000000..cb1aa09dd895 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_fh_headsup.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_fh_ota.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_fh_ota.xml new file mode 100644 index 000000000000..52eaa49d45b2 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_fh_ota.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_fourg.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_fourg.xml new file mode 100644 index 000000000000..4aa2641d9c24 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_fourg.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_fries.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_fries.xml new file mode 100644 index 000000000000..6df9ff54818c --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_fries.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_gaming.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_gaming.xml new file mode 100644 index 000000000000..615acf461090 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_gaming.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_gaming_mode.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_gaming_mode.xml new file mode 100644 index 000000000000..615acf461090 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_gaming_mode.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_general_tweaks.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_general_tweaks.xml new file mode 100644 index 000000000000..f586349fc775 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_general_tweaks.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_gestures.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_gestures.xml new file mode 100644 index 000000000000..064937401a68 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_gestures.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_gestures_app_internal.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_gestures_app_internal.xml new file mode 100644 index 000000000000..f7bcd6f06d56 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_gestures_app_internal.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_gestures_dashboard.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_gestures_dashboard.xml new file mode 100644 index 000000000000..61ca25238b08 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_gestures_dashboard.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_gestures_page.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_gestures_page.xml new file mode 100644 index 000000000000..202792230125 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_gestures_page.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_hash.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_hash.xml new file mode 100644 index 000000000000..6971562d2d65 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_hash.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_hw_buttons.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_hw_buttons.xml new file mode 100644 index 000000000000..d93636c1ad91 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_hw_buttons.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_inactive_apps.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_inactive_apps.xml new file mode 100644 index 000000000000..0591dab4c49b --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_inactive_apps.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_indicators.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_indicators.xml new file mode 100644 index 000000000000..c23d9df5b489 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_indicators.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_ionizer_ion.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_ionizer_ion.xml new file mode 100644 index 000000000000..d22458528b77 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_ionizer_ion.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lights.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lights.xml new file mode 100644 index 000000000000..7d02bf240967 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lights.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lights_2.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lights_2.xml new file mode 100644 index 000000000000..04d3026f6223 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lights_2.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen.xml new file mode 100644 index 000000000000..b12bdcd01e45 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_category.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_category.xml new file mode 100644 index 000000000000..b12bdcd01e45 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_category.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_shortcuts.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_shortcuts.xml new file mode 100644 index 000000000000..2abc3eacbdb7 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_shortcuts.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_targets.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_targets.xml new file mode 100644 index 000000000000..70f7e60d6db9 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_targets.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_tile.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_tile.xml new file mode 100644 index 000000000000..b12bdcd01e45 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_tile.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_tuner.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_tuner.xml new file mode 100644 index 000000000000..b12bdcd01e45 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_tuner.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_ui.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_ui.xml new file mode 100644 index 000000000000..b12bdcd01e45 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_ui.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_weather.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_weather.xml new file mode 100644 index 000000000000..6974a4a2de22 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_lockscreen_weather.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_mcaosp_settings.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_mcaosp_settings.xml new file mode 100644 index 000000000000..82decc3df937 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_mcaosp_settings.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_menu_play_store.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_menu_play_store.xml new file mode 100644 index 000000000000..f1f7eeb19733 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_menu_play_store.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_misc.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_misc.xml new file mode 100644 index 000000000000..930fecb33c94 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_misc.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_misc_derpspace.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_misc_derpspace.xml new file mode 100644 index 000000000000..9d293ce183e0 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_misc_derpspace.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_misc_display.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_misc_display.xml new file mode 100644 index 000000000000..b3abe39cf752 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_misc_display.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_misc_notifications.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_misc_notifications.xml new file mode 100644 index 000000000000..7dbb29fad23d --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_misc_notifications.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_movie.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_movie.xml new file mode 100644 index 000000000000..89c5d460403b --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_movie.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_mtp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_mtp.xml new file mode 100644 index 000000000000..4efcdd1bbde4 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_mtp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_music.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_music.xml new file mode 100644 index 000000000000..2244da55f505 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_music.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_navbar_tuner.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_navbar_tuner.xml new file mode 100644 index 000000000000..2b12a2887ece --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_navbar_tuner.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_navigation.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_navigation.xml new file mode 100644 index 000000000000..2b12a2887ece --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_navigation.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_navigation_category.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_navigation_category.xml new file mode 100644 index 000000000000..2b12a2887ece --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_navigation_category.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_notification.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_notification.xml new file mode 100644 index 000000000000..1604facbc7f2 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_notification.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_notifications.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_notifications.xml new file mode 100644 index 000000000000..b6db75cb5710 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_notifications.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_notifications_panel_category.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_notifications_panel_category.xml new file mode 100644 index 000000000000..faf3df3d59b4 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_notifications_panel_category.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_op_gestures.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_op_gestures.xml new file mode 100644 index 000000000000..71197a3750e3 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_op_gestures.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_advanced.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_advanced.xml new file mode 100644 index 000000000000..6eb452419cca --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_advanced.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_buttons.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_buttons.xml new file mode 100644 index 000000000000..8a92ebe3ca32 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_buttons.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_gesture.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_gesture.xml new file mode 100644 index 000000000000..064937401a68 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_gesture.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_lockscreen.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_lockscreen.xml new file mode 100644 index 000000000000..b12bdcd01e45 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_lockscreen.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_nav.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_nav.xml new file mode 100644 index 000000000000..2b12a2887ece --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_nav.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_notif.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_notif.xml new file mode 100644 index 000000000000..8fcea4b12ce6 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_notif.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_qs.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_qs.xml new file mode 100644 index 000000000000..6b2bfffdaeb7 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_qs.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_recents.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_recents.xml new file mode 100644 index 000000000000..d77393643cf0 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_recents.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_status.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_status.xml new file mode 100644 index 000000000000..31404c3e4295 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_owlsnest_status.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_panels_category.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_panels_category.xml new file mode 100644 index 000000000000..bb089017448f --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_panels_category.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_phone_classic.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_phone_classic.xml new file mode 100644 index 000000000000..f1be83ddc16d --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_phone_classic.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pie_battery.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pie_battery.xml new file mode 100644 index 000000000000..dc2660ee5865 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pie_battery.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pie_gravity.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pie_gravity.xml new file mode 100644 index 000000000000..6c4c82cff024 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pie_gravity.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pie_settings.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pie_settings.xml new file mode 100644 index 000000000000..dc0407b5595e --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pie_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pie_status.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pie_status.xml new file mode 100644 index 000000000000..9f0d256da3f7 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pie_status.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pie_theme.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pie_theme.xml new file mode 100644 index 000000000000..8a6a557cd095 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pie_theme.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pocket_judge.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pocket_judge.xml new file mode 100644 index 000000000000..a01435c35dc0 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pocket_judge.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_power_button.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_power_button.xml new file mode 100644 index 000000000000..7ecc1043d8fb --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_power_button.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_privacy.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_privacy.xml new file mode 100644 index 000000000000..e55c97f81c09 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_privacy.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pulldown.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pulldown.xml new file mode 100644 index 000000000000..064937401a68 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pulldown.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pulse.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pulse.xml new file mode 100644 index 000000000000..8564aa4f96a0 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_pulse.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_qs_header.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_qs_header.xml new file mode 100644 index 000000000000..9b0fffa0009b --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_qs_header.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_qs_misc.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_qs_misc.xml new file mode 100644 index 000000000000..425915102935 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_qs_misc.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_qs_weather_default_on.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_qs_weather_default_on.xml new file mode 100644 index 000000000000..7e4f89554436 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_qs_weather_default_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_quicksettings.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_quicksettings.xml new file mode 100644 index 000000000000..6b2bfffdaeb7 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_quicksettings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_recents_category.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_recents_category.xml new file mode 100644 index 000000000000..d77393643cf0 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_recents_category.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_recents_ui.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_recents_ui.xml new file mode 100644 index 000000000000..d77393643cf0 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_recents_ui.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_roaming_indicator.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_roaming_indicator.xml new file mode 100644 index 000000000000..e225446cd302 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_roaming_indicator.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_screenshot.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_screenshot.xml new file mode 100644 index 000000000000..a5e592b10224 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_screenshot.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_screwd_settings.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_screwd_settings.xml new file mode 100644 index 000000000000..287638f9b5bd --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_screwd_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_abc.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_abc.xml new file mode 100644 index 000000000000..16d62231662b --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_abc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_aicpextras.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_aicpextras.xml new file mode 100644 index 000000000000..52e93036d8c4 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_aicpextras.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_ambient.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_ambient.xml new file mode 100644 index 000000000000..4e15a70e9436 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_ambient.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_animation.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_animation.xml new file mode 100644 index 000000000000..14706acb3a8c --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_animation.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_aosmp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_aosmp.xml new file mode 100644 index 000000000000..b6668ab6995d --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_aosmp.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_appops.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_appops.xml new file mode 100644 index 000000000000..5b256c6bb708 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_appops.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_beast.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_beast.xml new file mode 100644 index 000000000000..748b061217a0 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_beast.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_benzo.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_benzo.xml new file mode 100644 index 000000000000..97d708a9a1c7 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_benzo.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_bootlegdump.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_bootlegdump.xml new file mode 100644 index 000000000000..70d00027a459 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_bootlegdump.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_button.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_button.xml new file mode 100644 index 000000000000..1ca6471baee1 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_button.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_buttons.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_buttons.xml new file mode 100644 index 000000000000..1ca6471baee1 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_buttons.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_cardinal.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_cardinal.xml new file mode 100644 index 000000000000..183668bca88b --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_cardinal.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_cf.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_cf.xml new file mode 100644 index 000000000000..d22458528b77 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_cf.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_clown_logo.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_clown_logo.xml new file mode 100644 index 000000000000..f1890ca9a01f --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_clown_logo.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_colt.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_colt.xml new file mode 100644 index 000000000000..e428046f7707 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_colt.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_config_center.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_config_center.xml new file mode 100644 index 000000000000..c7b1cd0c3695 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_config_center.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_cosp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_cosp.xml new file mode 100644 index 000000000000..2d8a5e67662c --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_cosp.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_crdroid.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_crdroid.xml new file mode 100644 index 000000000000..d22458528b77 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_crdroid.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_customizations.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_customizations.xml new file mode 100644 index 000000000000..6eb452419cca --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_customizations.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_customsquash.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_customsquash.xml new file mode 100644 index 000000000000..831f9eed7b25 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_customsquash.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_derpspace.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_derpspace.xml new file mode 100644 index 000000000000..f443fe7aaac0 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_derpspace.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_derpzone.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_derpzone.xml new file mode 100644 index 000000000000..1c6ad344de28 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_derpzone.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_device.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_device.xml new file mode 100644 index 000000000000..60b53ccd358c --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_device.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_displaymanager.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_displaymanager.xml new file mode 100644 index 000000000000..560a15ae2b37 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_displaymanager.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_dotextras.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_dotextras.xml new file mode 100644 index 000000000000..4156a2a35570 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_dotextras.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_du_logo.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_du_logo.xml new file mode 100644 index 000000000000..51f86efd8c22 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_du_logo.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_du_themes.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_du_themes.xml new file mode 100644 index 000000000000..9f356d65403c --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_du_themes.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_evolution.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_evolution.xml new file mode 100644 index 000000000000..72ff4a80b7fd --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_evolution.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_evolution_about.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_evolution_about.xml new file mode 100644 index 000000000000..d1460e37b49c --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_evolution_about.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_exmanager.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_exmanager.xml new file mode 100644 index 000000000000..4ed26a4c0825 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_exmanager.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_extdesk_hideboth.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_extdesk_hideboth.xml new file mode 100644 index 000000000000..f5b65df01e10 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_extdesk_hideboth.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_extdesk_hidenavbar.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_extdesk_hidenavbar.xml new file mode 100644 index 000000000000..eca16837c0be --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_extdesk_hidenavbar.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_extdesk_hidenone.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_extdesk_hidenone.xml new file mode 100644 index 000000000000..8ae21c900b99 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_extdesk_hidenone.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_extdesk_hidestatusbar.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_extdesk_hidestatusbar.xml new file mode 100644 index 000000000000..729f3452f28a --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_extdesk_hidestatusbar.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_extensions.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_extensions.xml new file mode 100644 index 000000000000..5a0bcc576d5f --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_extensions.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_gesture.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_gesture.xml new file mode 100644 index 000000000000..064937401a68 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_gesture.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_gestureanywhere.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_gestureanywhere.xml new file mode 100644 index 000000000000..064937401a68 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_gestureanywhere.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_gestures.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_gestures.xml new file mode 100644 index 000000000000..d2270354583b --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_gestures.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_gestures2.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_gestures2.xml new file mode 100644 index 000000000000..202792230125 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_gestures2.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_gestures_omni.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_gestures_omni.xml new file mode 100644 index 000000000000..202792230125 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_gestures_omni.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_havoc.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_havoc.xml new file mode 100644 index 000000000000..3635f3f9ba0d --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_havoc.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_illusion.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_illusion.xml new file mode 100644 index 000000000000..9f5574e20dff --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_illusion.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_ime.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_ime.xml new file mode 100644 index 000000000000..bf7f848d2b98 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_ime.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_int.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_int.xml new file mode 100644 index 000000000000..24d9bfa86f46 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_int.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_keyboard.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_keyboard.xml new file mode 100644 index 000000000000..bf7f848d2b98 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_keyboard.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_leds.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_leds.xml new file mode 100644 index 000000000000..7d02bf240967 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_leds.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_liquid.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_liquid.xml new file mode 100644 index 000000000000..f91f994cd19d --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_liquid.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_location.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_location.xml new file mode 100644 index 000000000000..583dbcabcd8a --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_location.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_lockscreen.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_lockscreen.xml new file mode 100644 index 000000000000..b12bdcd01e45 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_lockscreen.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_lockscreens.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_lockscreens.xml new file mode 100644 index 000000000000..b12bdcd01e45 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_lockscreens.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_magisk.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_magisk.xml new file mode 100644 index 000000000000..36320023980e --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_magisk.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_misc.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_misc.xml new file mode 100644 index 000000000000..9d293ce183e0 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_misc.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_miscellaneous.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_miscellaneous.xml new file mode 100644 index 000000000000..54904a24b2bb --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_miscellaneous.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_miscs.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_miscs.xml new file mode 100644 index 000000000000..425915102935 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_miscs.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_miservice.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_miservice.xml new file mode 100644 index 000000000000..d60b026b852a --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_miservice.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_more.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_more.xml new file mode 100644 index 000000000000..4cb4c4bba180 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_more.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_navbar.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_navbar.xml new file mode 100644 index 000000000000..2b12a2887ece --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_navbar.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_navigation.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_navigation.xml new file mode 100644 index 000000000000..f0a12ac318ce --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_navigation.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_nitrogen.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_nitrogen.xml new file mode 100644 index 000000000000..60bf33ba570a --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_nitrogen.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_notification.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_notification.xml new file mode 100644 index 000000000000..8fcea4b12ce6 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_notification.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_omnigears.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_omnigears.xml new file mode 100644 index 000000000000..4156a2a35570 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_omnigears.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_pd_gestures.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_pd_gestures.xml new file mode 100644 index 000000000000..202792230125 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_pd_gestures.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_pewdiepie.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_pewdiepie.xml new file mode 100644 index 000000000000..5310cc96bf9c --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_pewdiepie.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_pie.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_pie.xml new file mode 100644 index 000000000000..695bf35d15b2 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_pie.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_pixeldust.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_pixeldust.xml new file mode 100644 index 000000000000..be6fcc59df2b --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_pixeldust.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_pixys.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_pixys.xml new file mode 100644 index 000000000000..2e094b069eb8 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_pixys.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_powermenu.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_powermenu.xml new file mode 100644 index 000000000000..7ecc1043d8fb --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_powermenu.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_quicksettings.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_quicksettings.xml new file mode 100644 index 000000000000..6b2bfffdaeb7 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_quicksettings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_recents.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_recents.xml new file mode 100644 index 000000000000..d77393643cf0 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_recents.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_rootmanagement.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_rootmanagement.xml new file mode 100644 index 000000000000..b80955fe3adc --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_rootmanagement.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_screen.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_screen.xml new file mode 100644 index 000000000000..04617e0dea1a --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_screen.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_sidebar.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_sidebar.xml new file mode 100644 index 000000000000..69926e205ad4 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_sidebar.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_sim.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_sim.xml new file mode 100644 index 000000000000..d2d5781a1f9e --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_sim.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_six.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_six.xml new file mode 100644 index 000000000000..9e47fc0e93d9 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_six.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_skydragon.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_skydragon.xml new file mode 100644 index 000000000000..7d2d46ad23ab --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_skydragon.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_spectrum.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_spectrum.xml new file mode 100644 index 000000000000..4fc19c614032 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_spectrum.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_statusbar.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_statusbar.xml new file mode 100644 index 000000000000..ae02a0298fb9 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_statusbar.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_style.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_style.xml new file mode 100644 index 000000000000..a1c06a0a6b03 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_style.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_substratum.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_substratum.xml new file mode 100644 index 000000000000..6f8bbb597d33 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_substratum.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_superiorsettings.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_superiorsettings.xml new file mode 100644 index 000000000000..cede1131570c --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_superiorsettings.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_syberia_white.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_syberia_white.xml new file mode 100644 index 000000000000..09731d787055 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_syberia_white.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_system.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_system.xml new file mode 100644 index 000000000000..0b0a267ea0fc --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_system.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_theming.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_theming.xml new file mode 100644 index 000000000000..19e03948f88f --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_theming.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_venom.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_venom.xml new file mode 100644 index 000000000000..6178419c1aaa --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_venom.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_vthemechooser.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_vthemechooser.xml new file mode 100644 index 000000000000..a1c06a0a6b03 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_vthemechooser.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_weather.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_weather.xml new file mode 100644 index 000000000000..7e4f89554436 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_weather.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_wifi.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_wifi.xml new file mode 100644 index 000000000000..ed9d76eda414 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_wifi.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_wolvesden.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_wolvesden.xml new file mode 100644 index 000000000000..f3dadf478a1a --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_wolvesden.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_xtensions.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_xtensions.xml new file mode 100644 index 000000000000..8d0855f6fb7d --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_settings_xtensions.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_shapes.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_shapes.xml new file mode 100644 index 000000000000..1d512f8e7bfc --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_shapes.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_sim_sd.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_sim_sd.xml new file mode 100644 index 000000000000..0a35857a6d7a --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_sim_sd.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_smartbar_restore_profile.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_smartbar_restore_profile.xml new file mode 100644 index 000000000000..709d87a207b2 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_smartbar_restore_profile.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_smartbar_save_profile.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_smartbar_save_profile.xml new file mode 100644 index 000000000000..d2bb57dae025 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_smartbar_save_profile.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_sound_settings.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_sound_settings.xml new file mode 100644 index 000000000000..20ef843ca5e3 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_sound_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_sparks_bolt.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_sparks_bolt.xml new file mode 100644 index 000000000000..2ff42aee4afb --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_sparks_bolt.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_status_bar_category.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_status_bar_category.xml new file mode 100644 index 000000000000..31404c3e4295 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_status_bar_category.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_status_bar_clock.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_status_bar_clock.xml new file mode 100644 index 000000000000..4c53edc0120b --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_status_bar_clock.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_statusbar.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_statusbar.xml new file mode 100644 index 000000000000..31404c3e4295 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_statusbar.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_statusbar_category.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_statusbar_category.xml new file mode 100644 index 000000000000..c185bcb906d5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_statusbar_category.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_statusbar_items.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_statusbar_items.xml new file mode 100644 index 000000000000..31404c3e4295 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_statusbar_items.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_statusbarclock.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_statusbarclock.xml new file mode 100644 index 000000000000..519a01562f6e --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_statusbarclock.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_superiorsettings.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_superiorsettings.xml new file mode 100644 index 000000000000..33867ed1435c --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_superiorsettings.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_sys_anim.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_sys_anim.xml new file mode 100644 index 000000000000..68c023f21555 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_sys_anim.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_sys_gestures.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_sys_gestures.xml new file mode 100644 index 000000000000..064937401a68 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_sys_gestures.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_system.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_system.xml new file mode 100644 index 000000000000..4156a2a35570 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_system.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_system_category.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_system_category.xml new file mode 100644 index 000000000000..4156a2a35570 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_system_category.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_systemappremover.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_systemappremover.xml new file mode 100644 index 000000000000..419e7a9a9eac --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_systemappremover.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_tiles.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_tiles.xml new file mode 100644 index 000000000000..6b2bfffdaeb7 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_tiles.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_traffic.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_traffic.xml new file mode 100644 index 000000000000..4fc19c614032 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_traffic.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_tune.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_tune.xml new file mode 100644 index 000000000000..6646ad937ed1 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_tune.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_volume_buttons.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_volume_buttons.xml new file mode 100644 index 000000000000..20b889c441cd --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_volume_buttons.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_wakeblock.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_wakeblock.xml new file mode 100644 index 000000000000..86133e346a00 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_wakeblock.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_wakelock_fh.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_wakelock_fh.xml new file mode 100644 index 000000000000..86133e346a00 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_wakelock_fh.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_weather.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_weather.xml new file mode 100644 index 000000000000..6974a4a2de22 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_weather.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_xenonhd_settings.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_xenonhd_settings.xml new file mode 100644 index 000000000000..a33f8d82297d --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ic_xenonhd_settings.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/omnirom_logo.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/omnirom_logo.xml new file mode 100644 index 000000000000..1b376d7f0460 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/omnirom_logo.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/omnirom_logo_white.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/omnirom_logo_white.xml new file mode 100644 index 000000000000..10fbf6806e2e --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/omnirom_logo_white.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/op_default_launcher.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/op_default_launcher.xml new file mode 100644 index 000000000000..8b5fd4a87895 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/op_default_launcher.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/op_font_style.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/op_font_style.xml new file mode 100644 index 000000000000..2e5416b6d25e --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/op_font_style.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/op_ic_advanced_settings.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/op_ic_advanced_settings.xml new file mode 100644 index 000000000000..706f31bca34b --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/op_ic_advanced_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/op_ic_settings_sim.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/op_ic_settings_sim.xml new file mode 100644 index 000000000000..3c9c23b62a31 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/op_ic_settings_sim.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/op_ic_settings_vpn.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/op_ic_settings_vpn.xml new file mode 100644 index 000000000000..7b791c83d4e5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/op_ic_settings_vpn.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/op_ic_status_bar.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/op_ic_status_bar.xml new file mode 100644 index 000000000000..789ee6c916fd --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/op_ic_status_bar.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ring_notif_increasing.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ring_notif_increasing.xml new file mode 100644 index 000000000000..7cf7166245dc --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/ring_notif_increasing.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/rr_main_conf_icon.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/rr_main_conf_icon.xml new file mode 100644 index 000000000000..65284baa7f1b --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/rr_main_conf_icon.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/rr_main_conf_icon_white.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/rr_main_conf_icon_white.xml new file mode 100644 index 000000000000..f1e644a64e27 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/rr_main_conf_icon_white.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/rr_themes.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/rr_themes.xml new file mode 100644 index 000000000000..2f55cff26e07 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-anydpi/rr_themes.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-night-anydpi/ic_buttons.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-night-anydpi/ic_buttons.xml new file mode 100644 index 000000000000..3965450eda66 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-night-anydpi/ic_buttons.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-night-anydpi/ic_gestures_dashboard.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-night-anydpi/ic_gestures_dashboard.xml new file mode 100644 index 000000000000..f4205c6cd5d4 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable-night-anydpi/ic_gestures_dashboard.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/drag_handle.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/drag_handle.xml new file mode 100644 index 000000000000..ae2580f8ab27 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/drag_handle.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/home.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/home.xml new file mode 100644 index 000000000000..8b5fd4a87895 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/home.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_adb.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_adb.xml new file mode 100644 index 000000000000..4d588b4d274e --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_adb.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_airplane.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_airplane.xml new file mode 100644 index 000000000000..0e68d37ebcb6 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_airplane.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_airplanemode_active.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_airplanemode_active.xml new file mode 100644 index 000000000000..2bd13307d273 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_airplanemode_active.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_android.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_android.xml new file mode 100644 index 000000000000..1919d29141e2 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_android.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_apps.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_apps.xml new file mode 100644 index 000000000000..747a7a26b91b --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_apps.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_apps_vd_theme_24.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_apps_vd_theme_24.xml new file mode 100644 index 000000000000..f60038ce5362 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_apps_vd_theme_24.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_attach_money_black_24dp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_attach_money_black_24dp.xml new file mode 100644 index 000000000000..57330d114fa7 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_attach_money_black_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_audio_ring.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_audio_ring.xml new file mode 100644 index 000000000000..f37d62b83a9f --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_audio_ring.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_battery_saver_accent_24dp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_battery_saver_accent_24dp.xml new file mode 100644 index 000000000000..8eaedd05e423 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_battery_saver_accent_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_battery_status_bad_24dp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_battery_status_bad_24dp.xml new file mode 100644 index 000000000000..53049d14daf3 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_battery_status_bad_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml new file mode 100644 index 000000000000..1b1474f0735f --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml new file mode 100644 index 000000000000..5236b46289f5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_cellphone.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_cellphone.xml new file mode 100644 index 000000000000..a19dd1367c56 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_cellphone.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_headphones_a2dp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_headphones_a2dp.xml new file mode 100644 index 000000000000..4873c2018c20 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_headphones_a2dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_headset_hfp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_headset_hfp.xml new file mode 100644 index 000000000000..eebea4b2be71 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_headset_hfp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_laptop.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_laptop.xml new file mode 100644 index 000000000000..4de522208887 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_laptop.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_misc_hid.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_misc_hid.xml new file mode 100644 index 000000000000..fc8d0acd2aa7 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_misc_hid.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_network_pan.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_network_pan.xml new file mode 100644 index 000000000000..1755cd40b1c2 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_network_pan.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_pointing_hid.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_pointing_hid.xml new file mode 100644 index 000000000000..af9638e862b6 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_bt_pointing_hid.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_cast_24dp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_cast_24dp.xml new file mode 100644 index 000000000000..290237d19371 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_cast_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_cellular_off.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_cellular_off.xml new file mode 100644 index 000000000000..734de95ebb5f --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_cellular_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_data_saver.xml new file mode 100644 index 000000000000..e473d7602218 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_data_saver.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_dc_tile.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_dc_tile.xml new file mode 100644 index 000000000000..7dc86082a836 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_dc_tile.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_delete.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_delete.xml new file mode 100644 index 000000000000..7b730040dd2e --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_delete.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_devices_other.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_devices_other.xml new file mode 100644 index 000000000000..923b0b0c2d9d --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_devices_other.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_devices_other_black.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_devices_other_black.xml new file mode 100644 index 000000000000..24ed09dda45e --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_devices_other_black.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml new file mode 100644 index 000000000000..1f198cf87cfd --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_expand_less.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_expand_less.xml new file mode 100644 index 000000000000..b4315adea5bb --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_expand_less.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_expand_more.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_expand_more.xml new file mode 100644 index 000000000000..9b949c139880 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_expand_more.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_find_device_disabled.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_find_device_disabled.xml new file mode 100644 index 000000000000..5e40f17a93f4 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_find_device_disabled.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_find_device_enabled.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_find_device_enabled.xml new file mode 100644 index 000000000000..127426dcd778 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_find_device_enabled.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_find_in_page_24px.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_find_in_page_24px.xml new file mode 100644 index 000000000000..1420e0de5d30 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_find_in_page_24px.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml new file mode 100644 index 000000000000..4373f320cf06 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_frequency_antenna.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_frequency_antenna.xml new file mode 100644 index 000000000000..cc622473b355 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_frequency_antenna.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_friction_lock_closed.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_friction_lock_closed.xml new file mode 100644 index 000000000000..8eda44170e4d --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_friction_lock_closed.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_friction_money.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_friction_money.xml new file mode 100644 index 000000000000..cc4bdfe3f8c2 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_friction_money.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_hbm_tile.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_hbm_tile.xml new file mode 100644 index 000000000000..8f3ae58d55ff --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_hbm_tile.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_help.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_help.xml new file mode 100644 index 000000000000..f29df08b25bf --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_help.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_help_actionbar.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_help_actionbar.xml new file mode 100644 index 000000000000..1ea9860c8949 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_help_actionbar.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_homepage_search.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_homepage_search.xml new file mode 100644 index 000000000000..3d64ee5962e4 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_homepage_search.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_hotspot.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_hotspot.xml new file mode 100644 index 000000000000..915de587855a --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_hotspot.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_info_outline_24dp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_info_outline_24dp.xml new file mode 100644 index 000000000000..6d2695dcb5c0 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_info_outline_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_local_movies.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_local_movies.xml new file mode 100644 index 000000000000..b5ba034be662 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_local_movies.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml new file mode 100644 index 000000000000..20ef843ca5e3 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_media_stream.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_media_stream.xml new file mode 100644 index 000000000000..88510fbd5e0a --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_media_stream.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_media_stream_off.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_media_stream_off.xml new file mode 100644 index 000000000000..df79e4bcc219 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_media_stream_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_menu.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_menu.xml new file mode 100644 index 000000000000..c32c3e557309 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_menu.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_menu_add.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_menu_add.xml new file mode 100644 index 000000000000..7b791c83d4e5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_menu_add.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_menu_add_inset.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_menu_add_inset.xml new file mode 100644 index 000000000000..7b791c83d4e5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_menu_add_inset.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_menu_add_white.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_menu_add_white.xml new file mode 100644 index 000000000000..7b791c83d4e5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_menu_add_white.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_mode_edit.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_mode_edit.xml new file mode 100644 index 000000000000..7f46ea36c488 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_mode_edit.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_music_note_vd_theme_24.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_music_note_vd_theme_24.xml new file mode 100644 index 000000000000..88510fbd5e0a --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_music_note_vd_theme_24.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_network_cell.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_network_cell.xml new file mode 100644 index 000000000000..03129f915255 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_network_cell.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_nfc.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_nfc.xml new file mode 100644 index 000000000000..da187d8c428c --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_nfc.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml new file mode 100644 index 000000000000..6e561d38dc1c --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_open_wifi_autoconnect.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_open_wifi_autoconnect.xml new file mode 100644 index 000000000000..de90be43404e --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_open_wifi_autoconnect.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_open_wifi_notifications.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_open_wifi_notifications.xml new file mode 100644 index 000000000000..a8d2369d0e6a --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_open_wifi_notifications.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_ota_update_current.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_ota_update_current.xml new file mode 100644 index 000000000000..2d0100f6decb --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_ota_update_current.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_package_verifier_disabled.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_package_verifier_disabled.xml new file mode 100644 index 000000000000..26fbf0c7cfa5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_package_verifier_disabled.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_package_verifier_enabled.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_package_verifier_enabled.xml new file mode 100644 index 000000000000..61b19786f5ef --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_package_verifier_enabled.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_panel_tile.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_panel_tile.xml new file mode 100644 index 000000000000..bd1e3ac0d807 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_panel_tile.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_phone_info.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_phone_info.xml new file mode 100644 index 000000000000..e014ed6948f1 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_phone_info.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_photo_library.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_photo_library.xml new file mode 100644 index 000000000000..fe269632a0ea --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_photo_library.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_photo_library_vd_theme_24.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_photo_library_vd_theme_24.xml new file mode 100644 index 000000000000..fe269632a0ea --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_photo_library_vd_theme_24.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_qrcode_24dp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_qrcode_24dp.xml new file mode 100644 index 000000000000..32606d97937f --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_qrcode_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_restore.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_restore.xml new file mode 100644 index 000000000000..40e11bc6a84b --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_restore.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_scan_24dp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_scan_24dp.xml new file mode 100644 index 000000000000..6102c9e02297 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_scan_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_search_24dp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_search_24dp.xml new file mode 100644 index 000000000000..423dfa3876a8 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_search_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_security_lock_24dp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_security_lock_24dp.xml new file mode 100644 index 000000000000..0dce14ec02e4 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_security_lock_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings.xml new file mode 100644 index 000000000000..0b0a267ea0fc --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_24dp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_24dp.xml new file mode 100644 index 000000000000..0b0a267ea0fc --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_24dp_inverse.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_24dp_inverse.xml new file mode 100644 index 000000000000..1d86eda19cf7 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_24dp_inverse.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_about.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_about.xml new file mode 100644 index 000000000000..87fa6089c562 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_about.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_accessibility.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_accessibility.xml new file mode 100644 index 000000000000..8653d2e66ae3 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_accessibility.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_accounts.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_accounts.xml new file mode 100644 index 000000000000..f27a31e4834d --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_accounts.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_applications.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_applications.xml new file mode 100644 index 000000000000..d399773992ac --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_applications.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_backup.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_backup.xml new file mode 100644 index 000000000000..8c803d0d681e --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_backup.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_battery.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_battery.xml new file mode 100644 index 000000000000..77dfc605a61b --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_battery.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_battery_white.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_battery_white.xml new file mode 100644 index 000000000000..e0136c2312b5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_battery_white.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_bluetooth.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_bluetooth.xml new file mode 100644 index 000000000000..1a86983224bc --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_bluetooth.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_data_usage.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_data_usage.xml new file mode 100644 index 000000000000..049c4ed1f527 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_data_usage.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_date_time.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_date_time.xml new file mode 100644 index 000000000000..05306ce3634f --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_date_time.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_delete.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_delete.xml new file mode 100644 index 000000000000..7b730040dd2e --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_delete.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_development.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_development.xml new file mode 100644 index 000000000000..97758eb4edc7 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_development.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_device.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_device.xml new file mode 100644 index 000000000000..f96e3c7b163d --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_device.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_disable.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_disable.xml new file mode 100644 index 000000000000..d74d67706b66 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_disable.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_display.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_display.xml new file mode 100644 index 000000000000..ddc20082ac81 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_display.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_display_white.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_display_white.xml new file mode 100644 index 000000000000..2912c3d9992b --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_display_white.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_enable.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_enable.xml new file mode 100644 index 000000000000..671b2742756f --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_enable.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_force_stop.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_force_stop.xml new file mode 100644 index 000000000000..68be21c4f6d6 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_force_stop.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_gestures.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_gestures.xml new file mode 100644 index 000000000000..202792230125 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_gestures.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_language.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_language.xml new file mode 100644 index 000000000000..9fc64f9893e5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_language.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_memory.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_memory.xml new file mode 100644 index 000000000000..8732c1b85986 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_memory.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_multiuser.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_multiuser.xml new file mode 100644 index 000000000000..250a6c1b55fa --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_multiuser.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_night_display.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_night_display.xml new file mode 100644 index 000000000000..addadf4625fa --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_night_display.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_notifications.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_notifications.xml new file mode 100644 index 000000000000..a8d2369d0e6a --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_notifications.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_open.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_open.xml new file mode 100644 index 000000000000..2abc3eacbdb7 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_open.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_pdgestures.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_pdgestures.xml new file mode 100644 index 000000000000..202792230125 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_pdgestures.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_print.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_print.xml new file mode 100644 index 000000000000..dee11f029302 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_print.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_privacy.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_privacy.xml new file mode 100644 index 000000000000..fdf1822fce59 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_privacy.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_security.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_security.xml new file mode 100644 index 000000000000..00090fb5bc06 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_security.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_security_white.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_security_white.xml new file mode 100644 index 000000000000..c95dd449be8b --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_security_white.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_sound.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_sound.xml new file mode 100644 index 000000000000..6bf7c30cbee9 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_sound.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_sound_white.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_sound_white.xml new file mode 100644 index 000000000000..faa35f38d7d3 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_sound_white.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_storage.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_storage.xml new file mode 100644 index 000000000000..91438ecf4985 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_storage.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_storage_white.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_storage_white.xml new file mode 100644 index 000000000000..0a35857a6d7a --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_storage_white.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml new file mode 100644 index 000000000000..59afee929d37 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_wireless.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_wireless.xml new file mode 100644 index 000000000000..0a79b1e99c51 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_wireless.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_wireless_white.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_wireless_white.xml new file mode 100644 index 000000000000..63f760f4dd9a --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_settings_wireless_white.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_sim_card_24dp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_sim_card_24dp.xml new file mode 100644 index 000000000000..3c9c23b62a31 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_sim_card_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_storage.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_storage.xml new file mode 100644 index 000000000000..7ec0f6ae8a91 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_storage.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_storage_apps.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_storage_apps.xml new file mode 100644 index 000000000000..f60038ce5362 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_storage_apps.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_storage_white.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_storage_white.xml new file mode 100644 index 000000000000..be71da3012a2 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_storage_white.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_system_update.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_system_update.xml new file mode 100644 index 000000000000..9682474a6fab --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_system_update.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_system_update_vd_theme_24.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_system_update_vd_theme_24.xml new file mode 100644 index 000000000000..ac66d896ce32 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_system_update_vd_theme_24.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_theaters_vd_theme_24.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_theaters_vd_theme_24.xml new file mode 100644 index 000000000000..b5ba034be662 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_theaters_vd_theme_24.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_translate_24dp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_translate_24dp.xml new file mode 100644 index 000000000000..fbc8c884a09a --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_translate_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_usb.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_usb.xml new file mode 100644 index 000000000000..098bef7b8115 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_usb.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml new file mode 100644 index 000000000000..a9fea1a02e4b --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml new file mode 100644 index 000000000000..8d5309ed65b9 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_volume_up_24dp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_volume_up_24dp.xml new file mode 100644 index 000000000000..b1f14fead5aa --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_volume_up_24dp.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_vpn_key.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_vpn_key.xml new file mode 100644 index 000000000000..dae37d42d853 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_vpn_key.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_wifi_privacy_24dp.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_wifi_privacy_24dp.xml new file mode 100644 index 000000000000..90f48973249e --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_wifi_privacy_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_wifi_tethering.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_wifi_tethering.xml new file mode 100644 index 000000000000..99c2a449a7d3 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_wifi_tethering.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_zen.xml b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_zen.xml new file mode 100644 index 000000000000..71b9fc003c68 --- /dev/null +++ b/packages/overlays/IconPackOutlineSettingsOverlay/res/drawable/ic_zen.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/Android.bp b/packages/overlays/IconPackOutlineSystemUIOverlay/Android.bp new file mode 100644 index 000000000000..058857967e0c --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/Android.bp @@ -0,0 +1,21 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +runtime_resource_overlay { + name: "IconPackOutlineSystemUIOverlay", + theme: "IconPackOutlineSystemUI", + product_specific: true, +} diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/AndroidManifest.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..4e3652a6a6d8 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_bluetooth_transient_dot_left_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_bluetooth_transient_dot_left_animation.xml new file mode 100644 index 000000000000..d05780be4258 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_bluetooth_transient_dot_left_animation.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_bluetooth_transient_dot_right_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_bluetooth_transient_dot_right_animation.xml new file mode 100644 index 000000000000..26463b196b33 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_bluetooth_transient_dot_right_animation.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_caret_down_left_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_caret_down_left_animation.xml new file mode 100644 index 000000000000..59a0fb23bed6 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_caret_down_left_animation.xml @@ -0,0 +1,3 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_caret_down_right_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_caret_down_right_animation.xml new file mode 100644 index 000000000000..0d59463b159a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_caret_down_right_animation.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_caret_up_left_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_caret_up_left_animation.xml new file mode 100644 index 000000000000..236c81bc403a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_caret_up_left_animation.xml @@ -0,0 +1,3 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_caret_up_right_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_caret_up_right_animation.xml new file mode 100644 index 000000000000..0d59463b159a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_caret_up_right_animation.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_hotspot_transient_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_hotspot_transient_animation.xml new file mode 100644 index 000000000000..c7b5084a4e39 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_hotspot_transient_animation.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_hotspot_transient_circle_1_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_hotspot_transient_circle_1_animation.xml new file mode 100644 index 000000000000..e1d3623dc72b --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_hotspot_transient_circle_1_animation.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_hotspot_transient_circle_2_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_hotspot_transient_circle_2_animation.xml new file mode 100644 index 000000000000..fd3745fee489 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_hotspot_transient_circle_2_animation.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_hotspot_transient_circle_3_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_hotspot_transient_circle_3_animation.xml new file mode 100644 index 000000000000..054388e479b4 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_hotspot_transient_circle_3_animation.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_from_auto_rotate_animation_arrow_bottom.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_from_auto_rotate_animation_arrow_bottom.xml new file mode 100644 index 000000000000..50a3c6fd27a1 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_from_auto_rotate_animation_arrow_bottom.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_from_auto_rotate_animation_arrow_top.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_from_auto_rotate_animation_arrow_top.xml new file mode 100644 index 000000000000..50a3c6fd27a1 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_from_auto_rotate_animation_arrow_top.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_from_auto_rotate_animation_arrows.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_from_auto_rotate_animation_arrows.xml new file mode 100644 index 000000000000..f511e9fd6b10 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_from_auto_rotate_animation_arrows.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_from_auto_rotate_animation_device.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_from_auto_rotate_animation_device.xml new file mode 100644 index 000000000000..e517c647cccb --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_from_auto_rotate_animation_device.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_auto_rotate_animation_arrow_bottom.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_auto_rotate_animation_arrow_bottom.xml new file mode 100644 index 000000000000..86f699040a92 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_auto_rotate_animation_arrow_bottom.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_auto_rotate_animation_arrow_top.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_auto_rotate_animation_arrow_top.xml new file mode 100644 index 000000000000..86f699040a92 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_auto_rotate_animation_arrow_top.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_auto_rotate_animation_arrows.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_auto_rotate_animation_arrows.xml new file mode 100644 index 000000000000..85cf41c791db --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_auto_rotate_animation_arrows.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_auto_rotate_animation_device.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_auto_rotate_animation_device.xml new file mode 100644 index 000000000000..074270530416 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_auto_rotate_animation_device.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_rotate_arrows_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_rotate_arrows_animation.xml new file mode 100644 index 000000000000..f511e9fd6b10 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_rotate_arrows_animation.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_rotate_bottom_merged_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_rotate_bottom_merged_animation.xml new file mode 100644 index 000000000000..50a3c6fd27a1 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_rotate_bottom_merged_animation.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_rotate_landscape_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_rotate_landscape_animation.xml new file mode 100644 index 000000000000..e517c647cccb --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_landscape_to_rotate_landscape_animation.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_from_auto_rotate_animation_arrow_bottom.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_from_auto_rotate_animation_arrow_bottom.xml new file mode 100644 index 000000000000..86f699040a92 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_from_auto_rotate_animation_arrow_bottom.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_from_auto_rotate_animation_arrow_top.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_from_auto_rotate_animation_arrow_top.xml new file mode 100644 index 000000000000..86f699040a92 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_from_auto_rotate_animation_arrow_top.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_from_auto_rotate_animation_arrows.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_from_auto_rotate_animation_arrows.xml new file mode 100644 index 000000000000..d68b8126646e --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_from_auto_rotate_animation_arrows.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_from_auto_rotate_animation_device.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_from_auto_rotate_animation_device.xml new file mode 100644 index 000000000000..b24421a10558 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_from_auto_rotate_animation_device.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_auto_rotate_animation_arrow_bottom.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_auto_rotate_animation_arrow_bottom.xml new file mode 100644 index 000000000000..d434753a0c1a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_auto_rotate_animation_arrow_bottom.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_auto_rotate_animation_arrow_top.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_auto_rotate_animation_arrow_top.xml new file mode 100644 index 000000000000..d434753a0c1a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_auto_rotate_animation_arrow_top.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_auto_rotate_animation_arrows.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_auto_rotate_animation_arrows.xml new file mode 100644 index 000000000000..7d68bdf44566 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_auto_rotate_animation_arrows.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_auto_rotate_animation_device.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_auto_rotate_animation_device.xml new file mode 100644 index 000000000000..09a91d620ed4 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_auto_rotate_animation_device.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_rotate_arrows_0_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_rotate_arrows_0_animation.xml new file mode 100644 index 000000000000..0d59463b159a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_rotate_arrows_0_animation.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_rotate_arrows_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_rotate_arrows_animation.xml new file mode 100644 index 000000000000..d68b8126646e --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_rotate_arrows_animation.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_rotate_bottom_merged_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_rotate_bottom_merged_animation.xml new file mode 100644 index 000000000000..46bc2e09bf73 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_rotate_bottom_merged_animation.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_rotate_device_0_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_rotate_device_0_animation.xml new file mode 100644 index 000000000000..b24421a10558 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_rotate_device_0_animation.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_rotate_device_merged_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_rotate_device_merged_animation.xml new file mode 100644 index 000000000000..0d59463b159a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_portrait_to_rotate_device_merged_animation.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_qs_collapse_chevron_02_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_qs_collapse_chevron_02_animation.xml new file mode 100644 index 000000000000..59a0fb23bed6 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_qs_collapse_chevron_02_animation.xml @@ -0,0 +1,3 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_qs_expand_chevron_01_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_qs_expand_chevron_01_animation.xml new file mode 100644 index 000000000000..236c81bc403a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_qs_expand_chevron_01_animation.xml @@ -0,0 +1,3 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_landscape_arrows_0_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_landscape_arrows_0_animation.xml new file mode 100644 index 000000000000..0d59463b159a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_landscape_arrows_0_animation.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_landscape_arrows_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_landscape_arrows_animation.xml new file mode 100644 index 000000000000..85cf41c791db --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_landscape_arrows_animation.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_landscape_bottom_merged_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_landscape_bottom_merged_animation.xml new file mode 100644 index 000000000000..0d59463b159a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_landscape_bottom_merged_animation.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_landscape_landscape_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_landscape_landscape_animation.xml new file mode 100644 index 000000000000..074270530416 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_landscape_landscape_animation.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_portrait_arrows_0_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_portrait_arrows_0_animation.xml new file mode 100644 index 000000000000..0d59463b159a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_portrait_arrows_0_animation.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_portrait_arrows_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_portrait_arrows_animation.xml new file mode 100644 index 000000000000..7d68bdf44566 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_portrait_arrows_animation.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_portrait_bottom_merged_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_portrait_bottom_merged_animation.xml new file mode 100644 index 000000000000..50a3c6fd27a1 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_portrait_bottom_merged_animation.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_portrait_device_0_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_portrait_device_0_animation.xml new file mode 100644 index 000000000000..09a91d620ed4 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_portrait_device_0_animation.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_portrait_device_merged_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_portrait_device_merged_animation.xml new file mode 100644 index 000000000000..0d59463b159a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_rotate_to_portrait_device_merged_animation.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_blink_1.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_blink_1.xml new file mode 100644 index 000000000000..e1b08269d406 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_blink_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_blink_2.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_blink_2.xml new file mode 100644 index 000000000000..a3a5f7cf7ada --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_blink_2.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_blink_3.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_blink_3.xml new file mode 100644 index 000000000000..a5f0353018b1 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_blink_3.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_wifi_transient_wifi_1_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_wifi_transient_wifi_1_animation.xml new file mode 100644 index 000000000000..0d59463b159a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_wifi_transient_wifi_1_animation.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_wifi_transient_wifi_2_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_wifi_transient_wifi_2_animation.xml new file mode 100644 index 000000000000..0d59463b159a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_wifi_transient_wifi_2_animation.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_wifi_transient_wifi_3_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_wifi_transient_wifi_3_animation.xml new file mode 100644 index 000000000000..0d59463b159a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_wifi_transient_wifi_3_animation.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_wifi_transient_wifi_4_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_wifi_transient_wifi_4_animation.xml new file mode 100644 index 000000000000..0d59463b159a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_signal_wifi_transient_wifi_4_animation.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_volume_collapse_chevron_02_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_volume_collapse_chevron_02_animation.xml new file mode 100644 index 000000000000..59a0fb23bed6 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_volume_collapse_chevron_02_animation.xml @@ -0,0 +1,3 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_volume_expand_chevron_01_animation.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_volume_expand_chevron_01_animation.xml new file mode 100644 index 000000000000..236c81bc403a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/anim/ic_volume_expand_chevron_01_animation.xml @@ -0,0 +1,3 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_action_lockdown.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_action_lockdown.xml new file mode 100644 index 000000000000..b12bdcd01e45 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_action_lockdown.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_backspace_24dp.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_backspace_24dp.xml new file mode 100644 index 000000000000..e7858cc10356 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_backspace_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_backspace_black_24dp.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_backspace_black_24dp.xml new file mode 100644 index 000000000000..e7858cc10356 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_backspace_black_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_camera_alt_24dp.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_camera_alt_24dp.xml new file mode 100644 index 000000000000..1a96cdb3bd56 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_camera_alt_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_face_unlock.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_face_unlock.xml new file mode 100644 index 000000000000..dbda306e60d5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_face_unlock.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_headset.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_headset.xml new file mode 100644 index 000000000000..989d189252ad --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_headset.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_headset_mic.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_headset_mic.xml new file mode 100644 index 000000000000..872991f50268 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_headset_mic.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_info.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_info.xml new file mode 100644 index 000000000000..f72fb0bb75ff --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_info.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_kill_app_dark.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_kill_app_dark.xml new file mode 100644 index 000000000000..23380d5e7c4a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_kill_app_dark.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_kill_app_light.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_kill_app_light.xml new file mode 100644 index 000000000000..e2a1f363a2ed --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_kill_app_light.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_24dp.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_24dp.xml new file mode 100644 index 000000000000..2a6325c3e30d --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_airplane_mode_disabled.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_airplane_mode_disabled.xml new file mode 100644 index 000000000000..b2b26b1e59e8 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_airplane_mode_disabled.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_airplane_mode_enabled.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_airplane_mode_enabled.xml new file mode 100644 index 000000000000..155e101314ce --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_airplane_mode_enabled.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_lock.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_lock.xml new file mode 100644 index 000000000000..b12bdcd01e45 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_lock.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_open_24dp.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_open_24dp.xml new file mode 100644 index 000000000000..c78a021f65bd --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_open_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_restart_bootloader.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_restart_bootloader.xml new file mode 100644 index 000000000000..a8a892909931 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_restart_bootloader.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_restart_recovery.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_restart_recovery.xml new file mode 100644 index 000000000000..5ebe0cbdf4c7 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_restart_recovery.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_screenrecord.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_screenrecord.xml new file mode 100644 index 000000000000..bb85b472a216 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_screenrecord.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_screenshot.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_screenshot.xml new file mode 100644 index 000000000000..3f866fe763c5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_screenshot.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_settings.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_settings.xml new file mode 100644 index 000000000000..344641619652 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lock_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lockscreen_sim.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lockscreen_sim.xml new file mode 100644 index 000000000000..a3580799c665 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_lockscreen_sim.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_mic_26dp.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_mic_26dp.xml new file mode 100644 index 000000000000..f3154163299b --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_mic_26dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_phone_24dp.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_phone_24dp.xml new file mode 100644 index 000000000000..27b648c269a4 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_phone_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_qs_reboot.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_qs_reboot.xml new file mode 100644 index 000000000000..172726dd365f --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_qs_reboot.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_qs_smartbar.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_qs_smartbar.xml new file mode 100644 index 000000000000..b96508bcdb3c --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_qs_smartbar.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_qs_smartbar_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_qs_smartbar_off.xml new file mode 100644 index 000000000000..8c4bf825c459 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_qs_smartbar_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_qs_stock.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_qs_stock.xml new file mode 100644 index 000000000000..f0a12ac318ce --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_qs_stock.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_qs_stock_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_qs_stock_off.xml new file mode 100644 index 000000000000..6f4941ae63cd --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_qs_stock_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_restart_advanced.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_restart_advanced.xml new file mode 100644 index 000000000000..5ebe0cbdf4c7 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_restart_advanced.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_restart_bootloader.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_restart_bootloader.xml new file mode 100644 index 000000000000..a8a892909931 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_restart_bootloader.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_restart_hot.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_restart_hot.xml new file mode 100644 index 000000000000..14b951feafae --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_restart_hot.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_restart_recovery.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_restart_recovery.xml new file mode 100644 index 000000000000..5ebe0cbdf4c7 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_restart_recovery.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_restart_ui.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_restart_ui.xml new file mode 100644 index 000000000000..4156a2a35570 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_restart_ui.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_screenshot.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_screenshot.xml new file mode 100644 index 000000000000..3f866fe763c5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_screenshot.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_status_bar_du_logo.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_status_bar_du_logo.xml new file mode 100644 index 000000000000..6795e579de37 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_status_bar_du_logo.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_status_bar_kronic_logo.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_status_bar_kronic_logo.xml new file mode 100644 index 000000000000..9ae2522334f2 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/ic_status_bar_kronic_logo.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/recents_dismiss_dark.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/recents_dismiss_dark.xml new file mode 100644 index 000000000000..e19251d07521 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/recents_dismiss_dark.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/recents_dismiss_light.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/recents_dismiss_light.xml new file mode 100644 index 000000000000..8de2c9f0ed69 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/recents_dismiss_light.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/recents_info_dark.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/recents_info_dark.xml new file mode 100644 index 000000000000..df7ffad1b209 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/recents_info_dark.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/recents_info_light.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/recents_info_light.xml new file mode 100644 index 000000000000..a89fc26bbde0 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/recents_info_light.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/somc_keyguard_ic_camera_24dp.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/somc_keyguard_ic_camera_24dp.xml new file mode 100644 index 000000000000..1a96cdb3bd56 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/somc_keyguard_ic_camera_24dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_notify_image.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_notify_image.xml new file mode 100644 index 000000000000..5e8a1175daa4 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_notify_image.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_airplane_mode.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_airplane_mode.xml new file mode 100644 index 000000000000..758a127ceb1b --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_airplane_mode.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_alarm.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_alarm.xml new file mode 100644 index 000000000000..d62d0d5e013d --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_alarm.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_alarm_dim.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_alarm_dim.xml new file mode 100644 index 000000000000..edf2da36c7c2 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_alarm_dim.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_cast.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_cast.xml new file mode 100644 index 000000000000..cfdb16da901e --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_cast.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth.xml new file mode 100644 index 000000000000..0338c0b19920 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected.xml new file mode 100644 index 000000000000..d7f2f2498240 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_0.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_0.xml new file mode 100644 index 000000000000..6853062d3e3b --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_0.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_1.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_1.xml new file mode 100644 index 000000000000..8d47aafa92fc --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_1.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_2.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_2.xml new file mode 100644 index 000000000000..e68b5029e78b --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_2.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_3.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_3.xml new file mode 100644 index 000000000000..078e27029d81 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_3.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_4.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_4.xml new file mode 100644 index 000000000000..2153ea877daf --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_4.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_5.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_5.xml new file mode 100644 index 000000000000..277c64fb6740 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_5.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_6.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_6.xml new file mode 100644 index 000000000000..4de4e6fa73e6 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_6.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_7.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_7.xml new file mode 100644 index 000000000000..91f25e57f93f --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_7.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_8.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_8.xml new file mode 100644 index 000000000000..730b31f608b3 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_8.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_9.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_9.xml new file mode 100644 index 000000000000..e6161a501d00 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_bluetooth_connected_battery_9.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_saver.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_saver.xml new file mode 100644 index 000000000000..52ee09dcd8f3 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_data_saver.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_dnd_priority.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_dnd_priority.xml new file mode 100644 index 000000000000..096aebaf80cb --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_dnd_priority.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_dnd_total_silence.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_dnd_total_silence.xml new file mode 100644 index 000000000000..b774f92e3ff3 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_dnd_total_silence.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_hotspot.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_hotspot.xml new file mode 100644 index 000000000000..fa0d15e5ba1f --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_hotspot.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_location.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_location.xml new file mode 100644 index 000000000000..5fdbbd352c73 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_location.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_managed_profile_status.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_managed_profile_status.xml new file mode 100644 index 000000000000..ea0452f2a428 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_managed_profile_status.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_network_traffic_down.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_network_traffic_down.xml new file mode 100644 index 000000000000..4d76227c47a5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_network_traffic_down.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_network_traffic_up.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_network_traffic_up.xml new file mode 100644 index 000000000000..96b528075f0f --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_network_traffic_up.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_network_traffic_updown.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_network_traffic_updown.xml new file mode 100644 index 000000000000..ae23dc9efdee --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_network_traffic_updown.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_no_sims.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_no_sims.xml new file mode 100644 index 000000000000..0584505a1aef --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_no_sims.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_ringer_silent.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_ringer_silent.xml new file mode 100644 index 000000000000..4a8c82e4d519 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_ringer_silent.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_ringer_vibrate.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_ringer_vibrate.xml new file mode 100644 index 000000000000..ba2265bdb23a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_ringer_vibrate.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_rotate_portrait.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_rotate_portrait.xml new file mode 100644 index 000000000000..5e9a1e6e7da4 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_rotate_portrait.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_vpn_ic.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_vpn_ic.xml new file mode 100644 index 000000000000..6ad999c3fb0a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/stat_sys_vpn_ic.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/tuner.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/tuner.xml new file mode 100644 index 000000000000..17d8c2a5c575 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable-anydpi/tuner.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_bluetooth_transient.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_bluetooth_transient.xml new file mode 100644 index 000000000000..e02d7ffaa863 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_bluetooth_transient.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_brightness_left.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_brightness_left.xml new file mode 100644 index 000000000000..5fbec7e69eb7 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_brightness_left.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_brightness_right.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_brightness_right.xml new file mode 100644 index 000000000000..d6746433ce78 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_brightness_right.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_brightness_thumb.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_brightness_thumb.xml new file mode 100644 index 000000000000..b62b51cf98a1 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_brightness_thumb.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_cast.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_cast.xml new file mode 100644 index 000000000000..8018ce6db1be --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_cast.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_data_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_data_off.xml new file mode 100644 index 000000000000..0ed7344226ef --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_data_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_data_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_data_on.xml new file mode 100644 index 000000000000..0ed7344226ef --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_data_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_data_saver.xml new file mode 100644 index 000000000000..e473d7602218 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_data_saver.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_data_saver_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_data_saver_off.xml new file mode 100644 index 000000000000..bdbbfc6f7b25 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_data_saver_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_dnd_disable.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_dnd_disable.xml new file mode 100644 index 000000000000..cc3e0bace6ba --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_dnd_disable.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_dnd_total_silence_disable.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_dnd_total_silence_disable.xml new file mode 100644 index 000000000000..577c04a4fe38 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_dnd_total_silence_disable.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_gaming_mode.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_gaming_mode.xml new file mode 100644 index 000000000000..828df2513011 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_gaming_mode.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_hotspot.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_hotspot.xml new file mode 100644 index 000000000000..7fb0cdcdd93e --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_hotspot.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_hotspot_disable.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_hotspot_disable.xml new file mode 100644 index 000000000000..3eaddd69093b --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_hotspot_disable.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_hotspot_enable.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_hotspot_enable.xml new file mode 100644 index 000000000000..3eaddd69093b --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_hotspot_enable.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_hotspot_transient.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_hotspot_transient.xml new file mode 100644 index 000000000000..b110f260cc3e --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_hotspot_transient.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_hotspot_unavailable.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_hotspot_unavailable.xml new file mode 100644 index 000000000000..3eaddd69093b --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_hotspot_unavailable.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_invert_colors.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_invert_colors.xml new file mode 100644 index 000000000000..dafbdcd83019 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_invert_colors.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_invert_colors_disable.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_invert_colors_disable.xml new file mode 100644 index 000000000000..50078d99ed4d --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_invert_colors_disable.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_invert_colors_enable.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_invert_colors_enable.xml new file mode 100644 index 000000000000..50078d99ed4d --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_invert_colors_enable.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_landscape_from_auto_rotate.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_landscape_from_auto_rotate.xml new file mode 100644 index 000000000000..f6a663674ac2 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_landscape_from_auto_rotate.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_landscape_to_auto_rotate.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_landscape_to_auto_rotate.xml new file mode 100644 index 000000000000..4aead5d16a1f --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_landscape_to_auto_rotate.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_location.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_location.xml new file mode 100644 index 000000000000..ba1f430c9799 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_location.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_mode_edit.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_mode_edit.xml new file mode 100644 index 000000000000..5020da476b3e --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_mode_edit.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_night_mode_disabled.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_night_mode_disabled.xml new file mode 100644 index 000000000000..04feed46bc35 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_night_mode_disabled.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_night_mode_enabled.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_night_mode_enabled.xml new file mode 100644 index 000000000000..addadf4625fa --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_night_mode_enabled.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_notifications_silence.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_notifications_silence.xml new file mode 100644 index 000000000000..2cb42ddbd4ce --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_notifications_silence.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_portrait_from_auto_rotate.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_portrait_from_auto_rotate.xml new file mode 100644 index 000000000000..c90aeaca3b63 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_portrait_from_auto_rotate.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_portrait_to_auto_rotate.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_portrait_to_auto_rotate.xml new file mode 100644 index 000000000000..9a8306953a54 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_portrait_to_auto_rotate.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_airplane.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_airplane.xml new file mode 100644 index 000000000000..0e68d37ebcb6 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_airplane.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_alwaysondisplay.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_alwaysondisplay.xml new file mode 100644 index 000000000000..7d1143e5ae3d --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_alwaysondisplay.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_alwaysondisplay_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_alwaysondisplay_off.xml new file mode 100644 index 000000000000..aeb78ddd4a88 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_alwaysondisplay_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_alwaysondisplay_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_alwaysondisplay_on.xml new file mode 100644 index 000000000000..7d1143e5ae3d --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_alwaysondisplay_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambient_display.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambient_display.xml new file mode 100644 index 000000000000..4e15a70e9436 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambient_display.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambient_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambient_off.xml new file mode 100644 index 000000000000..4e15a70e9436 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambient_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambient_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambient_on.xml new file mode 100644 index 000000000000..4e15a70e9436 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambient_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambient_play_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambient_play_off.xml new file mode 100644 index 000000000000..8344740ad750 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambient_play_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambient_play_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambient_play_on.xml new file mode 100644 index 000000000000..f37da6d7a0e3 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambient_play_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambientdisplay.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambientdisplay.xml new file mode 100644 index 000000000000..4e15a70e9436 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambientdisplay.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambientdisplay_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambientdisplay_off.xml new file mode 100644 index 000000000000..b4bd0e16c949 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambientdisplay_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambientdisplay_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambientdisplay_on.xml new file mode 100644 index 000000000000..4e15a70e9436 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ambientdisplay_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_anbi_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_anbi_on.xml new file mode 100644 index 000000000000..3b428d0ee4e8 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_anbi_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_aod.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_aod.xml new file mode 100644 index 000000000000..7d1143e5ae3d --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_aod.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_app_picker.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_app_picker.xml new file mode 100644 index 000000000000..20f21c693cc2 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_app_picker.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_auto_rotate.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_auto_rotate.xml new file mode 100644 index 000000000000..e398f1d555af --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_auto_rotate.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_battery_saver.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_battery_saver.xml new file mode 100644 index 000000000000..2b3de94e300f --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_battery_saver.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_battery_saver_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_battery_saver_off.xml new file mode 100644 index 000000000000..4a0a8ea95ecc --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_battery_saver_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_bluetooth_connected.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_bluetooth_connected.xml new file mode 100644 index 000000000000..25cb03562ba1 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_bluetooth_connected.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml new file mode 100644 index 000000000000..fa02f32e0950 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_bluetooth_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_bluetooth_off.xml new file mode 100644 index 000000000000..42f8893d3ca1 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_bluetooth_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_bluetooth_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_bluetooth_on.xml new file mode 100644 index 000000000000..1a86983224bc --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_bluetooth_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_auto_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_auto_off.xml new file mode 100644 index 000000000000..c57b43eeb3ca --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_auto_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_auto_off_new.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_auto_off_new.xml new file mode 100644 index 000000000000..c57b43eeb3ca --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_auto_off_new.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_auto_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_auto_on.xml new file mode 100644 index 000000000000..e5cf8f8f4adc --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_auto_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_auto_on_new.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_auto_on_new.xml new file mode 100644 index 000000000000..e5cf8f8f4adc --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_auto_on_new.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_high_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_high_off.xml new file mode 100644 index 000000000000..c57b43eeb3ca --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_high_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_high_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_high_on.xml new file mode 100644 index 000000000000..c57b43eeb3ca --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_high_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_low.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_low.xml new file mode 100644 index 000000000000..c46764d97e64 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_low.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_medium.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_medium.xml new file mode 100644 index 000000000000..03d30f96fc63 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_brightness_medium.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_caffeine.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_caffeine.xml new file mode 100644 index 000000000000..063774fbdf58 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_caffeine.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_caffeine_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_caffeine_off.xml new file mode 100644 index 000000000000..58fa90f7874d --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_caffeine_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_caffeine_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_caffeine_on.xml new file mode 100644 index 000000000000..063774fbdf58 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_caffeine_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_calc.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_calc.xml new file mode 100644 index 000000000000..1a2493ed4d3e --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_calc.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_calendar.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_calendar.xml new file mode 100644 index 000000000000..c7e175cb43d8 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_calendar.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_call.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_call.xml new file mode 100644 index 000000000000..20ef843ca5e3 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_call.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_cast_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_cast_off.xml new file mode 100644 index 000000000000..8018ce6db1be --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_cast_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_cast_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_cast_on.xml new file mode 100644 index 000000000000..8018ce6db1be --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_cast_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_cellular.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_cellular.xml new file mode 100644 index 000000000000..9002e1c21c88 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_cellular.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_collapse.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_collapse.xml new file mode 100644 index 000000000000..3983dbe1d2a5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_collapse.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_compass_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_compass_off.xml new file mode 100644 index 000000000000..ea1430bdd23d --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_compass_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_compass_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_compass_on.xml new file mode 100644 index 000000000000..4bcd587fa19f --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_compass_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_cpuinfo.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_cpuinfo.xml new file mode 100644 index 000000000000..8732c1b85986 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_cpuinfo.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_dnd_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_dnd_off.xml new file mode 100644 index 000000000000..487a42f3dc17 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_dnd_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_dnd_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_dnd_on.xml new file mode 100644 index 000000000000..d7955c5ebedb --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_dnd_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_dnd_on_priority.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_dnd_on_priority.xml new file mode 100644 index 000000000000..41b7bb91ecc7 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_dnd_on_priority.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_dnd_on_total_silence.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_dnd_on_total_silence.xml new file mode 100644 index 000000000000..83997a97a5eb --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_dnd_on_total_silence.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_expand.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_expand.xml new file mode 100644 index 000000000000..0218d8086ee3 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_expand.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_expanded_desktop.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_expanded_desktop.xml new file mode 100644 index 000000000000..b1c0347bfc72 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_expanded_desktop.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_expanded_desktop_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_expanded_desktop_off.xml new file mode 100644 index 000000000000..6497dac31d1f --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_expanded_desktop_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_expanded_navigation_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_expanded_navigation_off.xml new file mode 100644 index 000000000000..789ee6c916fd --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_expanded_navigation_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_expanded_statusbar_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_expanded_statusbar_off.xml new file mode 100644 index 000000000000..c24b47a67a83 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_expanded_statusbar_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_flashlight.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_flashlight.xml new file mode 100644 index 000000000000..e47ac2ba0110 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_flashlight.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_fling.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_fling.xml new file mode 100644 index 000000000000..8c5c24720668 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_fling.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_fling_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_fling_off.xml new file mode 100644 index 000000000000..2e9da5191da0 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_fling_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_game_mode_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_game_mode_off.xml new file mode 100644 index 000000000000..ba611d5e6830 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_game_mode_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_game_mode_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_game_mode_on.xml new file mode 100644 index 000000000000..615acf461090 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_game_mode_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_google_assist.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_google_assist.xml new file mode 100644 index 000000000000..a390fc7d1d09 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_google_assist.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_google_now.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_google_now.xml new file mode 100644 index 000000000000..69e4b9b738f0 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_google_now.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_google_voice_assist.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_google_voice_assist.xml new file mode 100644 index 000000000000..aee24e552509 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_google_voice_assist.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_heads_up.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_heads_up.xml new file mode 100644 index 000000000000..f9e35499457d --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_heads_up.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_heads_up_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_heads_up_off.xml new file mode 100644 index 000000000000..f9e35499457d --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_heads_up_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_heads_up_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_heads_up_on.xml new file mode 100644 index 000000000000..f9e35499457d --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_heads_up_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_hwkeys.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_hwkeys.xml new file mode 100644 index 000000000000..e2c27f02ee60 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_hwkeys.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_hwkeys_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_hwkeys_off.xml new file mode 100644 index 000000000000..13f69d72339c --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_hwkeys_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_hwkeys_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_hwkeys_on.xml new file mode 100644 index 000000000000..e2c27f02ee60 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_hwkeys_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ime.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ime.xml new file mode 100644 index 000000000000..e2c27f02ee60 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ime.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_locale.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_locale.xml new file mode 100644 index 000000000000..752bf073bdd5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_locale.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_locale_pending.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_locale_pending.xml new file mode 100644 index 000000000000..2f9df5b9431e --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_locale_pending.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_location_battery_saving.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_location_battery_saving.xml new file mode 100644 index 000000000000..425ecfac15d3 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_location_battery_saving.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_location_high_accuracy.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_location_high_accuracy.xml new file mode 100644 index 000000000000..82f6da84d6ee --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_location_high_accuracy.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_location_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_location_off.xml new file mode 100644 index 000000000000..127426dcd778 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_location_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_location_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_location_on.xml new file mode 100644 index 000000000000..127426dcd778 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_location_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_location_sensors_only.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_location_sensors_only.xml new file mode 100644 index 000000000000..127426dcd778 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_location_sensors_only.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_media_pause.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_media_pause.xml new file mode 100644 index 000000000000..b024bb61df06 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_media_pause.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_media_play.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_media_play.xml new file mode 100644 index 000000000000..9e51696d8066 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_media_play.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_minus.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_minus.xml new file mode 100644 index 000000000000..c6f76f95e9ab --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_minus.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_network_adb.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_network_adb.xml new file mode 100644 index 000000000000..fb850e4dea27 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_network_adb.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_network_adb_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_network_adb_off.xml new file mode 100644 index 000000000000..5e2aabf9682f --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_network_adb_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_network_adb_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_network_adb_on.xml new file mode 100644 index 000000000000..fb850e4dea27 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_network_adb_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_nfc_disabled.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_nfc_disabled.xml new file mode 100644 index 000000000000..9cec706bec89 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_nfc_disabled.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_nfc_enabled.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_nfc_enabled.xml new file mode 100644 index 000000000000..31d88db92967 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_nfc_enabled.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_night_display_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_night_display_off.xml new file mode 100644 index 000000000000..a31b1cad34d5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_night_display_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_night_display_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_night_display_on.xml new file mode 100644 index 000000000000..addadf4625fa --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_night_display_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_onthego.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_onthego.xml new file mode 100644 index 000000000000..cdad3c19e228 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_onthego.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_otg_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_otg_off.xml new file mode 100644 index 000000000000..665b6800a08b --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_otg_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_otg_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_otg_on.xml new file mode 100644 index 000000000000..665b6800a08b --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_otg_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_pie_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_pie_off.xml new file mode 100644 index 000000000000..9247eb76b338 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_pie_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_pie_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_pie_on.xml new file mode 100644 index 000000000000..695bf35d15b2 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_pie_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_pip.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_pip.xml new file mode 100644 index 000000000000..1729ab0d814a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_pip.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_plus.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_plus.xml new file mode 100644 index 000000000000..070dcbdd5d7e --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_plus.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_poweroff.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_poweroff.xml new file mode 100644 index 000000000000..4bf2901bb60e --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_poweroff.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_pulse.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_pulse.xml new file mode 100644 index 000000000000..fa62337e59df --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_pulse.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_pulse_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_pulse_off.xml new file mode 100644 index 000000000000..596a88736380 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_pulse_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_read_mode_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_read_mode_on.xml new file mode 100644 index 000000000000..d882ef6ed69d --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_read_mode_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_reader.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_reader.xml new file mode 100644 index 000000000000..d882ef6ed69d --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_reader.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_reboot.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_reboot.xml new file mode 100644 index 000000000000..6363d7cf4d83 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_reboot.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_reboot_recovery.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_reboot_recovery.xml new file mode 100644 index 000000000000..7c271521a7b5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_reboot_recovery.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_region_screenshot.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_region_screenshot.xml new file mode 100644 index 000000000000..b7ba69000522 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_region_screenshot.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ringer_audible.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ringer_audible.xml new file mode 100644 index 000000000000..2d705125ced5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ringer_audible.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ringer_silent.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ringer_silent.xml new file mode 100644 index 000000000000..e59e81fdd04b --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ringer_silent.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ringer_vibrate.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ringer_vibrate.xml new file mode 100644 index 000000000000..230dff3fdba3 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_ringer_vibrate.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_screenrecord.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_screenrecord.xml new file mode 100644 index 000000000000..703d83d3399c --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_screenrecord.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_screenrecord_hq.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_screenrecord_hq.xml new file mode 100644 index 000000000000..e7597bc75894 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_screenrecord_hq.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_screenrecord_lq.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_screenrecord_lq.xml new file mode 100644 index 000000000000..d7073fb78d16 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_screenrecord_lq.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_screenrecord_mq.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_screenrecord_mq.xml new file mode 100644 index 000000000000..47fca4e1939e --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_screenrecord_mq.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_screenshot.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_screenshot.xml new file mode 100644 index 000000000000..8416030385f0 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_screenshot.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_0.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_0.xml new file mode 100644 index 000000000000..018c093d7659 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_0.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_1.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_1.xml new file mode 100644 index 000000000000..be34bb1258f9 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_1.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_2.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_2.xml new file mode 100644 index 000000000000..800d8265fd5a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_2.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_3.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_3.xml new file mode 100644 index 000000000000..c81749fa6a83 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_3.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_4.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_4.xml new file mode 100644 index 000000000000..a55af496b868 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_4.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_disabled.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_disabled.xml new file mode 100644 index 000000000000..767f76f3ea2e --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_disabled.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_full_0.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_full_0.xml new file mode 100644 index 000000000000..b2c76acfadd0 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_full_0.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_full_1.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_full_1.xml new file mode 100644 index 000000000000..6e97653fe770 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_full_1.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_full_2.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_full_2.xml new file mode 100644 index 000000000000..dbf987d0cd2c --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_full_2.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_full_3.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_full_3.xml new file mode 100644 index 000000000000..88db97af1d25 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_full_3.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_full_4.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_full_4.xml new file mode 100644 index 000000000000..672770922651 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_signal_full_4.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_sleep.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_sleep.xml new file mode 100644 index 000000000000..5730fdedb05f --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_sleep.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_smart_pixels.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_smart_pixels.xml new file mode 100644 index 000000000000..818842a6a74d --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_smart_pixels.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_sound_search.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_sound_search.xml new file mode 100644 index 000000000000..5ee135a7af75 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_sound_search.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_suspend.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_suspend.xml new file mode 100644 index 000000000000..0b0a267ea0fc --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_suspend.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_sync.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_sync.xml new file mode 100644 index 000000000000..170f6e3331ef --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_sync.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_sync_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_sync_off.xml new file mode 100644 index 000000000000..a10b2d37bac2 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_sync_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_sync_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_sync_on.xml new file mode 100644 index 000000000000..170f6e3331ef --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_sync_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_usb_tether.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_usb_tether.xml new file mode 100644 index 000000000000..094a48ae696d --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_usb_tether.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_usb_tether_off.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_usb_tether_off.xml new file mode 100644 index 000000000000..83cf6b74b7a7 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_usb_tether_off.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_usb_tether_on.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_usb_tether_on.xml new file mode 100644 index 000000000000..094a48ae696d --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_usb_tether_on.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_volume_panel.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_volume_panel.xml new file mode 100644 index 000000000000..faa35f38d7d3 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_volume_panel.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_vpn.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_vpn.xml new file mode 100644 index 000000000000..810125af494b --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_vpn.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_vpn_disabled.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_vpn_disabled.xml new file mode 100644 index 000000000000..13032391848e --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_vpn_disabled.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml new file mode 100644 index 000000000000..e331c00b3fec --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml new file mode 100644 index 000000000000..1373f3ee17fa --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml new file mode 100644 index 000000000000..929eadd57f53 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml new file mode 100644 index 000000000000..86fddebe4d2b --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml new file mode 100644 index 000000000000..a10b93df0e4c --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_disabled.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_disabled.xml new file mode 100644 index 000000000000..c8f9c26ee296 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_disabled.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml new file mode 100644 index 000000000000..0ddfce5e1c7a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_full_0.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_full_0.xml new file mode 100644 index 000000000000..5f3bca4e6289 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_full_0.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_full_1.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_full_1.xml new file mode 100644 index 000000000000..8644da72e544 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_full_1.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_full_2.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_full_2.xml new file mode 100644 index 000000000000..94bfdb7ac826 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_full_2.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_full_3.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_full_3.xml new file mode 100644 index 000000000000..2d4f81d7a255 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_full_3.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_full_4.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_full_4.xml new file mode 100644 index 000000000000..e5655ce60e74 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_full_4.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_no_network.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_no_network.xml new file mode 100644 index 000000000000..5f3bca4e6289 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_qs_wifi_no_network.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_screen_stabilization_enabled.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_screen_stabilization_enabled.xml new file mode 100644 index 000000000000..04617e0dea1a --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_screen_stabilization_enabled.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_settings.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_settings.xml new file mode 100644 index 000000000000..4ded8aa1c3d2 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_settings_16dp.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_settings_16dp.xml new file mode 100644 index 000000000000..65e6f783cc49 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_settings_16dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_settings_20dp.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_settings_20dp.xml new file mode 100644 index 000000000000..3d7a0dac585c --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_settings_20dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_settings_extensions.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_settings_extensions.xml new file mode 100644 index 000000000000..181aeecf9981 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_settings_extensions.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_settings_memory.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_settings_memory.xml new file mode 100644 index 000000000000..8732c1b85986 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_settings_memory.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_settings_reloaded_tuner.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_settings_reloaded_tuner.xml new file mode 100644 index 000000000000..c36c4322dae2 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_settings_reloaded_tuner.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_airplane.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_airplane.xml new file mode 100644 index 000000000000..0e68d37ebcb6 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_airplane.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_airplane_disable.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_airplane_disable.xml new file mode 100644 index 000000000000..b7852702a74b --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_airplane_disable.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_airplane_enable.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_airplane_enable.xml new file mode 100644 index 000000000000..740e36079795 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_airplane_enable.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_flashlight.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_flashlight.xml new file mode 100644 index 000000000000..e47ac2ba0110 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_flashlight.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_flashlight_disable.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_flashlight_disable.xml new file mode 100644 index 000000000000..2e58b485995f --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_flashlight_disable.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_flashlight_enable.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_flashlight_enable.xml new file mode 100644 index 000000000000..2e58b485995f --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_flashlight_enable.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_location.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_location.xml new file mode 100644 index 000000000000..c67613fb7ae5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_location.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_location_disable.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_location_disable.xml new file mode 100644 index 000000000000..6a5fa1fe7281 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_location_disable.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_location_enable.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_location_enable.xml new file mode 100644 index 000000000000..6a5fa1fe7281 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_location_enable.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_wifi_transient.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_wifi_transient.xml new file mode 100644 index 000000000000..ffa9467a2204 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_signal_wifi_transient.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_snooze.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_snooze.xml new file mode 100644 index 000000000000..3ec3ada654ac --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_snooze.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_swap_vert.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_swap_vert.xml new file mode 100644 index 000000000000..042e35ab5694 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_swap_vert.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml new file mode 100644 index 000000000000..d4371a806ad5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_volume_collapse.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_volume_collapse.xml new file mode 100644 index 000000000000..3983dbe1d2a5 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_volume_collapse.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_volume_expand.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_volume_expand.xml new file mode 100644 index 000000000000..0218d8086ee3 --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/ic_volume_expand.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/qs_ic_wifi_lock.xml b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/qs_ic_wifi_lock.xml new file mode 100644 index 000000000000..2a6325c3e30d --- /dev/null +++ b/packages/overlays/IconPackOutlineSystemUIOverlay/res/drawable/qs_ic_wifi_lock.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/Android.bp b/packages/overlays/IconPackRoundedAndroidOverlay/Android.bp new file mode 100644 index 000000000000..cb7b01361da3 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackRoundedAndroidOverlay", + theme: "IconPackRoundedAndroid", + product_specific: true, +} diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/AndroidManifest.xml b/packages/overlays/IconPackRoundedAndroidOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..8da1948f0aa1 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_audio_alarm.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_audio_alarm.xml new file mode 100644 index 000000000000..1ba69a1b3bcf --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_audio_alarm.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml new file mode 100644 index 000000000000..3a26cbaf7238 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml @@ -0,0 +1,38 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_battery_80_24dp.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_battery_80_24dp.xml new file mode 100644 index 000000000000..c19ca31d41b2 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_battery_80_24dp.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml new file mode 100644 index 000000000000..feed70c49138 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml new file mode 100644 index 000000000000..3b986a005ebf --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml @@ -0,0 +1,28 @@ + + + + + + + diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml new file mode 100644 index 000000000000..6ea152b85345 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml new file mode 100644 index 000000000000..eaeebccf189e --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml new file mode 100644 index 000000000000..46c4a797973c --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml new file mode 100644 index 000000000000..6c619bb660f6 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_laptop.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_laptop.xml new file mode 100644 index 000000000000..2f13fb8685f9 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_laptop.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_misc_hid.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_misc_hid.xml new file mode 100644 index 000000000000..ebf337b532fc --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_misc_hid.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_network_pan.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_network_pan.xml new file mode 100644 index 000000000000..85c2bcdbdce0 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_network_pan.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml new file mode 100644 index 000000000000..edb8d9e4295a --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_corp_badge.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_corp_badge.xml new file mode 100644 index 000000000000..031e5a8ba2c4 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_corp_badge.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_expand_more.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_expand_more.xml new file mode 100644 index 000000000000..50a8742be529 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_expand_more.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_faster_emergency.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_faster_emergency.xml new file mode 100644 index 000000000000..46e243c0f1ac --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_faster_emergency.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_file_copy.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_file_copy.xml new file mode 100644 index 000000000000..1feaab1663c1 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_file_copy.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml new file mode 100644 index 000000000000..9d43e51dc469 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_hotspot_transient_animation_drawable.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_hotspot_transient_animation_drawable.xml new file mode 100644 index 000000000000..11cb9d225d63 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_hotspot_transient_animation_drawable.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_info_outline_24.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_info_outline_24.xml new file mode 100644 index 000000000000..fe9c57870035 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_info_outline_24.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_lock.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_lock.xml new file mode 100644 index 000000000000..d0b85e70920d --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_lock.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_lock_bugreport.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_lock_bugreport.xml new file mode 100644 index 000000000000..083007b56622 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_lock_bugreport.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_lock_open.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_lock_open.xml new file mode 100644 index 000000000000..6f19afe7c484 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_lock_open.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_lock_power_off.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_lock_power_off.xml new file mode 100644 index 000000000000..e2296fb3839c --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_lock_power_off.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_lockscreen_ime.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_lockscreen_ime.xml new file mode 100644 index 000000000000..fae8445a0a42 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_lockscreen_ime.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_mode_edit.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_mode_edit.xml new file mode 100644 index 000000000000..c44a8d6fb9c5 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_mode_edit.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_notifications_alerted.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_notifications_alerted.xml new file mode 100644 index 000000000000..752dab5082a4 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_notifications_alerted.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_phone.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_phone.xml new file mode 100644 index 000000000000..c6e8f57f5ec1 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_phone.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_airplane.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_airplane.xml new file mode 100644 index 000000000000..20560c2aef42 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_airplane.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml new file mode 100644 index 000000000000..a182f00b9c0f --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_battery_saver.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_battery_saver.xml new file mode 100644 index 000000000000..ca37d581332b --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_battery_saver.xml @@ -0,0 +1,30 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_bluetooth.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_bluetooth.xml new file mode 100644 index 000000000000..5e1a5f20c6d6 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_bluetooth.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_dnd.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_dnd.xml new file mode 100644 index 000000000000..2c00dde300c4 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_dnd.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_flashlight.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_flashlight.xml new file mode 100644 index 000000000000..1b0cfaa89a3f --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_flashlight.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_night_display_on.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_night_display_on.xml new file mode 100644 index 000000000000..8c7cc4502642 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_night_display_on.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml new file mode 100644 index 000000000000..3cf7541219f0 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml @@ -0,0 +1,27 @@ + + + + + diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_restart.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_restart.xml new file mode 100644 index 000000000000..ff8edbf3537e --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_restart.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_screenshot.xml new file mode 100644 index 000000000000..74053fcb17e7 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_screenshot.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_settings_bluetooth.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_settings_bluetooth.xml new file mode 100644 index 000000000000..5e1a5f20c6d6 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_settings_bluetooth.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml new file mode 100644 index 000000000000..a8e01c20024f --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml new file mode 100644 index 000000000000..a8e01c20024f --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_0_5_bar.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml new file mode 100644 index 000000000000..08fc66e61da6 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml new file mode 100644 index 000000000000..cdd770f02e16 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_1_5_bar.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml new file mode 100644 index 000000000000..9982d036d6bf --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml new file mode 100644 index 000000000000..9d8c3070f039 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_2_5_bar.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml new file mode 100644 index 000000000000..0e8a58aeaa5d --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml new file mode 100644 index 000000000000..b1aaa3ada717 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_3_5_bar.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml new file mode 100644 index 000000000000..24faf35db290 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml new file mode 100644 index 000000000000..3f95fa8dca7c --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_4_5_bar.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml new file mode 100644 index 000000000000..24faf35db290 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_cellular_5_5_bar.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_location.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_location.xml new file mode 100644 index 000000000000..a00c85f3d1f1 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_location.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml new file mode 100644 index 000000000000..5ecb82619862 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation_drawable.xml new file mode 100644 index 000000000000..130da579a5bb --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation_drawable.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_wifi_signal_0.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_wifi_signal_0.xml new file mode 100644 index 000000000000..3c9d9142d49e --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_wifi_signal_0.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_wifi_signal_1.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_wifi_signal_1.xml new file mode 100644 index 000000000000..6db8329e846d --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_wifi_signal_1.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_wifi_signal_2.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_wifi_signal_2.xml new file mode 100644 index 000000000000..2544bc328375 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_wifi_signal_2.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_wifi_signal_3.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_wifi_signal_3.xml new file mode 100644 index 000000000000..b9f375aaca2b --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_wifi_signal_3.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_wifi_signal_4.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_wifi_signal_4.xml new file mode 100644 index 000000000000..d9c9b2085aba --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_wifi_signal_4.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_activity_recognition.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_activity_recognition.xml new file mode 100644 index 000000000000..669704775311 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_activity_recognition.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_aural.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_aural.xml new file mode 100644 index 000000000000..8cd240d47b2d --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_aural.xml @@ -0,0 +1,40 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_calendar.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_calendar.xml new file mode 100644 index 000000000000..4e61af0dbf34 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_calendar.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_call_log.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_call_log.xml new file mode 100644 index 000000000000..8d3c43c3d216 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_call_log.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_camera.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_camera.xml new file mode 100644 index 000000000000..7d42ff758b8c --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_camera.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_contacts.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_contacts.xml new file mode 100644 index 000000000000..5d68581757ba --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_contacts.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_location.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_location.xml new file mode 100644 index 000000000000..5dce9cb985b3 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_location.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_microphone.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_microphone.xml new file mode 100644 index 000000000000..b45e8322628d --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_microphone.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_phone_calls.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_phone_calls.xml new file mode 100644 index 000000000000..fe45a97a3287 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_phone_calls.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_sensors.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_sensors.xml new file mode 100644 index 000000000000..c84cb0e99bde --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_sensors.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_sms.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_sms.xml new file mode 100644 index 000000000000..96b70f7fbfbd --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_sms.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_storage.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_storage.xml new file mode 100644 index 000000000000..9240bb48b35e --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_storage.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_visual.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_visual.xml new file mode 100644 index 000000000000..2cd1bc0f17b0 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_visual.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/values/config.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/values/config.xml new file mode 100644 index 000000000000..b7bfaad56249 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/values/config.xml @@ -0,0 +1,41 @@ + + + + + M 11,1.505 H 8 V 0.995 C 8,0.445 7.55,-0.005 7,-0.005 H 5 C 4.45,-0.005 4,0.445 4,0.995 V 1.505 H 1 C 0.45,1.505 0,1.955 0,2.505 V 19.005 C 0,19.555 0.45,20.005 1,20.005 H 11 C 11.55,20.005 12,19.555 12,19.005 V 2.505 C 12,1.955 11.543,1.505 11,1.505 Z M 10.5,18.505 H 1.5 V 3.005 H 10.5 Z + + + + M 10.5,18.505 H 1.5 V 3.005 H 10.5 Z + + + M 3.92,11.5 H 5 V 15.01 C 5,15.17 5.13,15.26 5.25,15.26 5.33,15.26 5.42,15.22 5.47,15.13 L 8.3,9.87 C 8.39,9.7 8.27,9.5 8.08,9.5 H 7 V 5.99 C 7,5.83 6.87,5.74 6.75,5.74 6.67,5.74 6.58,5.78 6.53,5.87 L 3.7,11.13 C 3.61,11.3 3.73,11.5 3.92,11.5 Z + + + M 3.75,11.25 H 5.25 V 12.75 C 5.25,13.16 5.59,13.5 6,13.5 6.41,13.5 6.75,13.16 6.75,12.75 V 11.25 H 8.25 C 8.66,11.25 9,10.91 9,10.5 9,10.09 8.66,9.7499 8.25,9.7499 H 6.75 V 8.2499 C 6.75,7.8399 6.41,7.4999 6,7.4999 5.59,7.4999 5.2794,7.841 5.25,8.2499 V 9.7499 H 3.75 C 3.34,9.7499 3,10.09 3,10.5 3,10.91 3.3401,11.25 3.75,11.25 Z + + + + M 20.72,16.22 L 19,17.94 L 17.28,16.22 C 16.99,15.93 16.51,15.93 16.22,16.22 C 15.93,16.51 15.93,16.99 16.22,17.28 L 17.94,19 L 16.22,20.72 C 15.93,21.01 15.93,21.49 16.22,21.78 C 16.37,21.93 16.56,22 16.75,22 C 16.94,22 17.13,21.93 17.28,21.78 L 19,20.06 L 20.72,21.78 C 20.87,21.93 21.06,22 21.25,22 C 21.44,22 21.63,21.93 21.78,21.78 C 22.07,21.49 22.07,21.01 21.78,20.72 L 20.06,19 L 21.78,17.28 C 22.07,16.99 22.07,16.51 21.78,16.22 C 21.49,15.93 21.01,15.93 20.72,16.22 Z + + + 10 + 10 + diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/Android.bp b/packages/overlays/IconPackRoundedLauncherOverlay/Android.bp new file mode 100644 index 000000000000..8ab6d957720e --- /dev/null +++ b/packages/overlays/IconPackRoundedLauncherOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackRoundedLauncherOverlay", + theme: "IconPackRoundedLauncher", + product_specific: true, +} diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/AndroidManifest.xml b/packages/overlays/IconPackRoundedLauncherOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..8406f4279f2b --- /dev/null +++ b/packages/overlays/IconPackRoundedLauncherOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_corp.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_corp.xml new file mode 100644 index 000000000000..be31fb9171bf --- /dev/null +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_corp.xml @@ -0,0 +1,26 @@ + + + + + diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_corp_off.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_corp_off.xml new file mode 100644 index 000000000000..8d298f7cbc97 --- /dev/null +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_corp_off.xml @@ -0,0 +1,26 @@ + + + + + diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_drag_handle.xml new file mode 100644 index 000000000000..1e7fcaf0a52f --- /dev/null +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_drag_handle.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_hourglass_top.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_hourglass_top.xml new file mode 100644 index 000000000000..28da99fe3218 --- /dev/null +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_hourglass_top.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_info_no_shadow.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_info_no_shadow.xml new file mode 100644 index 000000000000..168f86f1cc36 --- /dev/null +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_info_no_shadow.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_install_no_shadow.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_install_no_shadow.xml new file mode 100644 index 000000000000..abb597a1d3bd --- /dev/null +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_install_no_shadow.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_palette.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_palette.xml new file mode 100644 index 000000000000..e086ebd95cf7 --- /dev/null +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_palette.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_pin.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_pin.xml new file mode 100644 index 000000000000..6ac4e122b83a --- /dev/null +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_pin.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_remove_no_shadow.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_remove_no_shadow.xml new file mode 100644 index 000000000000..fcfadbe8e60a --- /dev/null +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_remove_no_shadow.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_screenshot.xml new file mode 100644 index 000000000000..ed90b85c8b87 --- /dev/null +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_screenshot.xml @@ -0,0 +1,29 @@ + + + + + + diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_select.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_select.xml new file mode 100644 index 000000000000..7bd92ef8687a --- /dev/null +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_select.xml @@ -0,0 +1,23 @@ + + + + diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_setting.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_setting.xml new file mode 100644 index 000000000000..70621ae19749 --- /dev/null +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_setting.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_share.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_share.xml new file mode 100644 index 000000000000..36dd3baa8994 --- /dev/null +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_share.xml @@ -0,0 +1,39 @@ + + + + + + + + diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_smartspace_preferences.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_smartspace_preferences.xml new file mode 100644 index 000000000000..49f732726de5 --- /dev/null +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_smartspace_preferences.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_split_screen.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_split_screen.xml new file mode 100644 index 000000000000..85443eb0a1d2 --- /dev/null +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_split_screen.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml new file mode 100644 index 000000000000..75e6ce3f00d0 --- /dev/null +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_warning.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_warning.xml new file mode 100644 index 000000000000..2426f6f898eb --- /dev/null +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_warning.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_widget.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_widget.xml new file mode 100644 index 000000000000..1e84ba461d9b --- /dev/null +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_widget.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/Android.bp b/packages/overlays/IconPackRoundedSettingsOverlay/Android.bp new file mode 100644 index 000000000000..ee2f98a96864 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackRoundedSettingsOverlay", + theme: "IconPackRoundedSettings", + product_specific: true, +} diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/AndroidManifest.xml b/packages/overlays/IconPackRoundedSettingsOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..df71e156490c --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/drag_handle.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/drag_handle.xml new file mode 100644 index 000000000000..f3241f849261 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/drag_handle.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_add_24dp.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_add_24dp.xml new file mode 100644 index 000000000000..7dce6609be67 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_add_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_airplanemode_active.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_airplanemode_active.xml new file mode 100644 index 000000000000..e64828b6ec14 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_airplanemode_active.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_android.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_android.xml new file mode 100644 index 000000000000..31df4a683042 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_android.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_apps.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_apps.xml new file mode 100644 index 000000000000..8db613dfa5d2 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_apps.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_arrow_back.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_arrow_back.xml new file mode 100644 index 000000000000..34f79b4478c9 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_arrow_back.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml new file mode 100644 index 000000000000..50a8742be529 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_battery_charging_full.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_battery_charging_full.xml new file mode 100644 index 000000000000..cda34da5e039 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_battery_charging_full.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml new file mode 100644 index 000000000000..d43d6f64b38a --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml new file mode 100644 index 000000000000..8e9fa3bb4ac9 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_call_24dp.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_call_24dp.xml new file mode 100644 index 000000000000..eeed4bf2982a --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_call_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_cancel.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_cancel.xml new file mode 100644 index 000000000000..5cd8861e813f --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_cancel.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_cast_24dp.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_cast_24dp.xml new file mode 100644 index 000000000000..a9cb021a0784 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_cast_24dp.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_cellular_off.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_cellular_off.xml new file mode 100644 index 000000000000..34d40ec813e4 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_cellular_off.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml new file mode 100644 index 000000000000..1e86983cd551 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml new file mode 100644 index 000000000000..1feaab1663c1 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_data_saver.xml new file mode 100644 index 000000000000..ba3c5808d26c --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_data_saver.xml @@ -0,0 +1,33 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_delete.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_delete.xml new file mode 100644 index 000000000000..fd87423c3ad1 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_delete.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_devices_other.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_devices_other.xml new file mode 100644 index 000000000000..1b4ec92e3734 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_devices_other.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_devices_other_32dp.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_devices_other_32dp.xml new file mode 100644 index 000000000000..dfd4b20a7721 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_devices_other_32dp.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml new file mode 100644 index 000000000000..5f704f0ed828 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_eject_24dp.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_eject_24dp.xml new file mode 100644 index 000000000000..0d4bd9bc48d0 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_eject_24dp.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_expand_less.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_expand_less.xml new file mode 100644 index 000000000000..e67b753b39dc --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_expand_less.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_expand_more_inverse.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_expand_more_inverse.xml new file mode 100644 index 000000000000..ab5b9aa68908 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_expand_more_inverse.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_find_in_page_24px.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_find_in_page_24px.xml new file mode 100644 index 000000000000..36d5c7cf4cbf --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_find_in_page_24px.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml new file mode 100644 index 000000000000..9240bb48b35e --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_friction_lock_closed.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_friction_lock_closed.xml new file mode 100644 index 000000000000..aff97842cdff --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_friction_lock_closed.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml new file mode 100644 index 000000000000..308c2ab34563 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_headset_24dp.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_headset_24dp.xml new file mode 100644 index 000000000000..eaeebccf189e --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_headset_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_help.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_help.xml new file mode 100644 index 000000000000..d062e65dedd5 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_help.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_help_actionbar.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_help_actionbar.xml new file mode 100644 index 000000000000..c7d672efa574 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_help_actionbar.xml @@ -0,0 +1,33 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_homepage_search.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_homepage_search.xml new file mode 100644 index 000000000000..5abe45c9baf3 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_homepage_search.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_info_outline_24.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_info_outline_24.xml new file mode 100644 index 000000000000..060188bf33a9 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_info_outline_24.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_local_movies.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_local_movies.xml new file mode 100644 index 000000000000..c669efa23a88 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_local_movies.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml new file mode 100644 index 000000000000..fe45a97a3287 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_lock.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_lock.xml new file mode 100644 index 000000000000..4a7f04c69a5d --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_lock.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_media_stream.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_media_stream.xml new file mode 100644 index 000000000000..0d93646a6128 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_media_stream.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_media_stream_off.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_media_stream_off.xml new file mode 100644 index 000000000000..9e4b9ea9519e --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_media_stream_off.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_network_cell.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_network_cell.xml new file mode 100644 index 000000000000..fbe5ef03ad80 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_network_cell.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_notifications.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_notifications.xml new file mode 100644 index 000000000000..cd78f7a65cbb --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_notifications.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_notifications_alert.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_notifications_alert.xml new file mode 100644 index 000000000000..8f854e74f551 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_notifications_alert.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml new file mode 100644 index 000000000000..56a67c912176 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml @@ -0,0 +1,33 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_phone_info.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_phone_info.xml new file mode 100644 index 000000000000..f41f7a05e68f --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_phone_info.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_photo_library.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_photo_library.xml new file mode 100644 index 000000000000..2cd1bc0f17b0 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_photo_library.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_scan_24dp.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_scan_24dp.xml new file mode 100644 index 000000000000..3d79f7946b31 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_scan_24dp.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_search_24dp.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_search_24dp.xml new file mode 100644 index 000000000000..f30a69c13132 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_search_24dp.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_accent.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_accent.xml new file mode 100644 index 000000000000..172c0051a2c2 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_accent.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_accessibility.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_accessibility.xml new file mode 100644 index 000000000000..f17b5b93d84f --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_accessibility.xml @@ -0,0 +1,37 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_accounts.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_accounts.xml new file mode 100644 index 000000000000..f02da58550ba --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_accounts.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_backup.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_backup.xml new file mode 100644 index 000000000000..4967a0e7f1d3 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_backup.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_battery_white.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_battery_white.xml new file mode 100644 index 000000000000..e27cb8d54838 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_battery_white.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_data_usage.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_data_usage.xml new file mode 100644 index 000000000000..855e4bb2a39d --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_data_usage.xml @@ -0,0 +1,28 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_date_time.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_date_time.xml new file mode 100644 index 000000000000..6bf52264e12a --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_date_time.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_delete.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_delete.xml new file mode 100644 index 000000000000..48a430fc420b --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_delete.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_disable.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_disable.xml new file mode 100644 index 000000000000..0572fb72f82e --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_disable.xml @@ -0,0 +1,37 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_display_white.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_display_white.xml new file mode 100644 index 000000000000..19acd6ae8210 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_display_white.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_enable.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_enable.xml new file mode 100644 index 000000000000..ec608cdf67dd --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_enable.xml @@ -0,0 +1,37 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_home.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_home.xml new file mode 100644 index 000000000000..7e06f7ddcea2 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_home.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_language.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_language.xml new file mode 100644 index 000000000000..730942bda59c --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_language.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_location.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_location.xml new file mode 100644 index 000000000000..762d67d7fa87 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_location.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_multiuser.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_multiuser.xml new file mode 100644 index 000000000000..83d9d2a9311e --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_multiuser.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_night_display.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_night_display.xml new file mode 100644 index 000000000000..54d5b55fcab7 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_night_display.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_open.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_open.xml new file mode 100644 index 000000000000..b0894888931d --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_open.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_print.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_print.xml new file mode 100644 index 000000000000..4ee616c504a0 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_print.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_privacy.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_privacy.xml new file mode 100644 index 000000000000..12a82f2c1f0b --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_privacy.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_security_white.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_security_white.xml new file mode 100644 index 000000000000..e93e63f5f603 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_security_white.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_sim.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_sim.xml new file mode 100644 index 000000000000..563dbe474144 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_sim.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml new file mode 100644 index 000000000000..9ec3ffcc47fa --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_wireless.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_wireless.xml new file mode 100644 index 000000000000..c8c8abc0b6ac --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_wireless.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_storage.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_storage.xml new file mode 100644 index 000000000000..0cf6f54beeb2 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_storage.xml @@ -0,0 +1,41 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_storage_white.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_storage_white.xml new file mode 100644 index 000000000000..355ee3b920ee --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_storage_white.xml @@ -0,0 +1,40 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_suggestion_night_display.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_suggestion_night_display.xml new file mode 100644 index 000000000000..54d5b55fcab7 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_suggestion_night_display.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_sync.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_sync.xml new file mode 100644 index 000000000000..5d0bab425243 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_sync.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml new file mode 100644 index 000000000000..e9a07cc3b988 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml @@ -0,0 +1,37 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_system_update.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_system_update.xml new file mode 100644 index 000000000000..486b663b00cc --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_system_update.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml new file mode 100644 index 000000000000..906b06a73787 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml new file mode 100644 index 000000000000..91bb81e9f39a --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml @@ -0,0 +1,38 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_volume_up_24dp.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_volume_up_24dp.xml new file mode 100644 index 000000000000..25f81b71256a --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_volume_up_24dp.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_vpn_key.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_vpn_key.xml new file mode 100644 index 000000000000..78f5c52b94e0 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_vpn_key.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_wifi_tethering.xml b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_wifi_tethering.xml new file mode 100644 index 000000000000..3ee1e368e385 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_wifi_tethering.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/Android.bp b/packages/overlays/IconPackRoundedSystemUIOverlay/Android.bp new file mode 100644 index 000000000000..ee0220a44943 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackRoundedSystemUIOverlay", + theme: "IconPackRoundedSystemUI", + product_specific: true, +} diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/AndroidManifest.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..01b121df37dd --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_alarm.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_alarm.xml new file mode 100644 index 000000000000..34820ad030ef --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_alarm.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_alarm_dim.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_alarm_dim.xml new file mode 100644 index 000000000000..34820ad030ef --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_alarm_dim.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_arrow_back.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_arrow_back.xml new file mode 100644 index 000000000000..34f79b4478c9 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_arrow_back.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml new file mode 100644 index 000000000000..b41f2830e584 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_brightness_thumb.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_brightness_thumb.xml new file mode 100644 index 000000000000..62fcd4c3a33a --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_brightness_thumb.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_camera.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_camera.xml new file mode 100644 index 000000000000..142e078bdfd9 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_camera.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_cast.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_cast.xml new file mode 100644 index 000000000000..fed248aea26a --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_cast.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_cast_connected.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_cast_connected.xml new file mode 100644 index 000000000000..f2821668c870 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_cast_connected.xml @@ -0,0 +1,37 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_cast_connected_fill.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_cast_connected_fill.xml new file mode 100644 index 000000000000..cadef698d7eb --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_cast_connected_fill.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_close_white.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_close_white.xml new file mode 100644 index 000000000000..1dca14d9de77 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_close_white.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_data_saver.xml new file mode 100644 index 000000000000..cdc3bfbd3d5f --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_data_saver.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_data_saver_off.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_data_saver_off.xml new file mode 100644 index 000000000000..7dab949f9da5 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_data_saver_off.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_drag_handle.xml new file mode 100644 index 000000000000..2927994b4ba5 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_drag_handle.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_headset.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_headset.xml new file mode 100644 index 000000000000..2e97f44e9790 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_headset.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_headset_mic.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_headset_mic.xml new file mode 100644 index 000000000000..ff644b941a05 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_headset_mic.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_hotspot.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_hotspot.xml new file mode 100644 index 000000000000..3edd97823dc8 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_hotspot.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_info.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_info.xml new file mode 100644 index 000000000000..fe9c57870035 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_info.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_info_outline.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_info_outline.xml new file mode 100644 index 000000000000..fe9c57870035 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_info_outline.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_invert_colors.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_invert_colors.xml new file mode 100644 index 000000000000..c0b21399c165 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_invert_colors.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_location.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_location.xml new file mode 100644 index 000000000000..b1d1a05fa9de --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_location.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml new file mode 100644 index 000000000000..16f0868987fb --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_notifications_alert.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_notifications_alert.xml new file mode 100644 index 000000000000..752dab5082a4 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_notifications_alert.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_notifications_silence.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_notifications_silence.xml new file mode 100644 index 000000000000..3afe7356bfc9 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_notifications_silence.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_power_low.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_power_low.xml new file mode 100644 index 000000000000..8e9fa3bb4ac9 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_power_low.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_power_saver.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_power_saver.xml new file mode 100644 index 000000000000..db4d302eb240 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_power_saver.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml new file mode 100644 index 000000000000..85c2bcdbdce0 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_bluetooth_on.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_bluetooth_on.xml new file mode 100644 index 000000000000..6e7ebb36d274 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_bluetooth_on.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_cancel.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_cancel.xml new file mode 100644 index 000000000000..5cd8861e813f --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_cancel.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_no_sim.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_no_sim.xml new file mode 100644 index 000000000000..9e3f63862976 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_no_sim.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml new file mode 100644 index 000000000000..6da3eea2f095 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml @@ -0,0 +1,31 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml new file mode 100644 index 000000000000..9d8dc499c15b --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml @@ -0,0 +1,31 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml new file mode 100644 index 000000000000..0d365585fc3f --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml @@ -0,0 +1,31 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml new file mode 100644 index 000000000000..c80c5d250f61 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml @@ -0,0 +1,31 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml new file mode 100644 index 000000000000..47cc27484963 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml @@ -0,0 +1,31 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml new file mode 100644 index 000000000000..a963150e472e --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml @@ -0,0 +1,34 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_screenrecord.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_screenrecord.xml new file mode 100644 index 000000000000..a875a23c3a17 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_screenrecord.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_screenshot_delete.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_screenshot_delete.xml new file mode 100644 index 000000000000..48a430fc420b --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_screenshot_delete.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_settings.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_settings.xml new file mode 100644 index 000000000000..86cb525e203a --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_settings.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_settings_16dp.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_settings_16dp.xml new file mode 100644 index 000000000000..0627ea9256c5 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_settings_16dp.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_swap_vert.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_swap_vert.xml new file mode 100644 index 000000000000..543dcb96a5f8 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_swap_vert.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml new file mode 100644 index 000000000000..741d963fbcb6 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml @@ -0,0 +1,40 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_alarm.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_alarm.xml new file mode 100644 index 000000000000..cf1b02f1658d --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_alarm.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml new file mode 100644 index 000000000000..3a26cbaf7238 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml @@ -0,0 +1,38 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml new file mode 100644 index 000000000000..6c8bf335bc74 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_media.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_media.xml new file mode 100644 index 000000000000..0d93646a6128 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_media.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_media_mute.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_media_mute.xml new file mode 100644 index 000000000000..9e4b9ea9519e --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_media_mute.xml @@ -0,0 +1,29 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_notification.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_notification.xml new file mode 100644 index 000000000000..0c2b62fecf81 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_notification.xml @@ -0,0 +1,29 @@ + + + + + + diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_notification_mute.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_notification_mute.xml new file mode 100644 index 000000000000..56bc50940524 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_notification_mute.xml @@ -0,0 +1,32 @@ + + + + + + + diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml new file mode 100644 index 000000000000..ad79132bb0f8 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml new file mode 100644 index 000000000000..2ea41f22943a --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_ringer.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_ringer.xml new file mode 100644 index 000000000000..a7f04a8c51f4 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_ringer.xml @@ -0,0 +1,28 @@ + + + + + + diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml new file mode 100644 index 000000000000..81f18fb4b383 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml @@ -0,0 +1,32 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml new file mode 100644 index 000000000000..3e40279aa629 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml @@ -0,0 +1,37 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_voice.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_voice.xml new file mode 100644 index 000000000000..fe45a97a3287 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_volume_voice.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/stat_sys_camera.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/stat_sys_camera.xml new file mode 100644 index 000000000000..294e181faef8 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/stat_sys_camera.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml new file mode 100644 index 000000000000..61206ca0371d --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/stat_sys_mic_none.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/stat_sys_mic_none.xml new file mode 100644 index 000000000000..d706777cf0e6 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/stat_sys_mic_none.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml new file mode 100644 index 000000000000..0762acefa223 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedThemePickerOverlay/Android.bp b/packages/overlays/IconPackRoundedThemePickerOverlay/Android.bp new file mode 100644 index 000000000000..d74765c33607 --- /dev/null +++ b/packages/overlays/IconPackRoundedThemePickerOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackRoundedThemePickerOverlay", + theme: "IconPackRoundedTheme", + product_specific: true, +} diff --git a/packages/overlays/IconPackRoundedThemePickerOverlay/AndroidManifest.xml b/packages/overlays/IconPackRoundedThemePickerOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..9a90a05713fe --- /dev/null +++ b/packages/overlays/IconPackRoundedThemePickerOverlay/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_add_24px.xml b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_add_24px.xml new file mode 100644 index 000000000000..707369ab3446 --- /dev/null +++ b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_add_24px.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_close_24px.xml b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_close_24px.xml new file mode 100644 index 000000000000..1dca14d9de77 --- /dev/null +++ b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_close_24px.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_colorize_24px.xml b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_colorize_24px.xml new file mode 100644 index 000000000000..5c21b23f0bc7 --- /dev/null +++ b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_colorize_24px.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_delete_24px.xml b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_delete_24px.xml new file mode 100644 index 000000000000..48a430fc420b --- /dev/null +++ b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_delete_24px.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_font.xml b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_font.xml new file mode 100644 index 000000000000..bbae929cf76e --- /dev/null +++ b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_font.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_nav_clock.xml b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_nav_clock.xml new file mode 100644 index 000000000000..9c9d663f850c --- /dev/null +++ b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_nav_clock.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_nav_grid.xml b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_nav_grid.xml new file mode 100644 index 000000000000..c81ca1e4bde1 --- /dev/null +++ b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_nav_grid.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_nav_theme.xml b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_nav_theme.xml new file mode 100644 index 000000000000..32d154b0a8ea --- /dev/null +++ b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_nav_theme.xml @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml new file mode 100644 index 000000000000..21daf9d00e89 --- /dev/null +++ b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml @@ -0,0 +1,40 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_shapes_24px.xml b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_shapes_24px.xml new file mode 100644 index 000000000000..19ce4e3ca7ad --- /dev/null +++ b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_shapes_24px.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_tune.xml b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_tune.xml new file mode 100644 index 000000000000..2a56cc54bae8 --- /dev/null +++ b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_tune.xml @@ -0,0 +1,40 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_wifi_24px.xml b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_wifi_24px.xml new file mode 100644 index 000000000000..0a1c3055870d --- /dev/null +++ b/packages/overlays/IconPackRoundedThemePickerOverlay/res/drawable/ic_wifi_24px.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/Android.bp b/packages/overlays/IconPackSamAndroidOverlay/Android.bp new file mode 100644 index 000000000000..2e9dc3472674 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright (C) 2020, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackSamAndroidOverlay", + theme: "IconPackSamAndroid", + product_specific: true, +} diff --git a/packages/overlays/IconPackSamAndroidOverlay/AndroidManifest.xml b/packages/overlays/IconPackSamAndroidOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..7c5a8a256448 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_audio_alarm.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_audio_alarm.xml new file mode 100644 index 000000000000..bc271b806c42 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_audio_alarm.xml @@ -0,0 +1,31 @@ + + + + + + diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml new file mode 100644 index 000000000000..7d9cf7f3ddaf --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_battery_80_24dp.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_battery_80_24dp.xml new file mode 100644 index 000000000000..8a1a5ae6e30f --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_battery_80_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml new file mode 100644 index 000000000000..4e054d07b262 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml new file mode 100644 index 000000000000..c2e4fdfac881 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml new file mode 100644 index 000000000000..482f87b9cc0f --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml new file mode 100644 index 000000000000..433dc39c6a98 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml new file mode 100644 index 000000000000..63b6bb164b0c --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_laptop.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_laptop.xml new file mode 100644 index 000000000000..a36fc9d2d352 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_laptop.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_misc_hid.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_misc_hid.xml new file mode 100644 index 000000000000..6edf7c8ab30e --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_misc_hid.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_network_pan.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_network_pan.xml new file mode 100644 index 000000000000..849cb1ffc421 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_network_pan.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml new file mode 100644 index 000000000000..71acae616301 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_corp_badge.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_corp_badge.xml new file mode 100644 index 000000000000..917874e78a91 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_corp_badge.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_expand_more.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_expand_more.xml new file mode 100644 index 000000000000..3cecf5b64991 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_expand_more.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_faster_emergency.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_faster_emergency.xml new file mode 100644 index 000000000000..18eb115fd528 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_faster_emergency.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_file_copy.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_file_copy.xml new file mode 100644 index 000000000000..0f6b1bda15fa --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_file_copy.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml new file mode 100644 index 000000000000..59b519cb7ca8 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock.xml new file mode 100644 index 000000000000..a6667b49c256 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock_bugreport.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock_bugreport.xml new file mode 100644 index 000000000000..6f1ef5ec5ed9 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock_bugreport.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock_open.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock_open.xml new file mode 100644 index 000000000000..71f51c6fc188 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock_open.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock_power_off.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock_power_off.xml new file mode 100644 index 000000000000..0c4d8177e23f --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lock_power_off.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lockscreen_ime.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lockscreen_ime.xml new file mode 100644 index 000000000000..4044e455f03b --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_lockscreen_ime.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_mode_edit.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_mode_edit.xml new file mode 100644 index 000000000000..4c0c4dc6f13a --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_mode_edit.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_notifications_alerted.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_notifications_alerted.xml new file mode 100644 index 000000000000..e022c63fdf06 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_notifications_alerted.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_phone.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_phone.xml new file mode 100644 index 000000000000..e2e50a6efe40 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_phone.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_airplane.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_airplane.xml new file mode 100644 index 000000000000..549244219eac --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_airplane.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml new file mode 100644 index 000000000000..bef17486311f --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_battery_saver.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_battery_saver.xml new file mode 100644 index 000000000000..132ca949ce16 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_battery_saver.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_bluetooth.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_bluetooth.xml new file mode 100644 index 000000000000..18afc87adb03 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_bluetooth.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_dnd.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_dnd.xml new file mode 100644 index 000000000000..bfde123f87e0 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_dnd.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_flashlight.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_flashlight.xml new file mode 100644 index 000000000000..dd4d22c2a5f4 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_flashlight.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_night_display_on.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_night_display_on.xml new file mode 100644 index 000000000000..a5e0f912c698 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_night_display_on.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml new file mode 100644 index 000000000000..5a43b6f27bc5 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_restart.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_restart.xml new file mode 100644 index 000000000000..afa318da9ebd --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_restart.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_rules.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_rules.xml new file mode 100644 index 000000000000..05907f830998 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_rules.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_screenshot.xml new file mode 100644 index 000000000000..b5d4555a22f9 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_screenshot.xml @@ -0,0 +1,30 @@ + + + + + + diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_settings_bluetooth.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_settings_bluetooth.xml new file mode 100644 index 000000000000..18afc87adb03 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_settings_bluetooth.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml new file mode 100644 index 000000000000..bd5f9bbb816d --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml new file mode 100644 index 000000000000..20bafafb565e --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml new file mode 100644 index 000000000000..e634a91c303a --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml new file mode 100644 index 000000000000..417b34c5889c --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml new file mode 100644 index 000000000000..f17b71d05067 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_location.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_location.xml new file mode 100644 index 000000000000..a802bee9af5f --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_location.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml new file mode 100644 index 000000000000..b3b0f5177f6a --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_0.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_0.xml new file mode 100644 index 000000000000..1aa930d433e8 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_0.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_1.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_1.xml new file mode 100644 index 000000000000..c139e6157e02 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_1.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_2.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_2.xml new file mode 100644 index 000000000000..6e219c5c02d2 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_2.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_3.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_3.xml new file mode 100644 index 000000000000..19d373e92475 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_3.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_4.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_4.xml new file mode 100644 index 000000000000..6d088d41c858 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_wifi_signal_4.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_work_apps_off.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_work_apps_off.xml new file mode 100644 index 000000000000..0e534e00f89f --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_work_apps_off.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_activity_recognition.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_activity_recognition.xml new file mode 100644 index 000000000000..0a4d367b88f8 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_activity_recognition.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_aural.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_aural.xml new file mode 100644 index 000000000000..1035507b97da --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_aural.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_calendar.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_calendar.xml new file mode 100644 index 000000000000..695ee4fff2cd --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_calendar.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_call_log.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_call_log.xml new file mode 100644 index 000000000000..3377ca2220d7 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_call_log.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_camera.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_camera.xml new file mode 100644 index 000000000000..f1feab0a56a1 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_camera.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_contacts.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_contacts.xml new file mode 100644 index 000000000000..f2787a4e2a04 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_contacts.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_location.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_location.xml new file mode 100644 index 000000000000..d9e75eead329 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_location.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_microphone.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_microphone.xml new file mode 100644 index 000000000000..61e89b20244d --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_microphone.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_phone_calls.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_phone_calls.xml new file mode 100644 index 000000000000..de94ed0065b7 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_phone_calls.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_sensors.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_sensors.xml new file mode 100644 index 000000000000..8e8bf0113f71 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_sensors.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_sms.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_sms.xml new file mode 100644 index 000000000000..f836fd0f7c65 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_sms.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_storage.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_storage.xml new file mode 100644 index 000000000000..937da33fc697 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_storage.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_visual.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_visual.xml new file mode 100644 index 000000000000..9d4a2fb50135 --- /dev/null +++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/perm_group_visual.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamLauncherOverlay/Android.bp b/packages/overlays/IconPackSamLauncherOverlay/Android.bp new file mode 100644 index 000000000000..aa0cf0077ab9 --- /dev/null +++ b/packages/overlays/IconPackSamLauncherOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackSamLauncherOverlay", + theme: "IconPackSamLauncher", + product_specific: true, +} diff --git a/packages/overlays/IconPackSamLauncherOverlay/AndroidManifest.xml b/packages/overlays/IconPackSamLauncherOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..2efa010da504 --- /dev/null +++ b/packages/overlays/IconPackSamLauncherOverlay/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_corp.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_corp.xml new file mode 100644 index 000000000000..19d38e771978 --- /dev/null +++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_corp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_drag_handle.xml new file mode 100644 index 000000000000..e7fe15fc5e54 --- /dev/null +++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_drag_handle.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_hourglass_top.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_hourglass_top.xml new file mode 100644 index 000000000000..e818e67f3cba --- /dev/null +++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_hourglass_top.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_info_no_shadow.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_info_no_shadow.xml new file mode 100644 index 000000000000..be5887798028 --- /dev/null +++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_info_no_shadow.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_install_no_shadow.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_install_no_shadow.xml new file mode 100644 index 000000000000..5061ea3f6962 --- /dev/null +++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_install_no_shadow.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_palette.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_palette.xml new file mode 100644 index 000000000000..6916a30c5e9c --- /dev/null +++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_palette.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_pin.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_pin.xml new file mode 100644 index 000000000000..1fe87727677c --- /dev/null +++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_pin.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_screenshot.xml new file mode 100644 index 000000000000..b5d4555a22f9 --- /dev/null +++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_screenshot.xml @@ -0,0 +1,30 @@ + + + + + + diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_select.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_select.xml new file mode 100644 index 000000000000..86a15e6958f4 --- /dev/null +++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_select.xml @@ -0,0 +1,24 @@ + + + + diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_setting.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_setting.xml new file mode 100644 index 000000000000..daa51f1c0b53 --- /dev/null +++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_setting.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_share.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_share.xml new file mode 100644 index 000000000000..6aa5c8b4e3fe --- /dev/null +++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_share.xml @@ -0,0 +1,40 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_smartspace_preferences.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_smartspace_preferences.xml new file mode 100644 index 000000000000..b1a9ea3cd26e --- /dev/null +++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_smartspace_preferences.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_split_screen.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_split_screen.xml new file mode 100644 index 000000000000..3766c9ad6d37 --- /dev/null +++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_split_screen.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml new file mode 100644 index 000000000000..d565038f9e36 --- /dev/null +++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_warning.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_warning.xml new file mode 100644 index 000000000000..453ec1060281 --- /dev/null +++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_warning.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_widget.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_widget.xml new file mode 100644 index 000000000000..f0919c5e0539 --- /dev/null +++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_widget.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/Android.bp b/packages/overlays/IconPackSamSettingsOverlay/Android.bp new file mode 100644 index 000000000000..a62037f3d5c2 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackSamSettingsOverlay", + theme: "IconPackSamSettings", + product_specific: true, +} diff --git a/packages/overlays/IconPackSamSettingsOverlay/AndroidManifest.xml b/packages/overlays/IconPackSamSettingsOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..b4cfbbe50650 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/drag_handle.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/drag_handle.xml new file mode 100644 index 000000000000..83c2c0b47f5b --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/drag_handle.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_accessibility_generic.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_accessibility_generic.xml new file mode 100644 index 000000000000..3be42b3c88ab --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_accessibility_generic.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_add_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_add_24dp.xml new file mode 100644 index 000000000000..6296d18b25a1 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_add_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_airplanemode_active.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_airplanemode_active.xml new file mode 100644 index 000000000000..3acd8d0cf000 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_airplanemode_active.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_android.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_android.xml new file mode 100644 index 000000000000..1430d0c6eae1 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_android.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_apps.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_apps.xml new file mode 100644 index 000000000000..69835c0b867a --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_apps.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_arrow_back.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_arrow_back.xml new file mode 100644 index 000000000000..3ba71a0901a2 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_arrow_back.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml new file mode 100644 index 000000000000..3cecf5b64991 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_battery_charging_full.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_battery_charging_full.xml new file mode 100644 index 000000000000..aff78c3e00be --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_battery_charging_full.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml new file mode 100644 index 000000000000..1447e05f8596 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml new file mode 100644 index 000000000000..448a5015fe15 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_call_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_call_24dp.xml new file mode 100644 index 000000000000..4b57e59ccfc9 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_call_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_cancel.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_cancel.xml new file mode 100644 index 000000000000..966faf1da5c9 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_cancel.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_cast_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_cast_24dp.xml new file mode 100644 index 000000000000..fd00e5a6c651 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_cast_24dp.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_cellular_off.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_cellular_off.xml new file mode 100644 index 000000000000..00779e74d013 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_cellular_off.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml new file mode 100644 index 000000000000..156dc688b7ca --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml new file mode 100644 index 000000000000..0f6b1bda15fa --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_data_saver.xml new file mode 100644 index 000000000000..252b58b3a5e4 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_data_saver.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_delete.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_delete.xml new file mode 100644 index 000000000000..67286766b893 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_delete.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_devices_other.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_devices_other.xml new file mode 100644 index 000000000000..c692eebb1adf --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_devices_other.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml new file mode 100644 index 000000000000..98638290b240 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_eject_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_eject_24dp.xml new file mode 100644 index 000000000000..9e1b8bcef102 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_eject_24dp.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_expand_less.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_expand_less.xml new file mode 100644 index 000000000000..71a06ad47953 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_expand_less.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_expand_more_inverse.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_expand_more_inverse.xml new file mode 100644 index 000000000000..9ea52e2a440c --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_expand_more_inverse.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_find_in_page_24px.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_find_in_page_24px.xml new file mode 100644 index 000000000000..f75c6e36a07a --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_find_in_page_24px.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml new file mode 100644 index 000000000000..937da33fc697 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_friction_lock_closed.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_friction_lock_closed.xml new file mode 100644 index 000000000000..f0ce61b4fd7d --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_friction_lock_closed.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml new file mode 100644 index 000000000000..fc3320d971bd --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_headset_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_headset_24dp.xml new file mode 100644 index 000000000000..482f87b9cc0f --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_headset_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_help.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_help.xml new file mode 100644 index 000000000000..5a8185a3b173 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_help.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_help_actionbar.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_help_actionbar.xml new file mode 100644 index 000000000000..eaf1f540e343 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_help_actionbar.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_homepage_search.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_homepage_search.xml new file mode 100644 index 000000000000..14655e23bcb0 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_homepage_search.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_info_outline_24.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_info_outline_24.xml new file mode 100644 index 000000000000..6b64c4cb7d35 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_info_outline_24.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_local_movies.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_local_movies.xml new file mode 100644 index 000000000000..66f544602a7f --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_local_movies.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml new file mode 100644 index 000000000000..de94ed0065b7 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_media_stream.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_media_stream.xml new file mode 100644 index 000000000000..1fac6854486e --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_media_stream.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_media_stream_off.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_media_stream_off.xml new file mode 100644 index 000000000000..b61a355570f4 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_media_stream_off.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_network_cell.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_network_cell.xml new file mode 100644 index 000000000000..b89c5b99cd25 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_network_cell.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_notifications.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_notifications.xml new file mode 100644 index 000000000000..86e1fb2d8a81 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_notifications.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_notifications_alert.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_notifications_alert.xml new file mode 100644 index 000000000000..e022c63fdf06 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_notifications_alert.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml new file mode 100644 index 000000000000..0b05404febbc --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_phone_info.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_phone_info.xml new file mode 100644 index 000000000000..54336d0ca1ff --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_phone_info.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_photo_library.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_photo_library.xml new file mode 100644 index 000000000000..9d4a2fb50135 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_photo_library.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_restore.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_restore.xml new file mode 100644 index 000000000000..c41ec1854c98 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_restore.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_search_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_search_24dp.xml new file mode 100644 index 000000000000..f2fd115e718c --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_search_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_accent.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_accent.xml new file mode 100644 index 000000000000..0f0f737b7e50 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_accent.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_accessibility.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_accessibility.xml new file mode 100644 index 000000000000..4a4baf9121bb --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_accessibility.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_accounts.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_accounts.xml new file mode 100644 index 000000000000..334b2b7bde48 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_accounts.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_backup.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_backup.xml new file mode 100644 index 000000000000..1c8b9d221ca8 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_backup.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_battery_white.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_battery_white.xml new file mode 100644 index 000000000000..fff56cede23f --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_battery_white.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_data_usage.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_data_usage.xml new file mode 100644 index 000000000000..939e832b161c --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_data_usage.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_date_time.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_date_time.xml new file mode 100644 index 000000000000..415553838439 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_date_time.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_delete.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_delete.xml new file mode 100644 index 000000000000..da00c9252cbd --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_delete.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_disable.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_disable.xml new file mode 100644 index 000000000000..b09566acd0de --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_disable.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_display_white.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_display_white.xml new file mode 100644 index 000000000000..723c36c669ea --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_display_white.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_enable.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_enable.xml new file mode 100644 index 000000000000..b6d2790c9b28 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_enable.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_force_stop.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_force_stop.xml new file mode 100644 index 000000000000..f3dd2a1046d8 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_force_stop.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_gestures.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_gestures.xml new file mode 100644 index 000000000000..f992127b8b05 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_gestures.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_home.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_home.xml new file mode 100644 index 000000000000..162e4dce706b --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_home.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_language.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_language.xml new file mode 100644 index 000000000000..dac32440a01f --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_language.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_location.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_location.xml new file mode 100644 index 000000000000..9230e3eb8a08 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_location.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_multiuser.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_multiuser.xml new file mode 100644 index 000000000000..b72e31d6d819 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_multiuser.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_night_display.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_night_display.xml new file mode 100644 index 000000000000..35ce30bac8cf --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_night_display.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_open.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_open.xml new file mode 100644 index 000000000000..7bec0aa2ca71 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_open.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_print.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_print.xml new file mode 100644 index 000000000000..f2631fb65b5d --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_print.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_privacy.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_privacy.xml new file mode 100644 index 000000000000..4392c121c4ff --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_privacy.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_security_white.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_security_white.xml new file mode 100644 index 000000000000..baa6a0a11700 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_security_white.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_sim.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_sim.xml new file mode 100644 index 000000000000..78426a5400f3 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_sim.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml new file mode 100644 index 000000000000..54aa6ce5c9ca --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_wireless.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_wireless.xml new file mode 100644 index 000000000000..c40f314e8c78 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_wireless.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_storage.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_storage.xml new file mode 100644 index 000000000000..1810a3114c4e --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_storage.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_storage_white.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_storage_white.xml new file mode 100644 index 000000000000..2ae828d8be55 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_storage_white.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_suggestion_night_display.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_suggestion_night_display.xml new file mode 100644 index 000000000000..35ce30bac8cf --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_suggestion_night_display.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_sync.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_sync.xml new file mode 100644 index 000000000000..2f5173a0b722 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_sync.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml new file mode 100644 index 000000000000..c177dfa418dd --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_system_update.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_system_update.xml new file mode 100644 index 000000000000..be6b70d6b207 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_system_update.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml new file mode 100644 index 000000000000..92f98dd258c5 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml new file mode 100644 index 000000000000..021d6f11f345 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_volume_up_24dp.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_volume_up_24dp.xml new file mode 100644 index 000000000000..4fc2489d6541 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_volume_up_24dp.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_vpn_key.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_vpn_key.xml new file mode 100644 index 000000000000..6efc8b719996 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_vpn_key.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_wifi_tethering.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_wifi_tethering.xml new file mode 100644 index 000000000000..28511b29dda0 --- /dev/null +++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_wifi_tethering.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/Android.bp b/packages/overlays/IconPackSamSystemUIOverlay/Android.bp new file mode 100644 index 000000000000..96ba7a096e6a --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright (C) 2020, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackSamSystemUIOverlay", + theme: "IconPackSamSystemUI", + product_specific: true, +} diff --git a/packages/overlays/IconPackSamSystemUIOverlay/AndroidManifest.xml b/packages/overlays/IconPackSamSystemUIOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..a71e96313f1a --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_lock.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_lock.xml new file mode 100644 index 000000000000..8d9d015262ed --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_lock.xml @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_scanning.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_scanning.xml new file mode 100644 index 000000000000..27564a084ded --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_scanning.xml @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_to_error.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_to_error.xml new file mode 100644 index 000000000000..e3c48aa40150 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_to_error.xml @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_unlock.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_unlock.xml new file mode 100644 index 000000000000..9b97c0497b21 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_unlock.xml @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_alarm.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_alarm.xml new file mode 100644 index 000000000000..3844e419d144 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_alarm.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_alarm_dim.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_alarm_dim.xml new file mode 100644 index 000000000000..3844e419d144 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_alarm_dim.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_arrow_back.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_arrow_back.xml new file mode 100644 index 000000000000..3ba71a0901a2 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_arrow_back.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml new file mode 100644 index 000000000000..9a581a1be7c9 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_brightness_thumb.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_brightness_thumb.xml new file mode 100644 index 000000000000..681fd3aeb110 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_brightness_thumb.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_camera.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_camera.xml new file mode 100644 index 000000000000..e6bb740c8841 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_camera.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_cast.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_cast.xml new file mode 100644 index 000000000000..bf4145e2f777 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_cast.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_cast_connected.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_cast_connected.xml new file mode 100644 index 000000000000..c33bccbbfc32 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_cast_connected.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_close_white.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_close_white.xml new file mode 100644 index 000000000000..731234fc791f --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_close_white.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_data_saver.xml new file mode 100644 index 000000000000..f3ebc969d51b --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_data_saver.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_data_saver_off.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_data_saver_off.xml new file mode 100644 index 000000000000..66beba7076ea --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_data_saver_off.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_drag_handle.xml new file mode 100644 index 000000000000..56624225b33c --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_drag_handle.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_headset.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_headset.xml new file mode 100644 index 000000000000..aa773c44def6 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_headset.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_headset_mic.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_headset_mic.xml new file mode 100644 index 000000000000..4ac9b7c5213c --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_headset_mic.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_hotspot.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_hotspot.xml new file mode 100644 index 000000000000..15e16e86d57e --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_hotspot.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_info.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_info.xml new file mode 100644 index 000000000000..437afcce6add --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_info.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_info_outline.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_info_outline.xml new file mode 100644 index 000000000000..437afcce6add --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_info_outline.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_invert_colors.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_invert_colors.xml new file mode 100644 index 000000000000..afa3b9e6b2c5 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_invert_colors.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_location.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_location.xml new file mode 100644 index 000000000000..206d92c41d2d --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_location.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml new file mode 100644 index 000000000000..fc4cde52c7fc --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_notifications_alert.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_notifications_alert.xml new file mode 100644 index 000000000000..e022c63fdf06 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_notifications_alert.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_notifications_silence.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_notifications_silence.xml new file mode 100644 index 000000000000..dd1520a1e8ed --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_notifications_silence.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_power_low.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_power_low.xml new file mode 100644 index 000000000000..448a5015fe15 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_power_low.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_power_saver.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_power_saver.xml new file mode 100644 index 000000000000..df2929a746cb --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_power_saver.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml new file mode 100644 index 000000000000..849cb1ffc421 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_cancel.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_cancel.xml new file mode 100644 index 000000000000..966faf1da5c9 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_cancel.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_no_sim.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_no_sim.xml new file mode 100644 index 000000000000..66faa46c2e3a --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_no_sim.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml new file mode 100644 index 000000000000..0e545a685035 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml new file mode 100644 index 000000000000..8c9ef821ae86 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml new file mode 100644 index 000000000000..e6af31126d16 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml new file mode 100644 index 000000000000..e6af31126d16 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml new file mode 100644 index 000000000000..5b47734a202b --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml new file mode 100644 index 000000000000..99a7f6507372 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_screenrecord.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_screenrecord.xml new file mode 100644 index 000000000000..1a7c63c08894 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_screenrecord.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_screenshot.xml new file mode 100644 index 000000000000..b5d4555a22f9 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_screenshot.xml @@ -0,0 +1,30 @@ + + + + + + diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_screenshot_delete.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_screenshot_delete.xml new file mode 100644 index 000000000000..da00c9252cbd --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_screenshot_delete.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_settings.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_settings.xml new file mode 100644 index 000000000000..46e33ef74578 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_settings.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_swap_vert.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_swap_vert.xml new file mode 100644 index 000000000000..c3b3b98985e0 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_swap_vert.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml new file mode 100644 index 000000000000..7b719284fb0d --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml new file mode 100644 index 000000000000..7d9cf7f3ddaf --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml new file mode 100644 index 000000000000..929e1cce00c7 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml new file mode 100644 index 000000000000..da993a558c3e --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml new file mode 100644 index 000000000000..56227a8f9ed2 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_media.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_media.xml new file mode 100644 index 000000000000..1fac6854486e --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_media.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_media_mute.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_media_mute.xml new file mode 100644 index 000000000000..b61a355570f4 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_media_mute.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml new file mode 100644 index 000000000000..f5e3646b8e86 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml new file mode 100644 index 000000000000..90989e8dc7df --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_ringer.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_ringer.xml new file mode 100644 index 000000000000..86e1fb2d8a81 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_ringer.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml new file mode 100644 index 000000000000..a6e5300ba51e --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml new file mode 100644 index 000000000000..bc93145b0233 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_voice.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_voice.xml new file mode 100644 index 000000000000..de94ed0065b7 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_voice.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml new file mode 100644 index 000000000000..9bcf4be6cb61 --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/stat_sys_mic_none.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/stat_sys_mic_none.xml new file mode 100644 index 000000000000..cfffd0cf7b4b --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/stat_sys_mic_none.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml new file mode 100644 index 000000000000..2fe08416fe3e --- /dev/null +++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamThemePickerOverlay/Android.bp b/packages/overlays/IconPackSamThemePickerOverlay/Android.bp new file mode 100644 index 000000000000..7376f03a2c7f --- /dev/null +++ b/packages/overlays/IconPackSamThemePickerOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackSamThemePickerOverlay", + theme: "IconPackSamThemePicker", + product_specific: true, +} diff --git a/packages/overlays/IconPackSamThemePickerOverlay/AndroidManifest.xml b/packages/overlays/IconPackSamThemePickerOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..67446b2014c5 --- /dev/null +++ b/packages/overlays/IconPackSamThemePickerOverlay/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_add_24px.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_add_24px.xml new file mode 100644 index 000000000000..5c5463a21450 --- /dev/null +++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_add_24px.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_close_24px.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_close_24px.xml new file mode 100644 index 000000000000..731234fc791f --- /dev/null +++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_close_24px.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_colorize_24px.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_colorize_24px.xml new file mode 100644 index 000000000000..f9b61639a6c0 --- /dev/null +++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_colorize_24px.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_font.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_font.xml new file mode 100644 index 000000000000..46f22023be3b --- /dev/null +++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_font.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_clock.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_clock.xml new file mode 100644 index 000000000000..770b167dd95c --- /dev/null +++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_clock.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_grid.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_grid.xml new file mode 100644 index 000000000000..5d35c6ca1320 --- /dev/null +++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_grid.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_theme.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_theme.xml new file mode 100644 index 000000000000..c4eebb2f0406 --- /dev/null +++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_theme.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml new file mode 100644 index 000000000000..2c839936feac --- /dev/null +++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml @@ -0,0 +1,23 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_shapes_24px.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_shapes_24px.xml new file mode 100644 index 000000000000..c50144d5f775 --- /dev/null +++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_shapes_24px.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_tune.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_tune.xml new file mode 100644 index 000000000000..5a4cce12eef5 --- /dev/null +++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_tune.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_wifi_24px.xml b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_wifi_24px.xml new file mode 100644 index 000000000000..5e57cd3b210b --- /dev/null +++ b/packages/overlays/IconPackSamThemePickerOverlay/res/drawable/ic_wifi_24px.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/Android.bp b/packages/overlays/IconPackVictorAndroidOverlay/Android.bp new file mode 100644 index 000000000000..ee7377863287 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright (C) 2020, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackVictorAndroidOverlay", + theme: "IconPackVictorAndroid", + product_specific: true, +} diff --git a/packages/overlays/IconPackVictorAndroidOverlay/AndroidManifest.xml b/packages/overlays/IconPackVictorAndroidOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..e940ed8fb837 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_audio_alarm.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_audio_alarm.xml new file mode 100644 index 000000000000..46be78160af7 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_audio_alarm.xml @@ -0,0 +1,34 @@ + + + + + + + diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml new file mode 100644 index 000000000000..47693a4c37ea --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_audio_alarm_mute.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_battery_80_24dp.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_battery_80_24dp.xml new file mode 100644 index 000000000000..82a3f56151e6 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_battery_80_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml new file mode 100644 index 000000000000..2312d9456ce6 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bluetooth_share_icon.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml new file mode 100644 index 000000000000..035455df11bb --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml new file mode 100644 index 000000000000..ead797365e69 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_headphones_a2dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml new file mode 100644 index 000000000000..7e29ed8734f4 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml new file mode 100644 index 000000000000..686a1472a3f8 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_laptop.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_laptop.xml new file mode 100644 index 000000000000..76e18e12018e --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_laptop.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_misc_hid.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_misc_hid.xml new file mode 100644 index 000000000000..c44c4ced91ba --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_misc_hid.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_network_pan.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_network_pan.xml new file mode 100644 index 000000000000..f90366c09367 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_network_pan.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml new file mode 100644 index 000000000000..2c301ba62c26 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_corp_badge.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_corp_badge.xml new file mode 100644 index 000000000000..ca8ce2880ec8 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_corp_badge.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_expand_more.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_expand_more.xml new file mode 100644 index 000000000000..eccf03d851ca --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_expand_more.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_faster_emergency.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_faster_emergency.xml new file mode 100644 index 000000000000..1aaa9aa33ae8 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_faster_emergency.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_file_copy.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_file_copy.xml new file mode 100644 index 000000000000..3f92b7b6dfe1 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_file_copy.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml new file mode 100644 index 000000000000..235e67f31974 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock.xml new file mode 100644 index 000000000000..642443684bfe --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock_bugreport.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock_bugreport.xml new file mode 100644 index 000000000000..91ff7fd6fb40 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock_bugreport.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock_open.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock_open.xml new file mode 100644 index 000000000000..c26b8ba67c8a --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock_open.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock_power_off.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock_power_off.xml new file mode 100644 index 000000000000..6b26697f073a --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lock_power_off.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lockscreen_ime.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lockscreen_ime.xml new file mode 100644 index 000000000000..9c31c23bdc4d --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_lockscreen_ime.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_mode_edit.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_mode_edit.xml new file mode 100644 index 000000000000..fbc5271c9ae0 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_mode_edit.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_notifications_alerted.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_notifications_alerted.xml new file mode 100644 index 000000000000..1e25d27f0eb3 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_notifications_alerted.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_phone.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_phone.xml new file mode 100644 index 000000000000..6cdcbf00ba1e --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_phone.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_airplane.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_airplane.xml new file mode 100644 index 000000000000..485ab868de4b --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_airplane.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml new file mode 100644 index 000000000000..89d88b802c01 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_auto_rotate.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_battery_saver.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_battery_saver.xml new file mode 100644 index 000000000000..8f7222630110 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_battery_saver.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_bluetooth.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_bluetooth.xml new file mode 100644 index 000000000000..2f4c0b145341 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_bluetooth.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_dnd.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_dnd.xml new file mode 100644 index 000000000000..ef71006b7502 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_dnd.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_flashlight.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_flashlight.xml new file mode 100644 index 000000000000..c5a7166fbd82 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_flashlight.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_night_display_on.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_night_display_on.xml new file mode 100644 index 000000000000..de342b29d080 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_night_display_on.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml new file mode 100644 index 000000000000..5b81e9f3bc4f --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_ui_mode_night.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_restart.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_restart.xml new file mode 100644 index 000000000000..362eff64b713 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_restart.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_rules.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_rules.xml new file mode 100644 index 000000000000..11328db0198f --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_rules.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_screenshot.xml new file mode 100644 index 000000000000..cbd22c6bfeed --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_screenshot.xml @@ -0,0 +1,30 @@ + + + + + + diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_settings_bluetooth.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_settings_bluetooth.xml new file mode 100644 index 000000000000..2f4c0b145341 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_settings_bluetooth.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml new file mode 100644 index 000000000000..bb8995e28a5c --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml new file mode 100644 index 000000000000..a412c56cf1ff --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml new file mode 100644 index 000000000000..e581b528eccb --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml new file mode 100644 index 000000000000..38672ec00654 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml new file mode 100644 index 000000000000..4a00c3cd002d --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_location.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_location.xml new file mode 100644 index 000000000000..7975db696d2d --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_location.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml new file mode 100644 index 000000000000..b988fdf67191 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_0.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_0.xml new file mode 100644 index 000000000000..3f5f7cd6e9fe --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_0.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_1.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_1.xml new file mode 100644 index 000000000000..ed3fe3e9cced --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_1.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_2.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_2.xml new file mode 100644 index 000000000000..083473eb321a --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_2.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_3.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_3.xml new file mode 100644 index 000000000000..fa365a92a195 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_3.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_4.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_4.xml new file mode 100644 index 000000000000..7b153e3fe5f4 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_wifi_signal_4.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_work_apps_off.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_work_apps_off.xml new file mode 100644 index 000000000000..22540e2dee15 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_work_apps_off.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_activity_recognition.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_activity_recognition.xml new file mode 100644 index 000000000000..68a46a645466 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_activity_recognition.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_aural.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_aural.xml new file mode 100644 index 000000000000..320498ae613f --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_aural.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_calendar.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_calendar.xml new file mode 100644 index 000000000000..64b7457d1b2e --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_calendar.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_call_log.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_call_log.xml new file mode 100644 index 000000000000..6d368dbc3c4a --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_call_log.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_camera.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_camera.xml new file mode 100644 index 000000000000..001c13731474 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_camera.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_contacts.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_contacts.xml new file mode 100644 index 000000000000..189b9df81743 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_contacts.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_location.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_location.xml new file mode 100644 index 000000000000..9114d777b43d --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_location.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_microphone.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_microphone.xml new file mode 100644 index 000000000000..f80b1bee7da1 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_microphone.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_phone_calls.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_phone_calls.xml new file mode 100644 index 000000000000..41acbc4585ca --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_phone_calls.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_sensors.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_sensors.xml new file mode 100644 index 000000000000..94bf7ad3ae44 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_sensors.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_sms.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_sms.xml new file mode 100644 index 000000000000..64212577514e --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_sms.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_storage.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_storage.xml new file mode 100644 index 000000000000..56516a36591a --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_storage.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_visual.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_visual.xml new file mode 100644 index 000000000000..7b5275348f34 --- /dev/null +++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/perm_group_visual.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorLauncherOverlay/Android.bp b/packages/overlays/IconPackVictorLauncherOverlay/Android.bp new file mode 100644 index 000000000000..a0cd45a81e20 --- /dev/null +++ b/packages/overlays/IconPackVictorLauncherOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackVictorLauncherOverlay", + theme: "IconPackVictorLauncher", + product_specific: true, +} diff --git a/packages/overlays/IconPackVictorLauncherOverlay/AndroidManifest.xml b/packages/overlays/IconPackVictorLauncherOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..a7122eb87707 --- /dev/null +++ b/packages/overlays/IconPackVictorLauncherOverlay/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_corp.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_corp.xml new file mode 100644 index 000000000000..6e7931bc8bb9 --- /dev/null +++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_corp.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_drag_handle.xml new file mode 100644 index 000000000000..59dcfd7bee29 --- /dev/null +++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_drag_handle.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_hourglass_top.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_hourglass_top.xml new file mode 100644 index 000000000000..fa065a3d03c1 --- /dev/null +++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_hourglass_top.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_info_no_shadow.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_info_no_shadow.xml new file mode 100644 index 000000000000..8743a90c5de5 --- /dev/null +++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_info_no_shadow.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_install_no_shadow.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_install_no_shadow.xml new file mode 100644 index 000000000000..0bc6dc20b665 --- /dev/null +++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_install_no_shadow.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_palette.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_palette.xml new file mode 100644 index 000000000000..82eab08e6739 --- /dev/null +++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_palette.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_pin.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_pin.xml new file mode 100644 index 000000000000..8831e8836ebf --- /dev/null +++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_pin.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_screenshot.xml new file mode 100644 index 000000000000..cbd22c6bfeed --- /dev/null +++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_screenshot.xml @@ -0,0 +1,30 @@ + + + + + + diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_select.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_select.xml new file mode 100644 index 000000000000..05597dd66107 --- /dev/null +++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_select.xml @@ -0,0 +1,24 @@ + + + + diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_setting.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_setting.xml new file mode 100644 index 000000000000..ff32a6e6cf4e --- /dev/null +++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_setting.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_share.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_share.xml new file mode 100644 index 000000000000..a30c09a03102 --- /dev/null +++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_share.xml @@ -0,0 +1,40 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_smartspace_preferences.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_smartspace_preferences.xml new file mode 100644 index 000000000000..66e89c46937e --- /dev/null +++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_smartspace_preferences.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_split_screen.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_split_screen.xml new file mode 100644 index 000000000000..bf92a39fd5b2 --- /dev/null +++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_split_screen.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml new file mode 100644 index 000000000000..e00105947dfa --- /dev/null +++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_uninstall_no_shadow.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_warning.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_warning.xml new file mode 100644 index 000000000000..26909cd0a2b1 --- /dev/null +++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_warning.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_widget.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_widget.xml new file mode 100644 index 000000000000..29214883f8df --- /dev/null +++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_widget.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/Android.bp b/packages/overlays/IconPackVictorSettingsOverlay/Android.bp new file mode 100644 index 000000000000..7807c6bcccc8 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackVictorSettingsOverlay", + theme: "IconPackVictorSettings", + product_specific: true, +} diff --git a/packages/overlays/IconPackVictorSettingsOverlay/AndroidManifest.xml b/packages/overlays/IconPackVictorSettingsOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..e2336d5244ae --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/drag_handle.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/drag_handle.xml new file mode 100644 index 000000000000..955a7c6b7db7 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/drag_handle.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_accessibility_generic.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_accessibility_generic.xml new file mode 100644 index 000000000000..7f80c7d18df8 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_accessibility_generic.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_add_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_add_24dp.xml new file mode 100644 index 000000000000..1b4838236c7c --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_add_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_airplanemode_active.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_airplanemode_active.xml new file mode 100644 index 000000000000..2efbb065c27d --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_airplanemode_active.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_android.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_android.xml new file mode 100644 index 000000000000..1430d0c6eae1 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_android.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_apps.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_apps.xml new file mode 100644 index 000000000000..d62b777592b7 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_apps.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_arrow_back.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_arrow_back.xml new file mode 100644 index 000000000000..ee70746857fc --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_arrow_back.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml new file mode 100644 index 000000000000..eccf03d851ca --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_arrow_down_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_battery_charging_full.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_battery_charging_full.xml new file mode 100644 index 000000000000..f313ee02bd85 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_battery_charging_full.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml new file mode 100644 index 000000000000..5c54383c7955 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_battery_status_good_24dp.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml new file mode 100644 index 000000000000..1e43dc5f911e --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_battery_status_maybe_24dp.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_call_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_call_24dp.xml new file mode 100644 index 000000000000..bd85e5cca5ab --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_call_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_cancel.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_cancel.xml new file mode 100644 index 000000000000..afc3de7920dd --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_cancel.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_cast_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_cast_24dp.xml new file mode 100644 index 000000000000..5f29bc60f859 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_cast_24dp.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_cellular_off.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_cellular_off.xml new file mode 100644 index 000000000000..0f0e2be67310 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_cellular_off.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml new file mode 100644 index 000000000000..ae785801f057 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml new file mode 100644 index 000000000000..3f92b7b6dfe1 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_data_saver.xml new file mode 100644 index 000000000000..02de755b1abb --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_data_saver.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_delete.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_delete.xml new file mode 100644 index 000000000000..5d4acbd017e1 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_delete.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_devices_other.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_devices_other.xml new file mode 100644 index 000000000000..71fb7a3d5096 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_devices_other.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml new file mode 100644 index 000000000000..3a6836b2c03c --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_eject_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_eject_24dp.xml new file mode 100644 index 000000000000..96f456ff620a --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_eject_24dp.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_expand_less.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_expand_less.xml new file mode 100644 index 000000000000..0582b15a974c --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_expand_less.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_expand_more_inverse.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_expand_more_inverse.xml new file mode 100644 index 000000000000..f65131d257b8 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_expand_more_inverse.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_find_in_page_24px.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_find_in_page_24px.xml new file mode 100644 index 000000000000..f016628acfdd --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_find_in_page_24px.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml new file mode 100644 index 000000000000..56516a36591a --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_folder_vd_theme_24.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_friction_lock_closed.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_friction_lock_closed.xml new file mode 100644 index 000000000000..204c3b219701 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_friction_lock_closed.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml new file mode 100644 index 000000000000..d87595afb484 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_gray_scale_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_headset_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_headset_24dp.xml new file mode 100644 index 000000000000..ead797365e69 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_headset_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_help.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_help.xml new file mode 100644 index 000000000000..32c603dc7a26 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_help.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_help_actionbar.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_help_actionbar.xml new file mode 100644 index 000000000000..36e8a72f7719 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_help_actionbar.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_homepage_search.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_homepage_search.xml new file mode 100644 index 000000000000..0f057916cee7 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_homepage_search.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_info_outline_24.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_info_outline_24.xml new file mode 100644 index 000000000000..13e8c3676808 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_info_outline_24.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_local_movies.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_local_movies.xml new file mode 100644 index 000000000000..c62a36af6b86 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_local_movies.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml new file mode 100644 index 000000000000..41acbc4585ca --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_local_phone_24_lib.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_media_stream.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_media_stream.xml new file mode 100644 index 000000000000..80959446b432 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_media_stream.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_media_stream_off.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_media_stream_off.xml new file mode 100644 index 000000000000..c27e7db103d7 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_media_stream_off.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_network_cell.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_network_cell.xml new file mode 100644 index 000000000000..50361ebfa7f7 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_network_cell.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_notifications.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_notifications.xml new file mode 100644 index 000000000000..21abb2ea22b5 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_notifications.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_notifications_alert.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_notifications_alert.xml new file mode 100644 index 000000000000..1e25d27f0eb3 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_notifications_alert.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml new file mode 100644 index 000000000000..e868f65d404f --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_notifications_off_24dp.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_phone_info.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_phone_info.xml new file mode 100644 index 000000000000..1307f38494f3 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_phone_info.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_photo_library.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_photo_library.xml new file mode 100644 index 000000000000..7b5275348f34 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_photo_library.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_restore.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_restore.xml new file mode 100644 index 000000000000..c41ec1854c98 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_restore.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_search_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_search_24dp.xml new file mode 100644 index 000000000000..2c64287c0ec3 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_search_24dp.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_accent.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_accent.xml new file mode 100644 index 000000000000..0a6b9c668f00 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_accent.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_accessibility.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_accessibility.xml new file mode 100644 index 000000000000..5983b89e4dc8 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_accessibility.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_accounts.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_accounts.xml new file mode 100644 index 000000000000..3a997b085d40 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_accounts.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_backup.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_backup.xml new file mode 100644 index 000000000000..bd4666251210 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_backup.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_battery_white.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_battery_white.xml new file mode 100644 index 000000000000..ca9bfc9ad8da --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_battery_white.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_data_usage.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_data_usage.xml new file mode 100644 index 000000000000..3f4449b93950 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_data_usage.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_date_time.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_date_time.xml new file mode 100644 index 000000000000..6033d216792c --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_date_time.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_delete.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_delete.xml new file mode 100644 index 000000000000..f6d62536d755 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_delete.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_disable.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_disable.xml new file mode 100644 index 000000000000..2a0c77e9af77 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_disable.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_display_white.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_display_white.xml new file mode 100644 index 000000000000..adf1c82b729d --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_display_white.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_enable.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_enable.xml new file mode 100644 index 000000000000..42cf839b0ad9 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_enable.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_force_stop.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_force_stop.xml new file mode 100644 index 000000000000..ad873c2b8be1 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_force_stop.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_gestures.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_gestures.xml new file mode 100644 index 000000000000..45a3b24f729d --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_gestures.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_home.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_home.xml new file mode 100644 index 000000000000..6327002c4e27 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_home.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_language.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_language.xml new file mode 100644 index 000000000000..c5e8893b0b09 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_language.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_location.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_location.xml new file mode 100644 index 000000000000..90ad165e8fda --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_location.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_multiuser.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_multiuser.xml new file mode 100644 index 000000000000..9416b5f26eaf --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_multiuser.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_night_display.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_night_display.xml new file mode 100644 index 000000000000..92cc05ee293e --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_night_display.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_open.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_open.xml new file mode 100644 index 000000000000..e4a8061e875d --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_open.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_print.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_print.xml new file mode 100644 index 000000000000..4d7fa2066c44 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_print.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_privacy.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_privacy.xml new file mode 100644 index 000000000000..f499227f9d80 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_privacy.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_security_white.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_security_white.xml new file mode 100644 index 000000000000..49d31f73317b --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_security_white.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_sim.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_sim.xml new file mode 100644 index 000000000000..85dea6633612 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_sim.xml @@ -0,0 +1,24 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml new file mode 100644 index 000000000000..b668eb20c28a --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_system_dashboard_white.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_wireless.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_wireless.xml new file mode 100644 index 000000000000..9223902d5a23 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_wireless.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_storage.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_storage.xml new file mode 100644 index 000000000000..c91221b1d1bf --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_storage.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_storage_white.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_storage_white.xml new file mode 100644 index 000000000000..22f6092a35ed --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_storage_white.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_suggestion_night_display.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_suggestion_night_display.xml new file mode 100644 index 000000000000..92cc05ee293e --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_suggestion_night_display.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_sync.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_sync.xml new file mode 100644 index 000000000000..d2aadc956063 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_sync.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml new file mode 100644 index 000000000000..3a83b592c8d1 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_sync_problem_24dp.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_system_update.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_system_update.xml new file mode 100644 index 000000000000..f8b490db72ac --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_system_update.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml new file mode 100644 index 000000000000..928dc5d4a8b2 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_videogame_vd_theme_24.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml new file mode 100644 index 000000000000..6d04ffb75c65 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_volume_ringer_vibrate.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_volume_up_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_volume_up_24dp.xml new file mode 100644 index 000000000000..964f66897822 --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_volume_up_24dp.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_vpn_key.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_vpn_key.xml new file mode 100644 index 000000000000..47080e22f8ed --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_vpn_key.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_wifi_tethering.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_wifi_tethering.xml new file mode 100644 index 000000000000..f2ab3be234db --- /dev/null +++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_wifi_tethering.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/Android.bp b/packages/overlays/IconPackVictorSystemUIOverlay/Android.bp new file mode 100644 index 000000000000..2deb6cd73ba1 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright (C) 2020, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackVictorSystemUIOverlay", + theme: "IconPackVictorSystemUI", + product_specific: true, +} diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/AndroidManifest.xml b/packages/overlays/IconPackVictorSystemUIOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..ca812b17c317 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_lock.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_lock.xml new file mode 100644 index 000000000000..2c2239fbeff0 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_lock.xml @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_scanning.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_scanning.xml new file mode 100644 index 000000000000..64a9f8c57845 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_scanning.xml @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_to_error.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_to_error.xml new file mode 100644 index 000000000000..76b1e2d26112 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_to_error.xml @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_unlock.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_unlock.xml new file mode 100644 index 000000000000..2d0e4bdaa017 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_unlock.xml @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_alarm.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_alarm.xml new file mode 100644 index 000000000000..13e6b5ef1133 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_alarm.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_alarm_dim.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_alarm_dim.xml new file mode 100644 index 000000000000..13e6b5ef1133 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_alarm_dim.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_arrow_back.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_arrow_back.xml new file mode 100644 index 000000000000..ee70746857fc --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_arrow_back.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml new file mode 100644 index 000000000000..830a6a200f49 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_bluetooth_connected.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_brightness_thumb.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_brightness_thumb.xml new file mode 100644 index 000000000000..4121433c4e95 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_brightness_thumb.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_camera.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_camera.xml new file mode 100644 index 000000000000..1933dc64f276 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_camera.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_cast.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_cast.xml new file mode 100644 index 000000000000..1cf8f26232da --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_cast.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_cast_connected.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_cast_connected.xml new file mode 100644 index 000000000000..3625af5173bf --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_cast_connected.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_close_white.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_close_white.xml new file mode 100644 index 000000000000..9f2a4c037a96 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_close_white.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_data_saver.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_data_saver.xml new file mode 100644 index 000000000000..85dfdb7cd2ee --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_data_saver.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_data_saver_off.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_data_saver_off.xml new file mode 100644 index 000000000000..c915797a0f38 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_data_saver_off.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_drag_handle.xml new file mode 100644 index 000000000000..9b216bd29dd8 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_drag_handle.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_headset.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_headset.xml new file mode 100644 index 000000000000..7a07d6ecb814 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_headset.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_headset_mic.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_headset_mic.xml new file mode 100644 index 000000000000..e82de09ed493 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_headset_mic.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_hotspot.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_hotspot.xml new file mode 100644 index 000000000000..aaebe8bf6684 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_hotspot.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_info.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_info.xml new file mode 100644 index 000000000000..0594b9abd1bf --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_info.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_info_outline.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_info_outline.xml new file mode 100644 index 000000000000..0594b9abd1bf --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_info_outline.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_invert_colors.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_invert_colors.xml new file mode 100644 index 000000000000..f67b051e8a46 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_invert_colors.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_location.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_location.xml new file mode 100644 index 000000000000..02678bac2f55 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_location.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml new file mode 100644 index 000000000000..ebfc6e3be100 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_lockscreen_ime.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_notifications_alert.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_notifications_alert.xml new file mode 100644 index 000000000000..1e25d27f0eb3 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_notifications_alert.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_notifications_silence.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_notifications_silence.xml new file mode 100644 index 000000000000..3f9d77af3977 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_notifications_silence.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_power_low.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_power_low.xml new file mode 100644 index 000000000000..1e43dc5f911e --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_power_low.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_power_saver.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_power_saver.xml new file mode 100644 index 000000000000..e593394b9528 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_power_saver.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml new file mode 100644 index 000000000000..f90366c09367 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_bluetooth_connecting.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_cancel.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_cancel.xml new file mode 100644 index 000000000000..afc3de7920dd --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_cancel.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_no_sim.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_no_sim.xml new file mode 100644 index 000000000000..77d79cc63aa4 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_no_sim.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml new file mode 100644 index 000000000000..64cd534e06a1 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_0.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml new file mode 100644 index 000000000000..c7b280b3e1dd --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_1.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml new file mode 100644 index 000000000000..798d5bc79f47 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_2.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml new file mode 100644 index 000000000000..e7e2b5cbac87 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_3.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml new file mode 100644 index 000000000000..44d5a3dc1fb6 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_4.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml new file mode 100644 index 000000000000..52fd3e0dff5e --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_qs_wifi_disconnected.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_screenrecord.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_screenrecord.xml new file mode 100644 index 000000000000..653dfe51f474 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_screenrecord.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_screenshot.xml new file mode 100644 index 000000000000..cbd22c6bfeed --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_screenshot.xml @@ -0,0 +1,30 @@ + + + + + + diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_screenshot_delete.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_screenshot_delete.xml new file mode 100644 index 000000000000..f6d62536d755 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_screenshot_delete.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_settings.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_settings.xml new file mode 100644 index 000000000000..57ccecc17e1f --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_settings.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_swap_vert.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_swap_vert.xml new file mode 100644 index 000000000000..3f61cb65bad7 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_swap_vert.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml new file mode 100644 index 000000000000..30cd25e63e7d --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_tune_black_16dp.xml @@ -0,0 +1,23 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml new file mode 100644 index 000000000000..47693a4c37ea --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_alarm_mute.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml new file mode 100644 index 000000000000..e58fc88cb4c9 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_bt_sco.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml new file mode 100644 index 000000000000..5476bb7723c9 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml new file mode 100644 index 000000000000..df1244223d56 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_media.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_media.xml new file mode 100644 index 000000000000..80959446b432 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_media.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_media_mute.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_media_mute.xml new file mode 100644 index 000000000000..c27e7db103d7 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_media_mute.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml new file mode 100644 index 000000000000..57317315d606 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_odi_captions.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml new file mode 100644 index 000000000000..8c4d9058fcc8 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_odi_captions_disabled.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_ringer.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_ringer.xml new file mode 100644 index 000000000000..21abb2ea22b5 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_ringer.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml new file mode 100644 index 000000000000..2f90f80f519c --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_ringer_mute.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml new file mode 100644 index 000000000000..a3ad2df97001 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_ringer_vibrate.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_voice.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_voice.xml new file mode 100644 index 000000000000..41acbc4585ca --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_voice.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml new file mode 100644 index 000000000000..c13b9afdc78d --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/stat_sys_managed_profile_status.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/stat_sys_mic_none.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/stat_sys_mic_none.xml new file mode 100644 index 000000000000..b3f664a66f50 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/stat_sys_mic_none.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml new file mode 100644 index 000000000000..202a433ee698 --- /dev/null +++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/stat_sys_vpn_ic.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/Android.bp b/packages/overlays/IconPackVictorThemePickerOverlay/Android.bp new file mode 100644 index 000000000000..690d0a0ecda3 --- /dev/null +++ b/packages/overlays/IconPackVictorThemePickerOverlay/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright 2019, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +runtime_resource_overlay { + name: "IconPackVictorThemePickerOverlay", + theme: "IconPackVictorThemePicker", + product_specific: true, +} diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/AndroidManifest.xml b/packages/overlays/IconPackVictorThemePickerOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..9635febfd545 --- /dev/null +++ b/packages/overlays/IconPackVictorThemePickerOverlay/AndroidManifest.xml @@ -0,0 +1,22 @@ + + + + + diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_add_24px.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_add_24px.xml new file mode 100644 index 000000000000..f57b3c883f96 --- /dev/null +++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_add_24px.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_close_24px.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_close_24px.xml new file mode 100644 index 000000000000..9f2a4c037a96 --- /dev/null +++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_close_24px.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_colorize_24px.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_colorize_24px.xml new file mode 100644 index 000000000000..67db8c96fc2c --- /dev/null +++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_colorize_24px.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_font.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_font.xml new file mode 100644 index 000000000000..8ae51b8b2124 --- /dev/null +++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_font.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_clock.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_clock.xml new file mode 100644 index 000000000000..3ce0d62c834c --- /dev/null +++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_clock.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_grid.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_grid.xml new file mode 100644 index 000000000000..41721f04f06e --- /dev/null +++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_grid.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_theme.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_theme.xml new file mode 100644 index 000000000000..17228cef6b14 --- /dev/null +++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_theme.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml new file mode 100644 index 000000000000..e5fbf29bc34e --- /dev/null +++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_nav_wallpaper.xml @@ -0,0 +1,23 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_shapes_24px.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_shapes_24px.xml new file mode 100644 index 000000000000..00b2c7e0aa2e --- /dev/null +++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_shapes_24px.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_tune.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_tune.xml new file mode 100644 index 000000000000..f66089067da7 --- /dev/null +++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_tune.xml @@ -0,0 +1,23 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_wifi_24px.xml b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_wifi_24px.xml new file mode 100644 index 000000000000..9aa5224028a2 --- /dev/null +++ b/packages/overlays/IconPackVictorThemePickerOverlay/res/drawable/ic_wifi_24px.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/packages/overlays/IconShapeCloudyOverlay/Android.bp b/packages/overlays/IconShapeCloudyOverlay/Android.bp new file mode 100644 index 000000000000..1638e7bf7084 --- /dev/null +++ b/packages/overlays/IconShapeCloudyOverlay/Android.bp @@ -0,0 +1,21 @@ +// +// Copyright (C) 2020, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +runtime_resource_overlay { + name: "IconShapeCloudyOverlay", + theme: "IconShapeCloudy", + product_specific: true, +} diff --git a/packages/overlays/IconShapeCloudyOverlay/AndroidManifest.xml b/packages/overlays/IconShapeCloudyOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..859c7f0a4c8b --- /dev/null +++ b/packages/overlays/IconShapeCloudyOverlay/AndroidManifest.xml @@ -0,0 +1,27 @@ + + + + + + diff --git a/packages/overlays/IconShapeCloudyOverlay/res/values/config.xml b/packages/overlays/IconShapeCloudyOverlay/res/values/config.xml new file mode 100644 index 000000000000..b412ab31551a --- /dev/null +++ b/packages/overlays/IconShapeCloudyOverlay/res/values/config.xml @@ -0,0 +1,31 @@ + + + + + "M4,50 C2,45 0,39 0,33 C0,15 15,0 33,0 C39,0 45,2 50,4 C55,2 61,0 67,0 C85,0 100,15 100,33 C100,39 98,45 96,50 C98,55 100,61 100,66 C100,85 85,100 66,100 C61,100 55,98 50,96 C45,98 39,100 33,100 C15,100 0,85 0,66 C0,61 2,55 3,50 Z" + + false + + 12dp + + 20dp + + 12dp + + diff --git a/packages/overlays/IconShapeCloudyOverlay/res/values/strings.xml b/packages/overlays/IconShapeCloudyOverlay/res/values/strings.xml new file mode 100644 index 000000000000..62be2f50cef1 --- /dev/null +++ b/packages/overlays/IconShapeCloudyOverlay/res/values/strings.xml @@ -0,0 +1,23 @@ + + + + + Cloudy + + diff --git a/packages/overlays/IconShapeCylinderOverlay/Android.mk b/packages/overlays/IconShapeCylinderOverlay/Android.mk new file mode 100644 index 000000000000..4ecfa49b309a --- /dev/null +++ b/packages/overlays/IconShapeCylinderOverlay/Android.mk @@ -0,0 +1,29 @@ +# +# Copyright 2018, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := IconShapeCylinder + +LOCAL_PRODUCT_MODULE := true + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := IconShapeCylinderOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/IconShapeCylinderOverlay/AndroidManifest.xml b/packages/overlays/IconShapeCylinderOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..8ae5449dc710 --- /dev/null +++ b/packages/overlays/IconShapeCylinderOverlay/AndroidManifest.xml @@ -0,0 +1,27 @@ + + + + + + diff --git a/packages/overlays/IconShapeCylinderOverlay/res/values/config.xml b/packages/overlays/IconShapeCylinderOverlay/res/values/config.xml new file mode 100644 index 000000000000..eaaa8af17dbd --- /dev/null +++ b/packages/overlays/IconShapeCylinderOverlay/res/values/config.xml @@ -0,0 +1,30 @@ + + + + + "M50,0A50,30 0,0,1 100,30V70A50,30 0,0,1 0,70V30A50,30 0,0,1 50,0z" + + false + + 4dp + + 8dp + + + diff --git a/packages/overlays/IconShapeCylinderOverlay/res/values/strings.xml b/packages/overlays/IconShapeCylinderOverlay/res/values/strings.xml new file mode 100644 index 000000000000..6ad7f8bc2a8b --- /dev/null +++ b/packages/overlays/IconShapeCylinderOverlay/res/values/strings.xml @@ -0,0 +1,23 @@ + + + + + Cylinder + + diff --git a/packages/overlays/IconShapeFlowerOverlay/Android.bp b/packages/overlays/IconShapeFlowerOverlay/Android.bp new file mode 100644 index 000000000000..64176483e1d7 --- /dev/null +++ b/packages/overlays/IconShapeFlowerOverlay/Android.bp @@ -0,0 +1,21 @@ +// +// Copyright 2020, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +runtime_resource_overlay { + name: "IconShapeFlowerOverlay", + theme: "IconShapeFlower", + product_specific: true, +} diff --git a/packages/overlays/IconShapeFlowerOverlay/AndroidManifest.xml b/packages/overlays/IconShapeFlowerOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..9d20c6b6f82c --- /dev/null +++ b/packages/overlays/IconShapeFlowerOverlay/AndroidManifest.xml @@ -0,0 +1,26 @@ + + + + + + diff --git a/packages/overlays/IconShapeFlowerOverlay/res/values/config.xml b/packages/overlays/IconShapeFlowerOverlay/res/values/config.xml new file mode 100644 index 000000000000..db381c3ace06 --- /dev/null +++ b/packages/overlays/IconShapeFlowerOverlay/res/values/config.xml @@ -0,0 +1,28 @@ + + + + + "M50,0 C60.6,0 69.9,5.3 75.6,13.5 78.5,17.8 82.3,21.5 86.6,24.5 94.7,30.1 100,39.4 100,50 100,60.6 94.7,69.9 86.5,75.6 82.2,78.5 78.5,82.3 75.5,86.6 69.9,94.7 60.6,100 50,100 39.4,100 30.1,94.7 24.4,86.5 21.5,82.2 17.7,78.5 13.4,75.5 5.3,69.9 0,60.6 0,50 0,39.4 5.3,30.1 13.5,24.4 17.8,21.5 21.5,17.7 24.5,13.4 30.1,5.3 39.4,0 50,0 Z" + + false + + 12dp + + 24dp + + 24dp + diff --git a/packages/overlays/IconShapeFlowerOverlay/res/values/strings.xml b/packages/overlays/IconShapeFlowerOverlay/res/values/strings.xml new file mode 100644 index 000000000000..47c1479e5a40 --- /dev/null +++ b/packages/overlays/IconShapeFlowerOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + + Flower + + diff --git a/packages/overlays/IconShapeHeartOverlay/Android.mk b/packages/overlays/IconShapeHeartOverlay/Android.mk new file mode 100644 index 000000000000..20fe71feac6f --- /dev/null +++ b/packages/overlays/IconShapeHeartOverlay/Android.mk @@ -0,0 +1,29 @@ +# +# Copyright 2019, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := IconShapeHeart + +LOCAL_PRODUCT_MODULE := true + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := IconShapeHeartOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/IconShapeHeartOverlay/AndroidManifest.xml b/packages/overlays/IconShapeHeartOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..82bff7d53d95 --- /dev/null +++ b/packages/overlays/IconShapeHeartOverlay/AndroidManifest.xml @@ -0,0 +1,28 @@ + + + + + + diff --git a/packages/overlays/IconShapeHeartOverlay/res/values/config.xml b/packages/overlays/IconShapeHeartOverlay/res/values/config.xml new file mode 100644 index 000000000000..f9929f5f1968 --- /dev/null +++ b/packages/overlays/IconShapeHeartOverlay/res/values/config.xml @@ -0,0 +1,30 @@ + + + + + "M50,20 C45,0 30,0 25,0 20,0 0,5 0,34 0,72 40,97 50,100 60,97 100,72 100,34 100,5 80,0 75,0 70,0 55,0 50,20 Z" + + false + + 8dp + + 16dp + + + diff --git a/packages/overlays/IconShapeHeartOverlay/res/values/strings.xml b/packages/overlays/IconShapeHeartOverlay/res/values/strings.xml new file mode 100644 index 000000000000..92c33fa3032c --- /dev/null +++ b/packages/overlays/IconShapeHeartOverlay/res/values/strings.xml @@ -0,0 +1,23 @@ + + + + + Heart + + diff --git a/packages/overlays/IconShapeHexagonOverlay/Android.mk b/packages/overlays/IconShapeHexagonOverlay/Android.mk new file mode 100644 index 000000000000..8c6eb9f888db --- /dev/null +++ b/packages/overlays/IconShapeHexagonOverlay/Android.mk @@ -0,0 +1,29 @@ +# +# Copyright 2018, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := IconShapeHexagon + +LOCAL_PRODUCT_MODULE := true + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := IconShapeHexagonOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/IconShapeHexagonOverlay/AndroidManifest.xml b/packages/overlays/IconShapeHexagonOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..b57331903266 --- /dev/null +++ b/packages/overlays/IconShapeHexagonOverlay/AndroidManifest.xml @@ -0,0 +1,27 @@ + + + + + + diff --git a/packages/overlays/IconShapeHexagonOverlay/res/values/config.xml b/packages/overlays/IconShapeHexagonOverlay/res/values/config.xml new file mode 100644 index 000000000000..43617b54cce5 --- /dev/null +++ b/packages/overlays/IconShapeHexagonOverlay/res/values/config.xml @@ -0,0 +1,30 @@ + + + + + "M 50,0 L 100,25, 100,75, 50,100, 0,75, 0,25 Z" + + false + + 0dp + + 0dp + + + diff --git a/packages/overlays/IconShapeHexagonOverlay/res/values/strings.xml b/packages/overlays/IconShapeHexagonOverlay/res/values/strings.xml new file mode 100644 index 000000000000..eab567d9044a --- /dev/null +++ b/packages/overlays/IconShapeHexagonOverlay/res/values/strings.xml @@ -0,0 +1,23 @@ + + + + + Hexagon + + diff --git a/packages/overlays/IconShapeLeafOverlay/Android.mk b/packages/overlays/IconShapeLeafOverlay/Android.mk new file mode 100644 index 000000000000..56fd3b365ed1 --- /dev/null +++ b/packages/overlays/IconShapeLeafOverlay/Android.mk @@ -0,0 +1,29 @@ +# +# Copyright 2018, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := IconShapeLeaf + +LOCAL_PRODUCT_MODULE := true + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := IconShapeLeafOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/IconShapeLeafOverlay/AndroidManifest.xml b/packages/overlays/IconShapeLeafOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..790f1b2c7fa6 --- /dev/null +++ b/packages/overlays/IconShapeLeafOverlay/AndroidManifest.xml @@ -0,0 +1,27 @@ + + + + + + diff --git a/packages/overlays/IconShapeLeafOverlay/res/values/config.xml b/packages/overlays/IconShapeLeafOverlay/res/values/config.xml new file mode 100644 index 000000000000..b6ada3207876 --- /dev/null +++ b/packages/overlays/IconShapeLeafOverlay/res/values/config.xml @@ -0,0 +1,26 @@ + + + + + "M-0.06,0.07h67.37C85.36,0.07,100,14.71,100,32.76v67.37H32.63c-18.06,0-32.69-14.64-32.69-32.69L-0.06,0.07z" + + false + + + diff --git a/packages/overlays/IconShapeLeafOverlay/res/values/strings.xml b/packages/overlays/IconShapeLeafOverlay/res/values/strings.xml new file mode 100644 index 000000000000..134f9c03f6ca --- /dev/null +++ b/packages/overlays/IconShapeLeafOverlay/res/values/strings.xml @@ -0,0 +1,23 @@ + + + + + Leaf + + diff --git a/packages/overlays/IconShapePebbleOverlay/Android.mk b/packages/overlays/IconShapePebbleOverlay/Android.mk new file mode 100644 index 000000000000..c163bb91f76a --- /dev/null +++ b/packages/overlays/IconShapePebbleOverlay/Android.mk @@ -0,0 +1,29 @@ +# +# Copyright 2020, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := IconShapePebble + +LOCAL_PRODUCT_MODULE := true + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := IconShapePebbleOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/IconShapePebbleOverlay/AndroidManifest.xml b/packages/overlays/IconShapePebbleOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..d719a97e28f2 --- /dev/null +++ b/packages/overlays/IconShapePebbleOverlay/AndroidManifest.xml @@ -0,0 +1,28 @@ + + + + + + diff --git a/packages/overlays/IconShapePebbleOverlay/res/values/config.xml b/packages/overlays/IconShapePebbleOverlay/res/values/config.xml new file mode 100644 index 000000000000..e7eeb30501b5 --- /dev/null +++ b/packages/overlays/IconShapePebbleOverlay/res/values/config.xml @@ -0,0 +1,30 @@ + + + + + "M55,0 C25,0 0,25 0,50 0,78 28,100 55,100 85,100 100,85 100,58 100,30 86,0 55,0 Z" + + false + + 8dp + + 16dp + + + diff --git a/packages/overlays/IconShapePebbleOverlay/res/values/strings.xml b/packages/overlays/IconShapePebbleOverlay/res/values/strings.xml new file mode 100644 index 000000000000..aec4a82a6ba4 --- /dev/null +++ b/packages/overlays/IconShapePebbleOverlay/res/values/strings.xml @@ -0,0 +1,23 @@ + + + + + Pebble + + diff --git a/packages/overlays/IconShapeRoundedHexagonOverlay/Android.bp b/packages/overlays/IconShapeRoundedHexagonOverlay/Android.bp new file mode 100644 index 000000000000..58944e1dbae4 --- /dev/null +++ b/packages/overlays/IconShapeRoundedHexagonOverlay/Android.bp @@ -0,0 +1,21 @@ +// +// Copyright 2020, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +runtime_resource_overlay { + name: "IconShapeRoundedHexagonOverlay", + theme: "IconShapeRoundedHexagon", + product_specific: true, +} diff --git a/packages/overlays/IconShapeRoundedHexagonOverlay/AndroidManifest.xml b/packages/overlays/IconShapeRoundedHexagonOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..e035e1c0ba9e --- /dev/null +++ b/packages/overlays/IconShapeRoundedHexagonOverlay/AndroidManifest.xml @@ -0,0 +1,27 @@ + + + + + + diff --git a/packages/overlays/IconShapeRoundedHexagonOverlay/res/values/config.xml b/packages/overlays/IconShapeRoundedHexagonOverlay/res/values/config.xml new file mode 100644 index 000000000000..435c258f601b --- /dev/null +++ b/packages/overlays/IconShapeRoundedHexagonOverlay/res/values/config.xml @@ -0,0 +1,30 @@ + + + + + "M4.8 33V67c0 5.8 3 11 8 13.7l29.4 17c4.9 2.7 11 2.7 15.9 0l29.4 -17c4.9 -2.7 8 -8 8 -13.7V33c0 -5.8 -3 -11 -8 -13.7l-29.4 -17c-4.9 -2.7 -11 -2.7 -15.9 0l-29.7 17C7.8 22.2 4.8 27.5 4.8 33z" + + false + + 4dp + + 8dp + + + diff --git a/packages/overlays/IconShapeRoundedHexagonOverlay/res/values/strings.xml b/packages/overlays/IconShapeRoundedHexagonOverlay/res/values/strings.xml new file mode 100644 index 000000000000..2c33a399c30d --- /dev/null +++ b/packages/overlays/IconShapeRoundedHexagonOverlay/res/values/strings.xml @@ -0,0 +1,23 @@ + + + + + Rounded Hexagon + + diff --git a/packages/overlays/IconShapeRoundedRectOverlay/Android.mk b/packages/overlays/IconShapeRoundedRectOverlay/Android.mk new file mode 100644 index 000000000000..c6f00d1b5584 --- /dev/null +++ b/packages/overlays/IconShapeRoundedRectOverlay/Android.mk @@ -0,0 +1,29 @@ +# +# Copyright 2018, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := IconShapeRoundedRect + +LOCAL_PRODUCT_MODULE := true + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := IconShapeRoundedRectOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/IconShapeRoundedRectOverlay/AndroidManifest.xml b/packages/overlays/IconShapeRoundedRectOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..39c082b59604 --- /dev/null +++ b/packages/overlays/IconShapeRoundedRectOverlay/AndroidManifest.xml @@ -0,0 +1,27 @@ + + + + + + diff --git a/packages/overlays/IconShapeRoundedRectOverlay/res/values/config.xml b/packages/overlays/IconShapeRoundedRectOverlay/res/values/config.xml new file mode 100644 index 000000000000..c5bb5e9bb885 --- /dev/null +++ b/packages/overlays/IconShapeRoundedRectOverlay/res/values/config.xml @@ -0,0 +1,30 @@ + + + + + "M50,0L88,0 C94.4,0 100,5.4 100 12 L100,88 C100,94.6 94.6 100 88 100 L12,100 C5.4,100 0,94.6 0,88 L0 12 C0 5.4 5.4 0 12 0 L50,0 Z" + + false + + 2dp + + 4dp + + + diff --git a/packages/overlays/IconShapeRoundedRectOverlay/res/values/strings.xml b/packages/overlays/IconShapeRoundedRectOverlay/res/values/strings.xml new file mode 100644 index 000000000000..3c4c24db53ba --- /dev/null +++ b/packages/overlays/IconShapeRoundedRectOverlay/res/values/strings.xml @@ -0,0 +1,23 @@ + + + + + Rounded Rectangle + + diff --git a/packages/overlays/IconShapeSquareOverlay/Android.mk b/packages/overlays/IconShapeSquareOverlay/Android.mk new file mode 100644 index 000000000000..602072126468 --- /dev/null +++ b/packages/overlays/IconShapeSquareOverlay/Android.mk @@ -0,0 +1,29 @@ +# +# Copyright 2018, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := IconShapeSquare + +LOCAL_PRODUCT_MODULE := true + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := IconShapeSquareOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/IconShapeSquareOverlay/AndroidManifest.xml b/packages/overlays/IconShapeSquareOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..235fdeb22648 --- /dev/null +++ b/packages/overlays/IconShapeSquareOverlay/AndroidManifest.xml @@ -0,0 +1,27 @@ + + + + + + diff --git a/packages/overlays/IconShapeSquareOverlay/res/values/config.xml b/packages/overlays/IconShapeSquareOverlay/res/values/config.xml new file mode 100644 index 000000000000..2016ece4d2c7 --- /dev/null +++ b/packages/overlays/IconShapeSquareOverlay/res/values/config.xml @@ -0,0 +1,30 @@ + + + + + "M50,0L100,0 100,100 0,100 0,0z" + + false + + 0dp + + 0dp + + + diff --git a/packages/overlays/IconShapeSquareOverlay/res/values/strings.xml b/packages/overlays/IconShapeSquareOverlay/res/values/strings.xml new file mode 100644 index 000000000000..577216582608 --- /dev/null +++ b/packages/overlays/IconShapeSquareOverlay/res/values/strings.xml @@ -0,0 +1,23 @@ + + + + + Square + + diff --git a/packages/overlays/IconShapeSquircleOverlay/Android.mk b/packages/overlays/IconShapeSquircleOverlay/Android.mk new file mode 100644 index 000000000000..04409a544edf --- /dev/null +++ b/packages/overlays/IconShapeSquircleOverlay/Android.mk @@ -0,0 +1,29 @@ +# +# Copyright 2018, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := IconShapeSquircle + +LOCAL_PRODUCT_MODULE := true + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := IconShapeSquircleOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/IconShapeSquircleOverlay/AndroidManifest.xml b/packages/overlays/IconShapeSquircleOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..ca618e4142b9 --- /dev/null +++ b/packages/overlays/IconShapeSquircleOverlay/AndroidManifest.xml @@ -0,0 +1,27 @@ + + + + + + diff --git a/packages/overlays/IconShapeSquircleOverlay/res/values/config.xml b/packages/overlays/IconShapeSquircleOverlay/res/values/config.xml new file mode 100644 index 000000000000..7692aa6b5164 --- /dev/null +++ b/packages/overlays/IconShapeSquircleOverlay/res/values/config.xml @@ -0,0 +1,30 @@ + + + + + "M50,0 C10,0 0,10 0,50 0,90 10,100 50,100 90,100 100,90 100,50 100,10 90,0 50,0 Z" + + false + + 4dp + + 8dp + + + diff --git a/packages/overlays/IconShapeSquircleOverlay/res/values/strings.xml b/packages/overlays/IconShapeSquircleOverlay/res/values/strings.xml new file mode 100644 index 000000000000..028eccb8c5a3 --- /dev/null +++ b/packages/overlays/IconShapeSquircleOverlay/res/values/strings.xml @@ -0,0 +1,23 @@ + + + + + Squircle + + diff --git a/packages/overlays/IconShapeStretchedOverlay/Android.bp b/packages/overlays/IconShapeStretchedOverlay/Android.bp new file mode 100644 index 000000000000..d7a7a4ac0bfe --- /dev/null +++ b/packages/overlays/IconShapeStretchedOverlay/Android.bp @@ -0,0 +1,21 @@ +// +// Copyright (C) 2020, The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +runtime_resource_overlay { + name: "IconShapeStretchedOverlay", + theme: "IconShapeStretched", + product_specific: true, +} diff --git a/packages/overlays/IconShapeStretchedOverlay/AndroidManifest.xml b/packages/overlays/IconShapeStretchedOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..c9d669636380 --- /dev/null +++ b/packages/overlays/IconShapeStretchedOverlay/AndroidManifest.xml @@ -0,0 +1,27 @@ + + + + + + diff --git a/packages/overlays/IconShapeStretchedOverlay/res/values/config.xml b/packages/overlays/IconShapeStretchedOverlay/res/values/config.xml new file mode 100644 index 000000000000..ccf712f820b8 --- /dev/null +++ b/packages/overlays/IconShapeStretchedOverlay/res/values/config.xml @@ -0,0 +1,31 @@ + + + + + "M100,50 C100,77 77,100 50,100 L10,100 C4,100 0,96 0,90 L0,50 C0,22 22,0 50,0 L90,0 C96,0 100,4 100,10 L100,50 Z" + + false + + 8dp + + 16dp + + @*android:dimen/config_dialogCornerRadius + + diff --git a/packages/overlays/IconShapeStretchedOverlay/res/values/strings.xml b/packages/overlays/IconShapeStretchedOverlay/res/values/strings.xml new file mode 100644 index 000000000000..b7b97fdc104e --- /dev/null +++ b/packages/overlays/IconShapeStretchedOverlay/res/values/strings.xml @@ -0,0 +1,23 @@ + + + + + Stretched + + diff --git a/packages/overlays/IconShapeTaperedRectOverlay/Android.mk b/packages/overlays/IconShapeTaperedRectOverlay/Android.mk new file mode 100644 index 000000000000..6f1bf2370a15 --- /dev/null +++ b/packages/overlays/IconShapeTaperedRectOverlay/Android.mk @@ -0,0 +1,29 @@ +# +# Copyright 2020, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := IconShapeTaperedRect + +LOCAL_PRODUCT_MODULE := true + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := IconShapeTaperedRectOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/IconShapeTaperedRectOverlay/AndroidManifest.xml b/packages/overlays/IconShapeTaperedRectOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..61ed222327ef --- /dev/null +++ b/packages/overlays/IconShapeTaperedRectOverlay/AndroidManifest.xml @@ -0,0 +1,27 @@ + + + + + + + diff --git a/packages/overlays/IconShapeTaperedRectOverlay/res/values/config.xml b/packages/overlays/IconShapeTaperedRectOverlay/res/values/config.xml new file mode 100644 index 000000000000..bc060f98ae84 --- /dev/null +++ b/packages/overlays/IconShapeTaperedRectOverlay/res/values/config.xml @@ -0,0 +1,28 @@ + + + + + "M20,0 80,0 100,20 100,80 80,100 20,100 0,80 0,20 20,0 Z" + + false + + 2dp + + 2dp + + 1dp + diff --git a/packages/overlays/IconShapeTaperedRectOverlay/res/values/strings.xml b/packages/overlays/IconShapeTaperedRectOverlay/res/values/strings.xml new file mode 100644 index 000000000000..3f36598a89bc --- /dev/null +++ b/packages/overlays/IconShapeTaperedRectOverlay/res/values/strings.xml @@ -0,0 +1,20 @@ + + + + Tapered Rect + + diff --git a/packages/overlays/IconShapeTeardropOverlay/Android.mk b/packages/overlays/IconShapeTeardropOverlay/Android.mk new file mode 100644 index 000000000000..b127deabda4c --- /dev/null +++ b/packages/overlays/IconShapeTeardropOverlay/Android.mk @@ -0,0 +1,29 @@ +# +# Copyright 2018, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := IconShapeTeardrop + +LOCAL_PRODUCT_MODULE := true + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := IconShapeTeardropOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/IconShapeTeardropOverlay/AndroidManifest.xml b/packages/overlays/IconShapeTeardropOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..b7d5ecb820d9 --- /dev/null +++ b/packages/overlays/IconShapeTeardropOverlay/AndroidManifest.xml @@ -0,0 +1,27 @@ + + + + + + diff --git a/packages/overlays/IconShapeTeardropOverlay/res/values/config.xml b/packages/overlays/IconShapeTeardropOverlay/res/values/config.xml new file mode 100644 index 000000000000..b6ee412e5916 --- /dev/null +++ b/packages/overlays/IconShapeTeardropOverlay/res/values/config.xml @@ -0,0 +1,30 @@ + + + + + "M50,0 C77.6,0 100,22.4 100,50 L100,88 C100,94.6 94.6,100 88,100 L50,100 C22.4 100 0 77.6 0 50C0 22.4 22.4 0 50 0 Z" + + false + + 8dp + + 16dp + + + diff --git a/packages/overlays/IconShapeTeardropOverlay/res/values/strings.xml b/packages/overlays/IconShapeTeardropOverlay/res/values/strings.xml new file mode 100644 index 000000000000..db9fa9819714 --- /dev/null +++ b/packages/overlays/IconShapeTeardropOverlay/res/values/strings.xml @@ -0,0 +1,23 @@ + + + + + Teardrop + + diff --git a/packages/overlays/IconShapeVesselOverlay/Android.mk b/packages/overlays/IconShapeVesselOverlay/Android.mk new file mode 100644 index 000000000000..0816e6f7800d --- /dev/null +++ b/packages/overlays/IconShapeVesselOverlay/Android.mk @@ -0,0 +1,29 @@ +# +# Copyright 2020, The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_RRO_THEME := IconShapeVessel + +LOCAL_PRODUCT_MODULE := true + +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res + +LOCAL_PACKAGE_NAME := IconShapeVesselOverlay +LOCAL_SDK_VERSION := current + +include $(BUILD_RRO_PACKAGE) diff --git a/packages/overlays/IconShapeVesselOverlay/AndroidManifest.xml b/packages/overlays/IconShapeVesselOverlay/AndroidManifest.xml new file mode 100644 index 000000000000..025ac6951f0b --- /dev/null +++ b/packages/overlays/IconShapeVesselOverlay/AndroidManifest.xml @@ -0,0 +1,26 @@ + + + + + + diff --git a/packages/overlays/IconShapeVesselOverlay/res/values/config.xml b/packages/overlays/IconShapeVesselOverlay/res/values/config.xml new file mode 100644 index 000000000000..86d31f6450bc --- /dev/null +++ b/packages/overlays/IconShapeVesselOverlay/res/values/config.xml @@ -0,0 +1,27 @@ + + + + + "M12.97,0 C8.41,0 4.14,2.55 2.21,6.68 -1.03,13.61 -0.71,21.78 3.16,28.46 4.89,31.46 4.89,35.2 3.16,38.2 -1.05,45.48 -1.05,54.52 3.16,61.8 4.89,64.8 4.89,68.54 3.16,71.54 -0.71,78.22 -1.03,86.39 2.21,93.32 4.14,97.45 8.41,100 12.97,100 21.38,100 78.62,100 87.03,100 91.59,100 95.85,97.45 97.79,93.32 101.02,86.39 100.71,78.22 96.84,71.54 95.1,68.54 95.1,64.8 96.84,61.8 101.05,54.52 101.05,45.48 96.84,38.2 95.1,35.2 95.1,31.46 96.84,28.46 100.71,21.78 101.02,13.61 97.79,6.68 95.85,2.55 91.59,0 87.03,0 78.62,0 21.38,0 12.97,0 Z" + + false + + 8dp + + 16dp + + diff --git a/packages/overlays/IconShapeVesselOverlay/res/values/strings.xml b/packages/overlays/IconShapeVesselOverlay/res/values/strings.xml new file mode 100644 index 000000000000..a50e7e9a9ab2 --- /dev/null +++ b/packages/overlays/IconShapeVesselOverlay/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + + Vessel + + diff --git a/proto/src/metrics_constants/metrics_constants.proto b/proto/src/metrics_constants/metrics_constants.proto index 3801c2473c11..4cf873f1dfd1 100644 --- a/proto/src/metrics_constants/metrics_constants.proto +++ b/proto/src/metrics_constants/metrics_constants.proto @@ -7437,5 +7437,7 @@ message MetricsEvent { // ---- End Q Constants, all Q constants go above this line ---- // Add new aosp constants above this line. // END OF AOSP CONSTANTS + + SYBERIA = 4200; } } diff --git a/services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java b/services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java index 1af8ad344190..84707a8d9c00 100644 --- a/services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java +++ b/services/appprediction/java/com/android/server/appprediction/AppPredictionPerUserService.java @@ -398,18 +398,7 @@ private static final class AppPredictionSessionInfo { final IBinder.DeathRecipient mDeathRecipient; private final RemoteCallbackList mCallbacks = - new RemoteCallbackList() { - @Override - public void onCallbackDied(IPredictionCallback callback) { - if (DEBUG) { - Slog.d(TAG, "Binder died for session Id=" + mSessionId - + " and callback=" + callback.asBinder()); - } - if (mCallbacks.getRegisteredCallbackCount() == 0) { - destroy(); - } - } - }; + new RemoteCallbackList<>(); AppPredictionSessionInfo( @NonNull final AppPredictionSessionId id, diff --git a/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java b/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java index 3ab873de4bb5..9de997d6ad29 100644 --- a/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java +++ b/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java @@ -149,7 +149,7 @@ public void showError(@Nullable CharSequence message, @NonNull AutoFillUiCallbac return; } hideAllUiThread(callback); - if (!TextUtils.isEmpty(message)) { + if (!TextUtils.isEmpty(message) && !message.toString().equals("null")) { Toast.makeText(mContext, message, Toast.LENGTH_LONG).show(); } }); diff --git a/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java b/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java index 3f7cba6a4d09..2714addaec9e 100644 --- a/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java +++ b/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java @@ -100,6 +100,7 @@ import com.android.server.SystemService; import com.android.server.companion.presence.CompanionDevicePresenceMonitor; import com.android.server.pm.UserManagerInternal; +import com.android.server.wm.ActivityTaskManagerInternal; import java.io.File; import java.io.FileDescriptor; @@ -135,6 +136,7 @@ public class CompanionDeviceManagerService extends SystemService { private CompanionDevicePresenceMonitor mDevicePresenceMonitor; private CompanionApplicationController mCompanionAppController; + private final ActivityTaskManagerInternal mAtmInternal; private final ActivityManagerInternal mAmInternal; private final IAppOpsService mAppOpsManager; private final PowerWhitelistManager mPowerWhitelistManager; @@ -159,6 +161,7 @@ public CompanionDeviceManagerService(Context context) { mPowerWhitelistManager = context.getSystemService(PowerWhitelistManager.class); mAppOpsManager = IAppOpsService.Stub.asInterface( ServiceManager.getService(Context.APP_OPS_SERVICE)); + mAtmInternal = LocalServices.getService(ActivityTaskManagerInternal.class); mAmInternal = LocalServices.getService(ActivityManagerInternal.class); mPackageManagerInternal = LocalServices.getService(PackageManagerInternal.class); mUserManager = context.getSystemService(UserManager.class); @@ -969,6 +972,9 @@ private void updateAtm(int userId, List associations) { companionAppUids.add(uid); } } + if (mAtmInternal != null) { + mAtmInternal.setCompanionAppUids(userId, companionAppUids); + } if (mAmInternal != null) { // Make a copy of the set and send it to ActivityManager. mAmInternal.setCompanionAppUids(userId, new ArraySet<>(companionAppUids)); diff --git a/services/core/Android.bp b/services/core/Android.bp index 89c8ca567dd9..103ddb94cd69 100644 --- a/services/core/Android.bp +++ b/services/core/Android.bp @@ -19,7 +19,10 @@ filegroup { filegroup { name: "services.core-sources", - srcs: ["java/**/*.java"], + srcs: [ + "java/**/*.java", + "java/**/*.kt", + ], exclude_srcs: [ ":services.core-sources-am-wm", ], @@ -173,6 +176,9 @@ java_library_static { "overlayable_policy_aidl-java", "SurfaceFlingerProperties", "com.android.sysprop.watchdog", + "kotlin-stdlib", + "kotlinx_coroutines_android", + "kotlinx_coroutines", ], javac_shard_size: 50, } diff --git a/services/core/java/com/android/server/BatteryService.java b/services/core/java/com/android/server/BatteryService.java index 2f8dea7b5f14..03d8af608944 100644 --- a/services/core/java/com/android/server/BatteryService.java +++ b/services/core/java/com/android/server/BatteryService.java @@ -25,6 +25,7 @@ import android.content.ContentResolver; import android.content.Context; import android.content.Intent; +import android.content.res.Resources; import android.database.ContentObserver; import android.hardware.health.HealthInfo; import android.hardware.health.V2_1.BatteryCapacityLevel; @@ -55,6 +56,7 @@ import android.provider.Settings; import android.service.battery.BatteryServiceDumpProto; import android.sysprop.PowerProperties; +import android.text.TextUtils; import android.util.EventLog; import android.util.Slog; import android.util.proto.ProtoOutputStream; @@ -67,9 +69,12 @@ import com.android.server.lights.LightsManager; import com.android.server.lights.LogicalLight; +import java.io.BufferedReader; import java.io.File; import java.io.FileDescriptor; +import java.io.FileNotFoundException; import java.io.FileOutputStream; +import java.io.FileReader; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayDeque; @@ -165,6 +170,14 @@ public final class BatteryService extends SystemService { private boolean mBatteryLevelLow; + private boolean mDashCharger; + private boolean mHasDashCharger; + private boolean mLastDashCharger; + + private boolean mWarpCharger; + private boolean mHasWarpCharger; + private boolean mLastWarpCharger; + private long mDischargeStartTime; private int mDischargeStartLevel; @@ -176,6 +189,18 @@ public final class BatteryService extends SystemService { private Led mLed; + //Battery light color customization + private boolean mLightEnabled = false; + private boolean mFullBatteryLight = true; + private boolean mAllowBatteryLightOnDnd; + private boolean mIsDndActive; + private boolean mLowBatteryBlinking; + private boolean mMultiColorLed; + private int mBatteryLowARGB; + private int mBatteryMediumARGB; + private int mBatteryFullARGB; + private int mBatteryReallyFullARGB; + private boolean mSentLowBatteryBroadcast = false; private ActivityManagerInternal mActivityManagerInternal; @@ -196,6 +221,11 @@ public BatteryService(Context context) { mBatteryStats = BatteryStatsService.getService(); mActivityManagerInternal = LocalServices.getService(ActivityManagerInternal.class); + mHasDashCharger = mContext.getResources().getBoolean( + com.android.internal.R.bool.config_hasDashCharger); + mHasWarpCharger = mContext.getResources().getBoolean( + com.android.internal.R.bool.config_hasWarpCharger); + mCriticalBatteryLevel = mContext.getResources().getInteger( com.android.internal.R.integer.config_criticalBatteryWarningLevel); mLowBatteryWarningLevel = mContext.getResources().getInteger( @@ -258,6 +288,88 @@ public void onChange(boolean selfChange) { false, obs, UserHandle.USER_ALL); updateBatteryWarningLevelLocked(); } + } else if (phase == PHASE_BOOT_COMPLETED) { + SettingsObserver mObserver = new SettingsObserver(new Handler()); + mObserver.observe(); + } + } + + private synchronized void updateLed() { + mLed.updateLightsLocked(); + } + + class SettingsObserver extends ContentObserver { + SettingsObserver(Handler handler) { + super(handler); + } + + void observe() { + ContentResolver resolver = mContext.getContentResolver(); + + // Battery light enabled + resolver.registerContentObserver(Settings.System.getUriFor( + Settings.System.BATTERY_LIGHT_ENABLED), + false, this, UserHandle.USER_ALL); + resolver.registerContentObserver(Settings.System.getUriFor( + Settings.System.BATTERY_FULL_LIGHT_ENABLED), + false, this, UserHandle.USER_ALL); + resolver.registerContentObserver(Settings.System.getUriFor( + Settings.System.BATTERY_LIGHT_ALLOW_ON_DND), + false, this, UserHandle.USER_ALL); + resolver.registerContentObserver( + Settings.Global.getUriFor(Settings.Global.ZEN_MODE), + false, this, UserHandle.USER_ALL); + resolver.registerContentObserver(Settings.System.getUriFor( + Settings.System.BATTERY_LIGHT_LOW_BLINKING), + false, this, UserHandle.USER_ALL); + if (mMultiColorLed) { + resolver.registerContentObserver(Settings.System.getUriFor( + Settings.System.BATTERY_LIGHT_LOW_COLOR), + false, this, UserHandle.USER_ALL); + resolver.registerContentObserver(Settings.System.getUriFor( + Settings.System.BATTERY_LIGHT_MEDIUM_COLOR), + false, this, UserHandle.USER_ALL); + resolver.registerContentObserver(Settings.System.getUriFor( + Settings.System.BATTERY_LIGHT_FULL_COLOR), + false, this, UserHandle.USER_ALL); + resolver.registerContentObserver(Settings.System.getUriFor( + Settings.System.BATTERY_LIGHT_REALLYFULL_COLOR), + false, this, UserHandle.USER_ALL); + } + update(); + } + + @Override + public void onChange(boolean selfChange) { + update(); + } + + public void update() { + ContentResolver resolver = mContext.getContentResolver(); + Resources res = mContext.getResources(); + + // Battery light enabled + mLightEnabled = Settings.System.getInt(resolver, + Settings.System.BATTERY_LIGHT_ENABLED, 1) != 0; + mFullBatteryLight = Settings.System.getInt(resolver, + Settings.System.BATTERY_FULL_LIGHT_ENABLED, 1) != 0; + mAllowBatteryLightOnDnd = Settings.System.getInt(resolver, + Settings.System.BATTERY_LIGHT_ALLOW_ON_DND, 0) == 1; + mIsDndActive = Settings.Global.getInt(resolver, + Settings.Global.ZEN_MODE, Settings.Global.ZEN_MODE_OFF) + != Settings.Global.ZEN_MODE_OFF; + mLowBatteryBlinking = Settings.System.getInt(resolver, + Settings.System.BATTERY_LIGHT_LOW_BLINKING, 0) == 1; + mBatteryLowARGB = Settings.System.getInt(resolver, + Settings.System.BATTERY_LIGHT_LOW_COLOR, 0xFFFF0000); + mBatteryMediumARGB = Settings.System.getInt(resolver, + Settings.System.BATTERY_LIGHT_MEDIUM_COLOR, 0xFFFFFF00); + mBatteryFullARGB = Settings.System.getInt(resolver, + Settings.System.BATTERY_LIGHT_FULL_COLOR, 0xFFFFFF00); + mBatteryReallyFullARGB = Settings.System.getInt(resolver, + Settings.System.BATTERY_LIGHT_REALLYFULL_COLOR, 0xFF00FF00); + + updateLed(); } } @@ -491,6 +603,9 @@ private void processValuesLocked(boolean force) { shutdownIfNoPowerLocked(); shutdownIfOverTempLocked(); + mDashCharger = mHasDashCharger && (isDashCharger() || isOemCharger()); + mWarpCharger = mHasWarpCharger && (isWarpCharger() || isOemCharger()); + if (force || (mHealthInfo.batteryStatus != mLastBatteryStatus || mHealthInfo.batteryHealth != mLastBatteryHealth @@ -502,7 +617,9 @@ private void processValuesLocked(boolean force) { || mHealthInfo.maxChargingCurrentMicroamps != mLastMaxChargingCurrent || mHealthInfo.maxChargingVoltageMicrovolts != mLastMaxChargingVoltage || mHealthInfo.batteryChargeCounterUah != mLastChargeCounter - || mInvalidCharger != mLastInvalidCharger)) { + || mInvalidCharger != mLastInvalidCharger + || mDashCharger != mLastDashCharger + || mWarpCharger != mLastWarpCharger)) { if (mPlugType != mLastPlugType) { if (mLastPlugType == BATTERY_PLUGGED_NONE) { @@ -676,6 +793,9 @@ public void run() { mLastChargeCounter = mHealthInfo.batteryChargeCounterUah; mLastBatteryLevelCritical = mBatteryLevelCritical; mLastInvalidCharger = mInvalidCharger; + mLastDashCharger = mDashCharger; + mLastWarpCharger = mWarpCharger; + } } @@ -707,6 +827,8 @@ private void sendBatteryChangedIntentLocked() { BatteryManager.EXTRA_MAX_CHARGING_VOLTAGE, mHealthInfo.maxChargingVoltageMicrovolts); intent.putExtra(BatteryManager.EXTRA_CHARGE_COUNTER, mHealthInfo.batteryChargeCounterUah); + intent.putExtra(BatteryManager.EXTRA_DASH_CHARGER, mDashCharger); + intent.putExtra(BatteryManager.EXTRA_WARP_CHARGER, mWarpCharger); if (DEBUG) { Slog.d(TAG, "Sending ACTION_BATTERY_CHANGED. scale:" + BATTERY_SCALE + ", info:" + mHealthInfo.toString()); @@ -761,6 +883,62 @@ private void sendEnqueuedBatteryLevelChangedEvents() { mLastBatteryLevelChangedSentMs = SystemClock.elapsedRealtime(); } + private boolean isDashCharger() { + try { + FileReader file = new FileReader("/sys/class/power_supply/battery/fastchg_status"); + BufferedReader br = new BufferedReader(file); + String state = br.readLine(); + br.close(); + file.close(); + return "1".equals(state); + } catch (FileNotFoundException e) { + } catch (IOException e) { + } + return false; + } + + private boolean isWarpCharger() { + try { + FileReader file = new FileReader("/sys/class/power_supply/battery/fastchg_status"); + BufferedReader br = new BufferedReader(file); + String state = br.readLine(); + br.close(); + file.close(); + return "1".equals(state); + } catch (FileNotFoundException e) { + } catch (IOException e) { + } + return false; + } + + private boolean isOemCharger() { + String path = mContext.getResources().getString( + com.android.internal.R.string.config_oemFastChargerStatusPath); + String path2 = mContext.getResources().getString( + com.android.internal.R.string.config_oemFastChargerStatusPath2); + if (TextUtils.isEmpty(path) && TextUtils.isEmpty(path2)) + return false; + String value = mContext.getResources().getString( + com.android.internal.R.string.config_oemFastChargerStatusValue); + if (TextUtils.isEmpty(value)) + value = "1"; + try { + boolean isFastCharge = false; + boolean isFastCharge2 = false; + if (!TextUtils.isEmpty(path)) { + isFastCharge = FileUtils.readTextFile(new File(path), value.length(), null).equals(value); + } + if (!TextUtils.isEmpty(path2)) { + isFastCharge2 = FileUtils.readTextFile(new File(path2), value.length(), null).equals(value); + } + return isFastCharge || isFastCharge2; + } catch (IOException e) { + Slog.e(TAG, "Failed to read oem fast charger status path: " + + path + " " + path2); + } + return false; + } + // TODO: Current code doesn't work since "--unplugged" flag in BSS was purposefully removed. private void logBatteryStatsLocked() { IBinder batteryInfoService = ServiceManager.getService(BatteryStats.SERVICE_NAME); @@ -1164,21 +1342,15 @@ private static void traceEnd() { private final class Led { private final LogicalLight mBatteryLight; - private final int mBatteryLowARGB; - private final int mBatteryMediumARGB; - private final int mBatteryFullARGB; private final int mBatteryLedOn; private final int mBatteryLedOff; public Led(Context context, LightsManager lights) { mBatteryLight = lights.getLight(LightsManager.LIGHT_ID_BATTERY); - mBatteryLowARGB = context.getResources().getInteger( - com.android.internal.R.integer.config_notificationsBatteryLowARGB); - mBatteryMediumARGB = context.getResources().getInteger( - com.android.internal.R.integer.config_notificationsBatteryMediumARGB); - mBatteryFullARGB = context.getResources().getInteger( - com.android.internal.R.integer.config_notificationsBatteryFullARGB); + // Does the Device support changing battery LED colors? + mMultiColorLed = context.getResources().getBoolean( + com.android.internal.R.bool.config_multiColorBatteryLed); mBatteryLedOn = context.getResources().getInteger( com.android.internal.R.integer.config_notificationsBatteryLedOn); mBatteryLedOff = context.getResources().getInteger( @@ -1192,24 +1364,39 @@ public void updateLightsLocked() { if (mBatteryLight == null) { return; } + // mHealthInfo could be null on startup (called by SettingsObserver) + if (mHealthInfo == null) { + Slog.w(TAG, "updateLightsLocked: mHealthInfo is null; skipping"); + return; + } final int level = mHealthInfo.batteryLevel; final int status = mHealthInfo.batteryStatus; - if (level < mLowBatteryWarningLevel) { + if (!mLightEnabled || (mIsDndActive && !mAllowBatteryLightOnDnd) || (!mFullBatteryLight && level == 100)) { + mBatteryLight.turnOff(); + } else if (level < mLowBatteryWarningLevel) { if (status == BatteryManager.BATTERY_STATUS_CHARGING) { - // Solid red when battery is charging + // Battery is charging and low mBatteryLight.setColor(mBatteryLowARGB); - } else { - // Flash red when battery is low and not charging + } else if (mLowBatteryBlinking) { + // Flash when battery is low and not charging mBatteryLight.setFlashing(mBatteryLowARGB, LogicalLight.LIGHT_FLASH_TIMED, mBatteryLedOn, mBatteryLedOff); + } else { + // "Pulse low battery light" is disabled, no lights. + mBatteryLight.turnOff(); } } else if (status == BatteryManager.BATTERY_STATUS_CHARGING || status == BatteryManager.BATTERY_STATUS_FULL) { if (status == BatteryManager.BATTERY_STATUS_FULL || level >= 90) { - // Solid green when full or charging and nearly full - mBatteryLight.setColor(mBatteryFullARGB); + if (level == 100) { + // Battery is really full + mBatteryLight.setColor(mBatteryReallyFullARGB); + } else { + // Battery is full or charging and nearly full + mBatteryLight.setColor(mBatteryFullARGB); + } } else { - // Solid orange when charging and halfway full + // Battery is charging and halfway full mBatteryLight.setColor(mBatteryMediumARGB); } } else { diff --git a/services/core/java/com/android/server/GestureLauncherService.java b/services/core/java/com/android/server/GestureLauncherService.java index e529010e6b7d..02e3d5d996d2 100644 --- a/services/core/java/com/android/server/GestureLauncherService.java +++ b/services/core/java/com/android/server/GestureLauncherService.java @@ -758,6 +758,14 @@ private boolean isUserSetupComplete() { Settings.Secure.USER_SETUP_COMPLETE, 0, UserHandle.USER_CURRENT) != 0; } + /** + * @return true if camera was launched, false otherwise. + * @hide + */ + public boolean doCameraLaunchGesture() { + return handleCameraGesture(false, StatusBarManager.CAMERA_LAUNCH_SOURCE_POWER_DOUBLE_TAP); + } + private final BroadcastReceiver mUserReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { diff --git a/services/core/java/com/android/server/StorageManagerService.java b/services/core/java/com/android/server/StorageManagerService.java index 5eec6e58e925..e6e0d8ef3f47 100644 --- a/services/core/java/com/android/server/StorageManagerService.java +++ b/services/core/java/com/android/server/StorageManagerService.java @@ -2439,8 +2439,10 @@ public void onFinished(int status, PersistableBundle extras) { final long destroy = extras.getLong("destroy"); final DropBoxManager dropBox = mContext.getSystemService(DropBoxManager.class); - dropBox.addText(TAG_STORAGE_BENCHMARK, scrubPath(path) - + " " + ident + " " + create + " " + run + " " + destroy); + if (dropBox != null) { + dropBox.addText(TAG_STORAGE_BENCHMARK, scrubPath(path) + + " " + ident + " " + create + " " + run + " " + destroy); + } synchronized (mLock) { final VolumeRecord rec = findRecordForPath(path); @@ -2602,7 +2604,9 @@ public void onStatus(int status, PersistableBundle extras) { final long time = extras.getLong("time"); final DropBoxManager dropBox = mContext.getSystemService(DropBoxManager.class); - dropBox.addText(TAG_STORAGE_TRIM, scrubPath(path) + " " + bytes + " " + time); + if (dropBox != null) { + dropBox.addText(TAG_STORAGE_TRIM, scrubPath(path) + " " + bytes + " " + time); + } synchronized (mLock) { final VolumeRecord rec = findRecordForPath(path); diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java index 0807fbaf7cc3..2fedc99a400c 100644 --- a/services/core/java/com/android/server/TelephonyRegistry.java +++ b/services/core/java/com/android/server/TelephonyRegistry.java @@ -2978,8 +2978,8 @@ public void dump(FileDescriptor fd, PrintWriter writer, String[] args) { pw.println("mBarringInfo=" + mBarringInfo.get(i)); pw.println("mCarrierNetworkChangeState=" + mCarrierNetworkChangeState[i]); pw.println("mTelephonyDisplayInfo=" + mTelephonyDisplayInfos[i]); - pw.println("mIsDataEnabled=" + mIsDataEnabled); - pw.println("mDataEnabledReason=" + mDataEnabledReason); + pw.println("mIsDataEnabled=" + mIsDataEnabled[i]); + pw.println("mDataEnabledReason=" + mDataEnabledReason[i]); pw.println("mAllowedNetworkTypeReason=" + mAllowedNetworkTypeReason[i]); pw.println("mAllowedNetworkTypeValue=" + mAllowedNetworkTypeValue[i]); pw.println("mPhysicalChannelConfigs=" + mPhysicalChannelConfigs.get(i)); diff --git a/services/core/java/com/android/server/UiModeManagerService.java b/services/core/java/com/android/server/UiModeManagerService.java index c853ba93f4ab..4828a54c07ec 100644 --- a/services/core/java/com/android/server/UiModeManagerService.java +++ b/services/core/java/com/android/server/UiModeManagerService.java @@ -1897,7 +1897,10 @@ private void updateComputedNightModeLocked(boolean activate) { mComputedNightMode = false; return; } - resetNightModeOverrideLocked(); + if (mNightMode != MODE_NIGHT_AUTO || (mTwilightManager != null + && mTwilightManager.getLastTwilightState() != null)) { + resetNightModeOverrideLocked(); + } } private boolean resetNightModeOverrideLocked() { diff --git a/services/core/java/com/android/server/accounts/AccountManagerService.java b/services/core/java/com/android/server/accounts/AccountManagerService.java index b059cc7e2aa2..2c465f44aa99 100644 --- a/services/core/java/com/android/server/accounts/AccountManagerService.java +++ b/services/core/java/com/android/server/accounts/AccountManagerService.java @@ -1820,6 +1820,14 @@ private boolean addAccountInternal(UserAccounts accounts, Account account, Strin if (account == null) { return false; } + if (account.name != null && account.name.length() > 200) { + Log.w(TAG, "Account cannot be added - Name longer than 200 chars"); + return false; + } + if (account.type != null && account.type.length() > 200) { + Log.w(TAG, "Account cannot be added - Name longer than 200 chars"); + return false; + } if (!isLocalUnlockedUser(accounts.userId)) { Log.w(TAG, "Account " + account.toSafeString() + " cannot be added - user " + accounts.userId + " is locked. callingUid=" + callingUid); @@ -2065,6 +2073,10 @@ public void renameAccount( + ", pid " + Binder.getCallingPid()); } if (accountToRename == null) throw new IllegalArgumentException("account is null"); + if (newName != null && newName.length() > 200) { + Log.e(TAG, "renameAccount failed - account name longer than 200"); + throw new IllegalArgumentException("account name longer than 200"); + } int userId = UserHandle.getCallingUserId(); if (!isAccountManagedByCaller(accountToRename.type, callingUid, userId)) { String msg = String.format( diff --git a/services/core/java/com/android/server/adb/AdbDebuggingManager.java b/services/core/java/com/android/server/adb/AdbDebuggingManager.java index 297d28dadde3..56990eda3e78 100644 --- a/services/core/java/com/android/server/adb/AdbDebuggingManager.java +++ b/services/core/java/com/android/server/adb/AdbDebuggingManager.java @@ -19,7 +19,7 @@ import static com.android.internal.util.dump.DumpUtils.writeStringIfNotNull; import android.annotation.NonNull; -import android.annotation.TestApi; +import android.annotation.Nullable; import android.app.ActivityManager; import android.app.Notification; import android.app.NotificationChannel; @@ -102,11 +102,26 @@ import java.util.concurrent.atomic.AtomicBoolean; /** - * Provides communication to the Android Debug Bridge daemon to allow, deny, or clear public keysi + * Provides communication to the Android Debug Bridge daemon to allow, deny, or clear public keys * that are authorized to connect to the ADB service itself. + * + *

The AdbDebuggingManager controls two files: + *

    + *
  1. adb_keys + *
  2. adb_temp_keys.xml + *
+ * + *

The ADB Daemon (adbd) reads only the adb_keys file for authorization. Public keys + * from registered hosts are stored in adb_keys, one entry per line. + * + *

AdbDebuggingManager also keeps adb_temp_keys.xml, which is used for two things + *

    + *
  1. Removing unused keys from the adb_keys file + *
  2. Managing authorized WiFi access points for ADB over WiFi + *
*/ public class AdbDebuggingManager { - private static final String TAG = "AdbDebuggingManager"; + private static final String TAG = AdbDebuggingManager.class.getSimpleName(); private static final boolean DEBUG = false; private static final boolean MDNS_DEBUG = false; @@ -118,18 +133,20 @@ public class AdbDebuggingManager { // as a subsequent connection occurs within the allowed duration. private static final String ADB_TEMP_KEYS_FILE = "adb_temp_keys.xml"; private static final int BUFFER_SIZE = 65536; + private static final Ticker SYSTEM_TICKER = () -> System.currentTimeMillis(); private final Context mContext; private final ContentResolver mContentResolver; - private final Handler mHandler; - private AdbDebuggingThread mThread; + @VisibleForTesting final AdbDebuggingHandler mHandler; + @Nullable private AdbDebuggingThread mThread; private boolean mAdbUsbEnabled = false; private boolean mAdbWifiEnabled = false; private String mFingerprints; // A key can be used more than once (e.g. USB, wifi), so need to keep a refcount - private final Map mConnectedKeys; - private String mConfirmComponent; - private final File mTestUserKeyFile; + private final Map mConnectedKeys = new HashMap<>(); + private final String mConfirmComponent; + @Nullable private final File mUserKeyFile; + @Nullable private final File mTempKeysFile; private static final String WIFI_PERSISTENT_CONFIG_PROPERTY = "persist.adb.tls_server.enable"; @@ -138,37 +155,44 @@ public class AdbDebuggingManager { private static final int PAIRING_CODE_LENGTH = 6; private PairingThread mPairingThread = null; // A list of keys connected via wifi - private final Set mWifiConnectedKeys; + private final Set mWifiConnectedKeys = new HashSet<>(); // The current info of the adbwifi connection. - private AdbConnectionInfo mAdbConnectionInfo; + private AdbConnectionInfo mAdbConnectionInfo = new AdbConnectionInfo(); // Polls for a tls port property when adb wifi is enabled private AdbConnectionPortPoller mConnectionPortPoller; private final PortListenerImpl mPortListener = new PortListenerImpl(); + private final Ticker mTicker; public AdbDebuggingManager(Context context) { - mHandler = new AdbDebuggingHandler(FgThread.get().getLooper()); - mContext = context; - mContentResolver = mContext.getContentResolver(); - mTestUserKeyFile = null; - mConnectedKeys = new HashMap(); - mWifiConnectedKeys = new HashSet(); - mAdbConnectionInfo = new AdbConnectionInfo(); + this( + context, + /* confirmComponent= */ null, + getAdbFile(ADB_KEYS_FILE), + getAdbFile(ADB_TEMP_KEYS_FILE), + /* adbDebuggingThread= */ null, + SYSTEM_TICKER); } /** * Constructor that accepts the component to be invoked to confirm if the user wants to allow * an adb connection from the key. */ - @TestApi - protected AdbDebuggingManager(Context context, String confirmComponent, File testUserKeyFile) { - mHandler = new AdbDebuggingHandler(FgThread.get().getLooper()); + @VisibleForTesting + AdbDebuggingManager( + Context context, + String confirmComponent, + File testUserKeyFile, + File tempKeysFile, + AdbDebuggingThread adbDebuggingThread, + Ticker ticker) { mContext = context; mContentResolver = mContext.getContentResolver(); mConfirmComponent = confirmComponent; - mTestUserKeyFile = testUserKeyFile; - mConnectedKeys = new HashMap(); - mWifiConnectedKeys = new HashSet(); - mAdbConnectionInfo = new AdbConnectionInfo(); + mUserKeyFile = testUserKeyFile; + mTempKeysFile = tempKeysFile; + mThread = adbDebuggingThread; + mTicker = ticker; + mHandler = new AdbDebuggingHandler(FgThread.get().getLooper(), mThread); } static void sendBroadcastWithDebugPermission(@NonNull Context context, @NonNull Intent intent, @@ -189,8 +213,7 @@ class PairingThread extends Thread implements NsdManager.RegistrationListener { // consisting of only letters, digits, and hyphens, must begin and end // with a letter or digit, must not contain consecutive hyphens, and // must contain at least one letter. - @VisibleForTesting - static final String SERVICE_PROTOCOL = "adb-tls-pairing"; + @VisibleForTesting static final String SERVICE_PROTOCOL = "adb-tls-pairing"; private final String mServiceType = String.format("_%s._tcp.", SERVICE_PROTOCOL); private int mPort; @@ -352,16 +375,24 @@ public void onPortReceived(int port) { } } - class AdbDebuggingThread extends Thread { + @VisibleForTesting + static class AdbDebuggingThread extends Thread { private boolean mStopped; private LocalSocket mSocket; private OutputStream mOutputStream; private InputStream mInputStream; + private Handler mHandler; + @VisibleForTesting AdbDebuggingThread() { super(TAG); } + @VisibleForTesting + void setHandler(Handler handler) { + mHandler = handler; + } + @Override public void run() { if (DEBUG) Slog.d(TAG, "Entering thread"); @@ -536,7 +567,7 @@ void sendResponse(String msg) { } } - class AdbConnectionInfo { + private static class AdbConnectionInfo { private String mBssid; private String mSsid; private int mPort; @@ -743,11 +774,14 @@ private void setupNotifications() { // Notification when adbd socket is disconnected. static final int MSG_ADBD_SOCKET_DISCONNECTED = 27; + // === Messages from other parts of the system + private static final int MESSAGE_KEY_FILES_UPDATED = 28; + // === Messages we can send to adbd =========== static final String MSG_DISCONNECT_DEVICE = "DD"; static final String MSG_DISABLE_ADBDWIFI = "DA"; - private AdbKeyStore mAdbKeyStore; + @Nullable @VisibleForTesting AdbKeyStore mAdbKeyStore; // Usb, Wi-Fi transports can be enabled together or separately, so don't break the framework // connection unless all transport types are disconnected. @@ -762,19 +796,19 @@ public void onChange(boolean selfChange, Uri uri) { } }; - AdbDebuggingHandler(Looper looper) { + /** Constructor that accepts the AdbDebuggingThread to which responses should be sent. */ + @VisibleForTesting + AdbDebuggingHandler(Looper looper, AdbDebuggingThread thread) { super(looper); + mThread = thread; } - /** - * Constructor that accepts the AdbDebuggingThread to which responses should be sent - * and the AdbKeyStore to be used to store the temporary grants. - */ - @TestApi - AdbDebuggingHandler(Looper looper, AdbDebuggingThread thread, AdbKeyStore adbKeyStore) { - super(looper); - mThread = thread; - mAdbKeyStore = adbKeyStore; + /** Initialize the AdbKeyStore so tests can grab mAdbKeyStore immediately. */ + @VisibleForTesting + void initKeyStore() { + if (mAdbKeyStore == null) { + mAdbKeyStore = new AdbKeyStore(); + } } // Show when at least one device is connected. @@ -805,6 +839,7 @@ private void startAdbDebuggingThread() { registerForAuthTimeChanges(); mThread = new AdbDebuggingThread(); + mThread.setHandler(mHandler); mThread.start(); mAdbKeyStore.updateKeyStore(); @@ -825,8 +860,7 @@ private void stopAdbDebuggingThread() { if (!mConnectedKeys.isEmpty()) { for (Map.Entry entry : mConnectedKeys.entrySet()) { - mAdbKeyStore.setLastConnectionTime(entry.getKey(), - System.currentTimeMillis()); + mAdbKeyStore.setLastConnectionTime(entry.getKey(), mTicker.currentTimeMillis()); } sendPersistKeyStoreMessage(); mConnectedKeys.clear(); @@ -836,9 +870,7 @@ private void stopAdbDebuggingThread() { } public void handleMessage(Message msg) { - if (mAdbKeyStore == null) { - mAdbKeyStore = new AdbKeyStore(); - } + initKeyStore(); switch (msg.what) { case MESSAGE_ADB_ENABLED: @@ -873,7 +905,7 @@ public void handleMessage(Message msg) { if (!mConnectedKeys.containsKey(key)) { mConnectedKeys.put(key, 1); } - mAdbKeyStore.setLastConnectionTime(key, System.currentTimeMillis()); + mAdbKeyStore.setLastConnectionTime(key, mTicker.currentTimeMillis()); sendPersistKeyStoreMessage(); scheduleJobToUpdateAdbKeyStore(); } @@ -920,9 +952,7 @@ public void handleMessage(Message msg) { mConnectedKeys.clear(); // If the key store has not yet been instantiated then do so now; this avoids // the unnecessary creation of the key store when adb is not enabled. - if (mAdbKeyStore == null) { - mAdbKeyStore = new AdbKeyStore(); - } + initKeyStore(); mWifiConnectedKeys.clear(); mAdbKeyStore.deleteKeyStore(); cancelJobToUpdateAdbKeyStore(); @@ -937,7 +967,8 @@ public void handleMessage(Message msg) { alwaysAllow = true; int refcount = mConnectedKeys.get(key) - 1; if (refcount == 0) { - mAdbKeyStore.setLastConnectionTime(key, System.currentTimeMillis()); + mAdbKeyStore.setLastConnectionTime( + key, mTicker.currentTimeMillis()); sendPersistKeyStoreMessage(); scheduleJobToUpdateAdbKeyStore(); mConnectedKeys.remove(key); @@ -963,7 +994,7 @@ public void handleMessage(Message msg) { if (!mConnectedKeys.isEmpty()) { for (Map.Entry entry : mConnectedKeys.entrySet()) { mAdbKeyStore.setLastConnectionTime(entry.getKey(), - System.currentTimeMillis()); + mTicker.currentTimeMillis()); } sendPersistKeyStoreMessage(); scheduleJobToUpdateAdbKeyStore(); @@ -984,7 +1015,7 @@ public void handleMessage(Message msg) { } else { mConnectedKeys.put(key, mConnectedKeys.get(key) + 1); } - mAdbKeyStore.setLastConnectionTime(key, System.currentTimeMillis()); + mAdbKeyStore.setLastConnectionTime(key, mTicker.currentTimeMillis()); sendPersistKeyStoreMessage(); scheduleJobToUpdateAdbKeyStore(); logAdbConnectionChanged(key, AdbProtoEnums.AUTOMATICALLY_ALLOWED, true); @@ -1206,6 +1237,10 @@ public void handleMessage(Message msg) { } break; } + case MESSAGE_KEY_FILES_UPDATED: { + mAdbKeyStore.reloadKeyMap(); + break; + } } } @@ -1377,8 +1412,7 @@ private void onPairingResult(String publicKey) { AdbDebuggingManager.sendBroadcastWithDebugPermission(mContext, intent, UserHandle.ALL); // Add the key into the keystore - mAdbKeyStore.setLastConnectionTime(publicKey, - System.currentTimeMillis()); + mAdbKeyStore.setLastConnectionTime(publicKey, mTicker.currentTimeMillis()); sendPersistKeyStoreMessage(); scheduleJobToUpdateAdbKeyStore(); } @@ -1449,19 +1483,13 @@ private void startConfirmationForNetwork(String ssid, String bssid) { extras.add(new AbstractMap.SimpleEntry("ssid", ssid)); extras.add(new AbstractMap.SimpleEntry("bssid", bssid)); int currentUserId = ActivityManager.getCurrentUser(); - UserInfo userInfo = UserManager.get(mContext).getUserInfo(currentUserId); - String componentString; - if (userInfo.isAdmin()) { - componentString = Resources.getSystem().getString( - com.android.internal.R.string.config_customAdbWifiNetworkConfirmationComponent); - } else { - componentString = Resources.getSystem().getString( - com.android.internal.R.string.config_customAdbWifiNetworkConfirmationComponent); - } + String componentString = + Resources.getSystem().getString( + R.string.config_customAdbWifiNetworkConfirmationComponent); ComponentName componentName = ComponentName.unflattenFromString(componentString); + UserInfo userInfo = UserManager.get(mContext).getUserInfo(currentUserId); if (startConfirmationActivity(componentName, userInfo.getUserHandle(), extras) - || startConfirmationService(componentName, userInfo.getUserHandle(), - extras)) { + || startConfirmationService(componentName, userInfo.getUserHandle(), extras)) { return; } Slog.e(TAG, "Unable to start customAdbWifiNetworkConfirmation[SecondaryUser]Component " @@ -1543,7 +1571,7 @@ private Intent createConfirmationIntent(ComponentName componentName, /** * Returns a new File with the specified name in the adb directory. */ - private File getAdbFile(String fileName) { + private static File getAdbFile(String fileName) { File dataDir = Environment.getDataDirectory(); File adbDir = new File(dataDir, ADB_DIRECTORY); @@ -1556,66 +1584,38 @@ private File getAdbFile(String fileName) { } File getAdbTempKeysFile() { - return getAdbFile(ADB_TEMP_KEYS_FILE); + return mTempKeysFile; } File getUserKeyFile() { - return mTestUserKeyFile == null ? getAdbFile(ADB_KEYS_FILE) : mTestUserKeyFile; + return mUserKeyFile; } - private void writeKey(String key) { - try { - File keyFile = getUserKeyFile(); - - if (keyFile == null) { - return; - } - - FileOutputStream fo = new FileOutputStream(keyFile, true); - fo.write(key.getBytes()); - fo.write('\n'); - fo.close(); - - FileUtils.setPermissions(keyFile.toString(), - FileUtils.S_IRUSR | FileUtils.S_IWUSR | FileUtils.S_IRGRP, -1, -1); - } catch (IOException ex) { - Slog.e(TAG, "Error writing key:" + ex); + private void writeKeys(Iterable keys) { + if (mUserKeyFile == null) { + return; } - } - private void writeKeys(Iterable keys) { - AtomicFile atomicKeyFile = null; + AtomicFile atomicKeyFile = new AtomicFile(mUserKeyFile); + // Note: Do not use a try-with-resources with the FileOutputStream, because AtomicFile + // requires that it's cleaned up with AtomicFile.failWrite(); FileOutputStream fo = null; try { - File keyFile = getUserKeyFile(); - - if (keyFile == null) { - return; - } - - atomicKeyFile = new AtomicFile(keyFile); fo = atomicKeyFile.startWrite(); for (String key : keys) { fo.write(key.getBytes()); fo.write('\n'); } atomicKeyFile.finishWrite(fo); - - FileUtils.setPermissions(keyFile.toString(), - FileUtils.S_IRUSR | FileUtils.S_IWUSR | FileUtils.S_IRGRP, -1, -1); } catch (IOException ex) { Slog.e(TAG, "Error writing keys: " + ex); - if (atomicKeyFile != null) { - atomicKeyFile.failWrite(fo); - } + atomicKeyFile.failWrite(fo); + return; } - } - private void deleteKeyFile() { - File keyFile = getUserKeyFile(); - if (keyFile != null) { - keyFile.delete(); - } + FileUtils.setPermissions( + mUserKeyFile.toString(), + FileUtils.S_IRUSR | FileUtils.S_IWUSR | FileUtils.S_IRGRP, -1, -1); } /** @@ -1744,6 +1744,13 @@ public boolean isAdbWifiEnabled() { return mAdbWifiEnabled; } + /** + * Notify that they key files were updated so the AdbKeyManager reloads the keys. + */ + public void notifyKeyFilesUpdated() { + mHandler.sendEmptyMessage(AdbDebuggingHandler.MESSAGE_KEY_FILES_UPDATED); + } + /** * Sends a message to the handler to persist the keystore. */ @@ -1778,7 +1785,7 @@ public void dump(DualDumpOutputStream dump, String idName, long id) { try { dump.write("keystore", AdbDebuggingManagerProto.KEYSTORE, - FileUtils.readTextFile(getAdbTempKeysFile(), 0, null)); + FileUtils.readTextFile(mTempKeysFile, 0, null)); } catch (IOException e) { Slog.i(TAG, "Cannot read keystore: ", e); } @@ -1792,12 +1799,12 @@ public void dump(DualDumpOutputStream dump, String idName, long id) { * ADB_ALLOWED_CONNECTION_TIME setting. */ class AdbKeyStore { - private Map mKeyMap; - private Set mSystemKeys; - private File mKeyFile; private AtomicFile mAtomicKeyFile; - private List mTrustedNetworks; + private final Set mSystemKeys; + private final Map mKeyMap = new HashMap<>(); + private final List mTrustedNetworks = new ArrayList<>(); + private static final int KEYSTORE_VERSION = 1; private static final int MAX_SUPPORTED_KEYSTORE_VERSION = 1; private static final String XML_KEYSTORE_START_TAG = "keyStore"; @@ -1819,26 +1826,22 @@ class AdbKeyStore { public static final long NO_PREVIOUS_CONNECTION = 0; /** - * Constructor that uses the default location for the persistent adb keystore. + * Create an AdbKeyStore instance. + * + *

Upon creation, we parse {@link #mTempKeysFile} to determine authorized WiFi APs and + * retrieve the map of stored ADB keys and their last connected times. After that, we read + * the {@link #mUserKeyFile}, and any keys that exist in that file that do not exist in the + * map are added to the map (for backwards compatibility). */ AdbKeyStore() { - init(); - } - - /** - * Constructor that uses the specified file as the location for the persistent adb keystore. - */ - AdbKeyStore(File keyFile) { - mKeyFile = keyFile; - init(); - } - - private void init() { initKeyFile(); - mKeyMap = getKeyMap(); - mTrustedNetworks = getTrustedNetworks(); + readTempKeysFile(); mSystemKeys = getSystemKeysFromFile(SYSTEM_KEY_FILE); - addUserKeysToKeyStore(); + addExistingUserKeysToKeyStore(); + } + + public void reloadKeyMap() { + readTempKeysFile(); } public void addTrustedNetwork(String bssid) { @@ -1877,7 +1880,6 @@ public String findKeyFromFingerprint(String fingerprint) { public void removeKey(String key) { if (mKeyMap.containsKey(key)) { mKeyMap.remove(key); - writeKeys(mKeyMap.keySet()); sendPersistKeyStoreMessage(); } } @@ -1886,12 +1888,9 @@ public void removeKey(String key) { * Initializes the key file that will be used to persist the adb grants. */ private void initKeyFile() { - if (mKeyFile == null) { - mKeyFile = getAdbTempKeysFile(); - } - // getAdbTempKeysFile can return null if the adb file cannot be obtained - if (mKeyFile != null) { - mAtomicKeyFile = new AtomicFile(mKeyFile); + // mTempKeysFile can be null if the adb file cannot be obtained + if (mTempKeysFile != null) { + mAtomicKeyFile = new AtomicFile(mTempKeysFile); } } @@ -1932,201 +1931,108 @@ public void updateKeyStore() { } /** - * Returns the key map with the keys and last connection times from the key file. + * Update the key map and the trusted networks list with values parsed from the temp keys + * file. */ - private Map getKeyMap() { - Map keyMap = new HashMap(); - // if the AtomicFile could not be instantiated before attempt again; if it still fails - // return an empty key map. + private void readTempKeysFile() { + mKeyMap.clear(); + mTrustedNetworks.clear(); if (mAtomicKeyFile == null) { initKeyFile(); if (mAtomicKeyFile == null) { - Slog.e(TAG, "Unable to obtain the key file, " + mKeyFile + ", for reading"); - return keyMap; + Slog.e( + TAG, + "Unable to obtain the key file, " + mTempKeysFile + ", for reading"); + return; } } if (!mAtomicKeyFile.exists()) { - return keyMap; + return; } try (FileInputStream keyStream = mAtomicKeyFile.openRead()) { - TypedXmlPullParser parser = Xml.resolvePullParser(keyStream); - // Check for supported keystore version. - XmlUtils.beginDocument(parser, XML_KEYSTORE_START_TAG); - if (parser.next() != XmlPullParser.END_DOCUMENT) { - String tagName = parser.getName(); - if (tagName == null || !XML_KEYSTORE_START_TAG.equals(tagName)) { - Slog.e(TAG, "Expected " + XML_KEYSTORE_START_TAG + ", but got tag=" - + tagName); - return keyMap; - } + TypedXmlPullParser parser; + try { + parser = Xml.resolvePullParser(keyStream); + XmlUtils.beginDocument(parser, XML_KEYSTORE_START_TAG); + int keystoreVersion = parser.getAttributeInt(null, XML_ATTRIBUTE_VERSION); if (keystoreVersion > MAX_SUPPORTED_KEYSTORE_VERSION) { Slog.e(TAG, "Keystore version=" + keystoreVersion + " not supported (max_supported=" + MAX_SUPPORTED_KEYSTORE_VERSION + ")"); - return keyMap; - } - } - while (parser.next() != XmlPullParser.END_DOCUMENT) { - String tagName = parser.getName(); - if (tagName == null) { - break; - } else if (!tagName.equals(XML_TAG_ADB_KEY)) { - XmlUtils.skipCurrentTag(parser); - continue; - } - String key = parser.getAttributeValue(null, XML_ATTRIBUTE_KEY); - long connectionTime; - try { - connectionTime = parser.getAttributeLong(null, - XML_ATTRIBUTE_LAST_CONNECTION); - } catch (XmlPullParserException e) { - Slog.e(TAG, - "Caught a NumberFormatException parsing the last connection time: " - + e); - XmlUtils.skipCurrentTag(parser); - continue; + return; } - keyMap.put(key, connectionTime); + } catch (XmlPullParserException e) { + // This could be because the XML document doesn't start with + // XML_KEYSTORE_START_TAG. Try again, instead just starting the document with + // the adbKey tag (the old format). + parser = Xml.resolvePullParser(keyStream); } + readKeyStoreContents(parser); } catch (IOException e) { Slog.e(TAG, "Caught an IOException parsing the XML key file: ", e); } catch (XmlPullParserException e) { - Slog.w(TAG, "Caught XmlPullParserException parsing the XML key file: ", e); - // The file could be written in a format prior to introducing keystore tag. - return getKeyMapBeforeKeystoreVersion(); + Slog.e(TAG, "Caught XmlPullParserException parsing the XML key file: ", e); + } + } + + private void readKeyStoreContents(TypedXmlPullParser parser) + throws XmlPullParserException, IOException { + // This parser is very forgiving. For backwards-compatibility, we simply iterate through + // all the tags in the file, skipping over anything that's not an tag or a + // tag. Invalid tags (such as ones that don't have a valid "lastConnection" + // attribute) are simply ignored. + while ((parser.next()) != XmlPullParser.END_DOCUMENT) { + String tagName = parser.getName(); + if (XML_TAG_ADB_KEY.equals(tagName)) { + addAdbKeyToKeyMap(parser); + } else if (XML_TAG_WIFI_ACCESS_POINT.equals(tagName)) { + addTrustedNetworkToTrustedNetworks(parser); + } else { + Slog.w(TAG, "Ignoring tag '" + tagName + "'. Not recognized."); + } + XmlUtils.skipCurrentTag(parser); } - return keyMap; } - - /** - * Returns the key map with the keys and last connection times from the key file. - * This implementation was prior to adding the XML_KEYSTORE_START_TAG. - */ - private Map getKeyMapBeforeKeystoreVersion() { - Map keyMap = new HashMap(); - // if the AtomicFile could not be instantiated before attempt again; if it still fails - // return an empty key map. - if (mAtomicKeyFile == null) { - initKeyFile(); - if (mAtomicKeyFile == null) { - Slog.e(TAG, "Unable to obtain the key file, " + mKeyFile + ", for reading"); - return keyMap; - } - } - if (!mAtomicKeyFile.exists()) { - return keyMap; - } - try (FileInputStream keyStream = mAtomicKeyFile.openRead()) { - TypedXmlPullParser parser = Xml.resolvePullParser(keyStream); - XmlUtils.beginDocument(parser, XML_TAG_ADB_KEY); - while (parser.next() != XmlPullParser.END_DOCUMENT) { - String tagName = parser.getName(); - if (tagName == null) { - break; - } else if (!tagName.equals(XML_TAG_ADB_KEY)) { - XmlUtils.skipCurrentTag(parser); - continue; - } - String key = parser.getAttributeValue(null, XML_ATTRIBUTE_KEY); - long connectionTime; - try { - connectionTime = parser.getAttributeLong(null, - XML_ATTRIBUTE_LAST_CONNECTION); - } catch (XmlPullParserException e) { - Slog.e(TAG, - "Caught a NumberFormatException parsing the last connection time: " - + e); - XmlUtils.skipCurrentTag(parser); - continue; - } - keyMap.put(key, connectionTime); - } - } catch (IOException | XmlPullParserException e) { - Slog.e(TAG, "Caught an exception parsing the XML key file: ", e); + private void addAdbKeyToKeyMap(TypedXmlPullParser parser) { + String key = parser.getAttributeValue(null, XML_ATTRIBUTE_KEY); + try { + long connectionTime = + parser.getAttributeLong(null, XML_ATTRIBUTE_LAST_CONNECTION); + mKeyMap.put(key, connectionTime); + } catch (XmlPullParserException e) { + Slog.e(TAG, "Error reading adbKey attributes", e); } - return keyMap; } - /** - * Returns the map of trusted networks from the keystore file. - * - * This was implemented in keystore version 1. - */ - private List getTrustedNetworks() { - List trustedNetworks = new ArrayList(); - // if the AtomicFile could not be instantiated before attempt again; if it still fails - // return an empty key map. - if (mAtomicKeyFile == null) { - initKeyFile(); - if (mAtomicKeyFile == null) { - Slog.e(TAG, "Unable to obtain the key file, " + mKeyFile + ", for reading"); - return trustedNetworks; - } - } - if (!mAtomicKeyFile.exists()) { - return trustedNetworks; - } - try (FileInputStream keyStream = mAtomicKeyFile.openRead()) { - TypedXmlPullParser parser = Xml.resolvePullParser(keyStream); - // Check for supported keystore version. - XmlUtils.beginDocument(parser, XML_KEYSTORE_START_TAG); - if (parser.next() != XmlPullParser.END_DOCUMENT) { - String tagName = parser.getName(); - if (tagName == null || !XML_KEYSTORE_START_TAG.equals(tagName)) { - Slog.e(TAG, "Expected " + XML_KEYSTORE_START_TAG + ", but got tag=" - + tagName); - return trustedNetworks; - } - int keystoreVersion = parser.getAttributeInt(null, XML_ATTRIBUTE_VERSION); - if (keystoreVersion > MAX_SUPPORTED_KEYSTORE_VERSION) { - Slog.e(TAG, "Keystore version=" + keystoreVersion - + " not supported (max_supported=" - + MAX_SUPPORTED_KEYSTORE_VERSION); - return trustedNetworks; - } - } - while (parser.next() != XmlPullParser.END_DOCUMENT) { - String tagName = parser.getName(); - if (tagName == null) { - break; - } else if (!tagName.equals(XML_TAG_WIFI_ACCESS_POINT)) { - XmlUtils.skipCurrentTag(parser); - continue; - } - String bssid = parser.getAttributeValue(null, XML_ATTRIBUTE_WIFI_BSSID); - trustedNetworks.add(bssid); - } - } catch (IOException | XmlPullParserException | NumberFormatException e) { - Slog.e(TAG, "Caught an exception parsing the XML key file: ", e); - } - return trustedNetworks; + private void addTrustedNetworkToTrustedNetworks(TypedXmlPullParser parser) { + String bssid = parser.getAttributeValue(null, XML_ATTRIBUTE_WIFI_BSSID); + mTrustedNetworks.add(bssid); } /** * Updates the keystore with keys that were previously set to be always allowed before the * connection time of keys was tracked. */ - private void addUserKeysToKeyStore() { - File userKeyFile = getUserKeyFile(); + private void addExistingUserKeysToKeyStore() { + if (mUserKeyFile == null || !mUserKeyFile.exists()) { + return; + } boolean mapUpdated = false; - if (userKeyFile != null && userKeyFile.exists()) { - try (BufferedReader in = new BufferedReader(new FileReader(userKeyFile))) { - long time = System.currentTimeMillis(); - String key; - while ((key = in.readLine()) != null) { - // if the keystore does not contain the key from the user key file then add - // it to the Map with the current system time to prevent it from expiring - // immediately if the user is actively using this key. - if (!mKeyMap.containsKey(key)) { - mKeyMap.put(key, time); - mapUpdated = true; - } + try (BufferedReader in = new BufferedReader(new FileReader(mUserKeyFile))) { + String key; + while ((key = in.readLine()) != null) { + // if the keystore does not contain the key from the user key file then add + // it to the Map with the current system time to prevent it from expiring + // immediately if the user is actively using this key. + if (!mKeyMap.containsKey(key)) { + mKeyMap.put(key, mTicker.currentTimeMillis()); + mapUpdated = true; } - } catch (IOException e) { - Slog.e(TAG, "Caught an exception reading " + userKeyFile + ": " + e); } + } catch (IOException e) { + Slog.e(TAG, "Caught an exception reading " + mUserKeyFile + ": " + e); } if (mapUpdated) { sendPersistKeyStoreMessage(); @@ -2147,7 +2053,9 @@ public void persistKeyStore() { if (mAtomicKeyFile == null) { initKeyFile(); if (mAtomicKeyFile == null) { - Slog.e(TAG, "Unable to obtain the key file, " + mKeyFile + ", for writing"); + Slog.e( + TAG, + "Unable to obtain the key file, " + mTempKeysFile + ", for writing"); return; } } @@ -2178,17 +2086,21 @@ public void persistKeyStore() { Slog.e(TAG, "Caught an exception writing the key map: ", e); mAtomicKeyFile.failWrite(keyStream); } + writeKeys(mKeyMap.keySet()); } private boolean filterOutOldKeys() { - boolean keysDeleted = false; long allowedTime = getAllowedConnectionTime(); - long systemTime = System.currentTimeMillis(); + if (allowedTime == 0) { + return false; + } + boolean keysDeleted = false; + long systemTime = mTicker.currentTimeMillis(); Iterator> keyMapIterator = mKeyMap.entrySet().iterator(); while (keyMapIterator.hasNext()) { Map.Entry keyEntry = keyMapIterator.next(); long connectionTime = keyEntry.getValue(); - if (allowedTime != 0 && systemTime > (connectionTime + allowedTime)) { + if (systemTime > (connectionTime + allowedTime)) { keyMapIterator.remove(); keysDeleted = true; } @@ -2212,7 +2124,7 @@ public long getNextExpirationTime() { if (allowedTime == 0) { return minExpiration; } - long systemTime = System.currentTimeMillis(); + long systemTime = mTicker.currentTimeMillis(); Iterator> keyMapIterator = mKeyMap.entrySet().iterator(); while (keyMapIterator.hasNext()) { Map.Entry keyEntry = keyMapIterator.next(); @@ -2233,7 +2145,9 @@ public long getNextExpirationTime() { public void deleteKeyStore() { mKeyMap.clear(); mTrustedNetworks.clear(); - deleteKeyFile(); + if (mUserKeyFile != null) { + mUserKeyFile.delete(); + } if (mAtomicKeyFile == null) { return; } @@ -2260,7 +2174,8 @@ public void setLastConnectionTime(String key, long connectionTime) { * is set to true the time will be set even if it is older than the previously written * connection time. */ - public void setLastConnectionTime(String key, long connectionTime, boolean force) { + @VisibleForTesting + void setLastConnectionTime(String key, long connectionTime, boolean force) { // Do not set the connection time to a value that is earlier than what was previously // stored as the last connection time unless force is set. if (mKeyMap.containsKey(key) && mKeyMap.get(key) >= connectionTime && !force) { @@ -2271,11 +2186,6 @@ public void setLastConnectionTime(String key, long connectionTime, boolean force if (mSystemKeys.contains(key)) { return; } - // if this is the first time the key is being added then write it to the key file as - // well. - if (!mKeyMap.containsKey(key)) { - writeKey(key); - } mKeyMap.put(key, connectionTime); } @@ -2307,12 +2217,8 @@ public boolean isKeyAuthorized(String key) { long allowedConnectionTime = getAllowedConnectionTime(); // if the allowed connection time is 0 then revert to the previous behavior of always // allowing previously granted adb grants. - if (allowedConnectionTime == 0 || (System.currentTimeMillis() < (lastConnectionTime - + allowedConnectionTime))) { - return true; - } else { - return false; - } + return allowedConnectionTime == 0 + || (mTicker.currentTimeMillis() < (lastConnectionTime + allowedConnectionTime)); } /** @@ -2324,4 +2230,15 @@ public boolean isTrustedNetwork(String bssid) { return mTrustedNetworks.contains(bssid); } } + + /** + * A Guava-like interface for getting the current system time. + * + * This allows us to swap a fake ticker in for testing to reduce "Thread.sleep()" calls and test + * for exact expected times instead of random ones. + */ + @VisibleForTesting + interface Ticker { + long currentTimeMillis(); + } } diff --git a/services/core/java/com/android/server/adb/AdbService.java b/services/core/java/com/android/server/adb/AdbService.java index 5d0c732d5f48..55d8dba69626 100644 --- a/services/core/java/com/android/server/adb/AdbService.java +++ b/services/core/java/com/android/server/adb/AdbService.java @@ -151,6 +151,14 @@ public File getAdbTempKeysFile() { return mDebuggingManager == null ? null : mDebuggingManager.getAdbTempKeysFile(); } + @Override + public void notifyKeyFilesUpdated() { + if (mDebuggingManager == null) { + return; + } + mDebuggingManager.notifyKeyFilesUpdated(); + } + @Override public void startAdbdForTransport(byte transportType) { FgThread.getHandler().sendMessage(obtainMessage( diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index a78c64b6538d..9f1b328aaa05 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -1602,6 +1602,10 @@ public void binderDied() { volatile ActivityManagerInternal.VoiceInteractionManagerProvider mVoiceInteractionManagerProvider; + // Swipe to screenshot + final SwipeToScreenshotObserver mSwipeToScreenshotObserver; + private boolean mIsSwipeToScrenshotEnabled; + final class UiHandler extends Handler { public UiHandler() { super(com.android.server.UiThread.get().getLooper(), null, true); @@ -2352,6 +2356,7 @@ public ActivityManagerService(Injector injector, ServiceThread handlerThread) { mFgBroadcastQueue = mBgBroadcastQueue = mBgOffloadBroadcastQueue = mFgOffloadBroadcastQueue = null; mComponentAliasResolver = new ComponentAliasResolver(this); + mSwipeToScreenshotObserver = null; } // Note: This method is invoked on the main thread but may need to attach various @@ -2485,6 +2490,7 @@ public ActivityManagerService(Context systemContext, ActivityTaskManagerService mPendingStartActivityUids = new PendingStartActivityUids(mContext); mTraceErrorLogger = new TraceErrorLogger(); mComponentAliasResolver = new ComponentAliasResolver(this); + mSwipeToScreenshotObserver = new SwipeToScreenshotObserver(mHandler, mContext); } public void setSystemServiceManager(SystemServiceManager mgr) { @@ -7045,7 +7051,7 @@ public boolean isUserAMonkey() { @Override public void requestSystemServerHeapDump() { - if (!Build.IS_DEBUGGABLE) { + if (!Build.IS_ENG) { Slog.wtf(TAG, "requestSystemServerHeapDump called on a user build"); return; } @@ -8031,6 +8037,7 @@ private void retrieveSettings() { } mAppErrors.loadAppsNotReportingCrashesFromConfig(res.getString( com.android.internal.R.string.config_appsNotReportingCrashes)); + mSwipeToScreenshotObserver.registerObserver(); } /** @@ -8893,9 +8900,9 @@ public void run() { InputStreamReader input = null; try { java.lang.Process logcat = new ProcessBuilder( - // Time out after 10s, but kill logcat with SEGV + // Time out after 10s of inactivity, but kill logcat with SEGV // so we can investigate why it didn't finish. - "/system/bin/timeout", "-s", "SEGV", "10s", + "/system/bin/timeout", "-i", "-s", "SEGV", "10s", // Merge several logcat streams, and take the last N lines. "/system/bin/logcat", "-v", "threadtime", "-b", "events", "-b", "system", "-b", "main", "-b", "crash", "-t", String.valueOf(lines)) @@ -18477,4 +18484,38 @@ static void traceBegin(long traceTag, String methodName, String subInfo) { Trace.traceBegin(traceTag, methodName + subInfo); } } + + private class SwipeToScreenshotObserver extends ContentObserver { + + private final Context mContext; + + public SwipeToScreenshotObserver(Handler handler, Context context) { + super(handler); + mContext = context; + } + + public void registerObserver() { + mContext.getContentResolver().registerContentObserver( + Settings.System.getUriFor(Settings.System.SWIPE_TO_SCREENSHOT), + false, this, UserHandle.USER_ALL); + update(); + } + + private void update() { + mIsSwipeToScrenshotEnabled = Settings.System.getIntForUser(mContext.getContentResolver(), + Settings.System.SWIPE_TO_SCREENSHOT, 0, UserHandle.USER_CURRENT) == 1; + } + + public void onChange(boolean selfChange) { + update(); + } + } + + @Override + public boolean isSwipeToScreenshotGestureActive() { + synchronized (this) { + return mIsSwipeToScrenshotEnabled && SystemProperties.getBoolean("sys.android.screenshot", false); + } + } + } diff --git a/services/core/java/com/android/server/am/AppRestrictionController.java b/services/core/java/com/android/server/am/AppRestrictionController.java index 6076eb1f69ee..7a09ce722f94 100644 --- a/services/core/java/com/android/server/am/AppRestrictionController.java +++ b/services/core/java/com/android/server/am/AppRestrictionController.java @@ -2790,13 +2790,6 @@ int getBackgroundRestrictionExemptionReason(int uid) { if (isOnSystemDeviceIdleAllowlist(uid)) { return REASON_SYSTEM_ALLOW_LISTED; } - if (isOnDeviceIdleAllowlist(uid)) { - return REASON_ALLOWLISTED_PACKAGE; - } - final ActivityManagerInternal am = mInjector.getActivityManagerInternal(); - if (am.isAssociatedCompanionApp(UserHandle.getUserId(uid), uid)) { - return REASON_COMPANION_DEVICE_MANAGER; - } if (UserManager.isDeviceInDemoMode(mContext)) { return REASON_DEVICE_DEMO_MODE; } @@ -2805,6 +2798,7 @@ int getBackgroundRestrictionExemptionReason(int uid) { .hasUserRestriction(UserManager.DISALLOW_APPS_CONTROL, userId)) { return REASON_DISALLOW_APPS_CONTROL; } + final ActivityManagerInternal am = mInjector.getActivityManagerInternal(); if (am.isDeviceOwner(uid)) { return REASON_DEVICE_OWNER; } @@ -2822,14 +2816,9 @@ int getBackgroundRestrictionExemptionReason(int uid) { final AppOpsManager appOpsManager = mInjector.getAppOpsManager(); final PackageManagerInternal pm = mInjector.getPackageManagerInternal(); final AppStandbyInternal appStandbyInternal = mInjector.getAppStandbyInternal(); + // Check each packages to see if any of them is in the "fixed" exemption cases. for (String pkg : packages) { - if (appOpsManager.checkOpNoThrow(AppOpsManager.OP_ACTIVATE_VPN, - uid, pkg) == AppOpsManager.MODE_ALLOWED) { - return REASON_OP_ACTIVATE_VPN; - } else if (appOpsManager.checkOpNoThrow(AppOpsManager.OP_ACTIVATE_PLATFORM_VPN, - uid, pkg) == AppOpsManager.MODE_ALLOWED) { - return REASON_OP_ACTIVATE_PLATFORM_VPN; - } else if (isSystemModule(pkg)) { + if (isSystemModule(pkg)) { return REASON_SYSTEM_MODULE; } else if (isCarrierApp(pkg)) { return REASON_CARRIER_PRIVILEGED_APP; @@ -2843,6 +2832,16 @@ int getBackgroundRestrictionExemptionReason(int uid) { return REASON_ACTIVE_DEVICE_ADMIN; } } + // Loop the packages again, and check the user-configurable exemptions. + for (String pkg : packages) { + if (appOpsManager.checkOpNoThrow(AppOpsManager.OP_ACTIVATE_VPN, + uid, pkg) == AppOpsManager.MODE_ALLOWED) { + return REASON_OP_ACTIVATE_VPN; + } else if (appOpsManager.checkOpNoThrow(AppOpsManager.OP_ACTIVATE_PLATFORM_VPN, + uid, pkg) == AppOpsManager.MODE_ALLOWED) { + return REASON_OP_ACTIVATE_PLATFORM_VPN; + } + } } if (isRoleHeldByUid(RoleManager.ROLE_DIALER, uid)) { return REASON_ROLE_DIALER; @@ -2850,6 +2849,12 @@ int getBackgroundRestrictionExemptionReason(int uid) { if (isRoleHeldByUid(RoleManager.ROLE_EMERGENCY, uid)) { return REASON_ROLE_EMERGENCY; } + if (isOnDeviceIdleAllowlist(uid)) { + return REASON_ALLOWLISTED_PACKAGE; + } + if (am.isAssociatedCompanionApp(UserHandle.getUserId(uid), uid)) { + return REASON_COMPANION_DEVICE_MANAGER; + } return REASON_DENIED; } diff --git a/services/core/java/com/android/server/am/OomAdjuster.java b/services/core/java/com/android/server/am/OomAdjuster.java index e7fcc5989467..f7fbbe4ebead 100644 --- a/services/core/java/com/android/server/am/OomAdjuster.java +++ b/services/core/java/com/android/server/am/OomAdjuster.java @@ -1482,7 +1482,9 @@ private boolean computeOomAdjLSP(ProcessRecord app, int cachedAdj, if (!cycleReEval) { // Don't reset this flag when doing cycles re-evaluation. state.setNoKillOnBgRestrictedAndIdle(false); - app.mOptRecord.setShouldNotFreeze(false); + // If this UID is currently allowlisted, it should not be frozen. + final UidRecord uidRec = app.getUidRecord(); + app.mOptRecord.setShouldNotFreeze(uidRec != null && uidRec.isCurAllowListed()); } final int appUid = app.info.uid; diff --git a/services/core/java/com/android/server/am/ProcessList.java b/services/core/java/com/android/server/am/ProcessList.java index 92a8dcd2ba8f..b8d99655f654 100644 --- a/services/core/java/com/android/server/am/ProcessList.java +++ b/services/core/java/com/android/server/am/ProcessList.java @@ -720,8 +720,8 @@ public void handleMessage(Message msg) { break; case LMKD_RECONNECT_MSG: if (!sLmkdConnection.connect()) { - Slog.i(TAG, "Failed to connect to lmkd, retry after " + - LMKD_RECONNECT_DELAY_MS + " ms"); + //Slog.i(TAG, "Failed to connect to lmkd, retry after " + + //LMKD_RECONNECT_DELAY_MS + " ms"); // retry after LMKD_RECONNECT_DELAY_MS sKillHandler.sendMessageDelayed(sKillHandler.obtainMessage( KillHandler.LMKD_RECONNECT_MSG), LMKD_RECONNECT_DELAY_MS); diff --git a/services/core/java/com/android/server/am/UserController.java b/services/core/java/com/android/server/am/UserController.java index 7ffea26638f5..b4755ba78fb5 100644 --- a/services/core/java/com/android/server/am/UserController.java +++ b/services/core/java/com/android/server/am/UserController.java @@ -71,6 +71,7 @@ import android.content.pm.UserInfo; import android.os.BatteryStats; import android.os.Binder; +import android.os.Build; import android.os.Bundle; import android.os.Debug; import android.os.Handler; @@ -750,7 +751,7 @@ private void finishUserUnlocked(final UserState uss) { // purposefully block sending BOOT_COMPLETED until after all // PRE_BOOT receivers are finished to avoid ANR'ing apps final UserInfo info = getUserInfo(userId); - if (!Objects.equals(info.lastLoggedInFingerprint, PackagePartitions.FINGERPRINT) + if (!Objects.equals(info.lastLoggedInFingerprint, String.valueOf(Build.TIME)) || SystemProperties.getBoolean("persist.pm.mock-upgrade", false)) { // Suppress double notifications for managed profiles that // were unlocked automatically as part of their parent user being diff --git a/services/core/java/com/android/server/app/AppLockConfig.kt b/services/core/java/com/android/server/app/AppLockConfig.kt new file mode 100644 index 000000000000..59e56d8dfb9e --- /dev/null +++ b/services/core/java/com/android/server/app/AppLockConfig.kt @@ -0,0 +1,251 @@ +/* + * Copyright (C) 2022 FlamingoOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.app + +import android.app.AppLockData +import android.app.AppLockManager.DEFAULT_BIOMETRICS_ALLOWED +import android.app.AppLockManager.DEFAULT_TIMEOUT +import android.os.FileUtils +import android.os.FileUtils.S_IRWXU +import android.os.FileUtils.S_IRWXG +import android.util.ArrayMap +import android.util.Slog + +import java.io.File +import java.io.IOException + +import org.json.JSONArray +import org.json.JSONException +import org.json.JSONObject + +private const val APP_LOCK_DIR_NAME = "app_lock" +private const val APP_LOCK_CONFIG_FILE = "app_lock_config.json" + +private const val CURRENT_VERSION = 1 + +// Only in version 0 +private const val KEY_PACKAGES = "packages" +private const val KEY_SECURE_NOTIFICATION = "secure_notification" + +// From version 1 and up. Non existent version key +// is considered as version 0 +private const val KEY_VERSION = "version" +private const val KEY_TIMEOUT = "timeout" +private const val KEY_APP_LOCK_DATA_LIST = "app_lock_data_list" +private const val KEY_PACKAGE_NAME = "package_name" +private const val KEY_REDACT_NOTIFICATION = "redact_notification" +private const val KEY_BIOMETRICS_ALLOWED = "biometrics_allowed" + +/** + * Container for app lock configuration. Also handles logic of reading + * and writing configuration to disk, serialized as a JSON file. + * All operations must be synchronized with an external lock. + * + * @hide + */ +internal class AppLockConfig(dataDir: File) { + + private val appLockDir = File(dataDir, APP_LOCK_DIR_NAME) + private val appLockConfigFile = File(appLockDir, APP_LOCK_CONFIG_FILE) + + private val appLockDataMap = ArrayMap() + + var appLockTimeout: Long = DEFAULT_TIMEOUT + var biometricsAllowed = DEFAULT_BIOMETRICS_ALLOWED + + init { + appLockDir.mkdirs() + FileUtils.setPermissions(appLockDir, S_IRWXU or S_IRWXG, -1, -1) + } + + /** + * Add an application to [appLockDataMap]. + * + * @param packageName the package name of the application. + * @return true if package was added, false if already exists. + */ + fun addPackage(packageName: String): Boolean { + return appLockDataMap.put(packageName, AppLockData(packageName, false)) == null + } + + /** + * Remove an application from [appLockDataMap]. + * + * @param packageName the package name of the application. + * @return true if package was removed, false otherwise. + */ + fun removePackage(packageName: String): Boolean { + return appLockDataMap.remove(packageName) != null + } + + /** + * Get all the packages protected with app lock. + * + * @return a unique list of package names. + */ + fun getAppLockDataList(): List { + return appLockDataMap.values.toList() + } + + /** + * Check whether a package is protected with app lock. + * + * @return true if package is protected, false otherwise. + */ + fun isPackageProtected(packageName: String): Boolean { + return appLockDataMap.containsKey(packageName) + } + + /** + * Set notifications as protected or not for an application + * in [appLockDataMap]. + * + * @param packageName the package name of the application. + * @return true if config was changed, false otherwise. + */ + fun setShouldRedactNotification(packageName: String, secure: Boolean): Boolean { + return appLockDataMap[packageName]?.let { + appLockDataMap[packageName] = AppLockData( + it.packageName, + secure + ) + true + } ?: run { + Slog.e(TAG, "Attempt to set secure " + + "notification field for package that is not in list") + false + } + } + + /** + * Check whether notifications are protected or not for an application + * in [appLockDataMap]. + * + * @param packageName the package name of the application. + * @return true if notification contents are redacted in app locked state, + * false otherwise. + */ + fun shouldRedactNotification(packageName: String): Boolean { + return appLockDataMap[packageName]?.shouldRedactNotification == true + } + + /** + * Parse contents from [appLockConfigFile]. + */ + fun read() { + reset() + if (!appLockConfigFile.isFile) { + Slog.i(TAG, "No configuration saved") + return + } + try { + appLockConfigFile.inputStream().bufferedReader().use { + val rootObject = JSONObject(it.readText()) + + val version = rootObject.optInt(KEY_VERSION, 0) + migrateData(rootObject, version) + + appLockTimeout = rootObject.optLong(KEY_TIMEOUT, DEFAULT_TIMEOUT) + biometricsAllowed = rootObject.optBoolean(KEY_BIOMETRICS_ALLOWED, DEFAULT_BIOMETRICS_ALLOWED) + val appLockDataList = rootObject.optJSONArray(KEY_APP_LOCK_DATA_LIST) ?: return@use + for (i in 0 until appLockDataList.length()) { + val appLockData = appLockDataList.getJSONObject(i) + val packageName = appLockData.getString(KEY_PACKAGE_NAME) + appLockDataMap[packageName] = AppLockData( + packageName, + appLockData.getBoolean(KEY_REDACT_NOTIFICATION) + ) + } + } + } catch(e: IOException) { + Slog.wtf(TAG, "Failed to read config file", e) + } catch(e: JSONException) { + Slog.wtf(TAG, "Failed to parse config file", e) + } + logD { + "readConfig: data = $appLockDataMap, " + + "timeout = $appLockTimeout" + } + } + + private fun reset() { + appLockDataMap.clear() + appLockTimeout = DEFAULT_TIMEOUT + biometricsAllowed = DEFAULT_BIOMETRICS_ALLOWED + } + + private fun migrateData(jsonData: JSONObject, dataVersion: Int) { + Slog.i(TAG, "Migrating data from version $dataVersion") + when (dataVersion) { + 0 -> { + val packageObject = jsonData.remove(KEY_PACKAGES) as? JSONObject + if (packageObject != null) { + val appLockDataList = JSONArray() + packageObject.keys().forEach { pkg -> + val isSecure = packageObject.getJSONObject(pkg) + .optBoolean(KEY_SECURE_NOTIFICATION, false) + appLockDataList.put( + JSONObject() + .put(KEY_PACKAGE_NAME, pkg) + .put(KEY_REDACT_NOTIFICATION, isSecure) + ) + } + jsonData.put(KEY_APP_LOCK_DATA_LIST, appLockDataList) + } + } + else -> throw IllegalArgumentException("Unknown data version $dataVersion") + } + val nextVersion = dataVersion + 1 + if (nextVersion != CURRENT_VERSION) { + migrateData(jsonData, nextVersion) + } + } + + /** + * Write contents to [appLockConfigFile]. + */ + fun write() { + val rootObject = JSONObject() + try { + rootObject.put(KEY_TIMEOUT, appLockTimeout) + rootObject.put(KEY_BIOMETRICS_ALLOWED, biometricsAllowed) + rootObject.put( + KEY_APP_LOCK_DATA_LIST, + JSONArray( + appLockDataMap.values.map { + JSONObject().apply { + put(KEY_PACKAGE_NAME, it.packageName) + put(KEY_REDACT_NOTIFICATION, it.shouldRedactNotification) + } + } + ) + ) + } catch(e: JSONException) { + Slog.wtf(TAG, "Failed to create json configuration", e) + return + } + try { + appLockConfigFile.outputStream().bufferedWriter().use { + val flattenedString = rootObject.toString(4) + it.write(flattenedString, 0, flattenedString.length) + it.flush() + } + } catch(e: IOException) { + Slog.wtf(TAG, "Failed to write config to file", e) + } + } +} \ No newline at end of file diff --git a/services/core/java/com/android/server/app/AppLockManagerService.kt b/services/core/java/com/android/server/app/AppLockManagerService.kt new file mode 100644 index 000000000000..b51bfdd9708b --- /dev/null +++ b/services/core/java/com/android/server/app/AppLockManagerService.kt @@ -0,0 +1,1122 @@ +/* + * Copyright (C) 2022 FlamingoOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.app + +import android.Manifest +import android.annotation.RequiresPermission +import android.app.Activity +import android.app.ActivityManager +import android.app.ActivityManagerInternal +import android.app.ActivityOptions +import android.app.ActivityTaskManager +import android.app.AlarmManager +import android.app.AppLockData +import android.app.AppLockManager +import android.app.IAppLockManagerService +import android.app.KeyguardManager +import android.app.PendingIntent +import android.app.TaskStackListener +import android.content.BroadcastReceiver +import android.content.Context +import android.content.Intent +import android.content.IntentFilter +import android.content.IntentSender +import android.content.pm.PackageManager +import android.content.pm.PackageManagerInternal +import android.os.Binder +import android.os.Environment +import android.os.Process +import android.os.RemoteException +import android.os.SystemClock +import android.os.UserHandle +import android.util.ArrayMap +import android.util.ArraySet +import android.util.Log +import android.util.Slog + +import com.android.internal.R +import com.android.internal.annotations.GuardedBy +import com.android.server.LocalServices +import com.android.server.SystemService +import com.android.server.notification.NotificationManagerInternal +import com.android.server.pm.UserManagerInternal +import com.android.server.wm.ActivityInterceptorCallback.ActivityInterceptorInfo +import com.android.server.wm.ActivityTaskManagerInternal + +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.Job +import kotlinx.coroutines.launch +import kotlinx.coroutines.runBlocking +import kotlinx.coroutines.sync.Mutex +import kotlinx.coroutines.sync.withLock +import kotlinx.coroutines.withContext + +internal val TAG = AppLockManagerService::class.simpleName + +private const val ACTION_APP_LOCK_TIMEOUT = "com.android.server.app.AppLockManagerService.APP_LOCK_TIMEOUT" +private const val SETTINGS_PACKAGE = "com.android.settings" + +internal inline fun logD(crossinline msg: () -> String) { + if (Log.isLoggable(TAG, Log.DEBUG)) { + Slog.d(TAG, msg()) + } +} + +/** + * Service to manage per app lock. + * + * @hide + */ +class AppLockManagerService( + private val context: Context +) : IAppLockManagerService.Stub() { + + private val localService = LocalService() + private val serviceScope = CoroutineScope(Dispatchers.Default) + + private val currentUserId: Int + get() = activityManagerInternal.currentUserId + + private var isDeviceSecure = false + + private val mutex = Mutex() + + @GuardedBy("mutex") + private val userConfigMap = ArrayMap() + + @GuardedBy("mutex") + private val topPackages = ArraySet() + + @GuardedBy("mutex") + private val unlockedPackages = ArraySet() + + private val biometricUnlocker: BiometricUnlocker by lazy { + BiometricUnlocker(context) + } + + private val atmInternal: ActivityTaskManagerInternal by lazy { + LocalServices.getService(ActivityTaskManagerInternal::class.java) + } + + private val notificationManagerInternal: NotificationManagerInternal by lazy { + LocalServices.getService(NotificationManagerInternal::class.java) + } + + private val keyguardManager: KeyguardManager by lazy { + context.getSystemService(KeyguardManager::class.java) + } + + private val alarmManager: AlarmManager by lazy { + context.getSystemService(AlarmManager::class.java) + } + + private val userManagerInternal: UserManagerInternal by lazy { + LocalServices.getService(UserManagerInternal::class.java) + } + + private val activityManagerInternal: ActivityManagerInternal by lazy { + LocalServices.getService(ActivityManagerInternal::class.java) + } + + private val packageManager: PackageManager by lazy { + context.packageManager + } + + private val pmInternal: PackageManagerInternal by lazy { + LocalServices.getService(PackageManagerInternal::class.java) + } + + private var deviceLocked = false + + private val alarmsMutex = Mutex() + + @GuardedBy("alarmsMutex") + private val scheduledAlarms = ArrayMap() + + private val whiteListedSystemApps: List by lazy { + val systemPackages = pmInternal.getInstalledApplications( + PackageManager.MATCH_SYSTEM_ONLY.toLong(), + currentUserId, + Process.myUid() + ).map { it.packageName } + context.resources.getStringArray(R.array.config_appLockAllowedSystemApps).filter { + systemPackages.contains(it) + } + } + + private val packageChangeReceiver = object : BroadcastReceiver() { + override fun onReceive(context: Context?, intent: Intent?) { + if (intent?.action != Intent.ACTION_PACKAGE_REMOVED) return + val userId = getSendingUserId() + if (userId != currentUserId) { + logD { + "Ignoring package removal broadcast from user $userId" + } + return + } + val isReplacing = intent.getBooleanExtra(Intent.EXTRA_REPLACING, false /* defaultValue */) + if (isReplacing) { + logD { + "Ignoring package update broadcast" + } + return + } + val packageName = intent.data?.schemeSpecificPart ?: run { + Slog.e(TAG, "Failed to get package name") + return + } + serviceScope.launch { + val config = mutex.withLock { + userConfigMap[userId] ?: run { + Slog.e(TAG, "Config unavailable for user $userId") + return@launch + } + } + mutex.withLock { + if (!config.isPackageProtected(packageName)) { + logD { + "Package $packageName not in the list, ignoring" + } + return@launch + } + } + logD { + "Package $packageName uninstalled, cleaning up" + } + alarmsMutex.withLock { + scheduledAlarms.remove(packageName)?.let { + alarmManager.cancel(it) + } + } + mutex.withLock { + unlockedPackages.remove(packageName) + if (config.removePackage(packageName)) { + withContext(Dispatchers.IO) { + config.write() + } + } + } + } + } + } + + private val taskStackListener = object : TaskStackListener() { + override fun onTaskStackChanged() { + logD { + "onTaskStackChanged" + } + serviceScope.launch { + val currentTopPackages = atmInternal.topVisibleActivities.map { + it.activityToken + }.filter { + atmInternal.isVisibleActivity(it) + }.map { + atmInternal.getActivityName(it)?.packageName + }.filterNotNull().toSet() + logD { + "currentTopPackages = $currentTopPackages" + } + // We should return early if current top packages + // are empty to avoid doing anything absurd. + if (currentTopPackages.isEmpty()) return@launch + val packagesToLock = mutex.withLock { + logD { + "topPackages = $topPackages" + } + val packages = topPackages.filter { + !currentTopPackages.contains(it) && unlockedPackages.contains(it) + }.toSet() + topPackages.clear() + topPackages.addAll(currentTopPackages) + return@withLock packages + } + packagesToLock.forEach { + scheduleLockAlarm(it) + } + alarmsMutex.withLock { + currentTopPackages.forEach { pkg -> + scheduledAlarms.remove(pkg)?.let { + logD { + "Cancelling timeout alarm for $pkg" + } + alarmManager.cancel(it) + } + } + } + currentTopPackages.forEach { + checkAndUnlockPackage(it) + } + } + } + + override fun onActivityUnpinned() { + logD { + "onActivityUnpinned" + } + onTaskStackChanged() + } + } + + private fun scheduleLockAlarm(pkg: String) { + logD { + "scheduleLockAlarm, package = $pkg" + } + serviceScope.launch { + alarmsMutex.withLock { + if (scheduledAlarms.containsKey(pkg)) { + logD { + "Alarm already scheduled for package $pkg" + } + return@launch + } + } + val timeout = mutex.withLock { + userConfigMap[currentUserId]?.appLockTimeout + } ?: run { + Slog.e(TAG, "Failed to retrieve user config for $currentUserId") + return@launch + } + val pendingIntent = PendingIntent.getBroadcast( + context, + pkg.hashCode(), + Intent(ACTION_APP_LOCK_TIMEOUT).apply { + putExtra(Intent.EXTRA_PACKAGE_NAME, pkg) + }, + PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT + ) + alarmManager.setExactAndAllowWhileIdle( + AlarmManager.ELAPSED_REALTIME_WAKEUP, + SystemClock.elapsedRealtime() + timeout, + pendingIntent + ) + alarmsMutex.withLock { + scheduledAlarms[pkg] = pendingIntent + } + } + } + + private fun checkAndUnlockPackage(pkg: String) { + if (!isDeviceSecure) return + serviceScope.launch { + mutex.withLock { + if (unlockedPackages.contains(pkg)) return@launch + val config = userConfigMap[currentUserId] ?: run { + Slog.e(TAG, "Config unavailable for user $currentUserId") + return@launch + } + if (!config.isPackageProtected(pkg)) return@launch + } + logD { + "$pkg is locked out, asking user to unlock" + } + unlockInternal(pkg, currentUserId, + onSuccess = { + serviceScope.launch { + mutex.withLock { + unlockedPackages.add(pkg) + } + } + }, + onCancel = { + // Send user to home on cancel + context.mainExecutor.execute { + atmInternal.startHomeActivity(currentUserId, + "unlockInternal#onCancel") + } + } + ) + } + } + + private val lockAlarmReceiver = object : BroadcastReceiver() { + override fun onReceive(context: Context?, intent: Intent?) { + if (intent?.action != ACTION_APP_LOCK_TIMEOUT) return + logD { + "Lock alarm received" + } + val packageName = intent.getStringExtra(Intent.EXTRA_PACKAGE_NAME) ?: return + logD { + "$packageName timed out" + } + serviceScope.launch { + mutex.withLock { + if (topPackages.contains(packageName)) { + logD { + "$packageName is currently in foreground, skipping lock" + } + // Mark it as unlocked, since it actually is + unlockedPackages.add(packageName) + return@withLock + } + unlockedPackages.remove(packageName) + } + alarmsMutex.withLock { + scheduledAlarms.remove(packageName) + } + val isContentSecure = mutex.withLock { + userConfigMap[currentUserId]?.shouldRedactNotification(packageName) ?: run { + Slog.e(TAG, "Config unavailable for user $currentUserId") + return@launch + } + } + notificationManagerInternal.updateSecureNotifications( + packageName, + isContentSecure, + true /* isBubbleUpSuppressed */, + currentUserId + ) + } + } + } + + private fun getActualUserId(userId: Int, tag: String): Int { + return ActivityManager.handleIncomingUser(Binder.getCallingPid(), + Binder.getCallingUid(), userId, false /* allowAll */, + true /* requireFull */, tag, AppLockManagerService::class.qualifiedName) + } + + private inline fun clearAndExecute(crossinline block: () -> R): R { + val ident = Binder.clearCallingIdentity() + try { + return block() + } finally { + Binder.restoreCallingIdentity(ident) + } + } + + private fun unlockInternal( + pkg: String, + userId: Int, + onSuccess: () -> Unit, + onCancel: () -> Unit, + ) { + clearAndExecute { + if (!biometricUnlocker.canUnlock()) { + Slog.e(TAG, "Application cannot be unlocked with biometrics or device credentials") + return@clearAndExecute + } + biometricUnlocker.unlock(getLabelForPackage(pkg, userId), onSuccess, onCancel) + } + } + + private fun getLabelForPackage(pkg: String, userId: Int): String? = + try { + pmInternal.getApplicationInfo( + pkg, + PackageManager.MATCH_ALL.toLong(), + Process.myUid(), + userId, + ).loadLabel(packageManager).toString() + } catch(e: PackageManager.NameNotFoundException) { + Slog.e(TAG, "Package $pkg not found") + null + } + + /** + * Add an application to be protected. + * + * @param packageName the package name of the app to add. + * @param userId the user id of the caller. + * @throws [SecurityException] if caller does not have permission + * [Manifest.permissions.MANAGE_APP_LOCK]. + * @throws [IllegalArgumentException] if package is a system app that + * is not whitelisted in [R.array.config_appLockAllowedSystemApps], + * or if package is not installed. + */ + @RequiresPermission(Manifest.permission.MANAGE_APP_LOCK) + override fun addPackage(packageName: String, userId: Int) { + logD { + "addPackage: packageName = $packageName, userId = $userId" + } + enforceCallingPermission("addPackage") + checkPackage(packageName, userId) + val actualUserId = getActualUserId(userId, "addPackage") + serviceScope.launch { + mutex.withLock { + val config = userConfigMap[actualUserId] ?: run { + Slog.e(TAG, "addPackage requested by unknown user id $actualUserId") + return@withLock + } + if (!config.addPackage(packageName)) return@withLock + // Collapse any active notifications or bubbles for the app. + if (!topPackages.contains(packageName)) { + notificationManagerInternal.updateSecureNotifications( + packageName, + true /* isContentSecure */, + true /* isBubbleUpSuppressed */, + actualUserId + ) + } + withContext(Dispatchers.IO) { + config.write() + } + } + } + } + + private fun checkPackage(pkg: String, userId: Int) { + try { + val aInfo = pmInternal.getApplicationInfo( + pkg, + PackageManager.MATCH_ALL.toLong(), + Process.myUid(), + userId + ) + if (!aInfo.isSystemApp()) return + if (!whiteListedSystemApps.contains(pkg)) + throw IllegalArgumentException("System package $pkg is not whitelisted") + } catch(e: PackageManager.NameNotFoundException) { + throw IllegalArgumentException("Package $pkg is not installed") + } + } + + /** + * Remove an application from the protected packages list. + * + * @param packageName the package name of the app to remove. + * @param userId the user id of the caller. + * @throws [SecurityException] if caller does not have permission + * [Manifest.permissions.MANAGE_APP_LOCK]. + */ + @RequiresPermission(Manifest.permission.MANAGE_APP_LOCK) + override fun removePackage(packageName: String, userId: Int) { + logD { + "removePackage: packageName = $packageName, userId = $userId" + } + enforceCallingPermission("removePackage") + val actualUserId = getActualUserId(userId, "removePackage") + serviceScope.launch { + mutex.withLock { + val config = userConfigMap[actualUserId] ?: run { + Slog.e(TAG, "removePackage requested by unknown user id $actualUserId") + return@withLock + } + if (!config.removePackage(packageName)) return@withLock + // Let active notifications be expanded since the app + // is no longer protected. + notificationManagerInternal.updateSecureNotifications( + packageName, + false /* isContentSecure */, + false /* isBubbleUpSuppressed */, + actualUserId + ) + withContext(Dispatchers.IO) { + config.write() + } + } + } + } + + /** + * Get the current auto lock timeout. + * + * @param userId the user id of the caller. + * @return the timeout in milliseconds if configuration for + * current user exists, -1 otherwise. + */ + override fun getTimeout(userId: Int): Long { + logD { + "getTimeout: userId = $userId" + } + val actualUserId = getActualUserId(userId, "getTimeout") + return runBlocking { + mutex.withLock { + userConfigMap[actualUserId]?.let { it.appLockTimeout } ?: run { + Slog.e(TAG, "getTimeout requested by unknown user id $actualUserId") + -1L + } + } + } + } + + /** + * Set auto lock timeout. + * + * @param timeout the timeout in milliseconds. Must be >= 5. + * @param userId the user id of the caller. + * @throws [SecurityException] if caller does not have permission + * [Manifest.permissions.MANAGE_APP_LOCK]. + */ + @RequiresPermission(Manifest.permission.MANAGE_APP_LOCK) + override fun setTimeout(timeout: Long, userId: Int) { + logD { + "setTimeout: timeout = $timeout, userId = $userId" + } + if (timeout < 5L) { + throw IllegalArgumentException("Timeout must be greater than or equal to 5") + } + enforceCallingPermission("setTimeout") + val actualUserId = getActualUserId(userId, "setTimeout") + serviceScope.launch { + mutex.withLock { + val config = userConfigMap[actualUserId] ?: run { + Slog.e(TAG, "setTimeout requested by unknown user id $actualUserId") + return@withLock + } + if (config.appLockTimeout == timeout) return@withLock + config.appLockTimeout = timeout + withContext(Dispatchers.IO) { + config.write() + } + } + } + } + + /** + * Get all the packages protected with app lock. + * + * @param userId the user id of the caller. + * @return list of [AppLockData] of the protected apps. + * @throws [SecurityException] if caller does not have permission + * [Manifest.permissions.MANAGE_APP_LOCK]. + */ + @RequiresPermission(Manifest.permission.MANAGE_APP_LOCK) + override fun getPackageData(userId: Int): List { + logD { + "getPackages: userId = $userId" + } + enforceCallingPermission("getPackages") + val actualUserId = getActualUserId(userId, "getPackages") + return runBlocking { + mutex.withLock { + userConfigMap[actualUserId]?.getAppLockDataList() ?: run { + Slog.e(TAG, "getPackages requested by unknown user id $actualUserId") + emptyList() + } + } + } + } + + /** + * Set whether notification content should be redacted for a package + * in locked state. + * + * @param packageName the package name. + * @param secure true to hide notification content. + * @param userId the user id of the caller. + * @throws [SecurityException] if caller does not have permission + * [Manifest.permissions.MANAGE_APP_LOCK]. + */ + @RequiresPermission(Manifest.permission.MANAGE_APP_LOCK) + override fun setShouldRedactNotification( + packageName: String, + secure: Boolean, + userId: Int, + ) { + logD { + "setShouldRedactNotification: packageName = $packageName, userId = $userId" + } + enforceCallingPermission("setShouldRedactNotification") + val actualUserId = getActualUserId(userId, "setShouldRedactNotification") + serviceScope.launch { + mutex.withLock { + val config = userConfigMap[actualUserId] ?: run { + Slog.e(TAG, "setShouldRedactNotification requested by unknown " + + "user id $actualUserId") + return@withLock + } + if (!config.setShouldRedactNotification(packageName, secure)) return@withLock + val isLocked = !unlockedPackages.contains(packageName) + && !topPackages.contains(packageName) + val shouldSecureContent = secure && isLocked + notificationManagerInternal.updateSecureNotifications( + packageName, + shouldSecureContent, + isLocked /* isBubbleUpSuppressed */, + actualUserId + ) + withContext(Dispatchers.IO) { + config.write() + } + } + } + } + + /** + * Set whether to allow unlocking with biometrics. + * + * @param biometricsAllowed whether to use biometrics. + * @param userId the user id of the caller. + * @throws [SecurityException] if caller does not have permission + * [Manifest.permissions.MANAGE_APP_LOCK]. + */ + @RequiresPermission(Manifest.permission.MANAGE_APP_LOCK) + override fun setBiometricsAllowed(biometricsAllowed: Boolean, userId: Int) { + logD { + "setBiometricsAllowed: biometricsAllowed = $biometricsAllowed, userId = $userId" + } + enforceCallingPermission("setBiometricsAllowed") + val actualUserId = getActualUserId(userId, "setBiometricsAllowed") + serviceScope.launch { + mutex.withLock { + val config = userConfigMap[actualUserId] ?: run { + Slog.e(TAG, "setBiometricsAllowed requested by unknown user id $actualUserId") + return@withLock + } + if (config.biometricsAllowed == biometricsAllowed) return@withLock + config.biometricsAllowed = biometricsAllowed + biometricUnlocker.biometricsAllowed = biometricsAllowed + withContext(Dispatchers.IO) { + config.write() + } + } + } + } + + /** + * Check whether biometrics is allowed for unlocking. + * + * @return true if biometrics will be used for unlocking, false otheriwse. + */ + override fun isBiometricsAllowed(userId: Int): Boolean { + logD { + "isBiometricsAllowed: userId = $userId" + } + val actualUserId = getActualUserId(userId, "isBiometricsAllowed") + return runBlocking { + mutex.withLock { + userConfigMap[actualUserId]?.let { it.biometricsAllowed } ?: run { + Slog.e(TAG, "isBiometricsAllowed requested by unknown user id $actualUserId") + AppLockManager.DEFAULT_BIOMETRICS_ALLOWED + } + } + } + } + + /** + * Unlock a package following authentication with credentials. + * Caller must hold {@link android.permission.MANAGE_APP_LOCK}. + * + * @param packageName the name of the package to unlock. + * @param userId the user id of the caller. + * @throws [SecurityException] if caller does not have permission + * [Manifest.permissions.MANAGE_APP_LOCK]. + */ + @RequiresPermission(Manifest.permission.MANAGE_APP_LOCK) + override fun unlockPackage(packageName: String, userId: Int) { + logD { + "unlockPackage: packageName = $packageName, userId = $userId" + } + enforceCallingPermission("unlockPackage") + val actualUserId = getActualUserId(userId, "unlockPackage") + serviceScope.launch { + mutex.withLock { + val config = userConfigMap[actualUserId] ?: run { + Slog.e(TAG, "unlockPackage requested by unknown user id $actualUserId") + return@launch + } + if (!config.isPackageProtected(packageName)) { + Slog.w(TAG, "Unlock requested for package $packageName " + + "that is not in list") + return@launch + } + unlockedPackages.add(packageName) + } + notificationManagerInternal.updateSecureNotifications( + packageName, + false /* isContentSecure */, + false /* isBubbleUpSuppressed */, + actualUserId + ) + } + } + + private fun enforceCallingPermission(msg: String) { + context.enforceCallingPermission(Manifest.permission.MANAGE_APP_LOCK, msg) + } + + private fun onStart() { + LocalServices.addService(AppLockManagerServiceInternal::class.java, localService) + } + + private fun onBootCompleted() { + Slog.i(TAG, "onBootCompleted") + context.registerReceiverAsUser( + lockAlarmReceiver, + UserHandle.SYSTEM, + IntentFilter(ACTION_APP_LOCK_TIMEOUT), + null /* broadcastPermission */, + null /* scheduler */, + ) + + context.registerReceiverForAllUsers( + packageChangeReceiver, + IntentFilter(Intent.ACTION_PACKAGE_REMOVED).apply { + addDataScheme(IntentFilter.SCHEME_PACKAGE) + }, + null /* broadcastPermission */, + null /* scheduler */, + ) + + ActivityTaskManager.getService().registerTaskStackListener(taskStackListener) + } + + private fun onUserStarting(userId: Int) { + Slog.i(TAG, "onUserStarting: userId = $userId") + isDeviceSecure = keyguardManager.isDeviceSecure(userId) + logD { + "isDeviceSecure = $isDeviceSecure" + } + serviceScope.launch { + mutex.withLock { + if (userConfigMap.containsKey(userId)) return@withLock + withContext(Dispatchers.IO) { + val config = AppLockConfig(Environment.getDataSystemDeDirectory(userId)) + userConfigMap[userId] = config + config.read() + biometricUnlocker.biometricsAllowed = config.biometricsAllowed + verifyPackagesLocked(config) + } + } + } + } + + private fun verifyPackagesLocked(config: AppLockConfig) { + val currentPackages = config.getAppLockDataList().map { it.packageName } + var size = currentPackages.size + if (size == 0) return + val installedPackages = pmInternal.getInstalledApplications( + PackageManager.MATCH_ALL.toLong(), + currentUserId, + Process.myUid() + ).map { it.packageName } + var changed = false + logD { + "Current packages = $currentPackages" + } + for (i in 0 until size) { + val pkg = currentPackages[i] + if (!installedPackages.contains(pkg)) { + config.removePackage(pkg) + size-- + changed = true + } + } + logD { + val filteredPackages = config.getAppLockDataList().map { it.packageName } + "Filtered packages = $filteredPackages" + } + if (changed) { + config.write() + } + } + + private fun onUserStopping(userId: Int): Job { + Slog.i(TAG, "onUserStopping: userId = $userId") + return serviceScope.launch { + mutex.withLock { + unlockedPackages.clear() + userConfigMap[userId]?.let { + withContext(Dispatchers.IO) { + it.write() + } + } + } + } + } + + private fun onUserSwitching(oldUserId: Int, newUserId: Int) { + Slog.i(TAG, "onUserSwitching: oldUserId = $oldUserId, newUserId = $newUserId") + serviceScope.launch { + if (oldUserId != UserHandle.USER_NULL) { + onUserStopping(oldUserId).join() + } + onUserStarting(newUserId) + } + } + + private inner class LocalService : AppLockManagerServiceInternal { + /** + * Check whether user is valid and device is secure + */ + private fun checkUserAndDeviceStatus(userId: Int): Boolean { + if (userId < 0) { + logD { + "Ignoring requireUnlock call for special user $userId" + } + return false + } + if (!isDeviceSecure) { + logD { + "Device is not secure, app does not require unlock" + } + return false + } + val isManaged = clearAndExecute { + userManagerInternal.isUserManaged(userId) + } + if (isManaged) { + logD { + "User id $userId belongs to a work profile, ignoring requireUnlock" + } + } + return !isManaged + } + + override fun requireUnlock(packageName: String, userId: Int): Boolean { + return requireUnlockInternal(packageName, userId, false /* ignoreLockState */) + } + + private fun requireUnlockInternal( + packageName: String, + userId: Int, + ignoreLockState: Boolean, + ) : Boolean { + if (!checkUserAndDeviceStatus(userId)) return false + val isLocked = clearAndExecute { + // If device is locked then there is no point in proceeding. + !ignoreLockState && keyguardManager.isDeviceLocked() + } + if (isLocked) { + logD { + "Device is locked, app does not require unlock" + } + return false + } + logD { + "requireUnlock: packageName = $packageName" + } + val actualUserId = getActualUserId(userId, "requireUnlock") + return runBlocking { + mutex.withLock { + val config = userConfigMap[actualUserId] ?: run { + Slog.e(TAG, "requireUnlock queried by unknown user id $actualUserId") + return@withLock false + } + val requireUnlock = config.isPackageProtected(packageName) && + !unlockedPackages.contains(packageName) + logD { + "requireUnlock = $requireUnlock" + } + return@withLock requireUnlock + } + } + } + + override fun reportPasswordChanged(userId: Int) { + logD { + "reportPasswordChanged: userId = $userId" + } + if (userId != currentUserId) { + logD { + "Ignoring password change event for user $userId" + } + return + } + isDeviceSecure = keyguardManager.isDeviceSecure(userId) + logD { + "isDeviceSecure = $isDeviceSecure" + } + } + + override fun shouldRedactNotification( + packageName: String, + userId: Int, + ) : Boolean { + if (!checkUserAndDeviceStatus(userId)) return false + logD { + "shouldRedactNotification: packageName = $packageName, userId = $userId" + } + val actualUserId = getActualUserId(userId, "shouldRedactNotification") + if (!requireUnlockInternal(packageName, userId, true /* ignoreLockState */)) return false + return runBlocking { + mutex.withLock { + val config = userConfigMap[actualUserId] ?: run { + Slog.e(TAG, "shouldRedactNotification queried by " + + "unknown user id $actualUserId") + return@withLock false + } + val secure = config.shouldRedactNotification(packageName) + logD { + "Secure = $secure" + } + return@withLock secure + } + } + } + + override fun notifyDeviceLocked(locked: Boolean, userId: Int) { + logD { + "Device locked = $locked for user $userId" + } + if (userId != currentUserId || + !isDeviceSecure || + deviceLocked == locked) return + deviceLocked = locked + serviceScope.launch { + val config = mutex.withLock { + userConfigMap[currentUserId] ?: run { + Slog.e(TAG, "Config unavailable for user $currentUserId") + return@launch + } + } + if (deviceLocked) { + mutex.withLock { + if (unlockedPackages.isEmpty()) return@withLock + logD { + "Locking all packages" + } + unlockedPackages.clear() + } + alarmsMutex.withLock { + if (scheduledAlarms.isEmpty()) return@withLock + scheduledAlarms.values.forEach { + alarmManager.cancel(it) + } + scheduledAlarms.clear() + } + } else { + mutex.withLock { + if (topPackages.isEmpty()) return@withLock + // If device is locked with an app in the foreground, + // even if it is removed from [unlockedPackages], it will + // still be shown when unlocked, so we need to start home + // activity as soon as such a condition is detected on unlock. + val shouldGoToHome = topPackages.any { + config.isPackageProtected(it) && + !unlockedPackages.contains(it) + } + if (!shouldGoToHome) return@withLock + logD { + "Locking foreground package" + } + context.mainExecutor.execute { + atmInternal.startHomeActivity(currentUserId, + "Locked package in foreground") + } + } + } + } + } + + override fun interceptActivity(info: ActivityInterceptorInfo): Intent? { + val packageName = info.aInfo.packageName + logD { + "interceptActivity, pkg = $packageName" + } + if (!localService.requireUnlock(packageName, info.userId)) return null + val target = IntentSender( + atmInternal.getIntentSender( + ActivityManager.INTENT_SENDER_ACTIVITY, + info.callingPackage, + info.callingFeatureId, + info.realCallingUid, + info.userId, + null /* token */, + null /* resultCode */, + 0 /* requestCode */, + arrayOf(info.intent), + arrayOf(info.resolvedType), + PendingIntent.FLAG_CANCEL_CURRENT or + PendingIntent.FLAG_ONE_SHOT or + PendingIntent.FLAG_IMMUTABLE, + ActivityOptions.makeBasic().toBundle() + ) + ) + val intent = Intent(AppLockManager.ACTION_UNLOCK_APP) + .setPackage(SETTINGS_PACKAGE) + .apply { + putExtra(Intent.EXTRA_PACKAGE_NAME, packageName) + putExtra(Intent.EXTRA_INTENT, target) + putExtra(Intent.EXTRA_USER_ID, info.userId) + putExtra(AppLockManager.EXTRA_PACKAGE_LABEL, info.aInfo.loadLabel(packageManager)) + putExtra(AppLockManager.EXTRA_ALLOW_BIOMETRICS, isBiometricsAllowed(info.userId)) + } + return intent + } + } + + class Lifecycle(context: Context) : SystemService(context) { + private val service = AppLockManagerService(context) + + override fun onStart() { + publishBinderService(Context.APP_LOCK_SERVICE, service) + service.onStart() + } + + override fun onBootPhase(phase: Int) { + if (phase == PHASE_ACTIVITY_MANAGER_READY) { + service.onBootCompleted() + } + } + + override fun onUserStarting(user: TargetUser) { + service.onUserStarting(user.userIdentifier) + } + + override fun onUserStopping(user: TargetUser) { + service.onUserStopping(user.userIdentifier) + } + + override fun onUserSwitching(from: TargetUser?, to: TargetUser) { + service.onUserSwitching( + from?.userIdentifier ?: UserHandle.USER_NULL, + to.userIdentifier + ) + } + } +} + +/** + * Internal class for system server to manage app lock. + * + * @hide + */ +interface AppLockManagerServiceInternal { + + /** + * Whether user has to unlock this application in order to + * open it. + * + * @param packageName the package name of the app to check. + * @param userId the user id given by the caller. + * @return true if user has to unlock, false otherwise. + */ + fun requireUnlock(packageName: String, userId: Int): Boolean + + /** + * Report that password for user has changed. + * + * @param userId the user for which password has changed. + */ + fun reportPasswordChanged(userId: Int) + + /** + * Check whether notification content should be hidden for a package. + * + * @param packageName the package to check for. + * @param userId the user id given by the caller. + * @return true if notification should be hidden, false otherwise. + */ + fun shouldRedactNotification(packageName: String, userId: Int): Boolean + + /** + * Notify that the device is locked for current user. + */ + fun notifyDeviceLocked(locked: Boolean, userId: Int) + + /** + * Whether to intercept the activity launch from a package. Used + * to show confirm credentials prompt. + * + * @param info [ActivityInterceptorInfo] of intercepted activity. + * @return [Intent] which will be fired. Return null if activity + * shouldn't be intercepted. + */ + fun interceptActivity(info: ActivityInterceptorInfo): Intent? +} \ No newline at end of file diff --git a/services/core/java/com/android/server/app/BiometricUnlocker.kt b/services/core/java/com/android/server/app/BiometricUnlocker.kt new file mode 100644 index 000000000000..0d5e92355706 --- /dev/null +++ b/services/core/java/com/android/server/app/BiometricUnlocker.kt @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2022 FlamingoOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.app + +import android.content.Context +import android.hardware.biometrics.BiometricConstants +import android.hardware.biometrics.BiometricManager +import android.hardware.biometrics.BiometricManager.Authenticators +import android.hardware.biometrics.BiometricPrompt +import android.hardware.biometrics.BiometricPrompt.AuthenticationCallback +import android.hardware.biometrics.BiometricPrompt.AuthenticationResult +import android.os.CancellationSignal +import android.util.Slog + +import com.android.internal.R + +/** + * Handles logic of unlocking an app with biometrics or device credentials. + * + * @hide + */ +internal class BiometricUnlocker(private val context: Context) { + + private val biometricManager = context.getSystemService(BiometricManager::class.java) + + // Set operation must be externally synchronized + var biometricsAllowed = false + + /** + * Determine whether biometrics or device credentials can be used for + * unlocking operation. + */ + fun canUnlock(): Boolean = + biometricManager.canAuthenticate( + Authenticators.BIOMETRIC_STRONG or + Authenticators.DEVICE_CREDENTIAL + ) == BiometricManager.BIOMETRIC_SUCCESS + + /** + * Unlock an application. Should call this method only if + * [canUnlock] returned true. + * + * @param title the title of the dialog prompt. + * @param onSuccess the callback invoked on successfull authentication. + * @param onCancel the callback invoked when authentication is cancelled. + */ + fun unlock( + packageLabel: String?, + onSuccess: () -> Unit, + onCancel: () -> Unit, + ) { + val callback = object : AuthenticationCallback() { + override fun onAuthenticationSucceeded(result: AuthenticationResult) { + logD { + "onAuthenticationSucceeded" + } + onSuccess() + } + + override fun onAuthenticationError(errorCode: Int, errString: CharSequence) { + Slog.i(TAG, "onAuthenticationError, errorCode = " + + "$errorCode, errString = $errString") + if (errorCode == BiometricConstants.BIOMETRIC_ERROR_USER_CANCELED) { + onCancel() + } + } + } + showCredentialsPrompt( + context.getString(R.string.unlock_application, packageLabel), + callback + ) + } + + private fun showCredentialsPrompt( + title: String, + callback: AuthenticationCallback, + ) { + var authenticators = Authenticators.DEVICE_CREDENTIAL + if (biometricsAllowed) { + authenticators = authenticators or Authenticators.BIOMETRIC_STRONG + } + val prompt = BiometricPrompt.Builder(context) + .setTitle(title) + .setAllowedAuthenticators(authenticators) + .setAllowBackgroundAuthentication(true) + .build() + prompt.authenticateUser( + CancellationSignal(), + context.mainExecutor, + callback, + context.userId, + ) + } +} \ No newline at end of file diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index 02648c4da76f..9602d18fc5a4 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -812,6 +812,9 @@ protected boolean removeEldestEntry(Map.Entry eldest) { 0.9f, // Pre-scale for index 3 }; + private boolean mLinkNotificationWithVolume; + private final boolean mVoiceCapable; + private NotificationManager mNm; private AudioManagerInternal.RingerModeDelegate mRingerModeDelegate; private VolumePolicy mVolumePolicy = VolumePolicy.DEFAULT; @@ -1069,6 +1072,9 @@ public AudioService(Context context, AudioSystemAdapter audioSystem, MAX_STREAM_VOLUME[AudioSystem.STREAM_SYSTEM]; } + mVoiceCapable = context.getResources().getBoolean( + com.android.internal.R.bool.config_voice_capable); + if (looper == null) { createAudioSystemThread(); } else { @@ -1098,6 +1104,10 @@ public AudioService(Context context, AudioSystemAdapter audioSystem, mSafeMediaVolumeIndex = mContext.getResources().getInteger( com.android.internal.R.integer.config_safe_media_volume_index) * 10; + // read this in before readPersistedSettings() because updateStreamVolumeAlias needs it + mLinkNotificationWithVolume = Settings.Secure.getInt(mContext.getContentResolver(), + Settings.Secure.VOLUME_LINK_NOTIFICATION, 1) == 1; + mUseFixedVolume = mContext.getResources().getBoolean( com.android.internal.R.bool.config_useFixedVolume); @@ -2057,6 +2067,15 @@ private void updateStreamVolumeAlias(boolean updateVolumes, String caller) { mStreamVolumeAlias[AudioSystem.STREAM_ACCESSIBILITY] = a11yStreamAlias; mStreamVolumeAlias[AudioSystem.STREAM_ASSISTANT] = assistantStreamAlias; + if (mVoiceCapable) { + if (mLinkNotificationWithVolume) { + mStreamVolumeAlias[AudioSystem.STREAM_NOTIFICATION] = AudioSystem.STREAM_RING; + } else { + mStreamVolumeAlias[AudioSystem.STREAM_NOTIFICATION] = + AudioSystem.STREAM_NOTIFICATION; + } + } + if (updateVolumes && mStreamStates != null) { updateDefaultVolumes(); @@ -2512,6 +2531,9 @@ private void readPersistedSettings() { AudioSystem.setRttEnabled(mRttEnabled); } + mLinkNotificationWithVolume = Settings.Secure.getInt(cr, + Settings.Secure.VOLUME_LINK_NOTIFICATION, 1) == 1; + mMuteAffectedStreams = mSettings.getSystemIntForUser(cr, System.MUTE_STREAMS_AFFECTED, AudioSystem.DEFAULT_MUTE_STREAMS_AFFECTED, UserHandle.USER_CURRENT); @@ -8300,6 +8322,8 @@ private class SettingsObserver extends ContentObserver { Settings.System.MASTER_MONO), false, this); mContentResolver.registerContentObserver(Settings.System.getUriFor( Settings.System.MASTER_BALANCE), false, this); + mContentResolver.registerContentObserver(Settings.Secure.getUriFor( + Settings.Secure.VOLUME_LINK_NOTIFICATION), false, this); mEncodedSurroundMode = mSettings.getGlobalInt( mContentResolver, Settings.Global.ENCODED_SURROUND_OUTPUT, @@ -8336,6 +8360,14 @@ public void onChange(boolean selfChange) { updateEncodedSurroundOutput(); sendEnabledSurroundFormats(mContentResolver, mSurroundModeChanged); updateAssistantUIdLocked(/* forceUpdate= */ false); + + boolean linkNotificationWithVolume = Settings.Secure.getInt(mContentResolver, + Settings.Secure.VOLUME_LINK_NOTIFICATION, 1) == 1; + if (linkNotificationWithVolume != mLinkNotificationWithVolume) { + mLinkNotificationWithVolume = linkNotificationWithVolume; + createStreamStates(); + updateStreamVolumeAlias(true, TAG); + } } } diff --git a/services/core/java/com/android/server/audio/PlaybackActivityMonitor.java b/services/core/java/com/android/server/audio/PlaybackActivityMonitor.java index b3e7e31d37fc..93841fe288e1 100644 --- a/services/core/java/com/android/server/audio/PlaybackActivityMonitor.java +++ b/services/core/java/com/android/server/audio/PlaybackActivityMonitor.java @@ -49,6 +49,7 @@ import java.util.Iterator; import java.util.List; import java.util.Set; +import java.util.concurrent.ConcurrentLinkedQueue; import java.util.function.Consumer; /** @@ -104,11 +105,7 @@ public final class PlaybackActivityMonitor private static final VolumeShaper.Operation PLAY_SKIP_RAMP = new VolumeShaper.Operation.Builder(PLAY_CREATE_IF_NEEDED).setXOffset(1.0f).build(); - private final ArrayList mClients = new ArrayList(); - // a public client is one that needs an anonymized version of the playback configurations, we - // keep track of whether there is at least one to know when we need to create the list of - // playback configurations that do not contain uid/pid/package name information. - private boolean mHasPublicClients = false; + private final ConcurrentLinkedQueue mClients = new ConcurrentLinkedQueue<>(); private final Object mPlayerLock = new Object(); @GuardedBy("mPlayerLock") @@ -458,11 +455,9 @@ protected void dump(PrintWriter pw) { + DateFormat.getTimeInstance().format(new Date())); synchronized(mPlayerLock) { pw.println("\n playback listeners:"); - synchronized(mClients) { - for (PlayMonitorClient pmc : mClients) { - pw.print(" " + (pmc.mIsPrivileged ? "(S)" : "(P)") - + pmc.toString()); - } + for (PlayMonitorClient pmc : mClients) { + pw.print(" " + (pmc.isPrivileged() ? "(S)" : "(P)") + + pmc.toString()); } pw.println("\n"); // all players @@ -534,48 +529,33 @@ private static boolean checkConfigurationCaller(int piid, * @param iplayerReleased indicates if the change was due to a player being released */ private void dispatchPlaybackChange(boolean iplayerReleased) { - synchronized (mClients) { - // typical use case, nobody is listening, don't do any work - if (mClients.isEmpty()) { - return; - } - } if (DEBUG) { Log.v(TAG, "dispatchPlaybackChange to " + mClients.size() + " clients"); } final List configsSystem; - // list of playback configurations for "public consumption". It is only computed if there + // list of playback configurations for "public consumption". It is computed lazy if there // are non-system playback activity listeners. - final List configsPublic; + List configsPublic = null; synchronized (mPlayerLock) { if (mPlayers.isEmpty()) { return; } - configsSystem = new ArrayList(mPlayers.values()); + configsSystem = new ArrayList<>(mPlayers.values()); } - synchronized (mClients) { - // was done at beginning of method, but could have changed - if (mClients.isEmpty()) { - return; - } - configsPublic = mHasPublicClients ? anonymizeForPublicConsumption(configsSystem) : null; - final Iterator clientIterator = mClients.iterator(); - while (clientIterator.hasNext()) { - final PlayMonitorClient pmc = clientIterator.next(); - try { - // do not spam the logs if there are problems communicating with this client - if (pmc.mErrorCount < PlayMonitorClient.MAX_ERRORS) { - if (pmc.mIsPrivileged) { - pmc.mDispatcherCb.dispatchPlaybackConfigChange(configsSystem, - iplayerReleased); - } else { - // non-system clients don't have the control interface IPlayer, so - // they don't need to flush commands when a player was released - pmc.mDispatcherCb.dispatchPlaybackConfigChange(configsPublic, false); - } + + final Iterator clientIterator = mClients.iterator(); + while (clientIterator.hasNext()) { + final PlayMonitorClient pmc = clientIterator.next(); + // do not spam the logs if there are problems communicating with this client + if (!pmc.reachedMaxErrorCount()) { + if (pmc.isPrivileged()) { + pmc.dispatchPlaybackConfigChange(configsSystem, + iplayerReleased); + } else { + if (configsPublic == null) { + configsPublic = anonymizeForPublicConsumption(configsSystem); } - } catch (RemoteException e) { - pmc.mErrorCount++; - Log.e(TAG, "Error (" + pmc.mErrorCount + - ") trying to dispatch playback config change to " + pmc, e); + // non-system clients don't have the control interface IPlayer, so + // they don't need to flush commands when a player was released + pmc.dispatchPlaybackConfigChange(configsPublic, false); } } } @@ -798,14 +778,9 @@ void registerPlaybackCallback(IPlaybackConfigDispatcher pcdb, boolean isPrivileg if (pcdb == null) { return; } - synchronized(mClients) { - final PlayMonitorClient pmc = new PlayMonitorClient(pcdb, isPrivileged); - if (pmc.init()) { - if (!isPrivileged) { - mHasPublicClients = true; - } - mClients.add(pmc); - } + final PlayMonitorClient pmc = new PlayMonitorClient(pcdb, isPrivileged); + if (pmc.init()) { + mClients.add(pmc); } } @@ -813,23 +788,14 @@ void unregisterPlaybackCallback(IPlaybackConfigDispatcher pcdb) { if (pcdb == null) { return; } - synchronized(mClients) { - final Iterator clientIterator = mClients.iterator(); - boolean hasPublicClients = false; - // iterate over the clients to remove the dispatcher to remove, and reevaluate at - // the same time if we still have a public client. - while (clientIterator.hasNext()) { - PlayMonitorClient pmc = clientIterator.next(); - if (pcdb.asBinder().equals(pmc.mDispatcherCb.asBinder())) { - pmc.release(); - clientIterator.remove(); - } else { - if (!pmc.mIsPrivileged) { - hasPublicClients = true; - } - } + final Iterator clientIterator = mClients.iterator(); + // iterate over the clients to remove the dispatcher + while (clientIterator.hasNext()) { + PlayMonitorClient pmc = clientIterator.next(); + if (pmc.equalsDispatcher(pcdb)) { + pmc.release(); + clientIterator.remove(); } - mHasPublicClients = hasPublicClients; } } @@ -857,24 +823,34 @@ private static final class PlayMonitorClient implements IBinder.DeathRecipient { // can afford to be static because only one PlaybackActivityMonitor ever instantiated static PlaybackActivityMonitor sListenerDeathMonitor; - final IPlaybackConfigDispatcher mDispatcherCb; - final boolean mIsPrivileged; - - int mErrorCount = 0; // number of errors after which we don't update this client anymore to not spam the logs - static final int MAX_ERRORS = 5; + private static final int MAX_ERRORS = 5; + + private final IPlaybackConfigDispatcher mDispatcherCb; + + @GuardedBy("this") + private final boolean mIsPrivileged; + @GuardedBy("this") + private boolean mIsReleased = false; + @GuardedBy("this") + private int mErrorCount = 0; PlayMonitorClient(IPlaybackConfigDispatcher pcdb, boolean isPrivileged) { mDispatcherCb = pcdb; mIsPrivileged = isPrivileged; } + @Override public void binderDied() { Log.w(TAG, "client died"); sListenerDeathMonitor.unregisterPlaybackCallback(mDispatcherCb); } - boolean init() { + synchronized boolean init() { + if (mIsReleased) { + // Do not init after release + return false; + } try { mDispatcherCb.asBinder().linkToDeath(this, 0); return true; @@ -884,8 +860,43 @@ boolean init() { } } - void release() { + synchronized void release() { mDispatcherCb.asBinder().unlinkToDeath(this, 0); + mIsReleased = true; + } + + void dispatchPlaybackConfigChange(List configs, + boolean flush) { + synchronized (this) { + if (mIsReleased) { + // Do not dispatch anything after release + return; + } + } + try { + mDispatcherCb.dispatchPlaybackConfigChange(configs, flush); + } catch (RemoteException e) { + synchronized (this) { + mErrorCount++; + Log.e(TAG, "Error (" + mErrorCount + + ") trying to dispatch playback config change to " + this, e); + } + } + } + + synchronized boolean isPrivileged() { + return mIsPrivileged; + } + + synchronized boolean reachedMaxErrorCount() { + return mErrorCount >= MAX_ERRORS; + } + + synchronized boolean equalsDispatcher(IPlaybackConfigDispatcher pcdb) { + if (pcdb == null) { + return false; + } + return pcdb.asBinder().equals(mDispatcherCb.asBinder()); } } diff --git a/services/core/java/com/android/server/biometrics/AuthService.java b/services/core/java/com/android/server/biometrics/AuthService.java index bc550d311370..951cf5769b28 100644 --- a/services/core/java/com/android/server/biometrics/AuthService.java +++ b/services/core/java/com/android/server/biometrics/AuthService.java @@ -31,6 +31,8 @@ import static android.hardware.biometrics.BiometricConstants.BIOMETRIC_ERROR_CANCELED; import static android.hardware.biometrics.BiometricManager.Authenticators; +import static com.android.server.biometrics.sensors.fingerprint.aidl.FingerprintProvider.getWorkaroundSensorProps; + import android.annotation.NonNull; import android.annotation.Nullable; import android.app.AppOpsManager; @@ -780,6 +782,10 @@ private FingerprintSensorPropertiesInternal getHidlFingerprintSensorProps(int se final int[] udfpsProps = getContext().getResources().getIntArray( com.android.internal.R.array.config_udfps_sensor_props); + // Non-empty workaroundLocations indicates that the sensor is SFPS. + final List workaroundLocations = + getWorkaroundSensorProps(getContext()); + final boolean isUdfps = !ArrayUtils.isEmpty(udfpsProps); // config_is_powerbutton_fps indicates whether device has a power button fingerprint sensor. @@ -809,6 +815,12 @@ private FingerprintSensorPropertiesInternal getHidlFingerprintSensorProps(int se resetLockoutRequiresHardwareAuthToken, List.of(new SensorLocationInternal("" /* display */, udfpsProps[0], udfpsProps[1], udfpsProps[2]))); + } else if (!workaroundLocations.isEmpty()) { + return new FingerprintSensorPropertiesInternal(sensorId, + Utils.authenticatorStrengthToPropertyStrength(strength), maxEnrollmentsPerUser, + componentInfo, sensorType, true /* halControlsIllumination */, + resetLockoutRequiresHardwareAuthToken, + workaroundLocations); } else { return new FingerprintSensorPropertiesInternal(sensorId, Utils.authenticatorStrengthToPropertyStrength(strength), maxEnrollmentsPerUser, diff --git a/services/core/java/com/android/server/biometrics/AuthSession.java b/services/core/java/com/android/server/biometrics/AuthSession.java index cc49f07dd0e5..41ca13f5d5f5 100644 --- a/services/core/java/com/android/server/biometrics/AuthSession.java +++ b/services/core/java/com/android/server/biometrics/AuthSession.java @@ -538,13 +538,12 @@ void onSystemEvent(int event) { void onDialogAnimatedIn() { if (mState != STATE_AUTH_STARTED) { - Slog.w(TAG, "onDialogAnimatedIn, unexpected state: " + mState); + Slog.e(TAG, "onDialogAnimatedIn, unexpected state: " + mState); + return; } mState = STATE_AUTH_STARTED_UI_SHOWING; - startAllPreparedFingerprintSensors(); - mState = STATE_AUTH_STARTED_UI_SHOWING; } void onTryAgainPressed() { diff --git a/services/core/java/com/android/server/biometrics/sensors/AcquisitionClient.java b/services/core/java/com/android/server/biometrics/sensors/AcquisitionClient.java index 1d90954c44f6..2d85a220c5bc 100644 --- a/services/core/java/com/android/server/biometrics/sensors/AcquisitionClient.java +++ b/services/core/java/com/android/server/biometrics/sensors/AcquisitionClient.java @@ -25,8 +25,10 @@ import android.os.RemoteException; import android.os.SystemClock; import android.os.VibrationAttributes; +import android.os.UserHandle; import android.os.VibrationEffect; import android.os.Vibrator; +import android.provider.Settings; import android.util.Slog; import com.android.server.biometrics.log.BiometricContext; @@ -198,7 +200,9 @@ final void notifyUserActivity() { protected final void vibrateSuccess() { Vibrator vibrator = getContext().getSystemService(Vibrator.class); - if (vibrator != null && mShouldVibrate) { + boolean FingerprintVib = Settings.System.getIntForUser(getContext().getContentResolver(), + Settings.System.FP_SUCCESS_VIBRATE, 1, UserHandle.USER_CURRENT) == 1; + if (vibrator != null && mShouldVibrate && FingerprintVib) { vibrator.vibrate(Process.myUid(), getContext().getOpPackageName(), SUCCESS_VIBRATION_EFFECT, @@ -209,7 +213,9 @@ protected final void vibrateSuccess() { protected final void vibrateError() { Vibrator vibrator = getContext().getSystemService(Vibrator.class); - if (vibrator != null && mShouldVibrate) { + boolean FingerprintVib = Settings.System.getIntForUser(getContext().getContentResolver(), + Settings.System.FP_ERROR_VIBRATE, 1, UserHandle.USER_CURRENT) == 1; + if (vibrator != null && FingerprintVib && mShouldVibrate) { vibrator.vibrate(Process.myUid(), getContext().getOpPackageName(), ERROR_VIBRATION_EFFECT, diff --git a/services/core/java/com/android/server/biometrics/sensors/BiometricScheduler.java b/services/core/java/com/android/server/biometrics/sensors/BiometricScheduler.java index 63609f77dc75..c1eb0a0611a7 100644 --- a/services/core/java/com/android/server/biometrics/sensors/BiometricScheduler.java +++ b/services/core/java/com/android/server/biometrics/sensors/BiometricScheduler.java @@ -60,6 +60,9 @@ public class BiometricScheduler { private static final String BASE_TAG = "BiometricScheduler"; + + private boolean mCancel; + // Number of recent operations to keep in our logs for dumpsys protected static final int LOG_NUM_RECENT_OPERATIONS = 50; @@ -238,13 +241,16 @@ public void onClientFinished(@NonNull BaseClientMonitor clientMonitor, boolean s * @param gestureAvailabilityDispatcher may be null if the sensor does not support gestures * (such as fingerprint swipe). */ - public BiometricScheduler(@NonNull String tag, + public BiometricScheduler(Context context, @NonNull String tag, @SensorType int sensorType, @Nullable GestureAvailabilityDispatcher gestureAvailabilityDispatcher) { this(tag, new Handler(Looper.getMainLooper()), sensorType, gestureAvailabilityDispatcher, IBiometricService.Stub.asInterface( ServiceManager.getService(Context.BIOMETRIC_SERVICE)), LOG_NUM_RECENT_OPERATIONS, CoexCoordinator.getInstance()); + + mCancel = context.getResources().getBoolean( + com.android.internal.R.bool.config_fpCancelIfNotIdle); } @VisibleForTesting @@ -258,8 +264,13 @@ protected String getTag() { protected void startNextOperationIfIdle() { if (mCurrentOperation != null) { - Slog.v(getTag(), "Not idle, current operation: " + mCurrentOperation); - return; + if (mCancel && !mCurrentOperation.isFinished()) { + Slog.v(getTag(), "Not idle, cancelling current operation: " + mCurrentOperation); + mCurrentOperation.cancel(mHandler, mInternalCallback); + } else { + Slog.v(getTag(), "Not idle, current operation: " + mCurrentOperation); + return; + } } if (mPendingOperations.isEmpty()) { Slog.d(getTag(), "No operations, returning to idle"); diff --git a/services/core/java/com/android/server/biometrics/sensors/BiometricSchedulerOperation.java b/services/core/java/com/android/server/biometrics/sensors/BiometricSchedulerOperation.java index 968146a166ed..ef2931ff5850 100644 --- a/services/core/java/com/android/server/biometrics/sensors/BiometricSchedulerOperation.java +++ b/services/core/java/com/android/server/biometrics/sensors/BiometricSchedulerOperation.java @@ -20,14 +20,18 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.hardware.biometrics.BiometricConstants; +import android.os.Build; import android.os.Handler; import android.os.IBinder; import android.util.Slog; import com.android.internal.annotations.VisibleForTesting; +import com.android.internal.util.ArrayUtils; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; +import java.util.Arrays; +import java.util.function.BooleanSupplier; /** * Contains all the necessary information for a HAL operation. @@ -84,6 +88,8 @@ public class BiometricSchedulerOperation { private final BaseClientMonitor mClientMonitor; @Nullable private final ClientMonitorCallback mClientCallback; + @NonNull + private final BooleanSupplier mIsDebuggable; @Nullable private ClientMonitorCallback mOnStartCallback; @OperationState @@ -99,14 +105,33 @@ public class BiometricSchedulerOperation { this(clientMonitor, callback, STATE_WAITING_IN_QUEUE); } + @VisibleForTesting + BiometricSchedulerOperation( + @NonNull BaseClientMonitor clientMonitor, + @Nullable ClientMonitorCallback callback, + @NonNull BooleanSupplier isDebuggable + ) { + this(clientMonitor, callback, STATE_WAITING_IN_QUEUE, isDebuggable); + } + protected BiometricSchedulerOperation( @NonNull BaseClientMonitor clientMonitor, @Nullable ClientMonitorCallback callback, @OperationState int state + ) { + this(clientMonitor, callback, state, Build::isDebuggable); + } + + private BiometricSchedulerOperation( + @NonNull BaseClientMonitor clientMonitor, + @Nullable ClientMonitorCallback callback, + @OperationState int state, + @NonNull BooleanSupplier isDebuggable ) { mClientMonitor = clientMonitor; mClientCallback = callback; mState = state; + mIsDebuggable = isDebuggable; mCancelWatchdog = () -> { if (!isFinished()) { Slog.e(TAG, "[Watchdog Triggered]: " + this); @@ -144,13 +169,19 @@ public int isReadyToStart(@NonNull ClientMonitorCallback callback) { * @return if this operation started */ public boolean start(@NonNull ClientMonitorCallback callback) { - checkInState("start", + if (errorWhenNoneOf("start", STATE_WAITING_IN_QUEUE, STATE_WAITING_FOR_COOKIE, - STATE_WAITING_IN_QUEUE_CANCELING); + STATE_WAITING_IN_QUEUE_CANCELING)) { + return false; + } if (mClientMonitor.getCookie() != 0) { - throw new IllegalStateException("operation requires cookie"); + String err = "operation requires cookie"; + if (mIsDebuggable.getAsBoolean()) { + throw new IllegalStateException(err); + } + Slog.e(TAG, err); } return doStart(callback); @@ -164,16 +195,18 @@ public boolean start(@NonNull ClientMonitorCallback callback) { * @return if this operation started */ public boolean startWithCookie(@NonNull ClientMonitorCallback callback, int cookie) { - checkInState("start", - STATE_WAITING_IN_QUEUE, - STATE_WAITING_FOR_COOKIE, - STATE_WAITING_IN_QUEUE_CANCELING); - if (mClientMonitor.getCookie() != cookie) { Slog.e(TAG, "Mismatched cookie for operation: " + this + ", received: " + cookie); return false; } + if (errorWhenNoneOf("start", + STATE_WAITING_IN_QUEUE, + STATE_WAITING_FOR_COOKIE, + STATE_WAITING_IN_QUEUE_CANCELING)) { + return false; + } + return doStart(callback); } @@ -217,10 +250,12 @@ private boolean doStart(@NonNull ClientMonitorCallback callback) { * immediately abort the operation and notify the client that it has finished unsuccessfully. */ public void abort() { - checkInState("cannot abort a non-pending operation", + if (errorWhenNoneOf("abort", STATE_WAITING_IN_QUEUE, STATE_WAITING_FOR_COOKIE, - STATE_WAITING_IN_QUEUE_CANCELING); + STATE_WAITING_IN_QUEUE_CANCELING)) { + return; + } if (isHalOperation()) { ((HalClientMonitor) mClientMonitor).unableToStart(); @@ -247,7 +282,9 @@ public boolean markCanceling() { * the callback used from {@link #start(ClientMonitorCallback)} is used) */ public void cancel(@NonNull Handler handler, @NonNull ClientMonitorCallback callback) { - checkNotInState("cancel", STATE_FINISHED); + if (errorWhenOneOf("cancel", STATE_FINISHED)) { + return; + } final int currentState = mState; if (!isInterruptable()) { @@ -402,21 +439,28 @@ public BaseClientMonitor getClientMonitor() { return mClientMonitor; } - private void checkNotInState(String message, @OperationState int... states) { - for (int state : states) { - if (mState == state) { - throw new IllegalStateException(message + ": illegal state= " + state); + private boolean errorWhenOneOf(String op, @OperationState int... states) { + final boolean isError = ArrayUtils.contains(states, mState); + if (isError) { + String err = op + ": mState must not be " + mState; + if (mIsDebuggable.getAsBoolean()) { + throw new IllegalStateException(err); } + Slog.e(TAG, err); } + return isError; } - private void checkInState(String message, @OperationState int... states) { - for (int state : states) { - if (mState == state) { - return; + private boolean errorWhenNoneOf(String op, @OperationState int... states) { + final boolean isError = !ArrayUtils.contains(states, mState); + if (isError) { + String err = op + ": mState=" + mState + " must be one of " + Arrays.toString(states); + if (mIsDebuggable.getAsBoolean()) { + throw new IllegalStateException(err); } + Slog.e(TAG, err); } - throw new IllegalStateException(message + ": illegal state= " + mState); + return isError; } @Override diff --git a/services/core/java/com/android/server/biometrics/sensors/InternalEnumerateClient.java b/services/core/java/com/android/server/biometrics/sensors/InternalEnumerateClient.java index 7f8f38f3e9d2..d5f8ce59d9ab 100644 --- a/services/core/java/com/android/server/biometrics/sensors/InternalEnumerateClient.java +++ b/services/core/java/com/android/server/biometrics/sensors/InternalEnumerateClient.java @@ -45,6 +45,8 @@ public abstract class InternalEnumerateClient extends HalClientMonitor // List of templates to remove from the HAL private List mUnknownHALTemplates = new ArrayList<>(); + private boolean mCleanup; + protected InternalEnumerateClient(@NonNull Context context, @NonNull Supplier lazyDaemon, @NonNull IBinder token, int userId, @NonNull String owner, @NonNull List enrolledList, @@ -58,6 +60,8 @@ protected InternalEnumerateClient(@NonNull Context context, @NonNull Supplier // BiometricsProtoEnums.CLIENT_UNKNOWN); mEnrolledList = enrolledList; mUtils = utils; + mCleanup = context.getResources().getBoolean( + com.android.internal.R.bool.config_cleanupUnusedFingerprints); } @Override @@ -117,8 +121,10 @@ private void doTemplateCleanup() { BiometricAuthenticator.Identifier identifier = mEnrolledList.get(i); Slog.e(TAG, "doTemplateCleanup(): Removing dangling template from framework: " + identifier.getBiometricId() + " " + identifier.getName()); - mUtils.removeBiometricForUser(getContext(), - getTargetUserId(), identifier.getBiometricId()); + if (mCleanup) { + mUtils.removeBiometricForUser(getContext(), + getTargetUserId(), identifier.getBiometricId()); + } getLogger().logUnknownEnrollmentInFramework(); } diff --git a/services/core/java/com/android/server/biometrics/sensors/face/hidl/Face10.java b/services/core/java/com/android/server/biometrics/sensors/face/hidl/Face10.java index 73c759f7738c..4e630390bd6c 100644 --- a/services/core/java/com/android/server/biometrics/sensors/face/hidl/Face10.java +++ b/services/core/java/com/android/server/biometrics/sensors/face/hidl/Face10.java @@ -370,7 +370,7 @@ public static Face10 newInstance(@NonNull Context context, @NonNull LockoutResetDispatcher lockoutResetDispatcher) { final Handler handler = new Handler(Looper.getMainLooper()); return new Face10(context, sensorProps, lockoutResetDispatcher, handler, - new BiometricScheduler(TAG, BiometricScheduler.SENSOR_TYPE_FACE, + new BiometricScheduler(context, TAG, BiometricScheduler.SENSOR_TYPE_FACE, null /* gestureAvailabilityTracker */), BiometricContext.getInstance(context)); } diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java index f16af78364a2..25333c6931d5 100644 --- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java +++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java @@ -88,6 +88,8 @@ @SuppressWarnings("deprecation") public class FingerprintProvider implements IBinder.DeathRecipient, ServiceProvider { + private static final String TAG = "FingerprintProvider"; + private boolean mTestHalEnabled; @NonNull private final Context mContext; @@ -190,7 +192,7 @@ public FingerprintProvider(@NonNull Context context, } private String getTag() { - return "FingerprintProvider/" + mHalInstanceName; + return TAG + "/" + mHalInstanceName; } boolean hasHalInstance() { @@ -700,7 +702,7 @@ void setTestHalEnabled(boolean enabled) { // TODO(b/174868353): workaround for gaps in HAL interface (remove and get directly from HAL) // reads values via an overlay instead of querying the HAL @NonNull - private List getWorkaroundSensorProps(@NonNull Context context) { + public static List getWorkaroundSensorProps(@NonNull Context context) { final List sensorLocations = new ArrayList<>(); final TypedArray sfpsProps = context.getResources().obtainTypedArray( @@ -721,7 +723,7 @@ private List getWorkaroundSensorProps(@NonNull Context c } @Nullable - private SensorLocationInternal parseSensorLocation(@Nullable TypedArray array) { + private static SensorLocationInternal parseSensorLocation(@Nullable TypedArray array) { if (array == null) { return null; } @@ -733,7 +735,7 @@ private SensorLocationInternal parseSensorLocation(@Nullable TypedArray array) { array.getInt(2, 0), array.getInt(3, 0)); } catch (Exception e) { - Slog.w(getTag(), "malformed sensor location", e); + Slog.w(TAG, "malformed sensor location", e); } return null; } diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21.java index 2a3f34ae3cd4..1f8e1791c030 100644 --- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21.java +++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21.java @@ -363,7 +363,7 @@ public static Fingerprint21 newInstance(@NonNull Context context, @NonNull LockoutResetDispatcher lockoutResetDispatcher, @NonNull GestureAvailabilityDispatcher gestureAvailabilityDispatcher) { final BiometricScheduler scheduler = - new BiometricScheduler(TAG, + new BiometricScheduler(context, TAG, BiometricScheduler.sensorTypeFromFingerprintProperties(sensorProps), gestureAvailabilityDispatcher); final HalResultController controller = new HalResultController(sensorProps.sensorId, diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21UdfpsMock.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21UdfpsMock.java index bea0f4ffd45d..9726ae3d5764 100644 --- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21UdfpsMock.java +++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21UdfpsMock.java @@ -137,9 +137,9 @@ public class Fingerprint21UdfpsMock extends Fingerprint21 implements TrustManage private static class TestableBiometricScheduler extends BiometricScheduler { @NonNull private Fingerprint21UdfpsMock mFingerprint21; - TestableBiometricScheduler(@NonNull String tag, @NonNull Handler handler, + TestableBiometricScheduler(Context context, @NonNull String tag, @NonNull Handler handler, @Nullable GestureAvailabilityDispatcher gestureAvailabilityDispatcher) { - super(tag, BiometricScheduler.SENSOR_TYPE_FP_OTHER, gestureAvailabilityDispatcher); + super(context, tag, BiometricScheduler.SENSOR_TYPE_FP_OTHER, gestureAvailabilityDispatcher); } void init(@NonNull Fingerprint21UdfpsMock fingerprint21) { @@ -254,7 +254,7 @@ public static Fingerprint21UdfpsMock newInstance(@NonNull Context context, final Handler handler = new Handler(Looper.getMainLooper()); final TestableBiometricScheduler scheduler = - new TestableBiometricScheduler(TAG, handler, gestureAvailabilityDispatcher); + new TestableBiometricScheduler(context, TAG, handler, gestureAvailabilityDispatcher); final MockHalResultController controller = new MockHalResultController(sensorProps.sensorId, context, handler, scheduler); return new Fingerprint21UdfpsMock(context, biometricStateCallback, sensorProps, scheduler, diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java index a0befea8e085..de7117ef40b4 100644 --- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java +++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/LockoutFrameworkImpl.java @@ -40,7 +40,7 @@ public class LockoutFrameworkImpl implements LockoutTracker { private static final String TAG = "LockoutTracker"; private static final String ACTION_LOCKOUT_RESET = "com.android.server.biometrics.sensors.fingerprint.ACTION_LOCKOUT_RESET"; - private static final int MAX_FAILED_ATTEMPTS_LOCKOUT_TIMED = 5; + private static final int MAX_FAILED_ATTEMPTS_LOCKOUT_TIMED = 10; private static final int MAX_FAILED_ATTEMPTS_LOCKOUT_PERMANENT = 20; private static final long FAIL_LOCKOUT_TIMEOUT_MS = 30 * 1000; private static final String KEY_LOCKOUT_RESET_USER = "lockout_reset_user"; diff --git a/services/core/java/com/android/server/clipboard/ClipboardService.java b/services/core/java/com/android/server/clipboard/ClipboardService.java index 61350bb6095e..8ac79ca5e1d2 100644 --- a/services/core/java/com/android/server/clipboard/ClipboardService.java +++ b/services/core/java/com/android/server/clipboard/ClipboardService.java @@ -1067,6 +1067,7 @@ private boolean isDefaultIme(int userId, String packageName) { @GuardedBy("mLock") private void showAccessNotificationLocked(String callingPackage, int uid, @UserIdInt int userId, PerUserClipboard clipboard) { + String nfcService = "com.android.nfc"; if (clipboard.primaryClip == null) { return; } @@ -1075,6 +1076,9 @@ private void showAccessNotificationLocked(String callingPackage, int uid, @UserI (mShowAccessNotifications ? 1 : 0)) == 0) { return; } + if (callingPackage.equals(nfcService)) { + return; + } // Don't notify if the app accessing the clipboard is the same as the current owner. if (UserHandle.isSameApp(uid, clipboard.primaryClipUid)) { return; diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java index 77d3392da993..15aa07f40641 100644 --- a/services/core/java/com/android/server/connectivity/Vpn.java +++ b/services/core/java/com/android/server/connectivity/Vpn.java @@ -2944,7 +2944,7 @@ public void onSessionLost(@NonNull Network network, @Nullable Exception exceptio // All the above failures are configuration errors, and are terminal // TODO(b/230548427): Remove SDK check once VPN related stuff are // decoupled from ConnectivityServiceTest. - if (SdkLevel.isAtLeastT()) { + if (SdkLevel.isAtLeastT() && isVpnApp(mPackage)) { sendEventToVpnManagerApp(VpnManager.CATEGORY_EVENT_IKE_ERROR, VpnManager.ERROR_CLASS_NOT_RECOVERABLE, ikeException.getErrorType(), @@ -2962,7 +2962,7 @@ public void onSessionLost(@NonNull Network network, @Nullable Exception exceptio // All the above failures are configuration errors, and are terminal // TODO(b/230548427): Remove SDK check once VPN related stuff are // decoupled from ConnectivityServiceTest. - if (SdkLevel.isAtLeastT()) { + if (SdkLevel.isAtLeastT() && isVpnApp(mPackage)) { sendEventToVpnManagerApp(VpnManager.CATEGORY_EVENT_IKE_ERROR, VpnManager.ERROR_CLASS_RECOVERABLE, ikeException.getErrorType(), @@ -2981,7 +2981,7 @@ public void onSessionLost(@NonNull Network network, @Nullable Exception exceptio } else if (exception instanceof IkeNetworkLostException) { // TODO(b/230548427): Remove SDK check once VPN related stuff are // decoupled from ConnectivityServiceTest. - if (SdkLevel.isAtLeastT()) { + if (SdkLevel.isAtLeastT() && isVpnApp(mPackage)) { sendEventToVpnManagerApp(VpnManager.CATEGORY_EVENT_NETWORK_ERROR, VpnManager.ERROR_CLASS_RECOVERABLE, VpnManager.ERROR_CODE_NETWORK_LOST, @@ -2996,7 +2996,7 @@ public void onSessionLost(@NonNull Network network, @Nullable Exception exceptio if (exception.getCause() instanceof UnknownHostException) { // TODO(b/230548427): Remove SDK check once VPN related stuff are // decoupled from ConnectivityServiceTest. - if (SdkLevel.isAtLeastT()) { + if (SdkLevel.isAtLeastT() && isVpnApp(mPackage)) { sendEventToVpnManagerApp(VpnManager.CATEGORY_EVENT_NETWORK_ERROR, VpnManager.ERROR_CLASS_RECOVERABLE, VpnManager.ERROR_CODE_NETWORK_UNKNOWN_HOST, @@ -3010,7 +3010,7 @@ public void onSessionLost(@NonNull Network network, @Nullable Exception exceptio } else if (exception.getCause() instanceof IkeTimeoutException) { // TODO(b/230548427): Remove SDK check once VPN related stuff are // decoupled from ConnectivityServiceTest. - if (SdkLevel.isAtLeastT()) { + if (SdkLevel.isAtLeastT() && isVpnApp(mPackage)) { sendEventToVpnManagerApp(VpnManager.CATEGORY_EVENT_NETWORK_ERROR, VpnManager.ERROR_CLASS_RECOVERABLE, VpnManager.ERROR_CODE_NETWORK_PROTOCOL_TIMEOUT, @@ -3024,7 +3024,7 @@ public void onSessionLost(@NonNull Network network, @Nullable Exception exceptio } else if (exception.getCause() instanceof IOException) { // TODO(b/230548427): Remove SDK check once VPN related stuff are // decoupled from ConnectivityServiceTest. - if (SdkLevel.isAtLeastT()) { + if (SdkLevel.isAtLeastT() && isVpnApp(mPackage)) { sendEventToVpnManagerApp(VpnManager.CATEGORY_EVENT_NETWORK_ERROR, VpnManager.ERROR_CLASS_RECOVERABLE, VpnManager.ERROR_CODE_NETWORK_IO, diff --git a/services/core/java/com/android/server/custom/LineageHardwareService.java b/services/core/java/com/android/server/custom/LineageHardwareService.java new file mode 100644 index 000000000000..c5d6b18251bd --- /dev/null +++ b/services/core/java/com/android/server/custom/LineageHardwareService.java @@ -0,0 +1,568 @@ +/* + * Copyright (C) 2015-2016 The CyanogenMod Project + * 2017-2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.server.custom; + +import android.content.Context; +import android.content.Intent; +import android.os.IBinder; +import android.os.RemoteCallbackList; +import android.os.RemoteException; +import android.os.UserHandle; +import android.util.Log; +import android.util.Range; + +import com.android.server.display.color.DisplayTransformManager; +import com.android.server.LocalServices; +import com.android.server.SystemService; + +import com.android.internal.custom.hardware.ILineageHardwareService; +import com.android.internal.custom.hardware.LineageHardwareManager; +import com.android.internal.custom.hardware.DisplayMode; +import com.android.internal.custom.hardware.HSIC; + +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.android.internal.custom.app.LineageContextConstants; +import com.android.internal.custom.hardware.AdaptiveBacklight; +import com.android.internal.custom.hardware.AutoContrast; +import com.android.internal.custom.hardware.ColorBalance; +import com.android.internal.custom.hardware.ColorEnhancement; +import com.android.internal.custom.hardware.DisplayColorCalibration; +import com.android.internal.custom.hardware.DisplayModeControl; +import com.android.internal.custom.hardware.PictureAdjustment; +import com.android.internal.custom.hardware.ReadingEnhancement; +import com.android.internal.custom.hardware.SunlightEnhancement; + +import static com.android.server.display.color.DisplayTransformManager.LEVEL_COLOR_MATRIX_NIGHT_DISPLAY; +import static com.android.server.display.color.DisplayTransformManager.LEVEL_COLOR_MATRIX_GRAYSCALE; + +/** @hide */ +public class LineageHardwareService extends SystemService { + + private static final boolean DEBUG = true; + private static final String TAG = LineageHardwareService.class.getSimpleName(); + + private final Context mContext; + private final LineageHardwareInterface mLineageHwImpl; + + private interface LineageHardwareInterface { + public int getSupportedFeatures(); + public boolean get(int feature); + public boolean set(int feature, boolean enable); + + public int[] getDisplayColorCalibration(); + public boolean setDisplayColorCalibration(int[] rgb); + + public boolean requireAdaptiveBacklightForSunlightEnhancement(); + public boolean isSunlightEnhancementSelfManaged(); + + public DisplayMode[] getDisplayModes(); + public DisplayMode getCurrentDisplayMode(); + public DisplayMode getDefaultDisplayMode(); + public boolean setDisplayMode(DisplayMode mode, boolean makeDefault); + + public int getColorBalanceMin(); + public int getColorBalanceMax(); + public int getColorBalance(); + public boolean setColorBalance(int value); + + public HSIC getPictureAdjustment(); + public HSIC getDefaultPictureAdjustment(); + public boolean setPictureAdjustment(HSIC hsic); + public List> getPictureAdjustmentRanges(); + } + + private class LegacyLineageHardware implements LineageHardwareInterface { + + private final int MIN = 0; + private final int MAX = 255; + + /** + * Matrix and offset used for converting color to grayscale. + * Copied from com.android.server.accessibility.DisplayAdjustmentUtils.MATRIX_GRAYSCALE + */ + private final float[] MATRIX_GRAYSCALE = { + .2126f, .2126f, .2126f, 0, + .7152f, .7152f, .7152f, 0, + .0722f, .0722f, .0722f, 0, + 0, 0, 0, 1 + }; + + /** Full color matrix and offset */ + private final float[] MATRIX_NORMAL = { + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + }; + + private final int LEVEL_COLOR_MATRIX_CALIB = LEVEL_COLOR_MATRIX_NIGHT_DISPLAY + 1; + private final int LEVEL_COLOR_MATRIX_READING = LEVEL_COLOR_MATRIX_GRAYSCALE + 1; + + private boolean mAcceleratedTransform; + private DisplayTransformManager mDTMService; + + private int[] mCurColors = { MAX, MAX, MAX }; + private boolean mReadingEnhancementEnabled; + + private int mSupportedFeatures = 0; + + public LegacyLineageHardware() { + mAcceleratedTransform = mContext.getResources().getBoolean( + com.android.internal.R.bool.config_setColorTransformAccelerated); + if (AdaptiveBacklight.isSupported()) + mSupportedFeatures |= LineageHardwareManager.FEATURE_ADAPTIVE_BACKLIGHT; + if (ColorEnhancement.isSupported()) + mSupportedFeatures |= LineageHardwareManager.FEATURE_COLOR_ENHANCEMENT; + if (DisplayColorCalibration.isSupported()) + mSupportedFeatures |= LineageHardwareManager.FEATURE_DISPLAY_COLOR_CALIBRATION; + if (ReadingEnhancement.isSupported()) + mSupportedFeatures |= LineageHardwareManager.FEATURE_READING_ENHANCEMENT; + if (SunlightEnhancement.isSupported()) + mSupportedFeatures |= LineageHardwareManager.FEATURE_SUNLIGHT_ENHANCEMENT; + if (AutoContrast.isSupported()) + mSupportedFeatures |= LineageHardwareManager.FEATURE_AUTO_CONTRAST; + if (DisplayModeControl.isSupported()) + mSupportedFeatures |= LineageHardwareManager.FEATURE_DISPLAY_MODES; + if (ColorBalance.isSupported()) + mSupportedFeatures |= LineageHardwareManager.FEATURE_COLOR_BALANCE; + if (PictureAdjustment.isSupported()) + mSupportedFeatures |= LineageHardwareManager.FEATURE_PICTURE_ADJUSTMENT; + if (mAcceleratedTransform) { + mDTMService = LocalServices.getService(DisplayTransformManager.class); + mSupportedFeatures |= LineageHardwareManager.FEATURE_DISPLAY_COLOR_CALIBRATION; + mSupportedFeatures |= LineageHardwareManager.FEATURE_READING_ENHANCEMENT; + } + } + + public int getSupportedFeatures() { + return mSupportedFeatures; + } + + public boolean get(int feature) { + switch(feature) { + case LineageHardwareManager.FEATURE_ADAPTIVE_BACKLIGHT: + return AdaptiveBacklight.isEnabled(); + case LineageHardwareManager.FEATURE_AUTO_CONTRAST: + return AutoContrast.isEnabled(); + case LineageHardwareManager.FEATURE_COLOR_ENHANCEMENT: + return ColorEnhancement.isEnabled(); + case LineageHardwareManager.FEATURE_READING_ENHANCEMENT: + if (mAcceleratedTransform) + return mReadingEnhancementEnabled; + return ReadingEnhancement.isEnabled(); + case LineageHardwareManager.FEATURE_SUNLIGHT_ENHANCEMENT: + return SunlightEnhancement.isEnabled(); + default: + Log.e(TAG, "feature " + feature + " is not a boolean feature"); + return false; + } + } + + public boolean set(int feature, boolean enable) { + switch(feature) { + case LineageHardwareManager.FEATURE_ADAPTIVE_BACKLIGHT: + return AdaptiveBacklight.setEnabled(enable); + case LineageHardwareManager.FEATURE_AUTO_CONTRAST: + return AutoContrast.setEnabled(enable); + case LineageHardwareManager.FEATURE_COLOR_ENHANCEMENT: + return ColorEnhancement.setEnabled(enable); + case LineageHardwareManager.FEATURE_READING_ENHANCEMENT: + if (mAcceleratedTransform) { + mReadingEnhancementEnabled = enable; + mDTMService.setColorMatrix(LEVEL_COLOR_MATRIX_READING, + enable ? MATRIX_GRAYSCALE : MATRIX_NORMAL); + return true; + } + return ReadingEnhancement.setEnabled(enable); + case LineageHardwareManager.FEATURE_SUNLIGHT_ENHANCEMENT: + return SunlightEnhancement.setEnabled(enable); + default: + Log.e(TAG, "feature " + feature + " is not a boolean feature"); + return false; + } + } + + private int[] splitStringToInt(String input, String delimiter) { + if (input == null || delimiter == null) { + return null; + } + String strArray[] = input.split(delimiter); + try { + int intArray[] = new int[strArray.length]; + for(int i = 0; i < strArray.length; i++) { + intArray[i] = Integer.parseInt(strArray[i]); + } + return intArray; + } catch (NumberFormatException e) { + /* ignore */ + } + return null; + } + + private String rgbToString(int[] rgb) { + StringBuilder builder = new StringBuilder(); + builder.append(rgb[LineageHardwareManager.COLOR_CALIBRATION_RED_INDEX]); + builder.append(" "); + builder.append(rgb[LineageHardwareManager.COLOR_CALIBRATION_GREEN_INDEX]); + builder.append(" "); + builder.append(rgb[LineageHardwareManager.COLOR_CALIBRATION_BLUE_INDEX]); + return builder.toString(); + } + + private float[] rgbToMatrix(int[] rgb) { + float[] mat = new float[16]; + + for (int i = 0; i < 3; i++) { + // Sanity check + if (rgb[i] > MAX) + rgb[i] = MAX; + else if (rgb[i] < MIN) + rgb[i] = MIN; + + mat[i * 5] = (float)rgb[i] / (float)MAX; + } + + mat[15] = 1.0f; + return mat; + } + + public int[] getDisplayColorCalibration() { + int[] rgb = mAcceleratedTransform ? mCurColors : + splitStringToInt(DisplayColorCalibration.getCurColors(), " "); + if (rgb == null || rgb.length != 3) { + Log.e(TAG, "Invalid color calibration string"); + return null; + } + int[] currentCalibration = new int[5]; + currentCalibration[LineageHardwareManager.COLOR_CALIBRATION_RED_INDEX] = rgb[0]; + currentCalibration[LineageHardwareManager.COLOR_CALIBRATION_GREEN_INDEX] = rgb[1]; + currentCalibration[LineageHardwareManager.COLOR_CALIBRATION_BLUE_INDEX] = rgb[2]; + currentCalibration[LineageHardwareManager.COLOR_CALIBRATION_MIN_INDEX] = + mAcceleratedTransform ? MIN : DisplayColorCalibration.getMinValue(); + currentCalibration[LineageHardwareManager.COLOR_CALIBRATION_MAX_INDEX] = + mAcceleratedTransform ? MAX : DisplayColorCalibration.getMaxValue(); + return currentCalibration; + } + + public boolean setDisplayColorCalibration(int[] rgb) { + if (mAcceleratedTransform) { + mCurColors = rgb; + mDTMService.setColorMatrix(LEVEL_COLOR_MATRIX_CALIB, rgbToMatrix(rgb)); + return true; + } + return DisplayColorCalibration.setColors(rgbToString(rgb)); + } + + public boolean requireAdaptiveBacklightForSunlightEnhancement() { + return SunlightEnhancement.isAdaptiveBacklightRequired(); + } + + public boolean isSunlightEnhancementSelfManaged() { + return SunlightEnhancement.isSelfManaged(); + } + + public DisplayMode[] getDisplayModes() { + return DisplayModeControl.getAvailableModes(); + } + + public DisplayMode getCurrentDisplayMode() { + return DisplayModeControl.getCurrentMode(); + } + + public DisplayMode getDefaultDisplayMode() { + return DisplayModeControl.getDefaultMode(); + } + + public boolean setDisplayMode(DisplayMode mode, boolean makeDefault) { + return DisplayModeControl.setMode(mode, makeDefault); + } + + public int getColorBalanceMin() { + return ColorBalance.getMinValue(); + } + + public int getColorBalanceMax() { + return ColorBalance.getMaxValue(); + } + + public int getColorBalance() { + return ColorBalance.getValue(); + } + + public boolean setColorBalance(int value) { + return ColorBalance.setValue(value); + } + + public HSIC getPictureAdjustment() { return PictureAdjustment.getHSIC(); } + + public HSIC getDefaultPictureAdjustment() { return PictureAdjustment.getDefaultHSIC(); } + + public boolean setPictureAdjustment(HSIC hsic) { return PictureAdjustment.setHSIC(hsic); } + + public List> getPictureAdjustmentRanges() { + return Arrays.asList( + PictureAdjustment.getHueRange(), + PictureAdjustment.getSaturationRange(), + PictureAdjustment.getIntensityRange(), + PictureAdjustment.getContrastRange(), + PictureAdjustment.getSaturationThresholdRange()); + } + } + + private LineageHardwareInterface getImpl(Context context) { + return new LegacyLineageHardware(); + } + + public LineageHardwareService(Context context) { + super(context); + mContext = context; + mLineageHwImpl = getImpl(context); + publishBinderService(LineageContextConstants.LINEAGE_HARDWARE_SERVICE, mService); + } + + @Override + public void onBootPhase(int phase) { + if (phase == PHASE_BOOT_COMPLETED) { + Intent intent = new Intent("lineageos.intent.action.INITIALIZE_LINEAGE_HARDWARE"); + intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); + mContext.sendBroadcastAsUser(intent, UserHandle.ALL, + "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS"); + } + } + + @Override + public void onStart() { + } + + private final IBinder mService = new ILineageHardwareService.Stub() { + + private boolean isSupported(int feature) { + return (getSupportedFeatures() & feature) == feature; + } + + @Override + public int getSupportedFeatures() { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS", null); + return mLineageHwImpl.getSupportedFeatures(); + } + + @Override + public boolean get(int feature) { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS", null); + if (!isSupported(feature)) { + Log.e(TAG, "feature " + feature + " is not supported"); + return false; + } + return mLineageHwImpl.get(feature); + } + + @Override + public boolean set(int feature, boolean enable) { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS", null); + if (!isSupported(feature)) { + Log.e(TAG, "feature " + feature + " is not supported"); + return false; + } + return mLineageHwImpl.set(feature, enable); + } + + @Override + public int[] getDisplayColorCalibration() { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS", null); + if (!isSupported(LineageHardwareManager.FEATURE_DISPLAY_COLOR_CALIBRATION)) { + Log.e(TAG, "Display color calibration is not supported"); + return null; + } + return mLineageHwImpl.getDisplayColorCalibration(); + } + + @Override + public boolean setDisplayColorCalibration(int[] rgb) { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS", null); + if (!isSupported(LineageHardwareManager.FEATURE_DISPLAY_COLOR_CALIBRATION)) { + Log.e(TAG, "Display color calibration is not supported"); + return false; + } + if (rgb.length < 3) { + Log.e(TAG, "Invalid color calibration"); + return false; + } + return mLineageHwImpl.setDisplayColorCalibration(rgb); + } + + @Override + public boolean requireAdaptiveBacklightForSunlightEnhancement() { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS", null); + if (!isSupported(LineageHardwareManager.FEATURE_SUNLIGHT_ENHANCEMENT)) { + Log.e(TAG, "Sunlight enhancement is not supported"); + return false; + } + return mLineageHwImpl.requireAdaptiveBacklightForSunlightEnhancement(); + } + + @Override + public boolean isSunlightEnhancementSelfManaged() { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS", null); + if (!isSupported(LineageHardwareManager.FEATURE_SUNLIGHT_ENHANCEMENT)) { + Log.e(TAG, "Sunlight enhancement is not supported"); + return false; + } + return mLineageHwImpl.isSunlightEnhancementSelfManaged(); + } + + @Override + public DisplayMode[] getDisplayModes() { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS", null); + if (!isSupported(LineageHardwareManager.FEATURE_DISPLAY_MODES)) { + Log.e(TAG, "Display modes are not supported"); + return null; + } + return mLineageHwImpl.getDisplayModes(); + } + + @Override + public DisplayMode getCurrentDisplayMode() { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS", null); + if (!isSupported(LineageHardwareManager.FEATURE_DISPLAY_MODES)) { + Log.e(TAG, "Display modes are not supported"); + return null; + } + return mLineageHwImpl.getCurrentDisplayMode(); + } + + @Override + public DisplayMode getDefaultDisplayMode() { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS", null); + if (!isSupported(LineageHardwareManager.FEATURE_DISPLAY_MODES)) { + Log.e(TAG, "Display modes are not supported"); + return null; + } + return mLineageHwImpl.getDefaultDisplayMode(); + } + + @Override + public boolean setDisplayMode(DisplayMode mode, boolean makeDefault) { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS", null); + if (!isSupported(LineageHardwareManager.FEATURE_DISPLAY_MODES)) { + Log.e(TAG, "Display modes are not supported"); + return false; + } + return mLineageHwImpl.setDisplayMode(mode, makeDefault); + } + + @Override + public int getColorBalanceMin() { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS", null); + if (isSupported(LineageHardwareManager.FEATURE_COLOR_BALANCE)) { + return mLineageHwImpl.getColorBalanceMin(); + } + return 0; + } + + @Override + public int getColorBalanceMax() { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS", null); + if (isSupported(LineageHardwareManager.FEATURE_COLOR_BALANCE)) { + return mLineageHwImpl.getColorBalanceMax(); + } + return 0; + } + + @Override + public int getColorBalance() { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS", null); + if (isSupported(LineageHardwareManager.FEATURE_COLOR_BALANCE)) { + return mLineageHwImpl.getColorBalance(); + } + return 0; + } + + @Override + public boolean setColorBalance(int value) { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS", null); + if (isSupported(LineageHardwareManager.FEATURE_COLOR_BALANCE)) { + return mLineageHwImpl.setColorBalance(value); + } + return false; + } + + @Override + public HSIC getPictureAdjustment() { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS", null); + if (isSupported(LineageHardwareManager.FEATURE_PICTURE_ADJUSTMENT)) { + return mLineageHwImpl.getPictureAdjustment(); + } + return new HSIC(0.0f, 0.0f, 0.0f, 0.0f, 0.0f); + } + + @Override + public HSIC getDefaultPictureAdjustment() { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS", null); + if (isSupported(LineageHardwareManager.FEATURE_PICTURE_ADJUSTMENT)) { + return mLineageHwImpl.getDefaultPictureAdjustment(); + } + return new HSIC(0.0f, 0.0f, 0.0f, 0.0f, 0.0f); + } + + @Override + public boolean setPictureAdjustment(HSIC hsic) { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS", null); + if (isSupported(LineageHardwareManager.FEATURE_PICTURE_ADJUSTMENT) && hsic != null) { + return mLineageHwImpl.setPictureAdjustment(hsic); + } + return false; + } + + @Override + public float[] getPictureAdjustmentRanges() { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS", null); + if (isSupported(LineageHardwareManager.FEATURE_PICTURE_ADJUSTMENT)) { + final List> r = mLineageHwImpl.getPictureAdjustmentRanges(); + return new float[] { + r.get(0).getLower(), r.get(0).getUpper(), + r.get(1).getLower(), r.get(1).getUpper(), + r.get(2).getLower(), r.get(2).getUpper(), + r.get(3).getLower(), r.get(3).getUpper(), + r.get(4).getUpper(), r.get(4).getUpper() }; + } + return new float[10]; + } + }; +} diff --git a/services/core/java/com/android/server/custom/common/UserContentObserver.java b/services/core/java/com/android/server/custom/common/UserContentObserver.java new file mode 100644 index 000000000000..f1902922eac2 --- /dev/null +++ b/services/core/java/com/android/server/custom/common/UserContentObserver.java @@ -0,0 +1,95 @@ +/* + * Copyright (C) 2016 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ +package com.android.server.custom.common; + +import android.app.ActivityManagerNative; +import android.app.IUserSwitchObserver; +import android.database.ContentObserver; +import android.net.Uri; +import android.os.Handler; +import android.os.IRemoteCallback; +import android.os.RemoteException; +import android.util.Log; + +/** + * Simple extension of ContentObserver that also listens for user switch events to call update + */ +public abstract class UserContentObserver extends ContentObserver { + private static final String TAG = "UserContentObserver"; + + private Runnable mUpdateRunnable; + + private IUserSwitchObserver mUserSwitchObserver = new IUserSwitchObserver.Stub() { + @Override + public void onUserSwitching(int newUserId, IRemoteCallback reply) { + } + @Override + public void onUserSwitchComplete(int newUserId) throws RemoteException { + mHandler.post(mUpdateRunnable); + } + @Override + public void onForegroundProfileSwitch(int newProfileId) { + } + @Override + public void onLockedBootComplete(int newUserId) { + } + }; + + private Handler mHandler; + + /** + * Content observer that tracks user switches + * to allow clients to re-load settings for current user + */ + public UserContentObserver(Handler handler) { + super(handler); + mHandler = handler; + mUpdateRunnable = new Runnable() { + @Override + public void run() { + update(); + } + }; + } + + protected void observe() { + try { + ActivityManagerNative.getDefault().registerUserSwitchObserver(mUserSwitchObserver, TAG); + } catch (RemoteException e) { + Log.w(TAG, "Unable to register user switch observer!", e); + } + } + + protected void unobserve() { + try { + mHandler.removeCallbacks(mUpdateRunnable); + ActivityManagerNative.getDefault().unregisterUserSwitchObserver(mUserSwitchObserver); + } catch (RemoteException e) { + Log.w(TAG, "Unable to unregister user switch observer!", e); + } + } + + /** + * Called to notify of registered uri changes and user switches. + * Always invoked on the handler passed in at construction + */ + protected abstract void update(); + + @Override + public void onChange(boolean selfChange, Uri uri) { + update(); + } +} diff --git a/services/core/java/com/android/server/custom/display/AmbientLuxObserver.java b/services/core/java/com/android/server/custom/display/AmbientLuxObserver.java new file mode 100644 index 000000000000..cc6a7e206387 --- /dev/null +++ b/services/core/java/com/android/server/custom/display/AmbientLuxObserver.java @@ -0,0 +1,259 @@ +/* + * Copyright (C) 2016 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.server.custom.display; + +import android.content.Context; +import android.hardware.Sensor; +import android.hardware.SensorEvent; +import android.hardware.SensorEventListener; +import android.hardware.SensorManager; +import android.os.Handler; +import android.os.Looper; +import android.os.Message; +import android.util.Log; + +import java.io.PrintWriter; +import java.util.Iterator; +import java.util.LinkedList; + +public class AmbientLuxObserver { + + private static final String TAG = "AmbientLuxObserver"; + private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG); + + private final Sensor mLightSensor; + private final SensorManager mSensorManager; + + private final float mThresholdLux; + private final float mHysteresisLux; + private final int mThresholdDuration; + + private boolean mLightSensorEnabled = false; + private int mLightSensorRate; + + private float mAmbientLux = 0.0f; + + private static final int LOW = 0; + private static final int HIGH = 1; + + private int mState = LOW; + + private final AmbientLuxHandler mLuxHandler; + + private TransitionListener mCallback; + + private final TimedMovingAverageRingBuffer mRingBuffer; + + public interface TransitionListener { + public void onTransition(int state, float ambientLux); + } + + public AmbientLuxObserver(Context context, Looper looper, + float thresholdLux, float hysteresisLux, int thresholdDuration) { + mLuxHandler = new AmbientLuxHandler(looper); + mThresholdLux = thresholdLux; + mHysteresisLux = hysteresisLux; + mThresholdDuration = thresholdDuration; + mRingBuffer = new TimedMovingAverageRingBuffer(thresholdDuration); + + mSensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE); + mLightSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_LIGHT); + mLightSensorRate = context.getResources().getInteger( + com.android.internal.R.integer.config_autoBrightnessLightSensorRate); + } + + private class AmbientLuxHandler extends Handler { + + private static final int MSG_UPDATE_LUX = 0; + private static final int MSG_TRANSITION = 1; + + AmbientLuxHandler(Looper looper) { + super(looper); + } + + @Override + public void handleMessage(Message msg) { + int direction = 0; + float lux = 0.0f; + + synchronized (AmbientLuxObserver.this) { + switch (msg.what) { + case MSG_UPDATE_LUX: + lux = (Float) msg.obj; + mRingBuffer.add(lux); + + // FALL THRU + + case MSG_TRANSITION: + mAmbientLux = mRingBuffer.getAverage(); + + if (DEBUG) { + Log.d(TAG, "lux= " + lux + " mState=" + mState + + " mAmbientLux=" + mAmbientLux); + } + + final float threshold = mState == HIGH + ? mThresholdLux - mHysteresisLux : mThresholdLux; + direction = mAmbientLux >= threshold ? HIGH : LOW; + if (mState != direction) { + mState = direction; + if (mCallback != null) { + mCallback.onTransition(mState, mAmbientLux); + } + } + + // check again in case we didn't get any + // more readings because the sensor settled + if (mRingBuffer.size() > 1) { + removeMessages(MSG_TRANSITION); + sendEmptyMessageDelayed(MSG_TRANSITION, mThresholdDuration / 2); + } + break; + } + } + } + + void clear() { + removeCallbacksAndMessages(null); + } + }; + + private final SensorEventListener mListener = new SensorEventListener() { + @Override + public void onSensorChanged(SensorEvent event) { + if (mLightSensorEnabled) { + Message.obtain(mLuxHandler, AmbientLuxHandler.MSG_UPDATE_LUX, + event.values[0]).sendToTarget(); + } + } + + @Override + public void onAccuracyChanged(Sensor sensor, int accuracy) { + // Not used. + } + }; + + public synchronized int getState() { + return mState; + } + + public synchronized void setTransitionListener(TransitionListener callback) { + mCallback = callback; + enableLightSensor(callback != null); + } + + private void enableLightSensor(boolean enable) { + if (enable && !mLightSensorEnabled) { + mLightSensorEnabled = true; + mSensorManager.registerListener(mListener, mLightSensor, + mLightSensorRate * 1000, mLuxHandler); + } else if (!enable && mLightSensorEnabled) { + mSensorManager.unregisterListener(mListener); + mLuxHandler.clear(); + mAmbientLux = 0.0f; + mState = LOW; + mLightSensorEnabled = false; + mRingBuffer.clear(); + } + } + + public void dump(PrintWriter pw) { + pw.println(); + pw.println(" AmbientLuxObserver State:"); + pw.println(" mLightSensorEnabled=" + mLightSensorEnabled); + pw.println(" mState=" + mState); + pw.println(" mAmbientLux=" + mAmbientLux); + pw.println(" mRingBuffer=" + mRingBuffer.toString()); + } + + /** + * Calculates a simple moving average based on a fixed + * duration sliding window. This is useful for dampening + * erratic sensors and rolling thru transitional periods + * smoothly. + */ + private static class TimedMovingAverageRingBuffer { + + private final LinkedList mRing = new LinkedList(); + + private final int mPeriod; + + private float mTotal = 0.0f; + + private static class Sample { + public final long mTimestamp; + public final float mValue; + public Sample (long timestamp, float value) { + mTimestamp = timestamp; + mValue = value; + } + + @Override + public String toString() { + return "(" + mValue + ", " + mTimestamp + ")"; + } + } + + public TimedMovingAverageRingBuffer(int period) { + mPeriod = period; + } + + public synchronized void add(float sample) { + expire(); + if (sample == 0.0f && mRing.size() == 0) { + return; + } + mRing.offer(new Sample(System.currentTimeMillis(), sample)); + mTotal += sample; + } + + public synchronized int size() { + return mRing.size(); + } + + public synchronized float getAverage() { + expire(); + return mRing.size() == 0 ? 0.0f : (mTotal / mRing.size()); + } + + public synchronized void clear() { + mRing.clear(); + mTotal = 0.0f; + } + + private void expire() { + long now = System.currentTimeMillis(); + while (mRing.size() > 1 && + ((now - mRing.peek().mTimestamp) > mPeriod)) { + mTotal -= mRing.pop().mValue; + } + } + + @Override + public synchronized String toString() { + expire(); + StringBuilder sb = new StringBuilder(); + for (Iterator i = mRing.iterator(); i.hasNext();) { + if (sb.length() > 0) { + sb.append(", "); + } + sb.append(i.next()); + } + return "average=" + getAverage() + " length=" + mRing.size() + + " mRing=[" + sb.toString() + "]"; + } + } +} diff --git a/services/core/java/com/android/server/custom/display/ColorTemperatureController.java b/services/core/java/com/android/server/custom/display/ColorTemperatureController.java new file mode 100644 index 000000000000..3de5d54e312e --- /dev/null +++ b/services/core/java/com/android/server/custom/display/ColorTemperatureController.java @@ -0,0 +1,376 @@ +/* + * Copyright (C) 2016 The CyanogenMod Project + * 2018-2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.server.custom.display; + +import android.animation.ValueAnimator; +import android.animation.ValueAnimator.AnimatorUpdateListener; +import android.content.Context; +import android.net.Uri; +import android.os.Handler; +import android.text.format.DateUtils; +import android.util.MathUtils; +import android.util.Range; +import android.util.Slog; +import android.view.animation.AccelerateDecelerateInterpolator; + +import com.android.server.custom.display.TwilightTracker.TwilightState; + +import java.io.PrintWriter; +import java.util.BitSet; + +import com.android.internal.custom.hardware.LineageHardwareManager; +import com.android.internal.custom.hardware.LiveDisplayManager; +import android.provider.Settings; +import com.android.internal.util.custom.ColorUtils; + +import static com.android.internal.custom.hardware.LiveDisplayManager.MODE_AUTO; +import static com.android.internal.custom.hardware.LiveDisplayManager.MODE_DAY; +import static com.android.internal.custom.hardware.LiveDisplayManager.MODE_NIGHT; +import static com.android.internal.custom.hardware.LiveDisplayManager.MODE_OFF; + +public class ColorTemperatureController extends LiveDisplayFeature { + + private final DisplayHardwareController mDisplayHardware; + + private final boolean mUseTemperatureAdjustment; + private final boolean mUseColorBalance; + private final Range mColorBalanceRange; + private final Range mColorTemperatureRange; + private final double[] mColorBalanceCurve; + + private final int mDefaultDayTemperature; + private final int mDefaultNightTemperature; + + private int mColorTemperature = -1; + private int mDayTemperature; + private int mNightTemperature; + + private AccelerateDecelerateInterpolator mInterpolator; + private ValueAnimator mAnimator; + + private final LineageHardwareManager mHardware; + + private static final long TWILIGHT_ADJUSTMENT_TIME = DateUtils.HOUR_IN_MILLIS / 2; + + private static final Uri DISPLAY_TEMPERATURE_DAY = + Settings.System.getUriFor(Settings.System.DISPLAY_TEMPERATURE_DAY); + private static final Uri DISPLAY_TEMPERATURE_NIGHT = + Settings.System.getUriFor(Settings.System.DISPLAY_TEMPERATURE_NIGHT); + + public ColorTemperatureController(Context context, + Handler handler, DisplayHardwareController displayHardware) { + super(context, handler); + mDisplayHardware = displayHardware; + mHardware = LineageHardwareManager.getInstance(mContext); + + mUseColorBalance = mHardware + .isSupported(LineageHardwareManager.FEATURE_COLOR_BALANCE); + mColorBalanceRange = mHardware.getColorBalanceRange(); + + mUseTemperatureAdjustment = !mNightDisplayAvailable && + (mUseColorBalance || mDisplayHardware.hasColorAdjustment()); + + mDefaultDayTemperature = mContext.getResources().getInteger( + com.android.internal.R.integer.config_dayColorTemperature); + mDefaultNightTemperature = mContext.getResources().getInteger( + com.android.internal.R.integer.config_nightColorTemperature); + + mColorTemperatureRange = Range.create( + mContext.getResources().getInteger( + com.android.internal.R.integer.config_minColorTemperature), + mContext.getResources().getInteger( + com.android.internal.R.integer.config_maxColorTemperature)); + + mColorBalanceCurve = com.android.internal.util.custom.MathUtils.powerCurve( + mColorTemperatureRange.getLower(), + mDefaultDayTemperature, + mColorTemperatureRange.getUpper()); + + mInterpolator = new AccelerateDecelerateInterpolator(); + } + + @Override + public void onStart() { + if (!mUseTemperatureAdjustment) { + return; + } + + mDayTemperature = getDayColorTemperature(); + mNightTemperature = getNightColorTemperature(); + + registerSettings(DISPLAY_TEMPERATURE_DAY, DISPLAY_TEMPERATURE_NIGHT); + } + + @Override + public boolean getCapabilities(final BitSet caps) { + if (mUseTemperatureAdjustment) { + caps.set(MODE_AUTO); + caps.set(MODE_DAY); + caps.set(MODE_NIGHT); + if (mUseColorBalance) { + caps.set(LiveDisplayManager.FEATURE_COLOR_BALANCE); + } + } + return mUseTemperatureAdjustment; + } + + @Override + protected void onUpdate() { + updateColorTemperature(); + } + + @Override + protected void onScreenStateChanged() { + if (mAnimator != null && mAnimator.isRunning() && !isScreenOn()) { + mAnimator.cancel(); + } else { + updateColorTemperature(); + } + } + + @Override + protected void onTwilightUpdated() { + updateColorTemperature(); + } + + @Override + protected synchronized void onSettingsChanged(Uri uri) { + if (uri == null || uri.equals(DISPLAY_TEMPERATURE_DAY)) { + mDayTemperature = getDayColorTemperature(); + } + if (uri == null || uri.equals(DISPLAY_TEMPERATURE_NIGHT)) { + mNightTemperature = getNightColorTemperature(); + } + updateColorTemperature(); + } + + @Override + public void dump(PrintWriter pw) { + pw.println(); + pw.println("ColorTemperatureController Configuration:"); + pw.println(" mDayTemperature=" + mDayTemperature); + pw.println(" mNightTemperature=" + mNightTemperature); + pw.println(); + pw.println(" ColorTemperatureController State:"); + pw.println(" mColorTemperature=" + mColorTemperature); + pw.println(" isTransitioning=" + isTransitioning()); + } + + private final Runnable mTransitionRunnable = new Runnable() { + @Override + public void run() { + updateColorTemperature(); + } + }; + + private boolean isTransitioning() { + return getMode() == MODE_AUTO && + mColorTemperature != mDayTemperature && + mColorTemperature != mNightTemperature; + } + + private synchronized void updateColorTemperature() { + if (!mUseTemperatureAdjustment || !isScreenOn()) { + return; + } + int temperature = mDayTemperature; + int mode = getMode(); + + if (mode == MODE_OFF) { + temperature = mDefaultDayTemperature; + } else if (mode == MODE_NIGHT) { + temperature = mNightTemperature; + } else if (mode == MODE_AUTO) { + temperature = getTwilightK(); + } + + if (DEBUG) { + Slog.d(TAG, "updateColorTemperature mode=" + mode + + " temperature=" + temperature + " mColorTemperature=" + mColorTemperature); + } + + setDisplayTemperature(temperature); + + if (isTransitioning()) { + // fire again in 30 seconds + mHandler.postDelayed(mTransitionRunnable, DateUtils.MINUTE_IN_MILLIS / 2); + } + } + + /** + * Smoothly animate the current display color balance + */ + private synchronized void animateColorBalance(int balance) { + + // always start with the current values in the hardware + int current = mHardware.getColorBalance(); + + if (current == balance) { + return; + } + + long duration = (long)(5 * Math.abs(current - balance)); + + + if (DEBUG) { + Slog.d(TAG, "animateDisplayColor current=" + current + + " target=" + balance + " duration=" + duration); + } + + if (mAnimator != null) { + mAnimator.cancel(); + mAnimator.removeAllUpdateListeners(); + } + + mAnimator = ValueAnimator.ofInt(current, balance); + mAnimator.setDuration(duration); + mAnimator.setInterpolator(mInterpolator); + mAnimator.addUpdateListener(new AnimatorUpdateListener() { + @Override + public void onAnimationUpdate(final ValueAnimator animation) { + synchronized (ColorTemperatureController.this) { + if (isScreenOn()) { + int value = (int) animation.getAnimatedValue(); + mHardware.setColorBalance(value); + } + } + } + }); + mAnimator.start(); + } + + /* + * Map the color temperature to a color balance value using a power curve. This assumes the + * correct configuration at the device level! + */ + private int mapColorTemperatureToBalance(int temperature) { + double z = com.android.internal.util.custom.MathUtils.powerCurveToLinear(mColorBalanceCurve, temperature); + return Math.round(MathUtils.lerp((float)mColorBalanceRange.getLower(), + (float)mColorBalanceRange.getUpper(), (float)z)); + } + + private synchronized void setDisplayTemperature(int temperature) { + if (!mColorTemperatureRange.contains(temperature)) { + Slog.e(TAG, "Color temperature out of range: " + temperature); + return; + } + + mColorTemperature = temperature; + + if (mUseColorBalance) { + int balance = mapColorTemperatureToBalance(temperature); + Slog.d(TAG, "Set color balance = " + balance + " (temperature=" + temperature + ")"); + animateColorBalance(balance); + return; + } + + final float[] rgb = ColorUtils.temperatureToRGB(temperature); + if (mDisplayHardware.setAdditionalAdjustment(rgb)) { + if (DEBUG) { + Slog.d(TAG, "Adjust display temperature to " + temperature + "K"); + } + } + } + + /** + * Where is the sun anyway? This calculation determines day or night, and scales + * the value around sunset/sunrise for a smooth transition. + * + * @param now + * @param sunset + * @param sunrise + * @return float between 0 and 1 + */ + private float adj(long now, long sunset, long sunrise) { + if (sunset < 0 || sunrise < 0 + || now < (sunset - TWILIGHT_ADJUSTMENT_TIME) + || now > (sunrise + TWILIGHT_ADJUSTMENT_TIME)) { + // More than 0.5hr after civil sunrise or before civil sunset + return 1.0f; + } + + // Scale the transition into night mode in 0.5hr before civil sunset + if (now <= sunset) { + return mInterpolator.getInterpolation((float) (sunset - now) / TWILIGHT_ADJUSTMENT_TIME); + } + + // Scale the transition into day mode in 0.5hr after civil sunrise + if (now >= sunrise) { + return mInterpolator.getInterpolation((float) (now - sunrise) / TWILIGHT_ADJUSTMENT_TIME); + } + + // More than 0.5hr past civil sunset + return 0.0f; + } + + /** + * Determine the color temperature we should use for the display based on + * the position of the sun. + * + * @return color temperature in Kelvin + */ + private int getTwilightK() { + float adjustment = 1.0f; + final TwilightState twilight = getTwilight(); + + if (twilight != null) { + final long now = System.currentTimeMillis(); + adjustment = adj(now, twilight.getYesterdaySunset(), twilight.getTodaySunrise()) * + adj(now, twilight.getTodaySunset(), twilight.getTomorrowSunrise()); + } + + return (int)MathUtils.lerp(mNightTemperature, mDayTemperature, adjustment); + } + + int getDefaultDayTemperature() { + return mDefaultDayTemperature; + } + + int getDefaultNightTemperature() { + return mDefaultNightTemperature; + } + + int getColorTemperature() { + return mColorTemperature; + } + + int getDayColorTemperature() { + return getInt(Settings.System.DISPLAY_TEMPERATURE_DAY, + mDefaultDayTemperature); + } + + void setDayColorTemperature(int temperature) { + putInt(Settings.System.DISPLAY_TEMPERATURE_DAY, temperature); + } + + int getNightColorTemperature() { + return getInt(Settings.System.DISPLAY_TEMPERATURE_NIGHT, + mDefaultNightTemperature); + } + + void setNightColorTemperature(int temperature) { + putInt(Settings.System.DISPLAY_TEMPERATURE_NIGHT, temperature); + } + + Range getColorTemperatureRange() { + return mColorTemperatureRange; + } + + Range getColorBalanceRange() { + return mColorBalanceRange; + } +} diff --git a/services/core/java/com/android/server/custom/display/DisplayHardwareController.java b/services/core/java/com/android/server/custom/display/DisplayHardwareController.java new file mode 100644 index 000000000000..1681030a330c --- /dev/null +++ b/services/core/java/com/android/server/custom/display/DisplayHardwareController.java @@ -0,0 +1,555 @@ +/* + * Copyright (C) 2016 The CyanogenMod Project + * 2018-2021 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.server.custom.display; + +import android.animation.FloatArrayEvaluator; +import android.animation.ValueAnimator; +import android.animation.ValueAnimator.AnimatorUpdateListener; +import android.content.Context; +import android.net.Uri; +import android.os.Handler; +import android.os.IBinder; +import android.os.Parcel; +import android.os.RemoteException; +import android.os.ServiceManager; +import android.util.MathUtils; +import android.util.Slog; +import android.view.animation.LinearInterpolator; + +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.BitSet; + +import com.android.internal.custom.hardware.LineageHardwareManager; +import com.android.internal.custom.hardware.LiveDisplayManager; +import android.provider.Settings; + +public class DisplayHardwareController extends LiveDisplayFeature { + + private final LineageHardwareManager mHardware; + + // hardware capabilities + private final boolean mUseAutoContrast; + private final boolean mUseColorAdjustment; + private final boolean mUseColorEnhancement; + private final boolean mUseCABC; + private final boolean mUseReaderMode; + private final boolean mUseDisplayModes; + private final boolean mUseAntiFlicker; + + // default values + private final boolean mDefaultAutoContrast; + private final boolean mDefaultColorEnhancement; + private final boolean mDefaultCABC; + private final boolean mDefaultAntiFlicker; + + // color adjustment holders + private final float[] mAdditionalAdjustment = getDefaultAdjustment(); + private final float[] mColorAdjustment = getDefaultAdjustment(); + + private ValueAnimator mAnimator; + + private final int mMaxColor; + + // settings uris + private static final Uri DISPLAY_AUTO_CONTRAST = + Settings.System.getUriFor(Settings.System.DISPLAY_AUTO_CONTRAST); + private static final Uri DISPLAY_COLOR_ADJUSTMENT = + Settings.System.getUriFor(Settings.System.DISPLAY_COLOR_ADJUSTMENT); + private static final Uri DISPLAY_COLOR_ENHANCE = + Settings.System.getUriFor(Settings.System.DISPLAY_COLOR_ENHANCE); + private static final Uri DISPLAY_CABC = + Settings.System.getUriFor(Settings.System.DISPLAY_CABC); + private static final Uri DISPLAY_READING_MODE = + Settings.System.getUriFor(Settings.System.DISPLAY_READING_MODE); + private static final Uri DISPLAY_ANTI_FLICKER = + Settings.System.getUriFor(Settings.System.DISPLAY_ANTI_FLICKER); + + public DisplayHardwareController(Context context, Handler handler) { + super(context, handler); + + mHardware = LineageHardwareManager.getInstance(mContext); + mUseCABC = mHardware + .isSupported(LineageHardwareManager.FEATURE_ADAPTIVE_BACKLIGHT); + mDefaultCABC = mContext.getResources().getBoolean( + com.android.internal.R.bool.config_defaultCABC); + + mUseColorEnhancement = mHardware + .isSupported(LineageHardwareManager.FEATURE_COLOR_ENHANCEMENT); + mDefaultColorEnhancement = mContext.getResources().getBoolean( + com.android.internal.R.bool.config_defaultColorEnhancement); + + mUseAutoContrast = mHardware + .isSupported(LineageHardwareManager.FEATURE_AUTO_CONTRAST); + mDefaultAutoContrast = mContext.getResources().getBoolean( + com.android.internal.R.bool.config_defaultAutoContrast); + + mUseColorAdjustment = mHardware + .isSupported(LineageHardwareManager.FEATURE_DISPLAY_COLOR_CALIBRATION); + + mUseDisplayModes = mHardware + .isSupported(LineageHardwareManager.FEATURE_DISPLAY_MODES); + + mUseReaderMode = mHardware + .isSupported(LineageHardwareManager.FEATURE_READING_ENHANCEMENT); + + mUseAntiFlicker = mHardware + .isSupported(LineageHardwareManager.FEATURE_ANTI_FLICKER); + mDefaultAntiFlicker = mContext.getResources().getBoolean( + com.android.internal.R.bool.config_defaultAntiFlicker); + + if (mUseColorAdjustment) { + mMaxColor = mHardware.getDisplayColorCalibrationMax(); + copyColors(getColorAdjustment(), mColorAdjustment); + } else { + mMaxColor = 0; + } + } + + @Override + public void onStart() { + final ArrayList settings = new ArrayList(); + + if (mUseCABC) { + settings.add(DISPLAY_CABC); + } + if (mUseColorEnhancement) { + settings.add(DISPLAY_COLOR_ENHANCE); + } + if (mUseAutoContrast) { + settings.add(DISPLAY_AUTO_CONTRAST); + } + if (mUseColorAdjustment) { + settings.add(DISPLAY_COLOR_ADJUSTMENT); + } + if (mUseReaderMode) { + settings.add(DISPLAY_READING_MODE); + } + if (mUseAntiFlicker) { + settings.add(DISPLAY_ANTI_FLICKER); + } + + if (settings.size() == 0) { + return; + } + + registerSettings(settings.toArray(new Uri[0])); + } + + @Override + public boolean getCapabilities(final BitSet caps) { + if (mUseAutoContrast) { + caps.set(LiveDisplayManager.FEATURE_AUTO_CONTRAST); + } + if (mUseColorEnhancement) { + caps.set(LiveDisplayManager.FEATURE_COLOR_ENHANCEMENT); + } + if (mUseCABC) { + caps.set(LiveDisplayManager.FEATURE_CABC); + } + if (mUseColorAdjustment) { + caps.set(LiveDisplayManager.FEATURE_COLOR_ADJUSTMENT); + } + if (mUseDisplayModes) { + caps.set(LiveDisplayManager.FEATURE_DISPLAY_MODES); + } + if (mUseReaderMode) { + caps.set(LiveDisplayManager.FEATURE_READING_ENHANCEMENT); + } + if (mUseAntiFlicker) { + caps.set(LiveDisplayManager.FEATURE_ANTI_FLICKER); + } + return mUseAutoContrast || mUseColorEnhancement || mUseCABC || mUseColorAdjustment || + mUseDisplayModes || mUseReaderMode || mUseAntiFlicker; + } + + @Override + public synchronized void onSettingsChanged(Uri uri) { + if (uri == null || uri.equals(DISPLAY_CABC)) { + updateCABCMode(); + } + if (uri == null || uri.equals(DISPLAY_AUTO_CONTRAST)) { + updateAutoContrast(); + } + if (uri == null || uri.equals(DISPLAY_COLOR_ENHANCE)) { + updateColorEnhancement(); + } + if (uri == null || uri.equals(DISPLAY_COLOR_ADJUSTMENT)) { + copyColors(getColorAdjustment(), mColorAdjustment); + updateColorAdjustment(); + } + if (uri == null || uri.equals(DISPLAY_ANTI_FLICKER)) { + updateAntiFlicker(); + } + } + + private synchronized void updateHardware() { + if (isScreenOn()) { + updateCABCMode(); + updateAutoContrast(); + updateColorEnhancement(); + updateAntiFlicker(); + } + } + + @Override + protected void onUpdate() { + updateHardware(); + } + + @Override + protected synchronized void onScreenStateChanged() { + if (mUseColorAdjustment) { + if (mAnimator != null && mAnimator.isRunning() && !isScreenOn()) { + mAnimator.cancel(); + } else if (isScreenOn()) { + updateColorAdjustment(); + } + } + } + + @Override + public void dump(PrintWriter pw) { + pw.println(); + pw.println("DisplayHardwareController Configuration:"); + pw.println(" mUseAutoContrast=" + mUseAutoContrast); + pw.println(" mUseColorAdjustment=" + mUseColorAdjustment); + pw.println(" mUseColorEnhancement=" + mUseColorEnhancement); + pw.println(" mUseCABC=" + mUseCABC); + pw.println(" mUseDisplayModes=" + mUseDisplayModes); + pw.println(" mUseReaderMode=" + mUseReaderMode); + pw.println(" mUseAntiFlicker=" + mUseAntiFlicker); + pw.println(); + pw.println(" DisplayHardwareController State:"); + pw.println(" mAutoContrast=" + isAutoContrastEnabled()); + pw.println(" mColorEnhancement=" + isColorEnhancementEnabled()); + pw.println(" mCABC=" + isCABCEnabled()); + pw.println(" mColorAdjustment=" + Arrays.toString(mColorAdjustment)); + pw.println(" mAdditionalAdjustment=" + Arrays.toString(mAdditionalAdjustment)); + pw.println(" hardware setting=" + Arrays.toString(mHardware.getDisplayColorCalibration())); + } + + /** + * Automatic contrast optimization + */ + private void updateAutoContrast() { + if (!mUseAutoContrast) { + return; + } + mHardware.set(LineageHardwareManager.FEATURE_AUTO_CONTRAST, isAutoContrastEnabled()); + } + + /** + * Color enhancement is optional + */ + private void updateColorEnhancement() { + if (!mUseColorEnhancement) { + return; + } + mHardware.set(LineageHardwareManager.FEATURE_COLOR_ENHANCEMENT, + (!isLowPowerMode() || mDefaultColorEnhancement) && isColorEnhancementEnabled()); + } + + /** + * Adaptive backlight / low power mode. Turn it off when under very bright light. + */ + private void updateCABCMode() { + if (!mUseCABC) { + return; + } + mHardware.set(LineageHardwareManager.FEATURE_ADAPTIVE_BACKLIGHT, isCABCEnabled()); + } + + private synchronized void updateColorAdjustment() { + if (!mUseColorAdjustment) { + return; + } + + final float[] rgb = getDefaultAdjustment(); + + copyColors(mColorAdjustment, rgb); + rgb[0] *= mAdditionalAdjustment[0]; + rgb[1] *= mAdditionalAdjustment[1]; + rgb[2] *= mAdditionalAdjustment[2]; + + if (DEBUG) { + Slog.d(TAG, "updateColorAdjustment: " + Arrays.toString(rgb)); + } + + if (validateColors(rgb)) { + animateDisplayColor(rgb); + } + } + + /** + * Anti flicker mode + */ + private void updateAntiFlicker() { + if (!mUseAntiFlicker) { + return; + } + mHardware.set(LineageHardwareManager.FEATURE_ANTI_FLICKER, isAntiFlickerEnabled()); + } + + /** + * Smoothly animate the current display colors to the new value. + */ + private synchronized void animateDisplayColor(float[] targetColors) { + + // always start with the current values in the hardware + int[] currentInts = mHardware.getDisplayColorCalibration(); + float[] currentColors = new float[] { + (float)currentInts[0] / (float)mMaxColor, + (float)currentInts[1] / (float)mMaxColor, + (float)currentInts[2] / (float)mMaxColor }; + + if (currentColors[0] == targetColors[0] && + currentColors[1] == targetColors[1] && + currentColors[2] == targetColors[2]) { + return; + } + + // max 500 ms, scaled vs. the largest delta + long duration = (long)(750 * (Math.max(Math.max( + Math.abs(currentColors[0] - targetColors[0]), + Math.abs(currentColors[1] - targetColors[1])), + Math.abs(currentColors[2] - targetColors[2])))); + + if (DEBUG) { + Slog.d(TAG, "animateDisplayColor current=" + Arrays.toString(currentColors) + + " targetColors=" + Arrays.toString(targetColors) + " duration=" + duration); + } + + if (mAnimator != null) { + mAnimator.cancel(); + mAnimator.removeAllUpdateListeners(); + } + + mAnimator = ValueAnimator.ofObject( + new FloatArrayEvaluator(new float[3]), currentColors, targetColors); + mAnimator.setDuration(duration); + mAnimator.setInterpolator(new LinearInterpolator()); + mAnimator.addUpdateListener(new AnimatorUpdateListener() { + @Override + public void onAnimationUpdate(final ValueAnimator animation) { + synchronized (DisplayHardwareController.this) { + if (isScreenOn()) { + float[] value = (float[]) animation.getAnimatedValue(); + mHardware.setDisplayColorCalibration(new int[] { + (int) (value[0] * mMaxColor), + (int) (value[1] * mMaxColor), + (int) (value[2] * mMaxColor) + }); + screenRefresh(); + } + } + } + }); + mAnimator.start(); + } + + /** + * Tell SurfaceFlinger to repaint the screen. This is called after updating + * hardware registers for display calibration to have an immediate effect. + */ + private void screenRefresh() { + try { + final IBinder flinger = ServiceManager.getService("SurfaceFlinger"); + if (flinger != null) { + final Parcel data = Parcel.obtain(); + data.writeInterfaceToken("android.ui.ISurfaceComposer"); + flinger.transact(1004, data, null, 0); + data.recycle(); + } + } catch (RemoteException ex) { + Slog.e(TAG, "Failed to refresh screen", ex); + } + } + + /** + * Ensure all values are within range + * + * @param colors + * @return true if valid + */ + private boolean validateColors(float[] colors) { + if (colors == null || colors.length != 3) { + return false; + } + + for (int i = 0; i < 3; i++) { + colors[i] = MathUtils.constrain(colors[i], 0.0f, 1.0f); + } + return true; + } + + /** + * Parse and sanity check an RGB triplet from a string. + */ + private boolean parseColorAdjustment(String rgbString, float[] dest) { + String[] adj = rgbString == null ? null : rgbString.split(" "); + + if (adj == null || adj.length != 3 || dest == null || dest.length != 3) { + return false; + } + + try { + dest[0] = Float.parseFloat(adj[0]); + dest[1] = Float.parseFloat(adj[1]); + dest[2] = Float.parseFloat(adj[2]); + } catch (NumberFormatException e) { + Slog.e(TAG, e.getMessage(), e); + return false; + } + + // sanity check + return validateColors(dest); + } + + /** + * Additional adjustments provided by night mode + * + * @param adj + */ + synchronized boolean setAdditionalAdjustment(float[] adj) { + if (!mUseColorAdjustment) { + return false; + } + + if (DEBUG) { + Slog.d(TAG, "setAdditionalAdjustment: " + Arrays.toString(adj)); + } + + // Sanity check this so we don't mangle the display + if (validateColors(adj)) { + copyColors(adj, mAdditionalAdjustment); + updateColorAdjustment(); + return true; + } + return false; + } + + boolean getDefaultCABC() { + return mDefaultCABC; + } + + boolean getDefaultAutoContrast() { + return mDefaultAutoContrast; + } + + boolean getDefaultColorEnhancement() { + return mDefaultColorEnhancement; + } + + boolean isAutoContrastEnabled() { + return mUseAutoContrast && + getBoolean(Settings.System.DISPLAY_AUTO_CONTRAST, mDefaultAutoContrast); + } + + boolean setAutoContrastEnabled(boolean enabled) { + if (!mUseAutoContrast) { + return false; + } + putBoolean(Settings.System.DISPLAY_AUTO_CONTRAST, enabled); + return true; + } + + boolean isCABCEnabled() { + return mUseCABC && + getBoolean(Settings.System.DISPLAY_CABC, mDefaultCABC); + } + + boolean setCABCEnabled(boolean enabled) { + if (!mUseCABC) { + return false; + } + putBoolean(Settings.System.DISPLAY_CABC, enabled); + return true; + } + + boolean isColorEnhancementEnabled() { + return mUseColorEnhancement && + getBoolean(Settings.System.DISPLAY_COLOR_ENHANCE, + mDefaultColorEnhancement); + } + + boolean setColorEnhancementEnabled(boolean enabled) { + if (!mUseColorEnhancement) { + return false; + } + putBoolean(Settings.System.DISPLAY_COLOR_ENHANCE, enabled); + return true; + } + + float[] getColorAdjustment() { + if (!mUseColorAdjustment) { + return getDefaultAdjustment(); + } + float[] cur = new float[3]; + if (!parseColorAdjustment(getString(Settings.System.DISPLAY_COLOR_ADJUSTMENT), cur)) { + // clear it out if invalid + cur = getDefaultAdjustment(); + saveColorAdjustmentString(cur); + } + return cur; + } + + boolean setColorAdjustment(float[] adj) { + // sanity check + if (!mUseColorAdjustment || !validateColors(adj)) { + return false; + } + saveColorAdjustmentString(adj); + return true; + } + + private void saveColorAdjustmentString(final float[] adj) { + StringBuilder sb = new StringBuilder(); + sb.append(adj[0]).append(" ").append(adj[1]).append(" ").append(adj[2]); + putString(Settings.System.DISPLAY_COLOR_ADJUSTMENT, sb.toString()); + } + + boolean hasColorAdjustment() { + return mUseColorAdjustment; + } + + private static float[] getDefaultAdjustment() { + return new float[] { 1.0f, 1.0f, 1.0f }; + } + + private void copyColors(float[] src, float[] dst) { + if (src != null && dst != null && src.length == 3 && dst.length == 3) { + dst[0] = src[0]; + dst[1] = src[1]; + dst[2] = src[2]; + } + } + + boolean isAntiFlickerEnabled() { + return mUseAntiFlicker && + getBoolean(Settings.System.DISPLAY_ANTI_FLICKER, mDefaultAntiFlicker); + } + + boolean setAntiFlickerEnabled(boolean enabled) { + if (!mUseAntiFlicker) { + return false; + } + putBoolean(Settings.System.DISPLAY_ANTI_FLICKER, enabled); + return true; + } +} diff --git a/services/core/java/com/android/server/custom/display/LiveDisplayFeature.java b/services/core/java/com/android/server/custom/display/LiveDisplayFeature.java new file mode 100644 index 000000000000..9cdb7062f1be --- /dev/null +++ b/services/core/java/com/android/server/custom/display/LiveDisplayFeature.java @@ -0,0 +1,185 @@ +/* + * Copyright (C) 2016 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.server.custom.display; + +import android.content.ContentResolver; +import android.content.Context; +import android.hardware.display.ColorDisplayManager; +import android.net.Uri; +import android.os.Handler; +import android.os.UserHandle; +import android.util.Log; + +import com.android.server.custom.common.UserContentObserver; +import com.android.server.custom.display.LiveDisplayService.State; +import com.android.server.custom.display.TwilightTracker.TwilightState; + +import java.io.PrintWriter; +import java.util.BitSet; + +import android.provider.Settings; + +import static com.android.server.custom.display.LiveDisplayService.ALL_CHANGED; +import static com.android.server.custom.display.LiveDisplayService.DISPLAY_CHANGED; +import static com.android.server.custom.display.LiveDisplayService.MODE_CHANGED; +import static com.android.server.custom.display.LiveDisplayService.TWILIGHT_CHANGED; + + +public abstract class LiveDisplayFeature { + + protected static final String TAG = "LiveDisplay"; + protected static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG); + + protected final Context mContext; + protected final Handler mHandler; + protected final boolean mNightDisplayAvailable; + + private SettingsObserver mSettingsObserver; + private State mState; + + public LiveDisplayFeature(Context context, Handler handler) { + mContext = context; + mHandler = handler; + mNightDisplayAvailable = ColorDisplayManager.isNightDisplayAvailable(mContext); + } + + public abstract void onStart(); + + protected abstract void onSettingsChanged(Uri uri); + + public abstract void dump(PrintWriter pw); + + public abstract boolean getCapabilities(final BitSet caps); + + protected abstract void onUpdate(); + + void update(final int flags, final State state) { + mState = state; + if ((flags & DISPLAY_CHANGED) != 0) { + onScreenStateChanged(); + } + if (((flags & TWILIGHT_CHANGED) != 0) && mState.mTwilight != null) { + onTwilightUpdated(); + } + if ((flags & MODE_CHANGED) != 0) { + onUpdate(); + } + if (flags == ALL_CHANGED) { + onSettingsChanged(null); + } + } + + void start() { + if (mSettingsObserver == null) { + mSettingsObserver = new SettingsObserver(mHandler); + onStart(); + } + } + + public void onDestroy() { + mSettingsObserver.unregister(); + } + + protected void onScreenStateChanged() { } + + protected void onTwilightUpdated() { } + + protected final void registerSettings(Uri... settings) { + mSettingsObserver.register(settings); + } + + protected final boolean getBoolean(String setting, boolean defaultValue) { + return Settings.System.getIntForUser(mContext.getContentResolver(), + setting, (defaultValue ? 1 : 0), UserHandle.USER_CURRENT) == 1; + } + + protected final void putBoolean(String setting, boolean value) { + Settings.System.putIntForUser(mContext.getContentResolver(), + setting, (value ? 1 : 0), UserHandle.USER_CURRENT); + } + + protected final int getInt(String setting, int defaultValue) { + return Settings.System.getIntForUser(mContext.getContentResolver(), + setting, defaultValue, UserHandle.USER_CURRENT); + } + + protected final void putInt(String setting, int value) { + Settings.System.putIntForUser(mContext.getContentResolver(), + setting, value, UserHandle.USER_CURRENT); + } + + protected final String getString(String setting) { + return Settings.System.getStringForUser(mContext.getContentResolver(), + setting, UserHandle.USER_CURRENT); + } + + protected final void putString(String setting, String value) { + Settings.System.putStringForUser(mContext.getContentResolver(), + setting, value, UserHandle.USER_CURRENT); + } + + protected final boolean isLowPowerMode() { + return mState.mLowPowerMode; + } + + protected final int getMode() { + return mState.mMode; + } + + protected final boolean isScreenOn() { + return mState.mScreenOn; + } + + protected final TwilightState getTwilight() { + return mState.mTwilight; + } + + public final boolean isNight() { + return mState.mTwilight != null && mState.mTwilight.isNight(); + } + + final class SettingsObserver extends UserContentObserver { + + public SettingsObserver(Handler handler) { + super(handler); + } + + public void register(Uri... uris) { + final ContentResolver cr = mContext.getContentResolver(); + for (Uri uri : uris) { + cr.registerContentObserver(uri, false, this, UserHandle.USER_ALL); + } + + observe(); + } + + public void unregister() { + mContext.getContentResolver().unregisterContentObserver(this); + unobserve(); + } + + @Override + protected void update() { + onSettingsChanged(null); + } + + @Override + public void onChange(boolean selfChange, Uri uri) { + onSettingsChanged(uri); + } + } + +} diff --git a/services/core/java/com/android/server/custom/display/LiveDisplayService.java b/services/core/java/com/android/server/custom/display/LiveDisplayService.java new file mode 100644 index 000000000000..268bd84a42fb --- /dev/null +++ b/services/core/java/com/android/server/custom/display/LiveDisplayService.java @@ -0,0 +1,573 @@ +/* + * Copyright (C) 2016 The CyanogenMod Project + * 2017-2019,2021 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.server.custom.display; + +import android.app.Notification; +import android.app.NotificationManager; +import android.app.PendingIntent; +import android.content.ContentResolver; +import android.content.Context; +import android.content.Intent; +import android.content.res.Resources; +import android.hardware.display.DisplayManager; +import android.net.Uri; +import android.os.Handler; +import android.os.IBinder; +import android.os.PowerManager.ServiceType; +import android.os.PowerManagerInternal; +import android.os.PowerSaveState; +import android.os.Process; +import android.os.UserHandle; +import android.view.Display; + +import com.android.server.LocalServices; +import com.android.server.ServiceThread; +import com.android.server.SystemService; + +import com.android.server.custom.common.UserContentObserver; +import com.android.server.custom.display.TwilightTracker.TwilightListener; +import com.android.server.custom.display.TwilightTracker.TwilightState; + +import java.io.FileDescriptor; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.BitSet; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; + +import com.android.internal.custom.app.LineageContextConstants; +import com.android.internal.custom.hardware.HSIC; +import com.android.internal.custom.hardware.ILiveDisplayService; +import com.android.internal.custom.hardware.LiveDisplayConfig; +import android.provider.Settings; + +import static com.android.internal.custom.hardware.LiveDisplayManager.FEATURE_MANAGED_OUTDOOR_MODE; +import static com.android.internal.custom.hardware.LiveDisplayManager.MODE_DAY; +import static com.android.internal.custom.hardware.LiveDisplayManager.MODE_FIRST; +import static com.android.internal.custom.hardware.LiveDisplayManager.MODE_LAST; +import static com.android.internal.custom.hardware.LiveDisplayManager.MODE_OFF; +import static com.android.internal.custom.hardware.LiveDisplayManager.MODE_OUTDOOR; + +/** + * LiveDisplay is an advanced set of features for improving + * display quality under various ambient conditions. + * + * The service is constructed with a set of LiveDisplayFeatures + * which provide capabilities such as outdoor mode, night mode, + * and calibration. It interacts with LineageHardwareService to relay + * changes down to the lower layers. + */ +public class LiveDisplayService extends SystemService { + + private static final String TAG = "LiveDisplay"; + + private final Context mContext; + private final Handler mHandler; + private final ServiceThread mHandlerThread; + + private DisplayManager mDisplayManager; + private ModeObserver mModeObserver; + private final TwilightTracker mTwilightTracker; + + private boolean mAwaitingNudge = true; + private boolean mSunset = false; + + private final List mFeatures = new ArrayList(); + + private ColorTemperatureController mCTC; + private DisplayHardwareController mDHC; + private OutdoorModeController mOMC; + private PictureAdjustmentController mPAC; + + private LiveDisplayConfig mConfig; + + static int MODE_CHANGED = 1; + static int DISPLAY_CHANGED = 2; + static int TWILIGHT_CHANGED = 4; + static int ALL_CHANGED = 255; + + // PowerManager ServiceType to use when we're only + // interested in gleaning global battery saver state. + private static final int SERVICE_TYPE_DUMMY = ServiceType.LOCATION; + + static class State { + public boolean mLowPowerMode = false; + public boolean mScreenOn = false; + public int mMode = -1; + public TwilightState mTwilight = null; + + @Override + public String toString() { + return String.format(Locale.US, + "[mLowPowerMode=%b, mScreenOn=%b, mMode=%d, mTwilight=%s", + mLowPowerMode, mScreenOn, mMode, + (mTwilight == null ? "NULL" : mTwilight.toString())); + } + } + + private final State mState = new State(); + + public LiveDisplayService(Context context) { + super(context); + + mContext = context; + + mHandlerThread = new ServiceThread(TAG, + Process.THREAD_PRIORITY_DEFAULT, false /*allowIo*/); + mHandlerThread.start(); + mHandler = new Handler(mHandlerThread.getLooper()); + + mTwilightTracker = new TwilightTracker(context); + } + + @Override + public void onStart() { + publishBinderService(LineageContextConstants.LINEAGE_LIVEDISPLAY_SERVICE, mBinder); + } + + @Override + public void onBootPhase(int phase) { + if (phase == PHASE_BOOT_COMPLETED) { + + mAwaitingNudge = getSunsetCounter() < 1; + + mDHC = new DisplayHardwareController(mContext, mHandler); + mFeatures.add(mDHC); + + mCTC = new ColorTemperatureController(mContext, mHandler, mDHC); + mFeatures.add(mCTC); + + mOMC = new OutdoorModeController(mContext, mHandler); + mFeatures.add(mOMC); + + mPAC = new PictureAdjustmentController(mContext, mHandler); + mFeatures.add(mPAC); + + // Get capabilities, throw out any unused features + final BitSet capabilities = new BitSet(); + for (Iterator it = mFeatures.iterator(); it.hasNext();) { + final LiveDisplayFeature feature = it.next(); + if (!feature.getCapabilities(capabilities)) { + it.remove(); + } + } + + // static config + int defaultMode = mContext.getResources().getInteger( + com.android.internal.R.integer.config_defaultLiveDisplayMode); + + mConfig = new LiveDisplayConfig(capabilities, defaultMode, + mCTC.getDefaultDayTemperature(), mCTC.getDefaultNightTemperature(), + mOMC.getDefaultAutoOutdoorMode(), mDHC.getDefaultAutoContrast(), + mDHC.getDefaultCABC(), mDHC.getDefaultColorEnhancement(), + mCTC.getColorTemperatureRange(), mCTC.getColorBalanceRange(), + mPAC.getHueRange(), mPAC.getSaturationRange(), + mPAC.getIntensityRange(), mPAC.getContrastRange(), + mPAC.getSaturationThresholdRange()); + + // listeners + mDisplayManager = (DisplayManager) getContext().getSystemService( + Context.DISPLAY_SERVICE); + mDisplayManager.registerDisplayListener(mDisplayListener, null); + mState.mScreenOn = mDisplayManager.getDisplay( + Display.DEFAULT_DISPLAY).getState() == Display.STATE_ON; + + PowerManagerInternal pmi = LocalServices.getService(PowerManagerInternal.class); + pmi.registerLowPowerModeObserver(mLowPowerModeListener); + // ServiceType does not matter when retrieving global saver mode. + mState.mLowPowerMode = + pmi.getLowPowerState(SERVICE_TYPE_DUMMY).globalBatterySaverEnabled; + + mTwilightTracker.registerListener(mTwilightListener, mHandler); + mState.mTwilight = mTwilightTracker.getCurrentState(); + + if (mConfig.hasModeSupport()) { + mModeObserver = new ModeObserver(mHandler); + mState.mMode = mModeObserver.getMode(); + } + + // start and update all features + for (int i = 0; i < mFeatures.size(); i++) { + mFeatures.get(i).start(); + } + + updateFeatures(ALL_CHANGED); + + Intent intent = new Intent("lineageos.intent.action.INITIALIZE_LIVEDISPLAY"); + intent.setPackage("com.android.systemui"); + mContext.sendBroadcastAsUser(intent, UserHandle.SYSTEM); + } + } + + private void updateFeatures(final int flags) { + mHandler.post(new Runnable() { + @Override + public void run() { + for (int i = 0; i < mFeatures.size(); i++) { + mFeatures.get(i).update(flags, mState); + } + } + }); + } + + private final IBinder mBinder = new ILiveDisplayService.Stub() { + + @Override + public LiveDisplayConfig getConfig() { + return mConfig; + } + + @Override + public int getMode() { + if (mConfig != null && mConfig.hasModeSupport()) { + return mModeObserver.getMode(); + } else { + return MODE_OFF; + } + } + + @Override + public boolean setMode(int mode) { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.MANAGE_LIVEDISPLAY", null); + if (!mConfig.hasModeSupport()) { + return false; + } + return mModeObserver.setMode(mode); + } + + @Override + public float[] getColorAdjustment() { + return mDHC.getColorAdjustment(); + } + + @Override + public boolean setColorAdjustment(float[] adj) { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.MANAGE_LIVEDISPLAY", null); + return mDHC.setColorAdjustment(adj); + } + + @Override + public boolean isAutoContrastEnabled() { + return mDHC.isAutoContrastEnabled(); + } + + @Override + public boolean setAutoContrastEnabled(boolean enabled) { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.MANAGE_LIVEDISPLAY", null); + return mDHC.setAutoContrastEnabled(enabled); + } + + @Override + public boolean isCABCEnabled() { + return mDHC.isCABCEnabled(); + } + + @Override + public boolean setCABCEnabled(boolean enabled) { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.MANAGE_LIVEDISPLAY", null); + return mDHC.setCABCEnabled(enabled); + } + + @Override + public boolean isColorEnhancementEnabled() { + return mDHC.isColorEnhancementEnabled(); + } + + @Override + public boolean setColorEnhancementEnabled(boolean enabled) { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.MANAGE_LIVEDISPLAY", null); + return mDHC.setColorEnhancementEnabled(enabled); + } + + @Override + public boolean isAutomaticOutdoorModeEnabled() { + return mOMC.isAutomaticOutdoorModeEnabled(); + } + + @Override + public boolean setAutomaticOutdoorModeEnabled(boolean enabled) { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.MANAGE_LIVEDISPLAY", null); + return mOMC.setAutomaticOutdoorModeEnabled(enabled); + } + + @Override + public int getDayColorTemperature() { + return mCTC.getDayColorTemperature(); + } + + @Override + public boolean setDayColorTemperature(int temperature) { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.MANAGE_LIVEDISPLAY", null); + mCTC.setDayColorTemperature(temperature); + return true; + } + + @Override + public int getNightColorTemperature() { + return mCTC.getNightColorTemperature(); + } + + @Override + public boolean setNightColorTemperature(int temperature) { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.MANAGE_LIVEDISPLAY", null); + mCTC.setNightColorTemperature(temperature); + return true; + } + + @Override + public int getColorTemperature() { + return mCTC.getColorTemperature(); + } + + @Override + public HSIC getPictureAdjustment() { return mPAC.getPictureAdjustment(); } + + @Override + public boolean setPictureAdjustment(final HSIC hsic) { return mPAC.setPictureAdjustment(hsic); } + + @Override + public HSIC getDefaultPictureAdjustment() { return mPAC.getDefaultPictureAdjustment(); } + + @Override + public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { + mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, TAG); + + pw.println(); + pw.println("LiveDisplay Service State:"); + pw.println(" mState=" + mState.toString()); + pw.println(" mConfig=" + mConfig.toString()); + pw.println(" mAwaitingNudge=" + mAwaitingNudge); + + for (int i = 0; i < mFeatures.size(); i++) { + mFeatures.get(i).dump(pw); + } + } + + @Override + public boolean isNight() { + final TwilightState twilight = mTwilightTracker.getCurrentState(); + return twilight != null && twilight.isNight(); + } + + @Override + public boolean isAntiFlickerEnabled() { + return mDHC.isAntiFlickerEnabled(); + } + + @Override + public boolean setAntiFlickerEnabled(boolean enabled) { + mContext.enforceCallingOrSelfPermission( + "lineageos.permission.MANAGE_LIVEDISPLAY", null); + return mDHC.setAntiFlickerEnabled(enabled); + } + }; + + // Listener for screen on/off events + private final DisplayManager.DisplayListener mDisplayListener = + new DisplayManager.DisplayListener() { + @Override + public void onDisplayAdded(int displayId) { + } + + @Override + public void onDisplayRemoved(int displayId) { + } + + @Override + public void onDisplayChanged(int displayId) { + if (displayId == Display.DEFAULT_DISPLAY) { + boolean screenOn = isScreenOn(); + if (screenOn != mState.mScreenOn) { + mState.mScreenOn = screenOn; + updateFeatures(DISPLAY_CHANGED); + } + } + } + }; + + + // Display postprocessing can have power impact. + private PowerManagerInternal.LowPowerModeListener mLowPowerModeListener = + new PowerManagerInternal.LowPowerModeListener() { + @Override + public void onLowPowerModeChanged(PowerSaveState state) { + final boolean lowPowerMode = state.globalBatterySaverEnabled; + if (lowPowerMode != mState.mLowPowerMode) { + mState.mLowPowerMode = lowPowerMode; + updateFeatures(MODE_CHANGED); + } + } + + @Override + public int getServiceType() { + return SERVICE_TYPE_DUMMY; + } + }; + + // Watch for mode changes + private final class ModeObserver extends UserContentObserver { + + private final Uri MODE_SETTING = + Settings.System.getUriFor(Settings.System.DISPLAY_TEMPERATURE_MODE); + + ModeObserver(Handler handler) { + super(handler); + + final ContentResolver cr = mContext.getContentResolver(); + cr.registerContentObserver(MODE_SETTING, false, this, UserHandle.USER_ALL); + + observe(); + } + + @Override + protected void update() { + int mode = getMode(); + if (mode != mState.mMode) { + mState.mMode = mode; + + updateFeatures(MODE_CHANGED); + } + } + + int getMode() { + return getInt(Settings.System.DISPLAY_TEMPERATURE_MODE, + mConfig.getDefaultMode()); + } + + boolean setMode(int mode) { + if (mConfig.hasFeature(mode) && mode >= MODE_FIRST && mode <= MODE_LAST) { + putInt(Settings.System.DISPLAY_TEMPERATURE_MODE, mode); + if (mode != mConfig.getDefaultMode()) { + stopNudgingMe(); + } + return true; + } + return false; + } + } + + // Night watchman + private final TwilightListener mTwilightListener = new TwilightListener() { + @Override + public void onTwilightStateChanged() { + mState.mTwilight = mTwilightTracker.getCurrentState(); + updateFeatures(TWILIGHT_CHANGED); + nudge(); + } + }; + + private boolean isScreenOn() { + return mDisplayManager.getDisplay( + Display.DEFAULT_DISPLAY).getState() == Display.STATE_ON; + } + + private int getSunsetCounter() { + // Counter used to determine when we should tell the user about this feature. + // If it's not used after 3 sunsets, we'll show the hint once. + return Settings.System.getIntForUser(mContext.getContentResolver(), + Settings.System.LIVE_DISPLAY_HINTED, + -3, + UserHandle.USER_CURRENT); + } + + + private void updateSunsetCounter(int count) { + Settings.System.putIntForUser(mContext.getContentResolver(), + Settings.System.LIVE_DISPLAY_HINTED, + count, + UserHandle.USER_CURRENT); + mAwaitingNudge = count > 0; + } + + private void stopNudgingMe() { + if (mAwaitingNudge) { + updateSunsetCounter(1); + } + } + + /** + * Show a friendly notification to the user about the potential benefits of decreasing + * blue light at night. Do this only once if the feature has not been used after + * three sunsets. It would be great to enable this by default, but we don't want + * the change of screen color to be considered a "bug" by a user who doesn't + * understand what's happening. + * + * @param state + */ + private void nudge() { + final TwilightState twilight = mTwilightTracker.getCurrentState(); + if (!mAwaitingNudge || twilight == null) { + return; + } + + int counter = getSunsetCounter(); + + // check if we should send the hint only once after sunset + boolean transition = twilight.isNight() && !mSunset; + mSunset = twilight.isNight(); + if (!transition) { + return; + } + + if (counter <= 0) { + counter++; + updateSunsetCounter(counter); + } + if (counter == 0) { + //show the notification and don't come back here + final Intent intent = new Intent("com.android.settings.LIVEDISPLAY_SETTINGS"); + PendingIntent result = PendingIntent.getActivity(mContext, 0, intent, + PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT); + Notification.Builder builder = new Notification.Builder(mContext) + .setContentTitle(mContext.getResources().getString( + com.android.internal.R.string.live_display_title)) + .setContentText(mContext.getResources().getString( + com.android.internal.R.string.live_display_hint)) + .setSmallIcon(com.android.internal.R.drawable.ic_livedisplay_notif) + .setStyle(new Notification.BigTextStyle().bigText(mContext.getResources() + .getString( + com.android.internal.R.string.live_display_hint))) + .setContentIntent(result) + .setAutoCancel(true); + + NotificationManager nm = + (NotificationManager)mContext.getSystemService(Context.NOTIFICATION_SERVICE); + nm.notifyAsUser(null, 1, builder.build(), UserHandle.CURRENT); + + updateSunsetCounter(1); + } + } + + private int getInt(String setting, int defValue) { + return Settings.System.getIntForUser(mContext.getContentResolver(), + setting, defValue, UserHandle.USER_CURRENT); + } + + private void putInt(String setting, int value) { + Settings.System.putIntForUser(mContext.getContentResolver(), + setting, value, UserHandle.USER_CURRENT); + } +} diff --git a/services/core/java/com/android/server/custom/display/OutdoorModeController.java b/services/core/java/com/android/server/custom/display/OutdoorModeController.java new file mode 100644 index 000000000000..68893c389b5a --- /dev/null +++ b/services/core/java/com/android/server/custom/display/OutdoorModeController.java @@ -0,0 +1,260 @@ +/* + * Copyright (C) 2016 The CyanogenMod Project + * 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.server.custom.display; + +import static com.android.internal.custom.hardware.LiveDisplayManager.MODE_AUTO; +import static com.android.internal.custom.hardware.LiveDisplayManager.MODE_DAY; +import static com.android.internal.custom.hardware.LiveDisplayManager.MODE_OUTDOOR; + +import android.content.Context; +import android.net.Uri; +import android.os.Handler; + +import java.io.PrintWriter; +import java.util.BitSet; + +import com.android.internal.custom.hardware.LineageHardwareManager; +import com.android.internal.custom.hardware.LiveDisplayManager; +import android.provider.Settings; + +public class OutdoorModeController extends LiveDisplayFeature { + + private final LineageHardwareManager mHardware; + private AmbientLuxObserver mLuxObserver; + + // hardware capabilities + private final boolean mUseOutdoorMode; + + // default values + private final int mDefaultOutdoorLux; + private final int mOutdoorLuxHysteresis; + private final boolean mDefaultAutoOutdoorMode; + private final boolean mSelfManaged; + + // internal state + private boolean mIsOutdoor; + private boolean mIsSensorEnabled; + + // sliding window for sensor event smoothing + private static final int SENSOR_WINDOW_MS = 3000; + + public OutdoorModeController(Context context, Handler handler) { + super(context, handler); + + mHardware = LineageHardwareManager.getInstance(mContext); + mUseOutdoorMode = mHardware.isSupported(LineageHardwareManager.FEATURE_SUNLIGHT_ENHANCEMENT); + mSelfManaged = mUseOutdoorMode && mHardware.isSunlightEnhancementSelfManaged(); + + mDefaultOutdoorLux = mContext.getResources().getInteger( + com.android.internal.R.integer.config_outdoorAmbientLux); + mOutdoorLuxHysteresis = mContext.getResources().getInteger( + com.android.internal.R.integer.config_outdoorAmbientLuxHysteresis); + mDefaultAutoOutdoorMode = mContext.getResources().getBoolean( + com.android.internal.R.bool.config_defaultAutoOutdoorMode); + } + + @Override + public void onStart() { + if (!mUseOutdoorMode) { + return; + } + + if (!mSelfManaged) { + mLuxObserver = new AmbientLuxObserver(mContext, mHandler.getLooper(), + mDefaultOutdoorLux, mOutdoorLuxHysteresis, SENSOR_WINDOW_MS); + } + + registerSettings( + Settings.System.getUriFor(Settings.System.DISPLAY_AUTO_OUTDOOR_MODE)); + } + + @Override + public boolean getCapabilities(final BitSet caps) { + if (mUseOutdoorMode) { + caps.set(LiveDisplayManager.MODE_AUTO); + caps.set(LiveDisplayManager.MODE_OUTDOOR); + if (mSelfManaged) { + caps.set(LiveDisplayManager.FEATURE_MANAGED_OUTDOOR_MODE); + } + } + return mUseOutdoorMode; + } + + @Override + protected void onUpdate() { + updateOutdoorMode(); + } + + @Override + protected void onTwilightUpdated() { + updateOutdoorMode(); + } + + @Override + protected synchronized void onScreenStateChanged() { + if (!mUseOutdoorMode) { + return; + } + + // toggle the sensor when screen on/off + updateSensorState(); + + // Disable outdoor mode on screen off so that we don't melt the users + // face if they turn it back on in normal conditions + if (!isScreenOn() && !mSelfManaged && getMode() != MODE_OUTDOOR) { + mIsOutdoor = false; + mHardware.set(LineageHardwareManager.FEATURE_SUNLIGHT_ENHANCEMENT, false); + } + } + + @Override + public synchronized void onSettingsChanged(Uri uri) { + updateOutdoorMode(); + } + + @Override + public void dump(PrintWriter pw) { + pw.println(); + pw.println("OutdoorModeController Configuration:"); + pw.println(" mSelfManaged=" + mSelfManaged); + if (!mSelfManaged) { + pw.println(" mDefaultOutdoorLux=" + mDefaultOutdoorLux); + pw.println(" mOutdoorLuxHysteresis=" + mOutdoorLuxHysteresis); + pw.println(); + pw.println(" OutdoorModeController State:"); + pw.println(" mAutoOutdoorMode=" + isAutomaticOutdoorModeEnabled()); + pw.println(" mIsOutdoor=" + mIsOutdoor); + pw.println(" mIsNight=" + isNight()); + pw.println(" hardware state=" + + mHardware.get(LineageHardwareManager.FEATURE_SUNLIGHT_ENHANCEMENT)); + } + mLuxObserver.dump(pw); + } + + private synchronized void updateSensorState() { + if (!mUseOutdoorMode || mLuxObserver == null || mSelfManaged) { + return; + } + + /* + * Light sensor: + */ + boolean sensorEnabled = false; + // no sensor if low power mode or when the screen is off + if (isScreenOn() && !isLowPowerMode()) { + if (isAutomaticOutdoorModeEnabled()) { + int mode = getMode(); + if (mode == MODE_DAY) { + // always turn it on if day mode is selected + sensorEnabled = true; + } else if (mode == MODE_AUTO && !isNight()) { + // in auto mode we turn it on during actual daytime + sensorEnabled = true; + } + } + } + if (mIsSensorEnabled != sensorEnabled) { + mIsSensorEnabled = sensorEnabled; + mLuxObserver.setTransitionListener(sensorEnabled ? mListener : null); + } + } + + /** + * Outdoor mode is optionally enabled when ambient lux > 10000 and it's daytime + * Melt faces! + * + * TODO: Use the camera or RGB sensor to determine if it's really sunlight + */ + private synchronized void updateOutdoorMode() { + if (!mUseOutdoorMode) { + return; + } + + updateSensorState(); + + /* + * Should we turn on outdoor mode or not? + * + * Do nothing if the screen is off. + */ + if (isScreenOn()) { + boolean enabled = false; + // turn it off in low power mode + if (!isLowPowerMode()) { + int mode = getMode(); + // turn it on if the user manually selected the mode + if (mode == MODE_OUTDOOR) { + enabled = true; + } else if (isAutomaticOutdoorModeEnabled()) { + // self-managed mode means we just flip a switch and an external + // implementation does all the sensing. this allows the user + // to turn on/off the feature. + if (mSelfManaged) { + enabled = true; + } else if (mIsOutdoor) { + // if we're here, the sensor detects extremely bright light. + if (mode == MODE_DAY) { + // if the user manually selected day mode, go ahead and + // melt their face + enabled = true; + } else if (mode == MODE_AUTO && !isNight()) { + // if we're in auto mode, we should also check if it's + // night time, since we don't get much sun at night + // on this planet :) + enabled = true; + } + } + } + } + mHardware.set(LineageHardwareManager.FEATURE_SUNLIGHT_ENHANCEMENT, enabled); + } + } + + private final AmbientLuxObserver.TransitionListener mListener = + new AmbientLuxObserver.TransitionListener() { + @Override + public void onTransition(final int state, float ambientLux) { + final boolean outdoor = state == 1; + synchronized (OutdoorModeController.this) { + if (mIsOutdoor == outdoor) { + return; + } + + mIsOutdoor = outdoor; + updateOutdoorMode(); + } + } + }; + + boolean setAutomaticOutdoorModeEnabled(boolean enabled) { + if (!mUseOutdoorMode) { + return false; + } + putBoolean(Settings.System.DISPLAY_AUTO_OUTDOOR_MODE, enabled); + return true; + } + + boolean isAutomaticOutdoorModeEnabled() { + return mUseOutdoorMode && (mNightDisplayAvailable || + getBoolean(Settings.System.DISPLAY_AUTO_OUTDOOR_MODE, + getDefaultAutoOutdoorMode())); + } + + boolean getDefaultAutoOutdoorMode() { + return mDefaultAutoOutdoorMode; + } +} diff --git a/services/core/java/com/android/server/custom/display/PictureAdjustmentController.java b/services/core/java/com/android/server/custom/display/PictureAdjustmentController.java new file mode 100644 index 000000000000..60130ef76303 --- /dev/null +++ b/services/core/java/com/android/server/custom/display/PictureAdjustmentController.java @@ -0,0 +1,242 @@ +/* + * Copyright (C) 2016 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.server.custom.display; + +import android.content.Context; +import android.net.Uri; +import android.os.Handler; +import android.text.TextUtils; +import android.util.Range; +import android.util.Slog; +import android.util.SparseArray; +import android.view.Display; + +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.BitSet; +import java.util.List; + +import com.android.internal.custom.hardware.LineageHardwareManager; +import com.android.internal.custom.hardware.DisplayMode; +import com.android.internal.custom.hardware.HSIC; +import com.android.internal.custom.hardware.LiveDisplayManager; +import android.provider.Settings; + +public class PictureAdjustmentController extends LiveDisplayFeature { + + private static final String TAG = "LiveDisplay-PAC"; + + private final LineageHardwareManager mHardware; + private final boolean mUsePictureAdjustment; + private final boolean mHasDisplayModes; + + private List> mRanges = new ArrayList>(); + + public PictureAdjustmentController(Context context, Handler handler) { + super(context, handler); + mHardware = LineageHardwareManager.getInstance(context); + mHasDisplayModes = mHardware.isSupported(LineageHardwareManager.FEATURE_DISPLAY_MODES); + + boolean usePA = mHardware.isSupported(LineageHardwareManager.FEATURE_PICTURE_ADJUSTMENT); + if (usePA) { + mRanges.addAll(mHardware.getPictureAdjustmentRanges()); + if (mRanges.size() < 4) { + usePA = false; + } else { + for (Range range : mRanges) { + if (range.getLower() == 0.0f && range.getUpper() == 0.0f) { + usePA = false; + break; + } + } + } + } + if (!usePA) { + mRanges.clear(); + } + mUsePictureAdjustment = usePA; + } + + @Override + public void onStart() { + if (!mUsePictureAdjustment) { + return; + } + + registerSettings( + Settings.System.getUriFor(Settings.System.DISPLAY_PICTURE_ADJUSTMENT)); + } + + @Override + protected void onSettingsChanged(Uri uri) {// nothing to do for mode switch + updatePictureAdjustment(); + } + + @Override + protected void onUpdate() { + updatePictureAdjustment(); + } + + private void updatePictureAdjustment() { + if (mUsePictureAdjustment && isScreenOn()) { + final HSIC hsic = getPictureAdjustment(); + if (hsic != null) { + if (!mHardware.setPictureAdjustment(hsic)) { + Slog.e(TAG, "Failed to set picture adjustment! " + hsic.toString()); + } + } + } + } + + @Override + public void dump(PrintWriter pw) { + if (mUsePictureAdjustment) { + pw.println(); + pw.println("PictureAdjustmentController Configuration:"); + pw.println(" adjustment=" + getPictureAdjustment()); + pw.println(" hueRange=" + getHueRange()); + pw.println(" saturationRange=" + getSaturationRange()); + pw.println(" intensityRange=" + getIntensityRange()); + pw.println(" contrastRange=" + getContrastRange()); + pw.println(" saturationThresholdRange=" + getSaturationThresholdRange()); + pw.println(" defaultAdjustment=" + getDefaultPictureAdjustment()); + } + } + + + @Override + public boolean getCapabilities(BitSet caps) { + if (mUsePictureAdjustment) { + caps.set(LiveDisplayManager.FEATURE_PICTURE_ADJUSTMENT); + } + return mUsePictureAdjustment; + } + + Range getHueRange() { + return mUsePictureAdjustment && mRanges.size() > 0 + ? mRanges.get(0) : Range.create(0.0f, 0.0f); + } + + Range getSaturationRange() { + return mUsePictureAdjustment && mRanges.size() > 1 + ? mRanges.get(1) : Range.create(0.0f, 0.0f); + } + + Range getIntensityRange() { + return mUsePictureAdjustment && mRanges.size() > 2 + ? mRanges.get(2) : Range.create(0.0f, 0.0f); + } + + Range getContrastRange() { + return mUsePictureAdjustment && mRanges.size() > 3 ? + mRanges.get(3) : Range.create(0.0f, 0.0f); + } + + Range getSaturationThresholdRange() { + return mUsePictureAdjustment && mRanges.size() > 4 ? + mRanges.get(4) : Range.create(0.0f, 0.0f); + } + + HSIC getDefaultPictureAdjustment() { + HSIC hsic = null; + if (mUsePictureAdjustment) { + hsic = mHardware.getDefaultPictureAdjustment(); + } + if (hsic == null) { + hsic = new HSIC(0.0f, 0.0f, 0.0f, 0.0f, 0.0f); + } + return hsic; + } + + HSIC getPictureAdjustment() { + HSIC hsic = null; + if (mUsePictureAdjustment) { + int modeID = 0; + if (mHasDisplayModes) { + DisplayMode mode = mHardware.getCurrentDisplayMode(); + if (mode != null) { + modeID = mode.id; + } + } + hsic = getPAForMode(modeID); + } + if (hsic == null) { + hsic = new HSIC(0.0f, 0.0f, 0.0f, 0.0f, 0.0f); + } + return hsic; + } + + boolean setPictureAdjustment(HSIC hsic) { + if (mUsePictureAdjustment && hsic != null) { + int modeID = 0; + if (mHasDisplayModes) { + DisplayMode mode = mHardware.getCurrentDisplayMode(); + if (mode != null) { + modeID = mode.id; + } + } + setPAForMode(modeID, hsic); + return true; + } + return false; + } + + // TODO: Expose mode-based settings to upper layers + + private HSIC getPAForMode(int mode) { + final SparseArray prefs = unpackPreference(); + if (prefs.indexOfKey(mode) >= 0) { + return prefs.get(mode); + } + return getDefaultPictureAdjustment(); + } + + private void setPAForMode(int mode, HSIC hsic) { + final SparseArray prefs = unpackPreference(); + prefs.put(mode, hsic); + packPreference(prefs); + } + + private SparseArray unpackPreference() { + final SparseArray ret = new SparseArray(); + + String pref = getString(Settings.System.DISPLAY_PICTURE_ADJUSTMENT); + if (pref != null) { + String[] byMode = TextUtils.split(pref, ","); + for (String mode : byMode) { + String[] modePA = TextUtils.split(mode, ":"); + if (modePA.length == 2) { + ret.put(Integer.valueOf(modePA[0]), HSIC.unflattenFrom(modePA[1])); + } + } + } + return ret; + } + + private void packPreference(final SparseArray modes) { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < modes.size(); i++) { + int id = modes.keyAt(i); + HSIC m = modes.get(id); + if (i > 0) { + sb.append(","); + } + sb.append(id).append(":").append(m.flatten()); + } + putString(Settings.System.DISPLAY_PICTURE_ADJUSTMENT, sb.toString()); + } + +} diff --git a/services/core/java/com/android/server/custom/display/TwilightCalculator.java b/services/core/java/com/android/server/custom/display/TwilightCalculator.java new file mode 100644 index 000000000000..4c73152d1caf --- /dev/null +++ b/services/core/java/com/android/server/custom/display/TwilightCalculator.java @@ -0,0 +1,123 @@ +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.custom.display; + +import android.text.format.DateUtils; +import android.util.FloatMath; + +/** @hide */ +public class TwilightCalculator { + + /** Value of {@link #mState} if it is currently day */ + public static final int DAY = 0; + + /** Value of {@link #mState} if it is currently night */ + public static final int NIGHT = 1; + + private static final float DEGREES_TO_RADIANS = (float) (Math.PI / 180.0f); + + // element for calculating solar transit. + private static final float J0 = 0.0009f; + + // correction for civil twilight + private static final float ALTIDUTE_CORRECTION_CIVIL_TWILIGHT = -0.104719755f; + + // coefficients for calculating Equation of Center. + private static final float C1 = 0.0334196f; + private static final float C2 = 0.000349066f; + private static final float C3 = 0.000005236f; + + private static final float OBLIQUITY = 0.40927971f; + + // Java time on Jan 1, 2000 12:00 UTC. + private static final long UTC_2000 = 946728000000L; + + /** + * Time of sunset (civil twilight) in milliseconds or -1 in the case the day + * or night never ends. + */ + public long mSunset; + + /** + * Time of sunrise (civil twilight) in milliseconds or -1 in the case the + * day or night never ends. + */ + public long mSunrise; + + /** Current state */ + public int mState; + + /** + * calculates the civil twilight bases on time and geo-coordinates. + * + * @param time time in milliseconds. + * @param latiude latitude in degrees. + * @param longitude latitude in degrees. + */ + public void calculateTwilight(long time, double latiude, double longitude) { + final float daysSince2000 = (float) (time - UTC_2000) / DateUtils.DAY_IN_MILLIS; + + // mean anomaly + final float meanAnomaly = 6.240059968f + daysSince2000 * 0.01720197f; + + // true anomaly + final float trueAnomaly = meanAnomaly + C1 * FloatMath.sin(meanAnomaly) + C2 + * FloatMath.sin(2 * meanAnomaly) + C3 * FloatMath.sin(3 * meanAnomaly); + + // ecliptic longitude + final float solarLng = trueAnomaly + 1.796593063f + (float) Math.PI; + + // solar transit in days since 2000 + final double arcLongitude = -longitude / 360; + float n = Math.round(daysSince2000 - J0 - arcLongitude); + double solarTransitJ2000 = n + J0 + arcLongitude + 0.0053f * FloatMath.sin(meanAnomaly) + + -0.0069f * FloatMath.sin(2 * solarLng); + + // declination of sun + double solarDec = Math.asin(FloatMath.sin(solarLng) * FloatMath.sin(OBLIQUITY)); + + final double latRad = latiude * DEGREES_TO_RADIANS; + + double cosHourAngle = (FloatMath.sin(ALTIDUTE_CORRECTION_CIVIL_TWILIGHT) - Math.sin(latRad) + * Math.sin(solarDec)) / (Math.cos(latRad) * Math.cos(solarDec)); + // The day or night never ends for the given date and location, if this value is out of + // range. + if (cosHourAngle >= 1) { + mState = NIGHT; + mSunset = -1; + mSunrise = -1; + return; + } else if (cosHourAngle <= -1) { + mState = DAY; + mSunset = -1; + mSunrise = -1; + return; + } + + float hourAngle = (float) (Math.acos(cosHourAngle) / (2 * Math.PI)); + + mSunset = Math.round((solarTransitJ2000 + hourAngle) * DateUtils.DAY_IN_MILLIS) + UTC_2000; + mSunrise = Math.round((solarTransitJ2000 - hourAngle) * DateUtils.DAY_IN_MILLIS) + UTC_2000; + + if (mSunrise < time && mSunset > time) { + mState = DAY; + } else { + mState = NIGHT; + } + } + +} diff --git a/services/core/java/com/android/server/custom/display/TwilightTracker.java b/services/core/java/com/android/server/custom/display/TwilightTracker.java new file mode 100644 index 000000000000..e837758da318 --- /dev/null +++ b/services/core/java/com/android/server/custom/display/TwilightTracker.java @@ -0,0 +1,568 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * 2017-2018,2021 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.custom.display; + +import android.app.AlarmManager; +import android.app.PendingIntent; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.location.Criteria; +import android.location.Location; +import android.location.LocationListener; +import android.location.LocationManager; +import android.os.Bundle; +import android.os.Handler; +import android.os.Message; +import android.os.SystemClock; +import android.text.format.DateUtils; +import android.text.format.Time; +import android.util.ExceptionUtils; +import android.util.Slog; + +import java.text.DateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Objects; + +/** + * Figures out whether it's twilight time based on the user's location. + * + * Used by the UI mode manager and other components to adjust night mode + * effects based on sunrise and sunset. + */ +public final class TwilightTracker { + private static final String TAG = "TwilightTracker"; + private static final boolean DEBUG = false; + private static final String ACTION_UPDATE_TWILIGHT_STATE = + "lineageos.platform.intent.action.UPDATE_TWILIGHT_STATE"; + + private final Object mLock = new Object(); + + private final AlarmManager mAlarmManager; + private final LocationManager mLocationManager; + private final LocationHandler mLocationHandler; + + private final ArrayList mListeners = + new ArrayList(); + + private TwilightState mTwilightState; + + private final Context mContext; + + public TwilightTracker(Context context) { + mContext = context; + mAlarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE); + final Context contextTag = mContext.createAttributionContext("twilight"); + mLocationManager = (LocationManager) contextTag.getSystemService( + Context.LOCATION_SERVICE); + mLocationHandler = new LocationHandler(); + + IntentFilter filter = new IntentFilter(Intent.ACTION_AIRPLANE_MODE_CHANGED); + filter.addAction(Intent.ACTION_TIME_CHANGED); + filter.addAction(Intent.ACTION_TIMEZONE_CHANGED); + filter.addAction(ACTION_UPDATE_TWILIGHT_STATE); + mContext.registerReceiver(mUpdateLocationReceiver, filter); + } + + /** + * Gets the current twilight state. + * + * @return The current twilight state, or null if no information is available. + */ + public TwilightState getCurrentState() { + synchronized (mLock) { + return mTwilightState; + } + } + + /** + * Listens for twilight time. + * + * @param listener The listener. + */ + public void registerListener(TwilightListener listener, Handler handler) { + synchronized (mLock) { + mListeners.add(new TwilightListenerRecord(listener, handler)); + + if (mListeners.size() == 1) { + mLocationHandler.enableLocationUpdates(); + } + } + } + + + private void setTwilightState(TwilightState state) { + synchronized (mLock) { + if (!Objects.equals(mTwilightState, state)) { + if (DEBUG) { + Slog.d(TAG, "Twilight state changed: " + state); + } + + mTwilightState = state; + + final int listenerLen = mListeners.size(); + for (int i = 0; i < listenerLen; i++) { + mListeners.get(i).postUpdate(); + } + } + } + } + + // The user has moved if the accuracy circles of the two locations don't overlap. + private static boolean hasMoved(Location from, Location to) { + if (to == null) { + return false; + } + + if (from == null) { + return true; + } + + // if new location is older than the current one, the device hasn't moved. + if (to.getElapsedRealtimeNanos() < from.getElapsedRealtimeNanos()) { + return false; + } + + // Get the distance between the two points. + float distance = from.distanceTo(to); + + // Get the total accuracy radius for both locations. + float totalAccuracy = from.getAccuracy() + to.getAccuracy(); + + // If the distance is greater than the combined accuracy of the two + // points then they can't overlap and hence the user has moved. + return distance >= totalAccuracy; + } + + private final class LocationHandler extends Handler { + private static final int MSG_ENABLE_LOCATION_UPDATES = 1; + private static final int MSG_GET_NEW_LOCATION_UPDATE = 2; + private static final int MSG_PROCESS_NEW_LOCATION = 3; + private static final int MSG_DO_TWILIGHT_UPDATE = 4; + + private static final long LOCATION_UPDATE_MS = 24 * DateUtils.HOUR_IN_MILLIS; + private static final long MIN_LOCATION_UPDATE_MS = 30 * DateUtils.MINUTE_IN_MILLIS; + private static final float LOCATION_UPDATE_DISTANCE_METER = 1000 * 20; + private static final long LOCATION_UPDATE_ENABLE_INTERVAL_MIN = 5000; + private static final long LOCATION_UPDATE_ENABLE_INTERVAL_MAX = + 15 * DateUtils.MINUTE_IN_MILLIS; + private static final double FACTOR_GMT_OFFSET_LONGITUDE = + 1000.0 * 360.0 / DateUtils.DAY_IN_MILLIS; + + private boolean mPassiveListenerEnabled; + private boolean mNetworkListenerEnabled; + private boolean mDidFirstInit; + private long mLastNetworkRegisterTime = -MIN_LOCATION_UPDATE_MS; + private long mLastUpdateInterval; + private Location mLocation; + private final TwilightCalculator mTwilightCalculator = new TwilightCalculator(); + + public void processNewLocation(Location location) { + Message msg = obtainMessage(MSG_PROCESS_NEW_LOCATION, location); + sendMessage(msg); + } + + public void enableLocationUpdates() { + sendEmptyMessage(MSG_ENABLE_LOCATION_UPDATES); + } + + public void requestLocationUpdate() { + sendEmptyMessage(MSG_GET_NEW_LOCATION_UPDATE); + } + + public void requestTwilightUpdate() { + sendEmptyMessage(MSG_DO_TWILIGHT_UPDATE); + } + + @Override + public void handleMessage(Message msg) { + switch (msg.what) { + case MSG_PROCESS_NEW_LOCATION: { + final Location location = (Location) msg.obj; + final boolean hasMoved = hasMoved(mLocation, location); + final boolean hasBetterAccuracy = mLocation == null + || location.getAccuracy() < mLocation.getAccuracy(); + if (DEBUG) { + Slog.d(TAG, "Processing new location: " + location + + ", hasMoved=" + hasMoved + + ", hasBetterAccuracy=" + hasBetterAccuracy); + } + if (hasMoved || hasBetterAccuracy) { + setLocation(location); + } + break; + } + + case MSG_GET_NEW_LOCATION_UPDATE: + if (!mNetworkListenerEnabled) { + // Don't do anything -- we are still trying to get a + // location. + return; + } + if ((mLastNetworkRegisterTime + MIN_LOCATION_UPDATE_MS) >= + SystemClock.elapsedRealtime()) { + // Don't do anything -- it hasn't been long enough + // since we last requested an update. + return; + } + + // Unregister the current location monitor, so we can + // register a new one for it to get an immediate update. + mNetworkListenerEnabled = false; + mLocationManager.removeUpdates(mEmptyLocationListener); + + // Fall through to re-register listener. + case MSG_ENABLE_LOCATION_UPDATES: + // enable network provider to receive at least location updates for a given + // distance. + boolean networkLocationEnabled; + try { + networkLocationEnabled = + mLocationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER); + } catch (Exception e) { + // we may get IllegalArgumentException if network location provider + // does not exist or is not yet installed. + networkLocationEnabled = false; + } + if (!mNetworkListenerEnabled && networkLocationEnabled) { + mNetworkListenerEnabled = true; + mLastNetworkRegisterTime = SystemClock.elapsedRealtime(); + mLocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, + LOCATION_UPDATE_MS, 0, mEmptyLocationListener); + + if (!mDidFirstInit) { + mDidFirstInit = true; + if (mLocation == null) { + retrieveLocation(); + } + } + } + + // enable passive provider to receive updates from location fixes (gps + // and network). + boolean passiveLocationEnabled; + try { + passiveLocationEnabled = + mLocationManager.isProviderEnabled(LocationManager.PASSIVE_PROVIDER); + } catch (Exception e) { + // we may get IllegalArgumentException if passive location provider + // does not exist or is not yet installed. + passiveLocationEnabled = false; + } + + if (!mPassiveListenerEnabled && passiveLocationEnabled) { + mPassiveListenerEnabled = true; + mLocationManager.requestLocationUpdates(LocationManager.PASSIVE_PROVIDER, + 0, LOCATION_UPDATE_DISTANCE_METER, mLocationListener); + } + + if (!(mNetworkListenerEnabled && mPassiveListenerEnabled)) { + mLastUpdateInterval *= 1.5; + if (mLastUpdateInterval == 0) { + mLastUpdateInterval = LOCATION_UPDATE_ENABLE_INTERVAL_MIN; + } else if (mLastUpdateInterval > LOCATION_UPDATE_ENABLE_INTERVAL_MAX) { + mLastUpdateInterval = LOCATION_UPDATE_ENABLE_INTERVAL_MAX; + } + sendEmptyMessageDelayed(MSG_ENABLE_LOCATION_UPDATES, mLastUpdateInterval); + } + + if (!networkLocationEnabled && mLocation == null) { + if (DEBUG) { + Slog.d(TAG, "Network location unavailable"); + } + retrieveLocation(); + } + break; + + case MSG_DO_TWILIGHT_UPDATE: + updateTwilightState(); + break; + } + } + + private Location getLastKnownLocation() { + List providers = mLocationManager.getAllProviders(); + Location bestLocation = null; + for (String provider : providers) { + Location lastKnownLocation = mLocationManager.getLastKnownLocation(provider); + if (lastKnownLocation != null) { + if (bestLocation == null || + bestLocation.getElapsedRealtimeNanos() < + lastKnownLocation.getElapsedRealtimeNanos()) { + bestLocation = lastKnownLocation; + } + } + } + return bestLocation; + } + + private void retrieveLocation() { + Location location = getLastKnownLocation(); + + // In the case there is no location available (e.g. GPS fix or network location + // is not available yet), the longitude of the location is estimated using the timezone, + // latitude and accuracy are set to get a good average. + if (location == null) { + Time currentTime = new Time(); + currentTime.set(System.currentTimeMillis()); + double lngOffset = FACTOR_GMT_OFFSET_LONGITUDE * + (currentTime.gmtoff - (currentTime.isDst > 0 ? 3600 : 0)); + location = new Location("fake"); + location.setLongitude(lngOffset); + location.setLatitude(0); + location.setAccuracy(417000.0f); + location.setTime(System.currentTimeMillis()); + location.setElapsedRealtimeNanos(SystemClock.elapsedRealtimeNanos()); + + if (DEBUG) { + Slog.d(TAG, "Estimated location from timezone: " + location); + } + } + + setLocation(location); + } + + private void setLocation(Location location) { + mLocation = location; + updateTwilightState(); + } + + private void updateTwilightState() { + if (mLocation == null) { + setTwilightState(null); + return; + } + + final long now = System.currentTimeMillis(); + + // calculate yesterday's twilight + mTwilightCalculator.calculateTwilight(now - DateUtils.DAY_IN_MILLIS, + mLocation.getLatitude(), mLocation.getLongitude()); + final long yesterdaySunset = mTwilightCalculator.mSunset; + + // calculate today's twilight + mTwilightCalculator.calculateTwilight(now, + mLocation.getLatitude(), mLocation.getLongitude()); + final boolean isNight = (mTwilightCalculator.mState == TwilightCalculator.NIGHT); + final long todaySunrise = mTwilightCalculator.mSunrise; + final long todaySunset = mTwilightCalculator.mSunset; + + // calculate tomorrow's twilight + mTwilightCalculator.calculateTwilight(now + DateUtils.DAY_IN_MILLIS, + mLocation.getLatitude(), mLocation.getLongitude()); + final long tomorrowSunrise = mTwilightCalculator.mSunrise; + + // set twilight state + TwilightState state = new TwilightState(isNight, yesterdaySunset, + todaySunrise, todaySunset, tomorrowSunrise); + if (DEBUG) { + Slog.d(TAG, "Updating twilight state: " + state); + } + setTwilightState(state); + + // schedule next update + long nextUpdate = 0; + if (todaySunrise == -1 || todaySunset == -1) { + // In the case the day or night never ends the update is scheduled 12 hours later. + nextUpdate = now + 12 * DateUtils.HOUR_IN_MILLIS; + } else { + // add some extra time to be on the safe side. + nextUpdate += DateUtils.MINUTE_IN_MILLIS; + + if (now > todaySunset) { + nextUpdate += tomorrowSunrise; + } else if (now > todaySunrise) { + nextUpdate += todaySunset; + } else { + nextUpdate += todaySunrise; + } + } + + if (DEBUG) { + Slog.d(TAG, "Next update in " + (nextUpdate - now) + " ms"); + } + + Intent updateIntent = new Intent(ACTION_UPDATE_TWILIGHT_STATE); + PendingIntent pendingIntent = PendingIntent.getBroadcast( + mContext, 0, updateIntent, PendingIntent.FLAG_IMMUTABLE); + mAlarmManager.cancel(pendingIntent); + mAlarmManager.setExact(AlarmManager.RTC, nextUpdate, pendingIntent); + } + } + + private final BroadcastReceiver mUpdateLocationReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + if (Intent.ACTION_AIRPLANE_MODE_CHANGED.equals(intent.getAction()) + && !intent.getBooleanExtra("state", false)) { + // Airplane mode is now off! + mLocationHandler.requestLocationUpdate(); + return; + } + + // Time zone has changed or alarm expired. + mLocationHandler.requestTwilightUpdate(); + } + }; + + // A LocationListener to initialize the network location provider. The location updates + // are handled through the passive location provider. + private final LocationListener mEmptyLocationListener = new LocationListener() { + public void onLocationChanged(Location location) { + } + + public void onProviderDisabled(String provider) { + } + + public void onProviderEnabled(String provider) { + } + + public void onStatusChanged(String provider, int status, Bundle extras) { + } + }; + + private final LocationListener mLocationListener = new LocationListener() { + public void onLocationChanged(Location location) { + mLocationHandler.processNewLocation(location); + } + + public void onProviderDisabled(String provider) { + } + + public void onProviderEnabled(String provider) { + } + + public void onStatusChanged(String provider, int status, Bundle extras) { + } + }; + + public static class TwilightState { + private final boolean mIsNight; + private final long mYesterdaySunset; + private final long mTodaySunrise; + private final long mTodaySunset; + private final long mTomorrowSunrise; + + TwilightState(boolean isNight, + long yesterdaySunset, + long todaySunrise, long todaySunset, + long tomorrowSunrise) { + mIsNight = isNight; + mYesterdaySunset = yesterdaySunset; + mTodaySunrise = todaySunrise; + mTodaySunset = todaySunset; + mTomorrowSunrise = tomorrowSunrise; + } + + /** + * Returns true if it is currently night time. + */ + public boolean isNight() { + return mIsNight; + } + + /** + * Returns the time of yesterday's sunset in the System.currentTimeMillis() timebase, + * or -1 if the sun never sets. + */ + public long getYesterdaySunset() { + return mYesterdaySunset; + } + + /** + * Returns the time of today's sunrise in the System.currentTimeMillis() timebase, + * or -1 if the sun never rises. + */ + public long getTodaySunrise() { + return mTodaySunrise; + } + + /** + * Returns the time of today's sunset in the System.currentTimeMillis() timebase, + * or -1 if the sun never sets. + */ + public long getTodaySunset() { + return mTodaySunset; + } + + /** + * Returns the time of tomorrow's sunrise in the System.currentTimeMillis() timebase, + * or -1 if the sun never rises. + */ + public long getTomorrowSunrise() { + return mTomorrowSunrise; + } + + @Override + public boolean equals(Object o) { + return o instanceof TwilightState && equals((TwilightState) o); + } + + public boolean equals(TwilightState other) { + return other != null + && mIsNight == other.mIsNight + && mYesterdaySunset == other.mYesterdaySunset + && mTodaySunrise == other.mTodaySunrise + && mTodaySunset == other.mTodaySunset + && mTomorrowSunrise == other.mTomorrowSunrise; + } + + @Override + public int hashCode() { + return 0; // don't care + } + + @Override + public String toString() { + DateFormat f = DateFormat.getDateTimeInstance(); + return "{TwilightState: isNight=" + mIsNight + + ", mYesterdaySunset=" + f.format(new Date(mYesterdaySunset)) + + ", mTodaySunrise=" + f.format(new Date(mTodaySunrise)) + + ", mTodaySunset=" + f.format(new Date(mTodaySunset)) + + ", mTomorrowSunrise=" + f.format(new Date(mTomorrowSunrise)) + + "}"; + + } + } + + public interface TwilightListener { + void onTwilightStateChanged(); + } + + private static class TwilightListenerRecord implements Runnable { + private final TwilightListener mListener; + private final Handler mHandler; + + public TwilightListenerRecord(TwilightListener listener, Handler handler) { + mListener = listener; + mHandler = handler; + } + + public void postUpdate() { + mHandler.post(this); + } + + @Override + public void run() { + mListener.onTwilightStateChanged(); + } + } +} diff --git a/services/core/java/com/android/server/display/ColorFade.java b/services/core/java/com/android/server/display/ColorFade.java index cb04ddfd636d..dcf4764fd902 100644 --- a/services/core/java/com/android/server/display/ColorFade.java +++ b/services/core/java/com/android/server/display/ColorFade.java @@ -62,7 +62,7 @@ * that belongs to the {@link DisplayPowerController}. *

*/ -final class ColorFade { +final class ColorFade implements ScreenStateAnimator { private static final String TAG = "ColorFade"; private static final boolean DEBUG = false; @@ -668,8 +668,8 @@ private boolean createEglContext(boolean isProtected) { EGL14.EGL_NONE }; if (isProtected) { - eglContextAttribList[2] = EGL_PROTECTED_CONTENT_EXT; - eglContextAttribList[3] = EGL14.EGL_TRUE; + eglContextAttribList[3] = EGL_PROTECTED_CONTENT_EXT; + eglContextAttribList[4] = EGL14.EGL_TRUE; } mEglContext = EGL14.eglCreateContext(mEglDisplay, mEglConfig, EGL14.EGL_NO_CONTEXT, eglContextAttribList, 0); diff --git a/services/core/java/com/android/server/display/DisplayDeviceConfig.java b/services/core/java/com/android/server/display/DisplayDeviceConfig.java index a25ac210f9c8..de0c6fe6ab0c 100644 --- a/services/core/java/com/android/server/display/DisplayDeviceConfig.java +++ b/services/core/java/com/android/server/display/DisplayDeviceConfig.java @@ -458,7 +458,6 @@ public float getBacklightFromBrightness(float brightness) { */ public float getNitsFromBacklight(float backlight) { if (mBacklightToNitsSpline == null) { - Slog.wtf(TAG, "requesting nits when no mapping exists."); return NITS_INVALID; } backlight = Math.max(backlight, mBacklightMinimum); @@ -523,6 +522,14 @@ public float getBrightnessDefault() { return mBrightnessDefault; } + public float getBacklightMin() { + return mBacklightMinimum; + } + + public float getBacklightMax() { + return mBacklightMaximum; + } + public float getBrightnessRampFastDecrease() { return mBrightnessRampFastDecrease; } @@ -1043,7 +1050,7 @@ private void createBacklightConversionSplines() { for (int i = 0; i < mBrightness.length; i++) { mBrightness[i] = MathUtils.map(mBacklight[0], mBacklight[mBacklight.length - 1], - PowerManager.BRIGHTNESS_MIN, PowerManager.BRIGHTNESS_MAX, mBacklight[i]); + mBacklightMinimum, mBacklightMaximum, mBacklight[i]); } mBrightnessToBacklightSpline = mInterpolationType == INTERPOLATION_LINEAR ? Spline.createLinearSpline(mBrightness, mBacklight) diff --git a/services/core/java/com/android/server/display/DisplayDeviceRepository.java b/services/core/java/com/android/server/display/DisplayDeviceRepository.java index 4ac79901b9dc..693f210160af 100644 --- a/services/core/java/com/android/server/display/DisplayDeviceRepository.java +++ b/services/core/java/com/android/server/display/DisplayDeviceRepository.java @@ -170,11 +170,14 @@ private void handleDisplayDeviceChanged(DisplayDevice device) { Trace.beginSection("handleDisplayDeviceChanged"); } int diff = device.mDebugLastLoggedDeviceInfo.diff(info); - if (diff == DisplayDeviceInfo.DIFF_STATE) { - Slog.i(TAG, "Display device changed state: \"" + info.name - + "\", " + Display.stateToString(info.state)); - } else if (diff != 0) { - Slog.i(TAG, "Display device changed: " + info); + + if (DEBUG) { + if (diff == DisplayDeviceInfo.DIFF_STATE) { + Slog.i(TAG, "Display device changed state: \"" + info.name + + "\", " + Display.stateToString(info.state)); + } else if (diff != 0) { + Slog.i(TAG, "Display device changed: " + info); + } } if ((diff & DisplayDeviceInfo.DIFF_COLOR_MODE) != 0) { diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java index d05a902c6593..3f42c7eddb6e 100644 --- a/services/core/java/com/android/server/display/DisplayPowerController.java +++ b/services/core/java/com/android/server/display/DisplayPowerController.java @@ -21,6 +21,7 @@ import android.annotation.Nullable; import android.annotation.UserIdInt; import android.app.ActivityManager; +import android.content.ContentResolver; import android.content.Context; import android.content.pm.ParceledListSlice; import android.content.res.Resources; @@ -461,12 +462,30 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call private boolean mIsRbcActive; + // Whether there's a callback to tell listeners the display has changed scheduled to run. When + // true it implies a wakelock is being held to guarantee the update happens before we collapse + // into suspend and so needs to be cleaned up if the thread is exiting. + // Should only be accessed on the Handler thread. + private boolean mOnStateChangedPending; + + // Count of proximity messages currently on this DPC's Handler. Used to keep track of how many + // suspend blocker acquisitions are pending when shutting down this DPC. + // Should only be accessed on the Handler thread. + private int mOnProximityPositiveMessages; + private int mOnProximityNegativeMessages; + // Animators. private ObjectAnimator mColorFadeOnAnimator; private ObjectAnimator mColorFadeOffAnimator; private DualRampAnimator mScreenBrightnessRampAnimator; private BrightnessSetting.BrightnessSettingListener mBrightnessSettingListener; + // Screen-off animation + private int mScreenOffAnimation; + static final int SCREEN_OFF_FADE = 0; + static final int SCREEN_OFF_CRT = 1; + static final int SCREEN_OFF_SCALE = 2; + // True if this DisplayPowerController has been stopped and should no longer be running. private boolean mStopped; @@ -525,6 +544,9 @@ public DisplayPowerController(Context context, final Resources resources = context.getResources(); + mDisplayDeviceConfig = logicalDisplay.getPrimaryDisplayDeviceLocked() + .getDisplayDeviceConfig(); + // DOZE AND DIM SETTINGS mScreenBrightnessDozeConfig = clampAbsoluteBrightness( pm.getBrightnessConstraint(PowerManager.BRIGHTNESS_CONSTRAINT_TYPE_DOZE)); @@ -556,9 +578,6 @@ public DisplayPowerController(Context context, mAllowAutoBrightnessWhileDozingConfig = resources.getBoolean( com.android.internal.R.bool.config_allowAutoBrightnessWhileDozing); - mDisplayDeviceConfig = logicalDisplay.getPrimaryDisplayDeviceLocked() - .getDisplayDeviceConfig(); - loadBrightnessRampRates(); mSkipScreenOnBrightnessRamp = resources.getBoolean( com.android.internal.R.bool.config_skipScreenOnBrightnessRamp); @@ -879,9 +898,49 @@ private void sendUpdatePowerStateLocked() { } } + private int getScreenAnimationModeForDisplayState(int displayState) { + switch (mScreenOffAnimation) { + case SCREEN_OFF_FADE: + return ScreenStateAnimator.MODE_FADE; + case SCREEN_OFF_CRT: + if (displayState == Display.STATE_OFF) { + return ScreenStateAnimator.MODE_COOL_DOWN; + } else { + return USE_COLOR_FADE_ON_ANIMATION ? ScreenStateAnimator.MODE_WARM_UP + : ScreenStateAnimator.MODE_FADE; + } + case SCREEN_OFF_SCALE: + if (displayState == Display.STATE_OFF) { + return ScreenStateAnimator.MODE_SCALE_DOWN; + } else { + return ScreenStateAnimator.MODE_FADE; + } + default: + return ScreenStateAnimator.MODE_FADE; + } + } + private void initialize(int displayState) { - mPowerState = new DisplayPowerState(mBlanker, - mColorFadeEnabled ? new ColorFade(mDisplayId) : null, mDisplayId, displayState); + final ContentResolver cr = mContext.getContentResolver(); + final ContentObserver observer = new ContentObserver(mHandler) { + @Override + public void onChange(boolean selfChange, Uri uri) { + mScreenOffAnimation = Settings.System.getIntForUser(cr, + Settings.System.SCREEN_OFF_ANIMATION, + SCREEN_OFF_FADE, UserHandle.USER_CURRENT); + if (mPowerState != null) { + mPowerState.setScreenStateAnimator(mScreenOffAnimation); + } + } + }; + cr.registerContentObserver(Settings.System.getUriFor( + Settings.System.SCREEN_OFF_ANIMATION), + false, observer, UserHandle.USER_ALL); + mScreenOffAnimation = Settings.System.getIntForUser(cr, + Settings.System.SCREEN_OFF_ANIMATION, + SCREEN_OFF_FADE, UserHandle.USER_CURRENT); + + mPowerState = new DisplayPowerState(mBlanker, mScreenOffAnimation, mDisplayId, displayState); if (mColorFadeEnabled) { mColorFadeOnAnimator = ObjectAnimator.ofFloat( @@ -908,7 +967,7 @@ private void initialize(int displayState) { // Initialize all of the brightness tracking state final float brightness = convertToNits(mPowerState.getScreenBrightness()); - if (brightness >= PowerManager.BRIGHTNESS_MIN) { + if (brightness >= mDisplayDeviceConfig.getBacklightMin()) { mBrightnessTracker.start(brightness); } mBrightnessSettingListener = brightnessValue -> { @@ -1005,7 +1064,7 @@ private void setUpAutoBrightness(Resources resources, Handler handler) { mAutomaticBrightnessController = new AutomaticBrightnessController(this, handler.getLooper(), mSensorManager, mLightSensor, mInteractiveModeBrightnessMapper, lightSensorWarmUpTimeConfig, - PowerManager.BRIGHTNESS_MIN, PowerManager.BRIGHTNESS_MAX, dozeScaleFactor, + mDisplayDeviceConfig.getBacklightMin(), mDisplayDeviceConfig.getBacklightMax(), dozeScaleFactor, lightSensorRate, initialLightSensorRate, brighteningLightDebounce, darkeningLightDebounce, autoBrightnessResetAmbientLuxAfterWarmUp, ambientBrightnessThresholds, screenBrightnessThresholds, mContext, @@ -1091,14 +1150,28 @@ private void cleanupHandlerThreadAfterStop() { mHbmController.stop(); mBrightnessThrottler.stop(); mHandler.removeCallbacksAndMessages(null); + + // Release any outstanding wakelocks we're still holding because of pending messages. if (mUnfinishedBusiness) { mCallbacks.releaseSuspendBlocker(mSuspendBlockerIdUnfinishedBusiness); mUnfinishedBusiness = false; } + if (mOnStateChangedPending) { + mCallbacks.releaseSuspendBlocker(mSuspendBlockerIdOnStateChanged); + mOnStateChangedPending = false; + } + for (int i = 0; i < mOnProximityPositiveMessages; i++) { + mCallbacks.releaseSuspendBlocker(mSuspendBlockerIdProxPositive); + } + mOnProximityPositiveMessages = 0; + for (int i = 0; i < mOnProximityNegativeMessages; i++) { + mCallbacks.releaseSuspendBlocker(mSuspendBlockerIdProxNegative); + } + mOnProximityNegativeMessages = 0; final float brightness = mPowerState != null ? mPowerState.getScreenBrightness() - : PowerManager.BRIGHTNESS_MIN; + : mDisplayDeviceConfig.getBacklightMin(); reportStats(brightness); if (mPowerState != null) { @@ -1308,7 +1381,7 @@ && isValidBrightnessValue(mPowerRequest.screenBrightnessOverride)) { // be able to resume normal auto-brightness behavior without any delay. if (mPowerRequest.boostScreenBrightness && brightnessState != PowerManager.BRIGHTNESS_OFF_FLOAT) { - brightnessState = PowerManager.BRIGHTNESS_MAX; + brightnessState = mDisplayDeviceConfig.getBacklightMax(); mBrightnessReasonTemp.setReason(BrightnessReason.REASON_BOOST); mAppliedBrightnessBoost = true; } else { @@ -1429,11 +1502,11 @@ && isValidBrightnessValue(mPowerRequest.screenBrightnessOverride)) { // Apply dimming by at least some minimum amount when user activity // timeout is about to expire. if (mPowerRequest.policy == DisplayPowerRequest.POLICY_DIM) { - if (brightnessState > PowerManager.BRIGHTNESS_MIN) { + if (brightnessState > mDisplayDeviceConfig.getBacklightMin()) { brightnessState = Math.max( Math.min(brightnessState - mScreenBrightnessMinimumDimAmount, mScreenBrightnessDimConfig), - PowerManager.BRIGHTNESS_MIN); + mDisplayDeviceConfig.getBacklightMin()); mBrightnessReasonTemp.addModifier(BrightnessReason.MODIFIER_DIMMED); } if (!mAppliedDimming) { @@ -1447,11 +1520,11 @@ && isValidBrightnessValue(mPowerRequest.screenBrightnessOverride)) { // If low power mode is enabled, scale brightness by screenLowPowerBrightnessFactor // as long as it is above the minimum threshold. if (mPowerRequest.lowPowerMode) { - if (brightnessState > PowerManager.BRIGHTNESS_MIN) { + if (brightnessState > mDisplayDeviceConfig.getBacklightMin()) { final float brightnessFactor = Math.min(mPowerRequest.screenLowPowerBrightnessFactor, 1); final float lowPowerBrightnessFloat = (brightnessState * brightnessFactor); - brightnessState = Math.max(lowPowerBrightnessFloat, PowerManager.BRIGHTNESS_MIN); + brightnessState = Math.max(lowPowerBrightnessFloat, mDisplayDeviceConfig.getBacklightMin()); mBrightnessReasonTemp.addModifier(BrightnessReason.MODIFIER_LOW_POWER); } if (!mAppliedLowPower) { @@ -1525,8 +1598,8 @@ && isValidBrightnessValue(mPowerRequest.screenBrightnessOverride)) { // TODO(b/216365040): The decision to prevent HBM for HDR in low power mode should be // done in HighBrightnessModeController. if (mHbmController.getHighBrightnessMode() == BrightnessInfo.HIGH_BRIGHTNESS_MODE_HDR - && ((mBrightnessReason.modifier & BrightnessReason.MODIFIER_DIMMED) == 0 - || (mBrightnessReason.modifier & BrightnessReason.MODIFIER_LOW_POWER) == 0)) { + && (mBrightnessReason.modifier & BrightnessReason.MODIFIER_DIMMED) == 0 + && (mBrightnessReason.modifier & BrightnessReason.MODIFIER_LOW_POWER) == 0) { // We want to scale HDR brightness level with the SDR level animateValue = mHbmController.getHdrBrightnessValue(); } @@ -1790,7 +1863,7 @@ private HighBrightnessModeController createHbmControllerLocked() { ddConfig != null ? ddConfig.getHighBrightnessModeData() : null; final DisplayDeviceInfo info = device.getDisplayDeviceInfoLocked(); return new HighBrightnessModeController(mHandler, info.width, info.height, displayToken, - displayUniqueId, PowerManager.BRIGHTNESS_MIN, PowerManager.BRIGHTNESS_MAX, hbmData, + displayUniqueId, mDisplayDeviceConfig.getBacklightMin(), mDisplayDeviceConfig.getBacklightMax(), hbmData, new HighBrightnessModeController.HdrBrightnessDeviceConfig() { @Override public float getHdrBrightnessFromSdr(float sdrBrightness) { @@ -1951,6 +2024,9 @@ private void loadProximitySensor() { if (mProximitySensor != null) { mProximityThreshold = Math.min(mProximitySensor.getMaximumRange(), TYPICAL_PROXIMITY_THRESHOLD); + if (Float.isNaN(mProximityThreshold)) { + mProximityThreshold = 5.0f; + } } } @@ -1962,7 +2038,7 @@ private float clampScreenBrightnessForVr(float value) { private float clampScreenBrightness(float value) { if (Float.isNaN(value)) { - value = PowerManager.BRIGHTNESS_MIN; + value = mDisplayDeviceConfig.getBacklightMin(); } return MathUtils.constrain(value, mHbmController.getCurrentBrightnessMin(), mHbmController.getCurrentBrightnessMax()); @@ -1970,8 +2046,8 @@ private float clampScreenBrightness(float value) { // Checks whether the brightness is within the valid brightness range, not including off. private boolean isValidBrightnessValue(float brightness) { - return brightness >= PowerManager.BRIGHTNESS_MIN - && brightness <= PowerManager.BRIGHTNESS_MAX; + return brightness >= mDisplayDeviceConfig.getBacklightMin() + && brightness <= mDisplayDeviceConfig.getBacklightMax(); } private void animateScreenBrightness(float target, float sdrTarget, float rate) { @@ -2004,7 +2080,7 @@ private void animateScreenStateChange(int target, boolean performScreenOffTransi // Skip the screen off animation and add a black surface to hide the // contents of the screen. mPowerState.prepareColorFade(mContext, - mColorFadeFadesConfig ? ColorFade.MODE_FADE : ColorFade.MODE_WARM_UP); + getScreenAnimationModeForDisplayState(Display.STATE_ON)); if (mColorFadeOffAnimator != null) { mColorFadeOffAnimator.end(); } @@ -2037,9 +2113,7 @@ private void animateScreenStateChange(int target, boolean performScreenOffTransi if (mPowerState.getColorFadeLevel() == 1.0f) { mPowerState.dismissColorFade(); } else if (mPowerState.prepareColorFade(mContext, - mColorFadeFadesConfig ? - ColorFade.MODE_FADE : - ColorFade.MODE_WARM_UP)) { + getScreenAnimationModeForDisplayState(Display.STATE_ON))) { mColorFadeOnAnimator.start(); } else { mColorFadeOnAnimator.end(); @@ -2141,9 +2215,7 @@ private void animateScreenStateChange(int target, boolean performScreenOffTransi mPowerState.dismissColorFadeResources(); } else if (performScreenOffTransition && mPowerState.prepareColorFade(mContext, - mColorFadeFadesConfig ? - ColorFade.MODE_FADE : ColorFade.MODE_COOL_DOWN) - && mPowerState.getScreenState() != Display.STATE_OFF) { + getScreenAnimationModeForDisplayState(Display.STATE_OFF))) { // Perform the screen off animation. mColorFadeOffAnimator.start(); } else { @@ -2248,8 +2320,11 @@ private void setPendingProximityDebounceTime(long debounceTime) { } private void sendOnStateChangedWithWakelock() { - mCallbacks.acquireSuspendBlocker(mSuspendBlockerIdOnStateChanged); - mHandler.post(mOnStateChangedRunnable); + if (!mOnStateChangedPending) { + mOnStateChangedPending = true; + mCallbacks.acquireSuspendBlocker(mSuspendBlockerIdOnStateChanged); + mHandler.post(mOnStateChangedRunnable); + } } private void logDisplayPolicyChanged(int newPolicy) { @@ -2319,7 +2394,7 @@ private void setCurrentScreenBrightness(float brightnessValue) { } private void putAutoBrightnessAdjustmentSetting(float adjustment) { - if (mDisplayId == Display.DEFAULT_DISPLAY) { + if (mDisplayId == Display.DEFAULT_DISPLAY && !Float.isNaN(adjustment)) { mAutoBrightnessAdjustment = adjustment; Settings.System.putFloatForUser(mContext.getContentResolver(), Settings.System.SCREEN_AUTO_BRIGHTNESS_ADJ, adjustment, @@ -2408,6 +2483,7 @@ private void ignoreProximitySensorUntilChangedInternal() { private final Runnable mOnStateChangedRunnable = new Runnable() { @Override public void run() { + mOnStateChangedPending = false; mCallbacks.onStateChanged(); mCallbacks.releaseSuspendBlocker(mSuspendBlockerIdOnStateChanged); } @@ -2416,17 +2492,20 @@ public void run() { private void sendOnProximityPositiveWithWakelock() { mCallbacks.acquireSuspendBlocker(mSuspendBlockerIdProxPositive); mHandler.post(mOnProximityPositiveRunnable); + mOnProximityPositiveMessages++; } private final Runnable mOnProximityPositiveRunnable = new Runnable() { @Override public void run() { + mOnProximityPositiveMessages--; mCallbacks.onProximityPositive(); mCallbacks.releaseSuspendBlocker(mSuspendBlockerIdProxPositive); } }; private void sendOnProximityNegativeWithWakelock() { + mOnProximityNegativeMessages++; mCallbacks.acquireSuspendBlocker(mSuspendBlockerIdProxNegative); mHandler.post(mOnProximityNegativeRunnable); } @@ -2434,6 +2513,7 @@ private void sendOnProximityNegativeWithWakelock() { private final Runnable mOnProximityNegativeRunnable = new Runnable() { @Override public void run() { + mOnProximityNegativeMessages--; mCallbacks.onProximityNegative(); mCallbacks.releaseSuspendBlocker(mSuspendBlockerIdProxNegative); } @@ -2533,6 +2613,9 @@ private void dumpLocal(PrintWriter pw) { pw.println(" mReportedToPolicy=" + reportedToPolicyToString(mReportedScreenStateToPolicy)); pw.println(" mIsRbcActive=" + mIsRbcActive); + pw.println(" mOnStateChangePending=" + mOnStateChangedPending); + pw.println(" mOnProximityPositiveMessages=" + mOnProximityPositiveMessages); + pw.println(" mOnProximityNegativeMessages=" + mOnProximityNegativeMessages); if (mScreenBrightnessRampAnimator != null) { pw.println(" mScreenBrightnessRampAnimator.isAnimating()=" @@ -2625,9 +2708,9 @@ private void dumpBrightnessEvents(PrintWriter pw) { } } - private static float clampAbsoluteBrightness(float value) { - return MathUtils.constrain(value, PowerManager.BRIGHTNESS_MIN, - PowerManager.BRIGHTNESS_MAX); + private float clampAbsoluteBrightness(float value) { + return MathUtils.constrain(value, mDisplayDeviceConfig.getBacklightMin(), + mDisplayDeviceConfig.getBacklightMax()); } private static float clampAutoBrightnessAdjustment(float value) { @@ -2662,7 +2745,7 @@ private void reportStats(float brightness) { return; } - float hbmTransitionPoint = PowerManager.BRIGHTNESS_MAX; + float hbmTransitionPoint = mDisplayDeviceConfig.getBacklightMax(); synchronized(mCachedBrightnessInfo) { if (mCachedBrightnessInfo.hbmTransitionPoint == null) { return; diff --git a/services/core/java/com/android/server/display/DisplayPowerState.java b/services/core/java/com/android/server/display/DisplayPowerState.java index 2f22d33f552a..04fe9d0aad25 100644 --- a/services/core/java/com/android/server/display/DisplayPowerState.java +++ b/services/core/java/com/android/server/display/DisplayPowerState.java @@ -54,7 +54,6 @@ final class DisplayPowerState { private final Handler mHandler; private final Choreographer mChoreographer; private final DisplayBlanker mBlanker; - private final ColorFade mColorFade; private final PhotonicModulator mPhotonicModulator; private final int mDisplayId; @@ -73,12 +72,14 @@ final class DisplayPowerState { private volatile boolean mStopped; + private ScreenStateAnimator mColorFade; + DisplayPowerState( - DisplayBlanker blanker, ColorFade colorFade, int displayId, int displayState) { + DisplayBlanker blanker, int screenAnimatorMode, int displayId, int displayState) { mHandler = new Handler(true /*async*/); mChoreographer = Choreographer.getInstance(); mBlanker = blanker; - mColorFade = colorFade; + setScreenStateAnimator(screenAnimatorMode); mPhotonicModulator = new PhotonicModulator(); mPhotonicModulator.start(); mDisplayId = displayId; @@ -99,6 +100,17 @@ final class DisplayPowerState { mColorFadeReady = true; } + public void setScreenStateAnimator(int mode) { + if (mColorFade != null) { + mColorFade.dismiss(); + } + if (mode == DisplayPowerController.SCREEN_OFF_FADE) { + mColorFade = new ColorFade(Display.DEFAULT_DISPLAY); + } else { + mColorFade = new ElectronBeam(Display.DEFAULT_DISPLAY); + } + } + public static final FloatProperty COLOR_FADE_LEVEL = new FloatProperty("electronBeamLevel") { @Override diff --git a/services/core/java/com/android/server/display/ElectronBeam.java b/services/core/java/com/android/server/display/ElectronBeam.java new file mode 100644 index 000000000000..ba996b376bf4 --- /dev/null +++ b/services/core/java/com/android/server/display/ElectronBeam.java @@ -0,0 +1,887 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * Copyright (C) 2018 The Dirty Unicorns Project + * Copyright (C) 2022 The Potato Open Sauce Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.display; + +import static com.android.server.wm.utils.RotationAnimationUtils.hasProtectedContent; + +import android.content.Context; +import android.graphics.PixelFormat; +import android.graphics.SurfaceTexture; +import android.hardware.display.DisplayManagerInternal.DisplayTransactionListener; +import android.hardware.display.DisplayManagerInternal; +import android.opengl.EGL14; +import android.opengl.EGLConfig; +import android.opengl.EGLContext; +import android.opengl.EGLDisplay; +import android.opengl.EGLSurface; +import android.opengl.GLES10; +import android.opengl.GLES11Ext; +import android.os.IBinder; +import android.os.Looper; +import android.util.Slog; +import android.view.Display; +import android.view.DisplayInfo; +import android.view.Surface.OutOfResourcesException; +import android.view.Surface; +import android.view.SurfaceControl.Transaction; +import android.view.SurfaceControl; +import android.view.SurfaceSession; + +import com.android.server.LocalServices; + +import java.io.PrintWriter; +import java.lang.Math; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.FloatBuffer; + + +/** + * Bzzzoooop! *crackle* + *

+ * Animates a screen transition from on to off or off to on by applying + * some GL transformations to a screenshot. + *

+ * This component must only be created or accessed by the {@link Looper} thread + * that belongs to the {@link DisplayPowerController}. + *

+ */ +final class ElectronBeam implements ScreenStateAnimator { + private static final String TAG = "ElectronBeam"; + + private static final boolean DEBUG = false; + + // The layer for the electron beam surface. + // This is currently hardcoded to be one layer above the boot animation. + private static final int ELECTRON_BEAM_LAYER = 0x40000001; + + // The relative proportion of the animation to spend performing + // the horizontal stretch effect. The remainder is spent performing + // the vertical stretch effect. + private static final float HSTRETCH_DURATION = 0.5f; + private static final float VSTRETCH_DURATION = 1.0f - HSTRETCH_DURATION; + + // The number of frames to draw when preparing the animation so that it will + // be ready to run smoothly. We use 3 frames because we are triple-buffered. + // See code for details. + private static final int DEJANK_FRAMES = 3; + + private static final int EGL_GL_COLORSPACE_KHR = 0x309D; + private static final int EGL_GL_COLORSPACE_DISPLAY_P3_PASSTHROUGH_EXT = 0x3490; + private static final int EGL_PROTECTED_CONTENT_EXT = 0x32C0; + + // Set to true when the animation context has been fully prepared. + private boolean mPrepared; + private int mMode; + + private final DisplayManagerInternal mDisplayManagerInternal; + private int mDisplayId; + private int mDisplayLayerStack; // layer stack associated with primary display + private int mDisplayWidth; // real width, not rotated + private int mDisplayHeight; // real height, not rotated + private SurfaceSession mSurfaceSession; + private SurfaceControl mSurfaceControl; + private Surface mSurface; + private NaturalSurfaceLayout mSurfaceLayout; + private EGLDisplay mEglDisplay; + private EGLConfig mEglConfig; + private EGLContext mEglContext; + private EGLSurface mEglSurface; + private boolean mSurfaceVisible; + private float mSurfaceAlpha; + private boolean mLastWasWideColor; + private boolean mLastWasProtectedContent; + + // Texture names. We only use one texture, which contains the screenshot. + private final int[] mTexNames = new int[1]; + private boolean mTexNamesGenerated; + private final float mTexMatrix[] = new float[16]; + + // Vertex and corresponding texture coordinates. + // We have 4 2D vertices, so 8 elements. The vertices form a quad. + private final FloatBuffer mVertexBuffer = createNativeFloatBuffer(8); + private final FloatBuffer mTexCoordBuffer = createNativeFloatBuffer(8); + + private final Transaction mTransaction = new Transaction(); + + /** + * Animates an electron beam warming up. + */ + public static final int MODE_WARM_UP = 0; + + /** + * Animates an electron beam shutting off. + */ + public static final int MODE_COOL_DOWN = 1; + + /** + * Animates a simple dim layer to fade the contents of the screen in or out progressively. + */ + public static final int MODE_FADE = 2; + + /** + * Animates a scale down of the screen + */ + public static final int MODE_SCALE_DOWN = 3; + + + public ElectronBeam(int displayId) { + mDisplayId = displayId; + mDisplayManagerInternal = LocalServices.getService(DisplayManagerInternal.class); + } + + /** + * Warms up the electron beam in preparation for turning on or off. + * This method prepares a GL context, and captures a screen shot. + * + * @param mode The desired mode for the upcoming animation. + * @return True if the electron beam is ready, false if it is uncontrollable. + */ + public boolean prepare(Context context, int mode) { + if (DEBUG) { + Slog.d(TAG, "prepare: mode=" + mode); + } + + mMode = mode; + + // Get the display size and layer stack. + // This is not expected to change while the electron beam surface is showing. + DisplayInfo displayInfo = mDisplayManagerInternal.getDisplayInfo(mDisplayId); + mDisplayLayerStack = displayInfo.layerStack; + mDisplayWidth = displayInfo.getNaturalWidth(); + mDisplayHeight = displayInfo.getNaturalHeight(); + + final IBinder token = SurfaceControl.getInternalDisplayToken(); + if (token == null) { + Slog.e(TAG, + "Failed to take screenshot because internal display is disconnected"); + return false; + } + final boolean isWideColor = SurfaceControl.getDynamicDisplayInfo(token).activeColorMode + == Display.COLOR_MODE_DISPLAY_P3; + + // Set mPrepared here so if initialization fails, resources can be cleaned up. + mPrepared = true; + + final SurfaceControl.ScreenshotHardwareBuffer hardwareBuffer = captureScreen(); + if (hardwareBuffer == null) { + dismiss(); + return false; + } + + final boolean isProtected = hasProtectedContent(hardwareBuffer.getHardwareBuffer()); + if (!createSurfaceControl(hardwareBuffer.containsSecureLayers())) { + dismiss(); + return false; + } + + // MODE_FADE use ColorLayer to implement. + if (mMode == MODE_FADE) { + return true; + } + + if (!(createEglContext(isProtected) && createEglSurface(isProtected, isWideColor) + && setScreenshotTextureAndSetViewport(hardwareBuffer))) { + dismiss(); + return false; + } + + // Done. + mLastWasProtectedContent = isProtected; + mLastWasWideColor = isWideColor; + + // Dejanking optimization. + // Some GL drivers can introduce a lot of lag in the first few frames as they + // initialize their state and allocate graphics buffers for rendering. + // Work around this problem by rendering the first frame of the animation a few + // times. The rest of the animation should run smoothly thereafter. + // The frames we draw here aren't visible because we are essentially just + // painting the screenshot as-is. + if (mode == MODE_COOL_DOWN || mode == MODE_SCALE_DOWN) { + for (int i = 0; i < DEJANK_FRAMES; i++) { + draw(1.0f); + } + } + return true; + } + + /** + * Dismisses the electron beam animation surface and cleans up. + * + * To prevent stray photons from leaking out after the electron beam has been + * turned off, it is a good idea to defer dismissing the animation until the + * electron beam has been turned back on fully. + */ + public void dismiss() { + if (DEBUG) { + Slog.d(TAG, "dismiss"); + } + + destroyScreenshotTexture(); + destroyEglSurface(); + destroySurface(); + mPrepared = false; + } + + + /** + * Draws an animation frame showing the electron beam activated at the + * specified level. + * + * @param level The electron beam level. + * @return True if successful. + */ + public boolean draw(float level) { + if (DEBUG) { + Slog.d(TAG, "drawFrame: level=" + level); + } + + if (!mPrepared) { + return false; + } + + if (mMode == MODE_FADE) { + return showSurface(1.0f - level); + } + + if (!attachEglContext()) { + return false; + } + try { + // Clear frame to solid black. + GLES10.glClearColor(0.0f, 0.0f, 0.0f, 0.5f); + GLES10.glClear(GLES10.GL_COLOR_BUFFER_BIT); + + // Draw the frame. + if (mMode == MODE_WARM_UP || mMode == MODE_COOL_DOWN) { + if (level < HSTRETCH_DURATION) { + drawHStretch(1.0f - (level / HSTRETCH_DURATION)); + } else { + drawVStretch(1.0f - ((level - HSTRETCH_DURATION) / VSTRETCH_DURATION)); + } + } else if (mMode == MODE_SCALE_DOWN) { + drawScaled(level); + } + + if (checkGlErrors("drawFrame")) { + return false; + } + + EGL14.eglSwapBuffers(mEglDisplay, mEglSurface); + } finally { + detachEglContext(); + } + + return showSurface(1.0f); + } + + private void drawScaled(float scale) { + final float curvedScale = scurve(scale, 8.0f); + + // set blending, enable alpha operations + GLES10.glEnable(GLES10.GL_BLEND); + GLES10.glBlendFunc(GLES10.GL_SRC_ALPHA, GLES10.GL_ONE_MINUS_SRC_ALPHA); + + // bind vertex buffer + GLES10.glVertexPointer(2, GLES10.GL_FLOAT, 0, mVertexBuffer); + GLES10.glEnableClientState(GLES10.GL_VERTEX_ARRAY); + + // set-up texturing + GLES10.glDisable(GLES10.GL_TEXTURE_2D); + GLES10.glEnable(GLES11Ext.GL_TEXTURE_EXTERNAL_OES); + + // bind texture and set blending for drawing planes + GLES10.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, mTexNames[0]); + GLES10.glTexEnvx(GLES10.GL_TEXTURE_ENV, GLES10.GL_TEXTURE_ENV_MODE, + mMode == MODE_WARM_UP ? GLES10.GL_MODULATE : GLES10.GL_REPLACE); + GLES10.glTexParameterx(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, + GLES10.GL_TEXTURE_MAG_FILTER, GLES10.GL_LINEAR); + GLES10.glTexParameterx(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, + GLES10.GL_TEXTURE_MIN_FILTER, GLES10.GL_LINEAR); + GLES10.glTexParameterx(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, + GLES10.GL_TEXTURE_WRAP_S, GLES10.GL_CLAMP_TO_EDGE); + GLES10.glTexParameterx(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, + GLES10.GL_TEXTURE_WRAP_T, GLES10.GL_CLAMP_TO_EDGE); + GLES10.glEnable(GLES11Ext.GL_TEXTURE_EXTERNAL_OES); + GLES10.glTexCoordPointer(2, GLES10.GL_FLOAT, 0, mTexCoordBuffer); + GLES10.glEnableClientState(GLES10.GL_TEXTURE_COORD_ARRAY); + + // Draw the frame + setQuad(mVertexBuffer, mDisplayWidth / 2 * (1.0f - curvedScale), + mDisplayHeight / 2 * (1.0f - curvedScale), + mDisplayWidth * curvedScale, mDisplayHeight * curvedScale); + GLES10.glDrawArrays(GLES10.GL_TRIANGLE_FAN, 0, 4); + + // dim progressively, using previous vertexes + GLES10.glDisable(GLES11Ext.GL_TEXTURE_EXTERNAL_OES); + GLES10.glDisableClientState(GLES10.GL_TEXTURE_COORD_ARRAY); + GLES10.glColorMask(true, true, true, true); + GLES10.glColor4f(0.0f, 0.0f, 0.0f, 1.0f - curvedScale); + GLES10.glDrawArrays(GLES10.GL_TRIANGLE_FAN, 0, 4); + + // clean up after drawing planes + GLES10.glDisableClientState(GLES10.GL_VERTEX_ARRAY); + GLES10.glDisable(GLES10.GL_BLEND); + } + + /** + * Draws a frame where the content of the electron beam is collapsing inwards upon + * itself vertically with red / green / blue channels dispersing and eventually + * merging down to a single horizontal line. + * + * @param stretch The stretch factor. 0.0 is no collapse, 1.0 is full collapse. + */ + private void drawVStretch(float stretch) { + // compute interpolation scale factors for each color channel + final float ar = scurve(stretch, 7.5f); + final float ag = scurve(stretch, 8.0f); + final float ab = scurve(stretch, 8.5f); + if (DEBUG) { + Slog.d(TAG, "drawVStretch: stretch=" + stretch + + ", ar=" + ar + ", ag=" + ag + ", ab=" + ab); + } + + // set blending + GLES10.glBlendFunc(GLES10.GL_ONE, GLES10.GL_ONE); + GLES10.glEnable(GLES10.GL_BLEND); + + // bind vertex buffer + GLES10.glVertexPointer(2, GLES10.GL_FLOAT, 0, mVertexBuffer); + GLES10.glEnableClientState(GLES10.GL_VERTEX_ARRAY); + + // set-up texturing + GLES10.glDisable(GLES10.GL_TEXTURE_2D); + GLES10.glEnable(GLES11Ext.GL_TEXTURE_EXTERNAL_OES); + + // bind texture and set blending for drawing planes + GLES10.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, mTexNames[0]); + GLES10.glTexEnvx(GLES10.GL_TEXTURE_ENV, GLES10.GL_TEXTURE_ENV_MODE, + mMode == MODE_WARM_UP ? GLES10.GL_MODULATE : GLES10.GL_REPLACE); + GLES10.glTexParameterx(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, + GLES10.GL_TEXTURE_MAG_FILTER, GLES10.GL_LINEAR); + GLES10.glTexParameterx(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, + GLES10.GL_TEXTURE_MIN_FILTER, GLES10.GL_LINEAR); + GLES10.glTexParameterx(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, + GLES10.GL_TEXTURE_WRAP_S, GLES10.GL_CLAMP_TO_EDGE); + GLES10.glTexParameterx(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, + GLES10.GL_TEXTURE_WRAP_T, GLES10.GL_CLAMP_TO_EDGE); + GLES10.glEnable(GLES11Ext.GL_TEXTURE_EXTERNAL_OES); + GLES10.glTexCoordPointer(2, GLES10.GL_FLOAT, 0, mTexCoordBuffer); + GLES10.glEnableClientState(GLES10.GL_TEXTURE_COORD_ARRAY); + + // draw the red plane + setVStretchQuad(mVertexBuffer, mDisplayWidth, mDisplayHeight, ar); + GLES10.glColorMask(true, false, false, true); + GLES10.glDrawArrays(GLES10.GL_TRIANGLE_FAN, 0, 4); + + // draw the green plane + setVStretchQuad(mVertexBuffer, mDisplayWidth, mDisplayHeight, ag); + GLES10.glColorMask(false, true, false, true); + GLES10.glDrawArrays(GLES10.GL_TRIANGLE_FAN, 0, 4); + + // draw the blue plane + setVStretchQuad(mVertexBuffer, mDisplayWidth, mDisplayHeight, ab); + GLES10.glColorMask(false, false, true, true); + GLES10.glDrawArrays(GLES10.GL_TRIANGLE_FAN, 0, 4); + + // clean up after drawing planes + GLES10.glDisable(GLES11Ext.GL_TEXTURE_EXTERNAL_OES); + GLES10.glDisableClientState(GLES10.GL_TEXTURE_COORD_ARRAY); + GLES10.glColorMask(true, true, true, true); + + // draw the white highlight (we use the last vertices) + if (mMode == MODE_COOL_DOWN) { + GLES10.glColor4f(ag, ag, ag, 1.0f); + GLES10.glDrawArrays(GLES10.GL_TRIANGLE_FAN, 0, 4); + } + + // clean up + GLES10.glDisableClientState(GLES10.GL_VERTEX_ARRAY); + GLES10.glDisable(GLES10.GL_BLEND); + } + + /** + * Draws a frame where the electron beam has been stretched out into + * a thin white horizontal line that fades as it collapses inwards. + * + * @param stretch The stretch factor. 0.0 is maximum stretch / no fade, + * 1.0 is collapsed / maximum fade. + */ + private void drawHStretch(float stretch) { + // compute interpolation scale factor + final float ag = scurve(stretch, 8.0f); + if (DEBUG) { + Slog.d(TAG, "drawHStretch: stretch=" + stretch + ", ag=" + ag); + } + + if (stretch < 1.0f) { + // bind vertex buffer + GLES10.glVertexPointer(2, GLES10.GL_FLOAT, 0, mVertexBuffer); + GLES10.glEnableClientState(GLES10.GL_VERTEX_ARRAY); + + // draw narrow fading white line + setHStretchQuad(mVertexBuffer, mDisplayWidth, mDisplayHeight, ag); + GLES10.glColor4f(1.0f - ag*0.75f, 1.0f - ag*0.75f, 1.0f - ag*0.75f, 1.0f); + GLES10.glDrawArrays(GLES10.GL_TRIANGLE_FAN, 0, 4); + + // clean up + GLES10.glDisableClientState(GLES10.GL_VERTEX_ARRAY); + } + } + + private static void setVStretchQuad(FloatBuffer vtx, float dw, float dh, float a) { + final float w = dw + (dw * a); + final float h = dh - (dh * a); + final float x = (dw - w) * 0.5f; + final float y = (dh - h) * 0.5f; + setQuad(vtx, x, y, w, h); + } + + private static void setHStretchQuad(FloatBuffer vtx, float dw, float dh, float a) { + final float w = 2 * dw * (1.0f - a); + final float h = 1.0f; + final float x = (dw - w) * 0.5f; + final float y = (dh - h) * 0.5f; + setQuad(vtx, x, y, w, h); + } + + private static void setQuad(FloatBuffer vtx, float x, float y, float w, float h) { + if (DEBUG) { + Slog.d(TAG, "setQuad: x=" + x + ", y=" + y + ", w=" + w + ", h=" + h); + } + vtx.put(0, x); + vtx.put(1, y); + vtx.put(2, x); + vtx.put(3, y + h); + vtx.put(4, x + w); + vtx.put(5, y + h); + vtx.put(6, x + w); + vtx.put(7, y); + } + + private boolean setScreenshotTextureAndSetViewport( + SurfaceControl.ScreenshotHardwareBuffer screenshotBuffer) { + if (!attachEglContext()) { + return false; + } + try { + if (!mTexNamesGenerated) { + GLES10.glGenTextures(1, mTexNames, 0); + if (checkGlErrors("glGenTextures")) { + return false; + } + mTexNamesGenerated = true; + } + + final SurfaceTexture st = new SurfaceTexture(mTexNames[0]); + final Surface s = new Surface(st); + try { + s.attachAndQueueBufferWithColorSpace(screenshotBuffer.getHardwareBuffer(), + screenshotBuffer.getColorSpace()); + + st.updateTexImage(); + st.getTransformMatrix(mTexMatrix); + } finally { + s.release(); + st.release(); + } + + // Set up texture coordinates for a quad. + // We might need to change this if the texture ends up being + // a different size from the display for some reason. + mTexCoordBuffer.put(0, 0f); mTexCoordBuffer.put(1, 0f); + mTexCoordBuffer.put(2, 0f); mTexCoordBuffer.put(3, 1f); + mTexCoordBuffer.put(4, 1f); mTexCoordBuffer.put(5, 1f); + mTexCoordBuffer.put(6, 1f); mTexCoordBuffer.put(7, 0f); + + // Set up our viewport. + GLES10.glViewport(0, 0, mDisplayWidth, mDisplayHeight); + GLES10.glMatrixMode(GLES10.GL_PROJECTION); + GLES10.glLoadIdentity(); + GLES10.glOrthof(0, mDisplayWidth, 0, mDisplayHeight, 0, 1); + GLES10.glMatrixMode(GLES10.GL_MODELVIEW); + GLES10.glLoadIdentity(); + GLES10.glMatrixMode(GLES10.GL_TEXTURE); + GLES10.glLoadIdentity(); + GLES10.glLoadMatrixf(mTexMatrix, 0); + } finally { + detachEglContext(); + } + return true; + } + + private void destroyScreenshotTexture() { + if (mTexNamesGenerated) { + mTexNamesGenerated = false; + if (attachEglContext()) { + try { + GLES10.glDeleteTextures(1, mTexNames, 0); + checkGlErrors("glDeleteTextures"); + } finally { + detachEglContext(); + } + } + } + } + + private SurfaceControl.ScreenshotHardwareBuffer captureScreen() { + SurfaceControl.ScreenshotHardwareBuffer screenshotBuffer = + mDisplayManagerInternal.systemScreenshot(mDisplayId); + if (screenshotBuffer == null) { + Slog.e(TAG, "Failed to take screenshot. Buffer is null"); + return null; + } + return screenshotBuffer; + } + + private boolean createEglContext(boolean isProtected) { + if (mEglDisplay == null) { + mEglDisplay = EGL14.eglGetDisplay(EGL14.EGL_DEFAULT_DISPLAY); + if (mEglDisplay == EGL14.EGL_NO_DISPLAY) { + logEglError("eglGetDisplay"); + return false; + } + + int[] version = new int[2]; + if (!EGL14.eglInitialize(mEglDisplay, version, 0, version, 1)) { + mEglDisplay = null; + logEglError("eglInitialize"); + return false; + } + } + + if (mEglConfig == null) { + int[] eglConfigAttribList = new int[] { + EGL14.EGL_RENDERABLE_TYPE, + EGL14.EGL_OPENGL_ES2_BIT, + EGL14.EGL_RED_SIZE, 8, + EGL14.EGL_GREEN_SIZE, 8, + EGL14.EGL_BLUE_SIZE, 8, + EGL14.EGL_ALPHA_SIZE, 8, + EGL14.EGL_NONE + }; + int[] numEglConfigs = new int[1]; + EGLConfig[] eglConfigs = new EGLConfig[1]; + if (!EGL14.eglChooseConfig(mEglDisplay, eglConfigAttribList, 0, + eglConfigs, 0, eglConfigs.length, numEglConfigs, 0)) { + logEglError("eglChooseConfig"); + return false; + } + if (numEglConfigs[0] <= 0) { + Slog.e(TAG, "no valid config found"); + return false; + } + + mEglConfig = eglConfigs[0]; + } + + // The old context needs to be destroyed if the protected flag has changed. The context will + // be recreated based on the protected flag + if (mEglContext != null && isProtected != mLastWasProtectedContent) { + EGL14.eglDestroyContext(mEglDisplay, mEglContext); + mEglContext = null; + } + + if (mEglContext == null) { + int[] eglContextAttribList = new int[] { + EGL14.EGL_CONTEXT_CLIENT_VERSION, 1, + EGL14.EGL_NONE, EGL14.EGL_NONE, + EGL14.EGL_NONE + }; + if (isProtected) { + eglContextAttribList[3] = EGL_PROTECTED_CONTENT_EXT; + eglContextAttribList[4] = EGL14.EGL_TRUE; + } + mEglContext = EGL14.eglCreateContext(mEglDisplay, mEglConfig, EGL14.EGL_NO_CONTEXT, + eglContextAttribList, 0); + if (mEglContext == null) { + logEglError("eglCreateContext"); + return false; + } + } + return true; + } + + private boolean createSurfaceControl(boolean isSecure) { + if (mSurfaceControl != null) { + mTransaction.setSecure(mSurfaceControl, isSecure).apply(); + return true; + } + + if (mSurfaceSession == null) { + mSurfaceSession = new SurfaceSession(); + } + + if (mSurfaceControl == null) { + try { + int flags; + if (mMode == MODE_FADE) { + flags = SurfaceControl.FX_SURFACE_EFFECT | SurfaceControl.HIDDEN; + } else { + flags = SurfaceControl.OPAQUE | SurfaceControl.HIDDEN; + } + SurfaceControl.Builder builder = new SurfaceControl.Builder(mSurfaceSession); + builder.setFlags(flags) + .setFormat(PixelFormat.OPAQUE) + .setName("ElectronBeam") + .setBufferSize(mDisplayWidth, mDisplayHeight); + mSurfaceControl = builder.build(); + } catch (OutOfResourcesException ex) { + Slog.e(TAG, "Unable to create surface.", ex); + return false; + } + + mTransaction.setLayerStack(mSurfaceControl, mDisplayLayerStack); + mTransaction.setWindowCrop(mSurfaceControl, mDisplayWidth, mDisplayHeight); + mSurface = new Surface(); + mSurface.copyFrom(mSurfaceControl); + + mSurfaceLayout = new NaturalSurfaceLayout(mDisplayManagerInternal, + mDisplayId, mSurfaceControl); + mSurfaceLayout.onDisplayTransaction(mTransaction); + mTransaction.apply(); + } + return true; + } + + private boolean createEglSurface(boolean isProtected, boolean isWideColor) { + // The old surface needs to be destroyed if either the protected flag or wide color flag has + // changed. The surface will be recreated based on the new flags. + boolean didContentAttributesChange = + isProtected != mLastWasProtectedContent || isWideColor != mLastWasWideColor; + if (mEglSurface != null && didContentAttributesChange) { + EGL14.eglDestroySurface(mEglDisplay, mEglSurface); + mEglSurface = null; + } + + if (mEglSurface == null) { + int[] eglSurfaceAttribList = new int[] { + EGL14.EGL_NONE, + EGL14.EGL_NONE, + EGL14.EGL_NONE, + EGL14.EGL_NONE, + EGL14.EGL_NONE + }; + + int index = 0; + // If the current display is in wide color, then so is the screenshot. + if (isWideColor) { + eglSurfaceAttribList[index++] = EGL_GL_COLORSPACE_KHR; + eglSurfaceAttribList[index++] = EGL_GL_COLORSPACE_DISPLAY_P3_PASSTHROUGH_EXT; + } + if (isProtected) { + eglSurfaceAttribList[index++] = EGL_PROTECTED_CONTENT_EXT; + eglSurfaceAttribList[index] = EGL14.EGL_TRUE; + } + // turn our SurfaceControl into a Surface + mEglSurface = EGL14.eglCreateWindowSurface(mEglDisplay, mEglConfig, mSurface, + eglSurfaceAttribList, 0); + if (mEglSurface == null) { + logEglError("eglCreateWindowSurface"); + return false; + } + } + return true; + } + + private void destroyEglSurface() { + if (mEglSurface != null) { + if (!EGL14.eglDestroySurface(mEglDisplay, mEglSurface)) { + logEglError("eglDestroySurface"); + } + mEglSurface = null; + } + } + + private void destroySurface() { + if (mSurfaceControl != null) { + mSurfaceLayout.dispose(); + mSurfaceLayout = null; + mTransaction.remove(mSurfaceControl).apply(); + if (mSurface != null) { + mSurface.release(); + mSurface = null; + } + + mSurfaceControl = null; + mSurfaceVisible = false; + mSurfaceAlpha = 0f; + } + } + + private boolean showSurface(float alpha) { + if (!mSurfaceVisible || mSurfaceAlpha != alpha) { + mTransaction.setLayer(mSurfaceControl, ELECTRON_BEAM_LAYER) + .setAlpha(mSurfaceControl, alpha) + .show(mSurfaceControl) + .apply(); + mSurfaceVisible = true; + mSurfaceAlpha = alpha; + } + return true; + } + + private boolean attachEglContext() { + if (mEglSurface == null) { + return false; + } + if (!EGL14.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext)) { + logEglError("eglMakeCurrent"); + return false; + } + return true; + } + + private void detachEglContext() { + if (mEglDisplay != null) { + EGL14.eglMakeCurrent(mEglDisplay, + EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_CONTEXT); + } + } + + /** + * Interpolates a value in the range 0 .. 1 along a sigmoid curve + * yielding a result in the range 0 .. 1 scaled such that: + * scurve(0) == 0, scurve(0.5) == 0.5, scurve(1) == 1. + */ + private static float scurve(float value, float s) { + // A basic sigmoid has the form y = 1.0f / FloatMap.exp(-x * s). + // Here we take the input datum and shift it by 0.5 so that the + // domain spans the range -0.5 .. 0.5 instead of 0 .. 1. + final float x = value - 0.5f; + + // Next apply the sigmoid function to the scaled value + // which produces a value in the range 0 .. 1 so we subtract + // 0.5 to get a value in the range -0.5 .. 0.5 instead. + final float y = sigmoid(x, s) - 0.5f; + + // To obtain the desired boundary conditions we need to scale + // the result so that it fills a range of -1 .. 1. + final float v = sigmoid(0.5f, s) - 0.5f; + + // And finally remap the value back to a range of 0 .. 1. + return y / v * 0.5f + 0.5f; + } + + private static float sigmoid(float x, float s) { + return 1.0f / (1.0f + (float)Math.exp(-x * s)); + } + + private static FloatBuffer createNativeFloatBuffer(int size) { + ByteBuffer bb = ByteBuffer.allocateDirect(size * 4); + bb.order(ByteOrder.nativeOrder()); + return bb.asFloatBuffer(); + } + + private static void logEglError(String func) { + Slog.e(TAG, func + " failed: error " + EGL14.eglGetError(), new Throwable()); + } + + private static boolean checkGlErrors(String func) { + return checkGlErrors(func, true); + } + + private static boolean checkGlErrors(String func, boolean log) { + boolean hadError = false; + int error; + while ((error = GLES10.glGetError()) != GLES10.GL_NO_ERROR) { + if (log) { + Slog.e(TAG, func + " failed: error " + error, new Throwable()); + } + hadError = true; + } + return hadError; + } + + public void dump(PrintWriter pw) { + pw.println(); + pw.println("Electron Beam State:"); + pw.println(" mPrepared=" + mPrepared); + pw.println(" mMode=" + mMode); + pw.println(" mDisplayLayerStack=" + mDisplayLayerStack); + pw.println(" mDisplayWidth=" + mDisplayWidth); + pw.println(" mDisplayHeight=" + mDisplayHeight); + pw.println(" mSurfaceVisible=" + mSurfaceVisible); + pw.println(" mSurfaceAlpha=" + mSurfaceAlpha); + } + + /** + * Keeps a surface aligned with the natural orientation of the device. + * Updates the position and transformation of the matrix whenever the display + * is rotated. This is a little tricky because the display transaction + * callback can be invoked on any thread, not necessarily the thread that + * owns the electron beam. + */ + private static final class NaturalSurfaceLayout implements DisplayTransactionListener { + private final DisplayManagerInternal mDisplayManagerInternal; + private final int mDisplayId; + private SurfaceControl mSurfaceControl; + + public NaturalSurfaceLayout(DisplayManagerInternal displayManagerInternal, + int displayId, SurfaceControl surfaceControl) { + mDisplayManagerInternal = displayManagerInternal; + mDisplayId = displayId; + mSurfaceControl = surfaceControl; + mDisplayManagerInternal.registerDisplayTransactionListener(this); + } + + public void dispose() { + synchronized (this) { + mSurfaceControl = null; + } + mDisplayManagerInternal.unregisterDisplayTransactionListener(this); + } + + @Override + public void onDisplayTransaction(Transaction t) { + synchronized (this) { + if (mSurfaceControl == null) { + return; + } + + DisplayInfo displayInfo = mDisplayManagerInternal.getDisplayInfo(mDisplayId); + if (displayInfo == null) { + // displayInfo can be null if the associated display has been removed. There + // is a delay between the display being removed and ElectronBeam being dismissed. + return; + } + + switch (displayInfo.rotation) { + case Surface.ROTATION_0: + t.setPosition(mSurfaceControl, 0, 0); + t.setMatrix(mSurfaceControl, 1, 0, 0, 1); + break; + case Surface.ROTATION_90: + t.setPosition(mSurfaceControl, 0, displayInfo.logicalHeight); + t.setMatrix(mSurfaceControl, 0, -1, 1, 0); + break; + case Surface.ROTATION_180: + t.setPosition(mSurfaceControl, displayInfo.logicalWidth, + displayInfo.logicalHeight); + t.setMatrix(mSurfaceControl, -1, 0, 0, -1); + break; + case Surface.ROTATION_270: + t.setPosition(mSurfaceControl, displayInfo.logicalWidth, 0); + t.setMatrix(mSurfaceControl, 0, 1, -1, 0); + break; + } + } + } + } +} diff --git a/services/core/java/com/android/server/display/ExtendedRemoteDisplayHelper.java b/services/core/java/com/android/server/display/ExtendedRemoteDisplayHelper.java new file mode 100644 index 000000000000..d6306a3175a1 --- /dev/null +++ b/services/core/java/com/android/server/display/ExtendedRemoteDisplayHelper.java @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package com.android.server.display; + +import android.content.Context; +import android.media.RemoteDisplay; +import android.os.Handler; +import android.util.Slog; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +class ExtendedRemoteDisplayHelper { + private static final String TAG = "ExtendedRemoteDisplayHelper"; + private static final boolean DEBUG = false; + + // ExtendedRemoteDisplay class + // ExtendedRemoteDisplay is an enhanced RemoteDisplay. + // It has similar interface as RemoteDisplay class. + private static Class sExtRemoteDisplayClass; + + // Method object for the API ExtendedRemoteDisplay.Listen + // ExtendedRemoteDisplay.Listen has the same API signature as RemoteDisplay.Listen + // except for an additional argument to pass the Context. + private static Method sExtRemoteDisplayListen; + + // Method Object for the API ExtendedRemoteDisplay.Dispose + // ExtendedRemoteDisplay.Dispose follows the same API signature as RemoteDisplay.Dispose. + private static Method sExtRemoteDisplayDispose; + + static { + // Check availability of ExtendedRemoteDisplay runtime + try { + sExtRemoteDisplayClass = Class.forName("com.qualcomm.wfd.ExtendedRemoteDisplay"); + } catch (Throwable t) { + Slog.i(TAG, "ExtendedRemoteDisplay: not available"); + } + + if (sExtRemoteDisplayClass != null) { + // If ExtendedRemoteDisplay is available find the methods + Slog.i(TAG, "ExtendedRemoteDisplay: is available, finding methods"); + try { + Class args[] = { String.class, RemoteDisplay.Listener.class, + Handler.class, Context.class }; + sExtRemoteDisplayListen = + sExtRemoteDisplayClass.getDeclaredMethod("listen", args); + } catch (Throwable t) { + Slog.i(TAG, "ExtendedRemoteDisplay.listen: not available"); + } + + try { + Class args[] = {}; + sExtRemoteDisplayDispose = + sExtRemoteDisplayClass.getDeclaredMethod("dispose", args); + } catch (Throwable t) { + Slog.i(TAG, "ExtendedRemoteDisplay.dispose: not available"); + } + } + } + + /** + * Starts listening for displays to be connected on the specified interface. + * + * @param iface The interface address and port in the form "x.x.x.x:y". + * @param listener The listener to invoke when displays are connected or disconnected. + * @param handler The handler on which to invoke the listener. + * @param context The current service context. + * */ + public static Object listen(String iface, RemoteDisplay.Listener listener, + Handler handler, Context context) { + Object extRemoteDisplay = null; + if (DEBUG) Slog.i(TAG, "ExtendedRemoteDisplay.listen"); + + if (sExtRemoteDisplayListen != null && sExtRemoteDisplayDispose != null) { + try { + extRemoteDisplay = sExtRemoteDisplayListen.invoke(null, + iface, listener, handler, context); + } catch (InvocationTargetException e) { + Slog.e(TAG, "ExtendedRemoteDisplay.listen: InvocationTargetException"); + Throwable cause = e.getCause(); + if (cause instanceof RuntimeException) { + throw (RuntimeException) cause; + } else if (cause instanceof Error) { + throw (Error) cause; + } else { + throw new RuntimeException(e); + } + } catch (IllegalAccessException e) { + Slog.e(TAG, "ExtendedRemoteDisplay.listen: IllegalAccessException", e); + } + } + return extRemoteDisplay; + } + + /** + * Disconnects the remote display and stops listening for new connections. + */ + public static void dispose(Object extRemoteDisplay) { + if (DEBUG) Slog.i(TAG, "ExtendedRemoteDisplay.dispose"); + try { + sExtRemoteDisplayDispose.invoke(extRemoteDisplay); + } catch (InvocationTargetException e) { + Slog.e(TAG, "ExtendedRemoteDisplay.dispose: InvocationTargetException"); + Throwable cause = e.getCause(); + if (cause instanceof RuntimeException) { + throw (RuntimeException) cause; + } else if (cause instanceof Error) { + throw (Error) cause; + } else { + throw new RuntimeException(e); + } + } catch (IllegalAccessException e) { + Slog.e(TAG, "ExtendedRemoteDisplay.dispose: IllegalAccessException", e); + } + } + + /** + * Checks if ExtendedRemoteDisplay is available + */ + public static boolean isAvailable() { + return (sExtRemoteDisplayClass != null && sExtRemoteDisplayDispose != null && + sExtRemoteDisplayListen != null); + } +} diff --git a/services/core/java/com/android/server/display/LocalDisplayAdapter.java b/services/core/java/com/android/server/display/LocalDisplayAdapter.java index 2a219289cf10..bb2bf8995d3f 100644 --- a/services/core/java/com/android/server/display/LocalDisplayAdapter.java +++ b/services/core/java/com/android/server/display/LocalDisplayAdapter.java @@ -709,8 +709,8 @@ public DisplayDeviceInfo getDisplayDeviceInfoLocked() { // The display is trusted since it is created by system. mInfo.flags |= DisplayDeviceInfo.FLAG_TRUSTED; - mInfo.brightnessMinimum = PowerManager.BRIGHTNESS_MIN; - mInfo.brightnessMaximum = PowerManager.BRIGHTNESS_MAX; + mInfo.brightnessMinimum = getDisplayDeviceConfig().getBacklightMin(); + mInfo.brightnessMaximum = getDisplayDeviceConfig().getBacklightMax(); mInfo.brightnessDefault = getDisplayDeviceConfig().getBrightnessDefault(); } return mInfo; diff --git a/services/core/java/com/android/server/display/ScreenStateAnimator.java b/services/core/java/com/android/server/display/ScreenStateAnimator.java new file mode 100644 index 000000000000..226c09484369 --- /dev/null +++ b/services/core/java/com/android/server/display/ScreenStateAnimator.java @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2018 The Dirty Unicorns Project + * Copyright (C) 2022 The Potato Open Sauce Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.display; + +import java.io.PrintWriter; + +import android.content.Context; + +/** @hide */ +public interface ScreenStateAnimator { + public static final int MODE_WARM_UP = 0; + public static final int MODE_COOL_DOWN = 1; + public static final int MODE_FADE = 2; + public static final int MODE_SCALE_DOWN = 3; + + public boolean prepare(Context context, int mode); + + public default void dismissResources() {} + + public void dismiss(); + + public boolean draw(float level); + + public void dump(PrintWriter pw); +} diff --git a/services/core/java/com/android/server/display/WifiDisplayController.java b/services/core/java/com/android/server/display/WifiDisplayController.java index a7e1a2876f81..7b1bd0aa79b2 100644 --- a/services/core/java/com/android/server/display/WifiDisplayController.java +++ b/services/core/java/com/android/server/display/WifiDisplayController.java @@ -136,6 +136,10 @@ final class WifiDisplayController implements DumpUtils.Dump { // Number of connection retries remaining. private int mConnectionRetriesLeft; + // The Extended remote display that is listening on the connection. + // Created after the Wifi P2P network is connected. + private Object mExtRemoteDisplay; + // The remote display that is listening on the connection. // Created after the Wifi P2P network is connected. private RemoteDisplay mRemoteDisplay; @@ -367,7 +371,8 @@ private int computeFeatureState() { } private void updateScanState() { - if (mScanRequested && mWfdEnabled && mDesiredDevice == null) { + if (mScanRequested && mWfdEnabled && mDesiredDevice == null && + mConnectedDevice == null && mDisconnectingDevice == null) { if (!mDiscoverPeersInProgress) { Slog.i(TAG, "Starting Wifi display scan."); mDiscoverPeersInProgress = true; @@ -543,6 +548,10 @@ private void connect(final WifiP2pDevice device) { return; } + if (handlePreExistingConnection(device)) { + Slog.i(TAG, "Already handle the preexisting P2P connection status"); + return; + } mDesiredDevice = device; mConnectionRetriesLeft = CONNECT_MAX_RETRIES; updateConnection(); @@ -573,14 +582,21 @@ private void updateConnection() { // Step 1. Before we try to connect to a new device, tell the system we // have disconnected from the old one. - if (mRemoteDisplay != null && mConnectedDevice != mDesiredDevice) { - Slog.i(TAG, "Stopped listening for RTSP connection on " + mRemoteDisplayInterface - + " from Wifi display: " + mConnectedDevice.deviceName); + if ((mRemoteDisplay != null || mExtRemoteDisplay != null) && + mConnectedDevice != mDesiredDevice || + (mRemoteDisplayInterface != null && mConnectedDevice == null)) { + Slog.i(TAG, "Stopped listening for RTSP connection on " + + mRemoteDisplayInterface); + + if (mRemoteDisplay != null) { + mRemoteDisplay.dispose(); + } else if (mExtRemoteDisplay != null) { + ExtendedRemoteDisplayHelper.dispose(mExtRemoteDisplay); + } - mRemoteDisplay.dispose(); + mExtRemoteDisplay = null; mRemoteDisplay = null; mRemoteDisplayInterface = null; - mRemoteDisplayConnected = false; mHandler.removeCallbacks(mRtspTimeout); mWifiP2pManager.setMiracastMode(WifiP2pManager.MIRACAST_DISABLED); @@ -590,7 +606,7 @@ private void updateConnection() { } // Step 2. Before we try to connect to a new device, disconnect from the old one. - if (mDisconnectingDevice != null) { + if (mRemoteDisplayConnected || mDisconnectingDevice != null) { return; // wait for asynchronous callback } if (mConnectedDevice != null && mConnectedDevice != mDesiredDevice) { @@ -674,6 +690,51 @@ private void next() { return; // done } + //Before we connect, we need to set the oldDevice to the desiredDevice to check + //the device on receiving callbacks from the Remote display modules + final WifiP2pDevice oldDevice = mDesiredDevice; + RemoteDisplay.Listener listener = new RemoteDisplay.Listener() { + @Override + public void onDisplayConnected(Surface surface, + int width, int height, int flags, int session) { + if (mConnectedDevice == oldDevice && !mRemoteDisplayConnected) { + Slog.i(TAG, "Opened RTSP connection with Wifi display: " + + mConnectedDevice.deviceName); + mRemoteDisplayConnected = true; + mHandler.removeCallbacks(mRtspTimeout); + + if (mWifiDisplayCertMode) { + mListener.onDisplaySessionInfo( + getSessionInfo(mConnectedDeviceGroupInfo, session)); + } + + final WifiDisplay display = createWifiDisplay(mConnectedDevice); + advertiseDisplay(display, surface, width, height, flags); + } + } + + @Override + public void onDisplayDisconnected() { + if (mConnectedDevice == oldDevice) { + Slog.i(TAG, "Closed RTSP connection with Wifi display: " + + mConnectedDevice.deviceName); + mHandler.removeCallbacks(mRtspTimeout); + mRemoteDisplayConnected = false; + disconnect(); + } + } + + @Override + public void onDisplayError(int error) { + if (mConnectedDevice == oldDevice) { + Slog.i(TAG, "Lost RTSP connection with Wifi display due to error " + + error + ": " + mConnectedDevice.deviceName); + mHandler.removeCallbacks(mRtspTimeout); + handleConnectionFailure(false); + } + } + }; + // Step 5. Try to connect. if (mConnectedDevice == null && mConnectingDevice == null) { Slog.i(TAG, "Connecting to Wifi display: " + mDesiredDevice.deviceName); @@ -699,6 +760,18 @@ private void next() { WifiDisplay display = createWifiDisplay(mConnectingDevice); advertiseDisplay(display, null, 0, 0, 0); + if (ExtendedRemoteDisplayHelper.isAvailable() && mExtRemoteDisplay == null) { + final int port = getPortNumber(mDesiredDevice); + //IP is superfluous for WFD source, and we don't have one at this stage anyway since + //P2P connection hasn't been established yet + final String iface = "255.255.255.255:" + port; + mRemoteDisplayInterface = iface; + Slog.i(TAG, "Listening for RTSP connection on " + iface + + " from Wifi display: " + mDesiredDevice.deviceName); + mExtRemoteDisplay = ExtendedRemoteDisplayHelper.listen(iface, + listener, mHandler, mContext); + } + final WifiP2pDevice newDevice = mDesiredDevice; mWifiP2pManager.connect(mWifiP2pChannel, config, new ActionListener() { @Override @@ -736,54 +809,16 @@ public void onFailure(int reason) { mWifiP2pManager.setMiracastMode(WifiP2pManager.MIRACAST_SOURCE); - final WifiP2pDevice oldDevice = mConnectedDevice; final int port = getPortNumber(mConnectedDevice); final String iface = addr.getHostAddress() + ":" + port; mRemoteDisplayInterface = iface; - Slog.i(TAG, "Listening for RTSP connection on " + iface - + " from Wifi display: " + mConnectedDevice.deviceName); - - mRemoteDisplay = RemoteDisplay.listen(iface, new RemoteDisplay.Listener() { - @Override - public void onDisplayConnected(Surface surface, - int width, int height, int flags, int session) { - if (mConnectedDevice == oldDevice && !mRemoteDisplayConnected) { - Slog.i(TAG, "Opened RTSP connection with Wifi display: " - + mConnectedDevice.deviceName); - mRemoteDisplayConnected = true; - mHandler.removeCallbacks(mRtspTimeout); - - if (mWifiDisplayCertMode) { - mListener.onDisplaySessionInfo( - getSessionInfo(mConnectedDeviceGroupInfo, session)); - } - - final WifiDisplay display = createWifiDisplay(mConnectedDevice); - advertiseDisplay(display, surface, width, height, flags); - } - } - - @Override - public void onDisplayDisconnected() { - if (mConnectedDevice == oldDevice) { - Slog.i(TAG, "Closed RTSP connection with Wifi display: " - + mConnectedDevice.deviceName); - mHandler.removeCallbacks(mRtspTimeout); - disconnect(); - } - } - - @Override - public void onDisplayError(int error) { - if (mConnectedDevice == oldDevice) { - Slog.i(TAG, "Lost RTSP connection with Wifi display due to error " - + error + ": " + mConnectedDevice.deviceName); - mHandler.removeCallbacks(mRtspTimeout); - handleConnectionFailure(false); - } - } - }, mHandler, mContext.getOpPackageName()); + if (!ExtendedRemoteDisplayHelper.isAvailable()) { + Slog.i(TAG, "Listening for RTSP connection on " + iface + + " from Wifi display: " + mConnectedDevice.deviceName); + mRemoteDisplay = RemoteDisplay.listen(iface, listener, + mHandler, mContext.getOpPackageName()); + } // Use extended timeout value for certification, as some tests require user inputs int rtspTimeout = mWifiDisplayCertMode ? @@ -794,7 +829,7 @@ public void onDisplayError(int error) { } private WifiDisplaySessionInfo getSessionInfo(WifiP2pGroup info, int session) { - if (info == null) { + if (info == null || info.getOwner() == null) { return null; } Inet4Address addr = getInterfaceAddress(info); @@ -835,6 +870,10 @@ private void handleConnectionChanged(NetworkInfo networkInfo) { mWifiP2pManager.requestGroupInfo(mWifiP2pChannel, new GroupInfoListener() { @Override public void onGroupInfoAvailable(WifiP2pGroup info) { + if (info == null) { + return; + } + if (DEBUG) { Slog.d(TAG, "Received group info: " + describeWifiP2pGroup(info)); } @@ -854,8 +893,9 @@ public void onGroupInfoAvailable(WifiP2pGroup info) { } if (mWifiDisplayCertMode) { - boolean owner = info.getOwner().deviceAddress - .equals(mThisDevice.deviceAddress); + boolean owner = info.getOwner() != null ? + info.getOwner().deviceAddress.equals( + mThisDevice.deviceAddress) : false; if (owner && info.getClientList().isEmpty()) { // this is the case when we started Autonomous GO, // and no client has connected, save group info @@ -893,6 +933,12 @@ public void onGroupInfoAvailable(WifiP2pGroup info) { disconnect(); } + if (mDesiredDevice != null) { + Slog.i(TAG, "Reconnect new device: " + mDesiredDevice.deviceName); + updateConnection(); + return; + } + // After disconnection for a group, for some reason we have a tendency // to get a peer change notification with an empty list of peers. // Perform a fresh scan. @@ -925,7 +971,8 @@ public void run() { @Override public void run() { if (mConnectedDevice != null - && mRemoteDisplay != null && !mRemoteDisplayConnected) { + && (mRemoteDisplay != null || mExtRemoteDisplay != null) + && !mRemoteDisplayConnected) { Slog.i(TAG, "Timed out waiting for Wifi display RTSP connection after " + RTSP_TIMEOUT_SECONDS + " seconds: " + mConnectedDevice.deviceName); @@ -1009,6 +1056,42 @@ private void readvertiseDisplay(WifiDisplay display) { mAdvertisedDisplayFlags); } + private boolean handlePreExistingConnection(final WifiP2pDevice device) { + if (mNetworkInfo == null || !mNetworkInfo.isConnected() || mWifiDisplayCertMode) { + return false; + } + if (DEBUG) Slog.i(TAG, "Handle the preexisting P2P connection status"); + mWifiP2pManager.requestGroupInfo(mWifiP2pChannel, new GroupInfoListener() { + @Override + public void onGroupInfoAvailable(WifiP2pGroup info) { + if (info == null) { + return; + } + if (contains(info, device)) { + if (DEBUG) Slog.i(TAG, "Already connected to the desired device: " + + device.deviceName); + updateConnection(); + handleConnectionChanged(mNetworkInfo); + } else { + mWifiP2pManager.removeGroup(mWifiP2pChannel, new ActionListener() { + @Override + public void onSuccess() { + Slog.i(TAG, "Disconnect the old device"); + } + + @Override + public void onFailure(int reason) { + Slog.w(TAG, "Failed to disconnect the old device: reason=" + reason); + } + }); + } + } + }); + mDesiredDevice = device; + mConnectionRetriesLeft = CONNECT_MAX_RETRIES; + return true; + } + private static Inet4Address getInterfaceAddress(WifiP2pGroup info) { NetworkInterface iface; try { diff --git a/services/core/java/com/android/server/dreams/DreamManagerService.java b/services/core/java/com/android/server/dreams/DreamManagerService.java index 63c5456c972b..688edf97b59c 100644 --- a/services/core/java/com/android/server/dreams/DreamManagerService.java +++ b/services/core/java/com/android/server/dreams/DreamManagerService.java @@ -221,6 +221,12 @@ private boolean isDreamingInternal() { } } + private boolean isDozingInternal() { + synchronized (mLock) { + return mCurrentDreamIsDozing; + } + } + private void requestDreamInternal() { // Ask the power manager to nap. It will eventually call back into // startDream() if/when it is appropriate to start dreaming. @@ -674,6 +680,18 @@ public boolean isDreaming() { } } + @Override // Binder call + public boolean isDozing() { + checkPermission(android.Manifest.permission.READ_DREAM_STATE); + + final long ident = Binder.clearCallingIdentity(); + try { + return isDozingInternal(); + } finally { + Binder.restoreCallingIdentity(ident); + } + } + @Override // Binder call public void dream() { checkPermission(android.Manifest.permission.WRITE_DREAM_STATE); @@ -801,6 +819,11 @@ public boolean isDreaming() { public ComponentName getActiveDreamComponent(boolean doze) { return getActiveDreamComponentInternal(doze); } + + @Override + public boolean isDozing() { + return isDozingInternal(); + } } private final Runnable mSystemPropertiesChanged = new Runnable() { diff --git a/services/core/java/com/android/server/graphics/fonts/FontManagerService.java b/services/core/java/com/android/server/graphics/fonts/FontManagerService.java index ae9c64b48006..6de28ff4bd25 100644 --- a/services/core/java/com/android/server/graphics/fonts/FontManagerService.java +++ b/services/core/java/com/android/server/graphics/fonts/FontManagerService.java @@ -39,7 +39,6 @@ import com.android.internal.annotations.GuardedBy; import com.android.internal.graphics.fonts.IFontManager; -import com.android.internal.security.VerityUtils; import com.android.internal.util.DumpUtils; import com.android.internal.util.Preconditions; import com.android.server.LocalServices; @@ -47,11 +46,16 @@ import java.io.File; import java.io.FileDescriptor; +import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintWriter; import java.nio.ByteBuffer; import java.nio.DirectByteBuffer; import java.nio.NioUtils; +import java.nio.file.Files; +import java.nio.file.Path; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; import java.util.Collections; import java.util.List; import java.util.Map; @@ -154,20 +158,72 @@ public SharedMemory getSerializedSystemFontMap() { } private static class FsverityUtilImpl implements UpdatableFontDir.FsverityUtil { + private static final String HASH_ALGORITHM = "SHA-512"; + private static final String HASH_FILE_EXT = ".sha512"; + @Override public boolean hasFsverity(String filePath) { - return VerityUtils.hasFsverity(filePath); + // Check for matching hashes instead of relying on fs verity feature. + // If both hash and font file has been tampered with (not corrupt file, + // but malicious modification) then we have way bigger problems. + final File fontFile = new File(filePath); + final File hashFile = new File(filePath + HASH_FILE_EXT); + return fontFile.isFile() && hashFile.isFile() + && checkHash(fontFile.toPath(), hashFile.toPath()); } @Override - public void setUpFsverity(String filePath, byte[] pkcs7Signature) throws IOException { - VerityUtils.setUpFsverity(filePath, pkcs7Signature); + public void setUpFsverity(String filePath) throws IOException { + final File fontFile = new File(filePath); + if (!fontFile.isFile()) return; + + createHashFile(fontFile.toPath(), new File(filePath + HASH_FILE_EXT)); } @Override public boolean rename(File src, File dest) { - // rename system call preserves fs-verity bit. - return src.renameTo(dest); + if (!src.renameTo(dest)) return false; + + final File srcHash = new File(src.getAbsolutePath() + HASH_FILE_EXT); + if (!srcHash.isFile()) return false; + + final File destHash = new File(dest.getAbsolutePath() + HASH_FILE_EXT); + return srcHash.renameTo(destHash); + } + + private static final boolean checkHash(Path filePath, Path hashPath) { + final byte[] fileBytes; + final byte[] hashBytes; + try { + fileBytes = Files.readAllBytes(filePath); + hashBytes = Files.readAllBytes(hashPath); + } catch (IOException e) { + Slog.e(TAG, "IOException while reading to buffer, " + e.getMessage()); + return false; + } + final MessageDigest messageDigest; + try { + messageDigest = MessageDigest.getInstance(HASH_ALGORITHM); + } catch (NoSuchAlgorithmException ignored) { + return false; + } + return messageDigest.isEqual(messageDigest.digest(fileBytes), hashBytes); + } + + private static final void createHashFile(Path filePath, + File hashFile) throws IOException { + final byte[] fileBytes = Files.readAllBytes(filePath); + final MessageDigest messageDigest; + try { + messageDigest = MessageDigest.getInstance(HASH_ALGORITHM); + } catch (NoSuchAlgorithmException ignored) { + return; + } + final byte[] hash = messageDigest.digest(fileBytes); + try (FileOutputStream fos = new FileOutputStream(hashFile)) { + fos.write(hash); + fos.flush(); + } } } @@ -202,8 +258,6 @@ private FontManagerService(Context context, boolean safeMode) { private static UpdatableFontDir createUpdatableFontDir(boolean safeMode) { // Never read updatable font files in safe mode. if (safeMode) return null; - // If apk verity is supported, fs-verity should be available. - if (!VerityUtils.isFsVeritySupported()) return null; return new UpdatableFontDir(new File(FONT_FILES_DIR), new OtfFontFileParser(), new FsverityUtilImpl(), new File(CONFIG_XML_FILE)); } diff --git a/services/core/java/com/android/server/graphics/fonts/UpdatableFontDir.java b/services/core/java/com/android/server/graphics/fonts/UpdatableFontDir.java index 743b4d90dd73..7b9543be52fd 100644 --- a/services/core/java/com/android/server/graphics/fonts/UpdatableFontDir.java +++ b/services/core/java/com/android/server/graphics/fonts/UpdatableFontDir.java @@ -74,7 +74,7 @@ interface FontFileParser { interface FsverityUtil { boolean hasFsverity(String path); - void setUpFsverity(String path, byte[] pkcs7Signature) throws IOException; + void setUpFsverity(String path) throws IOException; boolean rename(File src, File dest); } @@ -189,7 +189,7 @@ public String toString() { continue; } File[] files = dir.listFiles(); - if (files == null || files.length != 1) { + if (files == null || files.length != 2) { Slog.e(TAG, "Unexpected files in dir: " + dir); return; } @@ -247,8 +247,7 @@ public void update(List requests) throws SystemFontException for (FontUpdateRequest request : requests) { switch (request.getType()) { case FontUpdateRequest.TYPE_UPDATE_FONT_FILE: - installFontFile( - request.getFd().getFileDescriptor(), request.getSignature()); + installFontFile(request.getFd().getFileDescriptor()); break; case FontUpdateRequest.TYPE_UPDATE_FONT_FAMILY: FontUpdateRequest.Family family = request.getFontFamily(); @@ -295,11 +294,9 @@ public void update(List requests) throws SystemFontException * because existing Zygote-forked processes have paths to old font files. * * @param fd A file descriptor to the font file. - * @param pkcs7Signature A PKCS#7 detached signature to enable fs-verity for the font file. * @throws SystemFontException if error occurs. */ - private void installFontFile(FileDescriptor fd, byte[] pkcs7Signature) - throws SystemFontException { + private void installFontFile(FileDescriptor fd) throws SystemFontException { File newDir = getRandomDir(mFilesDir); if (!newDir.mkdir()) { throw new SystemFontException( @@ -327,8 +324,7 @@ private void installFontFile(FileDescriptor fd, byte[] pkcs7Signature) try { // Do not parse font file before setting up fs-verity. // setUpFsverity throws IOException if failed. - mFsverityUtil.setUpFsverity(tempNewFontFile.getAbsolutePath(), - pkcs7Signature); + mFsverityUtil.setUpFsverity(tempNewFontFile.getAbsolutePath()); } catch (IOException e) { throw new SystemFontException( FontManager.RESULT_ERROR_VERIFICATION_FAILURE, diff --git a/services/core/java/com/android/server/locksettings/LockSettingsService.java b/services/core/java/com/android/server/locksettings/LockSettingsService.java index 78cffa6f4f79..1ce15822b910 100644 --- a/services/core/java/com/android/server/locksettings/LockSettingsService.java +++ b/services/core/java/com/android/server/locksettings/LockSettingsService.java @@ -138,6 +138,7 @@ import com.android.internal.widget.LockscreenCredential; import com.android.internal.widget.RebootEscrowListener; import com.android.internal.widget.VerifyCredentialResponse; +import com.android.server.app.AppLockManagerServiceInternal; import com.android.server.LocalServices; import com.android.server.ServiceThread; import com.android.server.SystemService; @@ -2469,6 +2470,7 @@ private void notifyPasswordChanged(LockscreenCredential newCredential, @UserIdIn PasswordMetrics.computeForCredential(newCredential), userId); LocalServices.getService(WindowManagerInternal.class).reportPasswordChanged(userId); + LocalServices.getService(AppLockManagerServiceInternal.class).reportPasswordChanged(userId); }); } diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java index 1ea949ede03d..8451a5807a9d 100644 --- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java +++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java @@ -123,6 +123,7 @@ import static android.telephony.CarrierConfigManager.KEY_DATA_WARNING_NOTIFICATION_BOOL; import static android.telephony.SubscriptionManager.INVALID_SUBSCRIPTION_ID; +import static com.android.internal.annotations.VisibleForTesting.Visibility.PRIVATE; import static com.android.internal.util.ArrayUtils.appendInt; import static com.android.internal.util.XmlUtils.readBooleanAttribute; import static com.android.internal.util.XmlUtils.readIntAttribute; @@ -1954,7 +1955,7 @@ public void onReceive(Context context, Intent intent) { ensureActiveCarrierPolicyAL(subId, subscriberId); maybeUpdateCarrierPolicyCycleAL(subId, subscriberId); } else { - Slog.wtf(TAG, "Missing subscriberId for subId " + subId); + Slog.w(TAG, "Missing subscriberId for subId " + subId); } // update network and notification rules, as the data cycle changed and it's @@ -2105,7 +2106,7 @@ void updateSubscriptions() { if (!TextUtils.isEmpty(subscriberId)) { subIdToSubscriberId.put(tmSub.getSubscriptionId(), subscriberId); } else { - Slog.wtf(TAG, "Missing subscriberId for subId " + tmSub.getSubscriptionId()); + Slog.w(TAG, "Missing subscriberId for subId " + tmSub.getSubscriptionId()); } final String[] mergedSubscriberId = ArrayUtils.defeatNullable( @@ -3148,7 +3149,8 @@ private void normalizePoliciesNL(NetworkPolicy[] policies) { * active merge set [A,B], we'd return a new template that primarily matches * A, but also matches B. */ - private static NetworkTemplate normalizeTemplate(@NonNull NetworkTemplate template, + @VisibleForTesting(visibility = PRIVATE) + static NetworkTemplate normalizeTemplate(@NonNull NetworkTemplate template, @NonNull List mergedList) { // Now there are several types of network which uses Subscriber Id to store network // information. For instance: @@ -3158,6 +3160,12 @@ private static NetworkTemplate normalizeTemplate(@NonNull NetworkTemplate templa if (template.getSubscriberIds().isEmpty()) return template; for (final String[] merged : mergedList) { + // In some rare cases (e.g. b/243015487), merged subscriberId list might contain + // duplicated items. Deduplication for better error handling. + final ArraySet mergedSet = new ArraySet(merged); + if (mergedSet.size() != merged.length) { + Log.wtf(TAG, "Duplicated merged list detected: " + Arrays.toString(merged)); + } // TODO: Handle incompatible subscriberIds if that happens in practice. for (final String subscriberId : template.getSubscriberIds()) { if (com.android.net.module.util.CollectionUtils.contains(merged, subscriberId)) { @@ -3165,7 +3173,7 @@ private static NetworkTemplate normalizeTemplate(@NonNull NetworkTemplate templa // a template that matches all merged subscribers. return new NetworkTemplate.Builder(template.getMatchRule()) .setWifiNetworkKeys(template.getWifiNetworkKeys()) - .setSubscriberIds(Set.of(merged)) + .setSubscriberIds(mergedSet) .setMeteredness(template.getMeteredness()) .build(); } diff --git a/services/core/java/com/android/server/notification/BubbleExtractor.java b/services/core/java/com/android/server/notification/BubbleExtractor.java index a561390ac7e4..9a75bff9de54 100644 --- a/services/core/java/com/android/server/notification/BubbleExtractor.java +++ b/services/core/java/com/android/server/notification/BubbleExtractor.java @@ -90,7 +90,8 @@ public RankingReconsideration process(NotificationRecord record) { NotificationChannel recordChannel = record.getChannel(); if (!userEnabledBubbles || appPreference == BUBBLE_PREFERENCE_NONE - || !notifCanPresentAsBubble) { + || !notifCanPresentAsBubble + || record.getSbn().getIsContentSecure()) { record.setAllowBubble(false); if (!notifCanPresentAsBubble) { // clear out bubble metadata since it can't be used @@ -144,10 +145,9 @@ public void setActivityManager(ActivityManager manager) { */ @VisibleForTesting boolean canPresentAsBubble(NotificationRecord r) { - if (!mSupportsBubble) { + if (!mSupportsBubble || r.isBubbleUpSuppressedByAppLock()) { return false; } - Notification notification = r.getNotification(); Notification.BubbleMetadata metadata = notification.getBubbleMetadata(); String pkg = r.getSbn().getPackageName(); diff --git a/services/core/java/com/android/server/notification/NotificationManagerInternal.java b/services/core/java/com/android/server/notification/NotificationManagerInternal.java index 8a627367c1dc..b8c5f1914e48 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerInternal.java +++ b/services/core/java/com/android/server/notification/NotificationManagerInternal.java @@ -45,4 +45,7 @@ void cancelNotification(String pkg, String basePkg, int callingUid, int callingP /** Send a notification to the user prompting them to review their notification permissions. */ void sendReviewPermissionsNotification(); + + void updateSecureNotifications(String pkg, boolean isContentSecure, + boolean isBubbleUpSuppressed, int userId); } diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index d1e0b0474b61..79f65467c99e 100755 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -36,6 +36,7 @@ import static android.app.NotificationManager.ACTION_NOTIFICATION_LISTENER_ENABLED_CHANGED; import static android.app.NotificationManager.ACTION_NOTIFICATION_POLICY_ACCESS_GRANTED_CHANGED; import static android.app.NotificationManager.BUBBLE_PREFERENCE_ALL; +import static android.app.NotificationManager.BUBBLE_PREFERENCE_NONE; import static android.app.NotificationManager.EXTRA_AUTOMATIC_ZEN_RULE_ID; import static android.app.NotificationManager.EXTRA_AUTOMATIC_ZEN_RULE_STATUS; import static android.app.NotificationManager.IMPORTANCE_DEFAULT; @@ -295,6 +296,7 @@ import com.android.server.LocalServices; import com.android.server.SystemService; import com.android.server.UiThread; +import com.android.server.app.AppLockManagerServiceInternal; import com.android.server.lights.LightsManager; import com.android.server.lights.LogicalLight; import com.android.server.notification.ManagedServices.ManagedServiceInfo; @@ -568,6 +570,8 @@ public class NotificationManagerService extends SystemService { protected boolean mInCallStateOffHook = false; boolean mNotificationPulseEnabled; + private boolean mSoundVibScreenOn; + private Uri mInCallNotificationUri; private AudioAttributes mInCallNotificationAudioAttributes; private float mInCallNotificationVolume; @@ -672,6 +676,8 @@ public class NotificationManagerService extends SystemService { // Broadcast intent receiver for notification permissions review-related intents private ReviewNotificationPermissionsReceiver mReviewNotificationPermissionsReceiver; + private AppLockManagerServiceInternal mAppLockManagerService = null; + static class Archive { final SparseArray mEnabled; final int mBufferSize; @@ -1862,6 +1868,8 @@ private final class SettingsObserver extends ContentObserver { Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS); private final Uri LOCK_SCREEN_SHOW_NOTIFICATIONS = Settings.Secure.getUriFor(Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS); + private final Uri NOTIFICATION_SOUND_VIB_SCREEN_ON + = Settings.System.getUriFor(Settings.System.NOTIFICATION_SOUND_VIB_SCREEN_ON); SettingsObserver(Handler handler) { super(handler); @@ -1886,6 +1894,8 @@ void observe() { false, this, UserHandle.USER_ALL); resolver.registerContentObserver(LOCK_SCREEN_SHOW_NOTIFICATIONS, false, this, UserHandle.USER_ALL); + resolver.registerContentObserver(NOTIFICATION_SOUND_VIB_SCREEN_ON, + false, this, UserHandle.USER_ALL); update(null); } @@ -1897,7 +1907,7 @@ public void update(Uri uri) { ContentResolver resolver = getContext().getContentResolver(); if (uri == null || NOTIFICATION_LIGHT_PULSE_URI.equals(uri)) { boolean pulseEnabled = Settings.System.getIntForUser(resolver, - Settings.System.NOTIFICATION_LIGHT_PULSE, 0, UserHandle.USER_CURRENT) + Settings.System.NOTIFICATION_LIGHT_PULSE, 1, UserHandle.USER_CURRENT) != 0; if (mNotificationPulseEnabled != pulseEnabled) { mNotificationPulseEnabled = pulseEnabled; @@ -1933,6 +1943,11 @@ public void update(Uri uri) { if (uri == null || LOCK_SCREEN_SHOW_NOTIFICATIONS.equals(uri)) { mPreferencesHelper.updateLockScreenShowNotifications(); } + if (uri == null || NOTIFICATION_SOUND_VIB_SCREEN_ON.equals(uri)) { + mSoundVibScreenOn = Settings.System.getIntForUser(resolver, + Settings.System.NOTIFICATION_SOUND_VIB_SCREEN_ON, 1, + UserHandle.USER_CURRENT) == 1; + } } } @@ -2728,6 +2743,7 @@ void onBootPhase(int phase, Looper mainLooper) { maybeShowInitialReviewPermissionsNotification(); } else if (phase == SystemService.PHASE_ACTIVITY_MANAGER_READY) { mSnoozeHelper.scheduleRepostsForPersistedNotifications(System.currentTimeMillis()); + mAppLockManagerService = LocalServices.getService(AppLockManagerServiceInternal.class); } } @@ -3562,8 +3578,8 @@ public boolean areBubblesEnabled(UserHandle user) { public int getBubblePreferenceForPackage(String pkg, int uid) { enforceSystemOrSystemUIOrSamePackage(pkg, "Caller not system or systemui or same package"); - - if (UserHandle.getCallingUserId() != UserHandle.getUserId(uid)) { + final int userId = UserHandle.getUserId(uid); + if (UserHandle.getCallingUserId() != userId) { getContext().enforceCallingPermission( android.Manifest.permission.INTERACT_ACROSS_USERS, "getBubblePreferenceForPackage for uid " + uid); @@ -4342,7 +4358,8 @@ private StatusBarNotification sanitizeSbn(String pkg, int userId, sbn.getOpPkg(), sbn.getId(), sbn.getTag(), sbn.getUid(), sbn.getInitialPid(), notification, - sbn.getUser(), sbn.getOverrideGroupKey(), sbn.getPostTime()); + sbn.getUser(), sbn.getOverrideGroupKey(), + sbn.getPostTime(), sbn.getIsContentSecure()); } } return null; @@ -5728,6 +5745,16 @@ public long pullStats(long startNs, int report, boolean doAgg, Slog.e(TAG, "exiting pullStats: bad request"); return 0; } + + @Override + public void forceShowLedLight(int color) { + forceShowLed(color); + } + + @Override + public void forcePulseLedLight(int color, int onTime, int offTime) { + forcePulseLed(color, onTime, offTime); + } }; protected void checkNotificationListenerAccess() { @@ -5910,6 +5937,8 @@ NotificationRecord createAutoGroupSummary(int userId, String pkg, String trigger 0, appIntent, PendingIntent.FLAG_IMMUTABLE, null, pkg, appInfo.uid); } + final boolean isContentSecure = mAppLockManagerService != null && + mAppLockManagerService.shouldRedactNotification(pkg, userId); final StatusBarNotification summarySbn = new StatusBarNotification(adjustedSbn.getPackageName(), adjustedSbn.getOpPkg(), @@ -5917,13 +5946,16 @@ NotificationRecord createAutoGroupSummary(int userId, String pkg, String trigger GroupHelper.AUTOGROUP_KEY, adjustedSbn.getUid(), adjustedSbn.getInitialPid(), summaryNotification, adjustedSbn.getUser(), GroupHelper.AUTOGROUP_KEY, - System.currentTimeMillis()); + System.currentTimeMillis(), isContentSecure); summaryRecord = new NotificationRecord(getContext(), summarySbn, notificationRecord.getChannel()); summaryRecord.setImportanceFixed(isPermissionFixed); summaryRecord.setIsAppImportanceLocked( notificationRecord.getIsAppImportanceLocked()); summaries.put(pkg, summarySbn.getKey()); + summaryRecord.setBubbleUpSuppressedByAppLock( + mAppLockManagerService != null && + mAppLockManagerService.requireUnlock(pkg, userId)); } if (summaryRecord != null && checkDisqualifyingFeatures(userId, uid, summaryRecord.getSbn().getId(), summaryRecord.getSbn().getTag(), summaryRecord, @@ -6275,21 +6307,40 @@ public void removeForegroundServiceFlagFromNotification(String pkg, int notifica checkCallerIsSystem(); mHandler.post(() -> { synchronized (mNotificationLock) { - // strip flag from all enqueued notifications. listeners will be informed - // in post runnable. - List enqueued = findNotificationsByListLocked( - mEnqueuedNotifications, pkg, null, notificationId, userId); - for (int i = 0; i < enqueued.size(); i++) { - removeForegroundServiceFlagLocked(enqueued.get(i)); - } + int count = getNotificationCount(pkg, userId); + boolean removeFgsNotification = false; + if (count > MAX_PACKAGE_NOTIFICATIONS) { + mUsageStats.registerOverCountQuota(pkg); + removeFgsNotification = true; + } + if (removeFgsNotification) { + NotificationRecord r = findNotificationLocked(pkg, null, notificationId, + userId); + if (r != null) { + if (DBG) { + Slog.d(TAG, "Remove FGS flag not allow. Cancel FGS notification"); + } + removeFromNotificationListsLocked(r); + cancelNotificationLocked(r, false, REASON_APP_CANCEL, true, + null, SystemClock.elapsedRealtime()); + } + } else { + // strip flag from all enqueued notifications. listeners will be informed + // in post runnable. + List enqueued = findNotificationsByListLocked( + mEnqueuedNotifications, pkg, null, notificationId, userId); + for (int i = 0; i < enqueued.size(); i++) { + removeForegroundServiceFlagLocked(enqueued.get(i)); + } - // if posted notification exists, strip its flag and tell listeners - NotificationRecord r = findNotificationByListLocked( - mNotificationList, pkg, null, notificationId, userId); - if (r != null) { - removeForegroundServiceFlagLocked(r); - mRankingHelper.sort(mNotificationList); - mListeners.notifyPostedLocked(r, r); + // if posted notification exists, strip its flag and tell listeners + NotificationRecord r = findNotificationByListLocked( + mNotificationList, pkg, null, notificationId, userId); + if (r != null) { + removeForegroundServiceFlagLocked(r); + mRankingHelper.sort(mNotificationList); + mListeners.notifyPostedLocked(r, r); + } } } }); @@ -6344,6 +6395,33 @@ public void sendReviewPermissionsNotification() { Settings.Global.REVIEW_PERMISSIONS_NOTIFICATION_STATE, NotificationManagerService.REVIEW_NOTIF_STATE_RESHOWN); } + + @Override + public void updateSecureNotifications(String pkg, boolean isContentSecure, + boolean isBubbleUpSuppressed, int userId) { + mHandler.post(() -> updateSecureNotificationsInternal(pkg, isContentSecure, + isBubbleUpSuppressed, userId)); + } + + private void updateSecureNotificationsInternal(String pkg, boolean isContentSecure, + boolean isBubbleUpSuppressed, int userId) { + synchronized (mNotificationLock) { + for (int i = 0; i < mNotificationList.size(); i++) { + final NotificationRecord nr = mNotificationList.get(i); + final StatusBarNotification sbn = nr.getSbn(); + if (UserHandle.getUserId(sbn.getUid()) == userId + && sbn.getPackageName().equals(pkg)) { + if (sbn.getIsContentSecure() != isContentSecure || + nr.isBubbleUpSuppressedByAppLock() != isBubbleUpSuppressed) { + sbn.setIsContentSecure(isContentSecure); + nr.setBubbleUpSuppressedByAppLock(isBubbleUpSuppressed); + mListeners.notifyPostedLocked(nr, nr); + } + } + } + } + mRankingHandler.requestSort(); + } }; int getNumNotificationChannelsForPackage(String pkg, int uid, boolean includeDeleted) { @@ -6459,9 +6537,11 @@ void enqueueNotificationInternal(final String pkg, final String opPkg, final int mUsageStats.registerEnqueuedByApp(pkg); + final boolean isContentSecure = mAppLockManagerService != null && + mAppLockManagerService.shouldRedactNotification(pkg, userId); final StatusBarNotification n = new StatusBarNotification( pkg, opPkg, id, tag, notificationUid, callingPid, notification, - user, null, System.currentTimeMillis()); + user, null, System.currentTimeMillis(), isContentSecure); // setup local book-keeping String channelId = notification.getChannelId(); @@ -6502,6 +6582,8 @@ void enqueueNotificationInternal(final String pkg, final String opPkg, final int r.setPostSilently(postSilently); r.setFlagBubbleRemoved(false); r.setPkgAllowedAsConvo(mMsgPkgsAllowedAsConvos.contains(pkg)); + r.setBubbleUpSuppressedByAppLock(mAppLockManagerService != null && + mAppLockManagerService.requireUnlock(pkg, userId)); boolean isImportanceFixed = mPermissionHelper.isPermissionFixed(pkg, userId); r.setImportanceFixed(isImportanceFixed); @@ -6967,6 +7049,29 @@ private boolean areNotificationsEnabledForPackageInt(String pkg, int uid) { return mPermissionHelper.hasPermission(uid); } + private int getNotificationCount(String pkg, int userId) { + int count = 0; + synchronized (mNotificationLock) { + final int numListSize = mNotificationList.size(); + for (int i = 0; i < numListSize; i++) { + final NotificationRecord existing = mNotificationList.get(i); + if (existing.getSbn().getPackageName().equals(pkg) + && existing.getSbn().getUserId() == userId) { + count++; + } + } + final int numEnqSize = mEnqueuedNotifications.size(); + for (int i = 0; i < numEnqSize; i++) { + final NotificationRecord existing = mEnqueuedNotifications.get(i); + if (existing.getSbn().getPackageName().equals(pkg) + && existing.getSbn().getUserId() == userId) { + count++; + } + } + } + return count; + } + protected int getNotificationCount(String pkg, int userId, int excludedId, String excludedTag) { int count = 0; @@ -7030,6 +7135,7 @@ public void run() { @GuardedBy("mNotificationLock") void snoozeLocked(NotificationRecord r) { + final List recordsToSnooze = new ArrayList<>(); if (r.getSbn().isGroup()) { final List groupNotifications = findCurrentAndSnoozedGroupNotificationsLocked( @@ -7038,8 +7144,8 @@ void snoozeLocked(NotificationRecord r) { if (r.getNotification().isGroupSummary()) { // snooze all children for (int i = 0; i < groupNotifications.size(); i++) { - if (mKey != groupNotifications.get(i).getKey()) { - snoozeNotificationLocked(groupNotifications.get(i)); + if (!mKey.equals(groupNotifications.get(i).getKey())) { + recordsToSnooze.add(groupNotifications.get(i)); } } } else { @@ -7049,8 +7155,8 @@ void snoozeLocked(NotificationRecord r) { if (groupNotifications.size() == 2) { // snooze summary and the one child for (int i = 0; i < groupNotifications.size(); i++) { - if (mKey != groupNotifications.get(i).getKey()) { - snoozeNotificationLocked(groupNotifications.get(i)); + if (!mKey.equals(groupNotifications.get(i).getKey())) { + recordsToSnooze.add(groupNotifications.get(i)); } } } @@ -7058,7 +7164,15 @@ void snoozeLocked(NotificationRecord r) { } } // snooze the notification - snoozeNotificationLocked(r); + recordsToSnooze.add(r); + + if (mSnoozeHelper.canSnooze(recordsToSnooze.size())) { + for (int i = 0; i < recordsToSnooze.size(); i++) { + snoozeNotificationLocked(recordsToSnooze.get(i)); + } + } else { + Log.w(TAG, "Cannot snooze " + r.getKey() + ": too many snoozed notifications"); + } } @@ -7805,7 +7919,8 @@ int buzzBeepBlinkLocked(NotificationRecord record) { } if (aboveThreshold && isNotificationForCurrentUser(record)) { - if (mSystemReady && mAudioManager != null) { + boolean skipSound = mScreenOn && !mSoundVibScreenOn; + if (mSystemReady && mAudioManager != null && !skipSound) { Uri soundUri = record.getSound(); hasValidSound = soundUri != null && !Uri.EMPTY.equals(soundUri); VibrationEffect vibration = record.getVibration(); @@ -7888,7 +8003,7 @@ int buzzBeepBlinkLocked(NotificationRecord record) { final int buzzBeepBlink = (buzz ? 1 : 0) | (beep ? 2 : 0) | (blink ? 4 : 0); if (buzzBeepBlink > 0) { // Ignore summary updates because we don't display most of the information. - if (record.getSbn().isGroup() && record.getSbn().getNotification().isGroupSummary()) { + if (!blink && record.getSbn().isGroup() && record.getSbn().getNotification().isGroupSummary()) { if (DEBUG_INTERRUPTIVENESS) { Slog.v(TAG, "INTERRUPTIVENESS: " + record.getKey() + " is not interruptive: summary"); @@ -7938,7 +8053,7 @@ boolean canShowLightsLocked(final NotificationRecord record, boolean aboveThresh return false; } // Suppressed because it's a silent update - final Notification notification = record.getNotification(); +/* final Notification notification = record.getNotification(); if (record.isUpdate && (notification.flags & FLAG_ONLY_ALERT_ONCE) != 0) { return false; } @@ -7950,6 +8065,7 @@ boolean canShowLightsLocked(final NotificationRecord record, boolean aboveThresh if (isInCall()) { return false; } +*/ // check current user if (!isNotificationForCurrentUser(record)) { return false; @@ -7958,6 +8074,24 @@ boolean canShowLightsLocked(final NotificationRecord record, boolean aboveThresh return true; } + private void forceShowLed(int color) { + if (color != -1) { + mNotificationLight.turnOff(); + mNotificationLight.setColor(color); + } else { + mNotificationLight.turnOff(); + } + } + + private void forcePulseLed(int color, int onTime, int offTime) { + if (color != -1) { + mNotificationLight.turnOff(); + mNotificationLight.setFlashing(color, LogicalLight.LIGHT_FLASH_TIMED, onTime, offTime); + } else { + mNotificationLight.turnOff(); + } + } + @GuardedBy("mNotificationLock") boolean isInsistentUpdate(final NotificationRecord record) { return (Objects.equals(record.getKey(), mSoundNotificationKey) @@ -8470,13 +8604,15 @@ static class NotificationRecordExtractorData { float mRankingScore; boolean mIsConversation; + boolean mIsBubbleUpSuppressedByAppLock; + NotificationRecordExtractorData(int position, int visibility, boolean showBadge, boolean allowBubble, boolean isBubble, NotificationChannel channel, String groupKey, ArrayList overridePeople, ArrayList snoozeCriteria, Integer userSentiment, Integer suppressVisually, ArrayList systemSmartActions, ArrayList smartReplies, int importance, float rankingScore, - boolean isConversation) { + boolean isConversation, boolean isBubbleUpSuppressedByAppLock) { mPosition = position; mVisibility = visibility; mShowBadge = showBadge; @@ -8493,6 +8629,7 @@ static class NotificationRecordExtractorData { mImportance = importance; mRankingScore = rankingScore; mIsConversation = isConversation; + mIsBubbleUpSuppressedByAppLock = isBubbleUpSuppressedByAppLock; } // Returns whether the provided NotificationRecord differs from the cached data in any way. @@ -8511,7 +8648,8 @@ boolean hasDiffForRankingLocked(NotificationRecord r, int newPosition) { || !Objects.equals(mSuppressVisually, r.getSuppressedVisualEffects()) || !Objects.equals(mSystemSmartActions, r.getSystemGeneratedSmartActions()) || !Objects.equals(mSmartReplies, r.getSmartReplies()) - || mImportance != r.getImportance(); + || mImportance != r.getImportance() + || mIsBubbleUpSuppressedByAppLock != r.isBubbleUpSuppressedByAppLock(); } // Returns whether the NotificationRecord has a change from this data for which we should @@ -8562,7 +8700,8 @@ void handleRankingSort() { r.getSmartReplies(), r.getImportance(), r.getRankingScore(), - r.isConversation()); + r.isConversation(), + r.isBubbleUpSuppressedByAppLock()); extractorDataBefore.put(r.getKey(), extractorData); mRankingHelper.extractSignals(r); } diff --git a/services/core/java/com/android/server/notification/NotificationRecord.java b/services/core/java/com/android/server/notification/NotificationRecord.java index cbaf485c077f..937f56f598f8 100644 --- a/services/core/java/com/android/server/notification/NotificationRecord.java +++ b/services/core/java/com/android/server/notification/NotificationRecord.java @@ -211,6 +211,8 @@ public final class NotificationRecord { // are sorted. private boolean mPendingLogUpdate = false; + private boolean mIsBubbleUpSuppressedByAppLock = false; + public NotificationRecord(Context context, StatusBarNotification sbn, NotificationChannel channel) { this.sbn = sbn; @@ -276,21 +278,30 @@ private Light calculateLights() { com.android.internal.R.integer.config_defaultNotificationLedOn); int defaultLightOff = mContext.getResources().getInteger( com.android.internal.R.integer.config_defaultNotificationLedOff); - - int channelLightColor = getChannel().getLightColor() != 0 ? getChannel().getLightColor() + int userSetLightColor = getChannel().getLightColor(); + int userSetLightOnTime = getChannel().getLightOnTime(); + int userSetLightOffTime = getChannel().getLightOffTime(); + int channelLightColor = userSetLightColor != 0 ? userSetLightColor : defaultLightColor; + int channelLightOnTime = userSetLightOnTime != 0 ? userSetLightOnTime + : defaultLightOn; + int channelLightOffTime = userSetLightOffTime != 0 ? userSetLightOffTime + : defaultLightOff; Light light = getChannel().shouldShowLights() ? new Light(channelLightColor, - defaultLightOn, defaultLightOff) : null; + channelLightOnTime, channelLightOffTime) : null; + if (mPreChannelsNotification && (getChannel().getUserLockedFields() & NotificationChannel.USER_LOCKED_LIGHTS) == 0) { final Notification notification = getSbn().getNotification(); if ((notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0) { - light = new Light(notification.ledARGB, notification.ledOnMS, - notification.ledOffMS); + light = new Light(userSetLightColor != 0 ? userSetLightColor : notification.ledARGB, + userSetLightOnTime != 0 ? userSetLightOnTime : notification.ledOnMS, + userSetLightOffTime != 0 ? userSetLightOffTime : notification.ledOffMS); if ((notification.defaults & Notification.DEFAULT_LIGHTS) != 0) { - light = new Light(defaultLightColor, defaultLightOn, - defaultLightOff); + light = new Light(userSetLightColor != 0 ? userSetLightColor : defaultLightColor, + userSetLightOnTime != 0 ? userSetLightOnTime : defaultLightOn, + userSetLightOffTime != 0 ? userSetLightOffTime : defaultLightOff); } } else { light = null; @@ -1582,6 +1593,14 @@ public ArraySet getPhoneNumbers() { return mPhoneNumbers; } + public void setBubbleUpSuppressedByAppLock(boolean suppressed) { + mIsBubbleUpSuppressedByAppLock = suppressed; + } + + public boolean isBubbleUpSuppressedByAppLock() { + return mIsBubbleUpSuppressedByAppLock; + } + @VisibleForTesting static final class Light { public final int color; diff --git a/services/core/java/com/android/server/notification/SnoozeHelper.java b/services/core/java/com/android/server/notification/SnoozeHelper.java index 7f265df3f416..15d7c1e7a210 100644 --- a/services/core/java/com/android/server/notification/SnoozeHelper.java +++ b/services/core/java/com/android/server/notification/SnoozeHelper.java @@ -62,6 +62,8 @@ public class SnoozeHelper { public static final int XML_SNOOZED_NOTIFICATION_VERSION = 1; + static final int CONCURRENT_SNOOZE_LIMIT = 500; + protected static final String XML_TAG_NAME = "snoozed-notifications"; private static final String XML_SNOOZED_NOTIFICATION = "notification"; @@ -135,6 +137,15 @@ void cleanupPersistedContext(String key){ } } + protected boolean canSnooze(int numberToSnooze) { + synchronized (mLock) { + if ((mPackages.size() + numberToSnooze) > CONCURRENT_SNOOZE_LIMIT) { + return false; + } + } + return true; + } + @NonNull protected Long getSnoozeTimeForUnpostedNotification(int userId, String pkg, String key) { Long time = null; diff --git a/services/core/java/com/android/server/notification/ZenModeHelper.java b/services/core/java/com/android/server/notification/ZenModeHelper.java index 9e0c97502c4f..2b00ad7c5cd7 100644 --- a/services/core/java/com/android/server/notification/ZenModeHelper.java +++ b/services/core/java/com/android/server/notification/ZenModeHelper.java @@ -330,7 +330,8 @@ public String addAutomaticZenRule(String pkg, AutomaticZenRule automaticZenRule, int newRuleInstanceCount = getCurrentInstanceCount(automaticZenRule.getOwner()) + getCurrentInstanceCount(automaticZenRule.getConfigurationActivity()) + 1; - if (newRuleInstanceCount > RULE_LIMIT_PER_PACKAGE + int newPackageRuleCount = getPackageRuleCount(pkg) + 1; + if (newPackageRuleCount > RULE_LIMIT_PER_PACKAGE || (ruleInstanceLimit > 0 && ruleInstanceLimit < newRuleInstanceCount)) { throw new IllegalArgumentException("Rule instance limit exceeded"); } @@ -511,6 +512,23 @@ public int getCurrentInstanceCount(ComponentName cn) { return count; } + // Equivalent method to getCurrentInstanceCount, but for all rules associated with a specific + // package rather than a condition provider service or activity. + private int getPackageRuleCount(String pkg) { + if (pkg == null) { + return 0; + } + int count = 0; + synchronized (mConfig) { + for (ZenRule rule : mConfig.automaticRules.values()) { + if (pkg.equals(rule.getPkg())) { + count++; + } + } + } + return count; + } + public boolean canManageAutomaticZenRule(ZenRule rule) { final int callingUid = Binder.getCallingUid(); if (callingUid == 0 || callingUid == Process.SYSTEM_UID) { diff --git a/services/core/java/com/android/server/pm/AppsFilterBase.java b/services/core/java/com/android/server/pm/AppsFilterBase.java index 7ca1978b2031..5de7674a7422 100644 --- a/services/core/java/com/android/server/pm/AppsFilterBase.java +++ b/services/core/java/com/android/server/pm/AppsFilterBase.java @@ -323,7 +323,8 @@ public boolean shouldFilterApplication(PackageDataSnapshot snapshot, int calling return false; } else if (Process.isSdkSandboxUid(callingAppId)) { // we only allow sdk sandbox processes access to forcequeryable packages - return !isForceQueryable(targetPkgSetting.getAppId()); + return !isForceQueryable(targetPkgSetting.getAppId()) + && !isImplicitlyQueryable(callingAppId, targetPkgSetting.getAppId()); } if (mCacheReady) { // use cache if (!shouldFilterApplicationUsingCache(callingUid, diff --git a/services/core/java/com/android/server/pm/InstallPackageHelper.java b/services/core/java/com/android/server/pm/InstallPackageHelper.java index e90a5db39d71..7da5f51bcbc2 100644 --- a/services/core/java/com/android/server/pm/InstallPackageHelper.java +++ b/services/core/java/com/android/server/pm/InstallPackageHelper.java @@ -3701,8 +3701,9 @@ private ScanRequest prepareInitialScanRequest(@NonNull ParsedPackage parsedPacka parsedPackage.getPackageName()); boolean ignoreSharedUserId = false; - if (installedPkgSetting == null) { - // We can directly ignore sharedUserSetting for new installs + if (installedPkgSetting == null || !installedPkgSetting.hasSharedUser()) { + // Directly ignore sharedUserSetting for new installs, or if the app has + // already left shared UID ignoreSharedUserId = parsedPackage.isLeavingSharedUid(); } diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index 94e8ec5c434d..c8a4245f77e8 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -858,6 +858,9 @@ public void enablePackageCaches() { private final PackageProperty mPackageProperty = new PackageProperty(); + // Build-time disabled components + ArrayList mDisabledComponentsList; + final PendingPackageBroadcasts mPendingBroadcasts; static final int SEND_PENDING_BROADCAST = 1; @@ -1491,8 +1494,8 @@ context, lock, installer, installLock, new PackageAbiHelperImpl(), } PackageManagerService m = new PackageManagerService(injector, onlyCore, factoryTest, - PackagePartitions.FINGERPRINT, Build.IS_ENG, Build.IS_USERDEBUG, - Build.VERSION.SDK_INT, Build.VERSION.INCREMENTAL); + String.valueOf(Build.TIME), Build.IS_ENG, Build.IS_USERDEBUG, Build.VERSION.SDK_INT, + Build.VERSION.INCREMENTAL); t.traceEnd(); // "create package manager" final CompatChange.ChangeListener selinuxChangeListener = packageName -> { @@ -1954,8 +1957,8 @@ public boolean hasFeature(String feature) { mIsUpgrade = !buildFingerprint.equals(ver.fingerprint); if (mIsUpgrade) { - PackageManagerServiceUtils.logCriticalInfo(Log.INFO, "Upgrading from " - + ver.fingerprint + " to " + PackagePartitions.FINGERPRINT); + PackageManagerServiceUtils.logCriticalInfo(Log.INFO, + "Upgrading from " + ver.fingerprint + " to " + Build.TIME); } // when upgrading from pre-M, promote system app permissions from install to runtime @@ -1982,7 +1985,7 @@ public boolean hasFeature(String feature) { } mCacheDir = PackageManagerServiceUtils.preparePackageParserCache( - mIsEngBuild, mIsUserDebugBuild, mIncrementalVersion); + mIsEngBuild, mIsUserDebugBuild, mIncrementalVersion, mIsUpgrade); final int[] userIds = mUserManager.getUserIds(); PackageParser2 packageParser = mInjector.getScanningCachingPackageParser(); @@ -2067,8 +2070,7 @@ public boolean hasFeature(String feature) { // this situation. if (mIsUpgrade) { Slog.i(TAG, "Build fingerprint changed from " + ver.fingerprint + " to " - + PackagePartitions.FINGERPRINT - + "; regranting permissions for internal storage"); + + Build.TIME + "; regranting permissions for internal storage"); } mPermissionManager.onStorageVolumeMounted( StorageManager.UUID_PRIVATE_INTERNAL, mIsUpgrade); @@ -2083,6 +2085,20 @@ public boolean hasFeature(String feature) { } } + // Disable components marked for disabling at build-time + mDisabledComponentsList = new ArrayList(); + enableComponents(mContext.getResources().getStringArray( + com.android.internal.R.array.config_deviceDisabledComponents), + false); + enableComponents(mContext.getResources().getStringArray( + com.android.internal.R.array.config_globallyDisabledComponents), + false); + + // Enable components marked for forced-enable at build-time + enableComponents(mContext.getResources().getStringArray( + com.android.internal.R.array.config_forceEnabledComponents), + true); + // If this is first boot after an OTA, and a normal boot, then // we need to clear code cache directories. // Note that we do *not* clear the application profiles. These remain valid @@ -2100,7 +2116,7 @@ public boolean hasFeature(String feature) { | Installer.FLAG_CLEAR_APP_DATA_KEEP_ART_PROFILES); } } - ver.fingerprint = PackagePartitions.FINGERPRINT; + ver.fingerprint = String.valueOf(Build.TIME); } // Defer the app data fixup until we are done with app data clearing above. @@ -2257,6 +2273,31 @@ public boolean hasFeature(String feature) { Slog.i(TAG, "Fix for b/169414761 is applied"); } + private void enableComponents(String[] components, boolean enable) { + // Disable or enable components marked at build-time + for (String name : components) { + ComponentName component = ComponentName.unflattenFromString(name); + if (!enable) { + mDisabledComponentsList.add(component); + } + Slog.v(TAG, "Changing enabled state of " + name + " to " + enable); + String packageName = component.getPackageName(); + String className = component.getClassName(); + AndroidPackage pkg = packageName != null ? mPackages.get(packageName) : null; + PackageSetting pkgSetting = mSettings.getPackageLPr(packageName); + if (pkgSetting == null || pkg == null + || !AndroidPackageUtils.hasComponentClassName(pkg, className)) { + Slog.w(TAG, "Unable to change enabled state of " + name + " to " + enable); + continue; + } + if (enable) { + pkgSetting.enableComponentLPw(className, UserHandle.USER_OWNER); + } else { + pkgSetting.disableComponentLPw(className, UserHandle.USER_OWNER); + } + } + } + @GuardedBy("mLock") void updateInstantAppInstallerLocked(String modifiedPackage) { // we're only interested in updating the installer application when 1) it's not @@ -5566,7 +5607,12 @@ public boolean setBlockUninstallForUser(String packageName, boolean blockUninsta public void setComponentEnabledSetting(ComponentName componentName, int newState, int flags, int userId) { if (!mUserManager.exists(userId)) return; - + // Don't allow to enable components marked for disabling at build-time + if (mDisabledComponentsList.contains(componentName)) { + Slog.d(TAG, "Ignoring attempt to set enabled state of disabled component " + + componentName.flattenToString()); + return; + } setEnabledSettings(List.of(new PackageManager.ComponentEnabledSetting(componentName, newState, flags)), userId, null /* callingPackage */); } diff --git a/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java b/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java index 3443d455ee82..b05775e28582 100644 --- a/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java +++ b/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java @@ -1294,7 +1294,7 @@ public static void enforceSystemOrRoot(String message) { } public static @Nullable File preparePackageParserCache(boolean forEngBuild, - boolean isUserDebugBuild, String incrementalVersion) { + boolean isUserDebugBuild, String incrementalVersion, boolean isUpgrade) { if (!FORCE_PACKAGE_PARSED_CACHE_ENABLED) { if (!DEFAULT_PACKAGE_PARSER_CACHE_ENABLED) { return null; @@ -1321,11 +1321,11 @@ public static void enforceSystemOrRoot(String message) { // identify cached items. In particular, changing the value of certain // feature flags should cause us to invalidate any caches. final String cacheName = FORCE_PACKAGE_PARSED_CACHE_ENABLED ? "debug" - : PackagePartitions.FINGERPRINT; + : SystemProperties.digestOf(String.valueOf(Build.TIME)); // Reconcile cache directories, keeping only what we'd actually use. for (File cacheDir : FileUtils.listFilesOrEmpty(cacheBaseDir)) { - if (Objects.equals(cacheName, cacheDir.getName())) { + if (!isUpgrade && Objects.equals(cacheName, cacheDir.getName())) { Slog.d(TAG, "Keeping known cache " + cacheDir.getName()); } else { Slog.d(TAG, "Destroying unknown cache " + cacheDir.getName()); @@ -1350,9 +1350,7 @@ public static void enforceSystemOrRoot(String message) { // NOTE: When no BUILD_NUMBER is set by the build system, it defaults to a build // that starts with "eng." to signify that this is an engineering build and not // destined for release. - if (isUserDebugBuild && incrementalVersion.startsWith("eng.")) { - Slog.w(TAG, "Wiping cache directory because the system partition changed."); - + /*if (isUserDebugBuild && incrementalVersion.startsWith("eng.")) { // Heuristic: If the /system directory has been modified recently due to an "adb sync" // or a regular make, then blow away the cache. Note that mtimes are *NOT* reliable // in general and should not be used for production changes. In this specific case, @@ -1360,10 +1358,11 @@ public static void enforceSystemOrRoot(String message) { File frameworkDir = new File(Environment.getRootDirectory(), "framework"); if (cacheDir.lastModified() < frameworkDir.lastModified()) { + Slog.w(TAG, "Wiping cache directory because the system partition changed."); FileUtils.deleteContents(cacheBaseDir); cacheDir = FileUtils.createDir(cacheBaseDir, cacheName); } - } + }*/ return cacheDir; } diff --git a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java index 1eb74facb840..46691a61930e 100644 --- a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java +++ b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java @@ -314,6 +314,8 @@ public int onCommand(String cmd) { return runRemoveUser(); case "set-user-restriction": return runSetUserRestriction(); + case "supports-multiple-users": + return runSupportsMultipleUsers(); case "get-max-users": return runGetMaxUsers(); case "get-max-running-users": @@ -3014,6 +3016,12 @@ public int runSetUserRestriction() throws RemoteException { return 0; } + public int runSupportsMultipleUsers() { + getOutPrintWriter().println("Is multiuser supported: " + + UserManager.supportsMultipleUsers()); + return 0; + } + public int runGetMaxUsers() { getOutPrintWriter().println("Maximum supported users: " + UserManager.getMaxSupportedUsers()); diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java index 6400502f1a89..3317575651ad 100644 --- a/services/core/java/com/android/server/pm/Settings.java +++ b/services/core/java/com/android/server/pm/Settings.java @@ -433,7 +433,7 @@ public static class VersionInfo { int databaseVersion; /** - * Last known value of {@link Build#FINGERPRINT}. Used to determine when + * Last known value of {@link Build#TIME}. Used to determine when * an system update has occurred, meaning we need to clear code caches. */ String fingerprint; @@ -445,7 +445,7 @@ public static class VersionInfo { public void forceCurrent() { sdkVersion = Build.VERSION.SDK_INT; databaseVersion = CURRENT_DATABASE_VERSION; - fingerprint = PackagePartitions.FINGERPRINT; + fingerprint = String.valueOf(Build.TIME); } } @@ -5480,7 +5480,7 @@ public void setPermissionControllerVersion(long version) { } private String getExtendedFingerprint(long version) { - return PackagePartitions.FINGERPRINT + "?pc_version=" + version; + return Build.TIME + "?pc_version=" + version; } private static long uniformRandom(double low, double high) { diff --git a/services/core/java/com/android/server/pm/ShortcutService.java b/services/core/java/com/android/server/pm/ShortcutService.java index f2bcf5e461a7..bb80e0130d9d 100644 --- a/services/core/java/com/android/server/pm/ShortcutService.java +++ b/services/core/java/com/android/server/pm/ShortcutService.java @@ -5136,7 +5136,7 @@ void injectRestoreCallingIdentity(long token) { // Injection point. String injectBuildFingerprint() { - return Build.FINGERPRINT; + return String.valueOf(Build.TIME); } final void wtf(String message) { diff --git a/services/core/java/com/android/server/pm/StorageEventHelper.java b/services/core/java/com/android/server/pm/StorageEventHelper.java index 666776b4161e..b43bc04aebce 100644 --- a/services/core/java/com/android/server/pm/StorageEventHelper.java +++ b/services/core/java/com/android/server/pm/StorageEventHelper.java @@ -33,6 +33,7 @@ import android.content.pm.PackagePartitions; import android.content.pm.UserInfo; import android.content.pm.VersionedPackage; +import android.os.Build; import android.os.Environment; import android.os.FileUtils; import android.os.UserHandle; @@ -166,7 +167,7 @@ private void loadPrivatePackagesInner(VolumeInfo vol) { Slog.w(TAG, "Failed to scan " + ps.getPath() + ": " + e.getMessage()); } - if (!PackagePartitions.FINGERPRINT.equals(ver.fingerprint)) { + if (!String.valueOf(Build.TIME).equals(ver.fingerprint)) { appDataHelper.clearAppDataLIF( ps.getPkg(), UserHandle.USER_ALL, FLAG_STORAGE_DE | FLAG_STORAGE_CE | FLAG_STORAGE_EXTERNAL | Installer.FLAG_CLEAR_CODE_CACHE_ONLY @@ -204,10 +205,10 @@ private void loadPrivatePackagesInner(VolumeInfo vol) { } synchronized (mPm.mLock) { - final boolean isUpgrade = !PackagePartitions.FINGERPRINT.equals(ver.fingerprint); + final boolean isUpgrade = !String.valueOf(Build.TIME).equals(ver.fingerprint); if (isUpgrade) { logCriticalInfo(Log.INFO, "Build fingerprint changed from " + ver.fingerprint - + " to " + PackagePartitions.FINGERPRINT + "; regranting permissions for " + + " to " + String.valueOf(Build.TIME) + "; regranting permissions for " + volumeUuid); } mPm.mPermissionManager.onStorageVolumeMounted(volumeUuid, isUpgrade); diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java index 9de485b28479..c617d94e977c 100644 --- a/services/core/java/com/android/server/pm/UserManagerService.java +++ b/services/core/java/com/android/server/pm/UserManagerService.java @@ -3989,7 +3989,7 @@ private UserInfo createUserInternalUncheckedNoTracing(@Nullable String name, userInfo.creationTime = getCreationTime(); userInfo.partial = true; userInfo.preCreated = preCreate; - userInfo.lastLoggedInFingerprint = PackagePartitions.FINGERPRINT; + userInfo.lastLoggedInFingerprint = String.valueOf(Build.TIME); if (userTypeDetails.hasBadge() && parentId != UserHandle.USER_NULL) { userInfo.profileBadge = getFreeProfileBadgeLU(parentId, userType); } @@ -5215,8 +5215,7 @@ public void onBeforeStartUser(@UserIdInt int userId) { t.traceBegin("onBeforeStartUser-" + userId); final int userSerial = userInfo.serialNumber; // Migrate only if build fingerprints mismatch - boolean migrateAppsData = !PackagePartitions.FINGERPRINT.equals( - userInfo.lastLoggedInFingerprint); + boolean migrateAppsData = !String.valueOf(Build.TIME).equals(userInfo.lastLoggedInFingerprint); t.traceBegin("prepareUserData"); mUserDataPreparer.prepareUserData(userId, userSerial, StorageManager.FLAG_STORAGE_DE); t.traceEnd(); @@ -5246,8 +5245,7 @@ public void onBeforeUnlockUser(@UserIdInt int userId) { } final int userSerial = userInfo.serialNumber; // Migrate only if build fingerprints mismatch - boolean migrateAppsData = !PackagePartitions.FINGERPRINT.equals( - userInfo.lastLoggedInFingerprint); + boolean migrateAppsData = !String.valueOf(Build.TIME).equals(userInfo.lastLoggedInFingerprint); final TimingsTraceAndSlog t = new TimingsTraceAndSlog(); t.traceBegin("prepareUserData-" + userId); @@ -5291,7 +5289,7 @@ public void onUserLoggedIn(@UserIdInt int userId) { if (now > EPOCH_PLUS_30_YEARS) { userData.info.lastLoggedInTime = now; } - userData.info.lastLoggedInFingerprint = PackagePartitions.FINGERPRINT; + userData.info.lastLoggedInFingerprint = String.valueOf(Build.TIME); scheduleWriteUser(userData); } diff --git a/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java b/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java index 0ae92b4ee846..33248b5c34c4 100644 --- a/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java +++ b/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java @@ -50,6 +50,7 @@ import android.os.storage.StorageManager; import android.permission.PermissionManager; import android.print.PrintManager; +import android.provider.AlarmClock; import android.provider.CalendarContract; import android.provider.ContactsContract; import android.provider.MediaStore; @@ -307,7 +308,6 @@ public boolean isGranted(@NonNull String permission, @NonNull PackageInfo pkg, return mContext.getPackageManager().getPackageInfo(pkg, DEFAULT_PACKAGE_INFO_QUERY_FLAGS); } catch (NameNotFoundException e) { - Slog.e(TAG, "Package not found: " + pkg); return null; } } @@ -916,6 +916,9 @@ private void grantDefaultSystemHandlerPermissions(PackageManagerWrapper pm, int String commonServiceAction = "android.adservices.AD_SERVICES_COMMON_SERVICE"; grantPermissionsToSystemPackage(pm, getDefaultSystemHandlerServicePackage(pm, commonServiceAction, userId), userId, NOTIFICATION_PERMISSIONS); + + String clockAppPackage = getDefaultSystemHandlerActivityPackage(pm, AlarmClock.ACTION_SET_ALARM, userId); + grantPermissionsToSystemPackage(pm, clockAppPackage, userId, NOTIFICATION_PERMISSIONS); } private String getDefaultSystemHandlerActivityPackageForCategory(PackageManagerWrapper pm, diff --git a/services/core/java/com/android/server/pm/pkg/component/ParsedPermissionUtils.java b/services/core/java/com/android/server/pm/pkg/component/ParsedPermissionUtils.java index 281e1bd2824d..1366de77af8b 100644 --- a/services/core/java/com/android/server/pm/pkg/component/ParsedPermissionUtils.java +++ b/services/core/java/com/android/server/pm/pkg/component/ParsedPermissionUtils.java @@ -313,8 +313,7 @@ public static boolean declareDuplicatePermission(@NonNull ParsingPackage pkg) { final ParsedPermission perm = checkDuplicatePerm.get(name); if (isMalformedDuplicate(parsedPermission, perm)) { // Fix for b/213323615 - EventLog.writeEvent(0x534e4554, "213323615", - "The package " + pkg.getPackageName() + " seems malicious"); + EventLog.writeEvent(0x534e4554, "213323615"); return true; } checkDuplicatePerm.put(name, parsedPermission); diff --git a/services/core/java/com/android/server/pm/pkg/parsing/ParsingPackageUtils.java b/services/core/java/com/android/server/pm/pkg/parsing/ParsingPackageUtils.java index 06a54a461d5e..f69cd2aaa696 100644 --- a/services/core/java/com/android/server/pm/pkg/parsing/ParsingPackageUtils.java +++ b/services/core/java/com/android/server/pm/pkg/parsing/ParsingPackageUtils.java @@ -1540,6 +1540,7 @@ private static ParseResult parseUsesSdk(ParseInput input, try { int minVers = ParsingUtils.DEFAULT_MIN_SDK_VERSION; String minCode = null; + boolean minAssigned = false; int targetVers = ParsingUtils.DEFAULT_TARGET_SDK_VERSION; String targetCode = null; int maxVers = Integer.MAX_VALUE; @@ -1548,9 +1549,11 @@ private static ParseResult parseUsesSdk(ParseInput input, if (val != null) { if (val.type == TypedValue.TYPE_STRING && val.string != null) { minCode = val.string.toString(); + minAssigned = !TextUtils.isEmpty(minCode); } else { // If it's not a string, it's an integer. minVers = val.data; + minAssigned = true; } } @@ -1558,7 +1561,7 @@ private static ParseResult parseUsesSdk(ParseInput input, if (val != null) { if (val.type == TypedValue.TYPE_STRING && val.string != null) { targetCode = val.string.toString(); - if (minCode == null) { + if (!minAssigned) { minCode = targetCode; } } else { @@ -2731,9 +2734,8 @@ private static boolean hasDomainURLs(ParsingPackage pkg) { * ratio set. */ private static void setMaxAspectRatio(ParsingPackage pkg) { - // Default to (1.86) 16.7:9 aspect ratio for pre-O apps and unset for O and greater. - // NOTE: 16.7:9 was the max aspect ratio Android devices can support pre-O per the CDD. - float maxAspectRatio = pkg.getTargetSdkVersion() < O ? DEFAULT_PRE_O_MAX_ASPECT_RATIO : 0; + // Start at an unlimited aspect ratio unless we get a more restrictive one + float maxAspectRatio = 0; float packageMaxAspectRatio = pkg.getMaxAspectRatio(); if (packageMaxAspectRatio != 0) { diff --git a/services/core/java/com/android/server/pocket/PocketBridgeService.java b/services/core/java/com/android/server/pocket/PocketBridgeService.java new file mode 100644 index 000000000000..5fc5e2721cc4 --- /dev/null +++ b/services/core/java/com/android/server/pocket/PocketBridgeService.java @@ -0,0 +1,184 @@ +/** + * Copyright (C) 2017 The ParanoidAndroid Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.server.pocket; + +import java.io.FileNotFoundException; +import java.io.FileOutputStream; + +import android.content.Context; +import android.database.ContentObserver; +import android.os.Handler; +import android.os.HandlerThread; +import android.os.Looper; +import android.os.Message; +import android.os.Process; +import android.os.UserHandle; +import android.pocket.IPocketCallback; +import android.pocket.PocketManager; +import android.provider.Settings.System; +import android.util.Slog; +import com.android.internal.util.FastPrintWriter; +import com.android.server.SystemService; + +import static android.provider.Settings.System.POCKET_JUDGE; + +/** + * This service communicates pocket state to the pocket judge kernel driver. + * It maintains the pocket state by binding to the pocket service. + * + * @author Chris Lahaye + * @hide + */ +public class PocketBridgeService extends SystemService { + + private static final String TAG = PocketBridgeService.class.getSimpleName(); + private static final int MSG_POCKET_STATE_CHANGED = 1; + + private Context mContext; + private boolean mEnabled; + private PocketBridgeHandler mHandler; + private PocketBridgeObserver mObserver; + + private PocketManager mPocketManager; + private boolean mIsDeviceInPocket; + private final IPocketCallback mPocketCallback = new IPocketCallback.Stub() { + @Override + public void onStateChanged(boolean isDeviceInPocket, int reason) { + boolean changed = false; + if (reason == PocketManager.REASON_SENSOR) { + if (isDeviceInPocket != mIsDeviceInPocket) { + mIsDeviceInPocket = isDeviceInPocket; + changed = true; + } + } else { + changed = isDeviceInPocket != mIsDeviceInPocket; + mIsDeviceInPocket = false; + } + if (changed) { + mHandler.sendEmptyMessage(MSG_POCKET_STATE_CHANGED); + } + } + }; + + // Custom methods + private boolean mSupportedByDevice; + + public PocketBridgeService(Context context) { + super(context); + mContext = context; + HandlerThread handlerThread = new HandlerThread(TAG, Process.THREAD_PRIORITY_BACKGROUND); + handlerThread.start(); + mHandler = new PocketBridgeHandler(handlerThread.getLooper()); + mPocketManager = (PocketManager) + context.getSystemService(Context.POCKET_SERVICE); + mSupportedByDevice = mContext.getResources().getBoolean( + com.android.internal.R.bool.config_pocketModeSupported); + mObserver = new PocketBridgeObserver(mHandler); + if (mSupportedByDevice){ + mObserver.onChange(true); + mObserver.register(); + } + } + + @Override + public void onStart() { + } + + private void setEnabled(boolean enabled) { + if (enabled != mEnabled) { + mEnabled = enabled; + update(); + } + } + + private void update() { + if (!mSupportedByDevice || mPocketManager == null) return; + + if (mEnabled) { + mPocketManager.addCallback(mPocketCallback); + } else { + mPocketManager.removeCallback(mPocketCallback); + } + } + + private class PocketBridgeHandler extends Handler { + + private FileOutputStream mFileOutputStream; + private FastPrintWriter mPrintWriter; + + public PocketBridgeHandler(Looper looper) { + super(looper); + + try { + mFileOutputStream = new FileOutputStream( + mContext.getResources().getString( + com.android.internal.R.string.config_pocketBridgeSysfsInpocket) + ); + mPrintWriter = new FastPrintWriter(mFileOutputStream, true, 128); + } + catch(FileNotFoundException e) { + Slog.w(TAG, "Pocket bridge error occured", e); + setEnabled(false); + } + } + + @Override + public void handleMessage(android.os.Message msg) { + if (msg.what != MSG_POCKET_STATE_CHANGED) { + Slog.w(TAG, "Unknown message:" + msg.what); + return; + } + + if (mPrintWriter != null) { + mPrintWriter.println(mIsDeviceInPocket ? 1 : 0); + } + } + + } + + private class PocketBridgeObserver extends ContentObserver { + + private boolean mRegistered; + + public PocketBridgeObserver(Handler handler) { + super(handler); + } + + @Override + public void onChange(boolean selfChange) { + final boolean enabled = System.getIntForUser(mContext.getContentResolver(), + POCKET_JUDGE, 0 /* default */, UserHandle.USER_CURRENT) != 0; + setEnabled(enabled); + } + + public void register() { + if (!mRegistered) { + mContext.getContentResolver().registerContentObserver( + System.getUriFor(POCKET_JUDGE), true, this); + mRegistered = true; + } + } + + public void unregister() { + if (mRegistered) { + mContext.getContentResolver().unregisterContentObserver(this); + mRegistered = false; + } + } + + } + +} diff --git a/services/core/java/com/android/server/pocket/PocketService.java b/services/core/java/com/android/server/pocket/PocketService.java new file mode 100644 index 000000000000..5cfa5cf464e8 --- /dev/null +++ b/services/core/java/com/android/server/pocket/PocketService.java @@ -0,0 +1,906 @@ +/** + * Copyright (C) 2016 The ParanoidAndroid Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.server.pocket; + +import android.Manifest; +import android.content.Context; +import android.content.pm.PackageManager; +import android.database.ContentObserver; +import android.hardware.Sensor; +import android.hardware.SensorEvent; +import android.hardware.SensorEventListener; +import android.hardware.SensorManager; +import android.os.Binder; +import android.os.DeadObjectException; +import android.os.Handler; +import android.os.HandlerThread; +import android.os.IBinder; +import android.os.Looper; +import android.os.Message; +import android.os.Process; +import android.os.RemoteException; +import android.os.SystemClock; +import android.os.UserHandle; +import android.pocket.IPocketService; +import android.pocket.IPocketCallback; +import android.pocket.PocketConstants; +import android.pocket.PocketManager; +import android.provider.Settings.System; +import android.text.TextUtils; +import android.util.Log; +import android.util.Slog; + +import com.android.server.SystemService; + +import org.json.JSONException; +import org.json.JSONObject; + +import java.io.FileDescriptor; +import java.io.PrintWriter; +import java.util.ArrayList; + +import static android.provider.Settings.System.POCKET_JUDGE; + +/** + * A service to manage multiple clients that want to listen for pocket state. + * The service is responsible for maintaining a list of clients and dispatching all + * pocket -related information. + * + * @author Carlo Savignano + * @hide + */ +public class PocketService extends SystemService implements IBinder.DeathRecipient { + + private static final String TAG = PocketService.class.getSimpleName(); + private static final boolean DEBUG = PocketConstants.DEBUG; + + /** + * Wheater we don't have yet a valid vendor sensor event or pocket service not running. + */ + private static final int VENDOR_SENSOR_UNKNOWN = 0; + + /** + * Vendor sensor has been registered, onSensorChanged() has been called and we have a + * valid event value from Vendor pocket sensor. + */ + private static final int VENDOR_SENSOR_IN_POCKET = 1; + + /** + * The rate proximity sensor events are delivered at. + */ + private static final int PROXIMITY_SENSOR_DELAY = 400000; + + /** + * Wheater we don't have yet a valid proximity sensor event or pocket service not running. + */ + private static final int PROXIMITY_UNKNOWN = 0; + + /** + * Proximity sensor has been registered, onSensorChanged() has been called and we have a + * valid event value which determined proximity sensor is covered. + */ + private static final int PROXIMITY_POSITIVE = 1; + + /** + * Proximity sensor has been registered, onSensorChanged() has been called and we have a + * valid event value which determined proximity sensor is not covered. + */ + private static final int PROXIMITY_NEGATIVE = 2; + + /** + * The rate light sensor events are delivered at. + */ + private static final int LIGHT_SENSOR_DELAY = 400000; + + /** + * Wheater we don't have yet a valid light sensor event or pocket service not running. + */ + private static final int LIGHT_UNKNOWN = 0; + + /** + * Light sensor has been registered, onSensorChanged() has been called and we have a + * valid event value which determined available light is in pocket range. + */ + private static final int LIGHT_POCKET = 1; + + /** + * Light sensor has been registered, onSensorChanged() has been called and we have a + * valid event value which determined available light is outside pocket range. + */ + private static final int LIGHT_AMBIENT = 2; + + /** + * Light sensor maximum value registered in pocket with up to semi-transparent fabric. + */ + private static final float POCKET_LIGHT_MAX_THRESHOLD = 3.0f; + + private final ArrayList mCallbacks= new ArrayList<>(); + + private Context mContext; + private boolean mEnabled; + private boolean mSystemReady; + private boolean mSystemBooted; + private boolean mInteractive; + private boolean mPending; + private PocketHandler mHandler; + private PocketObserver mObserver; + private SensorManager mSensorManager; + + // proximity + private int mProximityState = PROXIMITY_UNKNOWN; + private int mLastProximityState = PROXIMITY_UNKNOWN; + private float mProximityMaxRange; + private boolean mProximityRegistered; + private Sensor mProximitySensor; + + // light + private int mLightState = LIGHT_UNKNOWN; + private int mLastLightState = LIGHT_UNKNOWN; + private float mLightMaxRange; + private boolean mLightRegistered; + private Sensor mLightSensor; + + // vendor sensor + private int mVendorSensorState = VENDOR_SENSOR_UNKNOWN; + private int mLastVendorSensorState = VENDOR_SENSOR_UNKNOWN; + private String mVendorPocketSensor; + private boolean mVendorSensorRegistered; + private Sensor mVendorSensor; + + // Custom methods + private boolean mPocketLockVisible; + private boolean mSupportedByDevice; + + public PocketService(Context context) { + super(context); + mContext = context; + HandlerThread handlerThread = new HandlerThread(TAG, Process.THREAD_PRIORITY_BACKGROUND); + handlerThread.start(); + mHandler = new PocketHandler(handlerThread.getLooper()); + mSensorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE); + mVendorPocketSensor = mContext.getResources().getString( + com.android.internal.R.string.config_pocketJudgeVendorSensorName); + mProximitySensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY); + if (mProximitySensor != null) { + mProximityMaxRange = mProximitySensor.getMaximumRange(); + } + mLightSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_LIGHT); + if (mLightSensor != null) { + mLightMaxRange = mLightSensor.getMaximumRange(); + } + mVendorSensor = getSensor(mSensorManager, mVendorPocketSensor); + mSupportedByDevice = mContext.getResources().getBoolean( + com.android.internal.R.bool.config_pocketModeSupported); + mObserver = new PocketObserver(mHandler); + if (mSupportedByDevice){ + mObserver.onChange(true); + mObserver.register(); + } + } + + private class PocketObserver extends ContentObserver { + + private boolean mRegistered; + + public PocketObserver(Handler handler) { + super(handler); + } + + @Override + public void onChange(boolean selfChange) { + final boolean enabled = System.getIntForUser(mContext.getContentResolver(), + POCKET_JUDGE, 0 /* default */, UserHandle.USER_CURRENT) != 0; + setEnabled(enabled); + } + + public void register() { + if (!mRegistered) { + mContext.getContentResolver().registerContentObserver( + System.getUriFor(POCKET_JUDGE), true, this); + mRegistered = true; + } + } + + public void unregister() { + if (mRegistered) { + mContext.getContentResolver().unregisterContentObserver(this); + mRegistered = false; + } + } + + } + + private class PocketHandler extends Handler { + + public static final int MSG_SYSTEM_READY = 0; + public static final int MSG_SYSTEM_BOOTED = 1; + public static final int MSG_DISPATCH_CALLBACKS = 2; + public static final int MSG_ADD_CALLBACK = 3; + public static final int MSG_REMOVE_CALLBACK = 4; + public static final int MSG_INTERACTIVE_CHANGED = 5; + public static final int MSG_SENSOR_EVENT_PROXIMITY = 6; + public static final int MSG_SENSOR_EVENT_LIGHT = 7; + public static final int MSG_UNREGISTER_TIMEOUT = 8; + public static final int MSG_SET_LISTEN_EXTERNAL = 9; + public static final int MSG_SET_POCKET_LOCK_VISIBLE = 10; + public static final int MSG_SENSOR_EVENT_VENDOR = 11; + + public PocketHandler(Looper looper) { + super(looper); + } + + @Override + public void handleMessage(android.os.Message msg) { + switch (msg.what) { + case MSG_SYSTEM_READY: + handleSystemReady(); + break; + case MSG_SYSTEM_BOOTED: + handleSystemBooted(); + break; + case MSG_DISPATCH_CALLBACKS: + handleDispatchCallbacks(); + break; + case MSG_ADD_CALLBACK: + handleAddCallback((IPocketCallback) msg.obj); + break; + case MSG_REMOVE_CALLBACK: + handleRemoveCallback((IPocketCallback) msg.obj); + break; + case MSG_INTERACTIVE_CHANGED: + handleInteractiveChanged(msg.arg1 != 0); + break; + case MSG_SENSOR_EVENT_PROXIMITY: + handleProximitySensorEvent((SensorEvent) msg.obj); + break; + case MSG_SENSOR_EVENT_LIGHT: + handleLightSensorEvent((SensorEvent) msg.obj); + break; + case MSG_SENSOR_EVENT_VENDOR: + handleVendorSensorEvent((SensorEvent) msg.obj); + break; + case MSG_UNREGISTER_TIMEOUT: + handleUnregisterTimeout(); + break; + case MSG_SET_LISTEN_EXTERNAL: + handleSetListeningExternal(msg.arg1 != 0); + break; + case MSG_SET_POCKET_LOCK_VISIBLE: + handleSetPocketLockVisible(msg.arg1 != 0); + break; + default: + Slog.w(TAG, "Unknown message:" + msg.what); + } + } + } + + @Override + public void onBootPhase(int phase) { + switch(phase) { + case PHASE_SYSTEM_SERVICES_READY: + mHandler.sendEmptyMessage(PocketHandler.MSG_SYSTEM_READY); + break; + case PHASE_BOOT_COMPLETED: + mHandler.sendEmptyMessage(PocketHandler.MSG_SYSTEM_BOOTED); + break; + default: + Slog.w(TAG, "Un-handled boot phase:" + phase); + break; + } + } + + @Override + public void onStart() { + publishBinderService(Context.POCKET_SERVICE, new PocketServiceWrapper()); + } + + @Override + public void binderDied() { + synchronized (mCallbacks) { + mProximityState = PROXIMITY_UNKNOWN; + int callbacksSize = mCallbacks.size(); + for (int i = callbacksSize - 1; i >= 0; i--) { + if (mCallbacks.get(i) != null) { + try { + mCallbacks.get(i).onStateChanged(false, PocketManager.REASON_RESET); + } catch (DeadObjectException e) { + Slog.w(TAG, "Death object while invoking sendPocketState: ", e); + } catch (RemoteException e) { + Slog.w(TAG, "Failed to invoke sendPocketState: ", e); + } + } + } + mCallbacks.clear(); + } + unregisterSensorListeners(); + mObserver.unregister(); + } + + private final class PocketServiceWrapper extends IPocketService.Stub { + + @Override // Binder call + public void addCallback(final IPocketCallback callback) { + final Message msg = new Message(); + msg.what = PocketHandler.MSG_ADD_CALLBACK; + msg.obj = callback; + mHandler.sendMessage(msg); + } + + @Override // Binder call + public void removeCallback(final IPocketCallback callback) { + final Message msg = new Message(); + msg.what = PocketHandler.MSG_REMOVE_CALLBACK; + msg.obj = callback; + mHandler.sendMessage(msg); + } + + @Override // Binder call + public void onInteractiveChanged(final boolean interactive) { + final Message msg = new Message(); + msg.what = PocketHandler.MSG_INTERACTIVE_CHANGED; + msg.arg1 = interactive ? 1 : 0; + mHandler.sendMessage(msg); + } + + @Override // Binder call + public void setListeningExternal(final boolean listen) { + final Message msg = new Message(); + msg.what = PocketHandler.MSG_SET_LISTEN_EXTERNAL; + msg.arg1 = listen ? 1 : 0; + mHandler.sendMessage(msg); + } + + @Override // Binder call + public boolean isDeviceInPocket() { + final long ident = Binder.clearCallingIdentity(); + try { + if (!mSystemReady || !mSystemBooted) { + return false; + } + return PocketService.this.isDeviceInPocket(); + } finally { + Binder.restoreCallingIdentity(ident); + } + } + + @Override // Binder call + public void setPocketLockVisible(final boolean visible) { + final Message msg = new Message(); + msg.what = PocketHandler.MSG_SET_POCKET_LOCK_VISIBLE; + msg.arg1 = visible ? 1 : 0; + mHandler.sendMessage(msg); + } + + @Override // Binder call + public boolean isPocketLockVisible() { + final long ident = Binder.clearCallingIdentity(); + try { + if (!mSystemReady || !mSystemBooted) { + return false; + } + return PocketService.this.isPocketLockVisible(); + } finally { + Binder.restoreCallingIdentity(ident); + } + } + + @Override // Binder call + protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) { + if (mContext.checkCallingOrSelfPermission(Manifest.permission.DUMP) + != PackageManager.PERMISSION_GRANTED) { + pw.println("Permission Denial: can't dump Pocket from from pid=" + + Binder.getCallingPid() + + ", uid=" + Binder.getCallingUid()); + return; + } + + final long ident = Binder.clearCallingIdentity(); + try { + dumpInternal(pw); + } finally { + Binder.restoreCallingIdentity(ident); + } + } + + } + + private final SensorEventListener mProximityListener = new SensorEventListener() { + @Override + public void onSensorChanged(SensorEvent sensorEvent) { + final Message msg = new Message(); + msg.what = PocketHandler.MSG_SENSOR_EVENT_PROXIMITY; + msg.obj = sensorEvent; + mHandler.sendMessage(msg); + } + + @Override + public void onAccuracyChanged(Sensor sensor, int i) { } + }; + + private final SensorEventListener mLightListener = new SensorEventListener() { + @Override + public void onSensorChanged(SensorEvent sensorEvent) { + final Message msg = new Message(); + msg.what = PocketHandler.MSG_SENSOR_EVENT_LIGHT; + msg.obj = sensorEvent; + mHandler.sendMessage(msg); + } + + @Override + public void onAccuracyChanged(Sensor sensor, int i) { } + }; + + private final SensorEventListener mVendorSensorListener = new SensorEventListener() { + @Override + public void onSensorChanged(SensorEvent sensorEvent) { + final Message msg = new Message(); + msg.what = PocketHandler.MSG_SENSOR_EVENT_VENDOR; + msg.obj = sensorEvent; + mHandler.sendMessage(msg); + } + + @Override + public void onAccuracyChanged(Sensor sensor, int i) { } + }; + + private boolean isDeviceInPocket() { + if (!mSupportedByDevice){ + return false; + } + + if (mVendorSensorState != VENDOR_SENSOR_UNKNOWN) { + return mVendorSensorState == VENDOR_SENSOR_IN_POCKET; + } + + if (mLightState != LIGHT_UNKNOWN) { + return mProximityState == PROXIMITY_POSITIVE + && mLightState == LIGHT_POCKET; + } + return mProximityState == PROXIMITY_POSITIVE; + } + + private void setEnabled(boolean enabled) { + if (!mSupportedByDevice){ + return; + } + if (enabled != mEnabled) { + mEnabled = enabled; + mHandler.removeCallbacksAndMessages(null); + update(); + } + } + + private void update() { + if (!mSupportedByDevice){ + return; + } + if (!mEnabled || mInteractive) { + if (mEnabled && isDeviceInPocket()) { + // if device is judged to be in pocket while switching + // to interactive state, we need to keep monitoring. + return; + } + unregisterSensorListeners(); + } else { + mHandler.removeMessages(PocketHandler.MSG_UNREGISTER_TIMEOUT); + registerSensorListeners(); + } + } + + private void registerSensorListeners() { + if (!mSupportedByDevice){ + return; + } + startListeningForVendorSensor(); + startListeningForProximity(); + startListeningForLight(); + } + + private void unregisterSensorListeners() { + if (!mSupportedByDevice){ + return; + } + stopListeningForVendorSensor(); + stopListeningForProximity(); + stopListeningForLight(); + } + + private void startListeningForVendorSensor() { + if (DEBUG) { + Log.d(TAG, "startListeningForVendorSensor()"); + } + + if (mVendorSensor == null) { + Log.d(TAG, "Cannot detect Vendor pocket sensor, sensor is NULL"); + return; + } + + if (!mVendorSensorRegistered) { + mSensorManager.registerListener(mVendorSensorListener, mVendorSensor, + SensorManager.SENSOR_DELAY_NORMAL, mHandler); + mVendorSensorRegistered = true; + } + } + + private void stopListeningForVendorSensor() { + if (DEBUG) { + Log.d(TAG, "stopListeningForVendorSensor()"); + } + + if (mVendorSensorRegistered) { + mVendorSensorState = mLastVendorSensorState = VENDOR_SENSOR_UNKNOWN; + mSensorManager.unregisterListener(mVendorSensorListener); + mVendorSensorRegistered = false; + } + } + + private void startListeningForProximity() { + + if (mVendorSensor != null) { + return; + } + + if (DEBUG) { + Log.d(TAG, "startListeningForProximity()"); + } + + if (!PocketConstants.ENABLE_PROXIMITY_JUDGE) { + return; + } + + if (mProximitySensor == null) { + Log.d(TAG, "Cannot detect proximity sensor, sensor is NULL"); + return; + } + + if (!mProximityRegistered) { + mSensorManager.registerListener(mProximityListener, mProximitySensor, + PROXIMITY_SENSOR_DELAY, mHandler); + mProximityRegistered = true; + } + } + + private void stopListeningForProximity() { + if (DEBUG) { + Log.d(TAG, "startListeningForProximity()"); + } + + if (mProximityRegistered) { + mLastProximityState = mProximityState = PROXIMITY_UNKNOWN; + mSensorManager.unregisterListener(mProximityListener); + mProximityRegistered = false; + } + } + + private void startListeningForLight() { + + if (mVendorSensor != null) { + return; + } + + if (DEBUG) { + Log.d(TAG, "startListeningForLight()"); + } + + if (!PocketConstants.ENABLE_LIGHT_JUDGE) { + return; + } + + if (mLightSensor == null) { + Log.d(TAG, "Cannot detect light sensor, sensor is NULL"); + return; + } + + if (!mLightRegistered) { + mSensorManager.registerListener(mLightListener, mLightSensor, + LIGHT_SENSOR_DELAY, mHandler); + mLightRegistered = true; + } + } + + private void stopListeningForLight() { + if (DEBUG) { + Log.d(TAG, "stopListeningForLight()"); + } + + if (mLightRegistered) { + mLightState = mLastLightState = LIGHT_UNKNOWN; + mSensorManager.unregisterListener(mLightListener); + mLightRegistered = false; + } + } + + private void handleSystemReady() { + if (DEBUG) { + Log.d(TAG, "onBootPhase(): PHASE_SYSTEM_SERVICES_READY"); + Log.d(TAG, "onBootPhase(): VENDOR_SENSOR: " + mVendorPocketSensor); + } + mSystemReady = true; + + if (mPending) { + final Message msg = new Message(); + msg.what = PocketHandler.MSG_INTERACTIVE_CHANGED; + msg.arg1 = mInteractive ? 1 : 0; + mHandler.sendMessage(msg); + mPending = false; + } + } + + private void handleSystemBooted() { + if (DEBUG) { + Log.d(TAG, "onBootPhase(): PHASE_BOOT_COMPLETED"); + } + mSystemBooted = true; + if (mPending) { + final Message msg = new Message(); + msg.what = PocketHandler.MSG_INTERACTIVE_CHANGED; + msg.arg1 = mInteractive ? 1 : 0; + mHandler.sendMessage(msg); + mPending = false; + } + } + + private void handleDispatchCallbacks() { + synchronized (mCallbacks) { + final int N = mCallbacks.size(); + boolean cleanup = false; + for (int i = 0; i < N; i++) { + final IPocketCallback callback = mCallbacks.get(i); + try { + if (callback != null) { + callback.onStateChanged(isDeviceInPocket(), PocketManager.REASON_SENSOR); + } else { + cleanup = true; + } + } catch (RemoteException e) { + cleanup = true; + } + } + if (cleanup) { + cleanUpCallbacksLocked(null); + } + } + } + + private void cleanUpCallbacksLocked(IPocketCallback callback) { + synchronized (mCallbacks) { + for (int i = mCallbacks.size() - 1; i >= 0; i--) { + IPocketCallback found = mCallbacks.get(i); + if (found == null || found == callback) { + mCallbacks.remove(i); + } + } + } + } + + private void handleSetPocketLockVisible(boolean visible) { + mPocketLockVisible = visible; + } + + private boolean isPocketLockVisible() { + return mPocketLockVisible; + } + + private void handleSetListeningExternal(boolean listen) { + if (listen) { + // should prevent external processes to register while interactive, + // while they are allowed to stop listening in any case as for example + // coming pocket lock will need to. + if (!mInteractive) { + registerSensorListeners(); + } + } else { + mHandler.removeCallbacksAndMessages(null); + unregisterSensorListeners(); + } + dispatchCallbacks(); + } + + private void handleAddCallback(IPocketCallback callback) { + synchronized (mCallbacks) { + if (!mCallbacks.contains(callback)) { + mCallbacks.add(callback); + } + } + } + + private void handleRemoveCallback(IPocketCallback callback) { + synchronized (mCallbacks) { + if (mCallbacks.contains(callback)) { + mCallbacks.remove(callback); + } + } + } + + private void handleInteractiveChanged(boolean interactive) { + // always update interactive state. + mInteractive = interactive; + + if (mPending) { + // working on it, waiting for proper system conditions. + return; + } else if (!mPending && (!mSystemBooted || !mSystemReady)) { + // we ain't ready, postpone till system is both booted AND ready. + mPending = true; + return; + } + + update(); + } + + private void handleVendorSensorEvent(SensorEvent sensorEvent) { + final boolean isDeviceInPocket = isDeviceInPocket(); + + mLastVendorSensorState = mVendorSensorState; + + if (DEBUG) { + final String sensorEventToString = sensorEvent != null ? sensorEvent.toString() : "NULL"; + Log.d(TAG, "VENDOR_SENSOR: onSensorChanged(), sensorEvent =" + sensorEventToString); + } + + try { + if (sensorEvent == null) { + if (DEBUG) Log.d(TAG, "Event is null!"); + mVendorSensorState = VENDOR_SENSOR_UNKNOWN; + } else if (sensorEvent.values == null || sensorEvent.values.length == 0) { + if (DEBUG) Log.d(TAG, "Event has no values! event.values null ? " + (sensorEvent.values == null)); + mVendorSensorState = VENDOR_SENSOR_UNKNOWN; + } else { + final boolean isVendorPocket = sensorEvent.values[0] == 1.0; + if (DEBUG) { + final long time = SystemClock.uptimeMillis(); + Log.d(TAG, "Event: time=" + time + ", value=" + sensorEvent.values[0] + + ", isInPocket=" + isVendorPocket); + } + mVendorSensorState = isVendorPocket ? VENDOR_SENSOR_IN_POCKET : VENDOR_SENSOR_UNKNOWN; + } + } catch (NullPointerException e) { + Log.e(TAG, "Event: something went wrong, exception caught, e = " + e); + mVendorSensorState = VENDOR_SENSOR_UNKNOWN; + } finally { + if (isDeviceInPocket != isDeviceInPocket()) { + dispatchCallbacks(); + } + } + } + + private void handleLightSensorEvent(SensorEvent sensorEvent) { + final boolean isDeviceInPocket = isDeviceInPocket(); + + mLastLightState = mLightState; + + if (DEBUG) { + final String sensorEventToString = sensorEvent != null ? sensorEvent.toString() : "NULL"; + Log.d(TAG, "LIGHT_SENSOR: onSensorChanged(), sensorEvent =" + sensorEventToString); + } + + try { + if (sensorEvent == null) { + if (DEBUG) Log.d(TAG, "Event is null!"); + mLightState = LIGHT_UNKNOWN; + } else if (sensorEvent.values == null || sensorEvent.values.length == 0) { + if (DEBUG) Log.d(TAG, "Event has no values! event.values null ? " + (sensorEvent.values == null)); + mLightState = LIGHT_UNKNOWN; + } else { + final float value = sensorEvent.values[0]; + final boolean isPoor = value >= 0 + && value <= POCKET_LIGHT_MAX_THRESHOLD; + if (DEBUG) { + final long time = SystemClock.uptimeMillis(); + Log.d(TAG, "Event: time= " + time + ", value=" + value + + ", maxRange=" + mLightMaxRange + ", isPoor=" + isPoor); + } + mLightState = isPoor ? LIGHT_POCKET : LIGHT_AMBIENT; + } + } catch (NullPointerException e) { + Log.e(TAG, "Event: something went wrong, exception caught, e = " + e); + mLightState = LIGHT_UNKNOWN; + } finally { + if (isDeviceInPocket != isDeviceInPocket()) { + dispatchCallbacks(); + } + } + } + + private void handleProximitySensorEvent(SensorEvent sensorEvent) { + final boolean isDeviceInPocket = isDeviceInPocket(); + + mLastProximityState = mProximityState; + + if (DEBUG) { + final String sensorEventToString = sensorEvent != null ? sensorEvent.toString() : "NULL"; + Log.d(TAG, "PROXIMITY_SENSOR: onSensorChanged(), sensorEvent =" + sensorEventToString); + } + + try { + if (sensorEvent == null) { + if (DEBUG) Log.d(TAG, "Event is null!"); + mProximityState = PROXIMITY_UNKNOWN; + } else if (sensorEvent.values == null || sensorEvent.values.length == 0) { + if (DEBUG) Log.d(TAG, "Event has no values! event.values null ? " + (sensorEvent.values == null)); + mProximityState = PROXIMITY_UNKNOWN; + } else { + final float value = sensorEvent.values[0]; + final boolean isPositive = sensorEvent.values[0] < mProximityMaxRange; + if (DEBUG) { + final long time = SystemClock.uptimeMillis(); + Log.d(TAG, "Event: time=" + time + ", value=" + value + + ", maxRange=" + mProximityMaxRange + ", isPositive=" + isPositive); + } + mProximityState = isPositive ? PROXIMITY_POSITIVE : PROXIMITY_NEGATIVE; + } + } catch (NullPointerException e) { + Log.e(TAG, "Event: something went wrong, exception caught, e = " + e); + mProximityState = PROXIMITY_UNKNOWN; + } finally { + if (isDeviceInPocket != isDeviceInPocket()) { + dispatchCallbacks(); + } + } + } + + private void handleUnregisterTimeout() { + mHandler.removeCallbacksAndMessages(null); + unregisterSensorListeners(); + } + + private static Sensor getSensor(SensorManager sm, String type) { + for (Sensor sensor : sm.getSensorList(Sensor.TYPE_ALL)) { + if (type.equals(sensor.getStringType())) { + return sensor; + } + } + return null; + } + + private void dispatchCallbacks() { + final boolean isDeviceInPocket = isDeviceInPocket(); + if (mInteractive) { + if (!isDeviceInPocket) { + mHandler.sendEmptyMessageDelayed(PocketHandler.MSG_UNREGISTER_TIMEOUT, 5000 /* ms */); + } else { + mHandler.removeMessages(PocketHandler.MSG_UNREGISTER_TIMEOUT); + } + } + mHandler.removeMessages(PocketHandler.MSG_DISPATCH_CALLBACKS); + mHandler.sendEmptyMessage(PocketHandler.MSG_DISPATCH_CALLBACKS); + } + + private void dumpInternal(PrintWriter pw) { + JSONObject dump = new JSONObject(); + try { + dump.put("service", "POCKET"); + dump.put("enabled", mEnabled); + dump.put("isDeviceInPocket", isDeviceInPocket()); + dump.put("interactive", mInteractive); + dump.put("proximityState", mProximityState); + dump.put("lastProximityState", mLastProximityState); + dump.put("proximityRegistered", mProximityRegistered); + dump.put("proximityMaxRange", mProximityMaxRange); + dump.put("lightState", mLightState); + dump.put("lastLightState", mLastLightState); + dump.put("lightRegistered", mLightRegistered); + dump.put("lightMaxRange", mLightMaxRange); + dump.put("VendorSensorState", mVendorSensorState); + dump.put("lastVendorSensorState", mLastVendorSensorState); + dump.put("VendorSensorRegistered", mVendorSensorRegistered); + } catch (JSONException e) { + Slog.e(TAG, "dump formatting failure", e); + } finally { + pw.println(dump); + } + } +} diff --git a/services/core/java/com/android/server/policy/HardkeyActionHandler.java b/services/core/java/com/android/server/policy/HardkeyActionHandler.java new file mode 100644 index 000000000000..2d63955c06f5 --- /dev/null +++ b/services/core/java/com/android/server/policy/HardkeyActionHandler.java @@ -0,0 +1,735 @@ +/** + * Copyright (C) 2014 The TeamEos Project + * Copyright (C) 2016 The DirtyUnicorns Project + * + * @author Randall Rushing + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Single tap, double tap, and long press logic for hardware key events + * Monitors user configuration changes, sets sane defaults, executes actions, + * lets PhoneWindowManager know relevant configuration changes. This handler + * fully consumes all key events it watches + * + */ + +package com.android.server.policy; + +import java.util.ArrayList; + +import com.android.internal.policy.KeyInterceptionInfo; +import com.android.internal.util.hwkeys.ActionConstants; +import com.android.internal.util.hwkeys.ActionHandler; +import com.android.internal.util.hwkeys.ActionUtils; +import com.android.internal.util.hwkeys.Config; +import com.android.internal.util.hwkeys.Config.ActionConfig; +import com.android.internal.util.hwkeys.Config.ButtonConfig; +import com.android.server.LocalServices; +import com.android.server.wm.WindowManagerInternal; + +import android.content.ContentResolver; +import android.content.Context; +import android.database.ContentObserver; +import android.os.IBinder; +import android.os.Handler; +import android.os.Message; +import android.os.PowerManager; +import android.os.UserHandle; +import android.provider.Settings; +import android.telecom.TelecomManager; +import android.text.TextUtils; +import android.util.Log; +import android.view.KeyEvent; +import android.view.ViewConfiguration; +import android.view.IWindowManager; +import android.view.WindowManager; +import android.view.WindowManagerGlobal; + +import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG; +import static android.view.WindowManager.LayoutParams.TYPE_NOTIFICATION_SHADE; + +public class HardkeyActionHandler { + private interface ActionReceiver { + public void onActionDispatched(HardKeyButton button, String task); + } + + private static final String TAG = HardkeyActionHandler.class.getSimpleName(); + + WindowManagerInternal mWindowManagerInternal; + + // messages to PWM to do some actions we can't really do here + public static final int MSG_FIRE_HOME = 7102; + public static final int MSG_UPDATE_MENU_KEY = 7106; + public static final int MSG_DO_HAPTIC_FB = 7107; + + // fire rocket boosters + private static final int BOOST_LEVEL = 1000 * 1000; + + private static final int KEY_MASK_HOME = 0x01; + private static final int KEY_MASK_BACK = 0x02; + private static final int KEY_MASK_MENU = 0x04; + private static final int KEY_MASK_ASSIST = 0x08; + private static final int KEY_MASK_APP_SWITCH = 0x10; + private static final int KEY_MASK_CAMERA = 0x20; + private static final int KEY_MASK_VOLUME = 0x40; + + // lock our configuration changes + private final Object mLock = new Object(); + + private HardKeyButton mBackButton; + private HardKeyButton mHomeButton; + private HardKeyButton mRecentButton; + private HardKeyButton mMenuButton; + private HardKeyButton mAssistButton; + + // Behavior of HOME button during incomming call ring. + // (See Settings.Secure.RING_HOME_BUTTON_BEHAVIOR.) +// int mRingHomeBehavior; + + private ActionReceiver mActionReceiver = new ActionReceiver() { + @Override + public void onActionDispatched(HardKeyButton button, String task) { + if (task.equals(ActionHandler.SYSTEMUI_TASK_HOME)) { + mHandler.sendEmptyMessage(MSG_FIRE_HOME); + return; + } else if (task.equals(ActionHandler.SYSTEMUI_TASK_SCREENOFF)) { + // can't consume UP event if screen is off, do it manually + button.setPressed(false); + button.setWasConsumed(false); + } + ActionHandler.performTask(mContext, task); + } + }; + + private int mDeviceHardwareKeys; + + private SettingsObserver mObserver; + private Handler mHandler; +// private PowerManager mPm; + private Context mContext; + private boolean mHwKeysDisabled = false; + + public HardkeyActionHandler(Context context, Handler handler) { + mContext = context; + mHandler = handler; +// mPm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); + + mDeviceHardwareKeys = ActionUtils.getInt(context, "config_deviceHardwareKeys", + ActionUtils.PACKAGE_ANDROID); + + mWindowManagerInternal = LocalServices.getService(WindowManagerInternal.class); + + mBackButton = new HardKeyButton(mActionReceiver, handler); + mHomeButton = new HardKeyButton(mActionReceiver, handler); + mRecentButton = new HardKeyButton(mActionReceiver, handler); + mMenuButton = new HardKeyButton(mActionReceiver, handler); + mAssistButton = new HardKeyButton(mActionReceiver, handler); + + mObserver = new SettingsObserver(mHandler); + mObserver.observe(); + } + + void fireBooster(HardKeyButton button) { +// if (!button.isDoubleTapPending()) { +// mPm.cpuBoost(BOOST_LEVEL); +// } + } + + public boolean isHwKeysDisabled() { + return mHwKeysDisabled; + } + + private boolean filterDisabledKey(int keyCode) { + return mHwKeysDisabled && (keyCode == KeyEvent.KEYCODE_HOME + || keyCode == KeyEvent.KEYCODE_MENU + || keyCode == KeyEvent.KEYCODE_APP_SWITCH + || keyCode == KeyEvent.KEYCODE_ASSIST + || keyCode == KeyEvent.KEYCODE_BACK); + } + + public boolean handleKeyEvent(IBinder focusedToken, int keyCode, int repeatCount, boolean down, + boolean canceled, + boolean longPress, boolean keyguardOn) { + if (filterDisabledKey(keyCode)) { + return true; + } + + if (keyCode == KeyEvent.KEYCODE_HOME) { + if (!down && mHomeButton.isPressed()) { + mHomeButton.setPressed(false); + if (mHomeButton.wasConsumed()) { + mHomeButton.setWasConsumed(false); + return true; + } + + if (!mHomeButton.keyHasDoubleTapRecents()) { + ActionHandler.cancelPreloadRecentApps(); + } + + if (canceled) { + return true; + } +/* + // If an incoming call is ringing, HOME is totally disabled. + // (The user is already on the InCallUI at this point, + // and his ONLY options are to answer or reject the call.) + TelecomManager telecomManager = getTelecommService(); + if (telecomManager != null && telecomManager.isRinging()) { + if ((mRingHomeBehavior + & Settings.Secure.RING_HOME_BUTTON_BEHAVIOR_ANSWER) != 0) { + Log.i(TAG, "Answering with HOME button."); + telecomManager.acceptRingingCall(); + return true; + } else { + Log.i(TAG, "Ignoring HOME; there's a ringing incoming call."); + return true; + } + } +*/ + + // If an incoming call is ringing, HOME is totally disabled. + // (The user is already on the InCallUI at this point, + // and his ONLY options are to answer or reject the call.) + TelecomManager telecomManager = getTelecommService(); + if (telecomManager != null && telecomManager.isRinging()) { + Log.i(TAG, "Ignoring HOME; there's a ringing incoming call."); + return true; + } + + if (mHomeButton.isDoubleTapEnabled()) { + mHomeButton.cancelDTTimeout(); + mHomeButton.setDoubleTapPending(true); + mHomeButton.postDTTimeout(); + return true; + } + + mHomeButton.fireSingleTap(); + return true; + } + + final KeyInterceptionInfo info = + mWindowManagerInternal.getKeyInterceptionInfoFromToken(focusedToken); + if (info != null) { + // If a system window has focus, then it doesn't make sense + // right now to interact with applications. + if (info.layoutParamsType == TYPE_KEYGUARD_DIALOG + || (info.layoutParamsType == TYPE_NOTIFICATION_SHADE + && keyguardOn)) { + // the "app" is keyguard, so give it the key + return false; + } + for (int t : WINDOW_TYPES_WHERE_HOME_DOESNT_WORK) { + if (info.layoutParamsType == t) { + // don't do anything, but also don't pass it to the app + return true; + } + } + } + + if (!down) { + return true; + } + + if (repeatCount == 0) { + mHomeButton.setPressed(true); + fireBooster(mHomeButton); + if (mHomeButton.isDoubleTapPending()) { + mHomeButton.setDoubleTapPending(false); + mHomeButton.cancelDTTimeout(); + mHomeButton.fireDoubleTap(); + mHomeButton.setWasConsumed(true); + } else if (mHomeButton.keyHasLongPressRecents() + || mHomeButton.keyHasDoubleTapRecents()) { + ActionHandler.preloadRecentApps(); + } + } else if (longPress) { + if (!keyguardOn + && !mHomeButton.wasConsumed() + && mHomeButton.isLongTapEnabled()) { + mHomeButton.setPressed(true); + if (!mHomeButton.keyHasLongPressRecents()) { + ActionHandler.cancelPreloadRecentApps(); + } + mHandler.sendEmptyMessage(MSG_DO_HAPTIC_FB); + mHomeButton.fireLongPress(); + mHomeButton.setWasConsumed(true); + } + } + return true; + } else if (keyCode == KeyEvent.KEYCODE_MENU) { + if (!down && mMenuButton.isPressed()) { + mMenuButton.setPressed(false); + + if (mMenuButton.wasConsumed()) { + mMenuButton.setWasConsumed(false); + return true; + } + + if (!mMenuButton.keyHasDoubleTapRecents()) { + ActionHandler.cancelPreloadRecentApps(); + } + + if (canceled || keyguardOn) { + return true; + } + + if (mMenuButton.isDoubleTapEnabled()) { + mMenuButton.setDoubleTapPending(true); + mMenuButton.cancelDTTimeout(); + mMenuButton.postDTTimeout(); + return true; + } + + if (!mMenuButton.keyHasSingleTapRecent()) { + ActionHandler.cancelPreloadRecentApps(); + } + + mMenuButton.fireSingleTap(); + return true; + } + + if (!down) { + return true; + } + + if (repeatCount == 0) { + mMenuButton.setPressed(true); + fireBooster(mMenuButton); + if (mMenuButton.isDoubleTapPending()) { + mMenuButton.setDoubleTapPending(false); + mMenuButton.cancelDTTimeout(); + mMenuButton.fireDoubleTap(); + mMenuButton.setWasConsumed(true); + } else if (mMenuButton.keyHasLongPressRecents() + || mMenuButton.keyHasDoubleTapRecents() + || mMenuButton.keyHasSingleTapRecent()) { + ActionHandler.preloadRecentApps(); + } + } else if (longPress) { + if (!keyguardOn + && !mMenuButton.wasConsumed() + && mMenuButton.isLongTapEnabled()) { + mMenuButton.setPressed(true); + if (!mMenuButton.keyHasLongPressRecents()) { + ActionHandler.cancelPreloadRecentApps(); + } + mHandler.sendEmptyMessage(MSG_DO_HAPTIC_FB); + mMenuButton.fireLongPress(); + mMenuButton.setWasConsumed(true); + } + } + return true; + } else if (keyCode == KeyEvent.KEYCODE_APP_SWITCH) { + if (!down && mRecentButton.isPressed()) { + mRecentButton.setPressed(false); + + if (mRecentButton.wasConsumed()) { + mRecentButton.setWasConsumed(false); + return true; + } + + if (!mRecentButton.keyHasDoubleTapRecents()) { + ActionHandler.cancelPreloadRecentApps(); + } + + if (canceled || keyguardOn) { + return true; + } + + if (mRecentButton.isDoubleTapEnabled()) { + mRecentButton.setDoubleTapPending(true); + mRecentButton.cancelDTTimeout(); + mRecentButton.postDTTimeout(); + return true; + } + + if (!mRecentButton.keyHasSingleTapRecent()) { + ActionHandler.cancelPreloadRecentApps(); + } + + mRecentButton.fireSingleTap(); + return true; + } + + if (!down) { + return true; + } + + if (repeatCount == 0) { + mRecentButton.setPressed(true); + fireBooster(mRecentButton); + if (mRecentButton.isDoubleTapPending()) { + mRecentButton.setDoubleTapPending(false); + mRecentButton.cancelDTTimeout(); + mRecentButton.fireDoubleTap(); + mRecentButton.setWasConsumed(true); + } else if (mRecentButton.keyHasLongPressRecents() + || mRecentButton.keyHasDoubleTapRecents() + || mRecentButton.keyHasSingleTapRecent()) { + ActionHandler.preloadRecentApps(); + } + } else if (longPress) { + if (!keyguardOn + && !mRecentButton.wasConsumed() + && mRecentButton.isLongTapEnabled()) { + mRecentButton.setPressed(true); + if (!mRecentButton.keyHasLongPressRecents()) { + ActionHandler.cancelPreloadRecentApps(); + } + mHandler.sendEmptyMessage(MSG_DO_HAPTIC_FB); + mRecentButton.fireLongPress(); + mRecentButton.setWasConsumed(true); + } + } + return true; + } else if (keyCode == KeyEvent.KEYCODE_ASSIST) { + if (!down && mAssistButton.isPressed()) { + mAssistButton.setPressed(false); + + if (mAssistButton.wasConsumed()) { + mAssistButton.setWasConsumed(false); + return true; + } + + if (!mAssistButton.keyHasDoubleTapRecents()) { + ActionHandler.cancelPreloadRecentApps(); + } + + if (canceled || keyguardOn) { + return true; + } + + if (mAssistButton.isDoubleTapEnabled()) { + mAssistButton.setDoubleTapPending(true); + mAssistButton.cancelDTTimeout(); + mAssistButton.postDTTimeout(); + return true; + } + + if (!mAssistButton.keyHasSingleTapRecent()) { + ActionHandler.cancelPreloadRecentApps(); + } + mAssistButton.fireSingleTap(); + return true; + } + + if (!down) { + return true; + } + + if (repeatCount == 0) { + mAssistButton.setPressed(true); + fireBooster(mAssistButton); + if (mAssistButton.isDoubleTapPending()) { + mAssistButton.setDoubleTapPending(false); + mAssistButton.cancelDTTimeout(); + mAssistButton.fireDoubleTap(); + mAssistButton.setWasConsumed(true); + } else if (mAssistButton.keyHasLongPressRecents() + || mAssistButton.keyHasDoubleTapRecents() + || mAssistButton.keyHasSingleTapRecent()) { + ActionHandler.preloadRecentApps(); + } + } else if (longPress) { + if (!keyguardOn + && !mAssistButton.wasConsumed() + && mAssistButton.isLongTapEnabled()) { + mAssistButton.setPressed(true); + if (!mAssistButton.keyHasLongPressRecents()) { + ActionHandler.cancelPreloadRecentApps(); + } + mHandler.sendEmptyMessage(MSG_DO_HAPTIC_FB); + mAssistButton.fireLongPress(); + mAssistButton.setWasConsumed(true); + } + } + return true; + } else if (keyCode == KeyEvent.KEYCODE_BACK) { + if (!down && mBackButton.isPressed()) { + mBackButton.setPressed(false); + + if (mBackButton.wasConsumed()) { + mBackButton.setWasConsumed(false); + return true; + } + + if (!mBackButton.keyHasDoubleTapRecents()) { + ActionHandler.cancelPreloadRecentApps(); + } + + if (canceled || keyguardOn) { + return true; + } + + if (mBackButton.isDoubleTapEnabled()) { + mBackButton.setDoubleTapPending(true); + mBackButton.cancelDTTimeout(); + mBackButton.postDTTimeout(); + return true; + } + + mBackButton.fireSingleTap(); + return true; + } + + if (!down) { + return true; + } + + if (repeatCount == 0) { + mBackButton.setPressed(true); + fireBooster(mBackButton); + if (mBackButton.isDoubleTapPending()) { + mBackButton.setDoubleTapPending(false); + mBackButton.cancelDTTimeout(); + mBackButton.fireDoubleTap(); + mBackButton.setWasConsumed(true); + } else if (mBackButton.keyHasLongPressRecents() + || mBackButton.keyHasDoubleTapRecents()) { + ActionHandler.preloadRecentApps(); + } + } else if (longPress) { + if (!keyguardOn + && !mBackButton.wasConsumed()) { + mBackButton.setPressed(true); +/* if (ActionHandler.isLockTaskOn()) { + ActionHandler.turnOffLockTask(); + mHandler.sendEmptyMessage(MSG_DO_HAPTIC_FB); + mBackButton.setWasConsumed(true); + } else { +*/ + if (mBackButton.isLongTapEnabled()) { + if (!mBackButton.keyHasLongPressRecents()) { + ActionHandler.cancelPreloadRecentApps(); + } + mBackButton.fireLongPress(); + mHandler.sendEmptyMessage(MSG_DO_HAPTIC_FB); + mBackButton.setWasConsumed(true); + } +// } + } + } + return true; + } + return false; + } + + private class HardKeyButton { + private ButtonConfig mConfig; + private ActionReceiver mActionReceiver; + private Handler mHandler; + + private boolean mDoubleTapPending = false; + private boolean mIsPressed = false; + private boolean mWasConsumed = false; + + public HardKeyButton(ActionReceiver receiver, Handler handler) { + mHandler = handler; + mActionReceiver = receiver; + } + + void setConfig(ButtonConfig config) { + mConfig = config; + } + + final Runnable mDoubleTapTimeout = new Runnable() { + public void run() { + if (mDoubleTapPending) { + mDoubleTapPending = false; + if (!keyHasSingleTapRecent()) { + ActionHandler.cancelPreloadRecentApps(); + } + mActionReceiver.onActionDispatched(HardKeyButton.this, mConfig.getActionConfig(ActionConfig.PRIMARY).getAction()); + } + } + }; + + final Runnable mSTRunnable = new Runnable() { + public void run() { + mActionReceiver.onActionDispatched(HardKeyButton.this, mConfig.getActionConfig(ActionConfig.PRIMARY).getAction()); + } + }; + + final Runnable mDTRunnable = new Runnable() { + public void run() { + mActionReceiver.onActionDispatched(HardKeyButton.this, mConfig.getActionConfig(ActionConfig.THIRD).getAction()); + } + }; + + final Runnable mLPRunnable = new Runnable() { + public void run() { + mActionReceiver.onActionDispatched(HardKeyButton.this, mConfig.getActionConfig(ActionConfig.SECOND).getAction()); + } + }; + + boolean keyHasSingleTapRecent() { + return mConfig.getActionConfig(ActionConfig.PRIMARY).isActionRecents(); + } + + boolean keyHasLongPressRecents() { + return mConfig.getActionConfig(ActionConfig.SECOND).isActionRecents(); + } + + boolean keyHasDoubleTapRecents() { + return mConfig.getActionConfig(ActionConfig.THIRD).isActionRecents(); + } + + boolean keyHasMenuAction() { + return ActionHandler.SYSTEMUI_TASK_MENU.equals(mConfig.getActionConfig(ActionConfig.PRIMARY).getAction()) + || ActionHandler.SYSTEMUI_TASK_MENU.equals(mConfig.getActionConfig(ActionConfig.SECOND).getAction()) + || ActionHandler.SYSTEMUI_TASK_MENU.equals(mConfig.getActionConfig(ActionConfig.THIRD).getAction()); + } + + boolean isDoubleTapEnabled() { + return !mConfig.getActionConfig(ActionConfig.THIRD).hasNoAction(); + } + + boolean isLongTapEnabled() { + return !mConfig.getActionConfig(ActionConfig.SECOND).hasNoAction(); + } + + void setDoubleTapPending(boolean pending) { + mDoubleTapPending = pending; + } + + boolean isDoubleTapPending() { + return mDoubleTapPending; + } + + void setPressed(boolean pressed) { + mIsPressed = pressed; + } + + boolean isPressed() { + return mIsPressed; + } + + void setWasConsumed(boolean consumed) { + mWasConsumed = consumed; + } + + boolean wasConsumed() { + return mWasConsumed; + } + + void fireDoubleTap() { + mHandler.post(mDTRunnable); + } + + void fireLongPress() { + mHandler.post(mLPRunnable); + } + + void fireSingleTap() { + mHandler.post(mSTRunnable); + } + + void cancelDTTimeout() { + mHandler.removeCallbacks(mDoubleTapTimeout); + } + + void postDTTimeout() { + mHandler.postDelayed(mDoubleTapTimeout, ViewConfiguration.getDoubleTapTimeout()); + } + } + + private TelecomManager getTelecommService() { + return (TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE); + } + + private static final int[] WINDOW_TYPES_WHERE_HOME_DOESNT_WORK = { + WindowManager.LayoutParams.TYPE_SYSTEM_ALERT, + WindowManager.LayoutParams.TYPE_SYSTEM_ERROR, + }; + + private class SettingsObserver extends ContentObserver { + SettingsObserver(Handler handler) { + super(handler); + } + + void observe() { + // Observe all users' changes + ContentResolver resolver = mContext.getContentResolver(); + resolver.registerContentObserver( + Settings.Secure.getUriFor(ActionConstants.getDefaults(ActionConstants.HWKEYS) + .getUri()), false, this, UserHandle.USER_ALL); + resolver.registerContentObserver( + Settings.System.getUriFor(Settings.System.HARDWARE_KEYS_DISABLE), false, this, + UserHandle.USER_ALL); + updateKeyAssignments(); + } + + @Override + public void onChange(boolean selfChange) { + updateKeyAssignments(); + } + } + + private void updateKeyAssignments() { + ContentResolver cr = mContext.getContentResolver(); + synchronized (mLock) { + mHwKeysDisabled = Settings.System.getIntForUser(mContext.getContentResolver(), + Settings.System.HARDWARE_KEYS_DISABLE, 0, + UserHandle.USER_CURRENT) != 0; + + final boolean hasMenu = (mDeviceHardwareKeys & KEY_MASK_MENU) != 0; + final boolean hasHome = (mDeviceHardwareKeys & KEY_MASK_HOME) != 0; + final boolean hasAssist = (mDeviceHardwareKeys & KEY_MASK_ASSIST) != 0; + final boolean hasAppSwitch = (mDeviceHardwareKeys & KEY_MASK_APP_SWITCH) != 0; + + ArrayList configs = Config.getConfig(mContext, + ActionConstants.getDefaults(ActionConstants.HWKEYS)); + + ButtonConfig config = Config.getButtonConfigFromTag(configs, ActionConstants.Hwkeys.BACK_BUTTON_TAG); + mBackButton.setConfig(config); + + config = Config.getButtonConfigFromTag(configs, ActionConstants.Hwkeys.HOME_BUTTON_TAG); + mHomeButton.setConfig(config); + + config = Config.getButtonConfigFromTag(configs, ActionConstants.Hwkeys.OVERVIEW_BUTTON_TAG); + mRecentButton.setConfig(config); + + config = Config.getButtonConfigFromTag(configs, ActionConstants.Hwkeys.MENU_BUTTON_TAG); + mMenuButton.setConfig(config); + + config = Config.getButtonConfigFromTag(configs, ActionConstants.Hwkeys.ASSIST_BUTTON_TAG); + mAssistButton.setConfig(config); + + boolean hasMenuKeyEnabled = false; + + if (hasHome) { + hasMenuKeyEnabled = mHomeButton.keyHasMenuAction(); + } + if (hasMenu) { + hasMenuKeyEnabled |= mMenuButton.keyHasMenuAction(); + } + if (hasAssist) { + hasMenuKeyEnabled |= mAssistButton.keyHasMenuAction(); + } + if (hasAppSwitch) { + hasMenuKeyEnabled |= mRecentButton.keyHasMenuAction(); + } + hasMenuKeyEnabled |= mBackButton.keyHasMenuAction(); + + // let PWM know to update menu key settings + Message msg = mHandler.obtainMessage(MSG_UPDATE_MENU_KEY); + msg.arg1 = hasMenuKeyEnabled ? 1 : 0; + mHandler.sendMessage(msg); + +// mRingHomeBehavior = Settings.Secure.getIntForUser(cr, +// Settings.Secure.RING_HOME_BUTTON_BEHAVIOR, +// Settings.Secure.RING_HOME_BUTTON_BEHAVIOR_DEFAULT, +// UserHandle.USER_CURRENT); + } + } +} diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index d8e7fbe8b296..a4c23be5e3bc 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -90,6 +90,7 @@ import static com.android.server.wm.WindowManagerPolicyProto.WINDOW_MANAGER_DRAW_COMPLETE; import android.accessibilityservice.AccessibilityServiceInfo; +import android.Manifest; import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityManager.RecentTaskInfo; @@ -152,6 +153,8 @@ import android.os.VibrationEffect; import android.os.Vibrator; import android.provider.DeviceConfig; +import android.pocket.IPocketCallback; +import android.pocket.PocketManager; import android.provider.MediaStore; import android.provider.Settings; import android.service.dreams.DreamManagerInternal; @@ -160,6 +163,7 @@ import android.service.vr.IPersistentVrStateCallbacks; import android.speech.RecognizerIntent; import android.telecom.TelecomManager; +import android.text.TextUtils; import android.util.Log; import android.util.MutableBoolean; import android.util.PrintWriterPrinter; @@ -200,9 +204,14 @@ import com.android.internal.policy.PhoneWindow; import com.android.internal.policy.TransitionAnimation; import com.android.internal.statusbar.IStatusBarService; +import com.android.internal.util.syberia.SyberiaUtils; import com.android.internal.util.ArrayUtils; +import com.android.internal.util.ScreenshotHelper; +import com.android.internal.util.hwkeys.ActionHandler; +import com.android.internal.util.hwkeys.ActionUtils; import com.android.server.ExtconStateObserver; import com.android.server.ExtconUEventObserver; +import com.android.internal.os.DeviceKeyHandler; import com.android.server.GestureLauncherService; import com.android.server.LocalServices; import com.android.server.SystemServiceManager; @@ -211,6 +220,7 @@ import com.android.server.policy.keyguard.KeyguardServiceDelegate; import com.android.server.policy.keyguard.KeyguardServiceDelegate.DrawnListener; import com.android.server.policy.keyguard.KeyguardStateMonitor.StateCallback; +import com.android.server.policy.pocket.PocketLock; import com.android.server.statusbar.StatusBarManagerInternal; import com.android.server.vr.VrManagerInternal; import com.android.server.wm.ActivityTaskManagerInternal; @@ -220,11 +230,14 @@ import com.android.server.wm.WindowManagerInternal.AppTransitionListener; import com.android.server.wm.WindowManagerService; +import dalvik.system.PathClassLoader; + import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.PrintWriter; +import java.lang.reflect.Constructor; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -239,6 +252,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { static final String TAG = "WindowManager"; static final boolean localLOGV = false; + static final boolean DEBUG = false; static final boolean DEBUG_INPUT = false; static final boolean DEBUG_KEYGUARD = false; static final boolean DEBUG_WAKEUP = false; @@ -266,6 +280,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { static final int LONG_PRESS_POWER_SHUT_OFF_NO_CONFIRM = 3; static final int LONG_PRESS_POWER_GO_TO_VOICE_ASSIST = 4; static final int LONG_PRESS_POWER_ASSISTANT = 5; // Settings.Secure.ASSISTANT + static final int LONG_PRESS_POWER_HIDE_POCKET_LOCK = 6; // must match: config_veryLongPresOnPowerBehavior in config.xml static final int VERY_LONG_PRESS_POWER_NOTHING = 0; @@ -412,6 +427,11 @@ public class PhoneWindowManager implements WindowManagerPolicy { private boolean mHasFeatureLeanback; private boolean mHasFeatureHdmiCec; + // Double-tap-to-doze + private boolean mDoubleTapToWake; + private boolean mDoubleTapToDoze; + private boolean mNativeDoubleTapToDozeAvailable; + // Assigned on main thread, accessed on UI thread volatile VrManagerInternal mVrManagerInternal; @@ -526,8 +546,13 @@ public void onDrawn() { boolean mWakeOnBackKeyPress; long mWakeUpToLastStateTimeout; + private HardkeyActionHandler mKeyHandler; + private boolean mHandleVolumeKeysInWM; + // Volume rocker wake + boolean mVolumeRockerWake; + private boolean mPendingKeyguardOccluded; private boolean mKeyguardOccludedChanged; @@ -603,9 +628,15 @@ public void onDrawn() { private int mCurrentUserId; + private AssistUtils mAssistUtils; + // Maps global key codes to the components that will handle them. private GlobalKeyManager mGlobalKeyManager; + private boolean mVolumeMusicControlActive; + private boolean mVolumeMusicControl; + private boolean mVolumeWakeActive; + // Fallback actions by key code. private final SparseArray mFallbackActions = new SparseArray(); @@ -624,6 +655,32 @@ public void onDrawn() { private boolean mLockNowPending = false; + private int mTorchActionMode; + + private PocketManager mPocketManager; + private PocketLock mPocketLock; + private boolean mPocketLockShowing; + private boolean mIsDeviceInPocket; + private final IPocketCallback mPocketCallback = new IPocketCallback.Stub() { + + @Override + public void onStateChanged(boolean isDeviceInPocket, int reason) { + boolean wasDeviceInPocket = mIsDeviceInPocket; + if (reason == PocketManager.REASON_SENSOR) { + mIsDeviceInPocket = isDeviceInPocket; + } else { + mIsDeviceInPocket = false; + } + if (wasDeviceInPocket != mIsDeviceInPocket) { + handleDevicePocketStateChanged(); + //if (mKeyHandler != null) { + //mKeyHandler.setIsInPocket(mIsDeviceInPocket); + //} + } + } + + }; + private static final int MSG_DISPATCH_MEDIA_KEY_WITH_WAKE_LOCK = 3; private static final int MSG_DISPATCH_MEDIA_KEY_REPEAT_WITH_WAKE_LOCK = 4; private static final int MSG_KEYGUARD_DRAWN_COMPLETE = 5; @@ -644,6 +701,10 @@ public void onDrawn() { private static final int MSG_LAUNCH_ASSIST = 23; private static final int MSG_RINGER_TOGGLE_CHORD = 24; + private static final int MSG_DISPATCH_VOLKEY_WITH_WAKE_LOCK = 29; + + private DeviceKeyHandler mDeviceKeyHandler; + private class PolicyHandler extends Handler { @Override public void handleMessage(Message msg) { @@ -713,6 +774,24 @@ public void handleMessage(Message msg) { case MSG_SCREENSHOT_CHORD: handleScreenShot(msg.arg1, msg.arg2); break; + case MSG_DISPATCH_VOLKEY_WITH_WAKE_LOCK: + KeyEvent event = (KeyEvent) msg.obj; + dispatchMediaKeyWithWakeLockToAudioService(event); + dispatchMediaKeyWithWakeLockToAudioService( + KeyEvent.changeAction(event, KeyEvent.ACTION_UP)); + mVolumeMusicControlActive = true; + break; + case HardkeyActionHandler.MSG_FIRE_HOME: + launchHomeFromHotKey(DEFAULT_DISPLAY); + break; +// case HardkeyActionHandler.MSG_UPDATE_MENU_KEY: +// synchronized (mLock) { +// mHasPermanentMenuKey = msg.arg1 == 1; +// } +// break; + case HardkeyActionHandler.MSG_DO_HAPTIC_FB: + performHapticFeedback(HapticFeedbackConstants.LONG_PRESS, false, "Hardkey Long-Press"); + break; } } } @@ -771,6 +850,21 @@ void observe() { resolver.registerContentObserver(Settings.Global.getUriFor( Settings.Global.POWER_BUTTON_SUPPRESSION_DELAY_AFTER_GESTURE_WAKE), false, this, UserHandle.USER_ALL); + resolver.registerContentObserver(Settings.System.getUriFor( + Settings.System.SWIPE_TO_SCREENSHOT), false, this, + UserHandle.USER_ALL); + resolver.registerContentObserver(Settings.System.getUriFor( + Settings.System.TORCH_POWER_BUTTON_GESTURE), false, this, + UserHandle.USER_ALL); + resolver.registerContentObserver(Settings.System.getUriFor( + Settings.System.VOLUME_ROCKER_WAKE), false, this, + UserHandle.USER_ALL); + resolver.registerContentObserver(Settings.System.getUriFor( + Settings.System.VOLUME_BUTTON_MUSIC_CONTROL), false, this, + UserHandle.USER_ALL); + resolver.registerContentObserver(Settings.System.getUriFor( + Settings.System.DOZE_TRIGGER_DOUBLETAP), false, this, + UserHandle.USER_ALL); updateSettings(); } @@ -806,6 +900,10 @@ public void onPersistentVrStateChanged(boolean enabled) { } }; + // Swipe to screenshot + private SwipeToScreenshotListener mSwipeToScreenshot; + private boolean haveEnableGesture = false; + private void handleRingerChordGesture() { if (mRingerToggleChord == VOLUME_HUSH_OFF) { return; @@ -885,6 +983,9 @@ private void interceptPowerKeyDown(KeyEvent event, boolean interactive) { mPowerKeyWakeLock.acquire(); } + // Still allow muting call with power button press. + boolean blockInputs = mIsDeviceInPocket && (!interactive || mPocketLockShowing); + mWindowManagerFuncs.onPowerKeyDown(interactive); // Stop ringing or end call if configured to do so when power is pressed. @@ -895,7 +996,7 @@ private void interceptPowerKeyDown(KeyEvent event, boolean interactive) { // Pressing Power while there's a ringing incoming // call should silence the ringer. telecomManager.silenceRinger(); - } else if ((mIncallPowerBehavior + } else if (!blockInputs && (mIncallPowerBehavior & Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR_HANGUP) != 0 && telecomManager.isInCall() && interactive) { // Otherwise, if "Power button ends call" is enabled, @@ -909,20 +1010,26 @@ private void interceptPowerKeyDown(KeyEvent event, boolean interactive) { // Inform the StatusBar; but do not allow it to consume the event. sendSystemKeyToStatusBarAsync(event.getKeyCode()); + // Abort possibly stuck animations. + mHandler.post(mWindowManagerFuncs::triggerAnimationFailsafe); + // If the power key has still not yet been handled, then detect short // press, long press, or multi press and decide what to do. mPowerKeyHandled = mPowerKeyHandled || hungUp || handledByPowerManager || mKeyCombinationManager.isPowerKeyIntercepted(); + if (!mPowerKeyHandled) { if (!interactive) { - wakeUpFromPowerKey(event.getDownTime()); + if (mTorchActionMode == 0) { + wakeUpFromPowerKey(event.getDownTime()); + } } } else { // handled by another power key policy. if (!mSingleKeyGestureDetector.isKeyIntercepted(KEYCODE_POWER)) { mSingleKeyGestureDetector.reset(); } - } + } } private void interceptPowerKeyUp(KeyEvent event, boolean canceled) { @@ -951,12 +1058,6 @@ private void finishPowerKeyPress() { } private void powerPress(long eventTime, int count, boolean beganFromNonInteractive) { - if (mDefaultDisplayPolicy.isScreenOnEarly() && !mDefaultDisplayPolicy.isScreenOnFully()) { - Slog.i(TAG, "Suppressed redundant power key press while " - + "already in the process of turning the screen on."); - return; - } - final boolean interactive = Display.isOnState(mDefaultDisplay.getState()); Slog.d(TAG, "powerPress: eventTime=" + eventTime + " interactive=" + interactive @@ -1019,6 +1120,8 @@ private void powerPress(long eventTime, int count, boolean beganFromNonInteracti break; } } + } else if (mTorchActionMode != 0 && beganFromNonInteractive) { + wakeUpFromPowerKey(eventTime); } } @@ -1156,7 +1259,8 @@ private int getMaxMultiPressPowerCount() { if (mTriplePressOnPowerBehavior != MULTI_PRESS_POWER_NOTHING) { return 3; } - if (mDoublePressOnPowerBehavior != MULTI_PRESS_POWER_NOTHING) { + if (mDoublePressOnPowerBehavior != MULTI_PRESS_POWER_NOTHING || + mTorchActionMode == 1) { return 2; } return 1; @@ -1201,6 +1305,12 @@ private void powerLongPress(long eventTime) { launchAssistAction(null, powerKeyDeviceId, eventTime, AssistUtils.INVOCATION_TYPE_POWER_BUTTON_LONG_PRESS); break; + case LONG_PRESS_POWER_HIDE_POCKET_LOCK: + mPowerKeyHandled = true; + performHapticFeedback(HapticFeedbackConstants.LONG_PRESS, false, "Power - Long-Press - Hide Pocket Lock"); + hidePocketLock(true); + mPocketManager.setListeningExternal(false); + break; } } @@ -1250,14 +1360,23 @@ private void sleepRelease(long eventTime) { } } + private boolean hasAssistant() { + return mAssistUtils.getAssistComponentForUser(mCurrentUserId) != null; + } + private int getResolvedLongPressOnPowerBehavior() { if (FactoryTest.isLongPressOnPowerOffEnabled()) { return LONG_PRESS_POWER_SHUT_OFF_NO_CONFIRM; } + if (mPocketLockShowing) { + return LONG_PRESS_POWER_HIDE_POCKET_LOCK; + } + // If the config indicates the assistant behavior but the device isn't yet provisioned, show // global actions instead. - if (mLongPressOnPowerBehavior == LONG_PRESS_POWER_ASSISTANT && !isDeviceProvisioned()) { + if (mLongPressOnPowerBehavior == LONG_PRESS_POWER_ASSISTANT && + (!isDeviceProvisioned() || !hasAssistant())) { return LONG_PRESS_POWER_GLOBAL_ACTIONS; } @@ -1533,7 +1652,9 @@ public void run() { private void handleScreenShot(@WindowManager.ScreenshotType int type, @WindowManager.ScreenshotSource int source) { - mDefaultDisplayPolicy.takeScreenshot(type, source); + if (!mPocketLockShowing) { + mDefaultDisplayPolicy.takeScreenshot(type, source); + } } @Override @@ -1904,6 +2025,10 @@ public void init(Context context, IWindowManager windowManager, mWakeOnBackKeyPress = res.getBoolean(com.android.internal.R.bool.config_wakeOnBackKeyPress); + // Double-tap-to-doze + mNativeDoubleTapToDozeAvailable = !TextUtils.isEmpty( + mContext.getResources().getString(R.string.config_dozeDoubleTapSensorType)); + // Init display burn-in protection boolean burnInProtectionEnabled = context.getResources().getBoolean( com.android.internal.R.bool.config_enableBurnInProtection); @@ -1939,8 +2064,28 @@ public void init(Context context, IWindowManager windowManager, context, minHorizontal, maxHorizontal, minVertical, maxVertical, maxRadius); } + mSwipeToScreenshot = new SwipeToScreenshotListener(context, new SwipeToScreenshotListener.Callbacks() { + @Override + public void onSwipeThreeFinger() { + IDreamManager dreamManager = getDreamManager(); + try { + if (dreamManager != null && dreamManager.isDreaming()) { + return; + } + } catch (RemoteException ignored) { + } + interceptScreenshotChord( + TAKE_SCREENSHOT_FULLSCREEN, SCREENSHOT_KEY_OTHER, 0 /*pressDelay*/); + } + }); + mHandler = new PolicyHandler(); mWakeGestureListener = new MyWakeGestureListener(mContext, mHandler); + // only for hwkey devices + if (!mContext.getResources().getBoolean( + com.android.internal.R.bool.config_showNavigationBar)) { + mKeyHandler = new HardkeyActionHandler(mContext, mHandler); + } mSettingsObserver = new SettingsObserver(mHandler); mSettingsObserver.observe(); mModifierShortcutManager = new ModifierShortcutManager(context); @@ -2070,6 +2215,8 @@ public void init(Context context, IWindowManager windowManager, mSafeModeEnabledVibePattern = getLongIntArray(mContext.getResources(), com.android.internal.R.array.config_safeModeEnabledVibePattern); + mAssistUtils = new AssistUtils(context); + mGlobalKeyManager = new GlobalKeyManager(mContext); // Controls rotation and the like. @@ -2117,6 +2264,28 @@ public void onShowingChanged() { initKeyCombinationRules(); initSingleKeyGestureRules(); mSideFpsEventHandler = new SideFpsEventHandler(mContext, mHandler, mPowerManager); + String deviceKeyHandlerLib = mContext.getResources().getString( + com.android.internal.R.string.config_deviceKeyHandlerLib); + + String deviceKeyHandlerClass = mContext.getResources().getString( + com.android.internal.R.string.config_deviceKeyHandlerClass); + + if (!deviceKeyHandlerLib.isEmpty() && !deviceKeyHandlerClass.isEmpty()) { + try { + PathClassLoader loader = new PathClassLoader(deviceKeyHandlerLib, + getClass().getClassLoader()); + + Class klass = loader.loadClass(deviceKeyHandlerClass); + Constructor constructor = klass.getConstructor(Context.class); + mDeviceKeyHandler = (DeviceKeyHandler) constructor.newInstance( + mContext); + if(DEBUG_INPUT) Slog.d(TAG, "Device key handler loaded"); + } catch (Exception e) { + Slog.w(TAG, "Could not instantiate device key handler " + + deviceKeyHandlerClass + " from class " + + deviceKeyHandlerLib, e); + } + } } private void initKeyCombinationRules() { @@ -2276,10 +2445,14 @@ long getLongPressTimeoutMs() { @Override void onLongPress(long eventTime) { - if (mSingleKeyGestureDetector.beganFromNonInteractive() - && !mSupportLongPressPowerWhenNonInteractive) { - Slog.v(TAG, "Not support long press power when device is not interactive."); - return; + if (mSingleKeyGestureDetector.beganFromNonInteractive() || + (mTorchActionMode != 0 && isFlashLightIsOn())) { + if (handleTorchPress(true)) + return; + if (!mSupportLongPressPowerWhenNonInteractive) { + Slog.v(TAG, "Not support long press power when device is not interactive."); + return; + } } powerLongPress(eventTime); @@ -2293,10 +2466,37 @@ void onVeryLongPress(long eventTime) { @Override void onMultiPress(long downTime, int count) { + if (mSingleKeyGestureDetector.beganFromNonInteractive() || + (mTorchActionMode != 0 && isFlashLightIsOn())) { + if (handleTorchPress(false)) { + mSingleKeyGestureDetector.reset(); + return; + } + } powerPress(downTime, count, mSingleKeyGestureDetector.beganFromNonInteractive()); } } + private boolean isFlashLightIsOn() { + return Settings.Secure.getInt(mContext.getContentResolver(), + Settings.Secure.FLASHLIGHT_ENABLED, 0) != 0; + } + + public boolean handleTorchPress(boolean longpress) { + if (mTorchActionMode == 2 && longpress) { + performHapticFeedback(HapticFeedbackConstants.LONG_PRESS, false, + "Power - Long Press - Torch"); + SyberiaUtils.toggleCameraFlash(); + return true; + } else if (mTorchActionMode == 1 && !longpress) { + performHapticFeedback(HapticFeedbackConstants.LONG_PRESS, false, + "Power - Double Press - Torch"); + SyberiaUtils.toggleCameraFlash(); + return true; + } + return false; + } + /** * Rule for single back key gesture. */ @@ -2410,9 +2610,28 @@ private void readConfigurationDependentBehaviors() { com.android.internal.R.integer.config_triplePressOnStemPrimaryBehavior); } + private void enableSwipeThreeFingerGesture(boolean enable){ + if (enable) { + if (haveEnableGesture) return; + haveEnableGesture = true; + mWindowManagerFuncs.registerPointerEventListener(mSwipeToScreenshot, DEFAULT_DISPLAY); + } else { + if (!haveEnableGesture) return; + haveEnableGesture = false; + mWindowManagerFuncs.unregisterPointerEventListener(mSwipeToScreenshot, DEFAULT_DISPLAY); + } + } + public void updateSettings() { ContentResolver resolver = mContext.getContentResolver(); boolean updateRotation = false; + + // Double-tap-to-doze + mDoubleTapToWake = Settings.Secure.getInt(resolver, + Settings.Secure.DOUBLE_TAP_TO_WAKE, 0) == 1; + mDoubleTapToDoze = Settings.System.getInt(resolver, + Settings.System.DOZE_TRIGGER_DOUBLETAP, 0) == 1; + synchronized (mLock) { mEndcallBehavior = Settings.System.getIntForUser(resolver, Settings.System.END_BUTTON_BEHAVIOR, @@ -2440,6 +2659,11 @@ public void updateSettings() { mRingerToggleChord = VOLUME_HUSH_OFF; } + + // volume rocker wake + mVolumeRockerWake = Settings.System.getIntForUser(resolver, + Settings.System.VOLUME_ROCKER_WAKE, 0, UserHandle.USER_CURRENT) != 0; + // Configure wake gesture. boolean wakeGestureEnabledSetting = Settings.Secure.getIntForUser(resolver, Settings.Secure.WAKE_GESTURE_ENABLED, 0, @@ -2449,6 +2673,11 @@ public void updateSettings() { updateWakeGestureListenerLp(); } + // Three Finger Gesture + boolean threeFingerGesture = Settings.System.getIntForUser(resolver, + Settings.System.SWIPE_TO_SCREENSHOT, 0, UserHandle.USER_CURRENT) == 1; + enableSwipeThreeFingerGesture(threeFingerGesture); + // use screen off timeout setting as the timeout for the lockscreen mLockScreenTimeout = Settings.System.getIntForUser(resolver, Settings.System.SCREEN_OFF_TIMEOUT, 0, UserHandle.USER_CURRENT); @@ -2477,6 +2706,12 @@ public void updateSettings() { Settings.Global.KEY_CHORD_POWER_VOLUME_UP, mContext.getResources().getInteger( com.android.internal.R.integer.config_keyChordPowerVolumeUp)); + mTorchActionMode = Settings.System.getIntForUser(resolver, + Settings.System.TORCH_POWER_BUTTON_GESTURE, + 0, UserHandle.USER_CURRENT); + mVolumeMusicControl = Settings.System.getIntForUser(resolver, + Settings.System.VOLUME_BUTTON_MUSIC_CONTROL, + 0, UserHandle.USER_CURRENT) != 0; } if (updateRotation) { updateRotation(true); @@ -2729,6 +2964,8 @@ public long interceptKeyBeforeDispatching(IBinder focusedToken, KeyEvent event, final int displayId = event.getDisplayId(); final long key_consumed = -1; final long key_not_consumed = 0; + final boolean longPress = (flags & KeyEvent.FLAG_LONG_PRESS) != 0; + final boolean virtualKey = event.getDeviceId() == KeyCharacterMap.VIRTUAL_KEYBOARD; if (DEBUG_INPUT) { Log.d(TAG, "interceptKeyTi keyCode=" + keyCode + " down=" + down + " repeatCount=" @@ -2739,6 +2976,21 @@ public long interceptKeyBeforeDispatching(IBinder focusedToken, KeyEvent event, return key_consumed; } + // we only handle events from hardware key devices that originate from real button + // pushes. We ignore virtual key events as well since it didn't come from a hard key or + // it's the key handler synthesizing a back or menu key event for dispatch + // if keyguard is showing and secure, don't intercept and let aosp keycode + // implementation handle event + if (mKeyHandler != null && !keyguardOn && !virtualKey) { + boolean handled = mKeyHandler.handleKeyEvent(focusedToken, keyCode, repeatCount, down, canceled, + longPress, keyguardOn); + if (handled) + return key_consumed; + } + + // If we think we might have a combination key chord on the way + // but we're not sure, then tell the dispatcher to wait a little while and + // try again later before dispatching. if ((flags & KeyEvent.FLAG_FALLBACK) == 0) { final long now = SystemClock.uptimeMillis(); final long interceptTimeout = mKeyCombinationManager.getKeyInterceptTimeout(keyCode); @@ -3010,6 +3262,18 @@ public long interceptKeyBeforeDispatching(IBinder focusedToken, KeyEvent event, return key_consumed; } + // Specific device key handling + if (mDeviceKeyHandler != null) { + try { + // The device only will consume known keys. + if (mDeviceKeyHandler.canHandleKeyEvent(event)) { + return key_consumed; + } + } catch (Exception e) { + Slog.w(TAG, "Could not dispatch event to device key handler", e); + } + } + // Reserve all the META modifier combos for system behavior if ((metaState & KeyEvent.META_META_ON) != 0) { return key_consumed; @@ -3632,14 +3896,22 @@ void initializeHdmiStateInternal() { mDefaultDisplayPolicy.setHdmiPlugged(plugged, true /* force */); } + private boolean isHwKeysDisabled() { + return mKeyHandler != null ? mKeyHandler.isHwKeysDisabled() : false; + } + // TODO(b/117479243): handle it in InputPolicy /** {@inheritDoc} */ @Override public int interceptKeyBeforeQueueing(KeyEvent event, int policyFlags) { final int keyCode = event.getKeyCode(); final boolean down = event.getAction() == KeyEvent.ACTION_DOWN; + final boolean isVolumeRockerWake = !isScreenOn() + && mVolumeRockerWake + && (keyCode == KeyEvent.KEYCODE_VOLUME_UP + || keyCode == KeyEvent.KEYCODE_VOLUME_DOWN); boolean isWakeKey = (policyFlags & WindowManagerPolicy.FLAG_WAKE) != 0 - || event.isWakeKey(); + || event.isWakeKey() || isVolumeRockerWake; if (!mSystemBooted) { // If we have not yet booted, don't let key events do anything. @@ -3683,6 +3955,23 @@ && isWakeKeyWhenScreenOff(keyCode)) { + " policyFlags=" + Integer.toHexString(policyFlags)); } + // Pre-basic policy based on interactive and pocket lock state. + if (mIsDeviceInPocket && (!interactive || mPocketLockShowing)) { + if (keyCode != KeyEvent.KEYCODE_POWER && + keyCode != KeyEvent.KEYCODE_VOLUME_UP && + keyCode != KeyEvent.KEYCODE_VOLUME_DOWN && + keyCode != KeyEvent.KEYCODE_MEDIA_PLAY && + keyCode != KeyEvent.KEYCODE_MEDIA_PAUSE && + keyCode != KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE && + keyCode != KeyEvent.KEYCODE_HEADSETHOOK && + keyCode != KeyEvent.KEYCODE_MEDIA_STOP && + keyCode != KeyEvent.KEYCODE_MEDIA_NEXT && + keyCode != KeyEvent.KEYCODE_MEDIA_PREVIOUS && + keyCode != KeyEvent.KEYCODE_VOLUME_MUTE) { + return 0; + } + } + // Basic policy based on interactive state. int result; if (interactive || (isInjected && !isWakeKey)) { @@ -3767,7 +4056,57 @@ && isWakeKeyWhenScreenOff(keyCode)) { boolean useHapticFeedback = down && (policyFlags & WindowManagerPolicy.FLAG_VIRTUAL) != 0 && (!isNavBarVirtKey || mNavBarVirtualKeyHapticFeedbackEnabled) - && event.getRepeatCount() == 0; + && event.getRepeatCount() == 0 + && !isHwKeysDisabled(); + + // Specific device key handling + if (mDeviceKeyHandler != null) { + try { + // The device says if we should ignore this event. + if (mDeviceKeyHandler.isDisabledKeyEvent(event)) { + result &= ~ACTION_PASS_TO_USER; + return result; + } + if (mDeviceKeyHandler.isCameraLaunchEvent(event)) { + if (DEBUG_INPUT) { + Slog.i(TAG, "isCameraLaunchEvent from DeviceKeyHandler"); + } + GestureLauncherService gestureService = LocalServices.getService( + GestureLauncherService.class); + if (gestureService != null) { + gestureService.doCameraLaunchGesture(); + } + result &= ~ACTION_PASS_TO_USER; + return result; + } + if (!interactive && mDeviceKeyHandler.isWakeEvent(event)) { + if (DEBUG_INPUT) { + Slog.i(TAG, "isWakeEvent from DeviceKeyHandler"); + } + wakeUp(event.getEventTime(), mAllowTheaterModeWakeFromKey, + PowerManager.WAKE_REASON_WAKE_KEY, "android.policy:KEY"); + result &= ~ACTION_PASS_TO_USER; + return result; + } + final Intent eventLaunchActivity = mDeviceKeyHandler.isActivityLaunchEvent(event); + if (!interactive && eventLaunchActivity != null) { + if (DEBUG_INPUT) { + Slog.i(TAG, "isActivityLaunchEvent from DeviceKeyHandler " + eventLaunchActivity); + } + wakeUp(event.getEventTime(), mAllowTheaterModeWakeFromKey, + PowerManager.WAKE_REASON_WAKE_KEY, "android.policy:KEY"); + SyberiaUtils.launchKeyguardDismissIntent(mContext, UserHandle.CURRENT, eventLaunchActivity); + result &= ~ACTION_PASS_TO_USER; + return result; + } + if (mDeviceKeyHandler.handleKeyEvent(event)) { + result &= ~ACTION_PASS_TO_USER; + return result; + } + } catch (Exception e) { + Slog.w(TAG, "Could not dispatch event to device key handler", e); + } + } // Handle special keys. switch (keyCode) { @@ -3789,6 +4128,27 @@ && isWakeKeyWhenScreenOff(keyCode)) { case KeyEvent.KEYCODE_VOLUME_DOWN: case KeyEvent.KEYCODE_VOLUME_UP: case KeyEvent.KEYCODE_VOLUME_MUTE: { + if (mUseTvRouting) { + // On TVs volume keys never go to the foreground app + result &= ~ACTION_PASS_TO_USER; + } + if (!interactive && isWakeKey && down) { + mVolumeWakeActive = true; + break; + } + if (!down && mVolumeWakeActive) { + isWakeKey = false; + result &= ~ACTION_PASS_TO_USER; + mVolumeWakeActive = false; + break; + } + // we come back from a handled music control event - ignore the up event + if (!interactive && !down && mVolumeMusicControlActive) { + isWakeKey = false; + result &= ~ACTION_PASS_TO_USER; + mVolumeMusicControlActive = false; + break; + } if (down) { sendSystemKeyToStatusBarAsync(event.getKeyCode()); @@ -3847,6 +4207,38 @@ && isWakeKeyWhenScreenOff(keyCode)) { // figure out. MediaSessionLegacyHelper.getHelper(mContext).sendVolumeKeyEvent( event, AudioManager.USE_DEFAULT_STREAM_TYPE, true); + + boolean notHandledMusicControl = false; + if (!interactive && mVolumeMusicControl && isMusicActive()) { + if (down) { + if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) { + scheduleLongPressKeyEvent(event, KeyEvent.KEYCODE_MEDIA_PREVIOUS); + break; + } else if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) { + scheduleLongPressKeyEvent(event, KeyEvent.KEYCODE_MEDIA_NEXT); + break; + } + } else { + mHandler.removeMessages(MSG_DISPATCH_VOLKEY_WITH_WAKE_LOCK); + notHandledMusicControl = true; + } + } + if (down || notHandledMusicControl) { + KeyEvent newEvent = event; + if (!down) { + // Rewrite the event to use key-down if required + newEvent = new KeyEvent(KeyEvent.ACTION_DOWN, keyCode); + } + if (mUseTvRouting) { + dispatchDirectAudioEvent(newEvent); + } else { + // If we aren't passing to the user and no one else + // handled it send it to the session manager to + // figure out. + MediaSessionLegacyHelper.getHelper(mContext) + .sendVolumeKeyEvent(newEvent, AudioManager.USE_DEFAULT_STREAM_TYPE, true); + } + } } break; } @@ -3950,7 +4342,15 @@ && isWakeKeyWhenScreenOff(keyCode)) { case KeyEvent.KEYCODE_WAKEUP: { result &= ~ACTION_PASS_TO_USER; - isWakeKey = true; + // Double-tap-to-doze + if (mDoubleTapToWake && mDoubleTapToDoze && !mNativeDoubleTapToDozeAvailable) { + isWakeKey = false; + if (!down) { + mContext.sendBroadcast(new Intent("com.android.systemui.doze.pulse")); + } + } else { + isWakeKey = true; + } break; } @@ -4096,7 +4496,8 @@ private void handleKeyGesture(KeyEvent event, boolean interactive) { return; } - if (event.getKeyCode() == KEYCODE_POWER && event.getAction() == KeyEvent.ACTION_DOWN) { + if (event.getKeyCode() == KEYCODE_POWER && event.getAction() == KeyEvent.ACTION_DOWN + && mTorchActionMode != 1) { mPowerKeyHandled = handleCameraGesture(event, interactive); if (mPowerKeyHandled) { // handled by camera gesture. @@ -4196,6 +4597,9 @@ private boolean isWakeKeyWhenScreenOff(int keyCode) { switch (keyCode) { case KeyEvent.KEYCODE_VOLUME_UP: case KeyEvent.KEYCODE_VOLUME_DOWN: + if (mVolumeRockerWake) { + return true; + } case KeyEvent.KEYCODE_VOLUME_MUTE: return mDefaultDisplayPolicy.getDockMode() != Intent.EXTRA_DOCK_STATE_UNDOCKED; @@ -4271,6 +4675,20 @@ private boolean shouldDispatchInputWhenNonInteractive(int displayId, int keyCode return false; } + // Send events to a dozing dream even if the screen is off since the dream + // is in control of the state of the screen. + IDreamManager dreamManager = getDreamManager(); + try { + if (dreamManager != null && dreamManager.isDozing()) { + if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN + || keyCode == KeyEvent.KEYCODE_VOLUME_UP) { + return false; + } + } + } catch (RemoteException e) { + Slog.e(TAG, "RemoteException when checking if dreaming", e); + } + // Send events to keyguard while the screen is on and it's showing. if (isKeyguardShowingAndNotOccluded() && !displayOff) { return true; @@ -4287,12 +4705,8 @@ private boolean shouldDispatchInputWhenNonInteractive(int displayId, int keyCode // TODO(b/123372519): Refine when dream can support multi display. if (isDefaultDisplay) { - // Send events to a dozing dream even if the screen is off since the dream - // is in control of the state of the screen. - IDreamManager dreamManager = getDreamManager(); - try { - if (dreamManager != null && dreamManager.isDreaming()) { + if (dreamManager != null && dreamManager.isDreaming() && !dreamManager.isDozing()) { return true; } } catch (RemoteException e) { @@ -4474,6 +4888,9 @@ public void startedGoingToSleep(@PowerManager.GoToSleepReason int pmSleepReason) if (mKeyguardDelegate != null) { mKeyguardDelegate.onStartedGoingToSleep(pmSleepReason); } + if (mPocketManager != null) { + mPocketManager.onInteractiveChanged(false); + } } // Called on the PowerManager's Notifier thread. @@ -4552,6 +4969,10 @@ public void startedWakingUp(@PowerManager.WakeReason int pmWakeReason) { } mCameraGestureTriggered = false; + + if (mPocketManager != null) { + mPocketManager.onInteractiveChanged(true); + } } // Called on the PowerManager's Notifier thread. @@ -4809,6 +5230,72 @@ private void enableScreen(ScreenOnListener listener, boolean report) { } } + /** + * Perform operations if needed on pocket mode state changed. + * @see com.android.server.pocket.PocketService + * @see PocketLock + * @see this.mPocketCallback; + * @author Carlo Savignano + */ + private void handleDevicePocketStateChanged() { + final boolean interactive = mPowerManager.isInteractive(); + if (mIsDeviceInPocket) { + showPocketLock(interactive); + } else { + hidePocketLock(interactive); + } + } + + /** + * Check if we can show pocket lock once requested. + * @see com.android.server.pocket.PocketService + * @see PocketLock + * @see this.mPocketCallback; + * @author Carlo Savignano + */ + private void showPocketLock(boolean animate) { + if (!mSystemReady || !mSystemBooted || !mKeyguardDrawnOnce + || mPocketLock == null || mPocketLockShowing) { + return; + } + + if (mPowerManager.isInteractive() && !isKeyguardShowingAndNotOccluded()){ + return; + } + + if (DEBUG) { + Log.d(TAG, "showPocketLock, animate=" + animate); + } + + mPocketLock.show(animate); + mPocketLockShowing = true; + + mPocketManager.setPocketLockVisible(true); + } + + /** + * Check if we can hide pocket lock once requested. + * @see com.android.server.pocket.PocketService + * @see PocketLock + * @see this.mPocketCallback; + * @author Carlo Savignano + */ + private void hidePocketLock(boolean animate) { + if (!mSystemReady || !mSystemBooted || !mKeyguardDrawnOnce + || mPocketLock == null || !mPocketLockShowing) { + return; + } + + if (DEBUG) { + Log.d(TAG, "hidePocketLock, animate=" + animate); + } + + mPocketLock.hide(animate); + mPocketLockShowing = false; + + mPocketManager.setPocketLockVisible(false); + } + private void handleHideBootMessage() { synchronized (mLock) { if (!mKeyguardDrawnOnce) { @@ -4975,6 +5462,10 @@ public void systemReady() { // So it is better not to bind keyguard here. mKeyguardDelegate.onSystemReady(); + mPocketManager = (PocketManager) mContext.getSystemService(Context.POCKET_SERVICE); + mPocketManager.addCallback(mPocketCallback); + mPocketLock = new PocketLock(mContext); + mVrManagerInternal = LocalServices.getService(VrManagerInternal.class); if (mVrManagerInternal != null) { mVrManagerInternal.addPersistentVrModeStateListener(mPersistentVrModeListener); @@ -5558,6 +6049,24 @@ public boolean hasNavigationBar() { return mDefaultDisplayPolicy.hasNavigationBar(); } + @Override + public void sendCustomAction(Intent intent) { + String action = intent.getAction(); + if (action != null) { + if (SyberiaUtils.INTENT_SCREENSHOT.equals(action)) { + mContext.enforceCallingOrSelfPermission(Manifest.permission.ACCESS_SURFACE_FLINGER, + TAG + "sendCustomAction permission denied"); + interceptScreenshotChord( + TAKE_SCREENSHOT_FULLSCREEN, SCREENSHOT_KEY_OTHER, 0 /*pressDelay*/); + } else if (SyberiaUtils.INTENT_REGION_SCREENSHOT.equals(action)) { + mContext.enforceCallingOrSelfPermission(Manifest.permission.ACCESS_SURFACE_FLINGER, + TAG + "sendCustomAction permission denied"); + interceptScreenshotChord( + TAKE_SCREENSHOT_SELECTED_REGION, SCREENSHOT_KEY_OTHER, 0 /*pressDelay*/); + } + } + } + @Override public void setDismissImeOnBackKeyPressed(boolean newValue) { mDismissImeOnBackKeyPressed = newValue; @@ -5997,4 +6506,25 @@ public Boolean parseState(ExtconInfo extconIfno, String state) { } } + /** + * @return Whether music is being played right now "locally" (e.g. on the device's speakers + * or wired headphones) or "remotely" (e.g. on a device using the Cast protocol and + * controlled by this device, or through remote submix). + */ + private boolean isMusicActive() { + final AudioManager am = (AudioManager)mContext.getSystemService(Context.AUDIO_SERVICE); + if (am == null) { + Log.w(TAG, "isMusicActive: couldn't get AudioManager reference"); + return false; + } + return am.isMusicActive(); + } + + private void scheduleLongPressKeyEvent(KeyEvent origEvent, int keyCode) { + KeyEvent event = new KeyEvent(origEvent.getDownTime(), origEvent.getEventTime(), + origEvent.getAction(), keyCode, 0); + Message msg = mHandler.obtainMessage(MSG_DISPATCH_VOLKEY_WITH_WAKE_LOCK, event); + msg.setAsynchronous(true); + mHandler.sendMessageDelayed(msg, ViewConfiguration.getLongPressTimeout()); + } } diff --git a/services/core/java/com/android/server/policy/SingleKeyGestureDetector.java b/services/core/java/com/android/server/policy/SingleKeyGestureDetector.java index 7efa8978c185..069b6c80cd88 100644 --- a/services/core/java/com/android/server/policy/SingleKeyGestureDetector.java +++ b/services/core/java/com/android/server/policy/SingleKeyGestureDetector.java @@ -21,6 +21,8 @@ import android.os.Handler; import android.os.Looper; import android.os.Message; +import android.os.UserHandle; +import android.provider.Settings; import android.util.Log; import android.view.KeyEvent; import android.view.ViewConfiguration; @@ -56,6 +58,10 @@ public final class SingleKeyGestureDetector { private final Handler mHandler; private long mLastDownTime = 0; + static final int TORCH_DOUBLE_TAP_DELAY = 170; + + private Context mContext; + /** Supported gesture flags */ public static final int KEY_LONGPRESS = 1 << 1; public static final int KEY_VERYLONGPRESS = 1 << 2; @@ -171,7 +177,7 @@ public String toString() { } static SingleKeyGestureDetector get(Context context) { - SingleKeyGestureDetector detector = new SingleKeyGestureDetector(); + SingleKeyGestureDetector detector = new SingleKeyGestureDetector(context); sDefaultLongPressTimeout = context.getResources().getInteger( com.android.internal.R.integer.config_globalActionsKeyTimeout); sDefaultVeryLongPressTimeout = context.getResources().getInteger( @@ -179,7 +185,8 @@ static SingleKeyGestureDetector get(Context context) { return detector; } - private SingleKeyGestureDetector() { + public SingleKeyGestureDetector(Context context) { + mContext = context; mHandler = new KeyHandler(); } @@ -324,7 +331,11 @@ private boolean interceptKeyUp(KeyEvent event) { Message msg = mHandler.obtainMessage(MSG_KEY_DELAYED_PRESS, mActiveRule.mKeyCode, mKeyPressCounter, mActiveRule); msg.setAsynchronous(true); - mHandler.sendMessageDelayed(msg, MULTI_PRESS_TIMEOUT); + mHandler.sendMessageDelayed(msg, Settings.System.getIntForUser( + mContext.getContentResolver(), + Settings.System.TORCH_POWER_BUTTON_GESTURE, + 0, UserHandle.USER_CURRENT) == 1 ? TORCH_DOUBLE_TAP_DELAY + : MULTI_PRESS_TIMEOUT); } return true; } diff --git a/services/core/java/com/android/server/policy/SwipeToScreenshotListener.java b/services/core/java/com/android/server/policy/SwipeToScreenshotListener.java new file mode 100644 index 000000000000..ff6a7f5625c2 --- /dev/null +++ b/services/core/java/com/android/server/policy/SwipeToScreenshotListener.java @@ -0,0 +1,148 @@ +/* + * Copyright (C) 2019 The PixelExperience Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.policy; + +import android.content.Context; +import android.os.SystemProperties; +import android.provider.Settings; +import android.util.Log; +import android.util.DisplayMetrics; +import android.view.MotionEvent; +import android.view.WindowManagerPolicyConstants.PointerEventListener; + +public class SwipeToScreenshotListener implements PointerEventListener { + private static final String TAG = "SwipeToScreenshotListener"; + private static final int THREE_GESTURE_STATE_NONE = 0; + private static final int THREE_GESTURE_STATE_DETECTING = 1; + private static final int THREE_GESTURE_STATE_DETECTED_FALSE = 2; + private static final int THREE_GESTURE_STATE_DETECTED_TRUE = 3; + private static final int THREE_GESTURE_STATE_NO_DETECT = 4; + private boolean mBootCompleted; + private Context mContext; + private boolean mDeviceProvisioned = false; + private float[] mInitMotionY; + private int[] mPointerIds; + private int mThreeGestureState = THREE_GESTURE_STATE_NONE; + private int mThreeGestureThreshold; + private int mThreshold; + private final Callbacks mCallbacks; + DisplayMetrics mDisplayMetrics; + + public SwipeToScreenshotListener(Context context, Callbacks callbacks) { + mPointerIds = new int[3]; + mInitMotionY = new float[3]; + mContext = context; + mCallbacks = callbacks; + mDisplayMetrics = mContext.getResources().getDisplayMetrics(); + mThreshold = (int) (50.0f * mDisplayMetrics.density); + mThreeGestureThreshold = mThreshold * 3; + } + + @Override + public void onPointerEvent(MotionEvent event) { + if (!mBootCompleted) { + mBootCompleted = SystemProperties.getBoolean("sys.boot_completed", false); + return; + } + if (!mDeviceProvisioned) { + mDeviceProvisioned = Settings.Global.getInt(mContext.getContentResolver(), + Settings.Global.DEVICE_PROVISIONED, 0) != 0; + return; + } + if (event.getAction() == 0) { + changeThreeGestureState(THREE_GESTURE_STATE_NONE); + } else if (mThreeGestureState == THREE_GESTURE_STATE_NONE && event.getPointerCount() == 3) { + if (checkIsStartThreeGesture(event)) { + changeThreeGestureState(THREE_GESTURE_STATE_DETECTING); + for (int i = 0; i < 3; i++) { + mPointerIds[i] = event.getPointerId(i); + mInitMotionY[i] = event.getY(i); + } + } else { + changeThreeGestureState(THREE_GESTURE_STATE_NO_DETECT); + } + } + if (mThreeGestureState == THREE_GESTURE_STATE_DETECTING) { + if (event.getPointerCount() != 3) { + changeThreeGestureState(THREE_GESTURE_STATE_DETECTED_FALSE); + return; + } + if (event.getActionMasked() == MotionEvent.ACTION_MOVE) { + float distance = 0.0f; + int i = 0; + while (i < 3) { + int index = event.findPointerIndex(mPointerIds[i]); + if (index < 0 || index >= 3) { + changeThreeGestureState(THREE_GESTURE_STATE_DETECTED_FALSE); + return; + } else { + distance += event.getY(index) - mInitMotionY[i]; + i++; + } + } + if (distance >= ((float) mThreeGestureThreshold)) { + changeThreeGestureState(THREE_GESTURE_STATE_DETECTED_TRUE); + mCallbacks.onSwipeThreeFinger(); + } + } + } + } + + private void changeThreeGestureState(int state) { + if (mThreeGestureState != state){ + mThreeGestureState = state; + boolean shouldEnableProp = mThreeGestureState == THREE_GESTURE_STATE_DETECTED_TRUE || + mThreeGestureState == THREE_GESTURE_STATE_DETECTING; + try { + SystemProperties.set("sys.android.screenshot", shouldEnableProp ? "true" : "false"); + } catch(Exception e) { + Log.e(TAG, "Exception when setprop", e); + } + } + } + + private boolean checkIsStartThreeGesture(MotionEvent event) { + if (event.getEventTime() - event.getDownTime() > 500) { + return false; + } + int height = mDisplayMetrics.heightPixels; + int width = mDisplayMetrics.widthPixels; + float minX = Float.MAX_VALUE; + float maxX = Float.MIN_VALUE; + float minY = Float.MAX_VALUE; + float maxY = Float.MIN_VALUE; + for (int i = 0; i < event.getPointerCount(); i++) { + float x = event.getX(i); + float y = event.getY(i); + if (y > ((float) (height - mThreshold))) { + return false; + } + maxX = Math.max(maxX, x); + minX = Math.min(minX, x); + maxY = Math.max(maxY, y); + minY = Math.min(minY, y); + } + if (maxY - minY <= mDisplayMetrics.density * 150.0f) { + return maxX - minX <= ((float) (width < height ? width : height)); + } + return false; + } + + interface Callbacks { + void onSwipeThreeFinger(); + } +} diff --git a/services/core/java/com/android/server/policy/WindowManagerPolicy.java b/services/core/java/com/android/server/policy/WindowManagerPolicy.java index 89178139ffec..3a51b0e8c407 100644 --- a/services/core/java/com/android/server/policy/WindowManagerPolicy.java +++ b/services/core/java/com/android/server/policy/WindowManagerPolicy.java @@ -68,6 +68,7 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.content.Context; +import android.content.Intent; import android.content.res.Configuration; import android.graphics.Rect; import android.os.Bundle; @@ -257,6 +258,7 @@ public interface WindowManagerFuncs { public void shutdown(boolean confirm); public void reboot(boolean confirm); + public void reboot(boolean confirm, String reason); public void rebootSafeMode(boolean confirm); /** @@ -1043,6 +1045,11 @@ public boolean performHapticFeedback(int uid, String packageName, int effectId, */ public boolean hasNavigationBar(); + /** + * Send some ActionHandler commands to WindowManager. + */ + public void sendCustomAction(Intent intent); + /** * Lock the device now. */ diff --git a/services/core/java/com/android/server/policy/pocket/PocketLock.java b/services/core/java/com/android/server/policy/pocket/PocketLock.java new file mode 100644 index 000000000000..349cafb25092 --- /dev/null +++ b/services/core/java/com/android/server/policy/pocket/PocketLock.java @@ -0,0 +1,194 @@ +/* + * Copyright (C) 2016 The ParanoidAndroid Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.server.policy.pocket; + +import android.animation.Animator; +import android.content.Context; +import android.graphics.PixelFormat; +import android.os.Handler; +import android.view.Gravity; +import android.view.LayoutInflater; +import android.view.View; +import android.view.WindowManager; + +/** + * This class provides a fullscreen overlays view, displaying itself + * even on top of lock screen. While this view is displaying touch + * inputs are not passed to the the views below. + * @see android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ERROR; + * @author Carlo Savignano + */ +public class PocketLock { + + private final Context mContext; + private WindowManager mWindowManager; + private WindowManager.LayoutParams mLayoutParams; + private Handler mHandler; + private View mView; + private View mHintContainer; + + private boolean mAttached; + private boolean mAnimating; + + /** + * Creates pocket lock objects, inflate view and set layout parameters. + * @param context + */ + public PocketLock(Context context) { + mContext = context; + mHandler = new Handler(); + mWindowManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE); + mLayoutParams = getLayoutParams(); + mView = LayoutInflater.from(mContext).inflate( + com.android.internal.R.layout.pocket_lock_view, null); + } + + public void show(final boolean animate) { + final Runnable r = new Runnable() { + @Override + public void run() { + if (mAttached) { + return; + } + + if (mAnimating) { + mView.animate().cancel(); + } + + if (animate) { + mView.setLayerType(View.LAYER_TYPE_HARDWARE, null); + mView.animate().alpha(1.0f).setListener(new Animator.AnimatorListener() { + @Override + public void onAnimationStart(Animator animator) { + mAnimating = true; + } + + @Override + public void onAnimationEnd(Animator animator) { + mView.setLayerType(View.LAYER_TYPE_NONE, null); + mAnimating = false; + } + + @Override + public void onAnimationCancel(Animator animator) { + } + + @Override + public void onAnimationRepeat(Animator animator) { + } + }).withStartAction(new Runnable() { + @Override + public void run() { + mView.setAlpha(0.0f); + mView.setVisibility(View.VISIBLE); + addView(); + } + }).start(); + } else { + mView.setVisibility(View.VISIBLE); + mView.setAlpha(1.0f); + addView(); + } + } + }; + + mHandler.post(r); + } + + public void hide(final boolean animate) { + final Runnable r = new Runnable() { + @Override + public void run() { + if (!mAttached) { + return; + } + + if (mAnimating) { + mView.animate().cancel(); + } + + if (animate) { + mView.setLayerType(View.LAYER_TYPE_HARDWARE, null); + mView.animate().alpha(0.0f).setListener(new Animator.AnimatorListener() { + @Override + public void onAnimationStart(Animator animator) { + mAnimating = true; + } + + @Override + public void onAnimationEnd(Animator animator) { + mView.setVisibility(View.GONE); + mView.setLayerType(View.LAYER_TYPE_NONE, null); + mAnimating = false; + removeView(); + } + + @Override + public void onAnimationCancel(Animator animator) { + } + + @Override + public void onAnimationRepeat(Animator animator) { + } + }).start(); + } else { + mView.setVisibility(View.GONE); + mView.setAlpha(0.0f); + removeView(); + } + } + }; + + mHandler.post(r); + } + + private void addView() { + if (mWindowManager != null && !mAttached) { + mWindowManager.addView(mView, mLayoutParams); + mView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN + | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY + | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); + mAttached = true; + } + } + + private void removeView() { + if (mWindowManager != null && mAttached) { + mView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE); + mWindowManager.removeView(mView); + mAnimating = false; + mAttached = false; + } + } + + private WindowManager.LayoutParams getLayoutParams() { + mLayoutParams = new WindowManager.LayoutParams(); + mLayoutParams.format = PixelFormat.TRANSLUCENT; + mLayoutParams.height = WindowManager.LayoutParams.MATCH_PARENT; + mLayoutParams.width = WindowManager.LayoutParams.MATCH_PARENT; + mLayoutParams.gravity = Gravity.CENTER; + mLayoutParams.type = WindowManager.LayoutParams.TYPE_SYSTEM_ERROR; + mLayoutParams.layoutInDisplayCutoutMode = + WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES; + mLayoutParams.flags = WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH + | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED + | WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED + | WindowManager.LayoutParams.FLAG_FULLSCREEN + | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN; + return mLayoutParams; + } + +} diff --git a/services/core/java/com/android/server/power/Notifier.java b/services/core/java/com/android/server/power/Notifier.java index 685b744c8062..02126ea2b93f 100644 --- a/services/core/java/com/android/server/power/Notifier.java +++ b/services/core/java/com/android/server/power/Notifier.java @@ -827,9 +827,6 @@ public void onReceive(Context context, Intent intent) { }; private void playChargingStartedFeedback(@UserIdInt int userId, boolean wireless) { - if (!isChargingFeedbackEnabled(userId)) { - return; - } if (!mIsPlayingChargingStartedFeedback.compareAndSet(false, true)) { // there's already a charging started feedback Runnable scheduled to run on the @@ -847,6 +844,7 @@ private void playChargingStartedFeedback(@UserIdInt int userId, boolean wireless HARDWARE_FEEDBACK_VIBRATION_ATTRIBUTES); } + if (isChargingFeedbackEnabled(userId)) { // play sound final String soundPath = Settings.Global.getString(mContext.getContentResolver(), wireless ? Settings.Global.WIRELESS_CHARGING_STARTED_SOUND @@ -859,6 +857,7 @@ private void playChargingStartedFeedback(@UserIdInt int userId, boolean wireless sfx.play(); } } + } mIsPlayingChargingStartedFeedback.set(false); }); } diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java index 8c52717b1a20..5dd76a9d71be 100644 --- a/services/core/java/com/android/server/power/PowerManagerService.java +++ b/services/core/java/com/android/server/power/PowerManagerService.java @@ -553,6 +553,9 @@ public final class PowerManagerService extends SystemService // A bitfield of battery conditions under which to make the screen stay on. private int mStayOnWhilePluggedInSetting; + // True if the device should wake up when plugged or unplugged + private int mWakeUpWhenPluggedOrUnpluggedSetting; + // True if the device should stay on. private boolean mStayOn; @@ -1332,6 +1335,9 @@ private void systemReady() { resolver.registerContentObserver(Settings.Global.getUriFor( Settings.Global.DEVICE_DEMO_MODE), false, mSettingsObserver, UserHandle.USER_SYSTEM); + resolver.registerContentObserver(Settings.Global.getUriFor( + Settings.Global.WAKE_WHEN_PLUGGED_OR_UNPLUGGED), + false, mSettingsObserver, UserHandle.USER_ALL); IVrManager vrManager = IVrManager.Stub.asInterface(getBinderService(Context.VR_SERVICE)); if (vrManager != null) { try { @@ -1459,6 +1465,10 @@ private void updateSettingsLocked() { Settings.System.SCREEN_BRIGHTNESS_MODE, Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL, UserHandle.USER_CURRENT); + mWakeUpWhenPluggedOrUnpluggedSetting = Settings.Global.getInt(resolver, + Settings.Global.WAKE_WHEN_PLUGGED_OR_UNPLUGGED, + (mWakeUpWhenPluggedOrUnpluggedConfig ? 1 : 0)); + mDirty |= DIRTY_SETTINGS; } @@ -2474,7 +2484,7 @@ private void updateIsPoweredLocked(int dirty) { private boolean shouldWakeUpWhenPluggedOrUnpluggedLocked( boolean wasPowered, int oldPlugType, boolean dockedOnWirelessCharger) { // Don't wake when powered unless configured to do so. - if (!mWakeUpWhenPluggedOrUnpluggedConfig) { + if (mWakeUpWhenPluggedOrUnpluggedSetting == 0) { return false; } @@ -3734,7 +3744,7 @@ private void handleBatteryStateChangedLocked() { } private void shutdownOrRebootInternal(final @HaltMode int haltMode, final boolean confirm, - @Nullable final String reason, boolean wait) { + @Nullable final String reason, boolean wait, final boolean custom) { if (PowerManager.REBOOT_USERSPACE.equals(reason)) { if (!PowerManager.isRebootingUserspaceSupportedImpl()) { throw new UnsupportedOperationException( @@ -3761,7 +3771,11 @@ public void run() { if (haltMode == HALT_MODE_REBOOT_SAFE_MODE) { ShutdownThread.rebootSafeMode(getUiContext(), confirm); } else if (haltMode == HALT_MODE_REBOOT) { - ShutdownThread.reboot(getUiContext(), reason, confirm); + if (custom) { + ShutdownThread.rebootCustom(getUiContext(), reason, confirm); + } else { + ShutdownThread.reboot(getUiContext(), reason, confirm); + } } else { ShutdownThread.shutdown(getUiContext(), reason, confirm); } @@ -6109,7 +6123,7 @@ public void reboot(boolean confirm, @Nullable String reason, boolean wait) { ShutdownCheckPoints.recordCheckPoint(Binder.getCallingPid(), reason); final long ident = Binder.clearCallingIdentity(); try { - shutdownOrRebootInternal(HALT_MODE_REBOOT, confirm, reason, wait); + shutdownOrRebootInternal(HALT_MODE_REBOOT, confirm, reason, wait, false); } finally { Binder.restoreCallingIdentity(ident); } @@ -6129,7 +6143,30 @@ public void rebootSafeMode(boolean confirm, boolean wait) { ShutdownCheckPoints.recordCheckPoint(Binder.getCallingPid(), reason); final long ident = Binder.clearCallingIdentity(); try { - shutdownOrRebootInternal(HALT_MODE_REBOOT_SAFE_MODE, confirm, reason, wait); + shutdownOrRebootInternal(HALT_MODE_REBOOT_SAFE_MODE, confirm, + reason, wait, false); + } finally { + Binder.restoreCallingIdentity(ident); + } + } + + /** + * Reboots the device with custom progress message. + * + * @param confirm If true, shows a reboot confirmation dialog. + * @param reason The reason for the reboot, or null if none. + * @param wait If true, this call waits for the reboot to complete and does not return. + */ + @Override // Binder call + public void rebootCustom(boolean confirm, String reason, boolean wait) { + mContext.enforceCallingOrSelfPermission(android.Manifest.permission.REBOOT, null); + if (PowerManager.REBOOT_RECOVERY.equals(reason)) { + mContext.enforceCallingOrSelfPermission(android.Manifest.permission.RECOVERY, null); + } + + final long ident = Binder.clearCallingIdentity(); + try { + shutdownOrRebootInternal(HALT_MODE_REBOOT, confirm, reason, wait, true); } finally { Binder.restoreCallingIdentity(ident); } @@ -6148,7 +6185,7 @@ public void shutdown(boolean confirm, String reason, boolean wait) { ShutdownCheckPoints.recordCheckPoint(Binder.getCallingPid(), reason); final long ident = Binder.clearCallingIdentity(); try { - shutdownOrRebootInternal(HALT_MODE_SHUTDOWN, confirm, reason, wait); + shutdownOrRebootInternal(HALT_MODE_SHUTDOWN, confirm, reason, wait, false); } finally { Binder.restoreCallingIdentity(ident); } diff --git a/services/core/java/com/android/server/power/ShutdownThread.java b/services/core/java/com/android/server/power/ShutdownThread.java index a82d4eaa5b28..e22e42fef919 100644 --- a/services/core/java/com/android/server/power/ShutdownThread.java +++ b/services/core/java/com/android/server/power/ShutdownThread.java @@ -84,6 +84,7 @@ public final class ShutdownThread extends Thread { private static boolean sIsStarted = false; private static boolean mReboot; + private static boolean mRebootCustom; private static boolean mRebootSafeMode; private static boolean mRebootHasProgressBar; private static String mReason; @@ -147,6 +148,7 @@ private ShutdownThread() { */ public static void shutdown(final Context context, String reason, boolean confirm) { mReboot = false; + mRebootCustom = false; mRebootSafeMode = false; mReason = reason; shutdownInner(context, confirm); @@ -239,6 +241,23 @@ public void onDismiss(DialogInterface unused) { */ public static void reboot(final Context context, String reason, boolean confirm) { mReboot = true; + mRebootCustom = false; + mRebootSafeMode = false; + mRebootHasProgressBar = false; + mReason = reason; + shutdownInner(context, confirm); + } + + /** + * Request reboot system, reboot recovery or reboot bootloader + * + * @param context Context used to display the shutdown progress dialog. + * @param reason code to pass to the kernel (e.g. "recovery", "bootloader"), or null. + * @param confirm true if user confirmation is needed before rebooting. + */ + public static void rebootCustom(final Context context, String reason, boolean confirm) { + mReboot = true; + mRebootCustom = true; mRebootSafeMode = false; mRebootHasProgressBar = false; mReason = reason; @@ -260,6 +279,7 @@ public static void rebootSafeMode(final Context context, boolean confirm) { } mReboot = true; + mRebootCustom = false; mRebootSafeMode = true; mRebootHasProgressBar = false; mReason = null; @@ -323,7 +343,7 @@ private static ProgressDialog showShutdownDialog(Context context) { pd.setTitle(context.getText(com.android.internal.R.string.power_off)); pd.setMessage(context.getText(com.android.internal.R.string.shutdown_progress)); pd.setIndeterminate(true); - } else if (showSysuiReboot()) { + } else if (mRebootCustom && showSysuiReboot()) { return null; } else { // Factory reset path. Set the dialog message accordingly. @@ -352,7 +372,7 @@ private static boolean showSysuiReboot() { try { StatusBarManagerInternal service = LocalServices.getService( StatusBarManagerInternal.class); - if (service.showShutdownUi(mReboot, mReason)) { + if (service.showShutdownUi(mReboot, mReason, mRebootCustom)) { // Sysui will handle shutdown UI. Log.d(TAG, "SysUI handling shutdown UI"); return true; diff --git a/services/core/java/com/android/server/statusbar/StatusBarManagerInternal.java b/services/core/java/com/android/server/statusbar/StatusBarManagerInternal.java index b00d8b47906a..760ac69ec32a 100644 --- a/services/core/java/com/android/server/statusbar/StatusBarManagerInternal.java +++ b/services/core/java/com/android/server/statusbar/StatusBarManagerInternal.java @@ -109,7 +109,7 @@ void appTransitionStarting(int displayId, long statusBarAnimationsStartTime, */ void setTopAppHidesStatusBar(boolean hidesStatusBar); - boolean showShutdownUi(boolean isReboot, String requestString); + boolean showShutdownUi(boolean isReboot, String requestString, boolean rebootCustom); /** * Show a rotation suggestion that a user may approve to rotate the screen. diff --git a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java index 46e7574e1c8a..4d080efa91a6 100644 --- a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java +++ b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java @@ -550,13 +550,13 @@ public void setTopAppHidesStatusBar(boolean hidesStatusBar) { } @Override - public boolean showShutdownUi(boolean isReboot, String reason) { + public boolean showShutdownUi(boolean isReboot, String reason, boolean rebootCustom) { if (!mContext.getResources().getBoolean(R.bool.config_showSysuiShutdown)) { return false; } if (mBar != null) { try { - mBar.showShutdownUi(isReboot, reason); + mBar.showShutdownUi(isReboot, reason, rebootCustom); return true; } catch (RemoteException ex) {} } @@ -775,6 +775,18 @@ public void togglePanel() { } } + @Override + public void toggleSettingsPanel() { + enforceExpandStatusBar(); + + if (mBar != null) { + try { + mBar.toggleSettingsPanel(); + } catch (RemoteException ex) { + } + } + } + @Override public void expandSettingsPanel(String subPanel) { enforceExpandStatusBar(); @@ -787,6 +799,54 @@ public void expandSettingsPanel(String subPanel) { } } + @Override + public void toggleRecentApps() { + enforceStatusBarService(); + + if (mBar != null) { + try { + mBar.toggleRecentApps(); + } catch (RemoteException ex) { + } + } + } + + @Override + public void toggleSplitScreen() { + enforceStatusBarService(); + + if (mBar != null) { + try { + mBar.toggleSplitScreen(); + } catch (RemoteException ex) { + } + } + } + + @Override + public void preloadRecentApps() { + enforceStatusBarService(); + + if (mBar != null) { + try { + mBar.preloadRecentApps(); + } catch (RemoteException ex) { + } + } + } + + @Override + public void cancelPreloadRecentApps() { + enforceStatusBarService(); + + if (mBar != null) { + try { + mBar.cancelPreloadRecentApps(); + } catch (RemoteException ex) { + } + } + } + public void addTile(ComponentName component) { enforceStatusBarOrShell(); @@ -939,6 +999,15 @@ public void setUdfpsHbmListener(IUdfpsHbmListener listener) { } } + public void killForegroundApp() { + if (mBar != null) { + try { + mBar.killForegroundApp(); + } catch (RemoteException ex) { + } + } + } + @Override public void startTracing() { if (mBar != null) { @@ -965,6 +1034,27 @@ public boolean isTracing() { return mTracingEnabled; } + @Override + public void toggleCameraFlash() { + if (mBar != null) { + try { + mBar.toggleCameraFlash(); + } catch (RemoteException ex) { + } + } + } + + @Override + public void setBlockedGesturalNavigation(boolean blocked) { + if (mBar != null) { + try { + mBar.setBlockedGesturalNavigation(blocked); + } catch (RemoteException ex) { + // do nothing + } + } + } + // TODO(b/117478341): make it aware of multi-display if needed. @Override public void disable(int what, IBinder token, String pkg) { @@ -1426,12 +1516,12 @@ public void shutdown() { * Allows the status bar to reboot the device. */ @Override - public void reboot(boolean safeMode) { + public void reboot(boolean safeMode, String reason) { enforceStatusBarService(); - String reason = safeMode + String rebootReason = safeMode ? PowerManager.REBOOT_SAFE_MODE : PowerManager.SHUTDOWN_USER_REQUESTED; - ShutdownCheckPoints.recordCheckPoint(Binder.getCallingPid(), reason); + ShutdownCheckPoints.recordCheckPoint(Binder.getCallingPid(), rebootReason); final long identity = Binder.clearCallingIdentity(); try { mNotificationDelegate.prepareForPossibleShutdown(); @@ -1440,7 +1530,7 @@ public void reboot(boolean safeMode) { if (safeMode) { ShutdownThread.rebootSafeMode(getUiContext(), true); } else { - ShutdownThread.reboot(getUiContext(), reason, false); + ShutdownThread.rebootCustom(getUiContext(), reason, false); } }); } finally { @@ -1990,6 +2080,17 @@ public void unregisterSessionListener(@SessionFlags int sessionFlags, mSessionMonitor.unregisterSessionListener(sessionFlags, listener); } + @Override + public void startAssist(Bundle args) { + enforceStatusBarService(); + if (mBar != null) { + try { + mBar.startAssist(args); + } catch (RemoteException ex) { + } + } + } + public String[] getStatusBarIcons() { return mContext.getResources().getStringArray(R.array.config_statusBarIcons); } diff --git a/services/core/java/com/android/server/testharness/TestHarnessModeService.java b/services/core/java/com/android/server/testharness/TestHarnessModeService.java index b6a413524c5c..452bdf409828 100644 --- a/services/core/java/com/android/server/testharness/TestHarnessModeService.java +++ b/services/core/java/com/android/server/testharness/TestHarnessModeService.java @@ -189,6 +189,7 @@ private void setUpAdbFiles(PersistentData persistentData) { if (adbManager.getAdbTempKeysFile() != null) { writeBytesToFile(persistentData.mAdbTempKeys, adbManager.getAdbTempKeysFile().toPath()); } + adbManager.notifyKeyFilesUpdated(); } private void configureUser() { diff --git a/services/core/java/com/android/server/trust/TrustManagerService.java b/services/core/java/com/android/server/trust/TrustManagerService.java index 80ce70de2138..b45cc04dada7 100644 --- a/services/core/java/com/android/server/trust/TrustManagerService.java +++ b/services/core/java/com/android/server/trust/TrustManagerService.java @@ -84,6 +84,7 @@ import com.android.internal.widget.LockPatternUtils; import com.android.server.LocalServices; import com.android.server.SystemService; +import com.android.server.app.AppLockManagerServiceInternal; import com.android.server.companion.virtual.VirtualDeviceManagerInternal; import org.xmlpull.v1.XmlPullParser; @@ -231,6 +232,8 @@ private enum TimeoutType { private boolean mTrustAgentsCanRun = false; private int mCurrentUser = UserHandle.USER_SYSTEM; + private AppLockManagerServiceInternal mAppLockManagerService = null; + public TrustManagerService(Context context) { super(context); mContext = context; @@ -926,7 +929,15 @@ private void refreshDeviceLockedForUser(int userId, int unlockedUser) { } setDeviceLockedForUser(id, deviceLocked); + getAppLockManagerService().notifyDeviceLocked(deviceLocked, id); + } + } + + private AppLockManagerServiceInternal getAppLockManagerService() { + if (mAppLockManagerService == null) { + mAppLockManagerService = LocalServices.getService(AppLockManagerServiceInternal.class); } + return mAppLockManagerService; } private void setDeviceLockedForUser(@UserIdInt int userId, boolean locked) { diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java index f25929c36060..e197319707e3 100644 --- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java +++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java @@ -1337,6 +1337,7 @@ public void onServiceConnected(ComponentName name, IBinder service) { } FgThread.getHandler().removeCallbacks(mResetRunnable); mContext.getMainThreadHandler().removeCallbacks(mTryToRebindRunnable); + mContext.getMainThreadHandler().removeCallbacks(mDisconnectRunnable); } } } @@ -2713,6 +2714,13 @@ public float getWallpaperDimAmount() { checkPermission(android.Manifest.permission.SET_WALLPAPER_DIM_AMOUNT); synchronized (mLock) { WallpaperData data = mWallpaperMap.get(mCurrentUserId); + if (data == null) { + data = mWallpaperMap.get(UserHandle.USER_SYSTEM); + if (data == null) { + Slog.e(TAG, "getWallpaperDimAmount: wallpaperData is null"); + return 0.0f; + } + } return data.mWallpaperDimAmount; } } diff --git a/services/core/java/com/android/server/webkit/SystemImpl.java b/services/core/java/com/android/server/webkit/SystemImpl.java index 68f554cb2758..684f08c41e96 100644 --- a/services/core/java/com/android/server/webkit/SystemImpl.java +++ b/services/core/java/com/android/server/webkit/SystemImpl.java @@ -49,6 +49,7 @@ * @hide */ public class SystemImpl implements SystemInterface { + private static final boolean DEBUG = Build.IS_DEBUGGABLE; private static final String TAG = SystemImpl.class.getSimpleName(); private static final String TAG_START = "webviewproviders"; private static final String TAG_WEBVIEW_PROVIDER = "webviewprovider"; @@ -78,6 +79,7 @@ private SystemImpl() { try { parser = AppGlobals.getInitialApplication().getResources().getXml( com.android.internal.R.xml.config_webview_packages); + if (DEBUG) Log.d(TAG, "Opening webview packages config"); XmlUtils.beginDocument(parser, TAG_START); while(true) { XmlUtils.nextElement(parser); @@ -86,6 +88,7 @@ private SystemImpl() { break; } if (element.equals(TAG_WEBVIEW_PROVIDER)) { + if (DEBUG) Log.d(TAG, "Found webview provider tag"); String packageName = parser.getAttributeValue(null, TAG_PACKAGE_NAME); if (packageName == null) { throw new AndroidRuntimeException( @@ -100,6 +103,7 @@ private SystemImpl() { parser.getAttributeValue(null, TAG_AVAILABILITY)); boolean isFallback = "true".equals( parser.getAttributeValue(null, TAG_FALLBACK)); + if (DEBUG) Log.d(TAG, "webview provider: packageName=" + packageName + " availableByDefault=" + availableByDefault); WebViewProviderInfo currentProvider = new WebViewProviderInfo( packageName, description, availableByDefault, isFallback, readSignatures(parser)); @@ -117,6 +121,7 @@ private SystemImpl() { if (currentProvider.availableByDefault) { numAvailableByDefaultPackages++; } + if (DEBUG) Log.d(TAG, "adding webview provider to list: " + packageName); webViewProviders.add(currentProvider); } else { @@ -134,6 +139,7 @@ private SystemImpl() { } mWebViewProviderPackages = webViewProviders.toArray(new WebViewProviderInfo[webViewProviders.size()]); + if (DEBUG) Log.d(TAG, "webview provider iteration finished, found: " + mWebViewProviderPackages); } /** * Returns all packages declared in the framework resources as potential WebView providers. diff --git a/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java b/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java index 43d62aaa120a..16e7fa6a82a8 100644 --- a/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java +++ b/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java @@ -21,6 +21,7 @@ import android.content.pm.PackageManager.NameNotFoundException; import android.content.pm.Signature; import android.os.AsyncTask; +import android.os.Build; import android.os.Trace; import android.os.UserHandle; import android.util.Slog; @@ -65,6 +66,7 @@ */ class WebViewUpdateServiceImpl { private static final String TAG = WebViewUpdateServiceImpl.class.getSimpleName(); + private static final boolean DEBUG = Build.IS_DEBUGGABLE; private static class WebViewPackageMissingException extends Exception { WebViewPackageMissingException(String message) { @@ -389,13 +391,17 @@ private static class ProviderAndPackageInfo { private ProviderAndPackageInfo[] getValidWebViewPackagesAndInfos() { WebViewProviderInfo[] allProviders = mSystemInterface.getWebViewPackages(); + if (DEBUG) Slog.d(TAG, "getValidWebViewPackagesAndInfos: allProviders.length=" + allProviders.length); List providers = new ArrayList<>(); for (int n = 0; n < allProviders.length; n++) { try { PackageInfo packageInfo = mSystemInterface.getPackageInfoForProvider(allProviders[n]); - if (validityResult(allProviders[n], packageInfo) == VALIDITY_OK) { + int validity = validityResult(allProviders[n], packageInfo); + if (validity == VALIDITY_OK) { providers.add(new ProviderAndPackageInfo(allProviders[n], packageInfo)); + } else { + Slog.e(TAG, "WebView provider failed validityResult: name=" + packageInfo.packageName + " cause= " + getInvalidityReason(validity)); } } catch (NameNotFoundException e) { // Don't add non-existent packages @@ -412,8 +418,10 @@ private ProviderAndPackageInfo[] getValidWebViewPackagesAndInfos() { */ private PackageInfo findPreferredWebViewPackage() throws WebViewPackageMissingException { ProviderAndPackageInfo[] providers = getValidWebViewPackagesAndInfos(); + if (DEBUG) Slog.d(TAG, "findPreferredWebViewPackage: providers.length=" + providers.length); String userChosenProvider = mSystemInterface.getUserChosenWebViewProvider(mContext); + if (DEBUG) Slog.d(TAG, "findPreferredWebViewPackage: userChosenProvider=" + userChosenProvider); // If the user has chosen provider, use that (if it's installed and enabled for all // users). @@ -429,18 +437,26 @@ private PackageInfo findPreferredWebViewPackage() throws WebViewPackageMissingEx } } + if (DEBUG) Slog.d(TAG, "findPreferredWebViewPackage: userChosenProvider did not pan out"); + // User did not choose, or the choice failed; use the most stable provider that is // installed and enabled for all users, and available by default (not through // user choice). for (ProviderAndPackageInfo providerAndPackage : providers) { + if (DEBUG) Slog.d(TAG, "findPreferredWebViewPackage: providerAndPackage.packageInfo.packageName=" + providerAndPackage.packageInfo.packageName); if (providerAndPackage.provider.availableByDefault) { // userPackages can contain null objects. List userPackages = mSystemInterface.getPackageInfoForProviderAllUsers(mContext, providerAndPackage.provider); + if (DEBUG) Slog.d(TAG, "findPreferredWebViewPackage: userPackages=" + userPackages); if (isInstalledAndEnabledForAllUsers(userPackages)) { return providerAndPackage.packageInfo; + } else { + if (DEBUG) Slog.d(TAG, "findPreferredWebViewPackage: isInstalledAndEnabledForAllUsers=false"); } + } else { + if (DEBUG) Slog.d(TAG, "findPreferredWebViewPackage: not available by default providerAndPackage.packageInfo.packageName=" + providerAndPackage.packageInfo.packageName); } } diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java index ab936a6954d6..a903f18c2d90 100644 --- a/services/core/java/com/android/server/wm/ActivityRecord.java +++ b/services/core/java/com/android/server/wm/ActivityRecord.java @@ -354,8 +354,6 @@ import dalvik.annotation.optimization.NeverCompile; -import com.google.android.collect.Sets; - import org.xmlpull.v1.XmlPullParserException; import java.io.File; @@ -3406,20 +3404,6 @@ private void finishActivityResults(int resultCode, Intent resultData, } mDisplayContent.prepareAppTransition(TRANSIT_CLOSE); - // When finishing the activity preemptively take the snapshot before the app window - // is marked as hidden and any configuration changes take place - // Note that RecentsAnimation will handle task snapshot while switching apps with - // the best capture timing (e.g. IME window capture), - // No need additional task capture while task is controlled by RecentsAnimation. - if (mAtmService.mWindowManager.mTaskSnapshotController != null - && !(task.isAnimatingByRecents() - || mTransitionController.inRecentsTransition(task))) { - final ArraySet tasks = Sets.newArraySet(task); - mAtmService.mWindowManager.mTaskSnapshotController.snapshotTasks(tasks); - mAtmService.mWindowManager.mTaskSnapshotController - .addSkipClosingAppSnapshotTasks(tasks); - } - // Tell window manager to prepare for this one to be removed. setVisibility(false); @@ -4884,8 +4868,12 @@ ActivityOptions getOptions() { ActivityOptions takeOptions() { if (DEBUG_TRANSITION) Slog.i(TAG, "Taking options for " + this + " callers=" + Debug.getCallers(6)); + if (mPendingOptions == null) return null; final ActivityOptions opts = mPendingOptions; mPendingOptions = null; + // Strip sensitive information from options before sending it to app. + opts.setRemoteTransition(null); + opts.setRemoteAnimationAdapter(null); return opts; } diff --git a/services/core/java/com/android/server/wm/ActivityStartInterceptor.java b/services/core/java/com/android/server/wm/ActivityStartInterceptor.java index a452013bf42a..b2d8a77eef98 100644 --- a/services/core/java/com/android/server/wm/ActivityStartInterceptor.java +++ b/services/core/java/com/android/server/wm/ActivityStartInterceptor.java @@ -61,6 +61,7 @@ import com.android.internal.app.UnlaunchableAppActivity; import com.android.server.LocalServices; import com.android.server.am.ActivityManagerService; +import com.android.server.app.AppLockManagerServiceInternal; import com.android.server.wm.ActivityInterceptorCallback.ActivityInterceptResult; /** @@ -184,6 +185,9 @@ boolean intercept(Intent intent, ResolveInfo rInfo, ActivityInfo aInfo, String r if (interceptLockedManagedProfileIfNeeded()) { return true; } + if (interceptLockedAppIfNeeded()) { + return true; + } final SparseArray callbacks = mService.getActivityInterceptorCallbacks(); @@ -424,4 +428,32 @@ private ActivityInterceptorCallback.ActivityInterceptorInfo getInterceptorInfo( mRInfo, mAInfo, mResolvedType, mCallingPid, mCallingUid, mActivityOptions, clearOptionsAnimation); } + + private AppLockManagerServiceInternal getAppLockManagerService() { + return mService.getAppLockManagerService(); + } + + private boolean interceptLockedAppIfNeeded() { + if (getAppLockManagerService() == null) return false; + final Intent interceptingIntent = getAppLockManagerService().interceptActivity(getInterceptorInfo(null)); + if (interceptingIntent == null) return false; + mIntent = interceptingIntent; + mCallingPid = mRealCallingPid; + mCallingUid = mRealCallingUid; + mResolvedType = null; + // If we are intercepting and there was a task, convert it into an extra for the + // ConfirmCredentials intent and unassign it, as otherwise the task will move to + // front even if ConfirmCredentials is cancelled. + if (mInTask != null) { + mIntent.putExtra(EXTRA_TASK_ID, mInTask.mTaskId); + mInTask = null; + } + if (mActivityOptions == null) { + mActivityOptions = ActivityOptions.makeBasic(); + } + + mRInfo = mSupervisor.resolveIntent(mIntent, mResolvedType, mUserId, 0, mRealCallingUid); + mAInfo = mSupervisor.resolveActivity(mIntent, mRInfo, mStartFlags, null /*profilerInfo*/); + return true; + } } diff --git a/services/core/java/com/android/server/wm/ActivityStarter.java b/services/core/java/com/android/server/wm/ActivityStarter.java index 84cd63424cd1..ec9babf09ef3 100644 --- a/services/core/java/com/android/server/wm/ActivityStarter.java +++ b/services/core/java/com/android/server/wm/ActivityStarter.java @@ -78,6 +78,10 @@ import static com.android.server.wm.LaunchParamsController.LaunchParamsModifier.PHASE_BOUNDS; import static com.android.server.wm.LaunchParamsController.LaunchParamsModifier.PHASE_DISPLAY; import static com.android.server.wm.Task.REPARENT_MOVE_ROOT_TASK_TO_FRONT; +import static com.android.server.wm.TaskFragment.EMBEDDING_ALLOWED; +import static com.android.server.wm.TaskFragment.EMBEDDING_DISALLOWED_MIN_DIMENSION_VIOLATION; +import static com.android.server.wm.TaskFragment.EMBEDDING_DISALLOWED_NEW_TASK; +import static com.android.server.wm.TaskFragment.EMBEDDING_DISALLOWED_UNTRUSTED_HOST; import static com.android.server.wm.WindowContainer.POSITION_TOP; import android.annotation.NonNull; @@ -131,6 +135,7 @@ import com.android.server.uri.NeededUriGrants; import com.android.server.wm.ActivityMetricsLogger.LaunchingState; import com.android.server.wm.LaunchParamsController.LaunchParams; +import com.android.server.wm.TaskFragment.EmbeddingCheckResult; import java.io.PrintWriter; import java.text.DateFormat; @@ -2038,12 +2043,6 @@ int isAllowedToStart(ActivityRecord r, boolean newTask, Task targetTask) { } } - if (mInTaskFragment != null && !canEmbedActivity(mInTaskFragment, r, newTask, targetTask)) { - Slog.e(TAG, "Permission denied: Cannot embed " + r + " to " + mInTaskFragment.getTask() - + " targetTask= " + targetTask); - return START_PERMISSION_DENIED; - } - // Do not start the activity if target display's DWPC does not allow it. // We can't return fatal error code here because it will crash the caller of // startActivity() if they don't catch the exception. We don't expect 3P apps to make @@ -2070,19 +2069,21 @@ int isAllowedToStart(ActivityRecord r, boolean newTask, Task targetTask) { } /** - * Return {@code true} if an activity can be embedded to the TaskFragment. + * Returns whether embedding of {@code starting} is allowed. + * * @param taskFragment the TaskFragment for embedding. * @param starting the starting activity. - * @param newTask whether the starting activity is going to be launched on a new task. * @param targetTask the target task for launching activity, which could be different from * the one who hosting the embedding. */ - private boolean canEmbedActivity(@NonNull TaskFragment taskFragment, - @NonNull ActivityRecord starting, boolean newTask, Task targetTask) { + @VisibleForTesting + @EmbeddingCheckResult + static int canEmbedActivity(@NonNull TaskFragment taskFragment, + @NonNull ActivityRecord starting, @NonNull Task targetTask) { final Task hostTask = taskFragment.getTask(); // Not allowed embedding a separate task or without host task. - if (hostTask == null || newTask || targetTask != hostTask) { - return false; + if (hostTask == null || targetTask != hostTask) { + return EMBEDDING_DISALLOWED_NEW_TASK; } return taskFragment.isAllowedToEmbedActivity(starting); @@ -2894,19 +2895,16 @@ private void deliverNewIntent(ActivityRecord activity, NeededUriGrants intentGra mIntentDelivered = true; } + /** Places {@link #mStartActivity} in {@code task} or an embedded {@link TaskFragment}. */ private void addOrReparentStartingActivity(@NonNull Task task, String reason) { TaskFragment newParent = task; if (mInTaskFragment != null) { - // TODO(b/234351413): remove remaining embedded Task logic. - // mInTaskFragment is created and added to the leaf task by task fragment organizer's - // request. If the task was resolved and different than mInTaskFragment, reparent the - // task to mInTaskFragment for embedding. - if (mInTaskFragment.getTask() != task) { - if (shouldReparentInTaskFragment(task)) { - task.reparent(mInTaskFragment, POSITION_TOP); - } - } else { + int embeddingCheckResult = canEmbedActivity(mInTaskFragment, mStartActivity, task); + if (embeddingCheckResult == EMBEDDING_ALLOWED) { newParent = mInTaskFragment; + } else { + // Start mStartActivity to task instead if it can't be embedded to mInTaskFragment. + sendCanNotEmbedActivityError(mInTaskFragment, embeddingCheckResult); } } else { TaskFragment candidateTf = mAddingToTaskFragment != null ? mAddingToTaskFragment : null; @@ -2918,20 +2916,12 @@ private void addOrReparentStartingActivity(@NonNull Task task, String reason) { } } if (candidateTf != null && candidateTf.isEmbedded() - && canEmbedActivity(candidateTf, mStartActivity, false /* newTask */, task)) { + && canEmbedActivity(candidateTf, mStartActivity, task) == EMBEDDING_ALLOWED) { // Use the embedded TaskFragment of the top activity as the new parent if the // activity can be embedded. newParent = candidateTf; } } - // Start Activity to the Task if mStartActivity's min dimensions are not satisfied. - if (newParent.isEmbedded() && newParent.smallerThanMinDimension(mStartActivity)) { - reason += " - MinimumDimensionViolation"; - mService.mWindowOrganizerController.sendMinimumDimensionViolation( - newParent, mStartActivity.getMinDimensions(), mRequest.errorCallbackToken, - reason); - newParent = task; - } if (mStartActivity.getTaskFragment() == null || mStartActivity.getTaskFragment() == newParent) { newParent.addChild(mStartActivity, POSITION_TOP); @@ -2940,16 +2930,41 @@ && canEmbedActivity(candidateTf, mStartActivity, false /* newTask */, task)) { } } - private boolean shouldReparentInTaskFragment(Task task) { - // The task has not been embedded. We should reparent the task to TaskFragment. - if (!task.isEmbedded()) { - return true; + /** + * Notifies the client side that {@link #mStartActivity} cannot be embedded to + * {@code taskFragment}. + */ + private void sendCanNotEmbedActivityError(TaskFragment taskFragment, + @EmbeddingCheckResult int result) { + final String errMsg; + switch(result) { + case EMBEDDING_DISALLOWED_NEW_TASK: { + errMsg = "Cannot embed " + mStartActivity + " that launched on another task" + + ",mLaunchMode=" + mLaunchMode + + ",mLaunchFlag=" + Integer.toHexString(mLaunchFlags); + break; + } + case EMBEDDING_DISALLOWED_MIN_DIMENSION_VIOLATION: { + errMsg = "Cannot embed " + mStartActivity + + ". TaskFragment's bounds:" + taskFragment.getBounds() + + ", minimum dimensions:" + mStartActivity.getMinDimensions(); + break; + } + case EMBEDDING_DISALLOWED_UNTRUSTED_HOST: { + errMsg = "The app:" + mCallingUid + "is not trusted to " + mStartActivity; + break; + } + default: + errMsg = "Unhandled embed result:" + result; + } + if (taskFragment.isOrganized()) { + mService.mWindowOrganizerController.sendTaskFragmentOperationFailure( + taskFragment.getTaskFragmentOrganizer(), mRequest.errorCallbackToken, + new SecurityException(errMsg)); + } else { + // If the taskFragment is not organized, just dump error message as warning logs. + Slog.w(TAG, errMsg); } - WindowContainer parent = task.getParent(); - // If the Activity is going to launch on top of embedded Task in the same TaskFragment, - // we don't need to reparent the Task. Otherwise, the embedded Task should reparent to - // another TaskFragment. - return parent.asTaskFragment() != mInTaskFragment; } private int adjustLaunchFlagsToDocumentMode(ActivityRecord r, boolean launchSingleInstance, diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerInternal.java b/services/core/java/com/android/server/wm/ActivityTaskManagerInternal.java index 8e7dde20955b..37fc9744dbdb 100644 --- a/services/core/java/com/android/server/wm/ActivityTaskManagerInternal.java +++ b/services/core/java/com/android/server/wm/ActivityTaskManagerInternal.java @@ -713,4 +713,6 @@ public abstract void registerActivityStartInterceptor( */ public abstract void restartTaskActivityProcessIfVisible( int taskId, @NonNull String packageName); + + public abstract boolean isVisibleActivity(IBinder activityToken); } diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java index aa154292fe7e..6d80203d000e 100644 --- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java +++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java @@ -257,6 +257,7 @@ import com.android.server.am.PendingIntentController; import com.android.server.am.PendingIntentRecord; import com.android.server.am.UserState; +import com.android.server.app.AppLockManagerServiceInternal; import com.android.server.firewall.IntentFirewall; import com.android.server.pm.UserManagerService; import com.android.server.policy.PermissionPolicyInternal; @@ -806,6 +807,8 @@ public void run() { } }; + private AppLockManagerServiceInternal mAppLockManagerService = null; + @VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE) public ActivityTaskManagerService(Context context) { mContext = context; @@ -1441,6 +1444,7 @@ public boolean startDreamActivity(@NonNull Intent intent) { a.colorMode = ActivityInfo.COLOR_MODE_DEFAULT; a.flags |= ActivityInfo.FLAG_EXCLUDE_FROM_RECENTS; a.resizeMode = RESIZE_MODE_UNRESIZEABLE; + a.configChanges = ActivityInfo.CONFIG_ORIENTATION; final ActivityOptions options = ActivityOptions.makeBasic(); options.setLaunchActivityType(ACTIVITY_TYPE_DREAM); @@ -1741,6 +1745,7 @@ public final int startActivityFromRecents(int taskId, Bundle bOptions) { final int callingPid = Binder.getCallingPid(); final int callingUid = Binder.getCallingUid(); + final SafeActivityOptions safeOptions = SafeActivityOptions.fromBundle(bOptions); final long origId = Binder.clearCallingIdentity(); try { @@ -3621,6 +3626,15 @@ public TaskSnapshot takeTaskSnapshot(int taskId) { Slog.w(TAG, "takeTaskSnapshot: taskId=" + taskId + " not found or not visible"); return null; } + final Task rootTask = task.getRootTask(); + final String packageName = + rootTask != null && rootTask.realActivity != null + ? rootTask.realActivity.getPackageName() + : null; + if (packageName != null && getAppLockManagerService().requireUnlock( + packageName, task.mUserId)) { + return null; + } return mWindowManager.mTaskSnapshotController.captureTaskSnapshot( task, false /* snapshotHome */); } @@ -4969,6 +4983,13 @@ StatusBarManagerInternal getStatusBarManagerInternal() { return mStatusBarManagerInternal; } + AppLockManagerServiceInternal getAppLockManagerService() { + if (mAppLockManagerService == null) { + mAppLockManagerService = LocalServices.getService(AppLockManagerServiceInternal.class); + } + return mAppLockManagerService; + } + AppWarnings getAppWarningsLocked() { return mAppWarnings; } @@ -6723,5 +6744,13 @@ public void restartTaskActivityProcessIfVisible(int taskId, String packageName) activity.restartProcessIfVisible(); } } + + @Override + public boolean isVisibleActivity(IBinder activityToken) { + synchronized (mGlobalLock) { + final ActivityRecord r = ActivityRecord.isInRootTaskLocked(activityToken); + return r != null && r.isInterestingToUserLocked(); + } + } } } diff --git a/services/core/java/com/android/server/wm/AppWarnings.java b/services/core/java/com/android/server/wm/AppWarnings.java index 994f07959f3b..6749ae78c09c 100644 --- a/services/core/java/com/android/server/wm/AppWarnings.java +++ b/services/core/java/com/android/server/wm/AppWarnings.java @@ -168,7 +168,6 @@ public void showDeprecatedTargetDialogIfNeeded(ActivityRecord r) { public void onStartActivity(ActivityRecord r) { showUnsupportedCompileSdkDialogIfNeeded(r); showUnsupportedDisplaySizeDialogIfNeeded(r); - showDeprecatedTargetDialogIfNeeded(r); } /** diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 98c5d512be0e..a03dce364209 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -6175,6 +6175,14 @@ boolean isAodShowing() { .getKeyguardController().isAodShowing(mDisplayId); } + /** + * @return whether the keyguard is occluded on this display + */ + boolean isKeyguardOccluded() { + return mRootWindowContainer.mTaskSupervisor + .getKeyguardController().isDisplayOccluded(mDisplayId); + } + @VisibleForTesting void removeAllTasks() { forAllTasks((t) -> { t.getRootTask().removeChild(t, "removeAllTasks"); }); diff --git a/services/core/java/com/android/server/wm/InsetsPolicy.java b/services/core/java/com/android/server/wm/InsetsPolicy.java index 9e0d7b57264e..cdcc60ee75a4 100644 --- a/services/core/java/com/android/server/wm/InsetsPolicy.java +++ b/services/core/java/com/android/server/wm/InsetsPolicy.java @@ -48,7 +48,6 @@ import android.app.WindowConfiguration; import android.content.res.Resources; import android.graphics.Rect; -import android.util.ArrayMap; import android.util.IntArray; import android.util.SparseArray; import android.view.InsetsAnimationControlCallbacks; @@ -73,6 +72,8 @@ import com.android.server.DisplayThread; import com.android.server.statusbar.StatusBarManagerInternal; +import java.util.Map; + /** * Policy that implements who gets control over the windows generating insets. */ @@ -378,10 +379,9 @@ InsetsState enforceInsetsPolicyForTarget(@InternalInsetsType int type, // IME needs different frames for certain cases (e.g. navigation bar in gesture nav). if (type == ITYPE_IME) { - ArrayMap providers = mStateController + Map providers = mStateController .getSourceProviders(); - for (int i = providers.size() - 1; i >= 0; i--) { - WindowContainerInsetsSourceProvider otherProvider = providers.valueAt(i); + for (final WindowContainerInsetsSourceProvider otherProvider: providers.values()) { if (otherProvider.overridesImeFrame()) { InsetsSource override = new InsetsSource( diff --git a/services/core/java/com/android/server/wm/InsetsStateController.java b/services/core/java/com/android/server/wm/InsetsStateController.java index ed771c202c04..22a16d8b3d27 100644 --- a/services/core/java/com/android/server/wm/InsetsStateController.java +++ b/services/core/java/com/android/server/wm/InsetsStateController.java @@ -44,6 +44,8 @@ import java.io.PrintWriter; import java.util.ArrayList; import java.util.function.Consumer; +import java.util.HashMap; +import java.util.Map; /** * Manages global window inset state in the system represented by {@link InsetsState}. @@ -54,8 +56,7 @@ class InsetsStateController { private final InsetsState mState = new InsetsState(); private final DisplayContent mDisplayContent; - private final ArrayMap mProviders = - new ArrayMap<>(); + private final HashMap mProviders = new HashMap<>(); private final ArrayMap> mControlTargetTypeMap = new ArrayMap<>(); private final SparseArray mTypeControlTargetMap = new SparseArray<>(); @@ -107,7 +108,7 @@ InsetsState getRawInsetsState() { return result; } - ArrayMap getSourceProviders() { + Map getSourceProviders() { return mProviders; } @@ -143,8 +144,8 @@ WindowContainerInsetsSourceProvider peekSourceProvider(@InternalInsetsType int t */ void onPostLayout() { Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "ISC.onPostLayout"); - for (int i = mProviders.size() - 1; i >= 0; i--) { - mProviders.valueAt(i).onPostLayout(); + for (final WindowContainerInsetsSourceProvider provider : mProviders.values()) { + provider.onPostLayout(); } if (!mLastState.equals(mState)) { mLastState.set(mState, true /* copySources */); @@ -192,8 +193,8 @@ void onDisplayFramesUpdated(boolean notifyInsetsChange) { void onInsetsModified(InsetsControlTarget caller) { boolean changed = false; - for (int i = mProviders.size() - 1; i >= 0; i--) { - changed |= mProviders.valueAt(i).updateClientVisibility(caller); + for (final WindowContainerInsetsSourceProvider provider : mProviders.values()) { + changed |= provider.updateClientVisibility(caller); } if (changed) { notifyInsetsChanged(); @@ -338,8 +339,7 @@ private void notifyPendingInsetsControlChanged() { return; } mDisplayContent.mWmService.mAnimator.addAfterPrepareSurfacesRunnable(() -> { - for (int i = mProviders.size() - 1; i >= 0; i--) { - final WindowContainerInsetsSourceProvider provider = mProviders.valueAt(i); + for (final WindowContainerInsetsSourceProvider provider : mProviders.values()) { provider.onSurfaceTransactionApplied(); } final ArraySet newControlTargets = new ArraySet<>(); @@ -378,8 +378,8 @@ void dump(String prefix, PrintWriter pw) { + mTypeControlTargetMap.valueAt(i)); } pw.println(prefix + "InsetsSourceProviders:"); - for (int i = mProviders.size() - 1; i >= 0; i--) { - mProviders.valueAt(i).dump(pw, prefix + " "); + for (final WindowContainerInsetsSourceProvider provider : mProviders.values()) { + provider.dump(pw, prefix + " "); } } } diff --git a/services/core/java/com/android/server/wm/RemoteAnimationController.java b/services/core/java/com/android/server/wm/RemoteAnimationController.java index 4a0a6e3c204b..35cc5e30cacf 100644 --- a/services/core/java/com/android/server/wm/RemoteAnimationController.java +++ b/services/core/java/com/android/server/wm/RemoteAnimationController.java @@ -70,6 +70,7 @@ class RemoteAnimationController implements DeathRecipient { final ArrayList mPendingNonAppAnimations = new ArrayList<>(); private final Handler mHandler; private final Runnable mTimeoutRunnable = () -> cancelAnimation("timeoutRunnable"); + private boolean mIsFinishing; private FinishedCallback mFinishedCallback; private boolean mCanceled; @@ -260,6 +261,7 @@ private void onAnimationFinished() { mPendingAnimations.size()); mHandler.removeCallbacks(mTimeoutRunnable); synchronized (mService.mGlobalLock) { + mIsFinishing = true; unlinkToDeathOfRunner(); releaseFinishedCallback(); mService.openSurfaceTransaction(); @@ -304,6 +306,7 @@ private void onAnimationFinished() { throw e; } finally { mService.closeSurfaceTransaction("RemoteAnimationController#finished"); + mIsFinishing = false; } } // Reset input for all activities when the remote animation is finished. @@ -316,8 +319,10 @@ private void onAnimationFinished() { private void invokeAnimationCancelled(String reason) { ProtoLog.d(WM_DEBUG_REMOTE_ANIMATIONS, "cancelAnimation(): reason=%s", reason); + final boolean isKeyguardOccluded = mDisplayContent.isKeyguardOccluded(); + try { - mRemoteAnimationAdapter.getRunner().onAnimationCancelled(); + mRemoteAnimationAdapter.getRunner().onAnimationCancelled(isKeyguardOccluded); } catch (RemoteException e) { Slog.e(TAG, "Failed to notify cancel", e); } @@ -521,6 +526,9 @@ public void startAnimation(SurfaceControl animationLeash, Transaction t, @Override public void onAnimationCancelled(SurfaceControl animationLeash) { + if (mIsFinishing) { + return; + } if (mRecord.mAdapter == this) { mRecord.mAdapter = null; } else { diff --git a/services/core/java/com/android/server/wm/Session.java b/services/core/java/com/android/server/wm/Session.java index 30b50839cd35..c5f21eb0ef5f 100644 --- a/services/core/java/com/android/server/wm/Session.java +++ b/services/core/java/com/android/server/wm/Session.java @@ -322,7 +322,7 @@ public IBinder performDrag(IWindow window, int flags, SurfaceControl surface, in final int callingPid = Binder.getCallingPid(); // Validate and resolve ClipDescription data before clearing the calling identity validateAndResolveDragMimeTypeExtras(data, callingUid, callingPid, mPackageName); - validateDragFlags(flags, callingUid); + validateDragFlags(flags); final long ident = Binder.clearCallingIdentity(); try { return mDragDropController.performDrag(mPid, mUid, window, flags, surface, touchSource, @@ -347,11 +347,7 @@ public boolean dropForAccessibility(IWindow window, int x, int y) { * Validates the given drag flags. */ @VisibleForTesting - void validateDragFlags(int flags, int callingUid) { - if (callingUid == Process.SYSTEM_UID) { - throw new IllegalStateException("Need to validate before calling identify is cleared"); - } - + void validateDragFlags(int flags) { if ((flags & View.DRAG_FLAG_REQUEST_SURFACE_FOR_RETURN_ANIMATION) != 0) { if (!mCanStartTasksFromRecents) { throw new SecurityException("Requires START_TASKS_FROM_RECENTS permission"); @@ -365,9 +361,6 @@ void validateDragFlags(int flags, int callingUid) { @VisibleForTesting void validateAndResolveDragMimeTypeExtras(ClipData data, int callingUid, int callingPid, String callingPackage) { - if (callingUid == Process.SYSTEM_UID) { - throw new IllegalStateException("Need to validate before calling identify is cleared"); - } final ClipDescription desc = data != null ? data.getDescription() : null; if (desc == null) { return; diff --git a/services/core/java/com/android/server/wm/StartingSurfaceController.java b/services/core/java/com/android/server/wm/StartingSurfaceController.java index f83173bd46c0..0bb773ae5e41 100644 --- a/services/core/java/com/android/server/wm/StartingSurfaceController.java +++ b/services/core/java/com/android/server/wm/StartingSurfaceController.java @@ -220,6 +220,11 @@ private void showStartingWindowFromDeferringActivities(ActivityOptions topOption // Attempt to add starting window from the top-most activity. for (int i = mDeferringAddStartActivities.size() - 1; i >= 0; --i) { final DeferringStartingWindowRecord next = mDeferringAddStartActivities.get(i); + if (next.mDeferring.getTask() == null) { + Slog.e(TAG, "No task exists: " + next.mDeferring.shortComponentName + + " parent: " + next.mDeferring.getParent()); + continue; + } next.mDeferring.showStartingWindow(next.mPrev, mInitNewTask, mInitTaskSwitch, mInitProcessRunning, true /* startActivity */, next.mSource, topOptions); // If one succeeds, it is done. diff --git a/services/core/java/com/android/server/wm/TaskFragment.java b/services/core/java/com/android/server/wm/TaskFragment.java index 1d328671876f..9050d79d714f 100644 --- a/services/core/java/com/android/server/wm/TaskFragment.java +++ b/services/core/java/com/android/server/wm/TaskFragment.java @@ -139,6 +139,45 @@ class TaskFragment extends WindowContainer { /** Set to false to disable the preview that is shown while a new activity is being started. */ static final boolean SHOW_APP_STARTING_PREVIEW = true; + /** + * An embedding check result of {@link #isAllowedToEmbedActivity(ActivityRecord)} or + * {@link ActivityStarter#canEmbedActivity(TaskFragment, ActivityRecord, Task)}: + * indicate that an Activity can be embedded successfully. + */ + static final int EMBEDDING_ALLOWED = 0; + /** + * An embedding check result of {@link #isAllowedToEmbedActivity(ActivityRecord)} or + * {@link ActivityStarter#canEmbedActivity(TaskFragment, ActivityRecord, Task)}: + * indicate that an Activity can't be embedded because either the Activity does not allow + * untrusted embedding, and the embedding host app is not trusted. + */ + static final int EMBEDDING_DISALLOWED_UNTRUSTED_HOST = 1; + /** + * An embedding check result of {@link #isAllowedToEmbedActivity(ActivityRecord)} or + * {@link ActivityStarter#canEmbedActivity(TaskFragment, ActivityRecord, Task)}: + * indicate that an Activity can't be embedded because this taskFragment's bounds are + * {@link #smallerThanMinDimension(ActivityRecord)}. + */ + static final int EMBEDDING_DISALLOWED_MIN_DIMENSION_VIOLATION = 2; + /** + * An embedding check result of + * {@link ActivityStarter#canEmbedActivity(TaskFragment, ActivityRecord, Task)}: + * indicate that an Activity can't be embedded because the Activity is started on a new task. + */ + static final int EMBEDDING_DISALLOWED_NEW_TASK = 3; + + /** + * Embedding check results of {@link #isAllowedToEmbedActivity(ActivityRecord)} or + * {@link ActivityStarter#canEmbedActivity(TaskFragment, ActivityRecord, Task)}. + */ + @IntDef(prefix = {"EMBEDDING_"}, value = { + EMBEDDING_ALLOWED, + EMBEDDING_DISALLOWED_UNTRUSTED_HOST, + EMBEDDING_DISALLOWED_MIN_DIMENSION_VIOLATION, + EMBEDDING_DISALLOWED_NEW_TASK, + }) + @interface EmbeddingCheckResult {} + /** * Indicate that the minimal width/height should use the default value. * @@ -520,20 +559,29 @@ boolean isEmbedded() { return false; } - boolean isAllowedToEmbedActivity(@NonNull ActivityRecord a) { + @EmbeddingCheckResult + int isAllowedToEmbedActivity(@NonNull ActivityRecord a) { return isAllowedToEmbedActivity(a, mTaskFragmentOrganizerUid); } /** * Checks if the organized task fragment is allowed to have the specified activity, which is - * allowed if an activity allows embedding in untrusted mode, or if the trusted mode can be - * enabled. - * @see #isAllowedToEmbedActivityInTrustedMode(ActivityRecord) + * allowed if an activity allows embedding in untrusted mode, if the trusted mode can be + * enabled, or if the organized task fragment bounds are not + * {@link #smallerThanMinDimension(ActivityRecord)}. + * * @param uid uid of the TaskFragment organizer. + * @see #isAllowedToEmbedActivityInTrustedMode(ActivityRecord) */ - boolean isAllowedToEmbedActivity(@NonNull ActivityRecord a, int uid) { - return isAllowedToEmbedActivityInUntrustedMode(a) - || isAllowedToEmbedActivityInTrustedMode(a, uid); + @EmbeddingCheckResult + int isAllowedToEmbedActivity(@NonNull ActivityRecord a, int uid) { + if (!isAllowedToEmbedActivityInUntrustedMode(a) + && !isAllowedToEmbedActivityInTrustedMode(a, uid)) { + return EMBEDDING_DISALLOWED_UNTRUSTED_HOST; + } else if (smallerThanMinDimension(a)) { + return EMBEDDING_DISALLOWED_MIN_DIMENSION_VIOLATION; + } + return EMBEDDING_ALLOWED; } boolean smallerThanMinDimension(@NonNull ActivityRecord activity) { @@ -550,9 +598,8 @@ boolean smallerThanMinDimension(@NonNull ActivityRecord activity) { } final int minWidth = minDimensions.x; final int minHeight = minDimensions.y; - final boolean smaller = taskFragBounds.width() < minWidth + return taskFragBounds.width() < minWidth || taskFragBounds.height() < minHeight; - return smaller; } /** @@ -609,7 +656,7 @@ private static boolean isFullyTrustedEmbedding(@NonNull ActivityRecord a, int ui // The system is trusted to embed other apps securely and for all users. return UserHandle.getAppId(uid) == SYSTEM_UID // Activities from the same UID can be embedded freely by the host. - || uid == a.getUid(); + || a.isUid(uid); } /** @@ -1648,7 +1695,7 @@ void completePause(boolean resumeNext, ActivityRecord resuming) { ProtoLog.v(WM_DEBUG_STATES, "Executing finish of activity: %s", prev); prev = prev.completeFinishing(false /* updateVisibility */, "completePausedLocked"); - } else if (prev.hasProcess()) { + } else if (prev.attachedToProcess()) { ProtoLog.v(WM_DEBUG_STATES, "Enqueue pending stop if needed: %s " + "wasStopping=%b visibleRequested=%b", prev, wasStopping, prev.mVisibleRequested); diff --git a/services/core/java/com/android/server/wm/TaskFragmentOrganizerController.java b/services/core/java/com/android/server/wm/TaskFragmentOrganizerController.java index b4d1cf77919a..2546177ec367 100644 --- a/services/core/java/com/android/server/wm/TaskFragmentOrganizerController.java +++ b/services/core/java/com/android/server/wm/TaskFragmentOrganizerController.java @@ -19,6 +19,7 @@ import static android.window.TaskFragmentOrganizer.putExceptionInBundle; import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_WINDOW_ORGANIZER; +import static com.android.server.wm.TaskFragment.EMBEDDING_ALLOWED; import static com.android.server.wm.WindowOrganizerController.configurationsAreEqualForOrganizer; import android.annotation.IntDef; @@ -235,7 +236,7 @@ void onActivityReparentToTask(ActivityRecord activity) { + " is not in a task belong to the organizer app."); return; } - if (!task.isAllowedToEmbedActivity(activity, mOrganizerUid)) { + if (task.isAllowedToEmbedActivity(activity, mOrganizerUid) != EMBEDDING_ALLOWED) { Slog.d(TAG, "Reparent activity=" + activity.token + " is not allowed to be embedded."); return; diff --git a/services/core/java/com/android/server/wm/TaskSnapshotPersister.java b/services/core/java/com/android/server/wm/TaskSnapshotPersister.java index 03098e3eaca9..b2b686062948 100644 --- a/services/core/java/com/android/server/wm/TaskSnapshotPersister.java +++ b/services/core/java/com/android/server/wm/TaskSnapshotPersister.java @@ -162,7 +162,9 @@ void onTaskRemovedFromRecents(int taskId, int userId) { void removeObsoleteFiles(ArraySet persistentTaskIds, int[] runningUserIds) { synchronized (mLock) { mPersistedTaskIdsSinceLastRemoveObsolete.clear(); - sendToQueueLocked(new RemoveObsoleteFilesQueueItem(persistentTaskIds, runningUserIds)); + // Copy persistentTaskIds to avoid two threads manipulating it at the same time. + sendToQueueLocked(new RemoveObsoleteFilesQueueItem( + new ArraySet<>(persistentTaskIds), runningUserIds)); } } diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 52af39ee64b3..288227c2afcf 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -3552,6 +3552,14 @@ public void rebootSafeMode(boolean confirm) { confirm); } + // Called by window manager policy. Not exposed externally. + @Override + public void reboot(boolean confirm, String reason) { + // Pass in the UI context, since ShutdownThread requires it (to show UI). + ShutdownThread.rebootCustom(ActivityThread.currentActivityThread().getSystemUiContext(), + reason, confirm); + } + public void setCurrentProfileIds(final int[] currentProfileIds) { synchronized (mGlobalLock) { mCurrentProfileIds = currentProfileIds; @@ -6398,6 +6406,11 @@ public boolean hasNavigationBar(int displayId) { } } + @Override + public void sendCustomAction(Intent intent) { + mPolicy.sendCustomAction(intent); + } + @Override public void lockNow(Bundle options) { mPolicy.lockNow(options); diff --git a/services/core/java/com/android/server/wm/WindowOrganizerController.java b/services/core/java/com/android/server/wm/WindowOrganizerController.java index 22d6237411f3..aee66faa8faa 100644 --- a/services/core/java/com/android/server/wm/WindowOrganizerController.java +++ b/services/core/java/com/android/server/wm/WindowOrganizerController.java @@ -44,6 +44,7 @@ import static com.android.server.wm.ActivityTaskManagerService.LAYOUT_REASON_CONFIG_CHANGED; import static com.android.server.wm.ActivityTaskSupervisor.PRESERVE_WINDOWS; import static com.android.server.wm.Task.FLAG_FORCE_HIDDEN_FOR_TASK_ORG; +import static com.android.server.wm.TaskFragment.EMBEDDING_ALLOWED; import static com.android.server.wm.WindowContainer.POSITION_BOTTOM; import static com.android.server.wm.WindowContainer.POSITION_TOP; @@ -756,9 +757,9 @@ private int applyHierarchyOp(WindowContainerTransaction.HierarchyOp hop, int eff sendTaskFragmentOperationFailure(organizer, errorCallbackToken, exception); break; } - if (!parent.isAllowedToEmbedActivity(activity)) { + if (parent.isAllowedToEmbedActivity(activity) != EMBEDDING_ALLOWED) { final Throwable exception = new SecurityException( - "The task fragment is not trusted to embed the given activity."); + "The task fragment is not allowed to embed the given activity."); sendTaskFragmentOperationFailure(organizer, errorCallbackToken, exception); break; } @@ -768,11 +769,6 @@ private int applyHierarchyOp(WindowContainerTransaction.HierarchyOp hop, int eff sendTaskFragmentOperationFailure(organizer, errorCallbackToken, exception); break; } - if (parent.smallerThanMinDimension(activity)) { - sendMinimumDimensionViolation(parent, activity.getMinDimensions(), - errorCallbackToken, "reparentActivityToTask"); - break; - } activity.reparent(parent, POSITION_TOP); effects |= TRANSACT_EFFECTS_LIFECYCLE; @@ -988,7 +984,7 @@ private int applyHierarchyOp(WindowContainerTransaction.HierarchyOp hop, int eff } /** A helper method to send minimum dimension violation error to the client. */ - void sendMinimumDimensionViolation(TaskFragment taskFragment, Point minDimensions, + private void sendMinimumDimensionViolation(TaskFragment taskFragment, Point minDimensions, IBinder errorCallbackToken, String reason) { if (taskFragment == null || taskFragment.getTaskFragmentOrganizer() == null) { return; @@ -1582,10 +1578,10 @@ void reparentTaskFragment(@NonNull TaskFragment oldParent, // We are reparenting activities to a new embedded TaskFragment, this operation is only // allowed if the new parent is trusted by all reparent activities. final boolean isEmbeddingDisallowed = oldParent.forAllActivities(activity -> - !newParentTF.isAllowedToEmbedActivity(activity)); + newParentTF.isAllowedToEmbedActivity(activity) != EMBEDDING_ALLOWED); if (isEmbeddingDisallowed) { final Throwable exception = new SecurityException( - "The new parent is not trusted to embed the activities."); + "The new parent is not allowed to embed the activities."); sendTaskFragmentOperationFailure(organizer, errorCallbackToken, exception); return; } @@ -1602,14 +1598,6 @@ void reparentTaskFragment(@NonNull TaskFragment oldParent, sendTaskFragmentOperationFailure(organizer, errorCallbackToken, exception); return; } - final Point minDimensions = oldParent.calculateMinDimension(); - final Rect newParentBounds = newParentTF.getBounds(); - if (newParentBounds.width() < minDimensions.x - || newParentBounds.height() < minDimensions.y) { - sendMinimumDimensionViolation(newParentTF, minDimensions, errorCallbackToken, - "reparentTaskFragment"); - return; - } while (oldParent.hasChild()) { oldParent.getChildAt(0).reparent(newParentTF, POSITION_TOP); } diff --git a/services/core/jni/com_android_server_companion_virtual_InputController.cpp b/services/core/jni/com_android_server_companion_virtual_InputController.cpp index 8197b67355d4..daca1531d41f 100644 --- a/services/core/jni/com_android_server_companion_virtual_InputController.cpp +++ b/services/core/jni/com_android_server_companion_virtual_InputController.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -271,6 +272,14 @@ static int openUinput(const char* readableName, jint vendorId, jint productId, c ALOGE("Error creating touchscreen uinput pressure axis: %s", strerror(errno)); return -errno; } + uinput_abs_setup slotAbsSetup; + slotAbsSetup.code = ABS_MT_SLOT; + slotAbsSetup.absinfo.maximum = MAX_POINTERS; + slotAbsSetup.absinfo.minimum = 0; + if (ioctl(fd, UI_ABS_SETUP, &slotAbsSetup) != 0) { + ALOGE("Error creating touchscreen uinput slots: %s", strerror(errno)); + return -errno; + } } if (ioctl(fd, UI_DEV_SETUP, &setup) != 0) { ALOGE("Error creating uinput device: %s", strerror(errno)); diff --git a/services/core/jni/com_android_server_fingerprint_FingerprintService.cpp b/services/core/jni/com_android_server_fingerprint_FingerprintService.cpp index 3dfce3aec059..a18851329058 100644 --- a/services/core/jni/com_android_server_fingerprint_FingerprintService.cpp +++ b/services/core/jni/com_android_server_fingerprint_FingerprintService.cpp @@ -53,6 +53,7 @@ static struct { static sp gLooper; static jobject gCallback; +static sp gService; class CallbackHandler : public MessageHandler { int type; @@ -70,12 +71,13 @@ class CallbackHandler : public MessageHandler { static void notifyKeystore(uint8_t *auth_token, size_t auth_token_length) { if (auth_token != NULL && auth_token_length > 0) { - // TODO: cache service? - sp sm = defaultServiceManager(); - sp binder = sm->getService(String16("android.security.keystore")); - sp service = interface_cast(binder); - if (service != NULL) { - status_t ret = service->addAuthToken(auth_token, auth_token_length); + if(gService == NULL) { + sp sm = defaultServiceManager(); + sp binder = sm->getService(String16("android.security.keystore")); + gService = interface_cast(binder); + } + if (gService != NULL) { + status_t ret = gService->addAuthToken(auth_token, auth_token_length); if (ret != ResponseCode::NO_ERROR) { ALOGE("Falure sending auth token to KeyStore: %d", ret); } diff --git a/services/core/jni/com_android_server_lights_LightsService.cpp b/services/core/jni/com_android_server_lights_LightsService.cpp index 26f6d7428fcc..51a7886e9f97 100644 --- a/services/core/jni/com_android_server_lights_LightsService.cpp +++ b/services/core/jni/com_android_server_lights_LightsService.cpp @@ -111,7 +111,7 @@ static void processReturn( case Status::SUCCESS: break; case Status::LIGHT_NOT_SUPPORTED: - ALOGE("Light requested not available on this device. %d", type); + ALOGV("Light requested not available on this device. %d", type); break; case Status::BRIGHTNESS_NOT_SUPPORTED: ALOGE("Brightness parameter not supported on this device: %d", diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/ActiveAdmin.java b/services/devicepolicy/java/com/android/server/devicepolicy/ActiveAdmin.java index 0c69067ab131..ef3213b68bfe 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/ActiveAdmin.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/ActiveAdmin.java @@ -214,7 +214,7 @@ class ActiveAdmin { boolean requireAutoTime = false; boolean forceEphemeralUsers = false; boolean isNetworkLoggingEnabled = false; - boolean isLogoutEnabled = false; + boolean isLogoutEnabled = true; // one notification after enabling + one more after reboots static final int DEF_MAXIMUM_NETWORK_LOGGING_NOTIFICATIONS_SHOWN = 2; diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index 590de7b5e119..fe4c313a326a 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -1982,6 +1982,10 @@ void loadOwners() { synchronized (getLockObject()) { mOwners.load(); setDeviceOwnershipSystemPropertyLocked(); + if (mOwners.hasDeviceOwner()) { + setGlobalSettingDeviceOwnerType( + mOwners.getDeviceOwnerType(mOwners.getDeviceOwnerPackageName())); + } } } @@ -8811,6 +8815,7 @@ private void clearDeviceOwnerLocked(ActiveAdmin admin, int userId) { deleteTransferOwnershipBundleLocked(userId); toggleBackupServiceActive(UserHandle.USER_SYSTEM, true); pushUserControlDisabledPackagesLocked(userId); + setGlobalSettingDeviceOwnerType(DEVICE_OWNER_TYPE_DEFAULT); } private void clearApplicationRestrictions(int userId) { @@ -16051,11 +16056,11 @@ public void setLogoutEnabled(ComponentName admin, boolean enabled) { @Override public boolean isLogoutEnabled() { if (!mHasFeature) { - return false; + return true; } synchronized (getLockObject()) { ActiveAdmin deviceOwner = getDeviceOwnerAdminLocked(); - return (deviceOwner != null) && deviceOwner.isLogoutEnabled; + return (deviceOwner == null) || deviceOwner.isLogoutEnabled; } } @@ -18377,6 +18382,14 @@ private void setDeviceOwnerTypeLocked(ComponentName admin, "Test only admins can only set the device owner type more than once"); mOwners.setDeviceOwnerType(packageName, deviceOwnerType, isAdminTestOnly); + setGlobalSettingDeviceOwnerType(deviceOwnerType); + } + + // TODO(b/237065504): Allow mainline modules to get the device owner type. This is a workaround + // to get the device owner type in PermissionController. See HibernationPolicy.kt. + private void setGlobalSettingDeviceOwnerType(int deviceOwnerType) { + mInjector.binderWithCleanCallingIdentity( + () -> mInjector.settingsGlobalPutInt("device_owner_type", deviceOwnerType)); } @Override diff --git a/services/incremental/IncrementalService.cpp b/services/incremental/IncrementalService.cpp index a49577b21957..aa679aa4b306 100644 --- a/services/incremental/IncrementalService.cpp +++ b/services/incremental/IncrementalService.cpp @@ -1287,8 +1287,8 @@ int IncrementalService::addBindMount(IncFsMount& ifs, StorageId storage, bp.set_allocated_dest_path(&target); bp.set_allocated_source_subdir(&source); const auto metadata = bp.SerializeAsString(); - bp.release_dest_path(); - bp.release_source_subdir(); + static_cast(bp.release_dest_path()); + static_cast(bp.release_source_subdir()); mdFileName = makeBindMdName(); metadataFullPath = path::join(ifs.root, constants().mount, mdFileName); auto node = mIncFs->makeFile(ifs.control, metadataFullPath, 0444, idFromMetadata(metadata), diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 66c9f55b0403..ac34785278da 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -153,6 +153,8 @@ import com.android.server.os.NativeTombstoneManagerService; import com.android.server.os.SchedulingPolicyService; import com.android.server.people.PeopleService; +import com.android.server.pocket.PocketService; +import com.android.server.pocket.PocketBridgeService; import com.android.server.pm.ApexManager; import com.android.server.pm.ApexSystemServiceInfo; import com.android.server.pm.CrossProfileAppsService; @@ -231,6 +233,10 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.Future; +// LiveDisplay +import com.android.server.custom.LineageHardwareService; +import com.android.server.custom.display.LiveDisplayService; + /** * Entry point to {@code system_server}. */ @@ -425,6 +431,9 @@ public final class SystemServer implements Dumpable { private static final String TETHERING_CONNECTOR_CLASS = "android.net.ITetheringConnector"; + private static final String APP_LOCK_SERVICE_CLASS = + "com.android.server.app.AppLockManagerService$Lifecycle"; + private static final String PERSISTENT_DATA_BLOCK_PROP = "ro.frp.pst"; private static final String UNCRYPT_PACKAGE_FILE = "/cache/recovery/uncrypt_file"; @@ -486,6 +495,8 @@ public final class SystemServer implements Dumpable { /** Start the IStats services. This is a blocking call and can take time. */ private static native void startIStatsService(); + public boolean safeMode = false; + /** * Start the memtrack proxy service. */ @@ -870,7 +881,7 @@ private void run() { initZygoteChildHeapProfiling(); // Debug builds - spawn a thread to monitor for fd leaks. - if (Build.IS_DEBUGGABLE) { + if (Build.IS_ENG) { spawnFdLeakCheckThread(); } @@ -1675,7 +1686,10 @@ private void startOtherServices(@NonNull TimingsTraceAndSlog t) { // Before things start rolling, be sure we have decided whether // we are in safe mode. - final boolean safeMode = wm.detectSafeMode(); + + if(wm != null) { + safeMode = wm.detectSafeMode(); + } if (safeMode) { // If yes, immediately turn on the global setting for airplane mode. // Note that this does not send broadcasts at this stage because @@ -2513,6 +2527,10 @@ private void startOtherServices(@NonNull TimingsTraceAndSlog t) { mSystemServiceManager.startService(CrossProfileAppsService.class); t.traceEnd(); + t.traceBegin("StartPocketService"); + mSystemServiceManager.startService(PocketService.class); + t.traceEnd(); + t.traceBegin("StartPeopleService"); mSystemServiceManager.startService(PeopleService.class); t.traceEnd(); @@ -2520,6 +2538,23 @@ private void startOtherServices(@NonNull TimingsTraceAndSlog t) { t.traceBegin("StartMediaMetricsManager"); mSystemServiceManager.startService(MediaMetricsManagerService.class); t.traceEnd(); + + if (!context.getResources().getString( + com.android.internal.R.string.config_pocketBridgeSysfsInpocket).isEmpty()) { + t.traceBegin("StartPocketBridgeService"); + mSystemServiceManager.startService(PocketBridgeService.class); + t.traceEnd(); + } + + // LiveDisplay + if (!mOnlyCore){ + t.traceBegin("StartLineageHardwareService"); + mSystemServiceManager.startService(LineageHardwareService.class); + t.traceEnd(); + t.traceBegin("StartLiveDisplayService"); + mSystemServiceManager.startService(LiveDisplayService.class); + t.traceEnd(); + } } t.traceBegin("StartMediaProjectionManager"); @@ -2752,6 +2787,10 @@ private void startOtherServices(@NonNull TimingsTraceAndSlog t) { t.traceEnd(); } + t.traceBegin("AppLockManagerService"); + mSystemServiceManager.startService(APP_LOCK_SERVICE_CLASS); + t.traceEnd(); + t.traceBegin("StartBootPhaseDeviceSpecificServicesReady"); mSystemServiceManager.startBootPhase(t, SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY); t.traceEnd(); diff --git a/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java b/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java index d3222901db1e..a43a7ce38296 100644 --- a/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java +++ b/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java @@ -217,6 +217,9 @@ public boolean onStartJob(JobParameters params) { BackgroundThread.get().getThreadHandler().post( () -> { try { + if (sSelfService.mIProfcollect == null) { + return; + } sSelfService.mIProfcollect.process(); } catch (RemoteException e) { Log.e(LOG_TAG, "Failed to process profiles in background: " diff --git a/services/smartspace/java/com/android/server/smartspace/SmartspacePerUserService.java b/services/smartspace/java/com/android/server/smartspace/SmartspacePerUserService.java index dcffc9e73c0e..f041fbd7bf90 100644 --- a/services/smartspace/java/com/android/server/smartspace/SmartspacePerUserService.java +++ b/services/smartspace/java/com/android/server/smartspace/SmartspacePerUserService.java @@ -334,18 +334,7 @@ private static final class SmartspaceSessionInfo { @NonNull private final SmartspaceConfig mSmartspaceConfig; private final RemoteCallbackList mCallbacks = - new RemoteCallbackList() { - @Override - public void onCallbackDied(ISmartspaceCallback callback) { - if (DEBUG) { - Slog.d(TAG, "Binder died for session Id=" + mSessionId - + " and callback=" + callback.asBinder()); - } - if (mCallbacks.getRegisteredCallbackCount() == 0) { - destroy(); - } - } - }; + new RemoteCallbackList<>(); SmartspaceSessionInfo( @NonNull final SmartspaceSessionId id, diff --git a/services/tests/mockingservicestests/src/com/android/server/pm/SuspendPackageHelperTest.kt b/services/tests/mockingservicestests/src/com/android/server/pm/SuspendPackageHelperTest.kt index b9d6b2ccd306..994df2288a5c 100644 --- a/services/tests/mockingservicestests/src/com/android/server/pm/SuspendPackageHelperTest.kt +++ b/services/tests/mockingservicestests/src/com/android/server/pm/SuspendPackageHelperTest.kt @@ -392,7 +392,7 @@ class SuspendPackageHelperTest : PackageHelperTestBase() { whenever(rule.mocks().appsFilter.getVisibilityAllowList( any(PackageDataSnapshot::class.java), argThat { it?.packageName == pkgSetting.packageName }, any(IntArray::class.java), - any() as ArrayMap + any>() )) .thenReturn(list) } diff --git a/services/tests/servicestests/src/com/android/server/accounts/AccountManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/accounts/AccountManagerServiceTest.java index d5c5745d6680..30ec1632a622 100644 --- a/services/tests/servicestests/src/com/android/server/accounts/AccountManagerServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/accounts/AccountManagerServiceTest.java @@ -39,6 +39,7 @@ import android.app.AppOpsManager; import android.app.PropertyInvalidatedCache; import android.app.INotificationManager; +import android.app.PropertyInvalidatedCache; import android.app.admin.DevicePolicyManager; import android.app.admin.DevicePolicyManagerInternal; import android.content.BroadcastReceiver; @@ -252,6 +253,26 @@ public void testCheckAddAccount() throws Exception { assertEquals(a31, accounts[1]); } + @SmallTest + public void testCheckAddAccountLongName() throws Exception { + unlockSystemUser(); + String longString = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + + "aaaaa"; + Account a11 = new Account(longString, AccountManagerServiceTestFixtures.ACCOUNT_TYPE_1); + + mAms.addAccountExplicitly( + a11, /* password= */ "p11", /* extras= */ null, /* callerPackage= */ null); + + String[] list = new String[]{AccountManagerServiceTestFixtures.CALLER_PACKAGE}; + when(mMockPackageManager.getPackagesForUid(anyInt())).thenReturn(list); + Account[] accounts = mAms.getAccountsAsUser(null, + UserHandle.getCallingUserId(), mContext.getOpPackageName()); + assertEquals(0, accounts.length); + } + + @SmallTest public void testPasswords() throws Exception { unlockSystemUser(); diff --git a/services/tests/servicestests/src/com/android/server/adb/AdbDebuggingManagerTest.java b/services/tests/servicestests/src/com/android/server/adb/AdbDebuggingManagerTest.java index b36aa0617be5..e87dd4b423b2 100644 --- a/services/tests/servicestests/src/com/android/server/adb/AdbDebuggingManagerTest.java +++ b/services/tests/servicestests/src/com/android/server/adb/AdbDebuggingManagerTest.java @@ -36,8 +36,6 @@ import androidx.test.InstrumentationRegistry; -import com.android.server.FgThread; - import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -48,6 +46,11 @@ import java.io.File; import java.io.FileOutputStream; import java.io.FileReader; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardCopyOption; +import java.util.ArrayList; +import java.util.List; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; import java.util.concurrent.CountDownLatch; @@ -88,6 +91,7 @@ public final class AdbDebuggingManagerTest { private long mOriginalAllowedConnectionTime; private File mAdbKeyXmlFile; private File mAdbKeyFile; + private FakeTicker mFakeTicker; @Before public void setUp() throws Exception { @@ -96,14 +100,25 @@ public void setUp() throws Exception { if (mAdbKeyFile.exists()) { mAdbKeyFile.delete(); } - mManager = new AdbDebuggingManager(mContext, ADB_CONFIRM_COMPONENT, mAdbKeyFile); mAdbKeyXmlFile = new File(mContext.getFilesDir(), "test_adb_keys.xml"); if (mAdbKeyXmlFile.exists()) { mAdbKeyXmlFile.delete(); } + + mFakeTicker = new FakeTicker(); + // Set the ticker time to October 22, 2008 (the day the T-Mobile G1 was released) + mFakeTicker.advance(1224658800L); + mThread = new AdbDebuggingThreadTest(); - mKeyStore = mManager.new AdbKeyStore(mAdbKeyXmlFile); - mHandler = mManager.new AdbDebuggingHandler(FgThread.get().getLooper(), mThread, mKeyStore); + mManager = new AdbDebuggingManager( + mContext, ADB_CONFIRM_COMPONENT, mAdbKeyFile, mAdbKeyXmlFile, mThread, mFakeTicker); + + mHandler = mManager.mHandler; + mThread.setHandler(mHandler); + + mHandler.initKeyStore(); + mKeyStore = mHandler.mAdbKeyStore; + mOriginalAllowedConnectionTime = mKeyStore.getAllowedConnectionTime(); mBlockingQueue = new ArrayBlockingQueue<>(1); } @@ -122,7 +137,7 @@ public void tearDown() throws Exception { private void setAllowedConnectionTime(long connectionTime) { Settings.Global.putLong(mContext.getContentResolver(), Settings.Global.ADB_ALLOWED_CONNECTION_TIME, connectionTime); - }; + } @Test public void testAllowNewKeyOnce() throws Exception { @@ -158,20 +173,15 @@ public void testDisconnectAlwaysAllowKey() throws Exception { // Allow a connection from a new key with the 'Always allow' option selected. runAdbTest(TEST_KEY_1, true, true, false); - // Get the last connection time for the currently connected key to verify that it is updated - // after the disconnect. - long lastConnectionTime = mKeyStore.getLastConnectionTime(TEST_KEY_1); - - // Sleep for a small amount of time to ensure a difference can be observed in the last - // connection time after a disconnect. - Thread.sleep(10); + // Advance the clock by 10ms to ensure there's a difference + mFakeTicker.advance(10 * 1_000_000); // Send the disconnect message for the currently connected key to trigger an update of the // last connection time. disconnectKey(TEST_KEY_1); - assertNotEquals( + assertEquals( "The last connection time was not updated after the disconnect", - lastConnectionTime, + mFakeTicker.currentTimeMillis(), mKeyStore.getLastConnectionTime(TEST_KEY_1)); } @@ -244,8 +254,8 @@ public void testLastConnectionTimeUpdatedByScheduledJob() throws Exception { // Get the current last connection time for comparison after the scheduled job is run long lastConnectionTime = mKeyStore.getLastConnectionTime(TEST_KEY_1); - // Sleep a small amount of time to ensure that the updated connection time changes - Thread.sleep(10); + // Advance a small amount of time to ensure that the updated connection time changes + mFakeTicker.advance(10); // Send a message to the handler to update the last connection time for the active key updateKeyStore(); @@ -269,13 +279,13 @@ public void testKeystorePersisted() throws Exception { persistKeyStore(); assertTrue( "The key with the 'Always allow' option selected was not persisted in the keystore", - mManager.new AdbKeyStore(mAdbKeyXmlFile).isKeyAuthorized(TEST_KEY_1)); + mManager.new AdbKeyStore().isKeyAuthorized(TEST_KEY_1)); // Get the current last connection time to ensure it is updated in the persisted keystore. long lastConnectionTime = mKeyStore.getLastConnectionTime(TEST_KEY_1); - // Sleep a small amount of time to ensure the last connection time is updated. - Thread.sleep(10); + // Advance a small amount of time to ensure the last connection time is updated. + mFakeTicker.advance(10); // Send a message to the handler to update the last connection time for the active key. updateKeyStore(); @@ -286,7 +296,7 @@ public void testKeystorePersisted() throws Exception { assertNotEquals( "The last connection time in the key file was not updated after the update " + "connection time message", lastConnectionTime, - mManager.new AdbKeyStore(mAdbKeyXmlFile).getLastConnectionTime(TEST_KEY_1)); + mManager.new AdbKeyStore().getLastConnectionTime(TEST_KEY_1)); // Verify that the key is in the adb_keys file assertTrue("The key was not in the adb_keys file after persisting the keystore", isKeyInFile(TEST_KEY_1, mAdbKeyFile)); @@ -327,8 +337,8 @@ public void testAdbGrantRevokedIfLastConnectionBeyondAllowedTime() throws Except // Set the allowed window to a small value to ensure the time is beyond the allowed window. setAllowedConnectionTime(1); - // Sleep for a small amount of time to exceed the allowed window. - Thread.sleep(10); + // Advance a small amount of time to exceed the allowed window. + mFakeTicker.advance(10); // The AdbKeyStore has a method to get the time of the next key expiration to ensure the // scheduled job runs at the time of the next expiration or after 24 hours, whichever occurs @@ -478,9 +488,12 @@ public void testKeystoreExpirationTimes() throws Exception { // Set the current expiration time to a minute from expiration and verify this new value is // returned. final long newExpirationTime = 60000; - mKeyStore.setLastConnectionTime(TEST_KEY_1, - System.currentTimeMillis() - Settings.Global.DEFAULT_ADB_ALLOWED_CONNECTION_TIME - + newExpirationTime, true); + mKeyStore.setLastConnectionTime( + TEST_KEY_1, + mFakeTicker.currentTimeMillis() + - Settings.Global.DEFAULT_ADB_ALLOWED_CONNECTION_TIME + + newExpirationTime, + true); expirationTime = mKeyStore.getNextExpirationTime(); if (Math.abs(expirationTime - newExpirationTime) > epsilon) { fail("The expiration time for a key about to expire, " + expirationTime @@ -525,7 +538,7 @@ public void testConnectionTimeUpdatedWithConnectedKeyMessage() throws Exception // Get the last connection time for the key to verify that it is updated when the connected // key message is sent. long connectionTime = mKeyStore.getLastConnectionTime(TEST_KEY_1); - Thread.sleep(10); + mFakeTicker.advance(10); mHandler.obtainMessage(AdbDebuggingManager.AdbDebuggingHandler.MESSAGE_ADB_CONNECTED_KEY, TEST_KEY_1).sendToTarget(); flushHandlerQueue(); @@ -536,7 +549,7 @@ public void testConnectionTimeUpdatedWithConnectedKeyMessage() throws Exception // Verify that the scheduled job updates the connection time of the key. connectionTime = mKeyStore.getLastConnectionTime(TEST_KEY_1); - Thread.sleep(10); + mFakeTicker.advance(10); updateKeyStore(); assertNotEquals( "The connection time for the key must be updated when the update keystore message" @@ -545,7 +558,7 @@ public void testConnectionTimeUpdatedWithConnectedKeyMessage() throws Exception // Verify that the connection time is updated when the key is disconnected. connectionTime = mKeyStore.getLastConnectionTime(TEST_KEY_1); - Thread.sleep(10); + mFakeTicker.advance(10); disconnectKey(TEST_KEY_1); assertNotEquals( "The connection time for the key must be updated when the disconnected message is" @@ -628,11 +641,11 @@ public void testUntrackedUserKeysAddedToKeystore() throws Exception { setAllowedConnectionTime(Settings.Global.DEFAULT_ADB_ALLOWED_CONNECTION_TIME); // The untracked keys should be added to the keystore as part of the constructor. - AdbDebuggingManager.AdbKeyStore adbKeyStore = mManager.new AdbKeyStore(mAdbKeyXmlFile); + AdbDebuggingManager.AdbKeyStore adbKeyStore = mManager.new AdbKeyStore(); // Verify that the connection time for each test key is within a small value of the current // time. - long time = System.currentTimeMillis(); + long time = mFakeTicker.currentTimeMillis(); for (String key : testKeys) { long connectionTime = adbKeyStore.getLastConnectionTime(key); if (Math.abs(time - connectionTime) > epsilon) { @@ -651,11 +664,11 @@ public void testConnectionTimeUpdatedForMultipleConnectedKeys() throws Exception runAdbTest(TEST_KEY_1, true, true, false); runAdbTest(TEST_KEY_2, true, true, false); - // Sleep a small amount of time to ensure the connection time is updated by the scheduled + // Advance a small amount of time to ensure the connection time is updated by the scheduled // job. long connectionTime1 = mKeyStore.getLastConnectionTime(TEST_KEY_1); long connectionTime2 = mKeyStore.getLastConnectionTime(TEST_KEY_2); - Thread.sleep(10); + mFakeTicker.advance(10); updateKeyStore(); assertNotEquals( "The connection time for test key 1 must be updated after the scheduled job runs", @@ -669,7 +682,7 @@ public void testConnectionTimeUpdatedForMultipleConnectedKeys() throws Exception disconnectKey(TEST_KEY_2); connectionTime1 = mKeyStore.getLastConnectionTime(TEST_KEY_1); connectionTime2 = mKeyStore.getLastConnectionTime(TEST_KEY_2); - Thread.sleep(10); + mFakeTicker.advance(10); updateKeyStore(); assertNotEquals( "The connection time for test key 1 must be updated after another key is " @@ -686,8 +699,6 @@ public void testClearAuthorizationsBeforeAdbEnabled() throws Exception { // to clear the adb authorizations when adb is disabled after a boot a NullPointerException // was thrown as deleteKeyStore is invoked against the key store. This test ensures the // key store can be successfully cleared when adb is disabled. - mHandler = mManager.new AdbDebuggingHandler(FgThread.get().getLooper()); - clearKeyStore(); } @@ -723,12 +734,104 @@ public void testAdbKeyStore_removeKey() throws Exception { // Now remove one of the keys and make sure the other key is still there mKeyStore.removeKey(TEST_KEY_1); + // Wait for the handler queue to receive the MESSAGE_ADB_PERSIST_KEYSTORE + flushHandlerQueue(); + assertFalse("The key was still in the adb_keys file after removing the key", isKeyInFile(TEST_KEY_1, mAdbKeyFile)); assertTrue("The key was not in the adb_keys file after removing a different key", isKeyInFile(TEST_KEY_2, mAdbKeyFile)); } + @Test + public void testAdbKeyStore_addDuplicateKey_doesNotAddDuplicateToAdbKeyFile() throws Exception { + setAllowedConnectionTime(0); + + runAdbTest(TEST_KEY_1, true, true, false); + persistKeyStore(); + runAdbTest(TEST_KEY_1, true, true, false); + persistKeyStore(); + + assertEquals("adb_keys contains duplicate keys", 1, adbKeyFileKeys(mAdbKeyFile).size()); + } + + @Test + public void testAdbKeyStore_adbTempKeysFile_readsLastConnectionTimeFromXml() throws Exception { + long insertTime = mFakeTicker.currentTimeMillis(); + runAdbTest(TEST_KEY_1, true, true, false); + persistKeyStore(); + + mFakeTicker.advance(10); + AdbDebuggingManager.AdbKeyStore newKeyStore = mManager.new AdbKeyStore(); + + assertEquals( + "KeyStore not populated from the XML file.", + insertTime, + newKeyStore.getLastConnectionTime(TEST_KEY_1)); + } + + @Test + public void test_notifyKeyFilesUpdated_filesDeletedRemovesPreviouslyAddedKey() + throws Exception { + runAdbTest(TEST_KEY_1, true, true, false); + persistKeyStore(); + + Files.delete(mAdbKeyXmlFile.toPath()); + Files.delete(mAdbKeyFile.toPath()); + + mManager.notifyKeyFilesUpdated(); + flushHandlerQueue(); + + assertFalse( + "Key is authorized after reloading deleted key files. Was state preserved?", + mKeyStore.isKeyAuthorized(TEST_KEY_1)); + } + + @Test + public void test_notifyKeyFilesUpdated_newKeyIsAuthorized() throws Exception { + runAdbTest(TEST_KEY_1, true, true, false); + persistKeyStore(); + + // Back up the existing key files + Path tempXmlFile = Files.createTempFile("adbKeyXmlFile", ".tmp"); + Path tempAdbKeysFile = Files.createTempFile("adb_keys", ".tmp"); + Files.copy(mAdbKeyXmlFile.toPath(), tempXmlFile, StandardCopyOption.REPLACE_EXISTING); + Files.copy(mAdbKeyFile.toPath(), tempAdbKeysFile, StandardCopyOption.REPLACE_EXISTING); + + // Delete the existing key files + Files.delete(mAdbKeyXmlFile.toPath()); + Files.delete(mAdbKeyFile.toPath()); + + // Notify the manager that adb key files have changed. + mManager.notifyKeyFilesUpdated(); + flushHandlerQueue(); + + // Copy the files back + Files.copy(tempXmlFile, mAdbKeyXmlFile.toPath(), StandardCopyOption.REPLACE_EXISTING); + Files.copy(tempAdbKeysFile, mAdbKeyFile.toPath(), StandardCopyOption.REPLACE_EXISTING); + + // Tell the manager that the key files have changed. + mManager.notifyKeyFilesUpdated(); + flushHandlerQueue(); + + assertTrue( + "Key is not authorized after reloading key files.", + mKeyStore.isKeyAuthorized(TEST_KEY_1)); + } + + @Test + public void testAdbKeyStore_adbWifiConnect_storesBssidWhenAlwaysAllow() throws Exception { + String trustedNetwork = "My Network"; + mKeyStore.addTrustedNetwork(trustedNetwork); + persistKeyStore(); + + AdbDebuggingManager.AdbKeyStore newKeyStore = mManager.new AdbKeyStore(); + + assertTrue( + "Persisted trusted network not found in new keystore instance.", + newKeyStore.isTrustedNetwork(trustedNetwork)); + } + @Test public void testIsValidMdnsServiceName() { // Longer than 15 characters @@ -1030,28 +1133,27 @@ private boolean isKeyInFile(String key, File keyFile) throws Exception { if (key == null) { return false; } + return adbKeyFileKeys(keyFile).contains(key); + } + + private static List adbKeyFileKeys(File keyFile) throws Exception { + List keys = new ArrayList<>(); if (keyFile.exists()) { try (BufferedReader in = new BufferedReader(new FileReader(keyFile))) { String currKey; while ((currKey = in.readLine()) != null) { - if (key.equals(currKey)) { - return true; - } + keys.add(currKey); } } } - return false; + return keys; } /** * Helper class that extends AdbDebuggingThread to receive the response from AdbDebuggingManager * indicating whether the key should be allowed to connect. */ - class AdbDebuggingThreadTest extends AdbDebuggingManager.AdbDebuggingThread { - AdbDebuggingThreadTest() { - mManager.super(); - } - + private class AdbDebuggingThreadTest extends AdbDebuggingManager.AdbDebuggingThread { @Override public void sendResponse(String msg) { TestResult result = new TestResult(TestResult.RESULT_RESPONSE_RECEIVED, msg); @@ -1091,4 +1193,17 @@ public String toString() { return "{mReturnCode = " + mReturnCode + ", mMessage = " + mMessage + "}"; } } + + private static class FakeTicker implements AdbDebuggingManager.Ticker { + private long mCurrentTime; + + private void advance(long milliseconds) { + mCurrentTime += milliseconds; + } + + @Override + public long currentTimeMillis() { + return mCurrentTime; + } + } } diff --git a/services/tests/servicestests/src/com/android/server/biometrics/AuthSessionTest.java b/services/tests/servicestests/src/com/android/server/biometrics/AuthSessionTest.java index 25cf8a86baad..e95924ad7109 100644 --- a/services/tests/servicestests/src/com/android/server/biometrics/AuthSessionTest.java +++ b/services/tests/servicestests/src/com/android/server/biometrics/AuthSessionTest.java @@ -20,7 +20,9 @@ import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FINGERPRINT; import static android.hardware.biometrics.BiometricPrompt.DISMISSED_REASON_NEGATIVE; -import static com.android.server.biometrics.BiometricServiceStateProto.*; +import static com.android.server.biometrics.BiometricServiceStateProto.STATE_AUTH_CALLED; +import static com.android.server.biometrics.BiometricServiceStateProto.STATE_AUTH_STARTED; +import static com.android.server.biometrics.BiometricServiceStateProto.STATE_AUTH_STARTED_UI_SHOWING; import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertFalse; @@ -32,6 +34,8 @@ import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -279,6 +283,43 @@ public void testMultiAuth_fingerprintSensorStartsAfterUINotifies() session.mPreAuthInfo.eligibleSensors.get(fingerprintSensorId).getSensorState()); } + @Test + public void testOnDialogAnimatedInDoesNothingDuringInvalidState() throws Exception { + setupFingerprint(0 /* id */, FingerprintSensorProperties.TYPE_UDFPS_OPTICAL); + final long operationId = 123; + final int userId = 10; + + final AuthSession session = createAuthSession(mSensors, + false /* checkDevicePolicyManager */, + Authenticators.BIOMETRIC_STRONG, + TEST_REQUEST_ID, + operationId, + userId); + final IBiometricAuthenticator impl = session.mPreAuthInfo.eligibleSensors.get(0).impl; + + session.goToInitialState(); + for (BiometricSensor sensor : session.mPreAuthInfo.eligibleSensors) { + assertEquals(BiometricSensor.STATE_WAITING_FOR_COOKIE, sensor.getSensorState()); + session.onCookieReceived( + session.mPreAuthInfo.eligibleSensors.get(sensor.id).getCookie()); + } + assertTrue(session.allCookiesReceived()); + assertEquals(STATE_AUTH_STARTED, session.getState()); + verify(impl, never()).startPreparedClient(anyInt()); + + // First invocation should start the client monitor. + session.onDialogAnimatedIn(); + assertEquals(STATE_AUTH_STARTED_UI_SHOWING, session.getState()); + verify(impl).startPreparedClient(anyInt()); + + // Subsequent invocations should not start the client monitor again. + session.onDialogAnimatedIn(); + session.onDialogAnimatedIn(); + session.onDialogAnimatedIn(); + assertEquals(STATE_AUTH_STARTED_UI_SHOWING, session.getState()); + verify(impl, times(1)).startPreparedClient(anyInt()); + } + @Test public void testCancelAuthentication_whenStateAuthCalled_invokesCancel() throws RemoteException { diff --git a/services/tests/servicestests/src/com/android/server/biometrics/sensors/BiometricSchedulerOperationTest.java b/services/tests/servicestests/src/com/android/server/biometrics/sensors/BiometricSchedulerOperationTest.java index c17347320f52..9e9d70332f00 100644 --- a/services/tests/servicestests/src/com/android/server/biometrics/sensors/BiometricSchedulerOperationTest.java +++ b/services/tests/servicestests/src/com/android/server/biometrics/sensors/BiometricSchedulerOperationTest.java @@ -80,11 +80,14 @@ public InterruptableMonitor() { private Handler mHandler; private BiometricSchedulerOperation mOperation; + private boolean mIsDebuggable; @Before public void setUp() { mHandler = new Handler(TestableLooper.get(this).getLooper()); - mOperation = new BiometricSchedulerOperation(mClientMonitor, mClientCallback); + mIsDebuggable = false; + mOperation = new BiometricSchedulerOperation(mClientMonitor, mClientCallback, + () -> mIsDebuggable); } @Test @@ -125,6 +128,34 @@ public void testNoStartWithoutCookie() { verify(mClientMonitor, never()).start(any()); } + @Test + public void testSecondStartWithCookieCrashesWhenDebuggable() { + final int cookie = 5; + mIsDebuggable = true; + when(mClientMonitor.getCookie()).thenReturn(cookie); + when(mClientMonitor.getFreshDaemon()).thenReturn(mHal); + + final boolean started = mOperation.startWithCookie(mOnStartCallback, cookie); + assertThat(started).isTrue(); + + assertThrows(IllegalStateException.class, + () -> mOperation.startWithCookie(mOnStartCallback, cookie)); + } + + @Test + public void testSecondStartWithCookieFailsNicelyWhenNotDebuggable() { + final int cookie = 5; + mIsDebuggable = false; + when(mClientMonitor.getCookie()).thenReturn(cookie); + when(mClientMonitor.getFreshDaemon()).thenReturn(mHal); + + final boolean started = mOperation.startWithCookie(mOnStartCallback, cookie); + assertThat(started).isTrue(); + + final boolean startedAgain = mOperation.startWithCookie(mOnStartCallback, cookie); + assertThat(startedAgain).isFalse(); + } + @Test public void startsWhenReadyAndHalAvailable() { when(mClientMonitor.getCookie()).thenReturn(0); @@ -169,8 +200,35 @@ public void startFailsWhenReadyButHalNotAvailable() { verify(mOnStartCallback).onClientFinished(eq(mClientMonitor), eq(false)); } + @Test + public void secondStartCrashesWhenDebuggable() { + mIsDebuggable = true; + when(mClientMonitor.getCookie()).thenReturn(0); + when(mClientMonitor.getFreshDaemon()).thenReturn(mHal); + + final boolean started = mOperation.start(mOnStartCallback); + assertThat(started).isTrue(); + + assertThrows(IllegalStateException.class, () -> mOperation.start(mOnStartCallback)); + } + + @Test + public void secondStartFailsNicelyWhenNotDebuggable() { + mIsDebuggable = false; + when(mClientMonitor.getCookie()).thenReturn(0); + when(mClientMonitor.getFreshDaemon()).thenReturn(mHal); + + final boolean started = mOperation.start(mOnStartCallback); + assertThat(started).isTrue(); + + final boolean startedAgain = mOperation.start(mOnStartCallback); + assertThat(startedAgain).isFalse(); + } + @Test public void doesNotStartWithCookie() { + // This class only throws exceptions when debuggable. + mIsDebuggable = true; when(mClientMonitor.getCookie()).thenReturn(9); assertThrows(IllegalStateException.class, () -> mOperation.start(mock(ClientMonitorCallback.class))); @@ -178,6 +236,8 @@ public void doesNotStartWithCookie() { @Test public void cannotRestart() { + // This class only throws exceptions when debuggable. + mIsDebuggable = true; when(mClientMonitor.getFreshDaemon()).thenReturn(mHal); mOperation.start(mOnStartCallback); @@ -188,6 +248,8 @@ public void cannotRestart() { @Test public void abortsNotRunning() { + // This class only throws exceptions when debuggable. + mIsDebuggable = true; when(mClientMonitor.getFreshDaemon()).thenReturn(mHal); mOperation.abort(); @@ -200,7 +262,8 @@ public void abortsNotRunning() { } @Test - public void cannotAbortRunning() { + public void abortCrashesWhenDebuggableIfOperationIsRunning() { + mIsDebuggable = true; when(mClientMonitor.getFreshDaemon()).thenReturn(mHal); mOperation.start(mOnStartCallback); @@ -208,6 +271,16 @@ public void cannotAbortRunning() { assertThrows(IllegalStateException.class, () -> mOperation.abort()); } + @Test + public void abortFailsNicelyWhenNotDebuggableIfOperationIsRunning() { + mIsDebuggable = false; + when(mClientMonitor.getFreshDaemon()).thenReturn(mHal); + + mOperation.start(mOnStartCallback); + + mOperation.abort(); + } + @Test public void cancel() { when(mClientMonitor.getFreshDaemon()).thenReturn(mHal); @@ -253,6 +326,30 @@ public void cancelWithoutStarting() { verify(mClientMonitor).destroy(); } + @Test + public void cancelCrashesWhenDebuggableIfOperationIsFinished() { + mIsDebuggable = true; + when(mClientMonitor.getFreshDaemon()).thenReturn(mHal); + + mOperation.abort(); + assertThat(mOperation.isFinished()).isTrue(); + + final ClientMonitorCallback cancelCb = mock(ClientMonitorCallback.class); + assertThrows(IllegalStateException.class, () -> mOperation.cancel(mHandler, cancelCb)); + } + + @Test + public void cancelFailsNicelyWhenNotDebuggableIfOperationIsFinished() { + mIsDebuggable = false; + when(mClientMonitor.getFreshDaemon()).thenReturn(mHal); + + mOperation.abort(); + assertThat(mOperation.isFinished()).isTrue(); + + final ClientMonitorCallback cancelCb = mock(ClientMonitorCallback.class); + mOperation.cancel(mHandler, cancelCb); + } + @Test public void markCanceling() { when(mClientMonitor.getFreshDaemon()).thenReturn(mHal); diff --git a/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java index 0f2fe4434bfa..821ce5edad27 100644 --- a/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java @@ -75,6 +75,7 @@ import static com.android.server.net.NetworkPolicyManagerService.TYPE_RAPID; import static com.android.server.net.NetworkPolicyManagerService.TYPE_WARNING; import static com.android.server.net.NetworkPolicyManagerService.UidBlockedState.getEffectiveBlockedReasons; +import static com.android.server.net.NetworkPolicyManagerService.normalizeTemplate; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -2030,6 +2031,18 @@ public void testSupportedCarrierUsagePolicy() throws Exception { METERED_NO, actualPolicy.template.getMeteredness()); } + @Test + public void testNormalizeTemplate_duplicatedMergedImsiList() { + final NetworkTemplate template = new NetworkTemplate.Builder(MATCH_CARRIER) + .setSubscriberIds(Set.of(TEST_IMSI)).build(); + final String[] mergedImsiGroup = new String[] {TEST_IMSI, TEST_IMSI}; + final ArrayList mergedList = new ArrayList<>(); + mergedList.add(mergedImsiGroup); + // Verify the duplicated items in the merged IMSI list won't crash the system. + final NetworkTemplate result = normalizeTemplate(template, mergedList); + assertEquals(template, result); + } + private String formatBlockedStateError(int uid, int rule, boolean metered, boolean backgroundRestricted) { return String.format( diff --git a/services/tests/servicestests/src/com/android/server/pm/AppsFilterImplTest.java b/services/tests/servicestests/src/com/android/server/pm/AppsFilterImplTest.java index facbe80bde67..92443c51b37d 100644 --- a/services/tests/servicestests/src/com/android/server/pm/AppsFilterImplTest.java +++ b/services/tests/servicestests/src/com/android/server/pm/AppsFilterImplTest.java @@ -1376,6 +1376,39 @@ public void testSdkSandbox_cannotSeeNonForceQueryable() throws Exception { null /* callingSetting */, target, SYSTEM_USER)); } + @Test + public void testSdkSandbox_implicitAccessGranted_canSeePackage() throws Exception { + final AppsFilterImpl appsFilter = + new AppsFilterImpl(mFeatureConfigMock, new String[]{}, false, null, + mMockHandler); + final WatchableTester watcher = new WatchableTester(appsFilter, "onChange"); + watcher.register(); + simulateAddBasicAndroid(appsFilter); + watcher.verifyChangeReported("addBasic"); + appsFilter.onSystemReady(mPmInternal); + watcher.verifyChangeReported("systemReady"); + + PackageSetting target = simulateAddPackage(appsFilter, + pkg("com.some.package"), DUMMY_TARGET_APPID, + setting -> setting.setPkgFlags(ApplicationInfo.FLAG_SYSTEM)); + + int callingUid = 20123; + assertTrue(Process.isSdkSandboxUid(callingUid)); + + // Without granting the implicit access the app shouldn't be visible to the sdk sandbox uid. + assertTrue( + appsFilter.shouldFilterApplication(mSnapshot, callingUid, + null /* callingSetting */, target, SYSTEM_USER)); + + appsFilter.grantImplicitAccess(callingUid, target.getAppId(), false /* retainOnUpdate */); + watcher.verifyChangeReported("grantImplicitAccess"); + + // After implicit access was granted the app should be visible to the sdk sandbox uid. + assertFalse( + appsFilter.shouldFilterApplication(mSnapshot, callingUid, + null /* callingSetting */, target, SYSTEM_USER)); + } + private List toList(int[] array) { ArrayList ret = new ArrayList<>(array.length); for (int i = 0; i < array.length; i++) { diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java index 22721a1bcc92..480ad110f357 100755 --- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java @@ -3380,39 +3380,98 @@ public void testSameUserSnooze() { } @Test - public void testSnoozeRunnable_reSnoozeASingleSnoozedNotification() throws Exception { + public void testSnoozeRunnable_tooManySnoozed_singleNotification() { final NotificationRecord notification = generateNotificationRecord( mTestNotificationChannel, 1, null, true); mService.addNotification(notification); - when(mSnoozeHelper.getNotification(any())).thenReturn(notification); + + when(mSnoozeHelper.canSnooze(anyInt())).thenReturn(true); + when(mSnoozeHelper.canSnooze(1)).thenReturn(false); NotificationManagerService.SnoozeNotificationRunnable snoozeNotificationRunnable = mService.new SnoozeNotificationRunnable( - notification.getKey(), 100, null); + notification.getKey(), 100, null); snoozeNotificationRunnable.run(); - NotificationManagerService.SnoozeNotificationRunnable snoozeNotificationRunnable2 = + + verify(mSnoozeHelper, never()).snooze(any(NotificationRecord.class), anyLong()); + assertThat(mService.getNotificationRecordCount()).isEqualTo(1); + } + + @Test + public void testSnoozeRunnable_tooManySnoozed_singleGroupChildNotification() { + final NotificationRecord notification = generateNotificationRecord( + mTestNotificationChannel, 1, "group", true); + final NotificationRecord notificationChild = generateNotificationRecord( + mTestNotificationChannel, 1, "group", false); + mService.addNotification(notification); + mService.addNotification(notificationChild); + + when(mSnoozeHelper.canSnooze(anyInt())).thenReturn(true); + when(mSnoozeHelper.canSnooze(2)).thenReturn(false); + + NotificationManagerService.SnoozeNotificationRunnable snoozeNotificationRunnable = + mService.new SnoozeNotificationRunnable( + notificationChild.getKey(), 100, null); + snoozeNotificationRunnable.run(); + + verify(mSnoozeHelper, never()).snooze(any(NotificationRecord.class), anyLong()); + assertThat(mService.getNotificationRecordCount()).isEqualTo(2); + } + + @Test + public void testSnoozeRunnable_tooManySnoozed_summaryNotification() { + final NotificationRecord notification = generateNotificationRecord( + mTestNotificationChannel, 1, "group", true); + final NotificationRecord notificationChild = generateNotificationRecord( + mTestNotificationChannel, 12, "group", false); + final NotificationRecord notificationChild2 = generateNotificationRecord( + mTestNotificationChannel, 13, "group", false); + mService.addNotification(notification); + mService.addNotification(notificationChild); + mService.addNotification(notificationChild2); + + when(mSnoozeHelper.canSnooze(anyInt())).thenReturn(true); + when(mSnoozeHelper.canSnooze(3)).thenReturn(false); + + NotificationManagerService.SnoozeNotificationRunnable snoozeNotificationRunnable = + mService.new SnoozeNotificationRunnable( + notification.getKey(), 100, null); + snoozeNotificationRunnable.run(); + + verify(mSnoozeHelper, never()).snooze(any(NotificationRecord.class), anyLong()); + assertThat(mService.getNotificationRecordCount()).isEqualTo(3); + } + + @Test + public void testSnoozeRunnable_reSnoozeASingleSnoozedNotification() { + final NotificationRecord notification = generateNotificationRecord( + mTestNotificationChannel, 1, null, true); + mService.addNotification(notification); + when(mSnoozeHelper.getNotification(any())).thenReturn(notification); + when(mSnoozeHelper.canSnooze(anyInt())).thenReturn(true); + + NotificationManagerService.SnoozeNotificationRunnable snoozeNotificationRunnable = mService.new SnoozeNotificationRunnable( notification.getKey(), 100, null); snoozeNotificationRunnable.run(); + snoozeNotificationRunnable.run(); // snooze twice verify(mSnoozeHelper, times(2)).snooze(any(NotificationRecord.class), anyLong()); } @Test - public void testSnoozeRunnable_reSnoozeASnoozedNotificationWithGroupKey() throws Exception { + public void testSnoozeRunnable_reSnoozeASnoozedNotificationWithGroupKey() { final NotificationRecord notification = generateNotificationRecord( mTestNotificationChannel, 1, "group", true); mService.addNotification(notification); when(mSnoozeHelper.getNotification(any())).thenReturn(notification); + when(mSnoozeHelper.canSnooze(anyInt())).thenReturn(true); NotificationManagerService.SnoozeNotificationRunnable snoozeNotificationRunnable = mService.new SnoozeNotificationRunnable( notification.getKey(), 100, null); snoozeNotificationRunnable.run(); - NotificationManagerService.SnoozeNotificationRunnable snoozeNotificationRunnable2 = - mService.new SnoozeNotificationRunnable( - notification.getKey(), 100, null); snoozeNotificationRunnable.run(); // snooze twice @@ -3430,6 +3489,7 @@ public void testSnoozeRunnable_reSnoozeMultipleNotificationsWithGroupKey() throw when(mSnoozeHelper.getNotification(any())).thenReturn(notification); when(mSnoozeHelper.getNotifications( anyString(), anyString(), anyInt())).thenReturn(new ArrayList<>()); + when(mSnoozeHelper.canSnooze(anyInt())).thenReturn(true); NotificationManagerService.SnoozeNotificationRunnable snoozeNotificationRunnable = mService.new SnoozeNotificationRunnable( @@ -3439,8 +3499,8 @@ mService.new SnoozeNotificationRunnable( .thenReturn(new ArrayList<>(Arrays.asList(notification, notification2))); NotificationManagerService.SnoozeNotificationRunnable snoozeNotificationRunnable2 = mService.new SnoozeNotificationRunnable( - notification.getKey(), 100, null); - snoozeNotificationRunnable.run(); + notification2.getKey(), 100, null); + snoozeNotificationRunnable2.run(); // snooze twice verify(mSnoozeHelper, times(4)).snooze(any(NotificationRecord.class), anyLong()); @@ -3454,6 +3514,7 @@ public void testSnoozeRunnable_snoozeNonGrouped() throws Exception { mTestNotificationChannel, 2, "group", false); mService.addNotification(grouped); mService.addNotification(nonGrouped); + when(mSnoozeHelper.canSnooze(anyInt())).thenReturn(true); NotificationManagerService.SnoozeNotificationRunnable snoozeNotificationRunnable = mService.new SnoozeNotificationRunnable( @@ -3483,6 +3544,7 @@ public void testSnoozeRunnable_snoozeSummary_withChildren() throws Exception { mService.addNotification(parent); mService.addNotification(child); mService.addNotification(child2); + when(mSnoozeHelper.canSnooze(anyInt())).thenReturn(true); NotificationManagerService.SnoozeNotificationRunnable snoozeNotificationRunnable = mService.new SnoozeNotificationRunnable( @@ -3504,6 +3566,7 @@ public void testSnoozeRunnable_snoozeGroupChild_fellowChildren() throws Exceptio mService.addNotification(parent); mService.addNotification(child); mService.addNotification(child2); + when(mSnoozeHelper.canSnooze(anyInt())).thenReturn(true); NotificationManagerService.SnoozeNotificationRunnable snoozeNotificationRunnable = mService.new SnoozeNotificationRunnable( @@ -3529,6 +3592,7 @@ public void testSnoozeRunnable_snoozeGroupChild_onlyChildOfSummary() throws Exce mTestNotificationChannel, 2, "group", false); mService.addNotification(parent); mService.addNotification(child); + when(mSnoozeHelper.canSnooze(anyInt())).thenReturn(true); NotificationManagerService.SnoozeNotificationRunnable snoozeNotificationRunnable = mService.new SnoozeNotificationRunnable( @@ -3556,6 +3620,7 @@ public void testSnoozeRunnable_snoozeGroupChild_noOthersInGroup() throws Excepti final NotificationRecord child = generateNotificationRecord( mTestNotificationChannel, 2, "group", false); mService.addNotification(child); + when(mSnoozeHelper.canSnooze(anyInt())).thenReturn(true); NotificationManagerService.SnoozeNotificationRunnable snoozeNotificationRunnable = mService.new SnoozeNotificationRunnable( @@ -6038,6 +6103,62 @@ public void testRemoveForegroundServiceFlagFromNotification_posted() { assertEquals(0, captor.getValue().getNotification().flags); } + @Test + public void testCannotRemoveForegroundFlagWhenOverLimit_enqueued() { + for (int i = 0; i < NotificationManagerService.MAX_PACKAGE_NOTIFICATIONS; i++) { + Notification n = new Notification.Builder(mContext, "").build(); + StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, i, null, mUid, 0, + n, UserHandle.getUserHandleForUid(mUid), null, 0); + NotificationRecord r = new NotificationRecord(mContext, sbn, mTestNotificationChannel); + mService.addEnqueuedNotification(r); + } + Notification n = new Notification.Builder(mContext, "").build(); + n.flags |= FLAG_FOREGROUND_SERVICE; + + StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, + NotificationManagerService.MAX_PACKAGE_NOTIFICATIONS, null, mUid, 0, + n, UserHandle.getUserHandleForUid(mUid), null, 0); + NotificationRecord r = new NotificationRecord(mContext, sbn, mTestNotificationChannel); + + mService.addEnqueuedNotification(r); + + mInternalService.removeForegroundServiceFlagFromNotification( + PKG, r.getSbn().getId(), r.getSbn().getUserId()); + + waitForIdle(); + + assertEquals(NotificationManagerService.MAX_PACKAGE_NOTIFICATIONS, + mService.getNotificationRecordCount()); + } + + @Test + public void testCannotRemoveForegroundFlagWhenOverLimit_posted() { + for (int i = 0; i < NotificationManagerService.MAX_PACKAGE_NOTIFICATIONS; i++) { + Notification n = new Notification.Builder(mContext, "").build(); + StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, i, null, mUid, 0, + n, UserHandle.getUserHandleForUid(mUid), null, 0); + NotificationRecord r = new NotificationRecord(mContext, sbn, mTestNotificationChannel); + mService.addNotification(r); + } + Notification n = new Notification.Builder(mContext, "").build(); + n.flags |= FLAG_FOREGROUND_SERVICE; + + StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, + NotificationManagerService.MAX_PACKAGE_NOTIFICATIONS, null, mUid, 0, + n, UserHandle.getUserHandleForUid(mUid), null, 0); + NotificationRecord r = new NotificationRecord(mContext, sbn, mTestNotificationChannel); + + mService.addNotification(r); + + mInternalService.removeForegroundServiceFlagFromNotification( + PKG, r.getSbn().getId(), r.getSbn().getUserId()); + + waitForIdle(); + + assertEquals(NotificationManagerService.MAX_PACKAGE_NOTIFICATIONS, + mService.getNotificationRecordCount()); + } + @Test public void testAllowForegroundCustomToasts() throws Exception { final String testPackage = "testPackageName"; diff --git a/services/tests/uiservicestests/src/com/android/server/notification/SnoozeHelperTest.java b/services/tests/uiservicestests/src/com/android/server/notification/SnoozeHelperTest.java index 2ae2ef7162a5..8bead5774548 100644 --- a/services/tests/uiservicestests/src/com/android/server/notification/SnoozeHelperTest.java +++ b/services/tests/uiservicestests/src/com/android/server/notification/SnoozeHelperTest.java @@ -15,6 +15,7 @@ */ package com.android.server.notification; +import static com.android.server.notification.SnoozeHelper.CONCURRENT_SNOOZE_LIMIT; import static com.android.server.notification.SnoozeHelper.EXTRA_KEY; import static junit.framework.Assert.assertEquals; @@ -280,6 +281,22 @@ public void testSnooze() throws Exception { UserHandle.USER_SYSTEM, r.getSbn().getPackageName(), r.getKey())); } + @Test + public void testSnoozeLimit() { + for (int i = 0; i < CONCURRENT_SNOOZE_LIMIT; i++ ) { + NotificationRecord r = getNotificationRecord("pkg", i, i+"", UserHandle.SYSTEM); + + assertTrue("cannot snooze record " + i, mSnoozeHelper.canSnooze(1)); + + if (i % 2 == 0) { + mSnoozeHelper.snooze(r, null); + } else { + mSnoozeHelper.snooze(r, 9000); + } + } + assertFalse(mSnoozeHelper.canSnooze(1)); + } + @Test public void testCancelByApp() throws Exception { NotificationRecord r = getNotificationRecord("pkg", 1, "one", UserHandle.SYSTEM); diff --git a/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java b/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java index fd1536c5c0f1..4550b56f6fd0 100644 --- a/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java +++ b/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java @@ -1622,7 +1622,9 @@ public void testAddAutomaticZenRule_beyondSystemLimit() { ZenModeConfig.toScheduleConditionId(si), new ZenPolicy.Builder().build(), NotificationManager.INTERRUPTION_FILTER_PRIORITY, true); - String id = mZenModeHelperSpy.addAutomaticZenRule("android", zenRule, "test"); + // We need the package name to be something that's not "android" so there aren't any + // existing rules under that package. + String id = mZenModeHelperSpy.addAutomaticZenRule("pkgname", zenRule, "test"); assertNotNull(id); } try { @@ -1632,12 +1634,41 @@ public void testAddAutomaticZenRule_beyondSystemLimit() { ZenModeConfig.toScheduleConditionId(new ScheduleInfo()), new ZenPolicy.Builder().build(), NotificationManager.INTERRUPTION_FILTER_PRIORITY, true); - String id = mZenModeHelperSpy.addAutomaticZenRule("android", zenRule, "test"); + String id = mZenModeHelperSpy.addAutomaticZenRule("pkgname", zenRule, "test"); fail("allowed too many rules to be created"); } catch (IllegalArgumentException e) { // yay } + } + @Test + public void testAddAutomaticZenRule_beyondSystemLimit_differentComponents() { + // Make sure the system limit is enforced per-package even with different component provider + // names. + for (int i = 0; i < RULE_LIMIT_PER_PACKAGE; i++) { + ScheduleInfo si = new ScheduleInfo(); + si.startHour = i; + AutomaticZenRule zenRule = new AutomaticZenRule("name" + i, + null, + new ComponentName("android", "ScheduleConditionProvider" + i), + ZenModeConfig.toScheduleConditionId(si), + new ZenPolicy.Builder().build(), + NotificationManager.INTERRUPTION_FILTER_PRIORITY, true); + String id = mZenModeHelperSpy.addAutomaticZenRule("pkgname", zenRule, "test"); + assertNotNull(id); + } + try { + AutomaticZenRule zenRule = new AutomaticZenRule("name", + null, + new ComponentName("android", "ScheduleConditionProviderFinal"), + ZenModeConfig.toScheduleConditionId(new ScheduleInfo()), + new ZenPolicy.Builder().build(), + NotificationManager.INTERRUPTION_FILTER_PRIORITY, true); + String id = mZenModeHelperSpy.addAutomaticZenRule("pkgname", zenRule, "test"); + fail("allowed too many rules to be created"); + } catch (IllegalArgumentException e) { + // yay + } } @Test diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java index 03d87749072d..6fafa491d0ca 100644 --- a/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java @@ -779,7 +779,7 @@ public void onAnimationStart(@WindowManager.TransitionOldType int transit, } @Override - public void onAnimationCancelled() { + public void onAnimationCancelled(boolean isKeyguardOccluded) { } }, 0, 0)); activity.updateOptionsLocked(opts); diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java index b9432753c17f..4ca14ddbd96f 100644 --- a/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java @@ -37,6 +37,7 @@ import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK; import static android.content.Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED; import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP; +import static android.content.pm.ActivityInfo.FLAG_ALLOW_UNTRUSTED_ACTIVITY_EMBEDDING; import static android.content.pm.ActivityInfo.LAUNCH_MULTIPLE; import static android.content.pm.ActivityInfo.LAUNCH_SINGLE_INSTANCE; import static android.content.pm.ActivityInfo.LAUNCH_SINGLE_TASK; @@ -52,6 +53,11 @@ import static com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn; import static com.android.dx.mockito.inline.extended.ExtendedMockito.times; import static com.android.dx.mockito.inline.extended.ExtendedMockito.verify; +import static com.android.server.wm.ActivityStarter.canEmbedActivity; +import static com.android.server.wm.TaskFragment.EMBEDDING_ALLOWED; +import static com.android.server.wm.TaskFragment.EMBEDDING_DISALLOWED_MIN_DIMENSION_VIOLATION; +import static com.android.server.wm.TaskFragment.EMBEDDING_DISALLOWED_NEW_TASK; +import static com.android.server.wm.TaskFragment.EMBEDDING_DISALLOWED_UNTRUSTED_HOST; import static com.android.server.wm.WindowContainer.POSITION_BOTTOM; import static com.android.server.wm.WindowContainer.POSITION_TOP; @@ -59,6 +65,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyBoolean; @@ -87,6 +94,7 @@ import android.platform.test.annotations.Presubmit; import android.service.voice.IVoiceInteractionSession; import android.util.Pair; +import android.util.Size; import android.view.Gravity; import android.window.TaskFragmentOrganizerToken; @@ -1172,6 +1180,7 @@ public void testStartActivityInner_inTaskFragment_failsByDefault() { null /* inTask */, taskFragment); assertFalse(taskFragment.hasChild()); + assertNotNull("Target record must be started on Task.", targetRecord.getParent().asTask()); } @Test @@ -1342,6 +1351,58 @@ public void testResultCanceledWhenNotAllowedStartingActivity() { any()); } + @Test + public void testCanEmbedActivity() { + final Size minDimensions = new Size(1000, 1000); + final WindowLayout windowLayout = new WindowLayout(0, 0, 0, 0, 0, + minDimensions.getWidth(), minDimensions.getHeight()); + final ActivityRecord starting = new ActivityBuilder(mAtm) + .setUid(UNIMPORTANT_UID) + .setWindowLayout(windowLayout) + .build(); + + // Task fragment hasn't attached to a task yet. Start activity to a new task. + TaskFragment taskFragment = new TaskFragmentBuilder(mAtm).build(); + final Task task = new TaskBuilder(mSupervisor).build(); + + assertEquals(EMBEDDING_DISALLOWED_NEW_TASK, + canEmbedActivity(taskFragment, starting, task)); + + // Starting activity is going to be started on a task different from task fragment's parent + // task. Start activity to a new task. + task.addChild(taskFragment, POSITION_TOP); + final Task newTask = new TaskBuilder(mSupervisor).build(); + + assertEquals(EMBEDDING_DISALLOWED_NEW_TASK, + canEmbedActivity(taskFragment, starting, newTask)); + + // Make task fragment bounds exceed task bounds. + final Rect taskBounds = task.getBounds(); + taskFragment.setBounds(taskBounds.left, taskBounds.top, taskBounds.right + 1, + taskBounds.bottom + 1); + + assertEquals(EMBEDDING_DISALLOWED_UNTRUSTED_HOST, + canEmbedActivity(taskFragment, starting, task)); + + taskFragment.setBounds(taskBounds); + starting.info.flags |= FLAG_ALLOW_UNTRUSTED_ACTIVITY_EMBEDDING; + + assertEquals(EMBEDDING_ALLOWED, canEmbedActivity(taskFragment, starting, task)); + + starting.info.flags &= ~FLAG_ALLOW_UNTRUSTED_ACTIVITY_EMBEDDING; + // Set task fragment's uid as the same as starting activity's uid. + taskFragment.setTaskFragmentOrganizer(mock(TaskFragmentOrganizerToken.class), + UNIMPORTANT_UID, "test"); + + assertEquals(EMBEDDING_ALLOWED, canEmbedActivity(taskFragment, starting, task)); + + // Make task fragment bounds smaller than starting activity's minimum dimensions + taskFragment.setBounds(0, 0, minDimensions.getWidth() - 1, minDimensions.getHeight() - 1); + + assertEquals(EMBEDDING_DISALLOWED_MIN_DIMENSION_VIOLATION, + canEmbedActivity(taskFragment, starting, task)); + } + private static void startActivityInner(ActivityStarter starter, ActivityRecord target, ActivityRecord source, ActivityOptions options, Task inTask, TaskFragment inTaskFragment) { diff --git a/services/tests/wmtests/src/com/android/server/wm/AppChangeTransitionTests.java b/services/tests/wmtests/src/com/android/server/wm/AppChangeTransitionTests.java index 71f19148d616..b5764f54ff92 100644 --- a/services/tests/wmtests/src/com/android/server/wm/AppChangeTransitionTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/AppChangeTransitionTests.java @@ -87,7 +87,7 @@ public void onAnimationStart(@WindowManager.TransitionOldType int transit, } @Override - public void onAnimationCancelled() { + public void onAnimationCancelled(boolean isKeyguardOccluded) { } @Override diff --git a/services/tests/wmtests/src/com/android/server/wm/AppTransitionControllerTest.java b/services/tests/wmtests/src/com/android/server/wm/AppTransitionControllerTest.java index 77f884c93682..890a5478602a 100644 --- a/services/tests/wmtests/src/com/android/server/wm/AppTransitionControllerTest.java +++ b/services/tests/wmtests/src/com/android/server/wm/AppTransitionControllerTest.java @@ -777,7 +777,7 @@ public void onAnimationStart(int transit, RemoteAnimationTarget[] apps, } @Override - public void onAnimationCancelled() throws RemoteException { + public void onAnimationCancelled(boolean isKeyguardOccluded) throws RemoteException { mFinishedCallback = null; } diff --git a/services/tests/wmtests/src/com/android/server/wm/AppTransitionTests.java b/services/tests/wmtests/src/com/android/server/wm/AppTransitionTests.java index 436cf36587d8..74154609b22e 100644 --- a/services/tests/wmtests/src/com/android/server/wm/AppTransitionTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/AppTransitionTests.java @@ -522,7 +522,7 @@ public void onAnimationStart(@WindowManager.TransitionOldType int transit, } @Override - public void onAnimationCancelled() { + public void onAnimationCancelled(boolean isKeyguardOccluded) { mCancelled = true; } diff --git a/services/tests/wmtests/src/com/android/server/wm/DragDropControllerTests.java b/services/tests/wmtests/src/com/android/server/wm/DragDropControllerTests.java index 28fc352e2f74..4526d18d63d8 100644 --- a/services/tests/wmtests/src/com/android/server/wm/DragDropControllerTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/DragDropControllerTests.java @@ -467,8 +467,7 @@ public void testValidateFlags() { public void onAnimatorScaleChanged(float scale) {} }); try { - session.validateDragFlags(View.DRAG_FLAG_REQUEST_SURFACE_FOR_RETURN_ANIMATION, - TEST_UID); + session.validateDragFlags(View.DRAG_FLAG_REQUEST_SURFACE_FOR_RETURN_ANIMATION); fail("Expected failure without permission"); } catch (SecurityException e) { // Expected failure @@ -484,8 +483,7 @@ public void testValidateFlagsWithPermission() { public void onAnimatorScaleChanged(float scale) {} }); try { - session.validateDragFlags(View.DRAG_FLAG_REQUEST_SURFACE_FOR_RETURN_ANIMATION, - TEST_UID); + session.validateDragFlags(View.DRAG_FLAG_REQUEST_SURFACE_FOR_RETURN_ANIMATION); // Expected pass } catch (SecurityException e) { fail("Expected no failure with permission"); diff --git a/services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java b/services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java index a4851ad563d9..e6910c2c0eca 100644 --- a/services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java +++ b/services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java @@ -43,6 +43,7 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.ArgumentMatchers.anyFloat; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.eq; @@ -168,7 +169,7 @@ public void testCancel() throws Exception { mController.goodToGo(TRANSIT_OLD_ACTIVITY_OPEN); adapter.onAnimationCancelled(mMockLeash); - verify(mMockRunner).onAnimationCancelled(); + verify(mMockRunner).onAnimationCancelled(anyBoolean()); } @Test @@ -183,7 +184,7 @@ public void testTimeout() throws Exception { mClock.fastForward(10500); mHandler.timeAdvance(); - verify(mMockRunner).onAnimationCancelled(); + verify(mMockRunner).onAnimationCancelled(anyBoolean()); verify(mFinishedCallback).onAnimationFinished(eq(ANIMATION_TYPE_APP_TRANSITION), eq(adapter)); } @@ -204,12 +205,12 @@ win.mActivityRecord, new Point(50, 100), null, new Rect(50, 100, 150, 150), mClock.fastForward(10500); mHandler.timeAdvance(); - verify(mMockRunner, never()).onAnimationCancelled(); + verify(mMockRunner, never()).onAnimationCancelled(anyBoolean()); mClock.fastForward(52500); mHandler.timeAdvance(); - verify(mMockRunner).onAnimationCancelled(); + verify(mMockRunner).onAnimationCancelled(anyBoolean()); verify(mFinishedCallback).onAnimationFinished(eq(ANIMATION_TYPE_APP_TRANSITION), eq(adapter)); } finally { @@ -221,7 +222,7 @@ win.mActivityRecord, new Point(50, 100), null, new Rect(50, 100, 150, 150), public void testZeroAnimations() throws Exception { mController.goodToGo(TRANSIT_OLD_NONE); verify(mMockRunner, never()).onAnimationStart(anyInt(), any(), any(), any(), any()); - verify(mMockRunner).onAnimationCancelled(); + verify(mMockRunner).onAnimationCancelled(anyBoolean()); } @Test @@ -231,7 +232,7 @@ public void testNotReallyStarted() throws Exception { new Point(50, 100), null, new Rect(50, 100, 150, 150), null); mController.goodToGo(TRANSIT_OLD_ACTIVITY_OPEN); verify(mMockRunner, never()).onAnimationStart(anyInt(), any(), any(), any(), any()); - verify(mMockRunner).onAnimationCancelled(); + verify(mMockRunner).onAnimationCancelled(anyBoolean()); } @Test @@ -271,7 +272,7 @@ public void testRemovedBeforeStarted() throws Exception { win.mActivityRecord.removeImmediately(); mController.goodToGo(TRANSIT_OLD_ACTIVITY_OPEN); verify(mMockRunner, never()).onAnimationStart(anyInt(), any(), any(), any(), any()); - verify(mMockRunner).onAnimationCancelled(); + verify(mMockRunner).onAnimationCancelled(anyBoolean()); verify(mFinishedCallback).onAnimationFinished(eq(ANIMATION_TYPE_APP_TRANSITION), eq(adapter)); } @@ -527,7 +528,7 @@ public void testWallpaperAnimatorCanceled_expectAnimationKeepsRunning() throws E // Cancel the wallpaper window animator and ensure the runner is not canceled wallpaperWindowToken.cancelAnimation(); - verify(mMockRunner, never()).onAnimationCancelled(); + verify(mMockRunner, never()).onAnimationCancelled(anyBoolean()); } finally { mDisplayContent.mOpeningApps.clear(); } diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskFragmentOrganizerControllerTest.java b/services/tests/wmtests/src/com/android/server/wm/TaskFragmentOrganizerControllerTest.java index 8202cd915527..ed8440027bdc 100644 --- a/services/tests/wmtests/src/com/android/server/wm/TaskFragmentOrganizerControllerTest.java +++ b/services/tests/wmtests/src/com/android/server/wm/TaskFragmentOrganizerControllerTest.java @@ -21,6 +21,7 @@ import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn; import static com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn; +import static com.android.server.wm.TaskFragment.EMBEDDING_ALLOWED; import static com.android.server.wm.WindowContainer.POSITION_TOP; import static com.android.server.wm.testing.Assert.assertThrows; @@ -531,7 +532,7 @@ public void testApplyTransaction_reparentActivityToTaskFragment_triggerLifecycle mWindowOrganizerController.mLaunchTaskFragments .put(mFragmentToken, mTaskFragment); mTransaction.reparentActivityToTaskFragment(mFragmentToken, activity.token); - doReturn(true).when(mTaskFragment).isAllowedToEmbedActivity(activity); + doReturn(EMBEDDING_ALLOWED).when(mTaskFragment).isAllowedToEmbedActivity(activity); clearInvocations(mAtm.mRootWindowContainer); mAtm.getWindowOrganizerController().applyTransaction(mTransaction); @@ -921,7 +922,6 @@ public void testMinDimensionViolation_ReparentActivityToTaskFragment() { .setOrganizer(mOrganizer) .setBounds(mTaskFragBounds) .build(); - doReturn(true).when(mTaskFragment).isAllowedToEmbedActivity(activity); mWindowOrganizerController.mLaunchTaskFragments.put(mFragmentToken, mTaskFragment); clearInvocations(mAtm.mRootWindowContainer); @@ -956,7 +956,6 @@ public void testMinDimensionViolation_ReparentChildren() { .setOrganizer(mOrganizer) .setBounds(mTaskFragBounds) .build(); - doReturn(true).when(mTaskFragment).isAllowedToEmbedActivity(activity); mWindowOrganizerController.mLaunchTaskFragments.put(oldFragToken, oldTaskFrag); mWindowOrganizerController.mLaunchTaskFragments.put(mFragmentToken, mTaskFragment); clearInvocations(mAtm.mRootWindowContainer); diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java index 5743922d0428..1715a295ded3 100644 --- a/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java @@ -979,7 +979,7 @@ public void onAnimationStart(@WindowManager.TransitionOldType int transit, } @Override - public void onAnimationCancelled() { + public void onAnimationCancelled(boolean isKeyguardOccluded) { } }, 0, 0, false); adapter.setCallingPidUid(123, 456); diff --git a/services/usb/java/com/android/server/usb/UsbDeviceManager.java b/services/usb/java/com/android/server/usb/UsbDeviceManager.java index 6ea416b54811..e734eb22fcb1 100644 --- a/services/usb/java/com/android/server/usb/UsbDeviceManager.java +++ b/services/usb/java/com/android/server/usb/UsbDeviceManager.java @@ -1302,7 +1302,7 @@ protected void updateUsbNotification(boolean force) { } Notification.Builder builder = new Notification.Builder(mContext, channel) - .setSmallIcon(com.android.internal.R.drawable.stat_sys_adb) + .setSmallIcon(com.android.internal.R.drawable.stat_sys_data_usb) .setWhen(0) .setOngoing(true) .setTicker(title) diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 70fe6b10ef20..4f9df9a6519e 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -1285,7 +1285,7 @@ public CarrierConfigManager(Context context) { "carrier_vvm_package_name_string_array"; /** - * Flag specifying whether ICCID is showed in SIM Status screen, default to false. + * Flag specifying whether ICCID is showed in SIM Status screen, default to true. */ public static final String KEY_SHOW_ICCID_IN_SIM_STATUS_BOOL = "show_iccid_in_sim_status_bool"; @@ -8700,7 +8700,7 @@ private static PersistableBundle getDefaults() { sDefaults.putBoolean(KEY_VVM_PREFETCH_BOOL, true); sDefaults.putString(KEY_CARRIER_VVM_PACKAGE_NAME_STRING, ""); sDefaults.putStringArray(KEY_CARRIER_VVM_PACKAGE_NAME_STRING_ARRAY, null); - sDefaults.putBoolean(KEY_SHOW_ICCID_IN_SIM_STATUS_BOOL, false); + sDefaults.putBoolean(KEY_SHOW_ICCID_IN_SIM_STATUS_BOOL, true); sDefaults.putBoolean(KEY_SHOW_SIGNAL_STRENGTH_IN_SIM_STATUS_BOOL, true); sDefaults.putBoolean(KEY_INFLATE_SIGNAL_STRENGTH_BOOL, false); sDefaults.putBoolean(KEY_CI_ACTION_ON_SYS_UPDATE_BOOL, false); @@ -8913,7 +8913,7 @@ private static PersistableBundle getDefaults() { sDefaults.putBoolean(KEY_NOTIFY_VT_HANDOVER_TO_WIFI_FAILURE_BOOL, false); sDefaults.putStringArray(KEY_FILTERED_CNAP_NAMES_STRING_ARRAY, null); sDefaults.putBoolean(KEY_EDITABLE_WFC_ROAMING_MODE_BOOL, false); - sDefaults.putBoolean(KEY_SHOW_BLOCKING_PAY_PHONE_OPTION_BOOL, false); + sDefaults.putBoolean(KEY_SHOW_BLOCKING_PAY_PHONE_OPTION_BOOL, true); sDefaults.putBoolean(KEY_USE_WFC_HOME_NETWORK_MODE_IN_ROAMING_NETWORK_BOOL, false); sDefaults.putBoolean(KEY_STK_DISABLE_LAUNCH_BROWSER_BOOL, false); sDefaults.putBoolean(KEY_ALLOW_METERED_NETWORK_FOR_CERT_DOWNLOAD_BOOL, false); @@ -8963,7 +8963,7 @@ private static PersistableBundle getDefaults() { sDefaults.putBoolean(KEY_SHOW_4G_FOR_3G_DATA_ICON_BOOL, false); sDefaults.putString(KEY_OPERATOR_NAME_FILTER_PATTERN_STRING, ""); sDefaults.putString(KEY_SHOW_CARRIER_DATA_ICON_PATTERN_STRING, ""); - sDefaults.putBoolean(KEY_HIDE_LTE_PLUS_DATA_ICON_BOOL, true); + sDefaults.putBoolean(KEY_HIDE_LTE_PLUS_DATA_ICON_BOOL, false); sDefaults.putInt(KEY_LTE_PLUS_THRESHOLD_BANDWIDTH_KHZ_INT, 20000); sDefaults.putInt(KEY_NR_ADVANCED_THRESHOLD_BANDWIDTH_KHZ_INT, 0); sDefaults.putIntArray(KEY_CARRIER_NR_AVAILABILITIES_INT_ARRAY, @@ -9481,7 +9481,7 @@ public void updateConfigForPhoneId(int phoneId, String simState) { return; } loader.updateConfigForPhoneId(phoneId, simState); - } catch (RemoteException ex) { + } catch (RemoteException | IllegalArgumentException ex) { Rlog.e(TAG, "Error updating config for phoneId=" + phoneId + ": " + ex.toString()); } } diff --git a/tests/Codegen/Android.bp b/tests/Codegen/Android.bp index ddbf16817b94..7fbe3b37f99e 100644 --- a/tests/Codegen/Android.bp +++ b/tests/Codegen/Android.bp @@ -24,6 +24,14 @@ android_test { plugins: [ "staledataclass-annotation-processor", ], + // Exports needed for staledataclass-annotation-processor, see b/139342589. + javacflags: [ + "-J--add-modules=jdk.compiler", + "-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", + "-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", + "-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", + "-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", + ], static_libs: [ "junit", "hamcrest", diff --git a/tools/aapt/Main.cpp b/tools/aapt/Main.cpp index 2f2ef92e72b4..6e05acf99c71 100644 --- a/tools/aapt/Main.cpp +++ b/tools/aapt/Main.cpp @@ -281,8 +281,8 @@ int main(int argc, char* const argv[]) int result = 1; // pessimistically assume an error. int tolerance = 0; - /* default to compression */ - bundle.setCompressionMethod(ZipEntry::kCompressDeflated); + /* default to 0 compression */ + bundle.setCompressionMethod(ZipEntry::kCompressStored); if (argc < 2) { wantUsage = true; diff --git a/tools/aapt/StringPool.cpp b/tools/aapt/StringPool.cpp index 6cacd32eb91d..6fb84371743d 100644 --- a/tools/aapt/StringPool.cpp +++ b/tools/aapt/StringPool.cpp @@ -116,7 +116,7 @@ int StringPool::entry::compare(const entry& o) const { } StringPool::StringPool(bool utf8) : - mUTF8(utf8), mValues(-1) + mUTF8(utf8) { } @@ -133,8 +133,8 @@ ssize_t StringPool::add(const String16& value, const Vector& s ssize_t StringPool::add(const String16& value, bool mergeDuplicates, const String8* configTypeName, const ResTable_config* config) { - ssize_t vidx = mValues.indexOfKey(value); - ssize_t pos = vidx >= 0 ? mValues.valueAt(vidx) : -1; + auto it = mValues.find(value); + ssize_t pos = it != mValues.end() ? it->second : -1; ssize_t eidx = pos >= 0 ? mEntryArray.itemAt(pos) : -1; if (eidx < 0) { eidx = mEntries.add(entry(value)); @@ -181,21 +181,21 @@ ssize_t StringPool::add(const String16& value, } } - const bool first = vidx < 0; + const bool first = (it == mValues.end()); const bool styled = (pos >= 0 && (size_t)pos < mEntryStyleArray.size()) ? mEntryStyleArray[pos].spans.size() : 0; if (first || styled || !mergeDuplicates) { pos = mEntryArray.add(eidx); if (first) { - vidx = mValues.add(value, pos); + mValues[value] = pos; } entry& ent = mEntries.editItemAt(eidx); ent.indices.add(pos); } if (kIsDebug) { - printf("Adding string %s to pool: pos=%zd eidx=%zd vidx=%zd\n", - String8(value).string(), pos, eidx, vidx); + printf("Adding string %s to pool: pos=%zd eidx=%zd\n", + String8(value).string(), pos, eidx); } return pos; @@ -338,14 +338,18 @@ void StringPool::sortByConfig() // Now trim any entries at the end of the new style array that are // not needed. - for (ssize_t i=newEntryStyleArray.size()-1; i>=0; i--) { + ssize_t i; + for (i=newEntryStyleArray.size()-1; i>=0; i--) { const entry_style& style = newEntryStyleArray[i]; if (style.spans.size() > 0) { // That's it. break; } - // This one is not needed; remove. - newEntryStyleArray.removeAt(i); + } + + ssize_t nToRemove=newEntryStyleArray.size()-(i+1); + if (nToRemove) { + newEntryStyleArray.removeItemsAt(i+1, nToRemove); } // All done, install the new data structures and upate mValues with @@ -356,7 +360,7 @@ void StringPool::sortByConfig() mValues.clear(); for (size_t i=0; i* StringPool::offsetsForString(const String16& val) const { - ssize_t pos = mValues.valueFor(val); - if (pos < 0) { + auto it = mValues.find(val); + if (it == mValues.end()) { return NULL; } + ssize_t pos = it->second; return &mEntries[mEntryArray[pos]].indices; } diff --git a/tools/aapt/StringPool.h b/tools/aapt/StringPool.h index 253bcca4f507..e17c865e39a6 100644 --- a/tools/aapt/StringPool.h +++ b/tools/aapt/StringPool.h @@ -18,6 +18,7 @@ #include #include #include +#include using namespace android; @@ -172,7 +173,7 @@ class StringPool // Unique set of all the strings added to the pool, mapped to // the first index of mEntryArray where the value was added. - DefaultKeyedVector mValues; + std::map mValues; // This array maps from the original position a string was placed at // in mEntryArray to its new position after being sorted with sortByConfig(). Vector mOriginalPosToNewPos; diff --git a/tools/aapt2/ResourceParser.cpp b/tools/aapt2/ResourceParser.cpp index 8d35eeec2a93..7f9457a1fb15 100644 --- a/tools/aapt2/ResourceParser.cpp +++ b/tools/aapt2/ResourceParser.cpp @@ -870,15 +870,14 @@ bool ResourceParser::ParseString(xml::XmlPullParser* parser, if (formatted && translatable) { if (!util::VerifyJavaStringFormat(*string_value->value)) { - DiagMessage msg(out_resource->source); - msg << "multiple substitutions specified in non-positional format; " - "did you mean to add the formatted=\"false\" attribute?"; if (options_.error_on_positional_arguments) { + DiagMessage msg(out_resource->source); + msg << "multiple substitutions specified in non-positional format; " + "did you mean to add the formatted=\"false\" attribute?"; + diag_->Error(msg); return false; } - - diag_->Warn(msg); } } diff --git a/tools/aapt2/ResourceUtils.cpp b/tools/aapt2/ResourceUtils.cpp index 23f6c88aad91..3787f3b96f08 100644 --- a/tools/aapt2/ResourceUtils.cpp +++ b/tools/aapt2/ResourceUtils.cpp @@ -51,8 +51,10 @@ std::optional ToResourceName(const android::ResTable::resource_nam util::Utf16ToUtf8(StringPiece16(name_in.package, name_in.packageLen)); std::optional type; + std::string converted; if (name_in.type) { - type = ParseResourceNamedType(util::Utf16ToUtf8(StringPiece16(name_in.type, name_in.typeLen))); + converted = util::Utf16ToUtf8(StringPiece16(name_in.type, name_in.typeLen)); + type = ParseResourceNamedType(converted); } else if (name_in.type8) { type = ParseResourceNamedType(StringPiece(name_in.type8, name_in.typeLen)); } else { @@ -85,9 +87,10 @@ std::optional ToResourceName(const android::AssetManager2::Resourc name_out.package = std::string(name_in.package, name_in.package_len); std::optional type; + std::string converted; if (name_in.type16) { - type = - ParseResourceNamedType(util::Utf16ToUtf8(StringPiece16(name_in.type16, name_in.type_len))); + converted = util::Utf16ToUtf8(StringPiece16(name_in.type16, name_in.type_len)); + type = ParseResourceNamedType(converted); } else if (name_in.type) { type = ParseResourceNamedType(StringPiece(name_in.type, name_in.type_len)); } else { diff --git a/tools/aapt2/cmd/Link.h b/tools/aapt2/cmd/Link.h index d8c76e297ec5..0170c4a4c54b 100644 --- a/tools/aapt2/cmd/Link.h +++ b/tools/aapt2/cmd/Link.h @@ -270,6 +270,8 @@ class LinkCommand : public Command { "Changes the name of the target package for overlay. Most useful\n" "when used in conjunction with --rename-manifest-package.", &options_.manifest_fixer_options.rename_overlay_target_package); + AddOptionalFlag("--rename-overlay-category", "Changes the category for the overlay.", + &options_.manifest_fixer_options.rename_overlay_category); AddOptionalFlagList("-0", "File suffix not to compress.", &options_.extensions_to_not_compress); AddOptionalSwitch("--no-compress", "Do not compress any resources.", diff --git a/tools/aapt2/link/ManifestFixer.cpp b/tools/aapt2/link/ManifestFixer.cpp index d432341a8cde..efa42a2ee1dc 100644 --- a/tools/aapt2/link/ManifestFixer.cpp +++ b/tools/aapt2/link/ManifestFixer.cpp @@ -449,13 +449,18 @@ bool ManifestFixer::BuildRules(xml::XmlActionExecutor* executor, manifest_action["attribution"]["inherit-from"]; manifest_action["original-package"]; manifest_action["overlay"].Action([&](xml::Element* el) -> bool { - if (!options_.rename_overlay_target_package) { - return true; + if (options_.rename_overlay_target_package) { + if (xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "targetPackage")) { + attr->value = options_.rename_overlay_target_package.value(); + } } - - if (xml::Attribute* attr = - el->FindAttribute(xml::kSchemaAndroid, "targetPackage")) { - attr->value = options_.rename_overlay_target_package.value(); + if (options_.rename_overlay_category) { + if (xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "category")) { + attr->value = options_.rename_overlay_category.value(); + } else { + el->attributes.push_back(xml::Attribute{xml::kSchemaAndroid, "category", + options_.rename_overlay_category.value()}); + } } return true; }); diff --git a/tools/aapt2/link/ManifestFixer.h b/tools/aapt2/link/ManifestFixer.h index d5d1d1770e1c..a8707d9d8623 100644 --- a/tools/aapt2/link/ManifestFixer.h +++ b/tools/aapt2/link/ManifestFixer.h @@ -48,6 +48,9 @@ struct ManifestFixerOptions { // . std::optional rename_overlay_target_package; + // The category to use instead of the one defined in 'android:category' in . + std::optional rename_overlay_category; + // The version name to set if 'android:versionName' is not defined in or if // replace_version is set. std::optional version_name_default; diff --git a/tools/aapt2/link/ManifestFixer_test.cpp b/tools/aapt2/link/ManifestFixer_test.cpp index 432f10bdab97..098d0be7f87d 100644 --- a/tools/aapt2/link/ManifestFixer_test.cpp +++ b/tools/aapt2/link/ManifestFixer_test.cpp @@ -351,6 +351,54 @@ TEST_F(ManifestFixerTest, EXPECT_THAT(attr->value, StrEq("com.android")); } +TEST_F(ManifestFixerTest, AddOverlayCategory) { + ManifestFixerOptions options; + options.rename_overlay_category = std::string("category"); + + std::unique_ptr doc = VerifyWithOptions(R"EOF( + + + )EOF", + options); + ASSERT_THAT(doc, NotNull()); + + xml::Element* manifest_el = doc->root.get(); + ASSERT_THAT(manifest_el, NotNull()); + + xml::Element* overlay_el = manifest_el->FindChild({}, "overlay"); + ASSERT_THAT(overlay_el, NotNull()); + + xml::Attribute* attr = overlay_el->FindAttribute(xml::kSchemaAndroid, "category"); + ASSERT_THAT(attr, NotNull()); + EXPECT_THAT(attr->value, StrEq("category")); +} + +TEST_F(ManifestFixerTest, OverrideOverlayCategory) { + ManifestFixerOptions options; + options.rename_overlay_category = std::string("category"); + + std::unique_ptr doc = VerifyWithOptions(R"EOF( + + + )EOF", + options); + ASSERT_THAT(doc, NotNull()); + + xml::Element* manifest_el = doc->root.get(); + ASSERT_THAT(manifest_el, NotNull()); + + xml::Element* overlay_el = manifest_el->FindChild({}, "overlay"); + ASSERT_THAT(overlay_el, NotNull()); + + xml::Attribute* attr = overlay_el->FindAttribute(xml::kSchemaAndroid, "category"); + ASSERT_THAT(attr, NotNull()); + EXPECT_THAT(attr->value, StrEq("category")); +} + TEST_F(ManifestFixerTest, UseDefaultVersionNameAndCode) { ManifestFixerOptions options; options.version_name_default = std::string("Beta"); diff --git a/tools/lint/checks/src/main/java/com/google/android/lint/EnforcePermissionDetector.kt b/tools/lint/checks/src/main/java/com/google/android/lint/EnforcePermissionDetector.kt index 8011b36c9a8f..8f553abfee31 100644 --- a/tools/lint/checks/src/main/java/com/google/android/lint/EnforcePermissionDetector.kt +++ b/tools/lint/checks/src/main/java/com/google/android/lint/EnforcePermissionDetector.kt @@ -65,8 +65,16 @@ class EnforcePermissionDetector : Detector(), SourceCodeScanner { if (attr1[i].name != attr2[i].name) { return false } - val v1 = ConstantEvaluator.evaluate(context, attr1[i].value) - val v2 = ConstantEvaluator.evaluate(context, attr2[i].value) + val value1 = attr1[i].value + val value2 = attr2[i].value + if (value1 == null && value2 == null) { + continue + } + if (value1 == null || value2 == null) { + return false + } + val v1 = ConstantEvaluator.evaluate(context, value1) + val v2 = ConstantEvaluator.evaluate(context, value2) if (v1 != v2) { return false } diff --git a/tools/preload/loadclass/LoadClass.java b/tools/preload/loadclass/LoadClass.java index a71b6a8b145e..3f6658ab8c65 100644 --- a/tools/preload/loadclass/LoadClass.java +++ b/tools/preload/loadclass/LoadClass.java @@ -14,8 +14,8 @@ * limitations under the License. */ -import android.util.Log; import android.os.Debug; +import android.util.Log; /** * Loads a class, runs the garbage collector, and prints showmap output. @@ -28,7 +28,7 @@ public static void main(String[] args) { System.loadLibrary("android_runtime"); if (registerNatives() < 0) { - throw new RuntimeException("Error registering natives."); + throw new RuntimeException("Error registering natives."); } Debug.startAllocCounting(); @@ -46,7 +46,7 @@ public static void main(String[] args) { } } - System.gc(); + Runtime.getRuntime().gc(); int allocCount = Debug.getGlobalAllocCount(); int allocSize = Debug.getGlobalAllocSize(); @@ -73,7 +73,7 @@ public static void main(String[] args) { response.append(',').append(freedCount); response.append(',').append(freedSize); response.append(',').append(nativeHeapSize); - + System.out.println(response.toString()); } diff --git a/tools/processors/staledataclass/Android.bp b/tools/processors/staledataclass/Android.bp index 1e5097662a0a..2169c49a91a5 100644 --- a/tools/processors/staledataclass/Android.bp +++ b/tools/processors/staledataclass/Android.bp @@ -22,17 +22,13 @@ java_plugin { static_libs: [ "codegen-version-info", ], - // The --add-modules/exports flags below don't work for kotlinc yet, so pin this module to Java language level 8 (see b/139342589): - java_version: "1.8", - openjdk9: { - javacflags: [ - "--add-modules=jdk.compiler", - "--add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", - "--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", - "--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", - "--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", - ], - }, + javacflags: [ + "--add-modules=jdk.compiler", + "--add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", + "--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", + "--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", + "--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", + ], use_tools_jar: true, } diff --git a/tools/processors/staledataclass/src/android/processor/staledataclass/StaleDataclassProcessor.kt b/tools/processors/staledataclass/src/android/processor/staledataclass/StaleDataclassProcessor.kt index 2e60f64b21e8..6c156a63b6dd 100644 --- a/tools/processors/staledataclass/src/android/processor/staledataclass/StaleDataclassProcessor.kt +++ b/tools/processors/staledataclass/src/android/processor/staledataclass/StaleDataclassProcessor.kt @@ -14,6 +14,7 @@ * limitations under the License. */ +@file:Suppress("JAVA_MODULE_DOES_NOT_EXPORT_PACKAGE") package android.processor.staledataclass