diff options
368 files changed, 8823 insertions, 3225 deletions
diff --git a/Android.bp b/Android.bp index abf95a8ebc58..2ccddd25c9de 100644 --- a/Android.bp +++ b/Android.bp @@ -73,6 +73,7 @@ java_defaults { "core/java/android/app/IInstrumentationWatcher.aidl", "core/java/android/app/INotificationManager.aidl", "core/java/android/app/IProcessObserver.aidl", + "core/java/android/app/IRequestFinishCallback.aidl", "core/java/android/app/ISearchManager.aidl", "core/java/android/app/ISearchManagerCallback.aidl", "core/java/android/app/IServiceConnection.aidl", diff --git a/api/test-current.txt b/api/test-current.txt index 5dc7929d06df..181932cf1260 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -725,7 +725,6 @@ package android.content.pm { field public static final int FLAG_PERMISSION_USER_SET = 1; // 0x1 field public static final int MATCH_FACTORY_ONLY = 2097152; // 0x200000 field public static final int MATCH_KNOWN_PACKAGES = 4202496; // 0x402000 - field public static boolean RESTRICTED_PERMISSIONS_ENABLED; field public static final String SYSTEM_SHARED_LIBRARY_SERVICES = "android.ext.services"; field public static final String SYSTEM_SHARED_LIBRARY_SHARED = "android.ext.shared"; } diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto index 3a84b79fc681..033dbf7aa4a5 100644 --- a/cmds/statsd/src/atoms.proto +++ b/cmds/statsd/src/atoms.proto @@ -41,7 +41,7 @@ import "frameworks/base/core/proto/android/server/location/enums.proto"; import "frameworks/base/core/proto/android/service/procstats_enum.proto"; import "frameworks/base/core/proto/android/service/usb.proto"; import "frameworks/base/core/proto/android/stats/connectivity/network_stack.proto"; -import "frameworks/base/core/proto/android/stats/connectivity/resolv_stats.proto"; +import "frameworks/base/core/proto/android/stats/dnsresolver/dns_resolver.proto"; import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy.proto"; import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy_enums.proto"; import "frameworks/base/core/proto/android/stats/docsui/docsui_enums.proto"; @@ -5109,36 +5109,36 @@ message AppCompacted { * Logs a DNS lookup operation initiated by the system resolver on behalf of an application * invoking native APIs such as getaddrinfo() or Java APIs such as Network#getAllByName(). * - * The top-level message represents the entire lookup operation, which may result one or more - * queries to the recursive DNS resolvers. Those are individually logged in DnsQueryEvent to - * enable computing error rates and network latency and timeouts broken up by query type, - * transport, network interface, etc. + * The NetworkDnsEventReported message represents the entire lookup operation, which may + * result one or more queries to the recursive DNS resolvers. Those are individually logged + * in DnsQueryEvents to enable computing error rates and network latency and timeouts + * broken up by query type, transport, network interface, etc. */ message NetworkDnsEventReported { + optional android.stats.dnsresolver.EventType event_type = 1; - optional android.stats.connectivity.EventType event_type = 1; - - optional android.stats.connectivity.ReturnCode return_code = 2; + optional android.stats.dnsresolver.ReturnCode return_code = 2; // The latency in microseconds of the entire DNS lookup operation. optional int32 latency_micros = 3; - optional android.stats.connectivity.DnsQueryEventRe dns_query_event_re = 4 [(log_mode) = MODE_BYTES]; + // Only valid for event_type = EVENT_GETADDRINFO. + optional int32 hints_ai_flags = 4; - // ResNSend flags defined in android/multinetwork.h - optional int32 flags = 5; + // Flags passed to android_res_nsend() defined in multinetwork.h + // Only valid for event_type = EVENT_RESNSEND. + optional int32 res_nsend_flags = 5; - optional android.net.NetworkCapabilitiesProto.Transport network_type = 6; + optional android.stats.dnsresolver.Transport network_type = 6; // The DNS over TLS mode on a specific netId. - optional android.stats.connectivity.PrivateDnsModes private_dns_modes = 7; + optional android.stats.dnsresolver.PrivateDnsModes private_dns_modes = 7; // Additional pass-through fields opaque to statsd. // The DNS resolver Mainline module can add new fields here without requiring an OS update. - optional android.stats.connectivity.DnsCallEvent dns_call_event = 8 [(log_mode) = MODE_BYTES]; + optional android.stats.dnsresolver.DnsQueryEvents dns_query_events = 8 [(log_mode) = MODE_BYTES]; } - /** * Logs when a data stall event occurs. * @@ -6131,6 +6131,15 @@ message GpuStatsGlobalInfo { // Total count of the Vulkan driver fails to be loaded. optional int64 vk_loading_failure_count = 8; + + // Api version of the system Vulkan driver. + optional int32 vulkan_version = 9; + + // Api version of the system CPU Vulkan driver. + optional int32 cpu_vulkan_version = 10; + + // Api version of the system GLES driver. + optional int32 gles_version = 11; } /** diff --git a/cmds/statsd/src/external/GpuStatsPuller.cpp b/cmds/statsd/src/external/GpuStatsPuller.cpp index 3fa932fddd04..876383c16863 100644 --- a/cmds/statsd/src/external/GpuStatsPuller.cpp +++ b/cmds/statsd/src/external/GpuStatsPuller.cpp @@ -65,6 +65,9 @@ static bool pullGpuStatsGlobalInfo(const sp<IGpuService>& gpuService, if (!event->write((int64_t)info.glLoadingFailureCount)) return false; if (!event->write((int64_t)info.vkLoadingCount)) return false; if (!event->write((int64_t)info.vkLoadingFailureCount)) return false; + if (!event->write(info.vulkanVersion)) return false; + if (!event->write(info.cpuVulkanVersion)) return false; + if (!event->write(info.glesVersion)) return false; event->init(); data->emplace_back(event); } diff --git a/cmds/statsd/tests/external/GpuStatsPuller_test.cpp b/cmds/statsd/tests/external/GpuStatsPuller_test.cpp index 8625487d1aca..2acfb8354905 100644 --- a/cmds/statsd/tests/external/GpuStatsPuller_test.cpp +++ b/cmds/statsd/tests/external/GpuStatsPuller_test.cpp @@ -48,7 +48,10 @@ static const int64_t GL_DRIVER_LOADING_TIME_1 = 666; static const int64_t VK_DRIVER_LOADING_TIME_0 = 777; static const int64_t VK_DRIVER_LOADING_TIME_1 = 888; static const int64_t VK_DRIVER_LOADING_TIME_2 = 999; -static const size_t NUMBER_OF_VALUES_GLOBAL = 8; +static const int32_t VULKAN_VERSION = 1; +static const int32_t CPU_VULKAN_VERSION = 2; +static const int32_t GLES_VERSION = 3; +static const size_t NUMBER_OF_VALUES_GLOBAL = 11; static const size_t NUMBER_OF_VALUES_APP = 4; // clang-format on @@ -93,6 +96,9 @@ TEST_F(GpuStatsPuller_test, PullGpuStatsGlobalInfo) { EXPECT_TRUE(event->write(GL_LOADING_FAILURE_COUNT)); EXPECT_TRUE(event->write(VK_LOADING_COUNT)); EXPECT_TRUE(event->write(VK_LOADING_FAILURE_COUNT)); + EXPECT_TRUE(event->write(VULKAN_VERSION)); + EXPECT_TRUE(event->write(CPU_VULKAN_VERSION)); + EXPECT_TRUE(event->write(GLES_VERSION)); event->init(); inData.emplace_back(event); MockGpuStatsPuller mockPuller(android::util::GPU_STATS_GLOBAL_INFO, &inData); @@ -110,6 +116,9 @@ TEST_F(GpuStatsPuller_test, PullGpuStatsGlobalInfo) { EXPECT_EQ(GL_LOADING_FAILURE_COUNT, outData[0]->getValues()[5].mValue.long_value); EXPECT_EQ(VK_LOADING_COUNT, outData[0]->getValues()[6].mValue.long_value); EXPECT_EQ(VK_LOADING_FAILURE_COUNT, outData[0]->getValues()[7].mValue.long_value); + EXPECT_EQ(VULKAN_VERSION, outData[0]->getValues()[8].mValue.int_value); + EXPECT_EQ(CPU_VULKAN_VERSION, outData[0]->getValues()[9].mValue.int_value); + EXPECT_EQ(GLES_VERSION, outData[0]->getValues()[10].mValue.int_value); } TEST_F(GpuStatsPuller_test, PullGpuStatsAppInfo) { diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index 2914f6c5abf2..c08ed268833b 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -3666,7 +3666,25 @@ public class Activity extends ContextThemeWrapper FragmentManager fragmentManager = mFragments.getFragmentManager(); - if (fragmentManager.isStateSaved() || !fragmentManager.popBackStackImmediate()) { + if (!fragmentManager.isStateSaved() && fragmentManager.popBackStackImmediate()) { + return; + } + if (!isTaskRoot()) { + // If the activity is not the root of the task, allow finish to proceed normally. + finishAfterTransition(); + return; + } + try { + // Inform activity task manager that the activity received a back press + // while at the root of the task. This call allows ActivityTaskManager + // to intercept or defer finishing. + ActivityTaskManager.getService().onBackPressedOnTaskRoot(mToken, + new IRequestFinishCallback.Stub() { + public void requestFinish() { + finishAfterTransition(); + } + }); + } catch (RemoteException e) { finishAfterTransition(); } } diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java index a36b167004f8..17368b789645 100644 --- a/core/java/android/app/ActivityManager.java +++ b/core/java/android/app/ActivityManager.java @@ -64,7 +64,6 @@ import android.os.ServiceManager; import android.os.SystemProperties; import android.os.UserHandle; import android.os.WorkSource; -import android.permission.PermissionManager; import android.util.ArrayMap; import android.util.DisplayMetrics; import android.util.Singleton; @@ -3739,7 +3738,6 @@ public class ActivityManager { } // Isolated processes don't get any permissions. if (UserHandle.isIsolated(uid)) { - PermissionManager.addPermissionDenialHint("uid " + uid + " is isolated"); return PackageManager.PERMISSION_DENIED; } // If there is a uid that owns whatever is being accessed, it has @@ -3755,26 +3753,24 @@ public class ActivityManager { Slog.w(TAG, "Permission denied: checkComponentPermission() owningUid=" + owningUid, here); */ - PermissionManager.addPermissionDenialHint( - "Target is not exported. owningUid=" + owningUid); return PackageManager.PERMISSION_DENIED; } if (permission == null) { return PackageManager.PERMISSION_GRANTED; } - return checkUidPermission(permission, uid); + try { + return AppGlobals.getPackageManager() + .checkUidPermission(permission, uid); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } } /** @hide */ public static int checkUidPermission(String permission, int uid) { try { - List<String> hints = PermissionManager.getPermissionDenialHints(); - if (hints == null) { - return AppGlobals.getPackageManager().checkUidPermission(permission, uid); - } else { - return AppGlobals.getPackageManager() - .checkUidPermissionWithDenialHintForwarding(permission, uid, hints); - } + return AppGlobals.getPackageManager() + .checkUidPermission(permission, uid); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index 4b37461866d0..bfc8b1204373 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -1069,7 +1069,7 @@ public final class ActivityThread extends ClientTransactionHandler { } public void scheduleApplicationInfoChanged(ApplicationInfo ai) { - mH.removeMessages(H.APPLICATION_INFO_CHANGED); + mH.removeMessages(H.APPLICATION_INFO_CHANGED, ai); sendMessage(H.APPLICATION_INFO_CHANGED, ai); } diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java index 931e3553c2b6..41a4fba0434c 100644 --- a/core/java/android/app/ContextImpl.java +++ b/core/java/android/app/ContextImpl.java @@ -68,7 +68,6 @@ import android.os.Trace; import android.os.UserHandle; import android.os.UserManager; import android.os.storage.StorageManager; -import android.permission.PermissionManager; import android.system.ErrnoException; import android.system.Os; import android.system.OsConstants; @@ -99,7 +98,6 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.nio.ByteOrder; import java.util.ArrayList; -import java.util.List; import java.util.Objects; import java.util.concurrent.Executor; @@ -1830,17 +1828,11 @@ class ContextImpl extends Context { } Slog.w(TAG, "Missing ActivityManager; assuming " + uid + " does not hold " + permission); - PermissionManager.addPermissionDenialHint("Missing ActivityManager"); return PackageManager.PERMISSION_DENIED; } try { - List<String> hints = PermissionManager.getPermissionDenialHints(); - if (hints == null) { - return am.checkPermission(permission, pid, uid); - } else { - return am.checkPermissionWithDenialHintForwarding(permission, pid, uid, hints); - } + return am.checkPermission(permission, pid, uid); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } @@ -1897,61 +1889,43 @@ class ContextImpl extends Context { String permission, int resultOfCheck, boolean selfToo, int uid, String message) { if (resultOfCheck != PackageManager.PERMISSION_GRANTED) { - List<String> hints = PermissionManager.getPermissionDenialHints(); throw new SecurityException( (message != null ? (message + ": ") : "") + (selfToo ? "Neither user " + uid + " nor current process has " - : "uid " + uid + " does not have ") - + permission + "." - + (hints == null ? "" : " Hints: " + hints)); + : "uid " + uid + " does not have ") + + permission + + "."); } } @Override public void enforcePermission( String permission, int pid, int uid, String message) { - List<String> prev = PermissionManager.collectPermissionDenialHints(this, uid); - try { - enforce(permission, - checkPermission(permission, pid, uid), - false, - uid, - message); - } finally { - PermissionManager.resetPermissionDenialHints(prev); - } + enforce(permission, + checkPermission(permission, pid, uid), + false, + uid, + message); } @Override public void enforceCallingPermission(String permission, String message) { - List<String> prev = PermissionManager.collectPermissionDenialHints(this, - Binder.getCallingUid()); - try { - enforce(permission, - checkCallingPermission(permission), - false, - Binder.getCallingUid(), - message); - } finally { - PermissionManager.resetPermissionDenialHints(prev); - } + enforce(permission, + checkCallingPermission(permission), + false, + Binder.getCallingUid(), + message); } @Override public void enforceCallingOrSelfPermission( String permission, String message) { - List<String> prev = PermissionManager.collectPermissionDenialHints(this, - Binder.getCallingUid()); - try { - enforce(permission, - checkCallingOrSelfPermission(permission), - true, - Binder.getCallingUid(), - message); - } finally { - PermissionManager.resetPermissionDenialHints(prev); - } + enforce(permission, + checkCallingOrSelfPermission(permission), + true, + Binder.getCallingUid(), + message); } @Override diff --git a/core/java/android/app/IActivityManager.aidl b/core/java/android/app/IActivityManager.aidl index f82536f65ddb..48ca71690a1b 100644 --- a/core/java/android/app/IActivityManager.aidl +++ b/core/java/android/app/IActivityManager.aidl @@ -194,7 +194,6 @@ interface IActivityManager { int getProcessLimit(); @UnsupportedAppUsage int checkPermission(in String permission, int pid, int uid); - int checkPermissionWithDenialHintForwarding(in String permission, int pid, int uid, inout List<String> permissionDenialHints); int checkUriPermission(in Uri uri, int pid, int uid, int mode, int userId, in IBinder callerToken); void grantUriPermission(in IApplicationThread caller, in String targetPkg, in Uri uri, diff --git a/core/java/android/app/IActivityTaskManager.aidl b/core/java/android/app/IActivityTaskManager.aidl index 7953d42514fc..26720fca4df8 100644 --- a/core/java/android/app/IActivityTaskManager.aidl +++ b/core/java/android/app/IActivityTaskManager.aidl @@ -26,6 +26,7 @@ import android.app.IAppTask; import android.app.IAssistDataReceiver; import android.app.IInstrumentationWatcher; import android.app.IProcessObserver; +import android.app.IRequestFinishCallback; import android.app.IServiceConnection; import android.app.IStopUserCallback; import android.app.ITaskStackListener; @@ -484,4 +485,12 @@ interface IActivityTaskManager { * @param activityToken The token of the target activity to restart. */ void restartActivityProcessIfVisible(in IBinder activityToken); + + /** + * Reports that an Activity received a back key press when there were no additional activities + * on the back stack. If the Activity should be finished, the callback will be invoked. A + * callback is used instead of finishing the activity directly from the server such that the + * client may perform actions prior to finishing. + */ + void onBackPressedOnTaskRoot(in IBinder activityToken, in IRequestFinishCallback callback); } diff --git a/core/java/android/app/IRequestFinishCallback.aidl b/core/java/android/app/IRequestFinishCallback.aidl new file mode 100644 index 000000000000..3270565727d9 --- /dev/null +++ b/core/java/android/app/IRequestFinishCallback.aidl @@ -0,0 +1,27 @@ +/* + * 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 android.app; + +/** + * This callback allows ActivityTaskManager to ask the calling Activity + * to finish in response to a call to onBackPressedOnTaskRoot. + * + * {@hide} + */ +oneway interface IRequestFinishCallback { + void requestFinish(); +} diff --git a/core/java/android/app/ITaskStackListener.aidl b/core/java/android/app/ITaskStackListener.aidl index 841ff6a3f12e..1fdc8ca5b291 100644 --- a/core/java/android/app/ITaskStackListener.aidl +++ b/core/java/android/app/ITaskStackListener.aidl @@ -161,4 +161,12 @@ oneway interface ITaskStackListener { * @see com.android.server.wm.AppWindowToken#inSizeCompatMode */ void onSizeCompatModeActivityChanged(int displayId, in IBinder activityToken); + + /** + * Reports that an Activity received a back key press when there were no additional activities + * on the back stack. + * + * @param taskInfo info about the task which received the back press + */ + void onBackPressedOnTaskRoot(in ActivityManager.RunningTaskInfo taskInfo); } diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java index 310cce41fa41..1ac619c386cc 100644 --- a/core/java/android/app/LoadedApk.java +++ b/core/java/android/app/LoadedApk.java @@ -1497,7 +1497,7 @@ public final class LoadedApk { private Intent mCurIntent; private final boolean mOrdered; private boolean mDispatched; - private Throwable mPreviousRunStacktrace; // To investigate b/37809561. STOPSHIP remove. + private boolean mRunCalled; public Args(Intent intent, int resultCode, String resultData, Bundle resultExtras, boolean ordered, boolean sticky, int sendingUser) { @@ -1525,13 +1525,12 @@ public final class LoadedApk { final Intent intent = mCurIntent; if (intent == null) { Log.wtf(TAG, "Null intent being dispatched, mDispatched=" + mDispatched - + ": run() previously called at " - + Log.getStackTraceString(mPreviousRunStacktrace)); + + (mRunCalled ? ", run() has already been called" : "")); } mCurIntent = null; mDispatched = true; - mPreviousRunStacktrace = new Throwable("Previous stacktrace"); + mRunCalled = true; if (receiver == null || intent == null || mForgotten) { if (mRegistered && ordered) { if (ActivityThread.DEBUG_BROADCAST) Slog.i(ActivityThread.TAG, diff --git a/core/java/android/app/TaskStackListener.java b/core/java/android/app/TaskStackListener.java index a4a97c4cac1d..00f3ad58afa6 100644 --- a/core/java/android/app/TaskStackListener.java +++ b/core/java/android/app/TaskStackListener.java @@ -168,4 +168,9 @@ public abstract class TaskStackListener extends ITaskStackListener.Stub { public void onSizeCompatModeActivityChanged(int displayId, IBinder activityToken) throws RemoteException { } + + @Override + public void onBackPressedOnTaskRoot(ActivityManager.RunningTaskInfo taskInfo) + throws RemoteException { + } } diff --git a/core/java/android/content/pm/IPackageManager.aidl b/core/java/android/content/pm/IPackageManager.aidl index 225eec13d6eb..6ab4657d727d 100644 --- a/core/java/android/content/pm/IPackageManager.aidl +++ b/core/java/android/content/pm/IPackageManager.aidl @@ -108,7 +108,6 @@ interface IPackageManager { @UnsupportedAppUsage int checkPermission(String permName, String pkgName, int userId); - int checkUidPermissionWithDenialHintForwarding(String permName, int uid, inout List<String> permissionDenialHints); int checkUidPermission(String permName, int uid); @UnsupportedAppUsage diff --git a/core/java/android/content/pm/PackageInstaller.java b/core/java/android/content/pm/PackageInstaller.java index a8815ec6cfaa..89eabc285e38 100644 --- a/core/java/android/content/pm/PackageInstaller.java +++ b/core/java/android/content/pm/PackageInstaller.java @@ -1278,7 +1278,7 @@ public class PackageInstaller { public int mode = MODE_INVALID; /** {@hide} */ @UnsupportedAppUsage - public int installFlags; + public int installFlags = PackageManager.INSTALL_ALL_WHITELIST_RESTRICTED_PERMISSIONS; /** {@hide} */ public int installLocation = PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY; /** {@hide} */ @@ -1513,18 +1513,21 @@ public class PackageInstaller { * state of the permission can be determined only at install time and cannot be * changed on updated or at a later point via the package manager APIs. * + * <p>Initially, all restricted permissions are whitelisted but you can change + * which ones are whitelisted by calling this method or the corresponding ones + * on the {@link PackageManager}. + * * @see PackageManager#addWhitelistedRestrictedPermission(String, String, int) * @see PackageManager#removeWhitelistedRestrictedPermission(String, String, int) */ public void setWhitelistedRestrictedPermissions(@Nullable Set<String> permissions) { if (permissions == RESTRICTED_PERMISSIONS_ALL) { installFlags |= PackageManager.INSTALL_ALL_WHITELIST_RESTRICTED_PERMISSIONS; - } - if (permissions != null) { - this.whitelistedRestrictedPermissions = new ArrayList<>(permissions); + whitelistedRestrictedPermissions = null; } else { installFlags &= ~PackageManager.INSTALL_ALL_WHITELIST_RESTRICTED_PERMISSIONS; - this.whitelistedRestrictedPermissions = null; + whitelistedRestrictedPermissions = (permissions != null) + ? new ArrayList<>(permissions) : null; } } diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java index dd5ca6706316..40561f02d55f 100644 --- a/core/java/android/content/pm/PackageManager.java +++ b/core/java/android/content/pm/PackageManager.java @@ -86,11 +86,6 @@ public abstract class PackageManager { /** {@hide} */ public static final boolean APPLY_DEFAULT_TO_DEVICE_PROTECTED_STORAGE = true; - /** {@hide} */ - @TestApi - // STOPSHIP: Remove this once we get a Play prebuilt. - public static boolean RESTRICTED_PERMISSIONS_ENABLED = false; - /** * This exception is thrown when a given package, application, or component * name cannot be found. diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java index 8b02cae8d64e..861ae7ba122e 100644 --- a/core/java/android/content/res/Configuration.java +++ b/core/java/android/content/res/Configuration.java @@ -55,6 +55,7 @@ import android.os.Parcel; import android.os.Parcelable; import android.text.TextUtils; import android.util.DisplayMetrics; +import android.util.Slog; import android.util.proto.ProtoInputStream; import android.util.proto.ProtoOutputStream; import android.util.proto.WireTypeMismatchException; @@ -70,6 +71,7 @@ import java.io.IOException; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.ArrayList; +import java.util.IllformedLocaleException; import java.util.List; import java.util.Locale; @@ -87,6 +89,8 @@ public final class Configuration implements Parcelable, Comparable<Configuration /** @hide */ public static final Configuration EMPTY = new Configuration(); + private static final String TAG = "Configuration"; + /** * Current user preference for the scaling factor for fonts, relative * to the base density scaling. @@ -1186,6 +1190,7 @@ public final class Configuration implements Parcelable, Comparable<Configuration String language = ""; String country = ""; String variant = ""; + String script = ""; try { while (protoInputStream.nextField() != ProtoInputStream.NO_MORE_FIELDS) { @@ -1200,6 +1205,9 @@ public final class Configuration implements Parcelable, Comparable<Configuration case (int) LocaleProto.VARIANT: variant = protoInputStream.readString(LocaleProto.VARIANT); break; + case (int) LocaleProto.SCRIPT: + script = protoInputStream.readString(LocaleProto.SCRIPT); + break; } } } catch (WireTypeMismatchException wtme) { @@ -1207,7 +1215,19 @@ public final class Configuration implements Parcelable, Comparable<Configuration throw wtme; } finally { protoInputStream.end(localeToken); - list.add(new Locale(language, country, variant)); + try { + final Locale locale = new Locale.Builder() + .setLanguage(language) + .setRegion(country) + .setVariant(variant) + .setScript(script) + .build(); + list.add(locale); + } catch (IllformedLocaleException e) { + Slog.e(TAG, "readFromProto error building locale with: " + + "language-" + language + ";country-" + country + + ";variant-" + variant + ";script-" + script); + } } break; case (int) SCREEN_LAYOUT: diff --git a/core/java/android/net/IpSecManager.java b/core/java/android/net/IpSecManager.java index 1145d5bd4d9a..7d34381f73fa 100644 --- a/core/java/android/net/IpSecManager.java +++ b/core/java/android/net/IpSecManager.java @@ -947,7 +947,8 @@ public final class IpSecManager { throw new IllegalArgumentException(sse); } else if (sse.errorCode == OsConstants.EAGAIN) { throw new IllegalStateException(sse); - } else if (sse.errorCode == OsConstants.EOPNOTSUPP) { + } else if (sse.errorCode == OsConstants.EOPNOTSUPP + || sse.errorCode == OsConstants.EPROTONOSUPPORT) { throw new UnsupportedOperationException(sse); } } diff --git a/core/java/android/os/GraphicsEnvironment.java b/core/java/android/os/GraphicsEnvironment.java index 232869d7aefc..7dbc16a56a7b 100644 --- a/core/java/android/os/GraphicsEnvironment.java +++ b/core/java/android/os/GraphicsEnvironment.java @@ -71,6 +71,8 @@ public class GraphicsEnvironment { "android.app.action.ANGLE_FOR_ANDROID_TOAST_MESSAGE"; private static final String INTENT_KEY_A4A_TOAST_MESSAGE = "A4A Toast Message"; private static final String GAME_DRIVER_WHITELIST_ALL = "*"; + private static final int VULKAN_1_0 = 0x00400000; + private static final int VULKAN_1_1 = 0x00401000; // GAME_DRIVER_ALL_APPS // 0: Default (Invalid values fallback to default as well) @@ -99,7 +101,8 @@ public class GraphicsEnvironment { Trace.traceBegin(Trace.TRACE_TAG_GRAPHICS, "chooseDriver"); if (!chooseDriver(context, coreSettings, pm, packageName)) { setGpuStats(SYSTEM_DRIVER_NAME, SYSTEM_DRIVER_VERSION_NAME, SYSTEM_DRIVER_VERSION_CODE, - SystemProperties.getLong(PROPERTY_GFX_DRIVER_BUILD_TIME, 0), packageName); + SystemProperties.getLong(PROPERTY_GFX_DRIVER_BUILD_TIME, 0), packageName, + getVulkanVersion(pm)); } Trace.traceEnd(Trace.TRACE_TAG_GRAPHICS); } @@ -200,6 +203,20 @@ public class GraphicsEnvironment { return true; } + private static int getVulkanVersion(PackageManager pm) { + // PackageManager doesn't have an API to retrieve the version of a specific feature, and we + // need to avoid retrieving all system features here and looping through them. + if (pm.hasSystemFeature(PackageManager.FEATURE_VULKAN_HARDWARE_VERSION, VULKAN_1_1)) { + return VULKAN_1_1; + } + + if (pm.hasSystemFeature(PackageManager.FEATURE_VULKAN_HARDWARE_VERSION, VULKAN_1_0)) { + return VULKAN_1_0; + } + + return 0; + } + /** * Check whether application is debuggable */ @@ -791,7 +808,7 @@ public class GraphicsEnvironment { // driver_build_time in the meta-data is in "L<Unix epoch timestamp>" format. e.g. L123456. // Long.parseLong will throw if the meta-data "driver_build_time" is not set properly. setGpuStats(driverPackageName, driverPackageInfo.versionName, driverAppInfo.longVersionCode, - Long.parseLong(driverBuildTime.substring(1)), packageName); + Long.parseLong(driverBuildTime.substring(1)), packageName, 0); return true; } @@ -815,7 +832,7 @@ public class GraphicsEnvironment { private static native void setDebugLayersGLES(String layers); private static native void setDriverPathAndSphalLibraries(String path, String sphalLibraries); private static native void setGpuStats(String driverPackageName, String driverVersionName, - long driverVersionCode, long driverBuildTime, String appPackageName); + long driverVersionCode, long driverBuildTime, String appPackageName, int vulkanVersion); private static native void setAngleInfo(String path, String appPackage, String devOptIn, FileDescriptor rulesFd, long rulesOffset, long rulesLength); private static native boolean getShouldUseAngle(String packageName); diff --git a/core/java/android/os/LocaleList.java b/core/java/android/os/LocaleList.java index 011810b6de48..7782753e4abc 100644 --- a/core/java/android/os/LocaleList.java +++ b/core/java/android/os/LocaleList.java @@ -157,6 +157,7 @@ public final class LocaleList implements Parcelable { protoOutputStream.write(LocaleProto.LANGUAGE, locale.getLanguage()); protoOutputStream.write(LocaleProto.COUNTRY, locale.getCountry()); protoOutputStream.write(LocaleProto.VARIANT, locale.getVariant()); + protoOutputStream.write(LocaleProto.SCRIPT, locale.getScript()); protoOutputStream.end(token); } } diff --git a/core/java/android/permission/PermissionManager.java b/core/java/android/permission/PermissionManager.java index 55bb3fe1817c..2a41c2065c46 100644 --- a/core/java/android/permission/PermissionManager.java +++ b/core/java/android/permission/PermissionManager.java @@ -19,22 +19,15 @@ package android.permission; import android.Manifest; import android.annotation.IntRange; import android.annotation.NonNull; -import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.annotation.SystemApi; import android.annotation.SystemService; import android.annotation.TestApi; -import android.content.ContentResolver; import android.content.Context; import android.content.pm.IPackageManager; -import android.content.pm.PackageManager; -import android.os.Build; import android.os.RemoteException; -import android.provider.Settings; -import android.util.Log; import com.android.internal.annotations.Immutable; -import com.android.internal.util.ArrayUtils; import com.android.server.SystemConfig; import java.util.ArrayList; @@ -49,8 +42,6 @@ import java.util.Objects; @SystemApi @SystemService(Context.PERMISSION_SERVICE) public final class PermissionManager { - private static final String LOG_TAG = PermissionManager.class.getSimpleName(); - /** * {@link android.content.pm.PackageParser} needs access without having a {@link Context}. * @@ -63,119 +54,6 @@ public final class PermissionManager { private final IPackageManager mPackageManager; - /** Permission denials added via {@link addPermissionDenial} */ - private static final ThreadLocal<List<String>> sPermissionDenialHints = new ThreadLocal<>(); - - /** - * Report a hint that might explain why a permission check returned - * {@link PackageManager#PERMISSION_DENIED}. - * - * <p>Hints are only collected if enabled via {@link collectPermissionDenialHints} or - * when a non-null value was passed to {@link resetPermissionDenialHints} - * - * @param hint A description of the reason - * - * @hide - */ - public static void addPermissionDenialHint(@NonNull String hint) { - List<String> hints = sPermissionDenialHints.get(); - if (hints == null) { - return; - } - - hints.add(hint); - } - - /** - * @return hints added via {@link #addPermissionDenialHint(String)} on this thread before. - * - * @hide - */ - public static @Nullable List<String> getPermissionDenialHints() { - if (Build.IS_USER) { - return null; - } - - return sPermissionDenialHints.get(); - } - - /** - * Reset the permission denial hints for this thread. - * - * @param initial The initial values. If not null, enabled collection on this thread. - * - * @return the previously collected hints - * - * @hide - */ - public static @Nullable List<String> resetPermissionDenialHints( - @Nullable List<String> initial) { - List<String> prev = getPermissionDenialHints(); - if (initial == null) { - sPermissionDenialHints.remove(); - } else { - sPermissionDenialHints.set(initial); - } - return prev; - } - - /** - * Enable permission denial hint collection if package is in - * {@link Settings.Secure.DEBUG_PACKAGE_PERMISSION_CHECK} - * - * @param context A context to use - * @param uid The uid the permission check is for. - * - * @return the previously collected hints - * - * @hide - */ - public static @Nullable List<String> collectPermissionDenialHints(@NonNull Context context, - int uid) { - List<String> prev = getPermissionDenialHints(); - - if (Build.IS_USER) { - return prev; - } - - ContentResolver cr = context.getContentResolver(); - if (cr == null) { - return prev; - } - - String debugSetting; - try { - debugSetting = Settings.Secure.getString(cr, - Settings.Secure.DEBUG_PACKAGE_PERMISSION_CHECK); - } catch (IllegalStateException e) { - Log.e(LOG_TAG, "Cannot access settings", e); - return prev; - } - if (debugSetting == null) { - return prev; - } - String[] debugPkgs = debugSetting.split(","); - - PackageManager pm = context.getPackageManager(); - if (pm == null) { - return prev; - } - - String[] packages = pm.getPackagesForUid(uid); - if (packages == null) { - return prev; - } - - for (String pkg : packages) { - if (ArrayUtils.contains(debugPkgs, pkg)) { - sPermissionDenialHints.set(new ArrayList<>(0)); - break; - } - } - - return prev; - } - /** * Creates a new instance. * diff --git a/core/java/android/provider/CalendarContract.java b/core/java/android/provider/CalendarContract.java index fa244e480e11..2f68eb475e7a 100644 --- a/core/java/android/provider/CalendarContract.java +++ b/core/java/android/provider/CalendarContract.java @@ -187,6 +187,10 @@ public final class CalendarContract { * {@link android.database.ContentObserver} for this URL in the primary profile will be * notified when there is a change in the managed profile calendar provider. * + * <p>Throw UnsupportedOperationException if another profile doesn't exist or is disabled, or + * if the calling package is not whitelisted to access cross-profile calendar, or if the + * feature has been disabled by the user in Settings. + * * @see Events#ENTERPRISE_CONTENT_URI * @see Calendars#ENTERPRISE_CONTENT_URI * @see Instances#ENTERPRISE_CONTENT_URI diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index dbc62f4a12fa..7c5a1fb5f787 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -5786,16 +5786,6 @@ public final class Settings { public static final String ANDROID_ID = "android_id"; /** - * Comma separated list packages to enable collection of permission denial hints for. - * - * @hide - * - * @see android.permission.PermissionManager#collectPermissionDenialHints(Context, int) - */ - public static final String DEBUG_PACKAGE_PERMISSION_CHECK = - "debug_package_permission_check"; - - /** * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead */ @Deprecated diff --git a/core/java/android/service/appprediction/AppPredictionService.java b/core/java/android/service/appprediction/AppPredictionService.java index c1323bc8fd4c..1391d43b00ca 100644 --- a/core/java/android/service/appprediction/AppPredictionService.java +++ b/core/java/android/service/appprediction/AppPredictionService.java @@ -20,6 +20,7 @@ import static com.android.internal.util.function.pooled.PooledLambda.obtainMessa import android.annotation.CallSuper; import android.annotation.MainThread; import android.annotation.NonNull; +import android.annotation.Nullable; import android.annotation.SystemApi; import android.annotation.TestApi; import android.app.Service; @@ -100,7 +101,7 @@ public abstract class AppPredictionService extends Service { mHandler.sendMessage( obtainMessage(AppPredictionService::onSortAppTargets, AppPredictionService.this, sessionId, targets.getList(), null, - new CallbackWrapper(callback))); + new CallbackWrapper(callback, null))); } @Override @@ -196,7 +197,9 @@ public abstract class AppPredictionService extends Service { final CallbackWrapper wrapper = findCallbackWrapper(callbacks, callback); if (wrapper == null) { - callbacks.add(new CallbackWrapper(callback)); + callbacks.add(new CallbackWrapper(callback, + callbackWrapper -> + mHandler.post(() -> removeCallbackWrapper(callbacks, callbackWrapper)))); if (callbacks.size() == 1) { onStartPredictionUpdates(); } @@ -219,10 +222,18 @@ public abstract class AppPredictionService extends Service { final CallbackWrapper wrapper = findCallbackWrapper(callbacks, callback); if (wrapper != null) { - callbacks.remove(wrapper); - if (callbacks.isEmpty()) { - onStopPredictionUpdates(); - } + removeCallbackWrapper(callbacks, wrapper); + } + } + + private void removeCallbackWrapper( + ArrayList<CallbackWrapper> callbacks, CallbackWrapper wrapper) { + if (callbacks == null) { + return; + } + callbacks.remove(wrapper); + if (callbacks.isEmpty()) { + onStopPredictionUpdates(); } } @@ -295,9 +306,12 @@ public abstract class AppPredictionService extends Service { IBinder.DeathRecipient { private IPredictionCallback mCallback; + private final Consumer<CallbackWrapper> mOnBinderDied; - CallbackWrapper(IPredictionCallback callback) { + CallbackWrapper(IPredictionCallback callback, + @Nullable Consumer<CallbackWrapper> onBinderDied) { mCallback = callback; + mOnBinderDied = onBinderDied; try { mCallback.asBinder().linkToDeath(this, 0); } catch (RemoteException e) { @@ -306,6 +320,10 @@ public abstract class AppPredictionService extends Service { } public boolean isCallback(@NonNull IPredictionCallback callback) { + if (mCallback == null) { + Slog.e(TAG, "Callback is null, likely the binder has died."); + return false; + } return mCallback.equals(callback); } @@ -323,6 +341,9 @@ public abstract class AppPredictionService extends Service { @Override public void binderDied() { mCallback = null; + if (mOnBinderDied != null) { + mOnBinderDied.accept(this); + } } } } diff --git a/core/java/android/service/autofill/augmented/AugmentedAutofillService.java b/core/java/android/service/autofill/augmented/AugmentedAutofillService.java index 656127ad77a9..87e369f20d58 100644 --- a/core/java/android/service/autofill/augmented/AugmentedAutofillService.java +++ b/core/java/android/service/autofill/augmented/AugmentedAutofillService.java @@ -15,6 +15,9 @@ */ package android.service.autofill.augmented; +import static android.service.autofill.augmented.Helper.logResponse; +import static android.util.TimeUtils.formatDuration; + import static com.android.internal.util.function.pooled.PooledLambda.obtainMessage; import android.annotation.CallSuper; @@ -38,9 +41,7 @@ import android.os.SystemClock; import android.service.autofill.augmented.PresentationParams.SystemPopupPresentationParams; import android.util.Log; import android.util.Pair; -import android.util.Slog; import android.util.SparseArray; -import android.util.TimeUtils; import android.view.autofill.AutofillId; import android.view.autofill.AutofillManager; import android.view.autofill.AutofillValue; @@ -48,6 +49,7 @@ import android.view.autofill.IAugmentedAutofillManagerClient; import android.view.autofill.IAutofillWindowPresenter; import com.android.internal.annotations.GuardedBy; +import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import java.io.FileDescriptor; import java.io.PrintWriter; @@ -84,6 +86,9 @@ public abstract class AugmentedAutofillService extends Service { private SparseArray<AutofillProxy> mAutofillProxies; + // Used for metrics / debug only + private ComponentName mServiceComponentName; + private final IAugmentedAutofillService mInterface = new IAugmentedAutofillService.Stub() { @Override @@ -125,6 +130,7 @@ public abstract class AugmentedAutofillService extends Service { /** @hide */ @Override public final IBinder onBind(Intent intent) { + mServiceComponentName = intent.getComponent(); if (SERVICE_INTERFACE.equals(intent.getAction())) { return mInterface.asBinder(); } @@ -215,8 +221,9 @@ public abstract class AugmentedAutofillService extends Service { final CancellationSignal cancellationSignal = CancellationSignal.fromTransport(transport); AutofillProxy proxy = mAutofillProxies.get(sessionId); if (proxy == null) { - proxy = new AutofillProxy(sessionId, client, taskId, componentName, focusedId, - focusedValue, requestTime, callback, cancellationSignal); + proxy = new AutofillProxy(sessionId, client, taskId, mServiceComponentName, + componentName, focusedId, focusedValue, requestTime, callback, + cancellationSignal); mAutofillProxies.put(sessionId, proxy); } else { // TODO(b/123099468): figure out if it's ok to reuse the proxy; add logging @@ -272,6 +279,8 @@ public abstract class AugmentedAutofillService extends Service { @Override /** @hide */ protected final void dump(FileDescriptor fd, PrintWriter pw, String[] args) { + pw.print("Service component: "); pw.println( + ComponentName.flattenToShortString(mServiceComponentName)); if (mAutofillProxies != null) { final int size = mAutofillProxies.size(); pw.print("Number proxies: "); pw.println(size); @@ -301,12 +310,12 @@ public abstract class AugmentedAutofillService extends Service { /** @hide */ static final class AutofillProxy { - static final int REPORT_EVENT_ON_SUCCESS = 1; + static final int REPORT_EVENT_NO_RESPONSE = 1; static final int REPORT_EVENT_UI_SHOWN = 2; static final int REPORT_EVENT_UI_DESTROYED = 3; @IntDef(prefix = { "REPORT_EVENT_" }, value = { - REPORT_EVENT_ON_SUCCESS, + REPORT_EVENT_NO_RESPONSE, REPORT_EVENT_UI_SHOWN, REPORT_EVENT_UI_DESTROYED }) @@ -319,6 +328,8 @@ public abstract class AugmentedAutofillService extends Service { private final int mSessionId; public final int taskId; public final ComponentName componentName; + // Used for metrics / debug only + private String mServicePackageName; @GuardedBy("mLock") private AutofillId mFocusedId; @GuardedBy("mLock") @@ -349,6 +360,7 @@ public abstract class AugmentedAutofillService extends Service { private CancellationSignal mCancellationSignal; private AutofillProxy(int sessionId, @NonNull IBinder client, int taskId, + @NonNull ComponentName serviceComponentName, @NonNull ComponentName componentName, @NonNull AutofillId focusedId, @Nullable AutofillValue focusedValue, long requestTime, @NonNull IFillCallback callback, @NonNull CancellationSignal cancellationSignal) { @@ -357,6 +369,7 @@ public abstract class AugmentedAutofillService extends Service { mCallback = callback; this.taskId = taskId; this.componentName = componentName; + mServicePackageName = serviceComponentName.getPackageName(); mFocusedId = focusedId; mFocusedValue = focusedValue; mFirstRequestTime = requestTime; @@ -439,9 +452,9 @@ public abstract class AugmentedAutofillService extends Service { mCallback.cancel(); } } catch (RemoteException e) { - Slog.e(TAG, "failed to check current pending request status", e); + Log.e(TAG, "failed to check current pending request status", e); } - Slog.d(TAG, "mCallback is updated."); + Log.d(TAG, "mCallback is updated."); } mCallback = callback; } @@ -463,13 +476,17 @@ public abstract class AugmentedAutofillService extends Service { // Used (mostly) for metrics. public void report(@ReportEvent int event) { + if (sVerbose) Log.v(TAG, "report(): " + event); + long duration = -1; + int type = MetricsEvent.TYPE_UNKNOWN; switch (event) { - case REPORT_EVENT_ON_SUCCESS: + case REPORT_EVENT_NO_RESPONSE: + type = MetricsEvent.TYPE_SUCCESS; if (mFirstOnSuccessTime == 0) { mFirstOnSuccessTime = SystemClock.elapsedRealtime(); + duration = mFirstOnSuccessTime - mFirstRequestTime; if (sDebug) { - Slog.d(TAG, "Service responded in " + TimeUtils.formatDuration( - mFirstOnSuccessTime - mFirstRequestTime)); + Log.d(TAG, "Service responded nothing in " + formatDuration(duration)); } } try { @@ -479,27 +496,25 @@ public abstract class AugmentedAutofillService extends Service { } break; case REPORT_EVENT_UI_SHOWN: + type = MetricsEvent.TYPE_OPEN; if (mUiFirstShownTime == 0) { mUiFirstShownTime = SystemClock.elapsedRealtime(); - if (sDebug) { - Slog.d(TAG, "UI shown in " + TimeUtils.formatDuration( - mUiFirstShownTime - mFirstRequestTime)); - } + duration = mUiFirstShownTime - mFirstRequestTime; + if (sDebug) Log.d(TAG, "UI shown in " + formatDuration(duration)); } break; case REPORT_EVENT_UI_DESTROYED: + type = MetricsEvent.TYPE_CLOSE; if (mUiFirstDestroyedTime == 0) { mUiFirstDestroyedTime = SystemClock.elapsedRealtime(); - if (sDebug) { - Slog.d(TAG, "UI destroyed in " + TimeUtils.formatDuration( - mUiFirstDestroyedTime - mFirstRequestTime)); - } + duration = mUiFirstDestroyedTime - mFirstRequestTime; + if (sDebug) Log.d(TAG, "UI destroyed in " + formatDuration(duration)); } break; default: - Slog.w(TAG, "invalid event reported: " + event); + Log.w(TAG, "invalid event reported: " + event); } - // TODO(b/122858578): log metrics as well + logResponse(type, mServicePackageName, componentName, mSessionId, duration); } public void dump(@NonNull String prefix, @NonNull PrintWriter pw) { @@ -527,19 +542,19 @@ public abstract class AugmentedAutofillService extends Service { if (mFirstOnSuccessTime > 0) { final long responseTime = mFirstOnSuccessTime - mFirstRequestTime; pw.print(prefix); pw.print("response time: "); - TimeUtils.formatDuration(responseTime, pw); pw.println(); + formatDuration(responseTime, pw); pw.println(); } if (mUiFirstShownTime > 0) { final long uiRenderingTime = mUiFirstShownTime - mFirstRequestTime; pw.print(prefix); pw.print("UI rendering time: "); - TimeUtils.formatDuration(uiRenderingTime, pw); pw.println(); + formatDuration(uiRenderingTime, pw); pw.println(); } if (mUiFirstDestroyedTime > 0) { final long uiTotalTime = mUiFirstDestroyedTime - mFirstRequestTime; pw.print(prefix); pw.print("UI life time: "); - TimeUtils.formatDuration(uiTotalTime, pw); pw.println(); + formatDuration(uiTotalTime, pw); pw.println(); } } diff --git a/core/java/android/service/autofill/augmented/FillCallback.java b/core/java/android/service/autofill/augmented/FillCallback.java index 33e6a8c25ba4..0251386bd7ce 100644 --- a/core/java/android/service/autofill/augmented/FillCallback.java +++ b/core/java/android/service/autofill/augmented/FillCallback.java @@ -50,8 +50,10 @@ public final class FillCallback { public void onSuccess(@Nullable FillResponse response) { if (sDebug) Log.d(TAG, "onSuccess(): " + response); - mProxy.report(AutofillProxy.REPORT_EVENT_ON_SUCCESS); - if (response == null) return; + if (response == null) { + mProxy.report(AutofillProxy.REPORT_EVENT_NO_RESPONSE); + return; + } final FillWindow fillWindow = response.getFillWindow(); if (fillWindow != null) { diff --git a/core/java/android/service/autofill/augmented/Helper.java b/core/java/android/service/autofill/augmented/Helper.java new file mode 100644 index 000000000000..501696f99c66 --- /dev/null +++ b/core/java/android/service/autofill/augmented/Helper.java @@ -0,0 +1,48 @@ +/* + * 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 android.service.autofill.augmented; + +import android.annotation.NonNull; +import android.content.ComponentName; +import android.metrics.LogMaker; + +import com.android.internal.logging.MetricsLogger; +import com.android.internal.logging.nano.MetricsProto.MetricsEvent; + +/** @hide */ +public final class Helper { + + private static final MetricsLogger sMetricsLogger = new MetricsLogger(); + + /** + * Logs a {@code MetricsEvent.AUTOFILL_AUGMENTED_RESPONSE} event. + */ + public static void logResponse(int type, @NonNull String servicePackageName, + @NonNull ComponentName componentName, int mSessionId, long durationMs) { + final LogMaker log = new LogMaker(MetricsEvent.AUTOFILL_AUGMENTED_RESPONSE) + .setType(type) + .setComponentName(componentName) + .addTaggedData(MetricsEvent.FIELD_AUTOFILL_SESSION_ID, mSessionId) + .addTaggedData(MetricsEvent.FIELD_AUTOFILL_SERVICE, servicePackageName) + .addTaggedData(MetricsEvent.FIELD_AUTOFILL_DURATION, durationMs); + System.out.println("LOGGGO: " + log.getEntries()); // felipeal: tmp + sMetricsLogger.write(log); + } + + private Helper() { + throw new UnsupportedOperationException("contains only static methods"); + } +} diff --git a/core/java/android/transition/Transition.java b/core/java/android/transition/Transition.java index 8819d220e748..0feab4d027a9 100644 --- a/core/java/android/transition/Transition.java +++ b/core/java/android/transition/Transition.java @@ -1947,16 +1947,21 @@ public abstract class Transition implements Cloneable { * @hide */ void forceToEnd(ViewGroup sceneRoot) { - ArrayMap<Animator, AnimationInfo> runningAnimators = getRunningAnimators(); + final ArrayMap<Animator, AnimationInfo> runningAnimators = getRunningAnimators(); int numOldAnims = runningAnimators.size(); - if (sceneRoot != null) { - WindowId windowId = sceneRoot.getWindowId(); - for (int i = numOldAnims - 1; i >= 0; i--) { - AnimationInfo info = runningAnimators.valueAt(i); - if (info.view != null && windowId != null && windowId.equals(info.windowId)) { - Animator anim = runningAnimators.keyAt(i); - anim.end(); - } + if (sceneRoot == null || numOldAnims == 0) { + return; + } + + WindowId windowId = sceneRoot.getWindowId(); + final ArrayMap<Animator, AnimationInfo> oldAnimators = new ArrayMap(runningAnimators); + runningAnimators.clear(); + + for (int i = numOldAnims - 1; i >= 0; i--) { + AnimationInfo info = oldAnimators.valueAt(i); + if (info.view != null && windowId != null && windowId.equals(info.windowId)) { + Animator anim = oldAnimators.keyAt(i); + anim.end(); } } } diff --git a/core/java/android/util/LauncherIcons.java b/core/java/android/util/LauncherIcons.java index cc9991a9be20..8501eb5883d5 100644 --- a/core/java/android/util/LauncherIcons.java +++ b/core/java/android/util/LauncherIcons.java @@ -15,6 +15,7 @@ */ package android.util; +import android.app.ActivityThread; import android.content.Context; import android.content.res.Resources; import android.graphics.Bitmap; @@ -102,16 +103,17 @@ public final class LauncherIcons { } public Drawable getBadgedDrawable(Drawable base, int foregroundRes, int backgroundColor) { - Resources sysRes = Resources.getSystem(); + Resources overlayableRes = + ActivityThread.currentActivityThread().getApplication().getResources(); - Drawable badgeShadow = sysRes.getDrawable( + Drawable badgeShadow = overlayableRes.getDrawable( com.android.internal.R.drawable.ic_corp_icon_badge_shadow); - Drawable badgeColor = sysRes.getDrawable( + Drawable badgeColor = overlayableRes.getDrawable( com.android.internal.R.drawable.ic_corp_icon_badge_color) .getConstantState().newDrawable().mutate(); - Drawable badgeForeground = sysRes.getDrawable(foregroundRes); + Drawable badgeForeground = overlayableRes.getDrawable(foregroundRes); badgeForeground.setTint(backgroundColor); Drawable[] drawables = base == null diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java index bbb90536e8f8..1812d291dd8f 100644 --- a/core/java/android/view/SurfaceView.java +++ b/core/java/android/view/SurfaceView.java @@ -33,6 +33,7 @@ import android.graphics.Region; import android.graphics.RenderNode; import android.os.Build; import android.os.Handler; +import android.os.IBinder; import android.os.Looper; import android.os.SystemClock; import android.util.AttributeSet; @@ -119,11 +120,10 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb final Rect mScreenRect = new Rect(); SurfaceSession mSurfaceSession; - SurfaceControl mSurfaceControl; + SurfaceControlWithBackground mSurfaceControl; // In the case of format changes we switch out the surface in-place // we need to preserve the old one until the new one has drawn. - SurfaceControl mDeferredDestroySurfaceControl; - SurfaceControl mBackgroundControl; + SurfaceControlWithBackground mDeferredDestroySurfaceControl; final Rect mTmpRect = new Rect(); final Configuration mConfiguration = new Configuration(); @@ -487,29 +487,6 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb } } - private void updateBackgroundVisibilityInTransaction() { - if (mBackgroundControl == null) { - return; - } - if ((mSubLayer < 0) && ((mSurfaceFlags & SurfaceControl.OPAQUE) != 0)) { - mBackgroundControl.show(); - mBackgroundControl.setLayer(Integer.MIN_VALUE); - } else { - mBackgroundControl.hide(); - } - } - - private void releaseSurfaces() { - if (mSurfaceControl != null) { - mSurfaceControl.remove(); - mSurfaceControl = null; - } - if (mBackgroundControl != null) { - mBackgroundControl.remove(); - mBackgroundControl = null; - } - } - /** @hide */ protected void updateSurface() { if (!mHaveFrame) { @@ -576,21 +553,14 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb updateOpaqueFlag(); final String name = "SurfaceView - " + viewRoot.getTitle().toString(); - mSurfaceControl = new SurfaceControl.Builder(mSurfaceSession) - .setName(name) - .setOpaque((mSurfaceFlags & SurfaceControl.OPAQUE) != 0) - .setBufferSize(mSurfaceWidth, mSurfaceHeight) - .setFormat(mFormat) - .setParent(viewRoot.getSurfaceControl()) - .setFlags(mSurfaceFlags) - .build(); - mBackgroundControl = new SurfaceControl.Builder(mSurfaceSession) - .setName("Background for -" + name) - .setOpaque(true) - .setColorLayer() - .setParent(mSurfaceControl) - .build(); - + mSurfaceControl = new SurfaceControlWithBackground( + name, + (mSurfaceFlags & SurfaceControl.OPAQUE) != 0, + new SurfaceControl.Builder(mSurfaceSession) + .setBufferSize(mSurfaceWidth, mSurfaceHeight) + .setFormat(mFormat) + .setParent(viewRoot.getSurfaceControl()) + .setFlags(mSurfaceFlags)); } else if (mSurfaceControl == null) { return; } @@ -607,13 +577,11 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb SurfaceControl.openTransaction(); try { mSurfaceControl.setLayer(mSubLayer); - if (mViewVisibility) { mSurfaceControl.show(); } else { mSurfaceControl.hide(); } - updateBackgroundVisibilityInTransaction(); // While creating the surface, we will set it's initial // geometry. Outside of that though, we should generally @@ -699,7 +667,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb } if (creating) { - mSurface.copyFrom(mSurfaceControl); + mSurface.copyFrom(mSurfaceControl.mForegroundControl); } if (sizeChanged && getContext().getApplicationInfo().targetSdkVersion @@ -709,7 +677,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb // existing {@link Surface} will be ignored when the size changes. // Therefore, we must explicitly recreate the {@link Surface} in these // cases. - mSurface.createFrom(mSurfaceControl); + mSurface.createFrom(mSurfaceControl.mForegroundControl); } if (visible && mSurface.isValid()) { @@ -756,7 +724,8 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb if (mSurfaceControl != null && !mSurfaceCreated) { mSurface.release(); - releaseSurfaces(); + mSurfaceControl.remove(); + mSurfaceControl = null; } } } catch (Exception ex) { @@ -857,7 +826,8 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb private void setParentSpaceRectangle(Rect position, long frameNumber) { final ViewRootImpl viewRoot = getViewRootImpl(); - applySurfaceTransforms(mSurfaceControl, position, frameNumber); + applySurfaceTransforms(mSurfaceControl.mForegroundControl, position, frameNumber); + applySurfaceTransforms(mSurfaceControl.mBackgroundControl, position, frameNumber); applyChildSurfaceTransaction_renderWorker(mRtTransaction, viewRoot.mSurface, frameNumber); @@ -922,10 +892,13 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb if (frameNumber > 0) { final ViewRootImpl viewRoot = getViewRootImpl(); - mRtTransaction.deferTransactionUntilSurface(mSurfaceControl, viewRoot.mSurface, + mRtTransaction.deferTransactionUntilSurface(mSurfaceControl.mForegroundControl, viewRoot.mSurface, + frameNumber); + mRtTransaction.deferTransactionUntilSurface(mSurfaceControl.mBackgroundControl, viewRoot.mSurface, frameNumber); } - mRtTransaction.hide(mSurfaceControl); + mRtTransaction.hide(mSurfaceControl.mForegroundControl); + mRtTransaction.hide(mSurfaceControl.mBackgroundControl); mRtTransaction.apply(); } }; @@ -972,19 +945,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb * @hide */ public void setResizeBackgroundColor(int bgColor) { - if (mBackgroundControl == null) { - return; - } - - final float[] colorComponents = new float[] { Color.red(bgColor) / 255.f, - Color.green(bgColor) / 255.f, Color.blue(bgColor) / 255.f }; - - SurfaceControl.openTransaction(); - try { - mBackgroundControl.setColor(colorComponents); - } finally { - SurfaceControl.closeTransaction(); - } + mSurfaceControl.setBackgroundColor(bgColor); } @UnsupportedAppUsage @@ -1168,6 +1129,134 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb * @return The SurfaceControl for this SurfaceView. */ public SurfaceControl getSurfaceControl() { - return mSurfaceControl; + return mSurfaceControl.mForegroundControl; + } + + class SurfaceControlWithBackground { + SurfaceControl mForegroundControl; + SurfaceControl mBackgroundControl; + private boolean mOpaque = true; + public boolean mVisible = false; + + public SurfaceControlWithBackground(String name, boolean opaque, SurfaceControl.Builder b) + throws Exception { + mForegroundControl = b.setName(name).build(); + mBackgroundControl = b.setName("Background for -" + name) + // Unset the buffer size of the background color layer. + .setBufferSize(0, 0) + .setColorLayer() + .build(); + + mOpaque = opaque; + } + + public void setAlpha(float alpha) { + mForegroundControl.setAlpha(alpha); + mBackgroundControl.setAlpha(alpha); + } + + public void setLayer(int zorder) { + mForegroundControl.setLayer(zorder); + // -3 is below all other child layers as SurfaceView never goes below -2 + mBackgroundControl.setLayer(-3); + } + + public void setPosition(float x, float y) { + mForegroundControl.setPosition(x, y); + mBackgroundControl.setPosition(x, y); + } + + public void setBufferSize(int w, int h) { + mForegroundControl.setBufferSize(w, h); + // The background surface is a color layer so we do not set a size. + } + + public void setWindowCrop(Rect crop) { + mForegroundControl.setWindowCrop(crop); + mBackgroundControl.setWindowCrop(crop); + } + + public void setWindowCrop(int width, int height) { + mForegroundControl.setWindowCrop(width, height); + mBackgroundControl.setWindowCrop(width, height); + } + + public void setLayerStack(int layerStack) { + mForegroundControl.setLayerStack(layerStack); + mBackgroundControl.setLayerStack(layerStack); + } + + public void setOpaque(boolean isOpaque) { + mForegroundControl.setOpaque(isOpaque); + mOpaque = isOpaque; + updateBackgroundVisibility(); + } + + public void setSecure(boolean isSecure) { + mForegroundControl.setSecure(isSecure); + } + + public void setMatrix(float dsdx, float dtdx, float dsdy, float dtdy) { + mForegroundControl.setMatrix(dsdx, dtdx, dsdy, dtdy); + mBackgroundControl.setMatrix(dsdx, dtdx, dsdy, dtdy); + } + + public void hide() { + mForegroundControl.hide(); + mVisible = false; + updateBackgroundVisibility(); + } + + public void show() { + mForegroundControl.show(); + mVisible = true; + updateBackgroundVisibility(); + } + + public void remove() { + mForegroundControl.remove(); + mBackgroundControl.remove(); + } + + public void release() { + mForegroundControl.release(); + mBackgroundControl.release(); + } + + public void setTransparentRegionHint(Region region) { + mForegroundControl.setTransparentRegionHint(region); + mBackgroundControl.setTransparentRegionHint(region); + } + + public void deferTransactionUntil(IBinder handle, long frame) { + mForegroundControl.deferTransactionUntil(handle, frame); + mBackgroundControl.deferTransactionUntil(handle, frame); + } + + public void deferTransactionUntil(Surface barrier, long frame) { + mForegroundControl.deferTransactionUntil(barrier, frame); + mBackgroundControl.deferTransactionUntil(barrier, frame); + } + + /** Set the color to fill the background with. */ + private void setBackgroundColor(int bgColor) { + final float[] colorComponents = new float[] { Color.red(bgColor) / 255.f, + Color.green(bgColor) / 255.f, Color.blue(bgColor) / 255.f }; + + SurfaceControl.openTransaction(); + try { + mBackgroundControl.setColor(colorComponents); + } finally { + SurfaceControl.closeTransaction(); + } + } + + void updateBackgroundVisibility() { + if (mOpaque && mVisible) { + mBackgroundControl.show(); + } else { + mBackgroundControl.hide(); + } + } } } diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 4463e13ca5ee..e8356752f807 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -8271,6 +8271,7 @@ public final class ViewRootImpl implements ViewParent, void changeCanvasOpacity(boolean opaque) { Log.d(mTag, "changeCanvasOpacity: opaque=" + opaque); + opaque = opaque & ((mView.mPrivateFlags & View.PFLAG_REQUEST_TRANSPARENT_REGIONS) == 0); if (mAttachInfo.mThreadedRenderer != null) { mAttachInfo.mThreadedRenderer.setOpaque(opaque); } diff --git a/core/java/android/webkit/WebViewLibraryLoader.java b/core/java/android/webkit/WebViewLibraryLoader.java index 5a6aebaaad51..be49fc434c79 100644 --- a/core/java/android/webkit/WebViewLibraryLoader.java +++ b/core/java/android/webkit/WebViewLibraryLoader.java @@ -181,9 +181,9 @@ public class WebViewLibraryLoader { boolean is64Bit = VMRuntime.getRuntime().is64Bit(); // On 64-bit address space is really cheap and we can reserve 1GB which is plenty. // On 32-bit it's fairly scarce and we should keep it to a realistic number that - // permits some future growth but doesn't hog space: we use 100MB which is more than 2x - // the current requirement. - long addressSpaceToReserve = is64Bit ? 1 * 1024 * 1024 * 1024 : 100 * 1024 * 1024; + // permits some future growth but doesn't hog space: we use 130MB which is roughly + // what was calculated on older OS versions in practice. + long addressSpaceToReserve = is64Bit ? 1 * 1024 * 1024 * 1024 : 130 * 1024 * 1024; sAddressSpaceReserved = nativeReserveAddressSpace(addressSpaceToReserve); if (sAddressSpaceReserved) { diff --git a/core/java/com/android/internal/app/ChooserActivity.java b/core/java/com/android/internal/app/ChooserActivity.java index 9a34ffae2a2e..b7d838edadc5 100644 --- a/core/java/com/android/internal/app/ChooserActivity.java +++ b/core/java/com/android/internal/app/ChooserActivity.java @@ -202,6 +202,9 @@ public class ChooserActivity extends ResolverActivity { private long mChooserShownTime; protected boolean mIsSuccessfullySelected; + private long mQueriedTargetServicesTimeMs; + private long mQueriedSharingShortcutsTimeMs; + private ChooserListAdapter mChooserListAdapter; private ChooserRowAdapter mChooserRowAdapter; private int mChooserRowServiceSpacing; @@ -273,6 +276,8 @@ public class ChooserActivity extends ResolverActivity { sri.connection.destroy(); mServiceConnections.remove(sri.connection); if (mServiceConnections.isEmpty()) { + logDirectShareTargetReceived( + MetricsEvent.ACTION_DIRECT_SHARE_TARGETS_LOADED_CHOOSER_SERVICE); sendVoiceChoicesIfNeeded(); } break; @@ -283,6 +288,8 @@ public class ChooserActivity extends ResolverActivity { } unbindRemainingServices(); + logDirectShareTargetReceived( + MetricsEvent.ACTION_DIRECT_SHARE_TARGETS_LOADED_CHOOSER_SERVICE); sendVoiceChoicesIfNeeded(); mChooserListAdapter.completeServiceTargetLoading(); break; @@ -305,6 +312,8 @@ public class ChooserActivity extends ResolverActivity { break; case SHORTCUT_MANAGER_SHARE_TARGET_RESULT_COMPLETED: + logDirectShareTargetReceived( + MetricsEvent.ACTION_DIRECT_SHARE_TARGETS_LOADED_SHORTCUT_MANAGER); sendVoiceChoicesIfNeeded(); break; @@ -1155,6 +1164,8 @@ public class ChooserActivity extends ResolverActivity { } void queryTargetServices(ChooserListAdapter adapter) { + mQueriedTargetServicesTimeMs = System.currentTimeMillis(); + final PackageManager pm = getPackageManager(); ShortcutManager sm = (ShortcutManager) getSystemService(ShortcutManager.class); int targetsToQuery = 0; @@ -1281,6 +1292,7 @@ public class ChooserActivity extends ResolverActivity { private void queryDirectShareTargets( ChooserListAdapter adapter, boolean skipAppPredictionService) { + mQueriedSharingShortcutsTimeMs = System.currentTimeMillis(); if (!skipAppPredictionService) { AppPredictor appPredictor = getAppPredictorForDirectShareIfEnabled(); if (appPredictor != null) { @@ -1391,6 +1403,14 @@ public class ChooserActivity extends ResolverActivity { // Do nothing. We'll send the voice stuff ourselves. } + private void logDirectShareTargetReceived(int logCategory) { + final long queryTime = + logCategory == MetricsEvent.ACTION_DIRECT_SHARE_TARGETS_LOADED_SHORTCUT_MANAGER + ? mQueriedSharingShortcutsTimeMs : mQueriedTargetServicesTimeMs; + final int apiLatency = (int) (System.currentTimeMillis() - queryTime); + getMetricsLogger().write(new LogMaker(logCategory).setSubtype(apiLatency)); + } + void updateModelAndChooserCounts(TargetInfo info) { if (info != null) { sendClickToAppPredictor(info); diff --git a/core/java/com/android/internal/policy/DecorView.java b/core/java/com/android/internal/policy/DecorView.java index d50a70ed62ef..5c1268ded94a 100644 --- a/core/java/com/android/internal/policy/DecorView.java +++ b/core/java/com/android/internal/policy/DecorView.java @@ -630,7 +630,8 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind drawingBounds.bottom -= framePadding.bottom - frameOffsets.bottom; } - Drawable bg = getBackground(); + // Need to call super here as we pretend to be having the original background. + Drawable bg = super.getBackground(); if (bg != null) { bg.setBounds(drawingBounds); } @@ -975,6 +976,18 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind } } + @Override + public void setBackgroundDrawable(Drawable background) { + + // TODO: This should route through setWindowBackground, but late in the release to make this + // change. + if (mOriginalBackgroundDrawable != background) { + mOriginalBackgroundDrawable = background; + updateBackgroundDrawable(); + drawableChanged(); + } + } + public void setWindowFrame(Drawable drawable) { if (getForeground() != drawable) { setForeground(drawable); @@ -1218,9 +1231,13 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind return; } if (mOriginalBackgroundDrawable == null || mBackgroundInsets.equals(Insets.NONE)) { - setBackground(mOriginalBackgroundDrawable); + + // Call super since we are intercepting setBackground on this class. + super.setBackgroundDrawable(mOriginalBackgroundDrawable); } else { - setBackground(new InsetDrawable(mOriginalBackgroundDrawable, + + // Call super since we are intercepting setBackground on this class. + super.setBackgroundDrawable(new InsetDrawable(mOriginalBackgroundDrawable, mBackgroundInsets.left, mBackgroundInsets.top, mBackgroundInsets.right, mBackgroundInsets.bottom) { @@ -1238,6 +1255,11 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind mLastOriginalBackgroundDrawable = mOriginalBackgroundDrawable; } + @Override + public Drawable getBackground() { + return mOriginalBackgroundDrawable; + } + private int calculateStatusBarColor() { return calculateBarColor(mWindow.getAttributes().flags, FLAG_TRANSLUCENT_STATUS, mSemiTransparentBarColor, mWindow.mStatusBarColor, @@ -1958,8 +1980,7 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind final boolean isFullscreen = config.windowConfiguration.getWindowingMode() == WindowConfiguration.WINDOWING_MODE_FULLSCREEN; return isFullscreen && (0 != ((getWindowSystemUiVisibility() | getSystemUiVisibility()) - & (View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION - | View.SYSTEM_UI_FLAG_IMMERSIVE | View.SYSTEM_UI_FLAG_LOW_PROFILE))); + & View.SYSTEM_UI_FLAG_FULLSCREEN)); } private void updateDecorCaptionStatus(Configuration config) { diff --git a/core/jni/android_net_NetUtils.cpp b/core/jni/android_net_NetUtils.cpp index 28c59db6b932..c5fc9b3628df 100644 --- a/core/jni/android_net_NetUtils.cpp +++ b/core/jni/android_net_NetUtils.cpp @@ -49,8 +49,8 @@ int ifc_disable(const char *ifname); namespace android { constexpr int MAXPACKETSIZE = 8 * 1024; -// FrameworkListener limits the size of commands to 1024 bytes. TODO: fix this. -constexpr int MAXCMDSIZE = 1024; +// FrameworkListener limits the size of commands to 4096 bytes. +constexpr int MAXCMDSIZE = 4096; static void throwErrnoException(JNIEnv* env, const char* functionName, int error) { ScopedLocalRef<jstring> detailMessage(env, env->NewStringUTF(functionName)); diff --git a/core/jni/android_os_GraphicsEnvironment.cpp b/core/jni/android_os_GraphicsEnvironment.cpp index 72e3d3495e37..74ebb95b58c7 100644 --- a/core/jni/android_os_GraphicsEnvironment.cpp +++ b/core/jni/android_os_GraphicsEnvironment.cpp @@ -37,14 +37,14 @@ void setDriverPathAndSphalLibraries_native(JNIEnv* env, jobject clazz, jstring p void setGpuStats_native(JNIEnv* env, jobject clazz, jstring driverPackageName, jstring driverVersionName, jlong driverVersionCode, - jlong driverBuildTime, jstring appPackageName) { + jlong driverBuildTime, jstring appPackageName, jint vulkanVersion) { ScopedUtfChars driverPackageNameChars(env, driverPackageName); ScopedUtfChars driverVersionNameChars(env, driverVersionName); ScopedUtfChars appPackageNameChars(env, appPackageName); android::GraphicsEnv::getInstance().setGpuStats(driverPackageNameChars.c_str(), driverVersionNameChars.c_str(), driverVersionCode, driverBuildTime, - appPackageNameChars.c_str()); + appPackageNameChars.c_str(), vulkanVersion); } void setAngleInfo_native(JNIEnv* env, jobject clazz, jstring path, jstring appName, jstring devOptIn, @@ -88,7 +88,7 @@ void setDebugLayersGLES_native(JNIEnv* env, jobject clazz, jstring layers) { const JNINativeMethod g_methods[] = { { "getCanLoadSystemLibraries", "()I", reinterpret_cast<void*>(getCanLoadSystemLibraries_native) }, { "setDriverPathAndSphalLibraries", "(Ljava/lang/String;Ljava/lang/String;)V", reinterpret_cast<void*>(setDriverPathAndSphalLibraries_native) }, - { "setGpuStats", "(Ljava/lang/String;Ljava/lang/String;JJLjava/lang/String;)V", reinterpret_cast<void*>(setGpuStats_native) }, + { "setGpuStats", "(Ljava/lang/String;Ljava/lang/String;JJLjava/lang/String;I)V", reinterpret_cast<void*>(setGpuStats_native) }, { "setAngleInfo", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/io/FileDescriptor;JJ)V", reinterpret_cast<void*>(setAngleInfo_native) }, { "getShouldUseAngle", "(Ljava/lang/String;)Z", reinterpret_cast<void*>(shouldUseAngle_native) }, { "setLayerPaths", "(Ljava/lang/ClassLoader;Ljava/lang/String;)V", reinterpret_cast<void*>(setLayerPaths_native) }, diff --git a/core/proto/android/content/locale.proto b/core/proto/android/content/locale.proto index d8af754dc2ea..bae6ec141981 100644 --- a/core/proto/android/content/locale.proto +++ b/core/proto/android/content/locale.proto @@ -27,5 +27,6 @@ message LocaleProto { optional string language = 1; optional string country = 2; optional string variant = 3; + optional string script = 4; } diff --git a/core/proto/android/stats/connectivity/resolv_stats.proto b/core/proto/android/stats/connectivity/resolv_stats.proto deleted file mode 100644 index 43eb67397fa5..000000000000 --- a/core/proto/android/stats/connectivity/resolv_stats.proto +++ /dev/null @@ -1,182 +0,0 @@ -/* - * 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. - */ -syntax = "proto2"; -package android.stats.connectivity; -import "frameworks/base/core/proto/android/net/networkcapabilities.proto"; - -enum EventType { - EVENT_UNKNOWN = 0; - EVENT_GETADDRINFO = 1; - EVENT_GETHOSTBYNAME = 2; - EVENT_GETHOSTBYADDR = 3; - EVENT_RES_NSEND = 4; -} - -enum PrivateDnsModes { - OFF = 0; - OPPORTUNISTIC = 1; - STRICT = 2; -} -// The return value of the DNS resolver for each DNS lookups. -// bionic/libc/include/netdb.h -// system/netd/resolv/include/netd_resolv/resolv.h -enum ReturnCode { - RC_EAI_NO_ERROR = 0; - RC_EAI_ADDRFAMILY = 1; - RC_EAI_AGAIN = 2; - RC_EAI_BADFLAGS = 3; - RC_EAI_FAIL = 4; - RC_EAI_FAMILY = 5; - RC_EAI_MEMORY = 6; - RC_EAI_NODATA = 7; - RC_EAI_NONAME = 8; - RC_EAI_SERVICE = 9; - RC_EAI_SOCKTYPE = 10; - RC_EAI_SYSTEM = 11; - RC_EAI_BADHINTS = 12; - RC_EAI_PROTOCOL = 13; - RC_EAI_OVERFLOW = 14; - RC_RESOLV_TIMEOUT = 255; - RC_EAI_MAX = 256; -} - - -enum NsRcode { - ns_r_noerror = 0; // No error occurred. - ns_r_formerr = 1; // Format error. - ns_r_servfail = 2; // Server failure. - ns_r_nxdomain = 3; // Name error. - ns_r_notimpl = 4; // Unimplemented. - ns_r_refused = 5; // Operation refused. - // these are for BIND_UPDATE - ns_r_yxdomain = 6; // Name exists - ns_r_yxrrset = 7; // RRset exists - ns_r_nxrrset = 8; // RRset does not exist - ns_r_notauth = 9; // Not authoritative for zone - ns_r_notzone = 10; // Zone of record different from zone section - ns_r_max = 11; - // The following are EDNS extended rcodes - ns_r_badvers = 16; - // The following are TSIG errors - //ns_r_badsig = 16, - ns_r_badkey = 17; - ns_r_badtime = 18; -} - -// Currently defined type values for resources and queries. -enum NsType { - ns_t_invalid = 0; // Cookie. - ns_t_a = 1; // Host address. - ns_t_ns = 2; // Authoritative server. - ns_t_md = 3; // Mail destination. - ns_t_mf = 4; // Mail forwarder. - ns_t_cname = 5; // Canonical name. - ns_t_soa = 6; // Start of authority zone. - ns_t_mb = 7; // Mailbox domain name. - ns_t_mg = 8; // Mail group member. - ns_t_mr = 9; // Mail rename name. - ns_t_null = 10; // Null resource record. - ns_t_wks = 11; // Well known service. - ns_t_ptr = 12; // Domain name pointer. - ns_t_hinfo = 13; // Host information. - ns_t_minfo = 14; // Mailbox information. - ns_t_mx = 15; // Mail routing information. - ns_t_txt = 16; // Text strings. - ns_t_rp = 17; // Responsible person. - ns_t_afsdb = 18; // AFS cell database. - ns_t_x25 = 19; // X_25 calling address. - ns_t_isdn = 20; // ISDN calling address. - ns_t_rt = 21; // Router. - ns_t_nsap = 22; // NSAP address. - ns_t_nsap_ptr = 23; // Reverse NSAP lookup (deprecated). - ns_t_sig = 24; // Security signature. - ns_t_key = 25; // Security key. - ns_t_px = 26; // X.400 mail mapping. - ns_t_gpos = 27; // Geographical position (withdrawn). - ns_t_aaaa = 28; // IPv6 Address. - ns_t_loc = 29; // Location Information. - ns_t_nxt = 30; // Next domain (security). - ns_t_eid = 31; // Endpoint identifier. - ns_t_nimloc = 32; // Nimrod Locator. - ns_t_srv = 33; // Server Selection. - ns_t_atma = 34; // ATM Address - ns_t_naptr = 35; // Naming Authority PoinTeR - ns_t_kx = 36; // Key Exchange - ns_t_cert = 37; // Certification record - ns_t_a6 = 38; // IPv6 address (experimental) - ns_t_dname = 39; // Non-terminal DNAME - ns_t_sink = 40; // Kitchen sink (experimentatl) - ns_t_opt = 41; // EDNS0 option (meta-RR) - ns_t_apl = 42; // Address prefix list (RFC 3123) - ns_t_ds = 43; // Delegation Signer - ns_t_sshfp = 44; // SSH Fingerprint - ns_t_ipseckey = 45; // IPSEC Key - ns_t_rrsig = 46; // RRset Signature - ns_t_nsec = 47; // Negative security - ns_t_dnskey = 48; // DNS Key - ns_t_dhcid = 49; // Dynamic host configuratin identifier - ns_t_nsec3 = 50; // Negative security type 3 - ns_t_nsec3param = 51;// Negative security type 3 parameters - ns_t_hip = 55; // Host Identity Protocol - ns_t_spf = 99; // Sender Policy Framework - ns_t_tkey = 249; // Transaction key - ns_t_tsig = 250; // Transaction signature. - ns_t_ixfr = 251; // Incremental zone transfer. - ns_t_axfr = 252; // Transfer zone of authority. - ns_t_mailb = 253; // Transfer mailbox records. - ns_t_maila = 254; // Transfer mail agent records. - ns_t_any = 255; // Wildcard match. - ns_t_zxfr = 256; // BIND-specific, nonstandard. - ns_t_dlv = 32769; // DNSSEC look-aside validatation. - ns_t_max = 65536; -} - -enum IpVersion { - IPV4 = 0; - IPV6 = 1; - MIXED = 2; -} - -enum TransportType { - UDP = 0; - TCP = 1; - DOT = 2; - DOT_UDP = 3; - DOT_TCP = 4; -} - -message DnsQueryEvent { - optional NsRcode rrcode = 1; - optional NsType rrtype = 2; - optional bool cache_hit = 3; - optional IpVersion ipversion = 4; - optional TransportType transport = 5; - optional int32 packet_retransmits = 6; // Used only by the UDP transport - optional int32 reconnects = 7; // Used only by TCP and DOT - optional int32 latency_micros = 8; - optional int32 active_experiments = 9; - optional android.net.NetworkCapabilitiesProto.Transport network_type = 10; -} - -message DnsQueryEventRe { - repeated DnsQueryEvent dns_query_event = 1; -} - - -message DnsCallEvent { - -} - diff --git a/core/proto/android/stats/dnsresolver/Android.bp b/core/proto/android/stats/dnsresolver/Android.bp new file mode 100644 index 000000000000..0b5aa8677a6e --- /dev/null +++ b/core/proto/android/stats/dnsresolver/Android.bp @@ -0,0 +1,25 @@ +// 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. + +java_library_static { + name: "dnsresolverprotosnano", + proto: { + type: "nano", + }, + srcs: [ + "dns_resolver.proto", + ], + sdk_version: "system_current", + no_framework_libs: true, +} diff --git a/core/proto/android/stats/dnsresolver/dns_resolver.proto b/core/proto/android/stats/dnsresolver/dns_resolver.proto new file mode 100644 index 000000000000..af6fea017bef --- /dev/null +++ b/core/proto/android/stats/dnsresolver/dns_resolver.proto @@ -0,0 +1,214 @@ +/*
+ * 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.
+ */
+syntax = "proto2";
+package android.stats.dnsresolver;
+
+enum EventType {
+ EVENT_UNKNOWN = 0;
+ EVENT_GETADDRINFO = 1;
+ EVENT_GETHOSTBYNAME = 2;
+ EVENT_GETHOSTBYADDR = 3;
+ EVENT_RES_NSEND = 4;
+}
+
+// The return value of the DNS resolver for each DNS lookups.
+// bionic/libc/include/netdb.h
+// system/netd/resolv/include/netd_resolv/resolv.h
+enum ReturnCode {
+ RC_EAI_NO_ERROR = 0;
+ RC_EAI_ADDRFAMILY = 1;
+ RC_EAI_AGAIN = 2;
+ RC_EAI_BADFLAGS = 3;
+ RC_EAI_FAIL = 4;
+ RC_EAI_FAMILY = 5;
+ RC_EAI_MEMORY = 6;
+ RC_EAI_NODATA = 7;
+ RC_EAI_NONAME = 8;
+ RC_EAI_SERVICE = 9;
+ RC_EAI_SOCKTYPE = 10;
+ RC_EAI_SYSTEM = 11;
+ RC_EAI_BADHINTS = 12;
+ RC_EAI_PROTOCOL = 13;
+ RC_EAI_OVERFLOW = 14;
+ RC_RESOLV_TIMEOUT = 255;
+ RC_EAI_MAX = 256;
+}
+
+enum NsRcode {
+ NS_R_NO_ERROR = 0; // No error occurred.
+ NS_R_FORMERR = 1; // Format error.
+ NS_R_SERVFAIL = 2; // Server failure.
+ NS_R_NXDOMAIN = 3; // Name error.
+ NS_R_NOTIMPL = 4; // Unimplemented.
+ NS_R_REFUSED = 5; // Operation refused.
+ // these are for BIND_UPDATE
+ NS_R_YXDOMAIN = 6; // Name exists
+ NS_R_YXRRSET = 7; // RRset exists
+ NS_R_NXRRSET = 8; // RRset does not exist
+ NS_R_NOTAUTH = 9; // Not authoritative for zone
+ NS_R_NOTZONE = 10; // Zone of record different from zone section
+ NS_R_MAX = 11;
+ // The following are EDNS extended rcodes
+ NS_R_BADVERS = 16;
+ // The following are TSIG errors
+ // NS_R_BADSIG = 16,
+ NS_R_BADKEY = 17;
+ NS_R_BADTIME = 18;
+}
+
+// Currently defined type values for resources and queries.
+enum NsType {
+ NS_T_INVALID = 0; // Cookie.
+ NS_T_A = 1; // Host address.
+ NS_T_NS = 2; // Authoritative server.
+ NS_T_MD = 3; // Mail destination.
+ NS_T_MF = 4; // Mail forwarder.
+ NS_T_CNAME = 5; // Canonical name.
+ NS_T_SOA = 6; // Start of authority zone.
+ NS_T_MB = 7; // Mailbox domain name.
+ NS_T_MG = 8; // Mail group member.
+ NS_T_MR = 9; // Mail rename name.
+ NS_T_NULL = 10; // Null resource record.
+ NS_T_WKS = 11; // Well known service.
+ NS_T_PTR = 12; // Domain name pointer.
+ NS_T_HINFO = 13; // Host information.
+ NS_T_MINFO = 14; // Mailbox information.
+ NS_T_MX = 15; // Mail routing information.
+ NS_T_TXT = 16; // Text strings.
+ NS_T_RP = 17; // Responsible person.
+ NS_T_AFSDB = 18; // AFS cell database.
+ NS_T_X25 = 19; // X_25 calling address.
+ NS_T_ISDN = 20; // ISDN calling address.
+ NS_T_RT = 21; // Router.
+ NS_T_NSAP = 22; // NSAP address.
+ NS_T_NSAP_PTR = 23; // Reverse NSAP lookup (deprecated).
+ NS_T_SIG = 24; // Security signature.
+ NS_T_KEY = 25; // Security key.
+ NS_T_PX = 26; // X.400 mail mapping.
+ NS_T_GPOS = 27; // Geographical position (withdrawn).
+ NS_T_AAAA = 28; // IPv6 Address.
+ NS_T_LOC = 29; // Location Information.
+ NS_T_NXT = 30; // Next domain (security).
+ NS_T_EID = 31; // Endpoint identifier.
+ NS_T_NIMLOC = 32; // Nimrod Locator.
+ NS_T_SRV = 33; // Server Selection.
+ NS_T_ATMA = 34; // ATM Address
+ NS_T_NAPTR = 35; // Naming Authority PoinTeR
+ NS_T_KX = 36; // Key Exchange
+ NS_T_CERT = 37; // Certification record
+ NS_T_A6 = 38; // IPv6 address (experimental)
+ NS_T_DNAME = 39; // Non-terminal DNAME
+ NS_T_SINK = 40; // Kitchen sink (experimentatl)
+ NS_T_OPT = 41; // EDNS0 option (meta-RR)
+ NS_T_APL = 42; // Address prefix list (RFC 3123)
+ NS_T_DS = 43; // Delegation Signer
+ NS_T_SSHFP = 44; // SSH Fingerprint
+ NS_T_IPSECKEY = 45; // IPSEC Key
+ NS_T_RRSIG = 46; // RRset Signature
+ NS_T_NSEC = 47; // Negative security
+ NS_T_DNSKEY = 48; // DNS Key
+ NS_T_DHCID = 49; // Dynamic host configuratin identifier
+ NS_T_NSEC3 = 50; // Negative security type 3
+ NS_T_NSEC3PARAM = 51; // Negative security type 3 parameters
+ NS_T_HIP = 55; // Host Identity Protocol
+ NS_T_SPF = 99; // Sender Policy Framework
+ NS_T_TKEY = 249; // Transaction key
+ NS_T_TSIG = 250; // Transaction signature.
+ NS_T_IXFR = 251; // Incremental zone transfer.
+ NS_T_AXFR = 252; // Transfer zone of authority.
+ NS_T_MAILB = 253; // Transfer mailbox records.
+ NS_T_MAILA = 254; // Transfer mail agent records.
+ NS_T_ANY = 255; // Wildcard match.
+ NS_T_ZXFR = 256; // BIND-specific, nonstandard.
+ NS_T_DLV = 32769; // DNSSEC look-aside validatation.
+ NS_T_MAX = 65536;
+}
+
+enum IpVersion {
+ IV_UNKNOWN = 0;
+ IV_IPV4 = 1;
+ IV_IPV6 = 2;
+}
+
+enum TransportType {
+ TT_UNKNOWN = 0;
+ TT_UDP = 1;
+ TT_TCP = 2;
+ TT_DOT = 3;
+}
+
+enum PrivateDnsModes {
+ PDM_UNKNOWN = 0;
+ PDM_OFF = 1;
+ PDM_OPPORTUNISTIC = 2;
+ PDM_STRICT = 3;
+}
+
+enum Transport {
+ // Indicates this network uses a Cellular transport.
+ TRANSPORT_DEFAULT = 0; // TRANSPORT_CELLULAR
+ // Indicates this network uses a Wi-Fi transport.
+ TRANSPORT_WIFI = 1;
+ // Indicates this network uses a Bluetooth transport.
+ TRANSPORT_BLUETOOTH = 2;
+ // Indicates this network uses an Ethernet transport.
+ TRANSPORT_ETHERNET = 3;
+ // Indicates this network uses a VPN transport.
+ TRANSPORT_VPN = 4;
+ // Indicates this network uses a Wi-Fi Aware transport.
+ TRANSPORT_WIFI_AWARE = 5;
+ // Indicates this network uses a LoWPAN transport.
+ TRANSPORT_LOWPAN = 6;
+}
+
+enum CacheStatus{
+ // the cache can't handle that kind of queries.
+ // or the answer buffer is too small.
+ CS_UNSUPPORTED = 0;
+ // the cache doesn't know about this query.
+ CS_NOTFOUND = 1;
+ // the cache found the answer.
+ CS_FOUND = 2;
+ // Don't do anything on cache.
+ CS_SKIP = 3;
+}
+
+message DnsQueryEvent {
+ optional android.stats.dnsresolver.NsRcode rcode = 1;
+
+ optional android.stats.dnsresolver.NsType type = 2;
+
+ optional android.stats.dnsresolver.CacheStatus cache_hit = 3;
+
+ optional android.stats.dnsresolver.IpVersion ip_version = 4;
+
+ optional android.stats.dnsresolver.TransportType transport = 5;
+
+ // Number of DNS query retry times
+ optional int32 retry_times = 6;
+
+ // Ordinal number of name server.
+ optional int32 dns_server_count = 7;
+
+ // Used only by TCP and DOT. True for new connections.
+ optional bool connected = 8;
+
+ optional int32 latency_micros = 9;
+}
+
+message DnsQueryEvents {
+ repeated DnsQueryEvent dns_query_event = 1;
+}
diff --git a/core/res/res/anim/resolver_close_anim.xml b/core/res/res/anim/resolver_close_anim.xml new file mode 100644 index 000000000000..18a25e985943 --- /dev/null +++ b/core/res/res/anim/resolver_close_anim.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2009, 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. +*/ +--> + +<set xmlns:android="http://schemas.android.com/apk/res/android" + android:interpolator="@anim/accelerate_interpolator" + android:zAdjustment="top"> + + <translate xmlns:android="http://schemas.android.com/apk/res/android" + android:fromYDelta="0" + android:toYDelta="100%" + android:duration="@android:integer/config_shortAnimTime" /> +</set> diff --git a/core/res/res/anim/resolver_launch_anim.xml b/core/res/res/anim/resolver_launch_anim.xml new file mode 100644 index 000000000000..ebb3701316fa --- /dev/null +++ b/core/res/res/anim/resolver_launch_anim.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ 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 + --> + +<!-- Animation for when a dock window at the bottom of the screen is entering. --> +<set xmlns:android="http://schemas.android.com/apk/res/android" + android:interpolator="@anim/accelerate_decelerate_interpolator" + android:zAdjustment="top"> + + <translate android:fromYDelta="100%" + android:toYDelta="0" + android:startOffset="@android:integer/config_shortAnimTime" + android:duration="@android:integer/config_mediumAnimTime"/> +</set>
\ No newline at end of file diff --git a/core/res/res/drawable/ic_corp_badge.xml b/core/res/res/drawable/ic_corp_badge.xml index 5ab504528366..6a7ac4a20ff3 100644 --- a/core/res/res/drawable/ic_corp_badge.xml +++ b/core/res/res/drawable/ic_corp_badge.xml @@ -17,9 +17,13 @@ Copyright (C) 2018 The Android Open Source Project <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="48dp" android:height="48dp" + android:tint="@*android:color/accent_device_default_light" android:viewportWidth="24" android:viewportHeight="24"> <path - android:fillColor="@*android:color/accent_device_default_light" - android:pathData="M20,6h-4V4c0,-1.11 -0.89,-2 -2,-2h-4C8.89,2 8,2.89 8,4v2H4C2.89,6 2.01,6.89 2.01,8L2,19c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2V8C22,6.89 21.11,6 20,6zM10,4h4v2h-4V4zM20,19H4V8h16V19z"/> + android:fillColor="@android:color/white" + android:pathData="M20,6h-4V4c0-1.1-0.9-2-2-2h-4C8.9,2,8,2.9,8,4v2H4C2.9,6,2,6.9,2,8l0,11c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8 C22,6.9,21.1,6,20,6z M10,4h4v2h-4V4z M20,19H4V8h16V19z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 12 12 C 12.8284271247 12 13.5 12.6715728753 13.5 13.5 C 13.5 14.3284271247 12.8284271247 15 12 15 C 11.1715728753 15 10.5 14.3284271247 10.5 13.5 C 10.5 12.6715728753 11.1715728753 12 12 12 Z" /> </vector>
\ No newline at end of file diff --git a/core/res/res/drawable/ic_corp_icon_badge_color.xml b/core/res/res/drawable/ic_corp_icon_badge_color.xml index 6dba2779bc53..bb2d11753303 100644 --- a/core/res/res/drawable/ic_corp_icon_badge_color.xml +++ b/core/res/res/drawable/ic_corp_icon_badge_color.xml @@ -19,12 +19,15 @@ Copyright (C) 2016 The Android Open Source Project android:height="64dp" android:viewportWidth="64" android:viewportHeight="64"> - - <path - android:fillColor="#fcfcfc" - android:strokeColor="#e8eaed" - android:strokeWidth="0.25" - android:pathData="M62,50A12,12,0,1,1,50,38,12,12,0,0,1,62,50" /> - <path - android:pathData="M 0 0 H 64 V 64 H 0 V 0 Z" /> + <group + android:scaleX=".24" + android:scaleY=".24" + android:translateX="38" + android:translateY="38"> + <path + android:fillColor="#fcfcfc" + android:strokeColor="#e8eaed" + android:strokeWidth="0.25" + android:pathData="@string/config_icon_mask" /> + </group> </vector>
\ No newline at end of file diff --git a/core/res/res/drawable/ic_corp_icon_badge_shadow.xml b/core/res/res/drawable/ic_corp_icon_badge_shadow.xml index f33ed1f010be..cb29f6c39be4 100644 --- a/core/res/res/drawable/ic_corp_icon_badge_shadow.xml +++ b/core/res/res/drawable/ic_corp_icon_badge_shadow.xml @@ -19,31 +19,52 @@ Copyright (C) 2016 The Android Open Source Project android:height="64dp" android:viewportWidth="64" android:viewportHeight="64"> - - <path - android:fillColor="#000000" - android:fillAlpha="0.06" - android:strokeAlpha="0.06" - android:strokeWidth="1" - android:pathData="M62,51.25a12,12,0,1,1-12-12,12,12,0,0,1,12,12" /> - <path - android:pathData="M 0 0 H 64 V 64 H 0 V 0 Z" /> - <path - android:fillColor="#000000" - android:fillAlpha="0.06" - android:strokeAlpha="0.06" - android:strokeWidth="1" - android:pathData="M62,52.28A12,12,0,1,1,50.53,39.76,12,12,0,0,1,62,52.28" /> - <path - android:fillColor="#000000" - android:fillAlpha="0.06" - android:strokeAlpha="0.06" - android:strokeWidth="1" - android:pathData="M62,50.75a12,12,0,1,1-12-12,12,12,0,0,1,12,12" /> - <path - android:fillColor="#000000" - android:fillAlpha="0.06" - android:strokeAlpha="0.06" - android:strokeWidth="1" - android:pathData="M62,50.25a12,12,0,1,1-12-12,12,12,0,0,1,12,12" /> + <group + android:scaleX=".24" + android:scaleY=".24" + android:translateX="38" + android:translateY="39.25"> + <path + android:fillColor="#000000" + android:fillAlpha="0.06" + android:strokeAlpha="0.06" + android:strokeWidth="1" + android:pathData="@string/config_icon_mask" /> + </group> + <group + android:scaleX=".24" + android:scaleY=".24" + android:translateX="38" + android:translateY="39.75"> + <path + android:fillColor="#000000" + android:fillAlpha="0.06" + android:strokeAlpha="0.06" + android:strokeWidth="1" + android:pathData="@string/config_icon_mask" /> + </group> + <group + android:scaleX=".24" + android:scaleY=".24" + android:translateX="38" + android:translateY="38.75"> + <path + android:fillColor="#000000" + android:fillAlpha="0.06" + android:strokeAlpha="0.06" + android:strokeWidth="1" + android:pathData="@string/config_icon_mask" /> + </group> + <group + android:scaleX=".24" + android:scaleY=".24" + android:translateX="38" + android:translateY="38.25"> + <path + android:fillColor="#000000" + android:fillAlpha="0.06" + android:strokeAlpha="0.06" + android:strokeWidth="1" + android:pathData="@string/config_icon_mask" /> + </group> </vector>
\ No newline at end of file diff --git a/core/res/res/drawable/ic_signal_cellular.xml b/core/res/res/drawable/ic_signal_cellular.xml new file mode 100644 index 000000000000..fdde0d107cff --- /dev/null +++ b/core/res/res/drawable/ic_signal_cellular.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ 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 + --> +<level-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:minLevel="0" android:maxLevel="0" android:drawable="@drawable/ic_signal_cellular_0_4_bar" /> + <item android:minLevel="1" android:maxLevel="1" android:drawable="@drawable/ic_signal_cellular_1_4_bar" /> + <item android:minLevel="2" android:maxLevel="2" android:drawable="@drawable/ic_signal_cellular_2_4_bar" /> + <item android:minLevel="3" android:maxLevel="3" android:drawable="@drawable/ic_signal_cellular_3_4_bar" /> + <item android:minLevel="4" android:maxLevel="4" android:drawable="@drawable/ic_signal_cellular_4_4_bar" /> + <item android:minLevel="10" android:maxLevel="10" android:drawable="@drawable/ic_signal_cellular_0_5_bar" /> + <item android:minLevel="11" android:maxLevel="11" android:drawable="@drawable/ic_signal_cellular_1_5_bar" /> + <item android:minLevel="12" android:maxLevel="12" android:drawable="@drawable/ic_signal_cellular_2_5_bar" /> + <item android:minLevel="13" android:maxLevel="13" android:drawable="@drawable/ic_signal_cellular_3_5_bar" /> + <item android:minLevel="14" android:maxLevel="14" android:drawable="@drawable/ic_signal_cellular_4_5_bar" /> + <item android:minLevel="15" android:maxLevel="15" android:drawable="@drawable/ic_signal_cellular_5_5_bar" /> +</level-list> diff --git a/core/res/res/drawable/ic_signal_cellular_0_4_bar.xml b/core/res/res/drawable/ic_signal_cellular_0_4_bar.xml new file mode 100644 index 000000000000..9f6fa2f48677 --- /dev/null +++ b/core/res/res/drawable/ic_signal_cellular_0_4_bar.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="M20,7v13H7L20,7 M22,2L2,22h20V2L22,2z" /> +</vector>
\ No newline at end of file diff --git a/core/res/res/drawable/ic_signal_cellular_0_5_bar.xml b/core/res/res/drawable/ic_signal_cellular_0_5_bar.xml new file mode 100644 index 000000000000..9f6fa2f48677 --- /dev/null +++ b/core/res/res/drawable/ic_signal_cellular_0_5_bar.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="M20,7v13H7L20,7 M22,2L2,22h20V2L22,2z" /> +</vector>
\ No newline at end of file diff --git a/core/res/res/drawable/ic_signal_cellular_1_4_bar.xml b/core/res/res/drawable/ic_signal_cellular_1_4_bar.xml new file mode 100644 index 000000000000..c0fe536cf85b --- /dev/null +++ b/core/res/res/drawable/ic_signal_cellular_1_4_bar.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="M20,7v13H7L20,7 M22,2L2,22h20V2L22,2z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 11 13 L 2 22 L 11 22 Z" /> +</vector>
\ No newline at end of file diff --git a/core/res/res/drawable/ic_signal_cellular_1_5_bar.xml b/core/res/res/drawable/ic_signal_cellular_1_5_bar.xml new file mode 100644 index 000000000000..816da22cf7dc --- /dev/null +++ b/core/res/res/drawable/ic_signal_cellular_1_5_bar.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="M20,7V20H7L20,7m2-5L2,22H22V2Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M8.72,15.28,2,22H8.72V15.28Z" /> +</vector>
\ No newline at end of file diff --git a/core/res/res/drawable/ic_signal_cellular_2_4_bar.xml b/core/res/res/drawable/ic_signal_cellular_2_4_bar.xml new file mode 100644 index 000000000000..69a966ba4fc9 --- /dev/null +++ b/core/res/res/drawable/ic_signal_cellular_2_4_bar.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="M20,7v13H7L20,7 M22,2L2,22h20V2L22,2z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 13 11 L 2 22 L 13 22 Z" /> +</vector>
\ No newline at end of file diff --git a/core/res/res/drawable/ic_signal_cellular_2_5_bar.xml b/core/res/res/drawable/ic_signal_cellular_2_5_bar.xml new file mode 100644 index 000000000000..02c7a430cece --- /dev/null +++ b/core/res/res/drawable/ic_signal_cellular_2_5_bar.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + <path + android:fillColor="@android:color/white" + android:pathData="M20,7V20H7L20,7m2-5L2,22H22V2Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 11.45 12.55 L 2 22 L 11.45 22 L 11.45 12.55 Z" /> +</vector>
\ No newline at end of file diff --git a/core/res/res/drawable/ic_signal_cellular_3_4_bar.xml b/core/res/res/drawable/ic_signal_cellular_3_4_bar.xml new file mode 100644 index 000000000000..46ce47cdfcda --- /dev/null +++ b/core/res/res/drawable/ic_signal_cellular_3_4_bar.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="M20,7v13H7L20,7 M22,2L2,22h20V2L22,2z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 2 22 L 16 22 L 16 21 L 16 20 L 16 11 L 16 10 L 16 8 Z" /> +</vector>
\ No newline at end of file diff --git a/core/res/res/drawable/ic_signal_cellular_3_5_bar.xml b/core/res/res/drawable/ic_signal_cellular_3_5_bar.xml new file mode 100644 index 000000000000..37435e6b75e2 --- /dev/null +++ b/core/res/res/drawable/ic_signal_cellular_3_5_bar.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="M20,7V20H7L20,7m2-5L2,22H22V2Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 14.96 9.04 L 2 22 L 14.96 22 L 14.96 9.04 Z" /> +</vector>
\ No newline at end of file diff --git a/core/res/res/drawable/ic_signal_cellular_4_4_bar.xml b/core/res/res/drawable/ic_signal_cellular_4_4_bar.xml new file mode 100644 index 000000000000..f93e40d9a9e8 --- /dev/null +++ b/core/res/res/drawable/ic_signal_cellular_4_4_bar.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="M22,2L2,22h20V2L22,2z" /> +</vector>
\ No newline at end of file diff --git a/core/res/res/drawable/ic_signal_cellular_4_5_bar.xml b/core/res/res/drawable/ic_signal_cellular_4_5_bar.xml new file mode 100644 index 000000000000..6dc3646d89e3 --- /dev/null +++ b/core/res/res/drawable/ic_signal_cellular_4_5_bar.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="M20,7V20H7L20,7m2-5L2,22H22V2Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 18.48 5.52 L 2 22 L 18.48 22 L 18.48 5.52 Z" /> +</vector>
\ No newline at end of file diff --git a/core/res/res/drawable/ic_signal_cellular_5_5_bar.xml b/core/res/res/drawable/ic_signal_cellular_5_5_bar.xml new file mode 100644 index 000000000000..f93e40d9a9e8 --- /dev/null +++ b/core/res/res/drawable/ic_signal_cellular_5_5_bar.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="M22,2L2,22h20V2L22,2z" /> +</vector>
\ No newline at end of file diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index ab6f29b19445..4c6ae812f1ee 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -3699,7 +3699,7 @@ <item name="config_inCallNotificationVolume" format="float" type="dimen">.10</item> <!-- URI for in call notification sound --> - <string translatable="false" name="config_inCallNotificationSound">/system/media/audio/ui/InCallNotification.ogg</string> + <string translatable="false" name="config_inCallNotificationSound">/product/media/audio/ui/InCallNotification.ogg</string> <!-- Default number of notifications from the same app before they are automatically grouped by the OS --> <integer translatable="false" name="config_autoGroupAtCount">4</integer> diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index dd0a6e605f60..b07e7ef0bd05 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -1549,11 +1549,11 @@ <!-- Message shown during acqusition when the user's face is tilted too high or too low [CHAR LIMIT=50] --> <string name="face_acquired_tilt_too_extreme">Turn your head a little less.</string> <!-- Message shown during acquisiton when the user's face is tilted too far left or right [CHAR LIMIT=50] --> - <string name="face_acquired_roll_too_extreme">Please straighten your head vertically.</string> + <string name="face_acquired_roll_too_extreme">Turn your head a little less.</string> <!-- Message shown during acquisition when the user's face is obscured [CHAR LIMIT=50] --> - <string name="face_acquired_obscured">Clear the space between your head and the phone.</string> + <string name="face_acquired_obscured">Remove anything hiding your face.</string> <!-- Message shown during acquisition when the sensor is dirty [CHAR LIMIT=50] --> - <string name="face_acquired_sensor_dirty">Please clean the camera.</string> + <string name="face_acquired_sensor_dirty">Clean the sensor at the top edge of the screen.</string> <!-- Array containing custom messages shown during face acquisition from vendor. Vendor is expected to add and translate these strings --> <string-array name="face_acquired_vendor"> </string-array> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index e7e4d08778b9..29181c871d1b 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -1410,6 +1410,7 @@ <java-symbol type="drawable" name="ic_signal_wifi_transient_animation" /> <java-symbol type="drawable" name="ic_hotspot_transient_animation" /> <java-symbol type="drawable" name="ic_bluetooth_transient_animation" /> + <java-symbol type="drawable" name="ic_signal_cellular" /> <java-symbol type="drawable" name="stat_notify_rssi_in_range" /> <java-symbol type="drawable" name="stat_sys_gps_on" /> <java-symbol type="drawable" name="stat_sys_tether_wifi" /> @@ -3786,6 +3787,8 @@ <java-symbol type="dimen" name="chooser_direct_share_label_placeholder_max_width" /> <java-symbol type="layout" name="chooser_az_label_row" /> <java-symbol type="string" name="chooser_all_apps_button_label" /> - + <java-symbol type="anim" name="resolver_launch_anim" /> + <java-symbol type="style" name="Animation.DeviceDefault.Activity.Resolver" /> + <java-symbol type="string" name="config_defaultSupervisionProfileOwnerComponent" /> </resources> diff --git a/core/res/res/values/themes_device_defaults.xml b/core/res/res/values/themes_device_defaults.xml index 08d6d0621cf4..8015a5d5fbdd 100644 --- a/core/res/res/values/themes_device_defaults.xml +++ b/core/res/res/values/themes_device_defaults.xml @@ -1667,8 +1667,7 @@ easier. <!-- Theme used for the intent picker activity. --> <style name="Theme.DeviceDefault.ResolverCommon" parent="Theme.DeviceDefault.DayNight"> - <item name="windowEnterTransition">@empty</item> - <item name="windowExitTransition">@empty</item> + <item name="windowAnimationStyle">@style/Animation.DeviceDefault.Activity.Resolver</item> <item name="windowIsTranslucent">true</item> <item name="windowNoTitle">true</item> <item name="windowBackground">@color/transparent</item> @@ -1682,6 +1681,14 @@ easier. <item name="navigationBarDividerColor">@color/chooser_row_divider</item> </style> + <style name="Animation.DeviceDefault.Activity.Resolver" parent="Animation.DeviceDefault.Activity"> + <item name="activityOpenEnterAnimation">@anim/resolver_launch_anim</item> + <item name="taskOpenEnterAnimation">@anim/resolver_launch_anim</item> + <!-- Handle close for profile switching --> + <item name="activityOpenExitAnimation">@anim/resolver_close_anim</item> + <item name="taskOpenExitAnimation">@anim/resolver_close_anim</item> + </style> + <style name="Theme.DeviceDefault.Resolver" parent="Theme.DeviceDefault.ResolverCommon"> <item name="windowLightNavigationBar">true</item> </style> diff --git a/core/tests/coretests/res/values/overlayable_icons_test.xml b/core/tests/coretests/res/values/overlayable_icons_test.xml index 9bc46de3505a..68de2c0caf18 100644 --- a/core/tests/coretests/res/values/overlayable_icons_test.xml +++ b/core/tests/coretests/res/values/overlayable_icons_test.xml @@ -27,9 +27,9 @@ <item>@*android:drawable/ic_bt_laptop</item> <item>@*android:drawable/ic_bt_network_pan</item> <item>@*android:drawable/ic_bt_pointing_hid</item> + <item>@*android:drawable/ic_corp_badge</item> <item>@*android:drawable/ic_expand_more</item> <item>@*android:drawable/ic_file_copy</item> - <item>@*android:drawable/ic_info_outline_24</item> <item>@*android:drawable/ic_lock</item> <item>@*android:drawable/ic_lock_bugreport</item> <item>@*android:drawable/ic_lock_open</item> @@ -39,6 +39,7 @@ <item>@*android:drawable/ic_phone</item> <item>@*android:drawable/ic_qs_airplane</item> <item>@*android:drawable/ic_qs_auto_rotate</item> + <item>@*android:drawable/ic_qs_battery_saver</item> <item>@*android:drawable/ic_qs_bluetooth</item> <item>@*android:drawable/ic_qs_dnd</item> <item>@*android:drawable/ic_qs_flashlight</item> @@ -46,6 +47,17 @@ <item>@*android:drawable/ic_restart</item> <item>@*android:drawable/ic_screenshot</item> <item>@*android:drawable/ic_settings_bluetooth</item> + <item>@*android:drawable/ic_signal_cellular_0_4_bar</item> + <item>@*android:drawable/ic_signal_cellular_0_5_bar</item> + <item>@*android:drawable/ic_signal_cellular_1_4_bar</item> + <item>@*android:drawable/ic_signal_cellular_1_5_bar</item> + <item>@*android:drawable/ic_signal_cellular_2_4_bar</item> + <item>@*android:drawable/ic_signal_cellular_2_5_bar</item> + <item>@*android:drawable/ic_signal_cellular_3_4_bar</item> + <item>@*android:drawable/ic_signal_cellular_3_5_bar</item> + <item>@*android:drawable/ic_signal_cellular_4_4_bar</item> + <item>@*android:drawable/ic_signal_cellular_4_5_bar</item> + <item>@*android:drawable/ic_signal_cellular_5_5_bar</item> <item>@*android:drawable/ic_signal_location</item> <item>@*android:drawable/ic_wifi_signal_0</item> <item>@*android:drawable/ic_wifi_signal_1</item> @@ -53,6 +65,7 @@ <item>@*android:drawable/ic_wifi_signal_3</item> <item>@*android:drawable/ic_wifi_signal_4</item> <item>@*android:drawable/perm_group_activity_recognition</item> + <item>@*android:drawable/perm_group_calendar</item> <item>@*android:drawable/perm_group_call_log</item> <item>@*android:drawable/perm_group_camera</item> <item>@*android:drawable/perm_group_contacts</item> diff --git a/core/tests/coretests/src/android/provider/SettingsBackupTest.java b/core/tests/coretests/src/android/provider/SettingsBackupTest.java index a71460270252..e76754582fe9 100644 --- a/core/tests/coretests/src/android/provider/SettingsBackupTest.java +++ b/core/tests/coretests/src/android/provider/SettingsBackupTest.java @@ -622,7 +622,6 @@ public class SettingsBackupTest { Settings.Secure.COMPLETED_CATEGORY_PREFIX, Settings.Secure.CONNECTIVITY_RELEASE_PENDING_INTENT_DELAY_MS, Settings.Secure.CONTENT_CAPTURE_ENABLED, - Settings.Secure.DEBUG_PACKAGE_PERMISSION_CHECK, Settings.Secure.DEFAULT_INPUT_METHOD, Settings.Secure.DEVICE_PAIRED, Settings.Secure.DIALER_DEFAULT_APPLICATION, diff --git a/core/tests/overlaytests/host/src/com/android/server/om/hosttest/InstallOverlayTests.java b/core/tests/overlaytests/host/src/com/android/server/om/hosttest/InstallOverlayTests.java index 267cb365748e..eec7be22c78b 100644 --- a/core/tests/overlaytests/host/src/com/android/server/om/hosttest/InstallOverlayTests.java +++ b/core/tests/overlaytests/host/src/com/android/server/om/hosttest/InstallOverlayTests.java @@ -177,6 +177,23 @@ public class InstallOverlayTests extends BaseHostJUnit4Test { .contains(APP_OVERLAY_PACKAGE_NAME)); } + @Test + public void testAdbShellOMSInterface() throws Exception { + installPackage("OverlayHostTests_AppOverlayV1.apk"); + assertTrue(shell("cmd overlay list " + DEVICE_TEST_PKG).contains(DEVICE_TEST_PKG)); + assertTrue(shell("cmd overlay list " + DEVICE_TEST_PKG).contains(APP_OVERLAY_PACKAGE_NAME)); + assertEquals("[ ] " + APP_OVERLAY_PACKAGE_NAME, + shell("cmd overlay list " + APP_OVERLAY_PACKAGE_NAME).trim()); + assertEquals("STATE_DISABLED", + shell("cmd overlay dump state " + APP_OVERLAY_PACKAGE_NAME).trim()); + + setOverlayEnabled(APP_OVERLAY_PACKAGE_NAME, true); + assertEquals("[x] " + APP_OVERLAY_PACKAGE_NAME, + shell("cmd overlay list " + APP_OVERLAY_PACKAGE_NAME).trim()); + assertEquals("STATE_ENABLED", + shell("cmd overlay dump state " + APP_OVERLAY_PACKAGE_NAME).trim()); + } + private void delay() { try { Thread.sleep(1000); @@ -195,20 +212,24 @@ public class InstallOverlayTests extends BaseHostJUnit4Test { } private void installConvertExistingInstantPackageToFull(String pkg) throws Exception { - getDevice().executeShellCommand("cmd package install-existing --wait --full " + pkg); + shell("cmd package install-existing --wait --full " + pkg); } private void setPackageEnabled(String pkg, boolean enabled) throws Exception { - getDevice().executeShellCommand("cmd package " + (enabled ? "enable " : "disable ") + pkg); + shell("cmd package " + (enabled ? "enable " : "disable ") + pkg); delay(); } private void setOverlayEnabled(String pkg, boolean enabled) throws Exception { - getDevice().executeShellCommand("cmd overlay " + (enabled ? "enable " : "disable ") + pkg); + shell("cmd overlay " + (enabled ? "enable " : "disable ") + pkg); delay(); } private boolean overlayManagerContainsPackage(String pkg) throws Exception { - return getDevice().executeShellCommand("cmd overlay list").contains(pkg); + return shell("cmd overlay list").contains(pkg); + } + + private String shell(final String cmd) throws Exception { + return getDevice().executeShellCommand(cmd); } } diff --git a/media/java/android/media/RingtoneManager.java b/media/java/android/media/RingtoneManager.java index 77f756baa1f2..68c0a22b30c7 100644 --- a/media/java/android/media/RingtoneManager.java +++ b/media/java/android/media/RingtoneManager.java @@ -33,7 +33,6 @@ import android.content.pm.PackageManager.NameNotFoundException; import android.content.pm.UserInfo; import android.content.res.AssetFileDescriptor; import android.database.Cursor; -import android.media.MediaScannerConnection.MediaScannerConnectionClient; import android.net.Uri; import android.os.Environment; import android.os.FileUtils; @@ -50,7 +49,6 @@ import android.util.Log; import com.android.internal.database.SortCursor; -import java.io.Closeable; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; @@ -59,7 +57,6 @@ import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; -import java.util.concurrent.LinkedBlockingQueue; /** * RingtoneManager provides access to ringtones, notification, and other types @@ -927,11 +924,7 @@ public class RingtoneManager { } // Tell MediaScanner about the new file. Wait for it to assign a {@link Uri}. - try (NewRingtoneScanner scanner = new NewRingtoneScanner(outFile)) { - return scanner.take(); - } catch (InterruptedException e) { - throw new IOException("Audio file failed to scan as a ringtone", e); - } + return MediaStore.scanFile(mContext, outFile); } private static final String getExternalDirectoryForType(final int type) { @@ -1109,53 +1102,6 @@ public class RingtoneManager { } /** - * Creates a {@link android.media.MediaScannerConnection} to scan a ringtone file and add its - * information to the internal database. - * - * It uses a {@link java.util.concurrent.LinkedBlockingQueue} so that the caller can block until - * the scan is completed. - */ - private class NewRingtoneScanner implements Closeable, MediaScannerConnectionClient { - private MediaScannerConnection mMediaScannerConnection; - private File mFile; - private LinkedBlockingQueue<Uri> mQueue = new LinkedBlockingQueue<>(1); - - public NewRingtoneScanner(File file) { - mFile = file; - mMediaScannerConnection = new MediaScannerConnection(mContext, this); - mMediaScannerConnection.connect(); - } - - @Override - public void close() { - mMediaScannerConnection.disconnect(); - } - - @Override - public void onMediaScannerConnected() { - mMediaScannerConnection.scanFile(mFile.getAbsolutePath(), null); - } - - @Override - public void onScanCompleted(String path, Uri uri) { - if (uri == null) { - // There was some issue with scanning. Delete the copied file so it is not oprhaned. - mFile.delete(); - return; - } - try { - mQueue.put(uri); - } catch (InterruptedException e) { - Log.e(TAG, "Unable to put new ringtone Uri in queue", e); - } - } - - public Uri take() throws InterruptedException { - return mQueue.take(); - } - } - - /** * Attempts to create a context for the given user. * * @return created context, or null if package does not exist diff --git a/media/java/android/media/session/MediaController.java b/media/java/android/media/session/MediaController.java index 3500475eeeda..55692437d8d5 100644 --- a/media/java/android/media/session/MediaController.java +++ b/media/java/android/media/session/MediaController.java @@ -891,11 +891,16 @@ public final class MediaController { } /** - * Set the playback speed. + * Sets the playback speed. A value of {@code 1.0f} is the default playback value, + * and a negative value indicates reverse playback. {@code 0.0f} is not allowed. * * @param speed The playback speed + * @throws IllegalArgumentException if the {@code speed} is equal to zero. */ public void setPlaybackSpeed(float speed) { + if (speed == 0.0f) { + throw new IllegalArgumentException("speed must not be zero"); + } try { mSessionBinder.setPlaybackSpeed(mContext.getPackageName(), mCbStub, speed); } catch (RemoteException e) { diff --git a/media/java/android/media/session/MediaSession.java b/media/java/android/media/session/MediaSession.java index c577469477e0..cee869ba4808 100644 --- a/media/java/android/media/session/MediaSession.java +++ b/media/java/android/media/session/MediaSession.java @@ -1084,6 +1084,9 @@ public final class MediaSession { * To update the new playback speed, create a new {@link PlaybackState} by using {@link * PlaybackState.Builder#setState(int, long, float)}, and set it with * {@link #setPlaybackState(PlaybackState)}. + * <p> + * A value of {@code 1.0f} is the default playback value, and a negative value indicates + * reverse playback. The {@code speed} will not be equal to zero. * * @param speed the playback speed * @see #setPlaybackState(PlaybackState) diff --git a/packages/SettingsLib/res/values/colors.xml b/packages/SettingsLib/res/values/colors.xml index 209b2cb7afd3..5e8779fa289a 100644 --- a/packages/SettingsLib/res/values/colors.xml +++ b/packages/SettingsLib/res/values/colors.xml @@ -35,4 +35,8 @@ <color name="bt_color_bg_5">#fdcfe8</color> <!-- Material Pink 100 --> <color name="bt_color_bg_6">#e9d2fd</color> <!-- Material Purple 100 --> <color name="bt_color_bg_7">#cbf0f8</color> <!-- Material Cyan 100 --> + + + <color name="dark_mode_icon_color_single_tone">#99000000</color> + <color name="light_mode_icon_color_single_tone">#ffffff</color> </resources> diff --git a/packages/SettingsLib/res/values/dimens.xml b/packages/SettingsLib/res/values/dimens.xml index 2cb9d4b14aa7..d10e034157db 100644 --- a/packages/SettingsLib/res/values/dimens.xml +++ b/packages/SettingsLib/res/values/dimens.xml @@ -88,8 +88,6 @@ <!-- SignalDrawable --> <dimen name="signal_icon_size">15dp</dimen> - <!-- How far to inset the rounded edges --> - <dimen name="stat_sys_mobile_signal_circle_inset">0.9dp</dimen> <!-- Size of nearby icon --> <dimen name="bt_nearby_icon_size">24dp</dimen> diff --git a/packages/SettingsLib/src/com/android/settingslib/graph/SignalDrawable.java b/packages/SettingsLib/src/com/android/settingslib/graph/SignalDrawable.java index 4bd1bbb9e3bf..cb0b7c2bac83 100644 --- a/packages/SettingsLib/src/com/android/settingslib/graph/SignalDrawable.java +++ b/packages/SettingsLib/src/com/android/settingslib/graph/SignalDrawable.java @@ -19,25 +19,28 @@ import android.annotation.IntRange; import android.annotation.NonNull; import android.annotation.Nullable; import android.content.Context; +import android.content.res.ColorStateList; import android.graphics.Canvas; import android.graphics.ColorFilter; -import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Path; import android.graphics.Path.Direction; import android.graphics.Path.FillType; -import android.graphics.Path.Op; -import android.graphics.PointF; +import android.graphics.PorterDuff; +import android.graphics.PorterDuffXfermode; import android.graphics.Rect; -import android.graphics.RectF; -import android.graphics.drawable.Drawable; +import android.graphics.drawable.DrawableWrapper; import android.os.Handler; +import android.telephony.SignalStrength; import android.util.LayoutDirection; import com.android.settingslib.R; import com.android.settingslib.Utils; -public class SignalDrawable extends Drawable { +/** + * Drawable displaying a mobile cell signal indicator. + */ +public class SignalDrawable extends DrawableWrapper { private static final String TAG = "SignalDrawable"; @@ -48,11 +51,7 @@ public class SignalDrawable extends Drawable { private static final float CUT_OUT = 7.9f / VIEWPORT; private static final float DOT_SIZE = 3f / VIEWPORT; - private static final float DOT_PADDING = 1f / VIEWPORT; - private static final float DOT_CUT_WIDTH = (DOT_SIZE * 3) + (DOT_PADDING * 5); - private static final float DOT_CUT_HEIGHT = (DOT_SIZE * 1) + (DOT_PADDING * 1); - - private static final float[] FIT = {2.26f, -3.02f, 1.76f}; + private static final float DOT_PADDING = 1.5f / VIEWPORT; // All of these are masks to push all of the drawable state into one int for easy callbacks // and flow through sysui. @@ -61,11 +60,8 @@ public class SignalDrawable extends Drawable { private static final int NUM_LEVEL_MASK = 0xff << NUM_LEVEL_SHIFT; private static final int STATE_SHIFT = 16; private static final int STATE_MASK = 0xff << STATE_SHIFT; - private static final int STATE_NONE = 0; - private static final int STATE_EMPTY = 1; private static final int STATE_CUT = 2; private static final int STATE_CARRIER_CHANGE = 3; - private static final int STATE_AIRPLANE = 4; private static final long DOT_DELAY = 1000; @@ -84,76 +80,30 @@ public class SignalDrawable extends Drawable { {-1.9f / VIEWPORT, -1.9f / VIEWPORT}, }; - // Rounded corners are achieved by arcing a circle of radius `R` from its tangent points along - // the curve (curve ≡ triangle). On the top and left corners of the triangle, the tangents are - // as follows: - // 1) Along the straight lines (y = 0 and x = width): - // Ps = circleOffset + R - // 2) Along the diagonal line (y = x): - // Pd = √((Ps^2) / 2) - // or (remember: sin(π/4) ≈ 0.7071) - // Pd = (circleOffset + R - 0.7071, height - R - 0.7071) - // Where Pd is the (x,y) coords of the point that intersects the circle at the bottom - // left of the triangle - private static final float RADIUS_RATIO = 0.75f / 17f; - private static final float DIAG_OFFSET_MULTIPLIER = 0.707107f; - // How far the circle defining the corners is inset from the edges - private final float mAppliedCornerInset; - - private static final float INV_TAN = 1f / (float) Math.tan(Math.PI / 8f); - private static final float CUT_WIDTH_DP = 1f / 12f; - - // Where the top and left points of the triangle would be if not for rounding - private final PointF mVirtualTop = new PointF(); - private final PointF mVirtualLeft = new PointF(); - - private final Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); private final Paint mForegroundPaint = new Paint(Paint.ANTI_ALIAS_FLAG); - private final int mDarkModeBackgroundColor; + private final Paint mTransparentPaint = new Paint(Paint.ANTI_ALIAS_FLAG); private final int mDarkModeFillColor; - private final int mLightModeBackgroundColor; private final int mLightModeFillColor; - private final Path mFullPath = new Path(); + private final Path mCutoutPath = new Path(); private final Path mForegroundPath = new Path(); private final Path mXPath = new Path(); - // Cut out when STATE_EMPTY - private final Path mCutPath = new Path(); - // Draws the slash when in airplane mode - private final SlashArtist mSlash = new SlashArtist(); private final Handler mHandler; - private float mOldDarkIntensity = -1; - private float mNumLevels = 1; - private int mIntrinsicSize; - private int mLevel; - private int mState; - private boolean mVisible; + private float mDarkIntensity = -1; + private final int mIntrinsicSize; private boolean mAnimating; private int mCurrentDot; public SignalDrawable(Context context) { - mDarkModeBackgroundColor = - Utils.getColorStateListDefaultColor(context, - R.color.dark_mode_icon_color_dual_tone_background); - mDarkModeFillColor = - Utils.getColorStateListDefaultColor(context, - R.color.dark_mode_icon_color_dual_tone_fill); - mLightModeBackgroundColor = - Utils.getColorStateListDefaultColor(context, - R.color.light_mode_icon_color_dual_tone_background); - mLightModeFillColor = - Utils.getColorStateListDefaultColor(context, - R.color.light_mode_icon_color_dual_tone_fill); + super(context.getDrawable(com.android.internal.R.drawable.ic_signal_cellular)); + mDarkModeFillColor = Utils.getColorStateListDefaultColor(context, + R.color.dark_mode_icon_color_single_tone); + mLightModeFillColor = Utils.getColorStateListDefaultColor(context, + R.color.light_mode_icon_color_single_tone); mIntrinsicSize = context.getResources().getDimensionPixelSize(R.dimen.signal_icon_size); - + mTransparentPaint.setColor(context.getColor(android.R.color.transparent)); + mTransparentPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN)); mHandler = new Handler(); setDarkIntensity(0); - - mAppliedCornerInset = context.getResources() - .getDimensionPixelSize(R.dimen.stat_sys_mobile_signal_circle_inset); - } - - public void setIntrinsicSize(int size) { - mIntrinsicSize = size; } @Override @@ -166,21 +116,8 @@ public class SignalDrawable extends Drawable { return mIntrinsicSize; } - public void setNumLevels(int levels) { - if (levels == mNumLevels) return; - mNumLevels = levels; - invalidateSelf(); - } - - private void setSignalState(int state) { - if (state == mState) return; - mState = state; - updateAnimation(); - invalidateSelf(); - } - private void updateAnimation() { - boolean shouldAnimate = (mState == STATE_CARRIER_CHANGE) && mVisible; + boolean shouldAnimate = isInState(STATE_CARRIER_CHANGE) && isVisible(); if (shouldAnimate == mAnimating) return; mAnimating = shouldAnimate; if (shouldAnimate) { @@ -191,43 +128,38 @@ public class SignalDrawable extends Drawable { } @Override - protected boolean onLevelChange(int state) { - setNumLevels(getNumLevels(state)); - setSignalState(getState(state)); - int level = getLevel(state); - if (level != mLevel) { - mLevel = level; - invalidateSelf(); - } + protected boolean onLevelChange(int packedState) { + super.onLevelChange(unpackLevel(packedState)); + updateAnimation(); + setTintList(ColorStateList.valueOf(mForegroundPaint.getColor())); return true; } - public void setColors(int background, int foreground) { - int colorBackground = mPaint.getColor(); - int colorForeground = mForegroundPaint.getColor(); - mPaint.setColor(background); - mForegroundPaint.setColor(foreground); - if (colorBackground != background || colorForeground != foreground) invalidateSelf(); + private int unpackLevel(int packedState) { + int numBins = (packedState & NUM_LEVEL_MASK) >> NUM_LEVEL_SHIFT; + int levelOffset = numBins == (SignalStrength.NUM_SIGNAL_STRENGTH_BINS + 1) ? 10 : 0; + int level = (packedState & LEVEL_MASK); + return level + levelOffset; } public void setDarkIntensity(float darkIntensity) { - if (darkIntensity == mOldDarkIntensity) { + if (darkIntensity == mDarkIntensity) { return; } - mPaint.setColor(getBackgroundColor(darkIntensity)); - mForegroundPaint.setColor(getFillColor(darkIntensity)); - mOldDarkIntensity = darkIntensity; - invalidateSelf(); + setTintList(ColorStateList.valueOf(getFillColor(darkIntensity))); } - private int getFillColor(float darkIntensity) { - return getColorForDarkIntensity( - darkIntensity, mLightModeFillColor, mDarkModeFillColor); + @Override + public void setTintList(ColorStateList tint) { + super.setTintList(tint); + int colorForeground = mForegroundPaint.getColor(); + mForegroundPaint.setColor(tint.getDefaultColor()); + if (colorForeground != mForegroundPaint.getColor()) invalidateSelf(); } - private int getBackgroundColor(float darkIntensity) { + private int getFillColor(float darkIntensity) { return getColorForDarkIntensity( - darkIntensity, mLightModeBackgroundColor, mDarkModeBackgroundColor); + darkIntensity, mLightModeFillColor, mDarkModeFillColor); } private int getColorForDarkIntensity(float darkIntensity, int lightColor, int darkColor) { @@ -242,6 +174,7 @@ public class SignalDrawable extends Drawable { @Override public void draw(@NonNull Canvas canvas) { + canvas.saveLayer(null, null); final float width = getBounds().width(); final float height = getBounds().height(); @@ -252,113 +185,32 @@ public class SignalDrawable extends Drawable { canvas.translate(width, 0); canvas.scale(-1.0f, 1.0f); } - mFullPath.reset(); - mFullPath.setFillType(FillType.WINDING); + super.draw(canvas); + mCutoutPath.reset(); + mCutoutPath.setFillType(FillType.WINDING); final float padding = Math.round(PAD * width); - final float cornerRadius = RADIUS_RATIO * height; - // Offset from circle where the hypotenuse meets the circle - final float diagOffset = DIAG_OFFSET_MULTIPLIER * cornerRadius; - - // 1 - Bottom right, above corner - mFullPath.moveTo(width - padding, height - padding - cornerRadius); - // 2 - Line to top right, below corner - mFullPath.lineTo(width - padding, padding + cornerRadius + mAppliedCornerInset); - // 3 - Arc to top right, on hypotenuse - mFullPath.arcTo( - width - padding - (2 * cornerRadius), - padding + mAppliedCornerInset, - width - padding, - padding + mAppliedCornerInset + (2 * cornerRadius), - 0.f, -135.f, false - ); - // 4 - Line to bottom left, on hypotenuse - mFullPath.lineTo(padding + mAppliedCornerInset + cornerRadius - diagOffset, - height - padding - cornerRadius - diagOffset); - // 5 - Arc to bottom left, on leg - mFullPath.arcTo( - padding + mAppliedCornerInset, - height - padding - (2 * cornerRadius), - padding + mAppliedCornerInset + ( 2 * cornerRadius), - height - padding, - -135.f, -135.f, false - ); - // 6 - Line to bottom rght, before corner - mFullPath.lineTo(width - padding - cornerRadius, height - padding); - // 7 - Arc to beginning (bottom right, above corner) - mFullPath.arcTo( - width - padding - (2 * cornerRadius), - height - padding - (2 * cornerRadius), - width - padding, - height - padding, - 90.f, -90.f, false - ); - - if (mState == STATE_CARRIER_CHANGE) { - float cutWidth = (DOT_CUT_WIDTH * width); - float cutHeight = (DOT_CUT_HEIGHT * width); + + if (isInState(STATE_CARRIER_CHANGE)) { float dotSize = (DOT_SIZE * height); float dotPadding = (DOT_PADDING * height); - - mFullPath.moveTo(width - padding, height - padding); - mFullPath.rLineTo(-cutWidth, 0); - mFullPath.rLineTo(0, -cutHeight); - mFullPath.rLineTo(cutWidth, 0); - mFullPath.rLineTo(0, cutHeight); - float dotSpacing = dotPadding * 2 + dotSize; + float dotSpacing = dotPadding + dotSize; float x = width - padding - dotSize; float y = height - padding - dotSize; mForegroundPath.reset(); - drawDot(mFullPath, mForegroundPath, x, y, dotSize, 2); - drawDot(mFullPath, mForegroundPath, x - dotSpacing, y, dotSize, 1); - drawDot(mFullPath, mForegroundPath, x - dotSpacing * 2, y, dotSize, 0); - } else if (mState == STATE_CUT) { + drawDotAndPadding(x, y, dotPadding, dotSize, 2); + drawDotAndPadding(x - dotSpacing, y, dotPadding, dotSize, 1); + drawDotAndPadding(x - dotSpacing * 2, y, dotPadding, dotSize, 0); + canvas.drawPath(mCutoutPath, mTransparentPaint); + canvas.drawPath(mForegroundPath, mForegroundPaint); + } else if (isInState(STATE_CUT)) { float cut = (CUT_OUT * width); - mFullPath.moveTo(width - padding, height - padding); - mFullPath.rLineTo(-cut, 0); - mFullPath.rLineTo(0, -cut); - mFullPath.rLineTo(cut, 0); - mFullPath.rLineTo(0, cut); - } - - if (mState == STATE_EMPTY) { - // Where the corners would be if this were a real triangle - mVirtualTop.set( - width - padding, - (padding + cornerRadius + mAppliedCornerInset) - (INV_TAN * cornerRadius)); - mVirtualLeft.set( - (padding + cornerRadius + mAppliedCornerInset) - (INV_TAN * cornerRadius), - height - padding); - - final float cutWidth = CUT_WIDTH_DP * height; - final float cutDiagInset = cutWidth * INV_TAN; - - // Cut out a smaller triangle from the center of mFullPath - mCutPath.reset(); - mCutPath.setFillType(FillType.WINDING); - mCutPath.moveTo(width - padding - cutWidth, height - padding - cutWidth); - mCutPath.lineTo(width - padding - cutWidth, mVirtualTop.y + cutDiagInset); - mCutPath.lineTo(mVirtualLeft.x + cutDiagInset, height - padding - cutWidth); - mCutPath.lineTo(width - padding - cutWidth, height - padding - cutWidth); - - // Draw empty state as only background - mForegroundPath.reset(); - mFullPath.op(mCutPath, Path.Op.DIFFERENCE); - } else if (mState == STATE_AIRPLANE) { - // Airplane mode is slashed, fully drawn background - mForegroundPath.reset(); - mSlash.draw((int) height, (int) width, canvas, mPaint); - } else if (mState != STATE_CARRIER_CHANGE) { - mForegroundPath.reset(); - int sigWidth = Math.round(calcFit(mLevel / (mNumLevels - 1)) * (width - 2 * padding)); - mForegroundPath.addRect(padding, padding, padding + sigWidth, height - padding, - Direction.CW); - mForegroundPath.op(mFullPath, Op.INTERSECT); - } - - canvas.drawPath(mFullPath, mPaint); - canvas.drawPath(mForegroundPath, mForegroundPaint); - if (mState == STATE_CUT) { + mCutoutPath.moveTo(width - padding, height - padding); + mCutoutPath.rLineTo(-cut, 0); + mCutoutPath.rLineTo(0, -cut); + mCutoutPath.rLineTo(cut, 0); + mCutoutPath.rLineTo(0, cut); + canvas.drawPath(mCutoutPath, mTransparentPaint); mXPath.reset(); mXPath.moveTo(X_PATH[0][0] * width, X_PATH[0][1] * height); for (int i = 1; i < X_PATH.length; i++) { @@ -369,57 +221,37 @@ public class SignalDrawable extends Drawable { if (isRtl) { canvas.restore(); } + canvas.restore(); } - private void drawDot(Path fullPath, Path foregroundPath, float x, float y, float dotSize, - int i) { - Path p = (i == mCurrentDot) ? foregroundPath : fullPath; - p.addRect(x, y, x + dotSize, y + dotSize, Direction.CW); - } - - // This is a fit line based on previous values of provided in assets, but if - // you look at the a plot of this actual fit, it makes a lot of sense, what it does - // is compress the areas that are very visually easy to see changes (the middle sections) - // and spread out the sections that are hard to see (each end of the icon). - // The current fit is cubic, but pretty easy to change the way the code is written (just add - // terms to the end of FIT). - private float calcFit(float v) { - float ret = 0; - float t = v; - for (int i = 0; i < FIT.length; i++) { - ret += FIT[i] * t; - t *= v; + private void drawDotAndPadding(float x, float y, + float dotPadding, float dotSize, int i) { + if (i == mCurrentDot) { + // Draw dot + mForegroundPath.addRect(x, y, x + dotSize, y + dotSize, Direction.CW); + // Draw dot padding + mCutoutPath.addRect(x - dotPadding, y - dotPadding, x + dotSize + dotPadding, + y + dotSize + dotPadding, Direction.CW); } - return ret; - } - - @Override - public int getAlpha() { - return mPaint.getAlpha(); } @Override public void setAlpha(@IntRange(from = 0, to = 255) int alpha) { - mPaint.setAlpha(alpha); + super.setAlpha(alpha); mForegroundPaint.setAlpha(alpha); } @Override public void setColorFilter(@Nullable ColorFilter colorFilter) { - mPaint.setColorFilter(colorFilter); + super.setColorFilter(colorFilter); mForegroundPaint.setColorFilter(colorFilter); } @Override - public int getOpacity() { - return 255; - } - - @Override public boolean setVisible(boolean visible, boolean restart) { - mVisible = visible; + boolean changed = super.setVisible(visible, restart); updateAnimation(); - return super.setVisible(visible, restart); + return changed; } private final Runnable mChangeDot = new Runnable() { @@ -433,92 +265,33 @@ public class SignalDrawable extends Drawable { } }; - public static int getLevel(int fullState) { - return fullState & LEVEL_MASK; + /** + * Returns whether this drawable is in the specified state. + * + * @param state must be one of {@link #STATE_CARRIER_CHANGE} or {@link #STATE_CUT} + */ + private boolean isInState(int state) { + return getState(getLevel()) == state; } public static int getState(int fullState) { return (fullState & STATE_MASK) >> STATE_SHIFT; } - public static int getNumLevels(int fullState) { - return (fullState & NUM_LEVEL_MASK) >> NUM_LEVEL_SHIFT; - } - public static int getState(int level, int numLevels, boolean cutOut) { return ((cutOut ? STATE_CUT : 0) << STATE_SHIFT) | (numLevels << NUM_LEVEL_SHIFT) | level; } - public static int getCarrierChangeState(int numLevels) { - return (STATE_CARRIER_CHANGE << STATE_SHIFT) | (numLevels << NUM_LEVEL_SHIFT); - } - + /** Returns the state representing empty mobile signal with the given number of levels. */ public static int getEmptyState(int numLevels) { - return (STATE_EMPTY << STATE_SHIFT) | (numLevels << NUM_LEVEL_SHIFT); - } - - public static int getAirplaneModeState(int numLevels) { - return (STATE_AIRPLANE << STATE_SHIFT) | (numLevels << NUM_LEVEL_SHIFT); + // TODO empty state == 0 state. does there need to be a new drawable for this? + return getState(0, numLevels, false); } - private final class SlashArtist { - private static final float CORNER_RADIUS = 1f; - // These values are derived in un-rotated (vertical) orientation - private static final float SLASH_WIDTH = 1.8384776f; - private static final float SLASH_HEIGHT = 22f; - private static final float CENTER_X = 10.65f; - private static final float CENTER_Y = 15.869239f; - private static final float SCALE = 24f; - - // Bottom is derived during animation - private static final float LEFT = (CENTER_X - (SLASH_WIDTH / 2)) / SCALE; - private static final float TOP = (CENTER_Y - (SLASH_HEIGHT / 2)) / SCALE; - private static final float RIGHT = (CENTER_X + (SLASH_WIDTH / 2)) / SCALE; - private static final float BOTTOM = (CENTER_Y + (SLASH_HEIGHT / 2)) / SCALE; - // Draw the slash washington-monument style; rotate to no-u-turn style - private static final float ROTATION = -45f; - - private final Path mPath = new Path(); - private final RectF mSlashRect = new RectF(); - - void draw(int height, int width, @NonNull Canvas canvas, Paint paint) { - Matrix m = new Matrix(); - final float radius = scale(CORNER_RADIUS, width); - updateRect( - scale(LEFT, width), - scale(TOP, height), - scale(RIGHT, width), - scale(BOTTOM, height)); - - mPath.reset(); - // Draw the slash vertically - mPath.addRoundRect(mSlashRect, radius, radius, Direction.CW); - m.setRotate(ROTATION, width / 2, height / 2); - mPath.transform(m); - canvas.drawPath(mPath, paint); - - // Rotate back to vertical, and draw the cut-out rect next to this one - m.setRotate(-ROTATION, width / 2, height / 2); - mPath.transform(m); - m.setTranslate(mSlashRect.width(), 0); - mPath.transform(m); - mPath.addRoundRect(mSlashRect, radius, radius, Direction.CW); - m.setRotate(ROTATION, width / 2, height / 2); - mPath.transform(m); - canvas.clipOutPath(mPath); - } - - void updateRect(float left, float top, float right, float bottom) { - mSlashRect.left = left; - mSlashRect.top = top; - mSlashRect.right = right; - mSlashRect.bottom = bottom; - } - - private float scale(float frac, int width) { - return frac * width; - } + /** Returns the state representing carrier change with the given number of levels. */ + public static int getCarrierChangeState(int numLevels) { + return (STATE_CARRIER_CHANGE << STATE_SHIFT) | (numLevels << NUM_LEVEL_SHIFT); } } diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml index d420966079fe..348f01eaa004 100644 --- a/packages/SettingsProvider/res/values/defaults.xml +++ b/packages/SettingsProvider/res/values/defaults.xml @@ -65,19 +65,19 @@ <!-- user interface sound effects --> <integer name="def_power_sounds_enabled">1</integer> - <string name="def_low_battery_sound" translatable="false">/system/media/audio/ui/LowBattery.ogg</string> + <string name="def_low_battery_sound" translatable="false">/product/media/audio/ui/LowBattery.ogg</string> <integer name="def_dock_sounds_enabled">0</integer> <integer name="def_dock_sounds_enabled_when_accessibility">0</integer> - <string name="def_desk_dock_sound" translatable="false">/system/media/audio/ui/Dock.ogg</string> - <string name="def_desk_undock_sound" translatable="false">/system/media/audio/ui/Undock.ogg</string> - <string name="def_car_dock_sound" translatable="false">/system/media/audio/ui/Dock.ogg</string> - <string name="def_car_undock_sound" translatable="false">/system/media/audio/ui/Undock.ogg</string> + <string name="def_desk_dock_sound" translatable="false">/product/media/audio/ui/Dock.ogg</string> + <string name="def_desk_undock_sound" translatable="false">/product/media/audio/ui/Undock.ogg</string> + <string name="def_car_dock_sound" translatable="false">/product/media/audio/ui/Dock.ogg</string> + <string name="def_car_undock_sound" translatable="false">/product/media/audio/ui/Undock.ogg</string> <integer name="def_lockscreen_sounds_enabled">1</integer> - <string name="def_lock_sound" translatable="false">/system/media/audio/ui/Lock.ogg</string> - <string name="def_unlock_sound" translatable="false">/system/media/audio/ui/Unlock.ogg</string> - <string name="def_trusted_sound" translatable="false">/system/media/audio/ui/Trusted.ogg</string> - <string name="def_wireless_charging_started_sound" translatable="false">/system/media/audio/ui/WirelessChargingStarted.ogg</string> - <string name="def_charging_started_sound" translatable="false">/system/media/audio/ui/ChargingStarted.ogg</string> + <string name="def_lock_sound" translatable="false">/product/media/audio/ui/Lock.ogg</string> + <string name="def_unlock_sound" translatable="false">/product/media/audio/ui/Unlock.ogg</string> + <string name="def_trusted_sound" translatable="false">/product/media/audio/ui/Trusted.ogg</string> + <string name="def_wireless_charging_started_sound" translatable="false">/product/media/audio/ui/WirelessChargingStarted.ogg</string> + <string name="def_charging_started_sound" translatable="false">/product/media/audio/ui/ChargingStarted.ogg</string> <!-- sound trigger detection service default values --> <integer name="def_max_sound_trigger_detection_service_ops_per_day" translatable="false">1000</integer> diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/OverlayPlugin.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/OverlayPlugin.java index 61aa60bb9675..90fc86bc5b51 100644 --- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/OverlayPlugin.java +++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/OverlayPlugin.java @@ -13,18 +13,28 @@ */ package com.android.systemui.plugins; -import com.android.systemui.plugins.annotations.ProvidesInterface; - import android.view.View; +import com.android.systemui.plugins.annotations.ProvidesInterface; + @ProvidesInterface(action = OverlayPlugin.ACTION, version = OverlayPlugin.VERSION) public interface OverlayPlugin extends Plugin { String ACTION = "com.android.systemui.action.PLUGIN_OVERLAY"; - int VERSION = 2; + int VERSION = 3; + /** + * Setup overlay plugin + */ void setup(View statusBar, View navBar); + /** + * Setup overlay plugin with callback + */ + default void setup(View statusBar, View navBar, Callback callback) { + setup(statusBar, navBar); + } + default boolean holdStatusBarOpen() { return false; } @@ -34,4 +44,11 @@ public interface OverlayPlugin extends Plugin { */ default void setCollapseDesired(boolean collapseDesired) { } + + /** + * Used to update system ui whether to hold status bar open + */ + interface Callback { + void onHoldStatusBarOpenChange(); + } } diff --git a/packages/SystemUI/res-keyguard/drawable/analog_frame.xml b/packages/SystemUI/res-keyguard/drawable/analog_frame.xml index a663ac826127..3196169df7cc 100644 --- a/packages/SystemUI/res-keyguard/drawable/analog_frame.xml +++ b/packages/SystemUI/res-keyguard/drawable/analog_frame.xml @@ -1,7 +1,7 @@ <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:height="250dp" - android:width="250dp" + android:height="380dp" + android:width="380dp" android:viewportHeight="380" android:viewportWidth="380"> - <path android:fillColor="#000000" android:pathData="M190,190m0,2a2,2 0,1 1,0 -4a2,2 0,1 1,0 4"/> + <path android:fillColor="#000000" android:pathData="M190,190m-2,0a2,2 0,1 1,4 0a2,2 0,1 1,-4 0"/> </vector> diff --git a/packages/SystemUI/res-keyguard/drawable/analog_hour_hand.xml b/packages/SystemUI/res-keyguard/drawable/analog_hour_hand.xml index c7b6d60b319f..a05b16aa0204 100644 --- a/packages/SystemUI/res-keyguard/drawable/analog_hour_hand.xml +++ b/packages/SystemUI/res-keyguard/drawable/analog_hour_hand.xml @@ -1,7 +1,4 @@ -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:height="250dp" - android:width="250dp" - android:viewportHeight="380" - android:viewportWidth="380"> - <path android:fillColor="#777777" android:fillType="evenOdd" android:pathData="M203,190C203,185.398 200.608,181.354 197,179.044L197,58C197,54.134 193.866,51 190,51C186.134,51 183,54.134 183,58L183,179.043C179.392,181.354 177,185.397 177,190C177,197.18 182.82,203 190,203C197.18,203 203,197.18 203,190Z"/> +<vector android:height="380dp" android:viewportHeight="380" + android:viewportWidth="380" android:width="380dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="#777777" android:fillType="evenOdd" android:pathData="m200,190.047c0.018,-3.701 -1.978,-6.942 -4.959,-8.686l0.582,-123.337c0.013,-2.761 -2.215,-5.011 -4.976,-5.024 -2.761,-0.013 -5.01,2.215 -5.024,4.976L185.041,181.314c-2.997,1.715 -5.024,4.937 -5.041,8.639 -0.026,5.523 4.43,10.021 9.953,10.047 5.523,0.026 10.021,-4.43 10.047,-9.953z"/> </vector> diff --git a/packages/SystemUI/res-keyguard/drawable/analog_minute_hand.xml b/packages/SystemUI/res-keyguard/drawable/analog_minute_hand.xml index 458275bec23a..1277b6281032 100644 --- a/packages/SystemUI/res-keyguard/drawable/analog_minute_hand.xml +++ b/packages/SystemUI/res-keyguard/drawable/analog_minute_hand.xml @@ -1,7 +1,4 @@ -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:height="250dp" - android:width="250dp" - android:viewportHeight="380" - android:viewportWidth="380"> - <path android:fillColor="#FFFFFF" android:pathData="M192,182.252C195.45,183.14 198,186.272 198,190C198,194.418 194.418,198 190,198C185.582,198 182,194.418 182,190C182,186.272 184.55,183.14 188,182.252L188,10C188,8.895 188.895,8 190,8C191.105,8 192,8.895 192,10L192,182.252Z"/> +<vector android:height="380dp" android:viewportHeight="380" + android:viewportWidth="380" android:width="380dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="#aaaaaa" android:fillType="evenOdd" android:pathData="m191,184.083c2.838,0.476 5,2.944 5,5.917 0,3.314 -2.686,6 -6,6 -3.314,0 -6,-2.686 -6,-6 0,-2.973 2.162,-5.441 5,-5.917V9c0,-0.552 0.448,-1 1,-1 0.552,0 1,0.448 1,1z"/> </vector> diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml index 3118ab77bf6f..1967dd1013f9 100644 --- a/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml +++ b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml @@ -48,16 +48,16 @@ android:id="@+id/default_clock_view_bold" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" + android:layout_gravity="bottom|center_horizontal" android:gravity="center_horizontal" android:letterSpacing="0.03" android:textColor="?attr/wallpaperTextColor" android:singleLine="true" - style="@style/widget_big_bold" + style="@style/widget_title_bold" android:format12Hour="@string/keyguard_widget_12_hours_format" android:format24Hour="@string/keyguard_widget_24_hours_format" android:elegantTextHeight="false" - android:visibility="gone" + android:visibility="invisible" /> </FrameLayout> <include layout="@layout/keyguard_status_area" diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml index ab48f1df2ec2..1c8e141a61f8 100644 --- a/packages/SystemUI/res-keyguard/values/styles.xml +++ b/packages/SystemUI/res-keyguard/values/styles.xml @@ -66,16 +66,16 @@ <item name="android:fontFeatureSettings">@*android:string/config_headlineFontFeatureSettings</item> <item name="android:ellipsize">none</item> </style> - <style name="widget_big_bold"> + <style name="widget_title_bold"> <item name="android:textStyle">bold</item> - <item name="android:textSize">@dimen/widget_big_font_size</item> - <item name="android:paddingBottom">@dimen/bottom_text_spacing_digital</item> + <item name="android:textSize">@dimen/widget_title_font_size</item> + <item name="android:paddingBottom">@dimen/widget_vertical_padding_clock</item> <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item> <item name="android:ellipsize">none</item> </style> <style name="widget_small_bold"> <item name="android:textStyle">bold</item> - <item name="android:textSize">@dimen/widget_title_font_size</item> + <item name="android:textSize">@dimen/widget_small_font_size</item> <item name="android:paddingBottom">@dimen/bottom_text_spacing_digital</item> <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item> <item name="android:ellipsize">none</item> diff --git a/packages/SystemUI/res/drawable-night/status_bar_notification_section_header_clear_btn.xml b/packages/SystemUI/res/drawable-night/status_bar_notification_section_header_clear_btn.xml new file mode 100644 index 000000000000..c471b38306d5 --- /dev/null +++ b/packages/SystemUI/res/drawable-night/status_bar_notification_section_header_clear_btn.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ 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 + --> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="40dp" + android:height="40dp" + android:viewportWidth="40" + android:viewportHeight="40"> + <path + android:fillColor="#9AA0A6" + android:pathData="M24.6667 16.2733L23.7267 15.3333L20 19.06L16.2734 15.3333L15.3334 16.2733L19.06 20L15.3334 23.7266L16.2734 24.6666L20 20.94L23.7267 24.6666L24.6667 23.7266L20.94 20L24.6667 16.2733Z"/> +</vector> diff --git a/packages/SystemUI/res/drawable/face_dialog_dark_to_checkmark.xml b/packages/SystemUI/res/drawable/face_dialog_dark_to_checkmark.xml index e4ace67577c3..fe1951699eaa 100644 --- a/packages/SystemUI/res/drawable/face_dialog_dark_to_checkmark.xml +++ b/packages/SystemUI/res/drawable/face_dialog_dark_to_checkmark.xml @@ -40,7 +40,7 @@ <path android:name="_R_G_L_0_G_D_0_P_0" android:fillAlpha="0" - android:fillColor="?android:attr/colorAccent" + android:fillColor="@color/biometric_dialog_accent" android:fillType="nonZero" android:pathData=" M-116 -16.5 C-116,-16.5 -31.25,68.5 -31.25,68.5 C-31.25,68.5 108.75,-71.5 108.75,-71.5 " android:trimPathStart="0" @@ -58,7 +58,7 @@ android:pathData=" M-116 -16.5 C-116,-16.5 -31.25,68.5 -31.25,68.5 C-31.25,68.5 108.75,-71.5 108.75,-71.5 " android:strokeWidth="20" android:strokeAlpha="1" - android:strokeColor="?android:attr/colorAccent" + android:strokeColor="@color/biometric_dialog_accent" android:trimPathStart="0" android:trimPathEnd="0" android:trimPathOffset="0" /> @@ -68,7 +68,7 @@ android:pathData=" M30 6.2 C16.9,6.2 6.3,16.8 6.3,30 C6.3,43.2 16.9,53.8 30,53.8 C43.1,53.8 53.8,43.2 53.8,30 C53.8,16.8 43.1,6.2 30,6.2c " android:strokeWidth="2.5" android:strokeAlpha="1" - android:strokeColor="?android:attr/colorAccent" + android:strokeColor="@color/biometric_dialog_accent" android:trimPathStart="0" android:trimPathEnd="1" android:trimPathOffset="0" /> @@ -85,7 +85,7 @@ android:pathData=" M4.71 1.1 C3.71,2.12 2.32,2.75 0.79,2.75 C-2.25,2.75 -4.7,0.29 -4.7,-2.75 " android:strokeWidth="2" android:strokeAlpha="1" - android:strokeColor="?android:attr/colorAccent" + android:strokeColor="@color/biometric_dialog_accent" android:trimPathStart="0" android:trimPathEnd="1" android:trimPathOffset="0" /> @@ -99,7 +99,7 @@ <path android:name="_R_G_L_0_G_D_4_P_0" android:fillAlpha="1" - android:fillColor="?android:attr/colorAccent" + android:fillColor="@color/biometric_dialog_accent" android:fillType="nonZero" android:pathData=" M-2.1 0 C-2.1,1.2 -1.2,2.1 0,2.1 C1.1,2.1 2.1,1.2 2.1,0 C2.1,-1.2 1.2,-2.1 0,-2.1 C-1.2,-2.1 -2.1,-1.2 -2.1,0c " /> </group> @@ -112,7 +112,7 @@ <path android:name="_R_G_L_0_G_D_5_P_0" android:fillAlpha="1" - android:fillColor="?android:attr/colorAccent" + android:fillColor="@color/biometric_dialog_accent" android:fillType="nonZero" android:pathData=" M-2.1 0 C-2.1,1.2 -1.2,2.1 0,2.1 C1.2,2.1 2.1,1.2 2.1,0 C2.1,-1.2 1.2,-2.1 0,-2.1 C-1.2,-2.1 -2.1,-1.2 -2.1,0c " /> </group> @@ -125,7 +125,7 @@ <path android:name="_R_G_L_0_G_D_6_P_0" android:fillAlpha="1" - android:fillColor="?android:attr/colorAccent" + android:fillColor="@color/biometric_dialog_accent" android:fillType="nonZero" android:pathData=" M2.6 3.25 C2.6,3.25 -2.6,3.25 -2.6,3.25 C-2.6,3.25 -2.6,1.25 -2.6,1.25 C-2.6,1.25 0.6,1.25 0.6,1.25 C0.6,1.25 0.6,-3.25 0.6,-3.25 C0.6,-3.25 2.6,-3.25 2.6,-3.25 C2.6,-3.25 2.6,3.25 2.6,3.25c " /> </group> @@ -386,8 +386,8 @@ android:duration="67" android:propertyName="strokeColor" android:startOffset="0" - android:valueFrom="?android:attr/colorAccent" - android:valueTo="?android:attr/colorAccent" + android:valueFrom="@color/biometric_dialog_accent" + android:valueTo="@color/biometric_dialog_accent" android:valueType="colorType"> <aapt:attr name="android:interpolator"> <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" /> @@ -397,8 +397,8 @@ android:duration="17" android:propertyName="strokeColor" android:startOffset="67" - android:valueFrom="?android:attr/colorAccent" - android:valueTo="?android:attr/colorAccent" + android:valueFrom="@color/biometric_dialog_accent" + android:valueTo="@color/biometric_dialog_accent" android:valueType="colorType"> <aapt:attr name="android:interpolator"> <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" /> diff --git a/packages/SystemUI/res/drawable/face_dialog_dark_to_error.xml b/packages/SystemUI/res/drawable/face_dialog_dark_to_error.xml index a96d21addb2b..0c05019bf199 100644 --- a/packages/SystemUI/res/drawable/face_dialog_dark_to_error.xml +++ b/packages/SystemUI/res/drawable/face_dialog_dark_to_error.xml @@ -36,7 +36,7 @@ android:pathData=" M30 6.2 C16.9,6.2 6.3,16.8 6.3,30 C6.3,43.2 16.9,53.8 30,53.8 C43.1,53.8 53.8,43.2 53.8,30 C53.8,16.8 43.1,6.2 30,6.2c " android:strokeWidth="2.5" android:strokeAlpha="1" - android:strokeColor="@color/biometric_face_icon_gray" + android:strokeColor="@color/biometric_dialog_gray" android:trimPathStart="0" android:trimPathEnd="1" android:trimPathOffset="0" /> @@ -45,7 +45,7 @@ android:pathData=" M33.75 42.75 C32.75,43.76 31.37,44.39 29.83,44.39 C26.8,44.39 24.34,41.93 24.34,38.9 " android:strokeWidth="2" android:strokeAlpha="1" - android:strokeColor="@color/biometric_face_icon_gray" + android:strokeColor="@color/biometric_dialog_gray" android:trimPathStart="0" android:trimPathEnd="1" android:trimPathOffset="0" /> @@ -58,7 +58,7 @@ <path android:name="_R_G_L_0_G_D_2_P_0" android:fillAlpha="1" - android:fillColor="@color/biometric_face_icon_gray" + android:fillColor="@color/biometric_dialog_gray" android:fillType="nonZero" android:pathData=" M-2.1 0 C-2.1,1.2 -1.2,2.1 0,2.1 C1.1,2.1 2.1,1.2 2.1,0 C2.1,-1.2 1.2,-2.1 0,-2.1 C-1.2,-2.1 -2.1,-1.2 -2.1,0c " /> </group> @@ -71,7 +71,7 @@ <path android:name="_R_G_L_0_G_D_3_P_0" android:fillAlpha="1" - android:fillColor="@color/biometric_face_icon_gray" + android:fillColor="@color/biometric_dialog_gray" android:fillType="nonZero" android:pathData=" M-2.1 0 C-2.1,1.2 -1.2,2.1 0,2.1 C1.2,2.1 2.1,1.2 2.1,0 C2.1,-1.2 1.2,-2.1 0,-2.1 C-1.2,-2.1 -2.1,-1.2 -2.1,0c " /> </group> @@ -82,7 +82,7 @@ <path android:name="_R_G_L_0_G_D_4_P_0" android:fillAlpha="1" - android:fillColor="@color/biometric_face_icon_gray" + android:fillColor="@color/biometric_dialog_gray" android:fillType="nonZero" android:pathData=" M2.6 3.25 C2.6,3.25 -2.6,3.25 -2.6,3.25 C-2.6,3.25 -2.6,1.25 -2.6,1.25 C-2.6,1.25 0.6,1.25 0.6,1.25 C0.6,1.25 0.6,-3.25 0.6,-3.25 C0.6,-3.25 2.6,-3.25 2.6,-3.25 C2.6,-3.25 2.6,3.25 2.6,3.25c " /> </group> @@ -99,8 +99,8 @@ android:duration="50" android:propertyName="strokeColor" android:startOffset="0" - android:valueFrom="@color/biometric_face_icon_gray" - android:valueTo="@color/biometric_face_icon_gray" + android:valueFrom="@color/biometric_dialog_gray" + android:valueTo="@color/biometric_dialog_gray" android:valueType="colorType"> <aapt:attr name="android:interpolator"> <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" /> @@ -110,8 +110,8 @@ android:duration="17" android:propertyName="strokeColor" android:startOffset="50" - android:valueFrom="@color/biometric_face_icon_gray" - android:valueTo="?android:attr/colorError" + android:valueFrom="@color/biometric_dialog_gray" + android:valueTo="@color/biometric_dialog_error" android:valueType="colorType"> <aapt:attr name="android:interpolator"> <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" /> @@ -127,8 +127,8 @@ android:duration="50" android:propertyName="strokeColor" android:startOffset="0" - android:valueFrom="@color/biometric_face_icon_gray" - android:valueTo="@color/biometric_face_icon_gray" + android:valueFrom="@color/biometric_dialog_gray" + android:valueTo="@color/biometric_dialog_gray" android:valueType="colorType"> <aapt:attr name="android:interpolator"> <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" /> @@ -138,8 +138,8 @@ android:duration="17" android:propertyName="strokeColor" android:startOffset="50" - android:valueFrom="@color/biometric_face_icon_gray" - android:valueTo="?android:attr/colorError" + android:valueFrom="@color/biometric_dialog_gray" + android:valueTo="@color/biometric_dialog_error" android:valueType="colorType"> <aapt:attr name="android:interpolator"> <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" /> @@ -369,8 +369,8 @@ android:duration="50" android:propertyName="fillColor" android:startOffset="0" - android:valueFrom="@color/biometric_face_icon_gray" - android:valueTo="@color/biometric_face_icon_gray" + android:valueFrom="@color/biometric_dialog_gray" + android:valueTo="@color/biometric_dialog_gray" android:valueType="colorType"> <aapt:attr name="android:interpolator"> <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" /> @@ -380,8 +380,8 @@ android:duration="17" android:propertyName="fillColor" android:startOffset="50" - android:valueFrom="@color/biometric_face_icon_gray" - android:valueTo="?android:attr/colorError" + android:valueFrom="@color/biometric_dialog_gray" + android:valueTo="@color/biometric_dialog_error" android:valueType="colorType"> <aapt:attr name="android:interpolator"> <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" /> diff --git a/packages/SystemUI/res/drawable/face_dialog_error_to_idle.xml b/packages/SystemUI/res/drawable/face_dialog_error_to_idle.xml index aca12fce8d2f..d3cee25a2146 100644 --- a/packages/SystemUI/res/drawable/face_dialog_error_to_idle.xml +++ b/packages/SystemUI/res/drawable/face_dialog_error_to_idle.xml @@ -29,7 +29,7 @@ android:pathData=" M30 6.2 C16.9,6.2 6.3,16.8 6.3,30 C6.3,43.2 16.9,53.8 30,53.8 C43.1,53.8 53.8,43.2 53.8,30 C53.8,16.8 43.1,6.2 30,6.2c " android:strokeWidth="2.5" android:strokeAlpha="1" - android:strokeColor="?android:attr/colorError" + android:strokeColor="@color/biometric_dialog_error" android:trimPathStart="0" android:trimPathEnd="1" android:trimPathOffset="0" /> @@ -38,7 +38,7 @@ android:pathData=" M34.78 38.76 C33.83,38.75 31.54,38.75 30.01,38.75 C26.97,38.75 26.14,38.75 24.3,38.76 " android:strokeWidth="2.5" android:strokeAlpha="1" - android:strokeColor="?android:attr/colorError" + android:strokeColor="@color/biometric_dialog_error" android:trimPathStart="0.34" android:trimPathEnd="0.5700000000000001" android:trimPathOffset="0" /> @@ -51,7 +51,7 @@ <path android:name="_R_G_L_0_G_D_2_P_0" android:fillAlpha="0" - android:fillColor="@color/biometric_face_icon_gray" + android:fillColor="@color/biometric_dialog_gray" android:fillType="nonZero" android:pathData=" M-2.1 0 C-2.1,1.2 -1.2,2.1 0,2.1 C1.1,2.1 2.1,1.2 2.1,0 C2.1,-1.2 1.2,-2.1 0,-2.1 C-1.2,-2.1 -2.1,-1.2 -2.1,0c " /> </group> @@ -64,7 +64,7 @@ <path android:name="_R_G_L_0_G_D_3_P_0" android:fillAlpha="0" - android:fillColor="@color/biometric_face_icon_gray" + android:fillColor="@color/biometric_dialog_gray" android:fillType="nonZero" android:pathData=" M-2.1 0 C-2.1,1.2 -1.2,2.1 0,2.1 C1.2,2.1 2.1,1.2 2.1,0 C2.1,-1.2 1.2,-2.1 0,-2.1 C-1.2,-2.1 -2.1,-1.2 -2.1,0c " /> </group> @@ -75,7 +75,7 @@ <path android:name="_R_G_L_0_G_D_4_P_0" android:fillAlpha="1" - android:fillColor="?android:attr/colorError" + android:fillColor="@color/biometric_dialog_error" android:fillType="nonZero" android:pathData=" M0.9 3.25 C0.9,3.25 -1.5,3.25 -1.5,3.25 C-1.5,3.25 -1.5,1.25 -1.5,1.25 C-1.5,1.25 -1.5,1.25 -1.5,1.25 C-1.5,1.25 -1.5,-11.71 -1.5,-11.71 C-1.5,-11.71 0.9,-11.71 0.9,-11.71 C0.9,-11.71 0.9,3.25 0.9,3.25c " /> </group> @@ -91,8 +91,8 @@ android:duration="83" android:propertyName="strokeColor" android:startOffset="0" - android:valueFrom="?android:attr/colorError" - android:valueTo="?android:attr/colorError" + android:valueFrom="@color/biometric_dialog_error" + android:valueTo="@color/biometric_dialog_error" android:valueType="colorType"> <aapt:attr name="android:interpolator"> <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" /> @@ -102,8 +102,8 @@ android:duration="17" android:propertyName="strokeColor" android:startOffset="83" - android:valueFrom="?android:attr/colorError" - android:valueTo="@color/biometric_face_icon_gray" + android:valueFrom="@color/biometric_dialog_error" + android:valueTo="@color/biometric_dialog_gray" android:valueType="colorType"> <aapt:attr name="android:interpolator"> <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" /> @@ -119,8 +119,8 @@ android:duration="83" android:propertyName="strokeColor" android:startOffset="0" - android:valueFrom="?android:attr/colorError" - android:valueTo="?android:attr/colorError" + android:valueFrom="@color/biometric_dialog_error" + android:valueTo="@color/biometric_dialog_error" android:valueType="colorType"> <aapt:attr name="android:interpolator"> <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" /> @@ -130,8 +130,8 @@ android:duration="17" android:propertyName="strokeColor" android:startOffset="83" - android:valueFrom="?android:attr/colorError" - android:valueTo="@color/biometric_face_icon_gray" + android:valueFrom="@color/biometric_dialog_error" + android:valueTo="@color/biometric_dialog_gray" android:valueType="colorType"> <aapt:attr name="android:interpolator"> <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" /> @@ -427,8 +427,8 @@ android:duration="83" android:propertyName="fillColor" android:startOffset="0" - android:valueFrom="?android:attr/colorError" - android:valueTo="?android:attr/colorError" + android:valueFrom="@color/biometric_dialog_error" + android:valueTo="@color/biometric_dialog_error" android:valueType="colorType"> <aapt:attr name="android:interpolator"> <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" /> @@ -438,8 +438,8 @@ android:duration="17" android:propertyName="fillColor" android:startOffset="83" - android:valueFrom="?android:attr/colorError" - android:valueTo="@color/biometric_face_icon_gray" + android:valueFrom="@color/biometric_dialog_error" + android:valueTo="@color/biometric_dialog_gray" android:valueType="colorType"> <aapt:attr name="android:interpolator"> <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" /> diff --git a/packages/SystemUI/res/drawable/face_dialog_pulse_dark_to_light.xml b/packages/SystemUI/res/drawable/face_dialog_pulse_dark_to_light.xml index 0de856c28dcd..427be1447679 100644 --- a/packages/SystemUI/res/drawable/face_dialog_pulse_dark_to_light.xml +++ b/packages/SystemUI/res/drawable/face_dialog_pulse_dark_to_light.xml @@ -18,7 +18,7 @@ android:pathData=" M30 6.2 C16.9,6.2 6.3,16.8 6.3,30 C6.3,43.2 16.9,53.8 30,53.8 C43.1,53.8 53.8,43.2 53.8,30 C53.8,16.8 43.1,6.2 30,6.2c " android:strokeWidth="2.5" android:strokeAlpha="1" - android:strokeColor="?android:attr/colorAccent" + android:strokeColor="@color/biometric_dialog_accent" android:trimPathStart="0" android:trimPathEnd="1" android:trimPathOffset="0" /> @@ -27,26 +27,26 @@ android:pathData=" M33.75 42.75 C32.75,43.77 31.37,44.39 29.83,44.39 C26.8,44.39 24.34,41.93 24.34,38.9 " android:strokeWidth="2" android:strokeAlpha="1" - android:strokeColor="?android:attr/colorAccent" + android:strokeColor="@color/biometric_dialog_accent" android:trimPathStart="0" android:trimPathEnd="1" android:trimPathOffset="0" /> <path android:name="_R_G_L_0_G_D_2_P_0" android:fillAlpha="1" - android:fillColor="?android:attr/colorAccent" + android:fillColor="@color/biometric_dialog_accent" android:fillType="nonZero" android:pathData=" M39 23.8 C39,25 39.9,25.9 41.1,25.9 C42.2,25.9 43.2,25 43.2,23.8 C43.2,22.6 42.3,21.7 41.1,21.7 C39.9,21.7 39,22.6 39,23.8c " /> <path android:name="_R_G_L_0_G_D_3_P_0" android:fillAlpha="1" - android:fillColor="?android:attr/colorAccent" + android:fillColor="@color/biometric_dialog_accent" android:fillType="nonZero" android:pathData=" M16.5 23.8 C16.5,25 17.4,25.9 18.6,25.9 C19.8,25.9 20.7,25 20.7,23.8 C20.7,22.6 19.8,21.7 18.6,21.7 C17.4,21.7 16.5,22.6 16.5,23.8c " /> <path android:name="_R_G_L_0_G_D_4_P_0" android:fillAlpha="1" - android:fillColor="?android:attr/colorAccent" + android:fillColor="@color/biometric_dialog_accent" android:fillType="nonZero" android:pathData=" M33.33 34.95 C33.33,34.95 28.13,34.95 28.13,34.95 C28.13,34.95 28.13,32.95 28.13,32.95 C28.13,32.95 31.33,32.95 31.33,32.95 C31.33,32.95 31.33,28.45 31.33,28.45 C31.33,28.45 33.33,28.45 33.33,28.45 C33.33,28.45 33.33,34.95 33.33,34.95c " /> </group> diff --git a/packages/SystemUI/res/drawable/face_dialog_pulse_light_to_dark.xml b/packages/SystemUI/res/drawable/face_dialog_pulse_light_to_dark.xml index 31a0cbb2605c..ab26408a2ed6 100644 --- a/packages/SystemUI/res/drawable/face_dialog_pulse_light_to_dark.xml +++ b/packages/SystemUI/res/drawable/face_dialog_pulse_light_to_dark.xml @@ -18,7 +18,7 @@ android:pathData=" M30 6.2 C16.9,6.2 6.3,16.8 6.3,30 C6.3,43.2 16.9,53.8 30,53.8 C43.1,53.8 53.8,43.2 53.8,30 C53.8,16.8 43.1,6.2 30,6.2c " android:strokeWidth="2.5" android:strokeAlpha="0.5" - android:strokeColor="?android:attr/colorAccent" + android:strokeColor="@color/biometric_dialog_accent" android:trimPathStart="0" android:trimPathEnd="1" android:trimPathOffset="0" /> @@ -27,26 +27,26 @@ android:pathData=" M33.75 42.75 C32.75,43.77 31.37,44.39 29.83,44.39 C26.8,44.39 24.34,41.93 24.34,38.9 " android:strokeWidth="2" android:strokeAlpha="0.5" - android:strokeColor="?android:attr/colorAccent" + android:strokeColor="@color/biometric_dialog_accent" android:trimPathStart="0" android:trimPathEnd="1" android:trimPathOffset="0" /> <path android:name="_R_G_L_0_G_D_2_P_0" android:fillAlpha="0.5" - android:fillColor="?android:attr/colorAccent" + android:fillColor="@color/biometric_dialog_accent" android:fillType="nonZero" android:pathData=" M39 23.8 C39,25 39.9,25.9 41.1,25.9 C42.2,25.9 43.2,25 43.2,23.8 C43.2,22.6 42.3,21.7 41.1,21.7 C39.9,21.7 39,22.6 39,23.8c " /> <path android:name="_R_G_L_0_G_D_3_P_0" android:fillAlpha="0.5" - android:fillColor="?android:attr/colorAccent" + android:fillColor="@color/biometric_dialog_accent" android:fillType="nonZero" android:pathData=" M16.5 23.8 C16.5,25 17.4,25.9 18.6,25.9 C19.8,25.9 20.7,25 20.7,23.8 C20.7,22.6 19.8,21.7 18.6,21.7 C17.4,21.7 16.5,22.6 16.5,23.8c " /> <path android:name="_R_G_L_0_G_D_4_P_0" android:fillAlpha="0.5" - android:fillColor="?android:attr/colorAccent" + android:fillColor="@color/biometric_dialog_accent" android:fillType="nonZero" android:pathData=" M33.33 34.95 C33.33,34.95 28.13,34.95 28.13,34.95 C28.13,34.95 28.13,32.95 28.13,32.95 C28.13,32.95 31.33,32.95 31.33,32.95 C31.33,32.95 31.33,28.45 31.33,28.45 C31.33,28.45 33.33,28.45 33.33,28.45 C33.33,28.45 33.33,34.95 33.33,34.95c " /> </group> diff --git a/packages/SystemUI/res/drawable/face_dialog_wink_from_dark.xml b/packages/SystemUI/res/drawable/face_dialog_wink_from_dark.xml index adbe446abb9d..0cd542d51b51 100644 --- a/packages/SystemUI/res/drawable/face_dialog_wink_from_dark.xml +++ b/packages/SystemUI/res/drawable/face_dialog_wink_from_dark.xml @@ -13,7 +13,7 @@ android:pathData=" M30 6.2 C16.9,6.2 6.3,16.8 6.3,30 C6.3,43.2 16.9,53.8 30,53.8 C43.1,53.8 53.8,43.2 53.8,30 C53.8,16.8 43.1,6.2 30,6.2c " android:strokeWidth="2.5" android:strokeAlpha="1" - android:strokeColor="?android:attr/colorAccent" + android:strokeColor="@color/biometric_dialog_accent" android:trimPathStart="0" android:trimPathEnd="1" android:trimPathOffset="0" /> @@ -30,14 +30,14 @@ android:pathData=" M33.75 42.75 C32.75,43.77 31.37,44.39 29.83,44.39 C26.8,44.39 24.34,41.93 24.34,38.9 " android:strokeWidth="2" android:strokeAlpha="1" - android:strokeColor="?android:attr/colorAccent" + android:strokeColor="@color/biometric_dialog_accent" android:trimPathStart="0" android:trimPathEnd="1" android:trimPathOffset="0" /> <path android:name="_R_G_L_0_G_D_1_P_0" android:fillAlpha="1" - android:fillColor="?android:attr/colorAccent" + android:fillColor="@color/biometric_dialog_accent" android:fillType="nonZero" android:pathData=" M39 23.8 C39,25 39.9,25.9 41.1,25.9 C42.2,25.9 43.2,25 43.2,23.8 C43.2,22.6 42.3,21.7 41.1,21.7 C39.9,21.7 39,22.6 39,23.8c " /> <group @@ -49,14 +49,14 @@ <path android:name="_R_G_L_0_G_D_2_P_0" android:fillAlpha="1" - android:fillColor="?android:attr/colorAccent" + android:fillColor="@color/biometric_dialog_accent" android:fillType="nonZero" android:pathData=" M-2.1 0 C-2.1,1.2 -1.2,2.1 0,2.1 C1.2,2.1 2.1,1.2 2.1,0 C2.1,-1.2 1.2,-2.1 0,-2.1 C-1.2,-2.1 -2.1,-1.2 -2.1,0c " /> </group> <path android:name="_R_G_L_0_G_D_3_P_0" android:fillAlpha="1" - android:fillColor="?android:attr/colorAccent" + android:fillColor="@color/biometric_dialog_accent" android:fillType="nonZero" android:pathData=" M33.33 34.95 C33.33,34.95 28.13,34.95 28.13,34.95 C28.13,34.95 28.13,32.95 28.13,32.95 C28.13,32.95 31.33,32.95 31.33,32.95 C31.33,32.95 31.33,28.45 31.33,28.45 C31.33,28.45 33.33,28.45 33.33,28.45 C33.33,28.45 33.33,34.95 33.33,34.95c " /> </group> diff --git a/packages/SystemUI/res/drawable/fingerprint_dialog_error_to_fp.xml b/packages/SystemUI/res/drawable/fingerprint_dialog_error_to_fp.xml index 8f411f4c07fe..33263a9131a0 100644 --- a/packages/SystemUI/res/drawable/fingerprint_dialog_error_to_fp.xml +++ b/packages/SystemUI/res/drawable/fingerprint_dialog_error_to_fp.xml @@ -39,7 +39,7 @@ android:name="_R_G_L_1_G_D_0_P_0" android:pathData=" M79.63 67.24 C79.63,67.24 111.5,47.42 147.83,67.24 " android:strokeAlpha="1" - android:strokeColor="?android:attr/colorAccent" + android:strokeColor="@color/biometric_dialog_accent" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="5.5" @@ -50,7 +50,7 @@ android:name="_R_G_L_1_G_D_1_P_0" android:pathData=" M64.27 98.07 C64.27,98.07 80.13,73.02 113.98,73.02 C147.83,73.02 163.56,97.26 163.56,97.26 " android:strokeAlpha="1" - android:strokeColor="?android:attr/colorAccent" + android:strokeColor="@color/biometric_dialog_accent" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="5.5" @@ -61,7 +61,7 @@ android:name="_R_G_L_1_G_D_2_P_0" android:pathData=" M72.53 151.07 C72.53,151.07 62.46,122.89 76.16,105.55 C89.86,88.21 106.72,86.73 113.98,86.73 C121.08,86.73 153.51,90.62 158.7,125.87 C159.14,128.82 158.8,132.88 157.18,136.09 C154.88,140.63 150.62,143.63 145.85,143.97 C133.78,144.85 129.76,137.92 129.26,128.49 C128.88,121.19 122.49,115.35 113.15,115.35 C102.91,115.35 95.97,126.69 99.77,139.74 C103.57,152.78 111.33,163.85 130.32,169.13 " android:strokeAlpha="1" - android:strokeColor="?android:attr/colorAccent" + android:strokeColor="@color/biometric_dialog_accent" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="5.5" @@ -72,7 +72,7 @@ android:name="_R_G_L_1_G_D_3_P_0" android:pathData=" M100.6 167.84 C100.6,167.84 82.76,152.1 83.75,130.31 C84.75,108.53 102.58,100.7 113.73,100.7 C124.87,100.7 144.19,108.56 144.19,130.01 " android:strokeAlpha="1" - android:strokeColor="?android:attr/colorAccent" + android:strokeColor="@color/biometric_dialog_accent" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="5.5" @@ -83,7 +83,7 @@ android:name="_R_G_L_1_G_D_4_P_0" android:pathData=" M113.73 129.17 C113.73,129.17 113.15,161.33 149.15,156.58 " android:strokeAlpha="1" - android:strokeColor="?android:attr/colorAccent" + android:strokeColor="@color/biometric_dialog_accent" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="5.5" @@ -109,7 +109,7 @@ <path android:name="_R_G_L_0_G_D_0_P_0" android:fillAlpha="1" - android:fillColor="?android:attr/colorError" + android:fillColor="@color/biometric_dialog_error" android:fillType="nonZero" android:pathData=" M-1.2 -1.25 C-1.2,-1.25 1.2,-1.25 1.2,-1.25 C1.2,-1.25 1.2,1.25 1.2,1.25 C1.2,1.25 -1.2,1.25 -1.2,1.25 C-1.2,1.25 -1.2,-1.25 -1.2,-1.25c " /> </group> @@ -124,7 +124,7 @@ <path android:name="_R_G_L_0_G_D_1_P_0" android:fillAlpha="1" - android:fillColor="?android:attr/colorError" + android:fillColor="@color/biometric_dialog_error" android:fillType="nonZero" android:pathData=" M-1.2 -7.5 C-1.2,-7.5 1.2,-7.5 1.2,-7.5 C1.2,-7.5 1.2,7.5 1.2,7.5 C1.2,7.5 -1.2,7.5 -1.2,7.5 C-1.2,7.5 -1.2,-7.5 -1.2,-7.5c " /> </group> @@ -132,7 +132,7 @@ android:name="_R_G_L_0_G_D_2_P_0" android:pathData=" M30 6.2 C16.9,6.2 6.3,16.8 6.3,30 C6.3,43.2 16.9,53.8 30,53.8 C43.1,53.8 53.8,43.2 53.8,30 C53.8,16.8 43.1,6.2 30,6.2c " android:strokeAlpha="1" - android:strokeColor="?android:attr/colorError" + android:strokeColor="@color/biometric_dialog_error" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="2.5" diff --git a/packages/SystemUI/res/drawable/fingerprint_dialog_fp_to_error.xml b/packages/SystemUI/res/drawable/fingerprint_dialog_fp_to_error.xml index 89b822840b14..b899828cd85c 100644 --- a/packages/SystemUI/res/drawable/fingerprint_dialog_fp_to_error.xml +++ b/packages/SystemUI/res/drawable/fingerprint_dialog_fp_to_error.xml @@ -39,7 +39,7 @@ android:name="_R_G_L_1_G_D_0_P_0" android:pathData=" M79.63 67.24 C79.63,67.24 111.5,47.42 147.83,67.24 " android:strokeAlpha="1" - android:strokeColor="?android:attr/colorAccent" + android:strokeColor="@color/biometric_dialog_accent" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="5.5" @@ -50,7 +50,7 @@ android:name="_R_G_L_1_G_D_1_P_0" android:pathData=" M64.27 98.07 C64.27,98.07 80.13,73.02 113.98,73.02 C147.83,73.02 163.56,97.26 163.56,97.26 " android:strokeAlpha="1" - android:strokeColor="?android:attr/colorAccent" + android:strokeColor="@color/biometric_dialog_accent" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="5.5" @@ -61,7 +61,7 @@ android:name="_R_G_L_1_G_D_2_P_0" android:pathData=" M72.53 151.07 C72.53,151.07 62.46,122.89 76.16,105.55 C89.86,88.21 106.72,86.73 113.98,86.73 C121.08,86.73 153.51,90.62 158.7,125.87 C159.14,128.82 158.8,132.88 157.18,136.09 C154.88,140.63 150.62,143.63 145.85,143.97 C133.78,144.85 129.76,137.92 129.26,128.49 C128.88,121.19 122.49,115.35 113.15,115.35 C102.91,115.35 95.97,126.69 99.77,139.74 C103.57,152.78 111.33,163.85 130.32,169.13 " android:strokeAlpha="1" - android:strokeColor="?android:attr/colorAccent" + android:strokeColor="@color/biometric_dialog_accent" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="5.5" @@ -72,7 +72,7 @@ android:name="_R_G_L_1_G_D_3_P_0" android:pathData=" M100.6 167.84 C100.6,167.84 82.76,152.1 83.75,130.31 C84.75,108.53 102.58,100.7 113.73,100.7 C124.87,100.7 144.19,108.56 144.19,130.01 " android:strokeAlpha="1" - android:strokeColor="?android:attr/colorAccent" + android:strokeColor="@color/biometric_dialog_accent" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="5.5" @@ -83,7 +83,7 @@ android:name="_R_G_L_1_G_D_4_P_0" android:pathData=" M113.73 129.17 C113.73,129.17 113.15,161.33 149.15,156.58 " android:strokeAlpha="1" - android:strokeColor="?android:attr/colorAccent" + android:strokeColor="@color/biometric_dialog_accent" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="5.5" @@ -109,7 +109,7 @@ <path android:name="_R_G_L_0_G_D_0_P_0" android:fillAlpha="1" - android:fillColor="?android:attr/colorError" + android:fillColor="@color/biometric_dialog_error" android:fillType="nonZero" android:pathData=" M-1.2 -1.25 C-1.2,-1.25 1.2,-1.25 1.2,-1.25 C1.2,-1.25 1.2,1.25 1.2,1.25 C1.2,1.25 -1.2,1.25 -1.2,1.25 C-1.2,1.25 -1.2,-1.25 -1.2,-1.25c " /> </group> @@ -124,7 +124,7 @@ <path android:name="_R_G_L_0_G_D_1_P_0" android:fillAlpha="1" - android:fillColor="?android:attr/colorError" + android:fillColor="@color/biometric_dialog_error" android:fillType="nonZero" android:pathData=" M-1.2 -7.5 C-1.2,-7.5 1.2,-7.5 1.2,-7.5 C1.2,-7.5 1.2,7.5 1.2,7.5 C1.2,7.5 -1.2,7.5 -1.2,7.5 C-1.2,7.5 -1.2,-7.5 -1.2,-7.5c " /> </group> @@ -132,7 +132,7 @@ android:name="_R_G_L_0_G_D_2_P_0" android:pathData=" M30 6.2 C16.9,6.2 6.3,16.8 6.3,30 C6.3,43.2 16.9,53.8 30,53.8 C43.1,53.8 53.8,43.2 53.8,30 C53.8,16.8 43.1,6.2 30,6.2c " android:strokeAlpha="1" - android:strokeColor="?android:attr/colorError" + android:strokeColor="@color/biometric_dialog_error" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="2.5" diff --git a/packages/SystemUI/res/drawable/ic_arrow_back.xml b/packages/SystemUI/res/drawable/ic_arrow_back.xml new file mode 100644 index 000000000000..374f16b6f1b1 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_arrow_back.xml @@ -0,0 +1,25 @@ +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24" + android:tint="?android:attr/colorControlNormal"> + <path + android:fillColor="@android:color/white" + android:pathData="M20,11H7.83l5.59-5.59L12,4l-8,8l8,8l1.41-1.41L7.83,13H20V11z" /> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_cast.xml b/packages/SystemUI/res/drawable/ic_cast.xml index a2c2eb2806f6..fe1d99fa4962 100644 --- a/packages/SystemUI/res/drawable/ic_cast.xml +++ b/packages/SystemUI/res/drawable/ic_cast.xml @@ -14,8 +14,8 @@ Copyright (C) 2017 The Android Open Source Project limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" - android:height="24dp" + android:width="17dp" + android:height="17dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path diff --git a/packages/SystemUI/res/drawable/ic_cast_connected.xml b/packages/SystemUI/res/drawable/ic_cast_connected.xml index 995fd498f19e..aa4c152adfef 100644 --- a/packages/SystemUI/res/drawable/ic_cast_connected.xml +++ b/packages/SystemUI/res/drawable/ic_cast_connected.xml @@ -14,13 +14,13 @@ Copyright (C) 2017 The Android Open Source Project limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="17dp" - android:height="17dp" + android:width="24dp" + android:height="24dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path - android:fillColor="#FFFFFFFF" + android:fillColor="@android:color/white" android:pathData="M1,18v3h3C4,19.34 2.66,18 1,18zM1,14v2c2.76,0 5,2.24 5,5h2C8,17.13 4.87,14 1,14zM19,7H5v1.63c3.96,1.28 7.09,4.41 8.37,8.37H19V7zM1,10v2c4.97,0 9,4.03 9,9h2C12,14.92 7.07,10 1,10zM21,3H3C1.9,3 1,3.9 1,5v3h2V5h18v14h-7v2h7c1.1,0 2,-0.9 2,-2V5C23,3.9 22.1,3 21,3"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_cast_connected_fill.xml b/packages/SystemUI/res/drawable/ic_cast_connected_fill.xml new file mode 100644 index 000000000000..61d524daca3a --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_cast_connected_fill.xml @@ -0,0 +1,26 @@ +<!-- + ~ 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 + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="17dp" + android:height="17dp" + android:tint="?android:attr/colorError" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="@android:color/white" + android:pathData="M19,7H5v1.63c3.96,1.28 7.09,4.41 8.37,8.37H19V7z" /> +</vector>
\ No newline at end of file diff --git a/packages/SystemUI/res/drawable/stat_sys_cast.xml b/packages/SystemUI/res/drawable/stat_sys_cast.xml index de7ec9d628bb..6186ead6884f 100644 --- a/packages/SystemUI/res/drawable/stat_sys_cast.xml +++ b/packages/SystemUI/res/drawable/stat_sys_cast.xml @@ -13,7 +13,4 @@ Copyright (C) 2017 The Android Open Source Project See the License for the specific language governing permissions and limitations under the License. --> -<inset xmlns:android="http://schemas.android.com/apk/res/android" - android:insetLeft="2.5dp" - android:insetRight="2.5dp" - android:drawable="@drawable/ic_cast_connected" />
\ No newline at end of file +<com.android.systemui.statusbar.CastDrawable />
\ No newline at end of file diff --git a/packages/SystemUI/res/drawable/stat_sys_managed_profile_status.xml b/packages/SystemUI/res/drawable/stat_sys_managed_profile_status.xml index e38b4825c9fd..3761a40ddbaa 100644 --- a/packages/SystemUI/res/drawable/stat_sys_managed_profile_status.xml +++ b/packages/SystemUI/res/drawable/stat_sys_managed_profile_status.xml @@ -1,12 +1,27 @@ +<!-- + 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. +--> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="23dp" - android:height="18dp" - android:viewportWidth="23.0" - android:viewportHeight="18.0"> - <!-- - The asset contains a briefcase symbol of 14.551dp x 13.824dp in the center. - --> + android:width="17dp" + android:height="17dp" + android:viewportWidth="24" + android:viewportHeight="24"> <path - android:pathData="M17.32,5.06h-2.91V3.6c0,-0.81 -0.65,-1.46 -1.46,-1.46h-2.91c-0.81,0 -1.46,0.65 -1.46,1.46v1.46H5.68c-0.81,0 -1.45,0.65 -1.45,1.46l-0.01,8c0,0.81 0.65,1.46 1.46,1.46h11.64c0.81,0 1.46,-0.65 1.46,-1.46v-8C18.78,5.7 18.13,5.06 17.32,5.06zM11.5,11.6c-0.8,0 -1.46,-0.65 -1.46,-1.46c0,-0.8 0.65,-1.46 1.46,-1.46s1.46,0.65 1.46,1.46C12.96,10.95 12.3,11.6 11.5,11.6zM12.96,5.06h-2.91V3.6h2.91V5.06z" - android:fillColor="#FF000000"/> -</vector> + android:fillColor="@android:color/white" + android:pathData="M20,6h-4V4c0-1.1-0.9-2-2-2h-4C8.9,2,8,2.9,8,4v2H4C2.9,6,2,6.9,2,8l0,11c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8 C22,6.9,21.1,6,20,6z M10,4h4v2h-4V4z M20,19H4V8h16V19z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 12 12 C 12.8284271247 12 13.5 12.6715728753 13.5 13.5 C 13.5 14.3284271247 12.8284271247 15 12 15 C 11.1715728753 15 10.5 14.3284271247 10.5 13.5 C 10.5 12.6715728753 11.1715728753 12 12 12 Z" /> +</vector>
\ No newline at end of file diff --git a/packages/SystemUI/res/drawable/status_bar_notification_section_header_clear_btn.xml b/packages/SystemUI/res/drawable/status_bar_notification_section_header_clear_btn.xml new file mode 100644 index 000000000000..15f14d8af89b --- /dev/null +++ b/packages/SystemUI/res/drawable/status_bar_notification_section_header_clear_btn.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="40dp" + android:height="40dp" + android:viewportWidth="40" + android:viewportHeight="40"> + <path + android:fillColor="#5F6368" + android:pathData="M24.6667 16.2733L23.7267 15.3333L20 19.06L16.2734 15.3333L15.3334 16.2733L19.06 20L15.3334 23.7267L16.2734 24.6667L20 20.94L23.7267 24.6667L24.6667 23.7267L20.94 20L24.6667 16.2733Z"/> +</vector> diff --git a/packages/SystemUI/res/layout/biometric_dialog.xml b/packages/SystemUI/res/layout/biometric_dialog.xml index c452855cc9e9..1abb8735ddab 100644 --- a/packages/SystemUI/res/layout/biometric_dialog.xml +++ b/packages/SystemUI/res/layout/biometric_dialog.xml @@ -119,7 +119,7 @@ android:textSize="12sp" android:gravity="center_horizontal" android:accessibilityLiveRegion="polite" - android:textColor="?android:attr/textColorSecondary"/> + android:textColor="@color/biometric_dialog_gray"/> <LinearLayout android:layout_width="match_parent" diff --git a/packages/SystemUI/res/layout/status_bar_notification_section_header.xml b/packages/SystemUI/res/layout/status_bar_notification_section_header.xml new file mode 100644 index 000000000000..2b210064023b --- /dev/null +++ b/packages/SystemUI/res/layout/status_bar_notification_section_header.xml @@ -0,0 +1,66 @@ +<!-- + ~ 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 + --> + +<!-- Extends FrameLayout --> +<com.android.systemui.statusbar.notification.stack.SectionHeaderView + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="@dimen/notification_section_header_height" + android:focusable="true" + android:clickable="true" + > + <com.android.systemui.statusbar.notification.row.NotificationBackgroundView + android:id="@+id/backgroundNormal" + android:layout_width="match_parent" + android:layout_height="match_parent" /> + <com.android.systemui.statusbar.notification.row.NotificationBackgroundView + android:id="@+id/backgroundDimmed" + android:layout_width="match_parent" + android:layout_height="match_parent" /> + + <LinearLayout + android:id="@+id/content" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="center_vertical" + android:orientation="horizontal" + > + <TextView + android:id="@+id/header_label" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_marginLeft="@dimen/notification_section_header_padding_left" + android:text="@string/notification_section_header_gentle" + android:textSize="12sp" + android:textColor="@color/notification_section_header_label_color" + /> + <ImageView + android:id="@+id/btn_clear_all" + android:layout_width="@dimen/notification_section_header_height" + android:layout_height="@dimen/notification_section_header_height" + android:layout_marginRight="4dp" + android:src="@drawable/status_bar_notification_section_header_clear_btn" + android:contentDescription="@string/accessibility_notification_section_header_gentle_clear_all" + /> + </LinearLayout> + + <com.android.systemui.statusbar.notification.FakeShadowView + android:id="@+id/fake_shadow" + android:layout_width="match_parent" + android:layout_height="match_parent" /> + +</com.android.systemui.statusbar.notification.stack.SectionHeaderView> diff --git a/packages/SystemUI/res/values-night/colors.xml b/packages/SystemUI/res/values-night/colors.xml index 89d1a19737ee..a53855825105 100644 --- a/packages/SystemUI/res/values-night/colors.xml +++ b/packages/SystemUI/res/values-night/colors.xml @@ -49,6 +49,8 @@ <color name="notification_guts_header_text_color">@color/GM2_grey_200</color> <color name="notification_guts_button_color">@color/GM2_blue_200</color> + <color name="notification_section_header_label_color">@color/GM2_grey_200</color> + <!-- The color of the background in the top part of QSCustomizer --> <color name="qs_customize_background">@color/GM2_grey_900</color> @@ -66,4 +68,10 @@ <!-- The color of the text in the Global Actions menu --> <color name="global_actions_alert_text">@color/GM2_red_300</color> + + <!-- Biometric dialog colors --> + <color name="biometric_dialog_gray">#ff888888</color> + <color name="biometric_dialog_accent">#ff80cbc4</color> <!-- light teal --> + <color name="biometric_dialog_error">#fff28b82</color> <!-- red 300 --> + </resources>
\ No newline at end of file diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml index 88466ce286a8..14a120b36279 100644 --- a/packages/SystemUI/res/values/colors.xml +++ b/packages/SystemUI/res/values/colors.xml @@ -97,6 +97,8 @@ <color name="notification_alert_color">#FFF87B2B</color> <color name="notification_guts_button_color">@color/GM2_blue_700</color> + <color name="notification_section_header_label_color">@color/GM2_grey_900</color> + <color name="assist_orb_color">#ffffff</color> <color name="keyguard_user_switcher_background_gradient_color">#77000000</color> @@ -111,11 +113,9 @@ <color name="segmented_buttons_background">#14FFFFFF</color><!-- 8% white --> - <color name="dark_mode_icon_color_single_tone">#99000000</color> <color name="dark_mode_icon_color_dual_tone_background">#3d000000</color> <color name="dark_mode_icon_color_dual_tone_fill">#7a000000</color> - <color name="light_mode_icon_color_single_tone">#ffffff</color> <color name="light_mode_icon_color_dual_tone_background">#4dffffff</color> <color name="light_mode_icon_color_dual_tone_fill">#ffffff</color> @@ -157,7 +157,9 @@ <!-- Biometric dialog colors --> <color name="biometric_dialog_dim_color">#80000000</color> <!-- 50% black --> - <color name="biometric_face_icon_gray">#ff757575</color> + <color name="biometric_dialog_gray">#ff757575</color> + <color name="biometric_dialog_accent">#ff008577</color> <!-- dark teal --> + <color name="biometric_dialog_error">#ffd93025</color> <!-- red 600 --> <!-- Logout button --> <color name="logout_button_bg_color">#ccffffff</color> diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index 2871d06d8f8e..d774c551b547 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -331,7 +331,7 @@ <!-- Nav bar button default ordering/layout --> <string name="config_navBarLayout" translatable="false">left[.5W],back[1WC];home;recent[1WC],right[.5W]</string> <string name="config_navBarLayoutQuickstep" translatable="false">back[1.7WC];home;contextual[1.7WC]</string> - <string name="config_navBarLayoutHandle" translatable="false">start_contextual[.1WC];home_handle;ime_switcher[.1WC]</string> + <string name="config_navBarLayoutHandle" translatable="false">start_contextual[40AC];home_handle;ime_switcher[40AC]</string> <bool name="quick_settings_show_full_alarm">false</bool> diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 7b27cc479a85..0fa542c498bc 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -60,6 +60,9 @@ <!-- Height of notification icons in the status bar --> <dimen name="status_bar_icon_size">@*android:dimen/status_bar_icon_size</dimen> + <!-- Default horizontal drawable padding for status bar icons. --> + <dimen name="status_bar_horizontal_padding">2.5dp</dimen> + <!-- Height of the battery icon in the status bar. --> <dimen name="status_bar_battery_icon_height">13.0dp</dimen> @@ -692,6 +695,9 @@ <!-- The top padding of the clear all button --> <dimen name="clear_all_padding_top">12dp</dimen> + <dimen name="notification_section_header_height">40dp</dimen> + <dimen name="notification_section_header_padding_left">16dp</dimen> + <!-- Largest size an avatar might need to be drawn in the user picker, status bar, or quick settings header --> <dimen name="max_avatar_size">48dp</dimen> diff --git a/packages/SystemUI/res/values/ids.xml b/packages/SystemUI/res/values/ids.xml index f75f255324a6..e97055f08e32 100644 --- a/packages/SystemUI/res/values/ids.xml +++ b/packages/SystemUI/res/values/ids.xml @@ -103,6 +103,12 @@ <item type="id" name="action_snooze_assistant_suggestion_1"/> <item type="id" name="action_snooze"/> + <!-- Accessibility actions for bubbles. --> + <item type="id" name="action_move_top_left"/> + <item type="id" name="action_move_top_right"/> + <item type="id" name="action_move_bottom_left"/> + <item type="id" name="action_move_bottom_right"/> + <!-- For StatusIconContainer to tag its icon views --> <item type="id" name="status_bar_view_state_tag" /> diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index dc35653e5f7d..6ba72b6b85ad 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -1102,6 +1102,12 @@ <!-- The text for the manage notifications link. [CHAR LIMIT=40] --> <string name="manage_notifications_text">Manage</string> + <!-- Section title for notifications that do not vibrate or make noise. [CHAR LIMIT=40] --> + <string name="notification_section_header_gentle">Gentle notifications</string> + + <!-- Content description for accessibility: Tapping this button will dismiss all gentle notifications [CHAR LIMIT=NONE] --> + <string name="accessibility_notification_section_header_gentle_clear_all">Clear all gentle notifications</string> + <!-- The text to show in the notifications shade when dnd is suppressing notifications. [CHAR LIMIT=100] --> <string name="dnd_suppressing_shade_text">Notifications paused by Do Not Disturb</string> diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml index aa89dce4114a..083418e9a4bc 100644 --- a/packages/SystemUI/res/values/styles.xml +++ b/packages/SystemUI/res/values/styles.xml @@ -285,6 +285,7 @@ <item name="*android:lockPatternStyle">@style/LockPatternStyle</item> <item name="passwordStyle">@style/PasswordTheme</item> <item name="backgroundProtectedStyle">@style/BackgroundProtectedStyle</item> + <item name="android:homeAsUpIndicator">@drawable/ic_arrow_back</item> <!-- Needed for MediaRoute chooser dialog --> <item name="*android:isLightTheme">false</item> @@ -311,7 +312,7 @@ <item name="*android:errorColor">?android:attr/colorError</item> </style> - <style name="qs_theme" parent="@*android:style/Theme.DeviceDefault.QuickSettings"> + <style name="qs_theme" parent="@style/Theme.SystemUI"> <item name="lightIconTheme">@style/QSIconTheme</item> <item name="darkIconTheme">@style/QSIconTheme</item> <item name="android:colorError">@*android:color/error_color_material_dark</item> diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListener.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListener.java index f2a961d0b681..21b3a0082319 100644 --- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListener.java +++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListener.java @@ -76,6 +76,8 @@ public abstract class TaskStackChangeListener { public void onActivityRequestedOrientationChanged(int taskId, int requestedOrientation) { } public void onSizeCompatModeActivityChanged(int displayId, IBinder activityToken) { } + public void onBackPressedOnTaskRoot(RunningTaskInfo taskInfo) { } + /** * Checks that the current user matches the process. Since * {@link android.app.ITaskStackListener} is not multi-user aware, handlers of diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListeners.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListeners.java index d250acca32c5..06ae399a5e4e 100644 --- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListeners.java +++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListeners.java @@ -184,6 +184,11 @@ public class TaskStackChangeListeners extends TaskStackListener { } @Override + public void onBackPressedOnTaskRoot(RunningTaskInfo taskInfo) throws RemoteException { + mHandler.obtainMessage(H.ON_BACK_PRESSED_ON_TASK_ROOT, taskInfo).sendToTarget(); + } + + @Override public void onActivityRequestedOrientationChanged(int taskId, int requestedOrientation) throws RemoteException { mHandler.obtainMessage(H.ON_ACTIVITY_REQUESTED_ORIENTATION_CHANGE, taskId, @@ -214,6 +219,7 @@ public class TaskStackChangeListeners extends TaskStackListener { private static final int ON_ACTIVITY_REQUESTED_ORIENTATION_CHANGE = 15; private static final int ON_ACTIVITY_LAUNCH_ON_SECONDARY_DISPLAY_REROUTED = 16; private static final int ON_SIZE_COMPAT_MODE_ACTIVITY_CHANGED = 17; + private static final int ON_BACK_PRESSED_ON_TASK_ROOT = 18; public H(Looper looper) { @@ -343,6 +349,13 @@ public class TaskStackChangeListeners extends TaskStackListener { } break; } + case ON_BACK_PRESSED_ON_TASK_ROOT: { + for (int i = mTaskStackListeners.size() - 1; i >= 0; i--) { + mTaskStackListeners.get(i).onBackPressedOnTaskRoot( + (RunningTaskInfo) msg.obj); + } + break; + } } } } diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java index 8d62bca00f0a..c15c7872b6f8 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java @@ -3,22 +3,20 @@ package com.android.keyguard; import static com.android.systemui.util.InjectionInflationController.VIEW_CONTEXT; import android.animation.Animator; -import android.animation.AnimatorSet; import android.animation.ValueAnimator; import android.app.WallpaperManager; import android.content.Context; import android.graphics.Paint; import android.graphics.Paint.Style; import android.os.Build; -import android.transition.ChangeBounds; import android.transition.Transition; import android.transition.TransitionListenerAdapter; import android.transition.TransitionManager; +import android.transition.TransitionSet; import android.transition.TransitionValues; import android.util.AttributeSet; import android.util.Log; import android.util.MathUtils; -import android.util.TypedValue; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; @@ -52,6 +50,11 @@ public class KeyguardClockSwitch extends RelativeLayout { private static final String TAG = "KeyguardClockSwitch"; /** + * Animation fraction when text is transitioned to/from bold. + */ + private static final float TO_BOLD_TRANSITION_FRACTION = 0.7f; + + /** * Controller used to track StatusBar state to know when to show the big_clock_container. */ private final StatusBarStateController mStatusBarStateController; @@ -71,10 +74,8 @@ public class KeyguardClockSwitch extends RelativeLayout { */ private final Transition mTransition; - /** - * Listener for layout transitions. - */ - private final Transition.TransitionListener mTransitionListener; + private final ClockVisibilityTransition mClockTransition; + private final ClockVisibilityTransition mBoldClockTransition; /** * Optional/alternative clock injected via plugin. @@ -156,8 +157,19 @@ public class KeyguardClockSwitch extends RelativeLayout { mStatusBarState = mStatusBarStateController.getState(); mSysuiColorExtractor = colorExtractor; mClockManager = clockManager; - mTransition = new ClockBoundsTransition(); - mTransitionListener = new ClockBoundsTransitionListener(); + + mClockTransition = new ClockVisibilityTransition().setCutoff( + 1 - TO_BOLD_TRANSITION_FRACTION); + mClockTransition.addTarget(R.id.default_clock_view); + mBoldClockTransition = new ClockVisibilityTransition().setCutoff( + TO_BOLD_TRANSITION_FRACTION); + mBoldClockTransition.addTarget(R.id.default_clock_view_bold); + mTransition = new TransitionSet() + .setOrdering(TransitionSet.ORDERING_TOGETHER) + .addTransition(mClockTransition) + .addTransition(mBoldClockTransition) + .setDuration(KeyguardSliceView.DEFAULT_ANIM_DURATION / 2) + .setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN); } /** @@ -182,7 +194,6 @@ public class KeyguardClockSwitch extends RelativeLayout { mClockManager.addOnClockChangedListener(mClockChangedListener); mStatusBarStateController.addCallback(mStateListener); mSysuiColorExtractor.addOnColorsChangedListener(mColorsListener); - mTransition.addListener(mTransitionListener); updateColors(); } @@ -192,7 +203,6 @@ public class KeyguardClockSwitch extends RelativeLayout { mClockManager.removeOnClockChangedListener(mClockChangedListener); mStatusBarStateController.removeCallback(mStateListener); mSysuiColorExtractor.removeOnColorsChangedListener(mColorsListener); - mTransition.removeListener(mTransitionListener); setClockPlugin(null); } @@ -287,7 +297,6 @@ public class KeyguardClockSwitch extends RelativeLayout { public void setTextSize(int unit, float size) { mClockView.setTextSize(unit, size); - mClockViewBold.setTextSize(unit, size); } public void setFormat12Hour(CharSequence format) { @@ -390,23 +399,46 @@ public class KeyguardClockSwitch extends RelativeLayout { * Sets if the keyguard slice is showing a center-aligned header. We need a smaller clock in * these cases. */ - public void setKeyguardShowingHeader(boolean hasHeader) { + void setKeyguardShowingHeader(boolean hasHeader) { if (mShowingHeader == hasHeader || hasCustomClock()) { return; } mShowingHeader = hasHeader; + float smallFontSize = mContext.getResources().getDimensionPixelSize( + R.dimen.widget_small_font_size); + float bigFontSize = mContext.getResources().getDimensionPixelSize( + R.dimen.widget_big_font_size); + mClockTransition.setScale(smallFontSize / bigFontSize); + mBoldClockTransition.setScale(bigFontSize / smallFontSize); + TransitionManager.beginDelayedTransition((ViewGroup) mClockView.getParent(), mTransition); - int fontSize = mContext.getResources().getDimensionPixelSize(mShowingHeader - ? R.dimen.widget_small_font_size : R.dimen.widget_big_font_size); - int paddingBottom = mContext.getResources().getDimensionPixelSize(mShowingHeader + mClockView.setVisibility(hasHeader ? View.INVISIBLE : View.VISIBLE); + mClockViewBold.setVisibility(hasHeader ? View.VISIBLE : View.INVISIBLE); + int paddingBottom = mContext.getResources().getDimensionPixelSize(hasHeader ? R.dimen.widget_vertical_padding_clock : R.dimen.header_subtitle_padding); - mClockView.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize); - mClockViewBold.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize); mClockView.setPadding(mClockView.getPaddingLeft(), mClockView.getPaddingTop(), mClockView.getPaddingRight(), paddingBottom); mClockViewBold.setPadding(mClockViewBold.getPaddingLeft(), mClockViewBold.getPaddingTop(), mClockViewBold.getPaddingRight(), paddingBottom); + + if (hasHeader) { + // After the transition, make the default clock GONE so that it doesn't make the + // KeyguardStatusView appear taller in KeyguardClockPositionAlgorithm and elsewhere. + mTransition.addListener(new TransitionListenerAdapter() { + @Override + public void onTransitionEnd(Transition transition) { + super.onTransitionEnd(transition); + // Check that header is actually showing. I saw issues where this event was + // fired after the big clock transitioned back to visible, which causes the time + // to completely disappear. + if (mShowingHeader) { + mClockView.setVisibility(View.GONE); + } + transition.removeListener(this); + } + }); + } } @VisibleForTesting(otherwise = VisibleForTesting.NONE) @@ -434,91 +466,114 @@ public class KeyguardClockSwitch extends RelativeLayout { } /** - * Special layout transition that scales the clock view as its bounds change, to make it look - * like the text is shrinking. + * {@link Visibility} transformation that scales the view while it is disappearing/appearing and + * transitions suddenly at a cutoff fraction during the animation. */ - private class ClockBoundsTransition extends ChangeBounds { + private class ClockVisibilityTransition extends android.transition.Visibility { + + private static final String PROPNAME_VISIBILITY = "systemui:keyguard:visibility"; + + private float mCutoff; + private float mScale; /** - * Animation fraction when text is transitioned to/from bold. + * Constructs a transition that switches between visible/invisible at a cutoff and scales in + * size while appearing/disappearing. */ - private static final float TO_BOLD_TRANSITION_FRACTION = 0.7f; - - ClockBoundsTransition() { - setDuration(KeyguardSliceView.DEFAULT_ANIM_DURATION / 2); - setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN); + ClockVisibilityTransition() { + setCutoff(1f); + setScale(1f); } - @Override - public Animator createAnimator(ViewGroup sceneRoot, TransitionValues startValues, - TransitionValues endValues) { - Animator animator = super.createAnimator(sceneRoot, startValues, endValues); - if (animator == null || startValues.view != mClockView) { - return animator; - } + /** + * Sets the transition point between visible/invisible. + * + * @param cutoff The fraction in [0, 1] when the view switches between visible/invisible. + * @return This transition object + */ + public ClockVisibilityTransition setCutoff(float cutoff) { + mCutoff = cutoff; + return this; + } - ValueAnimator boundsAnimator = null; - if (animator instanceof AnimatorSet) { - Animator first = ((AnimatorSet) animator).getChildAnimations().get(0); - if (first instanceof ValueAnimator) { - boundsAnimator = (ValueAnimator) first; - } - } else if (animator instanceof ValueAnimator) { - boundsAnimator = (ValueAnimator) animator; - } + /** + * Sets the scale factor applied while appearing/disappearing. + * + * @param scale Scale factor applied while appearing/disappearing. When factor is less than + * one, the view will shrink while disappearing. When it is greater than one, + * the view will expand while disappearing. + * @return This transition object + */ + public ClockVisibilityTransition setScale(float scale) { + mScale = scale; + return this; + } - if (boundsAnimator != null) { - float bigFontSize = mContext.getResources() - .getDimensionPixelSize(R.dimen.widget_big_font_size); - float smallFontSize = mContext.getResources() - .getDimensionPixelSize(R.dimen.widget_small_font_size); - float startScale = mShowingHeader - ? bigFontSize / smallFontSize : smallFontSize / bigFontSize; - final int normalViewVisibility = mShowingHeader ? View.INVISIBLE : View.VISIBLE; - final int boldViewVisibility = mShowingHeader ? View.VISIBLE : View.INVISIBLE; - final float boldTransitionFraction = mShowingHeader ? TO_BOLD_TRANSITION_FRACTION : - 1f - TO_BOLD_TRANSITION_FRACTION; - boundsAnimator.addUpdateListener(animation -> { - final float fraction = animation.getAnimatedFraction(); - if (fraction > boldTransitionFraction) { - mClockView.setVisibility(normalViewVisibility); - mClockViewBold.setVisibility(boldViewVisibility); - } - float scale = MathUtils.lerp(startScale, 1f /* stop */, - animation.getAnimatedFraction()); - mClockView.setPivotX(mClockView.getWidth() / 2f); - mClockViewBold.setPivotX(mClockViewBold.getWidth() / 2f); - mClockView.setPivotY(0); - mClockViewBold.setPivotY(0); - mClockView.setScaleX(scale); - mClockViewBold.setScaleX(scale); - mClockView.setScaleY(scale); - mClockViewBold.setScaleY(scale); - }); - } + @Override + public void captureStartValues(TransitionValues transitionValues) { + super.captureStartValues(transitionValues); + captureVisibility(transitionValues); + } - return animator; + @Override + public void captureEndValues(TransitionValues transitionValues) { + super.captureStartValues(transitionValues); + captureVisibility(transitionValues); } - } - /** - * Transition listener for layout transition that scales the clock view. - */ - private class ClockBoundsTransitionListener extends TransitionListenerAdapter { + private void captureVisibility(TransitionValues transitionValues) { + transitionValues.values.put(PROPNAME_VISIBILITY, + transitionValues.view.getVisibility()); + } @Override - public void onTransitionEnd(Transition transition) { - mClockView.setVisibility(mShowingHeader ? View.INVISIBLE : View.VISIBLE); - mClockViewBold.setVisibility(mShowingHeader ? View.VISIBLE : View.INVISIBLE); - mClockView.setScaleX(1f); - mClockViewBold.setScaleX(1f); - mClockView.setScaleY(1f); - mClockViewBold.setScaleY(1f); + public Animator onAppear(ViewGroup sceneRoot, View view, TransitionValues startValues, + TransitionValues endValues) { + final float cutoff = mCutoff; + final int startVisibility = View.INVISIBLE; + final int endVisibility = (int) endValues.values.get(PROPNAME_VISIBILITY); + final float startScale = mScale; + final float endScale = 1f; + return createAnimator(view, cutoff, startVisibility, endVisibility, startScale, + endScale); } @Override - public void onTransitionCancel(Transition transition) { - onTransitionEnd(transition); + public Animator onDisappear(ViewGroup sceneRoot, View view, TransitionValues startValues, + TransitionValues endValues) { + final float cutoff = 1f - mCutoff; + final int startVisibility = View.VISIBLE; + final int endVisibility = (int) endValues.values.get(PROPNAME_VISIBILITY); + final float startScale = 1f; + final float endScale = mScale; + return createAnimator(view, cutoff, startVisibility, endVisibility, startScale, + endScale); + } + + private Animator createAnimator(View view, float cutoff, int startVisibility, + int endVisibility, float startScale, float endScale) { + view.setPivotY(view.getHeight() - view.getPaddingBottom()); + view.setVisibility(startVisibility); + ValueAnimator animator = ValueAnimator.ofFloat(0f, 1f); + animator.addUpdateListener(animation -> { + final float fraction = animation.getAnimatedFraction(); + if (fraction > cutoff) { + view.setVisibility(endVisibility); + } + final float scale = MathUtils.lerp(startScale, endScale, fraction); + view.setScaleX(scale); + view.setScaleY(scale); + }); + addListener(new TransitionListenerAdapter() { + @Override + public void onTransitionEnd(Transition transition) { + view.setVisibility(endVisibility); + view.setScaleX(1f); + view.setScaleY(1f); + transition.removeListener(this); + } + }); + return animator; } } } diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardDisplayManager.java b/packages/SystemUI/src/com/android/keyguard/KeyguardDisplayManager.java index ae8bc528ab6a..050655c79ffc 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardDisplayManager.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardDisplayManager.java @@ -19,6 +19,7 @@ import static android.view.Display.DEFAULT_DISPLAY; import android.app.Presentation; import android.content.Context; +import android.graphics.Color; import android.graphics.Point; import android.hardware.display.DisplayManager; import android.media.MediaRouter; @@ -32,9 +33,11 @@ import android.view.LayoutInflater; import android.view.View; import android.view.WindowManager; +import com.android.systemui.Dependency; +import com.android.systemui.statusbar.NavigationBarController; +import com.android.systemui.statusbar.phone.NavigationBarView; import com.android.systemui.util.InjectionInflationController; -// TODO(multi-display): Support multiple external displays public class KeyguardDisplayManager { protected static final String TAG = "KeyguardDisplayManager"; private static boolean DEBUG = KeyguardConstants.DEBUG; @@ -49,6 +52,9 @@ public class KeyguardDisplayManager { private final SparseArray<Presentation> mPresentations = new SparseArray<>(); + private final NavigationBarController mNavBarController = + Dependency.get(NavigationBarController.class); + private final DisplayManager.DisplayListener mDisplayListener = new DisplayManager.DisplayListener() { @@ -56,6 +62,7 @@ public class KeyguardDisplayManager { public void onDisplayAdded(int displayId) { final Display display = mDisplayService.getDisplay(displayId); if (mShowing) { + updateNavigationBarVisibility(displayId, false /* navBarVisible */); showPresentation(display); } } @@ -192,11 +199,15 @@ public class KeyguardDisplayManager { if (showing) { final Display[] displays = mDisplayService.getDisplays(); for (Display display : displays) { + int displayId = display.getDisplayId(); + updateNavigationBarVisibility(displayId, false /* navBarVisible */); changed |= showPresentation(display); } } else { changed = mPresentations.size() > 0; for (int i = mPresentations.size() - 1; i >= 0; i--) { + int displayId = mPresentations.keyAt(i); + updateNavigationBarVisibility(displayId, true /* navBarVisible */); mPresentations.valueAt(i).dismiss(); } mPresentations.clear(); @@ -204,6 +215,25 @@ public class KeyguardDisplayManager { return changed; } + // TODO(b/127878649): this logic is from + // {@link StatusBarKeyguardViewManager#updateNavigationBarVisibility}. Try to revisit a long + // term solution in R. + private void updateNavigationBarVisibility(int displayId, boolean navBarVisible) { + // Leave this task to {@link StatusBarKeyguardViewManager} + if (displayId == DEFAULT_DISPLAY) return; + + NavigationBarView navBarView = mNavBarController.getNavigationBarView(displayId); + // We may not have nav bar on a display. + if (navBarView == null) return; + + if (navBarVisible) { + navBarView.getRootView().setVisibility(View.VISIBLE); + } else { + navBarView.getRootView().setVisibility(View.GONE); + } + + } + private final static class KeyguardPresentation extends Presentation { private static final int VIDEO_SAFE_REGION = 80; // Percentage of display width & height private static final int MOVE_CLOCK_TIMEOUT = 10000; // 10s @@ -251,6 +281,15 @@ public class KeyguardDisplayManager { LayoutInflater inflater = mInjectableInflater.injectable( LayoutInflater.from(getContext())); setContentView(inflater.inflate(R.layout.keyguard_presentation, null)); + + // Logic to make the lock screen fullscreen + getWindow().getDecorView().setSystemUiVisibility( + View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN + | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_LAYOUT_STABLE); + getWindow().setNavigationBarContrastEnforced(false); + getWindow().setNavigationBarColor(Color.TRANSPARENT); + mClock = findViewById(R.id.clock); // Avoid screen burn in diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java index 12f40f385cb2..61a0f72315ea 100644 --- a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java +++ b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java @@ -205,7 +205,7 @@ public class SystemUIApplication extends Application implements SysUiServiceProv final Handler mainHandler = new Handler(Looper.getMainLooper()); Dependency.get(PluginManager.class).addPluginListener( new PluginListener<OverlayPlugin>() { - private ArraySet<OverlayPlugin> mOverlays; + private ArraySet<OverlayPlugin> mOverlays = new ArraySet<>(); @Override public void onPluginConnected(OverlayPlugin plugin, Context pluginContext) { @@ -215,18 +215,7 @@ public class SystemUIApplication extends Application implements SysUiServiceProv StatusBar statusBar = getComponent(StatusBar.class); if (statusBar != null) { plugin.setup(statusBar.getStatusBarWindow(), - statusBar.getNavigationBarView()); - } - // Lazy init. - if (mOverlays == null) mOverlays = new ArraySet<>(); - if (plugin.holdStatusBarOpen()) { - mOverlays.add(plugin); - Dependency.get(StatusBarWindowController.class) - .setStateListener(b -> mOverlays.forEach( - o -> o.setCollapseDesired(b))); - Dependency.get(StatusBarWindowController.class) - .setForcePluginOpen(mOverlays.size() != 0); - + statusBar.getNavigationBarView(), new Callback(plugin)); } } }); @@ -243,6 +232,33 @@ public class SystemUIApplication extends Application implements SysUiServiceProv } }); } + + class Callback implements OverlayPlugin.Callback { + private final OverlayPlugin mPlugin; + + Callback(OverlayPlugin plugin) { + mPlugin = plugin; + } + + @Override + public void onHoldStatusBarOpenChange() { + if (mPlugin.holdStatusBarOpen()) { + mOverlays.add(mPlugin); + } else { + mOverlays.remove(mPlugin); + } + mainHandler.post(new Runnable() { + @Override + public void run() { + Dependency.get(StatusBarWindowController.class) + .setStateListener(b -> mOverlays.forEach( + o -> o.setCollapseDesired(b))); + Dependency.get(StatusBarWindowController.class) + .setForcePluginOpen(mOverlays.size() != 0); + } + }); + } + } }, OverlayPlugin.class, true /* Allow multiple plugins */); mServicesStarted = true; diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/BiometricDialogView.java b/packages/SystemUI/src/com/android/systemui/biometrics/BiometricDialogView.java index f17fcbab31c4..f25b580b13a3 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/BiometricDialogView.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/BiometricDialogView.java @@ -18,7 +18,6 @@ package com.android.systemui.biometrics; import android.app.admin.DevicePolicyManager; import android.content.Context; -import android.content.res.TypedArray; import android.graphics.PixelFormat; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; @@ -93,6 +92,7 @@ public abstract class BiometricDialogView extends LinearLayout { protected final int mTextColor; private Bundle mBundle; + private Bundle mRestoredState; private int mState; private boolean mAnimatingAway; @@ -151,12 +151,8 @@ public abstract class BiometricDialogView extends LinearLayout { mDevicePolicyManager = mContext.getSystemService(DevicePolicyManager.class); mAnimationTranslationOffset = getResources() .getDimension(R.dimen.biometric_dialog_animation_translation_offset); - - TypedArray array = getContext().obtainStyledAttributes( - new int[]{android.R.attr.colorError, android.R.attr.textColorSecondary}); - mErrorColor = array.getColor(0, 0); - mTextColor = array.getColor(1, 0); - array.recycle(); + mErrorColor = getResources().getColor(R.color.biometric_dialog_error); + mTextColor = getResources().getColor(R.color.biometric_dialog_gray); DisplayMetrics metrics = new DisplayMetrics(); mWindowManager.getDefaultDisplay().getMetrics(metrics); @@ -225,7 +221,6 @@ public abstract class BiometricDialogView extends LinearLayout { mTryAgainButton.setOnClickListener((View v) -> { updateState(STATE_AUTHENTICATING); showTryAgainButton(false /* show */); - handleClearMessage(); mCallback.onTryAgainPressed(); }); @@ -292,7 +287,7 @@ public abstract class BiometricDialogView extends LinearLayout { mNegativeButton.setText(mBundle.getCharSequence(BiometricPrompt.KEY_NEGATIVE_TEXT)); - if (requiresConfirmation()) { + if (requiresConfirmation() && mRestoredState == null) { mPositiveButton.setVisibility(View.VISIBLE); mPositiveButton.setEnabled(false); } @@ -449,6 +444,7 @@ public abstract class BiometricDialogView extends LinearLayout { if (newState == STATE_PENDING_CONFIRMATION) { mHandler.removeMessages(MSG_CLEAR_MESSAGE); mErrorText.setVisibility(View.INVISIBLE); + mPositiveButton.setVisibility(View.VISIBLE); mPositiveButton.setEnabled(true); } else if (newState == STATE_AUTHENTICATED) { mPositiveButton.setVisibility(View.GONE); @@ -471,6 +467,7 @@ public abstract class BiometricDialogView extends LinearLayout { } public void restoreState(Bundle bundle) { + mRestoredState = bundle; mTryAgainButton.setVisibility(bundle.getInt(KEY_TRY_AGAIN_VISIBILITY)); mPositiveButton.setVisibility(bundle.getInt(KEY_CONFIRM_VISIBILITY)); } diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/FaceDialogView.java b/packages/SystemUI/src/com/android/systemui/biometrics/FaceDialogView.java index 9a0b1906dd4a..9679d26d4bfe 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/FaceDialogView.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/FaceDialogView.java @@ -360,8 +360,6 @@ public class FaceDialogView extends BiometricDialogView { if (show) { mPositiveButton.setVisibility(View.GONE); - } else if (!show && requiresConfirmation()) { - mPositiveButton.setVisibility(View.VISIBLE); } } @@ -402,6 +400,12 @@ public class FaceDialogView extends BiometricDialogView { } else if (oldState == STATE_ERROR && newState == STATE_AUTHENTICATING) { mHandler.removeCallbacks(mErrorToIdleAnimationRunnable); mIconController.startPulsing(); + } else if (oldState == STATE_ERROR && newState == STATE_PENDING_CONFIRMATION) { + mHandler.removeCallbacks(mErrorToIdleAnimationRunnable); + mIconController.animateOnce(R.drawable.face_dialog_wink_from_dark); + } else if (oldState == STATE_ERROR && newState == STATE_AUTHENTICATED) { + mHandler.removeCallbacks(mErrorToIdleAnimationRunnable); + mIconController.animateOnce(R.drawable.face_dialog_dark_to_checkmark); } else if (oldState == STATE_AUTHENTICATING && newState == STATE_ERROR) { mIconController.animateOnce(R.drawable.face_dialog_dark_to_error); mHandler.postDelayed(mErrorToIdleAnimationRunnable, BiometricPrompt.HIDE_DIALOG_DELAY); diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/Bubble.java b/packages/SystemUI/src/com/android/systemui/bubbles/Bubble.java index 7094d28c29f5..ac4a93ba7fb0 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/Bubble.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/Bubble.java @@ -46,7 +46,7 @@ class Bubble { private long mLastUpdated; private long mLastAccessed; - private static String groupId(NotificationEntry entry) { + public static String groupId(NotificationEntry entry) { UserHandle user = entry.notification.getUser(); return user.getIdentifier() + "|" + entry.notification.getPackageName(); } @@ -120,11 +120,28 @@ class Bubble { } } + /** + * @return the newer of {@link #getLastUpdateTime()} and {@link #getLastAccessTime()} + */ public long getLastActivity() { return Math.max(mLastUpdated, mLastAccessed); } /** + * @return the timestamp in milliseconds of the most recent notification entry for this bubble + */ + public long getLastUpdateTime() { + return mLastUpdated; + } + + /** + * @return the timestamp in milliseconds when this bubble was last displayed in expanded state + */ + public long getLastAccessTime() { + return mLastAccessed; + } + + /** * Should be invoked whenever a Bubble is accessed (selected while expanded). */ void markAsAccessedAt(long lastAccessedMillis) { diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java index cff03c9b4b9b..2d0944ad246f 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java @@ -29,6 +29,9 @@ import static android.view.ViewGroup.LayoutParams.MATCH_PARENT; import static com.android.systemui.statusbar.StatusBarState.SHADE; import static com.android.systemui.statusbar.notification.NotificationEntryManager.UNDEFINED_DISMISS_REASON; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.LOCAL_VARIABLE; +import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.RetentionPolicy.SOURCE; import android.annotation.Nullable; @@ -73,6 +76,7 @@ import com.android.systemui.statusbar.phone.StatusBarWindowController; import com.android.systemui.statusbar.policy.ConfigurationController; import java.lang.annotation.Retention; +import java.lang.annotation.Target; import java.util.List; import javax.inject.Inject; @@ -88,11 +92,12 @@ import javax.inject.Singleton; public class BubbleController implements ConfigurationController.ConfigurationListener { private static final String TAG = "BubbleController"; - private static final boolean DEBUG = true; + private static final boolean DEBUG = false; @Retention(SOURCE) @IntDef({DISMISS_USER_GESTURE, DISMISS_AGED, DISMISS_TASK_FINISHED, DISMISS_BLOCKED, DISMISS_NOTIF_CANCEL, DISMISS_ACCESSIBILITY_ACTION, DISMISS_NO_LONGER_BUBBLE}) + @Target({FIELD, LOCAL_VARIABLE, PARAMETER}) @interface DismissReason {} static final int DISMISS_USER_GESTURE = 1; @@ -510,6 +515,9 @@ public class BubbleController implements ConfigurationController.ConfigurationLi @Override public void onOrderChanged(List<Bubble> bubbles) { + if (mStackView != null) { + mStackView.updateBubbleOrder(bubbles); + } } @Override @@ -527,13 +535,6 @@ public class BubbleController implements ConfigurationController.ConfigurationLi } @Override - public void showFlyoutText(Bubble bubble, String text) { - if (mStackView != null) { - mStackView.animateInFlyoutForBubble(bubble); - } - } - - @Override public void apply() { mNotificationEntryManager.updateNotifications(); updateVisibility(); @@ -719,6 +720,13 @@ public class BubbleController implements ConfigurationController.ConfigurationLi mBubbleData.setExpanded(false); } } + + @Override + public void onBackPressedOnTaskRoot(RunningTaskInfo taskInfo) { + if (mStackView != null && taskInfo.displayId == getExpandedDisplayId(mContext)) { + mBubbleData.setExpanded(false); + } + } } private static boolean shouldAutoBubbleMessages(Context context) { diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java index f15ba6ee673b..9156e06fe54e 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java @@ -23,6 +23,7 @@ import android.app.Notification; import android.app.PendingIntent; import android.content.Context; import android.util.Log; +import android.util.Pair; import androidx.annotation.Nullable; @@ -53,10 +54,10 @@ public class BubbleData { private static final int MAX_BUBBLES = 5; - private static final Comparator<Bubble> BUBBLES_BY_LAST_ACTIVITY_DESCENDING = - Comparator.comparing(Bubble::getLastActivity).reversed(); + private static final Comparator<Bubble> BUBBLES_BY_SORT_KEY_DESCENDING = + Comparator.comparing(BubbleData::sortKey).reversed(); - private static final Comparator<Map.Entry<String, Long>> GROUPS_BY_LAST_ACTIVITY_DESCENDING = + private static final Comparator<Map.Entry<String, Long>> GROUPS_BY_MAX_SORT_KEY_DESCENDING = Comparator.<Map.Entry<String, Long>, Long>comparing(Map.Entry::getValue).reversed(); /** @@ -105,9 +106,6 @@ public class BubbleData { */ void onExpandedChanged(boolean expanded); - /** Flyout text should animate in, showing the given text. */ - void showFlyoutText(Bubble bubble, String text); - /** Commit any pending operations (since last call of apply()) */ void apply(); } @@ -121,15 +119,19 @@ public class BubbleData { private Bubble mSelectedBubble; private boolean mExpanded; - // TODO: ensure this is invalidated at the appropriate time - private int mSelectedBubbleExpandedPosition = -1; + // State tracked during an operation -- keeps track of what listener events to dispatch. + private boolean mExpandedChanged; + private boolean mOrderChanged; + private boolean mSelectionChanged; + private Bubble mUpdatedBubble; + private Bubble mAddedBubble; + private final List<Pair<Bubble, Integer>> mRemovedBubbles = new ArrayList<>(); private TimeSource mTimeSource = System::currentTimeMillis; @Nullable private Listener mListener; - @VisibleForTesting @Inject public BubbleData(Context context) { mContext = context; @@ -154,18 +156,19 @@ public class BubbleData { } public void setExpanded(boolean expanded) { - if (setExpandedInternal(expanded)) { - dispatchApply(); + if (DEBUG) { + Log.d(TAG, "setExpanded: " + expanded); } + setExpandedInternal(expanded); + dispatchPendingChanges(); } public void setSelectedBubble(Bubble bubble) { if (DEBUG) { Log.d(TAG, "setSelectedBubble: " + bubble); } - if (setSelectedBubbleInternal(bubble)) { - dispatchApply(); - } + setSelectedBubbleInternal(bubble); + dispatchPendingChanges(); } public void notificationEntryUpdated(NotificationEntry entry) { @@ -177,12 +180,12 @@ public class BubbleData { // Create a new bubble bubble = new Bubble(entry, this::onBubbleBlocked); doAdd(bubble); - dispatchOnBubbleAdded(bubble); + trim(); } else { // Updates an existing bubble bubble.setEntry(entry); doUpdate(bubble); - dispatchOnBubbleUpdated(bubble); + mUpdatedBubble = bubble; } if (shouldAutoExpand(entry)) { setSelectedBubbleInternal(bubble); @@ -192,7 +195,15 @@ public class BubbleData { } else if (mSelectedBubble == null) { setSelectedBubbleInternal(bubble); } - dispatchApply(); + dispatchPendingChanges(); + } + + public void notificationEntryRemoved(NotificationEntry entry, @DismissReason int reason) { + if (DEBUG) { + Log.d(TAG, "notificationEntryRemoved: entry=" + entry + " reason=" + reason); + } + doRemove(entry.key, reason); + dispatchPendingChanges(); } private void doAdd(Bubble bubble) { @@ -202,14 +213,21 @@ public class BubbleData { int minInsertPoint = 0; boolean newGroup = !hasBubbleWithGroupId(bubble.getGroupId()); if (isExpanded()) { - // first bubble of a group goes to the end, otherwise it goes within the existing group - minInsertPoint = - newGroup ? mBubbles.size() : findFirstIndexForGroup(bubble.getGroupId()); + // first bubble of a group goes to the beginning, otherwise within the existing group + minInsertPoint = newGroup ? 0 : findFirstIndexForGroup(bubble.getGroupId()); + } + if (insertBubble(minInsertPoint, bubble) < mBubbles.size() - 1) { + mOrderChanged = true; } - insertBubble(minInsertPoint, bubble); + mAddedBubble = bubble; if (!isExpanded()) { - packGroup(findFirstIndexForGroup(bubble.getGroupId())); + mOrderChanged |= packGroup(findFirstIndexForGroup(bubble.getGroupId())); + // Top bubble becomes selected. + setSelectedBubbleInternal(mBubbles.get(0)); } + } + + private void trim() { if (mBubbles.size() > MAX_BUBBLES) { mBubbles.stream() // sort oldest first (ascending lastActivity) @@ -217,10 +235,7 @@ public class BubbleData { // skip the selected bubble .filter((b) -> !b.equals(mSelectedBubble)) .findFirst() - .ifPresent((b) -> { - doRemove(b.getKey(), BubbleController.DISMISS_AGED); - dispatchApply(); - }); + .ifPresent((b) -> doRemove(b.getKey(), BubbleController.DISMISS_AGED)); } } @@ -229,43 +244,48 @@ public class BubbleData { Log.d(TAG, "doUpdate: " + bubble); } if (!isExpanded()) { - // while collapsed, update causes re-sort + // while collapsed, update causes re-pack + int prevPos = mBubbles.indexOf(bubble); mBubbles.remove(bubble); - insertBubble(0, bubble); - packGroup(findFirstIndexForGroup(bubble.getGroupId())); - } - } - - public void notificationEntryRemoved(NotificationEntry entry, @DismissReason int reason) { - if (DEBUG) { - Log.d(TAG, "notificationEntryRemoved: entry=" + entry + " reason=" + reason); + int newPos = insertBubble(0, bubble); + if (prevPos != newPos) { + packGroup(newPos); + mOrderChanged = true; + } + setSelectedBubbleInternal(mBubbles.get(0)); } - doRemove(entry.key, reason); - dispatchApply(); } private void doRemove(String key, @DismissReason int reason) { int indexToRemove = indexForKey(key); - if (indexToRemove >= 0) { - Bubble bubbleToRemove = mBubbles.get(indexToRemove); - if (mBubbles.size() == 1) { - // Going to become empty, handle specially. - setExpandedInternal(false); - setSelectedBubbleInternal(null); - } - mBubbles.remove(indexToRemove); - dispatchOnBubbleRemoved(bubbleToRemove, reason); - - // Note: If mBubbles.isEmpty(), then mSelectedBubble is now null. - if (Objects.equals(mSelectedBubble, bubbleToRemove)) { - // Move selection to the new bubble at the same position. - int newIndex = Math.min(indexToRemove, mBubbles.size() - 1); - Bubble newSelected = mBubbles.get(newIndex); - setSelectedBubbleInternal(newSelected); - } - bubbleToRemove.setDismissed(); - maybeSendDeleteIntent(reason, bubbleToRemove.entry); + if (indexToRemove == -1) { + return; + } + Bubble bubbleToRemove = mBubbles.get(indexToRemove); + if (mBubbles.size() == 1) { + // Going to become empty, handle specially. + setExpandedInternal(false); + setSelectedBubbleInternal(null); + } + if (indexToRemove < mBubbles.size() - 1) { + // Removing anything but the last bubble means positions will change. + mOrderChanged = true; + } + mBubbles.remove(indexToRemove); + mRemovedBubbles.add(Pair.create(bubbleToRemove, reason)); + if (!isExpanded()) { + mOrderChanged |= repackAll(); + } + + // Note: If mBubbles.isEmpty(), then mSelectedBubble is now null. + if (Objects.equals(mSelectedBubble, bubbleToRemove)) { + // Move selection to the new bubble at the same position. + int newIndex = Math.min(indexToRemove, mBubbles.size() - 1); + Bubble newSelected = mBubbles.get(newIndex); + setSelectedBubbleInternal(newSelected); } + bubbleToRemove.setDismissed(); + maybeSendDeleteIntent(reason, bubbleToRemove.entry); } public void dismissAll(@DismissReason int reason) { @@ -281,56 +301,71 @@ public class BubbleData { Bubble bubble = mBubbles.remove(0); bubble.setDismissed(); maybeSendDeleteIntent(reason, bubble.entry); - dispatchOnBubbleRemoved(bubble, reason); + mRemovedBubbles.add(Pair.create(bubble, reason)); } - dispatchApply(); + dispatchPendingChanges(); } - private void dispatchApply() { - if (mListener != null) { - mListener.apply(); + + private void dispatchPendingChanges() { + if (mListener == null) { + mExpandedChanged = false; + mAddedBubble = null; + mSelectionChanged = false; + mRemovedBubbles.clear(); + mUpdatedBubble = null; + mOrderChanged = false; + return; } - } + boolean anythingChanged = false; - private void dispatchOnBubbleAdded(Bubble bubble) { - if (mListener != null) { - mListener.onBubbleAdded(bubble); + if (mAddedBubble != null) { + mListener.onBubbleAdded(mAddedBubble); + mAddedBubble = null; + anythingChanged = true; } - } - private void dispatchOnBubbleRemoved(Bubble bubble, @DismissReason int reason) { - if (mListener != null) { - mListener.onBubbleRemoved(bubble, reason); + // Compat workaround: Always collapse first. + if (mExpandedChanged && !mExpanded) { + mListener.onExpandedChanged(mExpanded); + mExpandedChanged = false; + anythingChanged = true; } - } - private void dispatchOnExpandedChanged(boolean expanded) { - if (mListener != null) { - mListener.onExpandedChanged(expanded); + if (mSelectionChanged) { + mListener.onSelectionChanged(mSelectedBubble); + mSelectionChanged = false; + anythingChanged = true; } - } - private void dispatchOnSelectionChanged(@Nullable Bubble bubble) { - if (mListener != null) { - mListener.onSelectionChanged(bubble); + if (!mRemovedBubbles.isEmpty()) { + for (Pair<Bubble, Integer> removed : mRemovedBubbles) { + mListener.onBubbleRemoved(removed.first, removed.second); + } + mRemovedBubbles.clear(); + anythingChanged = true; } - } - private void dispatchOnBubbleUpdated(Bubble bubble) { - if (mListener != null) { - mListener.onBubbleUpdated(bubble); + if (mUpdatedBubble != null) { + mListener.onBubbleUpdated(mUpdatedBubble); + mUpdatedBubble = null; + anythingChanged = true; } - } - private void dispatchOnOrderChanged(List<Bubble> bubbles) { - if (mListener != null) { - mListener.onOrderChanged(bubbles); + if (mOrderChanged) { + mListener.onOrderChanged(mBubbles); + mOrderChanged = false; + anythingChanged = true; } - } - private void dispatchShowFlyoutText(Bubble bubble, String text) { - if (mListener != null) { - mListener.showFlyoutText(bubble, text); + if (mExpandedChanged) { + mListener.onExpandedChanged(mExpanded); + mExpandedChanged = false; + anythingChanged = true; + } + + if (anythingChanged) { + mListener.apply(); } } @@ -339,29 +374,25 @@ public class BubbleData { * the value changes. * * @param bubble the new selected bubble - * @return true if the state changed as a result */ - private boolean setSelectedBubbleInternal(@Nullable Bubble bubble) { + private void setSelectedBubbleInternal(@Nullable Bubble bubble) { if (DEBUG) { Log.d(TAG, "setSelectedBubbleInternal: " + bubble); } if (Objects.equals(bubble, mSelectedBubble)) { - return false; + return; } if (bubble != null && !mBubbles.contains(bubble)) { Log.e(TAG, "Cannot select bubble which doesn't exist!" + " (" + bubble + ") bubbles=" + mBubbles); - return false; + return; } if (mExpanded && bubble != null) { bubble.markAsAccessedAt(mTimeSource.currentTimeMillis()); } mSelectedBubble = bubble; - dispatchOnSelectionChanged(mSelectedBubble); - if (!mExpanded || mSelectedBubble == null) { - mSelectedBubbleExpandedPosition = -1; - } - return true; + mSelectionChanged = true; + return; } /** @@ -369,37 +400,53 @@ public class BubbleData { * the value changes. * * @param shouldExpand the new requested state - * @return true if the state changed as a result */ - private boolean setExpandedInternal(boolean shouldExpand) { + private void setExpandedInternal(boolean shouldExpand) { if (DEBUG) { Log.d(TAG, "setExpandedInternal: shouldExpand=" + shouldExpand); } if (mExpanded == shouldExpand) { - return false; - } - if (mSelectedBubble != null) { - mSelectedBubble.markAsAccessedAt(mTimeSource.currentTimeMillis()); + return; } if (shouldExpand) { if (mBubbles.isEmpty()) { Log.e(TAG, "Attempt to expand stack when empty!"); - return false; + return; } if (mSelectedBubble == null) { Log.e(TAG, "Attempt to expand stack without selected bubble!"); - return false; + return; + } + mSelectedBubble.markAsAccessedAt(mTimeSource.currentTimeMillis()); + mOrderChanged |= repackAll(); + } else if (!mBubbles.isEmpty()) { + // Apply ordering and grouping rules from expanded -> collapsed, then save + // the result. + mOrderChanged |= repackAll(); + // Save the state which should be returned to when expanded (with no other changes) + + if (mBubbles.indexOf(mSelectedBubble) > 0) { + // Move the selected bubble to the top while collapsed. + if (!mSelectedBubble.isOngoing() && mBubbles.get(0).isOngoing()) { + // The selected bubble cannot be raised to the first position because + // there is an ongoing bubble there. Instead, force the top ongoing bubble + // to become selected. + setSelectedBubbleInternal(mBubbles.get(0)); + } else { + // Raise the selected bubble (and it's group) up to the front so the selected + // bubble remains on top. + mBubbles.remove(mSelectedBubble); + mBubbles.add(0, mSelectedBubble); + packGroup(0); + } } - } else { - repackAll(); } mExpanded = shouldExpand; - dispatchOnExpandedChanged(mExpanded); - return true; + mExpandedChanged = true; } private static long sortKey(Bubble bubble) { - long key = bubble.getLastActivity(); + long key = bubble.getLastUpdateTime(); if (bubble.isOngoing()) { // Set 2nd highest bit (signed long int), to partition between ongoing and regular key |= 0x4000000000000000L; @@ -456,8 +503,9 @@ public class BubbleData { * unchanged. Relative order of any other bubbles are also unchanged. * * @param position the position of the first bubble for the group + * @return true if the position of any bubbles has changed as a result */ - private void packGroup(int position) { + private boolean packGroup(int position) { if (DEBUG) { Log.d(TAG, "packGroup: position=" + position); } @@ -471,16 +519,27 @@ public class BubbleData { moving.add(0, mBubbles.get(i)); } } + if (moving.isEmpty()) { + return false; + } mBubbles.removeAll(moving); mBubbles.addAll(position + 1, moving); + return true; } - private void repackAll() { + /** + * This applies a full sort and group pass to all existing bubbles. The bubbles are grouped + * by groupId. Each group is then sorted by the max(lastUpdated) time of it's bubbles. Bubbles + * within each group are then sorted by lastUpdated descending. + * + * @return true if the position of any bubbles changed as a result + */ + private boolean repackAll() { if (DEBUG) { Log.d(TAG, "repackAll()"); } if (mBubbles.isEmpty()) { - return; + return false; } Map<String, Long> groupLastActivity = new HashMap<>(); for (Bubble bubble : mBubbles) { @@ -494,7 +553,7 @@ public class BubbleData { // Sort groups by their most recently active bubble List<String> groupsByMostRecentActivity = groupLastActivity.entrySet().stream() - .sorted(GROUPS_BY_LAST_ACTIVITY_DESCENDING) + .sorted(GROUPS_BY_MAX_SORT_KEY_DESCENDING) .map(Map.Entry::getKey) .collect(toList()); @@ -504,10 +563,14 @@ public class BubbleData { for (String appId : groupsByMostRecentActivity) { mBubbles.stream() .filter((b) -> b.getGroupId().equals(appId)) - .sorted(BUBBLES_BY_LAST_ACTIVITY_DESCENDING) + .sorted(BUBBLES_BY_SORT_KEY_DESCENDING) .forEachOrdered(repacked::add); } + if (repacked.equals(mBubbles)) { + return false; + } mBubbles = repacked; + return true; } private void maybeSendDeleteIntent(@DismissReason int reason, NotificationEntry entry) { @@ -527,21 +590,25 @@ public class BubbleData { } private void onBubbleBlocked(NotificationEntry entry) { - boolean changed = false; - final String blockedPackage = entry.notification.getPackageName(); + final String blockedGroupId = Bubble.groupId(entry); + int selectedIndex = mBubbles.indexOf(mSelectedBubble); for (Iterator<Bubble> i = mBubbles.iterator(); i.hasNext(); ) { Bubble bubble = i.next(); - if (bubble.getPackageName().equals(blockedPackage)) { + if (bubble.getGroupId().equals(blockedGroupId)) { + mRemovedBubbles.add(Pair.create(bubble, BubbleController.DISMISS_BLOCKED)); i.remove(); - // TODO: handle removal of selected bubble, and collapse safely if emptied (see - // dismissAll) - dispatchOnBubbleRemoved(bubble, BubbleController.DISMISS_BLOCKED); - changed = true; } } - if (changed) { - dispatchApply(); - } + if (mBubbles.isEmpty()) { + setExpandedInternal(false); + setSelectedBubbleInternal(null); + } else if (!mBubbles.contains(mSelectedBubble)) { + // choose a new one + int newIndex = Math.min(selectedIndex, mBubbles.size() - 1); + Bubble newSelected = mBubbles.get(newIndex); + setSelectedBubbleInternal(newSelected); + } + dispatchPendingChanges(); } private int indexForKey(String key) { diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java index d1bc9a91636c..35dc1775cb7f 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java @@ -45,6 +45,7 @@ import android.view.ViewTreeObserver; import android.view.WindowInsets; import android.view.WindowManager; import android.view.accessibility.AccessibilityNodeInfo; +import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction; import android.view.animation.AccelerateDecelerateInterpolator; import android.widget.FrameLayout; import android.widget.TextView; @@ -391,11 +392,34 @@ public class BubbleStackView extends FrameLayout { @Override public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfoInternal(info); - info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_DISMISS); + + // Custom actions. + AccessibilityAction moveTopLeft = new AccessibilityAction(R.id.action_move_top_left, + getContext().getResources() + .getString(R.string.bubble_accessibility_action_move_top_left)); + info.addAction(moveTopLeft); + + AccessibilityAction moveTopRight = new AccessibilityAction(R.id.action_move_top_right, + getContext().getResources() + .getString(R.string.bubble_accessibility_action_move_top_right)); + info.addAction(moveTopRight); + + AccessibilityAction moveBottomLeft = new AccessibilityAction(R.id.action_move_bottom_left, + getContext().getResources() + .getString(R.string.bubble_accessibility_action_move_bottom_left)); + info.addAction(moveBottomLeft); + + AccessibilityAction moveBottomRight = new AccessibilityAction(R.id.action_move_bottom_right, + getContext().getResources() + .getString(R.string.bubble_accessibility_action_move_bottom_right)); + info.addAction(moveBottomRight); + + // Default actions. + info.addAction(AccessibilityAction.ACTION_DISMISS); if (mIsExpanded) { - info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_COLLAPSE); + info.addAction(AccessibilityAction.ACTION_COLLAPSE); } else { - info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_EXPAND); + info.addAction(AccessibilityAction.ACTION_EXPAND); } } @@ -404,16 +428,30 @@ public class BubbleStackView extends FrameLayout { if (super.performAccessibilityActionInternal(action, arguments)) { return true; } - switch (action) { - case AccessibilityNodeInfo.ACTION_DISMISS: - mBubbleData.dismissAll(BubbleController.DISMISS_ACCESSIBILITY_ACTION); - return true; - case AccessibilityNodeInfo.ACTION_COLLAPSE: - mBubbleData.setExpanded(false); - return true; - case AccessibilityNodeInfo.ACTION_EXPAND: - mBubbleData.setExpanded(true); - return true; + final RectF stackBounds = mStackAnimationController.getAllowableStackPositionRegion(); + + // R constants are not final so we cannot use switch-case here. + if (action == AccessibilityNodeInfo.ACTION_DISMISS) { + mBubbleData.dismissAll(BubbleController.DISMISS_ACCESSIBILITY_ACTION); + return true; + } else if (action == AccessibilityNodeInfo.ACTION_COLLAPSE) { + mBubbleData.setExpanded(false); + return true; + } else if (action == AccessibilityNodeInfo.ACTION_EXPAND) { + mBubbleData.setExpanded(true); + return true; + } else if (action == R.id.action_move_top_left) { + mStackAnimationController.springStack(stackBounds.left, stackBounds.top); + return true; + } else if (action == R.id.action_move_top_right) { + mStackAnimationController.springStack(stackBounds.right, stackBounds.top); + return true; + } else if (action == R.id.action_move_bottom_left) { + mStackAnimationController.springStack(stackBounds.left, stackBounds.bottom); + return true; + } else if (action == R.id.action_move_bottom_right) { + mStackAnimationController.springStack(stackBounds.right, stackBounds.bottom); + return true; } return false; } @@ -511,6 +549,7 @@ public class BubbleStackView extends FrameLayout { mBubbleContainer.addView(bubble.iconView, 0, new FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT)); ViewClippingUtil.setClippingDeactivated(bubble.iconView, true, mClippingParameters); + animateInFlyoutForBubble(bubble); requestUpdate(); logBubbleEvent(bubble, StatsLog.BUBBLE_UICHANGED__ACTION__POSTED); } @@ -532,10 +571,19 @@ public class BubbleStackView extends FrameLayout { // via BubbleData.Listener void updateBubble(Bubble bubble) { + animateInFlyoutForBubble(bubble); requestUpdate(); logBubbleEvent(bubble, StatsLog.BUBBLE_UICHANGED__ACTION__UPDATED); } + public void updateBubbleOrder(List<Bubble> bubbles) { + for (int i = 0; i < bubbles.size(); i++) { + Bubble bubble = bubbles.get(i); + mBubbleContainer.moveViewTo(bubble.iconView, i); + } + } + + /** * Changes the currently selected bubble. If the stack is already expanded, the newly selected * bubble will be shown immediately. This does not change the expanded state or change the diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/animation/StackAnimationController.java b/packages/SystemUI/src/com/android/systemui/bubbles/animation/StackAnimationController.java index 47f2cd40b5e1..bc249aedc605 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/animation/StackAnimationController.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/animation/StackAnimationController.java @@ -175,11 +175,33 @@ public class StackAnimationController extends /** Whether the stack is on the left side of the screen. */ public boolean isStackOnLeftSide() { - if (mLayout != null) { - return mStackPosition.x - mIndividualBubbleSize / 2 < mLayout.getWidth() / 2; - } else { + if (mLayout == null) { return false; } + float stackCenter = mStackPosition.x + mIndividualBubbleSize / 2; + float screenCenter = mLayout.getWidth() / 2; + return stackCenter < screenCenter; + } + + /** + * Fling stack to given corner, within allowable screen bounds. + * Note that we need new SpringForce instances per animation despite identical configs because + * SpringAnimation uses SpringForce's internal (changing) velocity while the animation runs. + */ + public void springStack(float destinationX, float destinationY) { + springFirstBubbleWithStackFollowing(DynamicAnimation.TRANSLATION_X, + new SpringForce() + .setStiffness(SPRING_AFTER_FLING_STIFFNESS) + .setDampingRatio(SPRING_AFTER_FLING_DAMPING_RATIO), + 0 /* startXVelocity */, + destinationX); + + springFirstBubbleWithStackFollowing(DynamicAnimation.TRANSLATION_Y, + new SpringForce() + .setStiffness(SPRING_AFTER_FLING_STIFFNESS) + .setDampingRatio(SPRING_AFTER_FLING_DAMPING_RATIO), + 0 /* startYVelocity */, + destinationY); } /** @@ -352,6 +374,7 @@ public class StackAnimationController extends float destinationY = Float.MIN_VALUE; if (imeVisible) { + // Stack is lower than it should be and overlaps the now-visible IME. if (mStackPosition.y > maxBubbleY && mPreImeY == Float.MIN_VALUE) { mPreImeY = mStackPosition.y; destinationY = maxBubbleY; diff --git a/packages/SystemUI/src/com/android/systemui/classifier/ClassifierData.java b/packages/SystemUI/src/com/android/systemui/classifier/ClassifierData.java index c83c74f69f90..95e497e6574c 100644 --- a/packages/SystemUI/src/com/android/systemui/classifier/ClassifierData.java +++ b/packages/SystemUI/src/com/android/systemui/classifier/ClassifierData.java @@ -26,6 +26,9 @@ import java.util.ArrayList; * example, provide information on the current touch state. */ public class ClassifierData { + private static final long MINIMUM_DT_NANOS = 16666666; // 60Hz + private static final long MINIMUM_DT_SMEAR_NANOS = 2500000; // 2.5ms + private SparseArray<Stroke> mCurrentStrokes = new SparseArray<>(); private ArrayList<Stroke> mEndingStrokes = new ArrayList<>(); private final float mDpi; @@ -34,7 +37,18 @@ public class ClassifierData { mDpi = dpi; } - public void update(MotionEvent event) { + /** Returns true if the event should be considered, false otherwise. */ + public boolean update(MotionEvent event) { + // We limit to 60hz sampling. Drop anything happening faster than that. + // Legacy code was created with an assumed sampling rate. As devices increase their + // sampling rate, this creates potentialy false positives. + if (event.getActionMasked() == MotionEvent.ACTION_MOVE + && mCurrentStrokes.size() != 0 + && event.getEventTimeNano() - mCurrentStrokes.get(0).getLastEventTimeNano() + < MINIMUM_DT_NANOS - MINIMUM_DT_SMEAR_NANOS) { + return false; + } + mEndingStrokes.clear(); int action = event.getActionMasked(); if (action == MotionEvent.ACTION_DOWN) { @@ -54,6 +68,8 @@ public class ClassifierData { mEndingStrokes.add(getStroke(id)); } } + + return true; } public void cleanUp(MotionEvent event) { diff --git a/packages/SystemUI/src/com/android/systemui/classifier/HumanInteractionClassifier.java b/packages/SystemUI/src/com/android/systemui/classifier/HumanInteractionClassifier.java index 0cc50cddbfc6..86dccb222875 100644 --- a/packages/SystemUI/src/com/android/systemui/classifier/HumanInteractionClassifier.java +++ b/packages/SystemUI/src/com/android/systemui/classifier/HumanInteractionClassifier.java @@ -151,7 +151,9 @@ public class HumanInteractionClassifier extends Classifier { } private void addTouchEvent(MotionEvent event) { - mClassifierData.update(event); + if (!mClassifierData.update(event)) { + return; + } for (StrokeClassifier c : mStrokeClassifiers) { c.onTouchEvent(event); diff --git a/packages/SystemUI/src/com/android/systemui/classifier/Stroke.java b/packages/SystemUI/src/com/android/systemui/classifier/Stroke.java index fb04d3e73a2d..977a2d0b528a 100644 --- a/packages/SystemUI/src/com/android/systemui/classifier/Stroke.java +++ b/packages/SystemUI/src/com/android/systemui/classifier/Stroke.java @@ -68,4 +68,12 @@ public class Stroke { public ArrayList<Point> getPoints() { return mPoints; } + + public long getLastEventTimeNano() { + if (mPoints.isEmpty()) { + return mStartTimeNano; + } + + return mPoints.get(mPoints.size() - 1).timeOffsetNano; + } } diff --git a/packages/SystemUI/src/com/android/systemui/qs/CellTileView.java b/packages/SystemUI/src/com/android/systemui/qs/CellTileView.java deleted file mode 100644 index c1aa7069d6ba..000000000000 --- a/packages/SystemUI/src/com/android/systemui/qs/CellTileView.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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.systemui.qs; - -import android.content.Context; -import android.graphics.drawable.Drawable; -import android.service.quicksettings.Tile; -import android.widget.ImageView; - -import com.android.settingslib.graph.SignalDrawable; -import com.android.systemui.R; -import com.android.systemui.plugins.qs.QSTile.Icon; -import com.android.systemui.plugins.qs.QSTile.State; -import com.android.systemui.qs.tileimpl.QSTileImpl; - -import java.util.Objects; - -// Exists to provide easy way to add sim icon to cell tile -// TODO Find a better way to handle this and remove it. -public class CellTileView extends SignalTileView { - - private final SignalDrawable mSignalDrawable; - - public CellTileView(Context context) { - super(context); - mSignalDrawable = new SignalDrawable(mContext); - mSignalDrawable.setColors(QSTileImpl.getColorForState(context, Tile.STATE_UNAVAILABLE), - QSTileImpl.getColorForState(context, Tile.STATE_ACTIVE)); - mSignalDrawable.setIntrinsicSize(context.getResources().getDimensionPixelSize( - R.dimen.qs_tile_icon_size)); - } - - protected void updateIcon(ImageView iv, State state, boolean allowAnimations) { - if (!(state.icon instanceof SignalIcon)) { - super.updateIcon(iv, state, allowAnimations); - return; - } else if (!Objects.equals(state.icon, iv.getTag(R.id.qs_icon_tag))) { - mSignalDrawable.setLevel(((SignalIcon) state.icon).getState()); - iv.setImageDrawable(mSignalDrawable); - iv.setTag(R.id.qs_icon_tag, state.icon); - } - } - - public static class SignalIcon extends Icon { - - private final int mState; - - public SignalIcon(int state) { - mState = state; - } - - public int getState() { - return mState; - } - - @Override - public Drawable getDrawable(Context context) { - //TODO: Not the optimal solution to create this drawable - SignalDrawable d = new SignalDrawable(context); - d.setColors(QSTileImpl.getColorForState(context, Tile.STATE_UNAVAILABLE), - QSTileImpl.getColorForState(context, Tile.STATE_ACTIVE)); - d.setLevel(getState()); - return d; - } - } -} diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSCarrier.java b/packages/SystemUI/src/com/android/systemui/qs/QSCarrier.java index fd7efc94e8c3..c5bf402783e3 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSCarrier.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSCarrier.java @@ -75,12 +75,11 @@ public class QSCarrier extends LinearLayout { mMobileGroup.setVisibility(state.visible ? View.VISIBLE : View.GONE); if (state.visible) { mMobileRoaming.setVisibility(state.roaming ? View.VISIBLE : View.GONE); - mMobileRoaming.setImageTintList(ColorStateList.valueOf( - mDualToneHandler.getSingleColor(mColorForegroundIntensity))); - SignalDrawable d = new SignalDrawable(mContext); - d.setColors(mDualToneHandler.getBackgroundColor(mColorForegroundIntensity), - mDualToneHandler.getFillColor(mColorForegroundIntensity)); - mMobileSignal.setImageDrawable(d); + ColorStateList colorStateList = ColorStateList.valueOf( + mDualToneHandler.getSingleColor(mColorForegroundIntensity)); + mMobileRoaming.setImageTintList(colorStateList); + mMobileSignal.setImageDrawable(new SignalDrawable(mContext)); + mMobileSignal.setImageTintList(colorStateList); mMobileSignal.setImageLevel(state.mobileSignalIconId); StringBuilder contentDescription = new StringBuilder(); 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 20e002edfe02..20069ead5e8d 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java @@ -40,9 +40,7 @@ import com.android.systemui.Prefs; import com.android.systemui.R; import com.android.systemui.plugins.ActivityStarter; import com.android.systemui.plugins.qs.DetailAdapter; -import com.android.systemui.plugins.qs.QSIconView; import com.android.systemui.plugins.qs.QSTile.SignalState; -import com.android.systemui.qs.CellTileView; import com.android.systemui.qs.QSHost; import com.android.systemui.qs.tileimpl.QSTileImpl; import com.android.systemui.statusbar.phone.SystemUIDialog; @@ -89,11 +87,6 @@ public class CellularTile extends QSTileImpl<SignalState> { } @Override - public QSIconView createTileView(Context context) { - return new CellTileView(context); - } - - @Override public Intent getLongClickIntent() { return getCellularSettingIntent(); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CastDrawable.java b/packages/SystemUI/src/com/android/systemui/statusbar/CastDrawable.java new file mode 100644 index 000000000000..2f385d04c793 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/CastDrawable.java @@ -0,0 +1,111 @@ +/* + * 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.statusbar; + +import android.annotation.NonNull; +import android.annotation.Nullable; +import android.content.res.Resources; +import android.graphics.Canvas; +import android.graphics.Rect; +import android.graphics.drawable.Drawable; +import android.graphics.drawable.DrawableWrapper; +import android.util.AttributeSet; + +import com.android.systemui.R; + +import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlPullParserException; + +import java.io.IOException; + +/** + * The status bar cast drawable draws ic_cast and ic_cast_connected_fill to indicate that the + * screen is being recorded. A simple layer-list drawable isn't used here because the record fill + * must not be tinted by the caller. + */ +public class CastDrawable extends DrawableWrapper { + private Drawable mFillDrawable; + private int mHorizontalPadding; + + /** No-arg constructor used by drawable inflation. */ + public CastDrawable() { + super(null); + } + + @Override + public void inflate(@NonNull Resources r, @NonNull XmlPullParser parser, + @NonNull AttributeSet attrs, @Nullable Resources.Theme theme) + throws XmlPullParserException, IOException { + super.inflate(r, parser, attrs, theme); + setDrawable(r.getDrawable(R.drawable.ic_cast, theme).mutate()); + mFillDrawable = r.getDrawable(R.drawable.ic_cast_connected_fill, theme).mutate(); + mHorizontalPadding = r.getDimensionPixelSize(R.dimen.status_bar_horizontal_padding); + } + + @Override + public boolean canApplyTheme() { + return mFillDrawable.canApplyTheme() || super.canApplyTheme(); + } + + @Override + public void applyTheme(Resources.Theme t) { + super.applyTheme(t); + mFillDrawable.applyTheme(t); + } + + @Override + protected void onBoundsChange(Rect bounds) { + super.onBoundsChange(bounds); + mFillDrawable.setBounds(bounds); + } + + @Override + public boolean onLayoutDirectionChanged(int layoutDirection) { + mFillDrawable.setLayoutDirection(layoutDirection); + return super.onLayoutDirectionChanged(layoutDirection); + } + + @Override + public void draw(Canvas canvas) { + super.draw(canvas); + mFillDrawable.draw(canvas); + } + + @Override + public boolean getPadding(Rect padding) { + padding.left += mHorizontalPadding; + padding.right += mHorizontalPadding; + return true; + } + + @Override + public void setAlpha(int alpha) { + super.setAlpha(alpha); + mFillDrawable.setAlpha(alpha); + } + + @Override + public boolean setVisible(boolean visible, boolean restart) { + mFillDrawable.setVisible(visible, restart); + return super.setVisible(visible, restart); + } + + @Override + public Drawable mutate() { + mFillDrawable.mutate(); + return super.mutate(); + } +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NavigationBarController.java b/packages/SystemUI/src/com/android/systemui/statusbar/NavigationBarController.java index bd25209d5c0f..7bcbd3683130 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NavigationBarController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NavigationBarController.java @@ -32,6 +32,8 @@ import android.view.IWindowManager; import android.view.View; import android.view.WindowManagerGlobal; +import androidx.annotation.Nullable; + import com.android.internal.annotations.VisibleForTesting; import com.android.internal.statusbar.RegisterStatusBarResult; import com.android.systemui.Dependency; @@ -213,8 +215,17 @@ public class NavigationBarController implements Callbacks { } /** @return {@link NavigationBarView} on the default display. */ - public NavigationBarView getDefaultNavigationBarView() { - NavigationBarFragment navBar = mNavigationBars.get(DEFAULT_DISPLAY); + public @Nullable NavigationBarView getDefaultNavigationBarView() { + return getNavigationBarView(DEFAULT_DISPLAY); + } + + /** + * @param displayId the ID of display which Navigation bar is on + * @return {@link NavigationBarView} on the display with {@code displayId}. + * {@code null} if no navigation bar on that display. + */ + public @Nullable NavigationBarView getNavigationBarView(int displayId) { + NavigationBarFragment navBar = mNavigationBars.get(displayId); return (navBar == null) ? null : (NavigationBarView) navBar.getView(); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java index acacc8fbb917..033c4fbed6f7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java @@ -40,6 +40,7 @@ import android.os.UserHandle; import android.service.notification.StatusBarNotification; import android.text.TextUtils; import android.util.AttributeSet; +import android.util.DisplayMetrics; import android.util.FloatProperty; import android.util.Log; import android.util.Property; @@ -73,7 +74,10 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi * want to scale them (in a way that doesn't require an asset dump) down 2dp. So * 17dp * (15 / 17) = 15dp, the new height. */ - private static final float SYSTEM_ICON_SCALE = 15.f / 17.f; + private static final float SYSTEM_ICON_DESIRED_HEIGHT = 15f; + private static final float SYSTEM_ICON_INTRINSIC_HEIGHT = 17f; + private static final float SYSTEM_ICON_SCALE = + SYSTEM_ICON_DESIRED_HEIGHT / SYSTEM_ICON_INTRINSIC_HEIGHT; private final int ANIMATION_DURATION_FAST = 100; public static final int STATE_ICON = 0; @@ -202,8 +206,25 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi updatePivot(); } + // Makes sure that all icons are scaled to the same height (15dp). If we cannot get a height + // for the icon, it uses the default SCALE (15f / 17f) which is the old behavior private void updateIconScaleForSystemIcons() { - mIconScale = SYSTEM_ICON_SCALE; + float iconHeight = getIconHeightInDps(); + if (iconHeight != 0) { + mIconScale = SYSTEM_ICON_DESIRED_HEIGHT / iconHeight; + } else { + mIconScale = SYSTEM_ICON_SCALE; + } + } + + private float getIconHeightInDps() { + Drawable d = getDrawable(); + if (d != null) { + return ((float) getDrawable().getIntrinsicHeight() * DisplayMetrics.DENSITY_DEFAULT) + / mDensity; + } else { + return SYSTEM_ICON_INTRINSIC_HEIGHT; + } } public float getIconScaleFullyDark() { @@ -221,8 +242,8 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi if (density != mDensity) { mDensity = density; reloadDimens(); - maybeUpdateIconScaleDimens(); updateDrawable(); + maybeUpdateIconScaleDimens(); } boolean nightMode = (newConfig.uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES; @@ -305,6 +326,8 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi if (!updateDrawable(false /* no clear */)) return false; // we have to clear the grayscale tag since it may have changed setTag(R.id.icon_is_grayscale, null); + // Maybe set scale based on icon height + maybeUpdateIconScaleDimens(); } if (!levelEquals) { setImageLevel(icon.iconLevel); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java index 9c6b3be49d5e..812c9a7e9b8a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java @@ -211,8 +211,8 @@ public class StatusBarMobileView extends FrameLayout implements DarkReceiver, if (!isInArea(area, this)) { return; } - mMobileDrawable.setColors(mDualToneHandler.getBackgroundColor(darkIntensity), - mDualToneHandler.getFillColor(darkIntensity)); + mMobileDrawable.setTintList( + ColorStateList.valueOf(mDualToneHandler.getFillColor(darkIntensity))); ColorStateList color = ColorStateList.valueOf(getTint(area, this, tint)); mIn.setImageTintList(color); mOut.setImageTintList(color); @@ -237,8 +237,8 @@ public class StatusBarMobileView extends FrameLayout implements DarkReceiver, float intensity = color == Color.WHITE ? 0 : 1; // We want the ability to change the theme from the one set by SignalDrawable in certain // surfaces. In this way, we can pass a theme to the view. - mMobileDrawable.setColors(mDualToneHandler.getBackgroundColor(intensity), - mDualToneHandler.getFillColor(intensity)); + mMobileDrawable.setTintList( + ColorStateList.valueOf(mDualToneHandler.getFillColor(intensity))); mIn.setImageTintList(list); mOut.setImageTintList(list); mMobileType.setImageTintList(list); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/MessagingLayoutTransformState.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/MessagingLayoutTransformState.java index 0a2e04fd9430..b732966b32db 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/MessagingLayoutTransformState.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/MessagingLayoutTransformState.java @@ -97,7 +97,6 @@ public class MessagingLayoutTransformState extends TransformState { HashMap<MessagingGroup, MessagingGroup> pairs = findPairs(ownGroups, otherGroups); MessagingGroup lastPairedGroup = null; float currentTranslation = 0; - float transformationDistanceRemaining = 0; for (int i = ownGroups.size() - 1; i >= 0; i--) { MessagingGroup ownGroup = ownGroups.get(i); MessagingGroup matchingGroup = pairs.get(ownGroup); @@ -108,13 +107,10 @@ public class MessagingLayoutTransformState extends TransformState { lastPairedGroup = ownGroup; if (to){ float totalTranslation = ownGroup.getTop() - matchingGroup.getTop(); - transformationDistanceRemaining - = matchingGroup.getAvatar().getTranslationY(); - currentTranslation = transformationDistanceRemaining - totalTranslation; + currentTranslation = matchingGroup.getAvatar().getTranslationY() + - totalTranslation; } else { - float totalTranslation = matchingGroup.getTop() - ownGroup.getTop(); currentTranslation = ownGroup.getAvatar().getTranslationY(); - transformationDistanceRemaining = currentTranslation - totalTranslation; } } } else { @@ -122,14 +118,20 @@ public class MessagingLayoutTransformState extends TransformState { if (lastPairedGroup != null) { adaptGroupAppear(ownGroup, transformationAmount, currentTranslation, to); - int distance = lastPairedGroup.getTop() - ownGroup.getTop(); - float transformationDistance = mTransformInfo.isAnimating() - ? distance - : ownGroup.getHeight() * 0.75f; - float translationProgress = transformationDistanceRemaining - - (distance - transformationDistance); - groupTransformationAmount = - translationProgress / transformationDistance; + float newPosition = ownGroup.getTop() + currentTranslation; + + if (!mTransformInfo.isAnimating()) { + // We fade the group away as soon as 1/2 of it is translated away on top + float fadeStart = -ownGroup.getHeight() * 0.5f; + groupTransformationAmount = (newPosition - fadeStart) + / Math.abs(fadeStart); + } else { + float fadeStart = -ownGroup.getHeight() * 0.75f; + // We want to fade out as soon as the animation starts, let's add the + // complete top in addition + groupTransformationAmount = (newPosition - fadeStart) + / (Math.abs(fadeStart) + ownGroup.getTop()); + } groupTransformationAmount = Math.max(0.0f, Math.min(1.0f, groupTransformationAmount)); if (to) { @@ -175,7 +177,8 @@ public class MessagingLayoutTransformState extends TransformState { relativeOffset *= 0.5f; } ownGroup.getMessageContainer().setTranslationY(relativeOffset); - ownGroup.setTranslationY(overallTranslation * 0.85f); + ownGroup.getSenderView().setTranslationY(relativeOffset); + ownGroup.setTranslationY(overallTranslation * 0.9f); } private void disappear(MessagingGroup ownGroup, float transformationAmount) { @@ -256,6 +259,9 @@ public class MessagingLayoutTransformState extends TransformState { float distanceToTop = child.getTop() + child.getHeight() + previousTranslation; transformationAmount = distanceToTop / child.getHeight(); transformationAmount = Math.max(0.0f, Math.min(1.0f, transformationAmount)); + if (to) { + transformationAmount = 1.0f - transformationAmount; + } } transformView(transformationAmount, to, child, otherChild, false, /* sameAsAny */ useLinearTransformation); @@ -400,6 +406,7 @@ public class MessagingLayoutTransformState extends TransformState { setClippingDeactivated(ownGroup.getSenderView(), false); ownGroup.setTranslationY(0); ownGroup.getMessageContainer().setTranslationY(0); + ownGroup.getSenderView().setTranslationY(0); } ownGroup.setTransformingImages(false); ownGroup.updateClipRect(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationMediaTemplateViewWrapper.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationMediaTemplateViewWrapper.java index f9a98ad297f5..91c43a142db5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationMediaTemplateViewWrapper.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationMediaTemplateViewWrapper.java @@ -206,7 +206,7 @@ public class NotificationMediaTemplateViewWrapper extends NotificationTemplateVi long actions = mMediaController.getPlaybackState().getActions(); Log.d(TAG, "Playback state actions are " + actions); - return (actions == 0 || (actions & PlaybackState.ACTION_SEEK_TO) != 0); + return ((actions & PlaybackState.ACTION_SEEK_TO) != 0); } protected final Runnable mUpdatePlaybackUi = new Runnable() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java index ce922801551b..8c6d1015bd4d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.notification.stack; +import android.annotation.NonNull; import android.annotation.Nullable; import android.content.Context; import android.util.MathUtils; @@ -30,18 +31,18 @@ import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.row.ActivatableNotificationView; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.ExpandableView; +import com.android.systemui.statusbar.notification.stack.StackScrollAlgorithm.SectionProvider; import java.util.ArrayList; -import java.util.List; /** * A global state to track all input states for the algorithm. */ public class AmbientState { - private static final int NO_SECTION_BOUNDARY = -1; private static final float MAX_PULSE_HEIGHT = 100000f; + private final SectionProvider mSectionProvider; private ArrayList<ExpandableView> mDraggedViews = new ArrayList<>(); private int mScrollY; private int mAnchorViewIndex; @@ -51,7 +52,6 @@ public class AmbientState { private float mOverScrollTopAmount; private float mOverScrollBottomAmount; private int mSpeedBumpIndex = -1; - private final List<Integer> mSectionBoundaryIndices = new ArrayList<>(); private boolean mDark; private boolean mHideSensitive; private AmbientPulseManager mAmbientPulseManager = Dependency.get(AmbientPulseManager.class); @@ -84,8 +84,10 @@ public class AmbientState { private float mPulseHeight = MAX_PULSE_HEIGHT; private float mDozeAmount = 0.0f; - public AmbientState(Context context) { - mSectionBoundaryIndices.add(NO_SECTION_BOUNDARY); + public AmbientState( + Context context, + @NonNull SectionProvider sectionProvider) { + mSectionProvider = sectionProvider; reload(context); } @@ -245,25 +247,8 @@ public class AmbientState { mSpeedBumpIndex = shelfIndex; } - /** - * Returns the index of the boundary between two sections, where the first section is at index - * {@code boundaryNum}. - */ - public int getSectionBoundaryIndex(int boundaryNum) { - return mSectionBoundaryIndices.get(boundaryNum); - } - - /** Returns true if the item at {@code index} is directly below a section boundary. */ - public boolean beginsNewSection(int index) { - return mSectionBoundaryIndices.contains(index); - } - - /** - * Sets the index of the boundary between the section at {@code boundaryNum} and the following - * section to {@code boundaryIndex}. - */ - public void setSectionBoundaryIndex(int boundaryNum, int boundaryIndex) { - mSectionBoundaryIndices.set(boundaryNum, boundaryIndex); + public SectionProvider getSectionProvider() { + return mSectionProvider; } public float getStackTranslation() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManager.java new file mode 100644 index 000000000000..82599f02ddf1 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManager.java @@ -0,0 +1,246 @@ +/* + * 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.statusbar.notification.stack; + +import static com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout.ROWS_GENTLE; + +import android.annotation.Nullable; +import android.content.Context; +import android.content.Intent; +import android.provider.Settings; +import android.view.LayoutInflater; +import android.view.View; + +import com.android.internal.annotations.VisibleForTesting; +import com.android.systemui.R; +import com.android.systemui.plugins.ActivityStarter; +import com.android.systemui.statusbar.notification.row.ActivatableNotificationView; +import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; + +/** + * Manages the boundaries of the two notification sections (high priority and low priority). Also + * shows/hides the headers for those sections where appropriate. + * + * TODO: Move remaining sections logic from NSSL into this class. + */ +class NotificationSectionsManager implements StackScrollAlgorithm.SectionProvider { + private final NotificationStackScrollLayout mParent; + private final ActivityStarter mActivityStarter; + private final boolean mUseMultipleSections; + + private SectionHeaderView mGentleHeader; + private boolean mGentleHeaderVisible = false; + @Nullable private View.OnClickListener mOnClearGentleNotifsClickListener; + + NotificationSectionsManager( + NotificationStackScrollLayout parent, + ActivityStarter activityStarter, + boolean useMultipleSections) { + mParent = parent; + mActivityStarter = activityStarter; + mUseMultipleSections = useMultipleSections; + } + + /** + * Must be called before use. Should be called again whenever inflation-related things change, + * such as density or theme changes. + */ + void inflateViews(Context context) { + int oldPos = -1; + if (mGentleHeader != null) { + if (mGentleHeader.getTransientContainer() != null) { + mGentleHeader.getTransientContainer().removeView(mGentleHeader); + } else if (mGentleHeader.getParent() != null) { + oldPos = mParent.indexOfChild(mGentleHeader); + mParent.removeView(mGentleHeader); + } + } + + mGentleHeader = (SectionHeaderView) LayoutInflater.from(context).inflate( + R.layout.status_bar_notification_section_header, mParent, false); + mGentleHeader.setOnHeaderClickListener(this::onGentleHeaderClick); + mGentleHeader.setOnClearAllClickListener(this::onClearGentleNotifsClick); + + if (oldPos != -1) { + mParent.addView(mGentleHeader, oldPos); + } + } + + /** Listener for when the "clear all" buttton is clciked on the gentle notification header. */ + void setOnClearGentleNotifsClickListener(View.OnClickListener listener) { + mOnClearGentleNotifsClickListener = listener; + } + + /** Must be called whenever the UI mode changes (i.e. when we enter night mode). */ + void onUiModeChanged() { + mGentleHeader.onUiModeChanged(); + } + + @Override + public boolean beginsSection(View view) { + return view == mGentleHeader; + } + + /** + * Should be called whenever notifs are added, removed, or updated. Updates section boundary + * bookkeeping and adds/moves/removes section headers if appropriate. + */ + void updateSectionBoundaries() { + if (!mUseMultipleSections) { + return; + } + + int firstGentleNotifIndex = -1; + + final int n = mParent.getChildCount(); + for (int i = 0; i < n; i++) { + View child = mParent.getChildAt(i); + if (child instanceof ExpandableNotificationRow + && child.getVisibility() != View.GONE) { + ExpandableNotificationRow row = (ExpandableNotificationRow) child; + if (!row.getEntry().isHighPriority()) { + firstGentleNotifIndex = i; + break; + } + } + } + + adjustGentleHeaderVisibilityAndPosition(firstGentleNotifIndex); + + mGentleHeader.setAreThereDismissableGentleNotifs( + mParent.hasActiveClearableNotifications(ROWS_GENTLE)); + } + + private void adjustGentleHeaderVisibilityAndPosition(int firstGentleNotifIndex) { + final int currentHeaderIndex = mParent.indexOfChild(mGentleHeader); + + if (firstGentleNotifIndex == -1) { + if (mGentleHeaderVisible) { + mGentleHeaderVisible = false; + mParent.removeView(mGentleHeader); + } + } else { + if (!mGentleHeaderVisible) { + mGentleHeaderVisible = true; + // If the header is animating away, it will still have a parent, so detach it first + // TODO: We should really cancel the active animations here. This will happen + // automatically when the view's intro animation starts, but it's a fragile link. + if (mGentleHeader.getTransientContainer() != null) { + mGentleHeader.getTransientContainer().removeTransientView(mGentleHeader); + mGentleHeader.setTransientContainer(null); + } + mParent.addView(mGentleHeader, firstGentleNotifIndex); + } else if (currentHeaderIndex != firstGentleNotifIndex - 1) { + // Relocate the header to be immediately before the first child in the section + int targetIndex = firstGentleNotifIndex; + if (currentHeaderIndex < firstGentleNotifIndex) { + // Adjust the target index to account for the header itself being temporarily + // removed during the position change. + targetIndex--; + } + + mParent.changeViewPosition(mGentleHeader, targetIndex); + } + } + } + + /** + * Updates the boundaries (as tracked by their first and last views) of the high and low + * priority sections. + * + * @return {@code true} If the last view in the top section changed (so we need to animate). + */ + boolean updateFirstAndLastViewsInSections( + final NotificationSection highPrioritySection, + final NotificationSection lowPrioritySection, + ActivatableNotificationView firstChild, + ActivatableNotificationView lastChild) { + if (mUseMultipleSections) { + ActivatableNotificationView previousLastHighPriorityChild = + highPrioritySection.getLastVisibleChild(); + ActivatableNotificationView previousFirstLowPriorityChild = + lowPrioritySection.getFirstVisibleChild(); + ActivatableNotificationView lastHighPriorityChild = getLastHighPriorityChild(); + ActivatableNotificationView firstLowPriorityChild = getFirstLowPriorityChild(); + if (lastHighPriorityChild != null && firstLowPriorityChild != null) { + highPrioritySection.setFirstVisibleChild(firstChild); + highPrioritySection.setLastVisibleChild(lastHighPriorityChild); + lowPrioritySection.setFirstVisibleChild(firstLowPriorityChild); + lowPrioritySection.setLastVisibleChild(lastChild); + } else if (lastHighPriorityChild != null) { + highPrioritySection.setFirstVisibleChild(firstChild); + highPrioritySection.setLastVisibleChild(lastChild); + lowPrioritySection.setFirstVisibleChild(null); + lowPrioritySection.setLastVisibleChild(null); + } else { + highPrioritySection.setFirstVisibleChild(null); + highPrioritySection.setLastVisibleChild(null); + lowPrioritySection.setFirstVisibleChild(firstChild); + lowPrioritySection.setLastVisibleChild(lastChild); + } + return lastHighPriorityChild != previousLastHighPriorityChild + || firstLowPriorityChild != previousFirstLowPriorityChild; + } else { + highPrioritySection.setFirstVisibleChild(firstChild); + highPrioritySection.setLastVisibleChild(lastChild); + return false; + } + } + + @VisibleForTesting + SectionHeaderView getGentleHeaderView() { + return mGentleHeader; + } + + @Nullable + private ActivatableNotificationView getFirstLowPriorityChild() { + return mGentleHeaderVisible ? mGentleHeader : null; + } + + @Nullable + private ActivatableNotificationView getLastHighPriorityChild() { + ActivatableNotificationView lastChildBeforeGap = null; + int childCount = mParent.getChildCount(); + for (int i = 0; i < childCount; i++) { + View child = mParent.getChildAt(i); + if (child.getVisibility() != View.GONE && child instanceof ExpandableNotificationRow) { + ExpandableNotificationRow row = (ExpandableNotificationRow) child; + if (!row.getEntry().isHighPriority()) { + break; + } else { + lastChildBeforeGap = row; + } + } + } + return lastChildBeforeGap; + } + + private void onGentleHeaderClick(View v) { + Intent intent = new Intent(Settings.ACTION_NOTIFICATION_SETTINGS); + mActivityStarter.startActivity( + intent, + true, + true, + Intent.FLAG_ACTIVITY_SINGLE_TOP); + } + + private void onClearGentleNotifsClick(View v) { + if (mOnClearGentleNotifsClickListener != null) { + mOnClearGentleNotifsClickListener.onClick(v); + } + } +} 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 642e2e483d89..5bd6cab1809b 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 @@ -23,10 +23,13 @@ import static com.android.systemui.statusbar.notification.stack.StackStateAnimat import static com.android.systemui.statusbar.phone.NotificationIconAreaController.LOW_PRIORITY; import static com.android.systemui.util.InjectionInflationController.VIEW_CONTEXT; +import static java.lang.annotation.RetentionPolicy.SOURCE; + import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.TimeAnimator; import android.animation.ValueAnimator; +import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.app.WallpaperManager; @@ -87,6 +90,7 @@ import com.android.systemui.SwipeHelper; import com.android.systemui.classifier.FalsingManagerFactory; import com.android.systemui.classifier.FalsingManagerFactory.FalsingManager; import com.android.systemui.colorextraction.SysuiColorExtractor; +import com.android.systemui.plugins.ActivityStarter; import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin; import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin.MenuItem; import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin.OnMenuEventListener; @@ -142,6 +146,7 @@ import com.android.systemui.tuner.TunerService; import java.io.FileDescriptor; import java.io.PrintWriter; +import java.lang.annotation.Retention; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -498,6 +503,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd private final NotificationGutsManager mNotificationGutsManager = Dependency.get(NotificationGutsManager.class); + private final NotificationSectionsManager mSectionsManager; /** * If the {@link NotificationShelf} should be visible when dark. */ @@ -511,7 +517,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd @Named(ALLOW_NOTIFICATION_LONG_PRESS_NAME) boolean allowLongPress, NotificationRoundnessManager notificationRoundnessManager, AmbientPulseManager ambientPulseManager, - DynamicPrivacyController dynamicPrivacyController) { + DynamicPrivacyController dynamicPrivacyController, + ActivityStarter activityStarter) { super(context, attrs, 0, 0); Resources res = getResources(); @@ -522,7 +529,20 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd } mAmbientPulseManager = ambientPulseManager; - mAmbientState = new AmbientState(context); + + mSectionsManager = + new NotificationSectionsManager( + this, + activityStarter, + NotificationUtils.useNewInterruptionModel(context)); + mSectionsManager.inflateViews(context); + mSectionsManager.setOnClearGentleNotifsClickListener(v -> { + // Leave the shade open if there will be other notifs left over to clear + final boolean closeShade = !hasActiveClearableNotifications(ROWS_HIGH_PRIORITY); + clearNotifications(ROWS_GENTLE, closeShade); + }); + + mAmbientState = new AmbientState(context, mSectionsManager); mRoundnessManager = notificationRoundnessManager; mBgColor = context.getColor(R.color.notification_shade_background_color); int minHeight = res.getDimensionPixelSize(R.dimen.notification_min_height); @@ -629,6 +649,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd inflateFooterView(); inflateEmptyShadeView(); updateFooter(); + mSectionsManager.inflateViews(mContext); } @Override @@ -662,7 +683,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd @VisibleForTesting @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) public void updateFooter() { - boolean showDismissView = mClearAllEnabled && hasActiveClearableNotifications(); + boolean showDismissView = mClearAllEnabled && hasActiveClearableNotifications(ROWS_ALL); boolean showFooterView = (showDismissView || mEntryManager.getNotificationData().getActiveNotifications().size() != 0) && mStatusBarState != StatusBarState.KEYGUARD @@ -675,14 +696,15 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd * Return whether there are any clearable notifications */ @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) - public boolean hasActiveClearableNotifications() { + public boolean hasActiveClearableNotifications(@SelectedRows int selection) { int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { View child = getChildAt(i); if (!(child instanceof ExpandableNotificationRow)) { continue; } - if (((ExpandableNotificationRow) child).canViewBeDismissed()) { + final ExpandableNotificationRow row = (ExpandableNotificationRow) child; + if (row.canViewBeDismissed() && matchesSelection(row, selection)) { return true; } } @@ -739,6 +761,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd mBgColor = mContext.getColor(R.color.notification_shade_background_color); updateBackgroundDimming(); mShelf.onUiModeChanged(); + mSectionsManager.onUiModeChanged(); } @ShadeViewRefactor(RefactorComponent.DECORATOR) @@ -1684,11 +1707,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd return mScrollingEnabled; } - @ShadeViewRefactor(RefactorComponent.ADAPTER) - private boolean canChildBeDismissed(View v) { - return StackScrollAlgorithm.canChildBeDismissed(v); - } - @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) private boolean onKeyguard() { return mStatusBarState == StatusBarState.KEYGUARD; @@ -2580,41 +2598,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd return null; } - @ShadeViewRefactor(RefactorComponent.COORDINATOR) - @Nullable - private ActivatableNotificationView getLastHighPriorityChild() { - ActivatableNotificationView lastChildBeforeGap = null; - int childCount = getChildCount(); - for (int i = 0; i < childCount; i++) { - View child = getChildAt(i); - if (child.getVisibility() != View.GONE && child instanceof ExpandableNotificationRow) { - ExpandableNotificationRow row = (ExpandableNotificationRow) child; - if (!row.getEntry().isHighPriority()) { - break; - } else { - lastChildBeforeGap = row; - } - } - } - return lastChildBeforeGap; - } - - @ShadeViewRefactor(RefactorComponent.COORDINATOR) - @Nullable - private ActivatableNotificationView getFirstLowPriorityChild() { - int childCount = getChildCount(); - for (int i = 0; i < childCount; i++) { - View child = getChildAt(i); - if (child.getVisibility() != View.GONE && child instanceof ExpandableNotificationRow) { - ExpandableNotificationRow row = (ExpandableNotificationRow) child; - if (!row.getEntry().isHighPriority()) { - return row; - } - } - } - return null; - } - /** * Fling the scroll view * @@ -3180,7 +3163,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd ActivatableNotificationView firstChild = getFirstChildWithBackground(); ActivatableNotificationView lastChild = getLastChildWithBackground(); - boolean sectionViewsChanged = updateFirstAndLastViewsInSectionsByPriority( + boolean sectionViewsChanged = mSectionsManager.updateFirstAndLastViewsInSections( mSections[0], mSections[1], firstChild, lastChild); if (mAnimationsEnabled && mIsExpanded) { @@ -3198,44 +3181,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd invalidate(); } - /** @return {@code true} if the last view in the top section changed (so we need to animate). */ - private boolean updateFirstAndLastViewsInSectionsByPriority( - final NotificationSection highPrioritySection, - final NotificationSection lowPrioritySection, - ActivatableNotificationView firstChild, - ActivatableNotificationView lastChild) { - if (NotificationUtils.useNewInterruptionModel(mContext)) { - ActivatableNotificationView previousLastHighPriorityChild = - highPrioritySection.getLastVisibleChild(); - ActivatableNotificationView previousFirstLowPriorityChild = - lowPrioritySection.getFirstVisibleChild(); - ActivatableNotificationView lastHighPriorityChild = getLastHighPriorityChild(); - ActivatableNotificationView firstLowPriorityChild = getFirstLowPriorityChild(); - if (lastHighPriorityChild != null && firstLowPriorityChild != null) { - highPrioritySection.setFirstVisibleChild(firstChild); - highPrioritySection.setLastVisibleChild(lastHighPriorityChild); - lowPrioritySection.setFirstVisibleChild(firstLowPriorityChild); - lowPrioritySection.setLastVisibleChild(lastChild); - } else if (lastHighPriorityChild != null) { - highPrioritySection.setFirstVisibleChild(firstChild); - highPrioritySection.setLastVisibleChild(lastChild); - lowPrioritySection.setFirstVisibleChild(null); - lowPrioritySection.setLastVisibleChild(null); - } else { - highPrioritySection.setFirstVisibleChild(null); - highPrioritySection.setLastVisibleChild(null); - lowPrioritySection.setFirstVisibleChild(firstChild); - lowPrioritySection.setLastVisibleChild(lastChild); - } - return lastHighPriorityChild != previousLastHighPriorityChild - || firstLowPriorityChild != previousFirstLowPriorityChild; - } else { - highPrioritySection.setFirstVisibleChild(firstChild); - highPrioritySection.setLastVisibleChild(lastChild); - return false; - } - } - @ShadeViewRefactor(RefactorComponent.COORDINATOR) private void onViewAddedInternal(ExpandableView child) { updateHideSensitiveForChild(child); @@ -4595,11 +4540,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd return mAmbientState.isDimmed(); } - @VisibleForTesting - int getSectionBoundaryIndex(int boundaryNum) { - return mAmbientState.getSectionBoundaryIndex(boundaryNum); - } - @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) private void setDimAmount(float dimAmount) { mDimAmount = dimAmount; @@ -4984,7 +4924,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd } else { child.setMinClipTopAmount(0); } - previousChildWillBeDismissed = canChildBeDismissed(child); + previousChildWillBeDismissed = StackScrollAlgorithm.canChildBeDismissed(child); } } @@ -5540,7 +5480,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd } @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) - public void clearAllNotifications() { + private void clearNotifications( + @SelectedRows int selection, + boolean closeShade) { // animate-swipe all dismissable notifications, then animate the shade closed int numChildren = getChildCount(); @@ -5552,7 +5494,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd ExpandableNotificationRow row = (ExpandableNotificationRow) child; boolean parentVisible = false; boolean hasClipBounds = child.getClipBounds(mTmpRect); - if (canChildBeDismissed(child)) { + if (includeChildInDismissAll(row, selection)) { viewsToRemove.add(row); if (child.getVisibility() == View.VISIBLE && (!hasClipBounds || mTmpRect.height() > 0)) { @@ -5566,51 +5508,94 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd List<ExpandableNotificationRow> children = row.getNotificationChildren(); if (children != null) { for (ExpandableNotificationRow childRow : children) { - viewsToRemove.add(childRow); - if (parentVisible && row.areChildrenExpanded() - && canChildBeDismissed(childRow)) { - hasClipBounds = childRow.getClipBounds(mTmpRect); - if (childRow.getVisibility() == View.VISIBLE - && (!hasClipBounds || mTmpRect.height() > 0)) { - viewsToHide.add(childRow); + if (includeChildInDismissAll(row, selection)) { + viewsToRemove.add(childRow); + if (parentVisible && row.areChildrenExpanded()) { + hasClipBounds = childRow.getClipBounds(mTmpRect); + if (childRow.getVisibility() == View.VISIBLE + && (!hasClipBounds || mTmpRect.height() > 0)) { + viewsToHide.add(childRow); + } } } } } } } + if (viewsToRemove.isEmpty()) { - mStatusBar.animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE); + if (closeShade) { + mStatusBar.animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE); + } return; } - mShadeController.addPostCollapseAction(() -> { - setDismissAllInProgress(false); + performDismissAllAnimations(viewsToHide, closeShade, () -> { for (ExpandableNotificationRow rowToRemove : viewsToRemove) { - if (canChildBeDismissed(rowToRemove)) { - mEntryManager.removeNotification(rowToRemove.getEntry().key, null /* ranking */, - NotificationListenerService.REASON_CANCEL_ALL); + if (StackScrollAlgorithm.canChildBeDismissed(rowToRemove)) { + if (selection == ROWS_ALL) { + // TODO: This is a listener method; we shouldn't be calling it. Can we just + // call performRemoveNotification as below? + mEntryManager.removeNotification( + rowToRemove.getEntry().key, + null /* ranking */, + NotificationListenerService.REASON_CANCEL_ALL); + } else { + mEntryManager.performRemoveNotification( + rowToRemove.getEntry().notification, + NotificationListenerService.REASON_CANCEL_ALL); + } } else { rowToRemove.resetTranslation(); } } - try { - mBarService.onClearAllNotifications(mLockscreenUserManager.getCurrentUserId()); - } catch (Exception ex) { + if (selection == ROWS_ALL) { + try { + mBarService.onClearAllNotifications(mLockscreenUserManager.getCurrentUserId()); + } catch (Exception ex) { + } } }); + } - performDismissAllAnimations(viewsToHide); + private boolean includeChildInDismissAll( + ExpandableNotificationRow row, + @SelectedRows int selection) { + return StackScrollAlgorithm.canChildBeDismissed(row) && matchesSelection(row, selection); } + /** + * Given a list of rows, animates them away in a staggered fashion as if they were dismissed. + * Doesn't actually dismiss them, though -- that must be done in the onAnimationComplete + * handler. + * + * @param hideAnimatedList List of rows to animated away. Should only be views that are + * currently visible, or else the stagger will look funky. + * @param closeShade Whether to close the shade after the stagger animation completes. + * @param onAnimationComplete Called after the entire animation completes (including the shade + * closing if appropriate). The rows must be dismissed for real here. + */ @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) - public void performDismissAllAnimations(ArrayList<View> hideAnimatedList) { - Runnable animationFinishAction = () -> { - mStatusBar.animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE); + private void performDismissAllAnimations( + final ArrayList<View> hideAnimatedList, + final boolean closeShade, + final Runnable onAnimationComplete) { + + final Runnable onSlideAwayAnimationComplete = () -> { + if (closeShade) { + mShadeController.addPostCollapseAction(() -> { + setDismissAllInProgress(false); + onAnimationComplete.run(); + }); + mStatusBar.animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE); + } else { + setDismissAllInProgress(false); + onAnimationComplete.run(); + } }; if (hideAnimatedList.isEmpty()) { - animationFinishAction.run(); + onSlideAwayAnimationComplete.run(); return; } @@ -5627,7 +5612,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd View view = hideAnimatedList.get(i); Runnable endRunnable = null; if (i == 0) { - endRunnable = animationFinishAction; + endRunnable = onSlideAwayAnimationComplete; } dismissViewAnimated(view, endRunnable, totalDelay, ANIMATION_DURATION_SWIPE); currentDelay = Math.max(50, currentDelay - rowDelayDecrement); @@ -5642,7 +5627,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd R.layout.status_bar_notification_footer, this, false); footerView.setDismissButtonClickListener(v -> { mMetricsLogger.action(MetricsEvent.ACTION_DISMISS_ALL_NOTES); - clearAllNotifications(); + clearNotifications(ROWS_ALL, true /* closeShade */); }); footerView.setManageButtonClickListener(this::manageNotifications); setFooterView(footerView); @@ -5813,27 +5798,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd /** Updates the indices of the boundaries between sections. */ @ShadeViewRefactor(RefactorComponent.INPUT) public void updateSectionBoundaries() { - int gapIndex = -1; - if (NotificationUtils.useNewInterruptionModel(mContext)) { - int currentIndex = 0; - final int n = getChildCount(); - for (int i = 0; i < n; i++) { - View view = getChildAt(i); - if (view.getVisibility() == View.GONE - || !(view instanceof ExpandableNotificationRow)) { - continue; - } - ExpandableNotificationRow row = (ExpandableNotificationRow) view; - if (!row.getEntry().isHighPriority()) { - if (currentIndex > 0) { - gapIndex = currentIndex; - } - break; - } - currentIndex++; - } - } - mAmbientState.setSectionBoundaryIndex(0, gapIndex); + mSectionsManager.updateSectionBoundaries(); } private void updateContinuousBackgroundDrawing() { @@ -5869,6 +5834,21 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd mSwipeHelper.resetExposedMenuView(animate, force); } + private static boolean matchesSelection( + ExpandableNotificationRow row, + @SelectedRows int selection) { + switch (selection) { + case ROWS_ALL: + return true; + case ROWS_HIGH_PRIORITY: + return row.getEntry().isHighPriority(); + case ROWS_GENTLE: + return !row.getEntry().isHighPriority(); + default: + throw new IllegalArgumentException("Unknown selection: " + selection); + } + } + @ShadeViewRefactor(RefactorComponent.STATE_RESOLVER) static class AnimationEvent { @@ -6353,7 +6333,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd @Override public boolean canChildBeDismissed(View v) { - return NotificationStackScrollLayout.this.canChildBeDismissed(v); + return StackScrollAlgorithm.canChildBeDismissed(v); } @Override @@ -6560,4 +6540,15 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd public ExpandHelper.Callback getExpandHelperCallback() { return mExpandHelperCallback; } + + /** Enum for selecting some or all notification rows (does not included non-notif views). */ + @Retention(SOURCE) + @IntDef({ROWS_ALL, ROWS_HIGH_PRIORITY, ROWS_GENTLE}) + public @interface SelectedRows {} + /** All rows representing notifs. */ + public static final int ROWS_ALL = 0; + /** Only rows where entry.isHighPriority() is true. */ + public static final int ROWS_HIGH_PRIORITY = 1; + /** Only rows where entry.isHighPriority() is false. */ + public static final int ROWS_GENTLE = 2; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/SectionHeaderView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/SectionHeaderView.java new file mode 100644 index 000000000000..e2f702dcb732 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/SectionHeaderView.java @@ -0,0 +1,93 @@ +/* + * 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.statusbar.notification.stack; + +import android.content.Context; +import android.graphics.RectF; +import android.util.AttributeSet; +import android.view.MotionEvent; +import android.view.View; +import android.widget.ImageView; +import android.widget.TextView; + +import com.android.systemui.R; +import com.android.systemui.statusbar.notification.row.ActivatableNotificationView; + +/** + * Similar in size and appearance to the NotificationShelf, appears at the beginning of some + * notification sections. Currently only used for gentle notifications. + */ +public class SectionHeaderView extends ActivatableNotificationView { + private View mContents; + private TextView mLabelView; + private ImageView mClearAllButton; + + private final RectF mTmpRect = new RectF(); + + public SectionHeaderView(Context context, AttributeSet attrs) { + super(context, attrs); + } + + @Override + protected void onFinishInflate() { + super.onFinishInflate(); + mContents = findViewById(R.id.content); + mLabelView = findViewById(R.id.header_label); + mClearAllButton = findViewById(R.id.btn_clear_all); + } + + @Override + protected View getContentView() { + return mContents; + } + + /** Must be called whenever the UI mode changes (i.e. when we enter night mode). */ + void onUiModeChanged() { + updateBackgroundColors(); + mLabelView.setTextColor( + getContext().getColor(R.color.notification_section_header_label_color)); + mClearAllButton.setImageResource( + R.drawable.status_bar_notification_section_header_clear_btn); + } + + void setAreThereDismissableGentleNotifs(boolean areThereDismissableGentleNotifs) { + mClearAllButton.setVisibility(areThereDismissableGentleNotifs ? View.VISIBLE : View.GONE); + } + + @Override + protected boolean disallowSingleClick(MotionEvent event) { + // Disallow single click on lockscreen if user is tapping on clear all button + mTmpRect.set( + mClearAllButton.getLeft(), + mClearAllButton.getTop(), + mClearAllButton.getLeft() + mClearAllButton.getWidth(), + mClearAllButton.getTop() + mClearAllButton.getHeight()); + return mTmpRect.contains(event.getX(), event.getY()); + } + + /** + * Fired whenever the user clicks on the body of the header (e.g. no sub-buttons or anything). + */ + void setOnHeaderClickListener(View.OnClickListener listener) { + mContents.setOnClickListener(listener); + } + + /** Fired when the user clicks on the "X" button on the far right of the header. */ + void setOnClearAllClickListener(View.OnClickListener listener) { + mClearAllButton.setOnClickListener(listener); + } +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java index f97a7e653104..60061c6a9ad2 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java @@ -58,7 +58,9 @@ public class StackScrollAlgorithm { private float mHeadsUpInset; private int mPinnedZTranslationExtra; - public StackScrollAlgorithm(Context context, ViewGroup hostView) { + public StackScrollAlgorithm( + Context context, + ViewGroup hostView) { mHostView = hostView; initView(context); } @@ -364,22 +366,15 @@ public class StackScrollAlgorithm { */ private void updatePositionsForState(StackScrollAlgorithmState algorithmState, AmbientState ambientState) { - if (ANCHOR_SCROLLING) { float currentYPosition = algorithmState.anchorViewY; int childCount = algorithmState.visibleChildren.size(); for (int i = algorithmState.anchorViewIndex; i < childCount; i++) { - if (i > algorithmState.anchorViewIndex && ambientState.beginsNewSection(i)) { - currentYPosition += mGapHeight; - } currentYPosition = updateChild(i, algorithmState, ambientState, currentYPosition, false /* reverse */); } currentYPosition = algorithmState.anchorViewY; for (int i = algorithmState.anchorViewIndex - 1; i >= 0; i--) { - if (ambientState.beginsNewSection(i + 1)) { - currentYPosition -= mGapHeight; - } currentYPosition = updateChild(i, algorithmState, ambientState, currentYPosition, true /* reverse */); } @@ -388,9 +383,6 @@ public class StackScrollAlgorithm { float currentYPosition = -algorithmState.scrollY; int childCount = algorithmState.visibleChildren.size(); for (int i = 0; i < childCount; i++) { - if (ambientState.beginsNewSection(i)) { - currentYPosition += mGapHeight; - } currentYPosition = updateChild(i, algorithmState, ambientState, currentYPosition, false /* reverse */); } @@ -421,8 +413,15 @@ public class StackScrollAlgorithm { float currentYPosition, boolean reverse) { ExpandableView child = algorithmState.visibleChildren.get(i); + final boolean applyGapHeight = + childNeedsGapHeight(ambientState.getSectionProvider(), algorithmState, i, child); ExpandableViewState childViewState = child.getViewState(); childViewState.location = ExpandableViewState.LOCATION_UNKNOWN; + + if (applyGapHeight && !reverse) { + currentYPosition += mGapHeight; + } + int paddingAfterChild = getPaddingAfterChild(algorithmState, child); int childHeight = getMaxAllowedChildHeight(child); if (reverse) { @@ -459,6 +458,9 @@ public class StackScrollAlgorithm { if (reverse) { currentYPosition = childViewState.yTranslation; + if (applyGapHeight) { + currentYPosition -= mGapHeight; + } } else { currentYPosition = childViewState.yTranslation + childHeight + paddingAfterChild; if (currentYPosition <= 0) { @@ -473,6 +475,18 @@ public class StackScrollAlgorithm { return currentYPosition; } + private boolean childNeedsGapHeight( + SectionProvider sectionProvider, + StackScrollAlgorithmState algorithmState, + int visibleIndex, + View child) { + boolean needsGapHeight = sectionProvider.beginsSection(child) && visibleIndex > 0; + if (ANCHOR_SCROLLING) { + needsGapHeight &= visibleIndex != algorithmState.anchorViewIndex; + } + return needsGapHeight; + } + protected int getPaddingAfterChild(StackScrollAlgorithmState algorithmState, ExpandableView child) { return algorithmState.getPaddingAfterChild(child); @@ -727,4 +741,15 @@ public class StackScrollAlgorithm { } } + /** + * Interface for telling the SSA when a new notification section begins (so it can add in + * appropriate margins). + */ + public interface SectionProvider { + /** + * True if this view starts a new "section" of notifications, such as the gentle + * notifications section. False if sections are not enabled. + */ + boolean beginsSection(View view); + } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java index 963fc54ecd2d..7ab8da9d2561 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java @@ -84,6 +84,8 @@ public class NavigationBarInflaterView extends FrameLayout public static final String KEY_CODE_END = ")"; private static final String WEIGHT_SUFFIX = "W"; private static final String WEIGHT_CENTERED_SUFFIX = "WC"; + private static final String ABSOLUTE_SUFFIX = "A"; + private static final String ABSOLUTE_VERTICAL_CENTERED_SUFFIX = "C"; private final List<NavBarButtonProvider> mPlugins = new ArrayList<>(); @@ -353,17 +355,20 @@ public class NavigationBarInflaterView extends FrameLayout String sizeStr = extractSize(buttonSpec); if (sizeStr == null) return v; - if (sizeStr.contains(WEIGHT_SUFFIX)) { + if (sizeStr.contains(WEIGHT_SUFFIX) || sizeStr.contains(ABSOLUTE_SUFFIX)) { // To support gravity, wrap in RelativeLayout and apply gravity to it. // Children wanting to use gravity must be smaller then the frame. - float weight = Float.parseFloat(sizeStr.substring(0, sizeStr.indexOf(WEIGHT_SUFFIX))); ReverseRelativeLayout frame = new ReverseRelativeLayout(mContext); LayoutParams childParams = new LayoutParams(v.getLayoutParams()); // Compute gravity to apply int gravity = (landscape) ? (start ? Gravity.TOP : Gravity.BOTTOM) : (start ? Gravity.START : Gravity.END); - if (sizeStr.endsWith(WEIGHT_CENTERED_SUFFIX)) gravity = Gravity.CENTER; + if (sizeStr.endsWith(WEIGHT_CENTERED_SUFFIX)) { + gravity = Gravity.CENTER; + } else if (sizeStr.endsWith(ABSOLUTE_VERTICAL_CENTERED_SUFFIX)) { + gravity = Gravity.CENTER_VERTICAL; + } // Set default gravity, flipped if needed in reversed layouts (270 RTL and 90 LTR) frame.setDefaultGravity(gravity); @@ -371,8 +376,16 @@ public class NavigationBarInflaterView extends FrameLayout frame.addView(v, childParams); - // Use weighting to set the width of the frame - frame.setLayoutParams(new LinearLayout.LayoutParams(0, MATCH_PARENT, weight)); + if (sizeStr.contains(WEIGHT_SUFFIX)) { + // Use weighting to set the width of the frame + float weight = Float.parseFloat( + sizeStr.substring(0, sizeStr.indexOf(WEIGHT_SUFFIX))); + frame.setLayoutParams(new LinearLayout.LayoutParams(0, MATCH_PARENT, weight)); + } else { + int width = (int) convertDpToPx(mContext, + Float.parseFloat(sizeStr.substring(0, sizeStr.indexOf(ABSOLUTE_SUFFIX)))); + frame.setLayoutParams(new LinearLayout.LayoutParams(width, MATCH_PARENT)); + } // Ensure ripples can be drawn outside bounds frame.setClipChildren(false); @@ -490,8 +503,6 @@ public class NavigationBarInflaterView extends FrameLayout } } - - private void clearViews() { if (mButtonDispatchers != null) { for (int i = 0; i < mButtonDispatchers.size(); i++) { @@ -508,6 +519,10 @@ public class NavigationBarInflaterView extends FrameLayout } } + private static float convertDpToPx(Context context, float dp) { + return dp * context.getResources().getDisplayMetrics().density; + } + @Override public void onPluginConnected(NavBarButtonProvider plugin, Context context) { mPlugins.add(plugin); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java index 9d24e1efc66a..168813a02252 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -18,6 +18,7 @@ package com.android.systemui.statusbar.phone; import static com.android.systemui.SysUiServiceProvider.getComponent; import static com.android.systemui.statusbar.notification.ActivityLaunchAnimator.ExpandAnimationParameters; +import static com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout.ROWS_ALL; import static com.android.systemui.util.InjectionInflationController.VIEW_CONTEXT; import android.animation.Animator; @@ -2992,7 +2993,7 @@ public class NotificationPanelView extends PanelView implements } public boolean hasActiveClearableNotifications() { - return mNotificationStackScroller.hasActiveClearableNotifications(); + return mNotificationStackScroller.hasActiveClearableNotifications(ROWS_ALL); } @Override 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 27368deac847..50e406f5936e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java @@ -86,7 +86,7 @@ public class PhoneStatusBarPolicy private static final String TAG = "PhoneStatusBarPolicy"; private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG); - public static final int LOCATION_STATUS_ICON_ID = R.drawable.stat_sys_location; + public static final int LOCATION_STATUS_ICON_ID = PrivacyType.TYPE_LOCATION.getIconId(); private final String mSlotCast; private final String mSlotHotspot; @@ -230,10 +230,10 @@ public class PhoneStatusBarPolicy mIconController.setIconVisibility(mSlotDataSaver, false); // privacy items - mIconController.setIcon(mSlotMicrophone, R.drawable.stat_sys_mic_none, + mIconController.setIcon(mSlotMicrophone, PrivacyType.TYPE_MICROPHONE.getIconId(), PrivacyType.TYPE_MICROPHONE.getName(mContext)); mIconController.setIconVisibility(mSlotMicrophone, false); - mIconController.setIcon(mSlotCamera, R.drawable.stat_sys_camera, + mIconController.setIcon(mSlotCamera, PrivacyType.TYPE_CAMERA.getIconId(), PrivacyType.TYPE_CAMERA.getName(mContext)); mIconController.setIconVisibility(mSlotCamera, false); mIconController.setIcon(mSlotLocation, LOCATION_STATUS_ICON_ID, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java index c01367a4d213..776be00f8ea4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -3487,7 +3487,7 @@ public class StatusBar extends SystemUI implements DemoMode, // TODO: Figure out way to remove these. public NavigationBarView getNavigationBarView() { - return mNavigationBarController.getDefaultNavigationBarView(); + return mNavigationBarController.getNavigationBarView(mDisplayId); } /** diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonDrawable.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonDrawable.java index 2bfc311f1bd4..568de63b0112 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonDrawable.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonDrawable.java @@ -34,7 +34,6 @@ import android.graphics.PorterDuff; import android.graphics.PorterDuff.Mode; import android.graphics.PorterDuffColorFilter; import android.graphics.Rect; -import android.graphics.RectF; import android.graphics.drawable.AnimatedVectorDrawable; import android.graphics.drawable.Drawable; import android.util.FloatProperty; @@ -79,7 +78,6 @@ public class KeyButtonDrawable extends Drawable { private final Paint mIconPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG); private final Paint mShadowPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG); - private final Paint mOvalBgPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG); private final ShadowDrawableState mState; private AnimatedVectorDrawable mAnimatedDrawable; @@ -101,7 +99,6 @@ public class KeyButtonDrawable extends Drawable { mAnimatedDrawable = (AnimatedVectorDrawable) mState.mChildState.newDrawable().mutate(); setDrawableBounds(mAnimatedDrawable); } - mOvalBgPaint.setColor(mState.mDarkColor); } public void setDarkIntensity(float intensity) { @@ -215,6 +212,15 @@ public class KeyButtonDrawable extends Drawable { return mState.mBaseWidth + (mState.mShadowSize + Math.abs(mState.mShadowOffsetX)) * 2; } + /** Return if the drawable has oval background. */ + public boolean hasOvalBg() { + return mState.mHasOvalBg; + } + + public int getDarkColor() { + return mState.mDarkColor; + } + public boolean canAnimate() { return mState.mSupportsAnimation; } @@ -244,10 +250,6 @@ public class KeyButtonDrawable extends Drawable { return; } - if (mState.mHasOvalBg) { - canvas.drawOval(new RectF(bounds), mOvalBgPaint); - } - if (mAnimatedDrawable != null) { mAnimatedDrawable.draw(canvas); } else { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java index 8b869969e215..0db76ecf67fb 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java @@ -73,6 +73,13 @@ public class KeyButtonRipple extends Drawable { private final HashSet<Animator> mRunningAnimations = new HashSet<>(); private final ArrayList<Animator> mTmpArray = new ArrayList<>(); + public enum Type { + OVAL, + ROUNDED_RECT + } + + private Type mType = Type.ROUNDED_RECT; + public KeyButtonRipple(Context ctx, View targetView) { mMaxWidth = ctx.getResources().getDimensionPixelSize(R.dimen.key_button_ripple_max_width); mTargetView = targetView; @@ -86,6 +93,10 @@ public class KeyButtonRipple extends Drawable { mDelayTouchFeedback = delay; } + public void setType(Type type) { + mType = type; + } + private Paint getRipplePaint() { if (mRipplePaint == null) { mRipplePaint = new Paint(); @@ -111,9 +122,15 @@ public class KeyButtonRipple extends Drawable { final float ry = horizontal ? cy : radius; final float corner = horizontal ? cy : cx; - canvas.drawRoundRect(cx - rx, cy - ry, - cx + rx, cy + ry, - corner, corner, p); + if (mType == Type.ROUNDED_RECT) { + canvas.drawRoundRect(cx - rx, cy - ry, cx + rx, cy + ry, corner, corner, p); + } else { + canvas.save(); + canvas.translate(cx, cy); + float r = Math.min(rx, ry); + canvas.drawOval(-r, -r, r, r, p); + canvas.restore(); + } } } @@ -148,8 +165,16 @@ public class KeyButtonRipple extends Drawable { private void drawHardware(RecordingCanvas c) { if (mDrawingHardwareGlow) { - c.drawRoundRect(mLeftProp, mTopProp, mRightProp, mBottomProp, mRxProp, mRyProp, - mPaintProp); + if (mType == Type.ROUNDED_RECT) { + c.drawRoundRect(mLeftProp, mTopProp, mRightProp, mBottomProp, mRxProp, mRyProp, + mPaintProp); + } else { + CanvasProperty<Float> cx = CanvasProperty.createFloat(getBounds().width() / 2); + CanvasProperty<Float> cy = CanvasProperty.createFloat(getBounds().height() / 2); + int d = Math.min(getBounds().width(), getBounds().height()); + CanvasProperty<Float> r = CanvasProperty.createFloat(1.0f * d / 2); + c.drawCircle(cx, cy, r, mPaintProp); + } } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java index 41fa34608ee8..22a0b991ffae 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java @@ -25,6 +25,8 @@ import android.app.ActivityManager; import android.content.Context; import android.content.res.Configuration; import android.content.res.TypedArray; +import android.graphics.Canvas; +import android.graphics.Paint; import android.graphics.drawable.Drawable; import android.graphics.drawable.Icon; import android.hardware.input.InputManager; @@ -76,6 +78,8 @@ public class KeyButtonView extends ImageView implements ButtonInterface { private final OverviewProxyService mOverviewProxyService; private final MetricsLogger mMetricsLogger = Dependency.get(MetricsLogger.class); private final InputManager mInputManager; + private final Paint mOvalBgPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG); + private boolean mHasOvalBg = false; private final Runnable mCheckLongPress = new Runnable() { public void run() { @@ -127,6 +131,7 @@ public class KeyButtonView extends ImageView implements ButtonInterface { mOverviewProxyService = Dependency.get(OverviewProxyService.class); mInputManager = manager; setBackground(mRipple); + setWillNotDraw(false); forceHasOverlappingRendering(false); } @@ -357,7 +362,14 @@ public class KeyButtonView extends ImageView implements ButtonInterface { public void setDarkIntensity(float darkIntensity) { Drawable drawable = getDrawable(); if (drawable != null) { - ((KeyButtonDrawable) getDrawable()).setDarkIntensity(darkIntensity); + KeyButtonDrawable keyButtonDrawable = (KeyButtonDrawable) drawable; + keyButtonDrawable.setDarkIntensity(darkIntensity); + mHasOvalBg = keyButtonDrawable.hasOvalBg(); + if (mHasOvalBg) { + mOvalBgPaint.setColor(keyButtonDrawable.getDarkColor()); + } + mRipple.setType(keyButtonDrawable.hasOvalBg() ? KeyButtonRipple.Type.OVAL + : KeyButtonRipple.Type.ROUNDED_RECT); // Since we reuse the same drawable for multiple views, we need to invalidate the view // manually. @@ -372,9 +384,22 @@ public class KeyButtonView extends ImageView implements ButtonInterface { } @Override + public void draw(Canvas canvas) { + if (mHasOvalBg) { + canvas.save(); + int cx = (getLeft() + getRight()) / 2; + int cy = (getTop() + getBottom()) / 2; + canvas.translate(cx, cy); + int d = Math.min(getWidth(), getHeight()); + int r = d / 2; + canvas.drawOval(-r, -r, r, r, mOvalBgPaint); + canvas.restore(); + } + super.draw(canvas); + } + + @Override public void setVertical(boolean vertical) { mIsVertical = vertical; } } - - diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java index c398ad82e0a9..c08390fa53a2 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java @@ -284,10 +284,6 @@ public class MobileSignalController extends SignalController< @Override public int getQsCurrentIconId() { - if (mCurrentState.airplaneMode) { - return SignalDrawable.getAirplaneModeState(getNumLevels()); - } - return getCurrentIconId(); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java index 950f07d5cffa..b8a14efa4935 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java @@ -1012,6 +1012,12 @@ public class NetworkControllerImpl extends BroadcastReceiver SignalStrength.NUM_SIGNAL_STRENGTH_BINS); controller.getState().connected = controller.getState().level >= 0; } + if (args.containsKey("inflate")) { + for (int i = 0; i < mMobileSignalControllers.size(); i++) { + mMobileSignalControllers.valueAt(i).mInflateSignalStrengths = + "true".equals(args.getString("inflate")); + } + } String activity = args.getString("activity"); if (activity != null) { controller.getState().dataConnected = true; diff --git a/packages/SystemUI/tests/res/values/overlayable_icons_test.xml b/packages/SystemUI/tests/res/values/overlayable_icons_test.xml index 4dc8d45a9d53..ba651ac82dc9 100644 --- a/packages/SystemUI/tests/res/values/overlayable_icons_test.xml +++ b/packages/SystemUI/tests/res/values/overlayable_icons_test.xml @@ -20,6 +20,7 @@ <array name="overlayable_icons"> <item>@drawable/ic_alarm</item> <item>@drawable/ic_alarm_dim</item> + <item>@drawable/ic_arrow_back</item> <item>@drawable/ic_bluetooth_connected</item> <item>@drawable/ic_brightness_thumb</item> <item>@drawable/ic_camera</item> @@ -62,6 +63,7 @@ <item>@drawable/ic_volume_ringer_mute</item> <item>@drawable/ic_volume_ringer_vibrate</item> <item>@drawable/ic_volume_voice</item> + <item>@drawable/stat_sys_managed_profile_status</item> <item>@drawable/stat_sys_mic_none</item> <item>@drawable/stat_sys_vpn_ic</item> </array> diff --git a/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleControllerTest.java index 2d697e34c626..35a15167d207 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleControllerTest.java @@ -296,22 +296,22 @@ public class BubbleControllerTest extends SysuiTestCase { BubbleStackView stackView = mBubbleController.getStackView(); mBubbleController.expandStack(); assertTrue(mBubbleController.isStackExpanded()); - verify(mBubbleExpandListener).onBubbleExpandChanged(true, mRow.getEntry().key); - - // First added is the one that is expanded - assertEquals(mRow.getEntry(), stackView.getExpandedBubbleView().getEntry()); - assertFalse(mRow.getEntry().showInShadeWhenBubble()); + verify(mBubbleExpandListener).onBubbleExpandChanged(true, mRow2.getEntry().key); - // Switch which bubble is expanded - mBubbleController.selectBubble(mRow2.getEntry().key); - stackView.setExpandedBubble(mRow2.getEntry()); + // Last added is the one that is expanded assertEquals(mRow2.getEntry(), stackView.getExpandedBubbleView().getEntry()); assertFalse(mRow2.getEntry().showInShadeWhenBubble()); + // Switch which bubble is expanded + mBubbleController.selectBubble(mRow.getEntry().key); + stackView.setExpandedBubble(mRow.getEntry()); + assertEquals(mRow.getEntry(), stackView.getExpandedBubbleView().getEntry()); + assertFalse(mRow.getEntry().showInShadeWhenBubble()); + // collapse for previous bubble - verify(mBubbleExpandListener).onBubbleExpandChanged(false, mRow.getEntry().key); + verify(mBubbleExpandListener).onBubbleExpandChanged(false, mRow2.getEntry().key); // expand for selected bubble - verify(mBubbleExpandListener).onBubbleExpandChanged(true, mRow2.getEntry().key); + verify(mBubbleExpandListener).onBubbleExpandChanged(true, mRow.getEntry().key); // Collapse mBubbleController.collapseStack(); @@ -352,27 +352,27 @@ public class BubbleControllerTest extends SysuiTestCase { mBubbleController.expandStack(); assertTrue(mBubbleController.isStackExpanded()); - verify(mBubbleExpandListener).onBubbleExpandChanged(true, mRow.getEntry().key); + verify(mBubbleExpandListener).onBubbleExpandChanged(true, mRow2.getEntry().key); - // First added is the one that is expanded - assertEquals(mRow.getEntry(), stackView.getExpandedBubbleView().getEntry()); - assertFalse(mRow.getEntry().showInShadeWhenBubble()); + // Last added is the one that is expanded + assertEquals(mRow2.getEntry(), stackView.getExpandedBubbleView().getEntry()); + assertFalse(mRow2.getEntry().showInShadeWhenBubble()); // Dismiss currently expanded mBubbleController.removeBubble(stackView.getExpandedBubbleView().getKey(), BubbleController.DISMISS_USER_GESTURE); - verify(mBubbleExpandListener).onBubbleExpandChanged(false, mRow.getEntry().key); + verify(mBubbleExpandListener).onBubbleExpandChanged(false, mRow2.getEntry().key); - // Make sure next bubble is selected - assertEquals(mRow2.getEntry(), stackView.getExpandedBubbleView().getEntry()); - verify(mBubbleExpandListener).onBubbleExpandChanged(true, mRow2.getEntry().key); + // Make sure first bubble is selected + assertEquals(mRow.getEntry(), stackView.getExpandedBubbleView().getEntry()); + verify(mBubbleExpandListener).onBubbleExpandChanged(true, mRow.getEntry().key); // Dismiss that one mBubbleController.removeBubble(stackView.getExpandedBubbleView().getKey(), BubbleController.DISMISS_USER_GESTURE); // Make sure state changes and collapse happens - verify(mBubbleExpandListener).onBubbleExpandChanged(false, mRow2.getEntry().key); + verify(mBubbleExpandListener).onBubbleExpandChanged(false, mRow.getEntry().key); verify(mBubbleStateChangeListener).onHasBubblesChanged(false); assertFalse(mBubbleController.hasBubbles()); } diff --git a/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleDataTest.java b/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleDataTest.java index d6dac2f36ba1..33b2e6e59470 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleDataTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleDataTest.java @@ -16,12 +16,18 @@ package com.android.systemui.bubbles; +import static com.android.systemui.bubbles.BubbleController.DISMISS_AGED; + import static com.google.common.truth.Truth.assertThat; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyBoolean; +import static org.mockito.ArgumentMatchers.anyList; import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.ArgumentMatchers.isNull; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; +import static org.mockito.Mockito.reset; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -48,6 +54,8 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.MockitoAnnotations; +import java.util.List; + @SmallTest @RunWith(AndroidTestingRunner.class) @TestableLooper.RunWithLooper(setAsMainLooper = true) @@ -108,61 +116,11 @@ public class BubbleDataTest extends SysuiTestCase { // Used by BubbleData to set lastAccessedTime when(mTimeSource.currentTimeMillis()).thenReturn(1000L); mBubbleData.setTimeSource(mTimeSource); - } - - private NotificationEntry createBubbleEntry(int userId, String notifKey, String packageName) { - return createBubbleEntry(userId, notifKey, packageName, 1000); - } - - private void setPostTime(NotificationEntry entry, long postTime) { - when(entry.notification.getPostTime()).thenReturn(postTime); - } - - private void setOngoing(NotificationEntry entry, boolean ongoing) { - if (ongoing) { - entry.notification.getNotification().flags |= Notification.FLAG_FOREGROUND_SERVICE; - } else { - entry.notification.getNotification().flags &= ~Notification.FLAG_FOREGROUND_SERVICE; - } - } - /** - * No ExpandableNotificationRow is required to test BubbleData. This setup is all that is - * required for BubbleData functionality and verification. NotificationTestHelper is used only - * as a convenience to create a Notification w/BubbleMetadata. - */ - private NotificationEntry createBubbleEntry(int userId, String notifKey, String packageName, - long postTime) { - // BubbleMetadata - Notification.BubbleMetadata bubbleMetadata = new Notification.BubbleMetadata.Builder() - .setIntent(mExpandIntent) - .setDeleteIntent(mDeleteIntent) - .setIcon(Icon.createWithResource("", 0)) - .build(); - // Notification -> BubbleMetadata - Notification notification = mNotificationTestHelper.createNotification(false, - null /* groupKey */, bubbleMetadata); - - // StatusBarNotification - StatusBarNotification sbn = mock(StatusBarNotification.class); - when(sbn.getKey()).thenReturn(notifKey); - when(sbn.getUser()).thenReturn(new UserHandle(userId)); - when(sbn.getPackageName()).thenReturn(packageName); - when(sbn.getPostTime()).thenReturn(postTime); - when(sbn.getNotification()).thenReturn(notification); - - // NotificationEntry -> StatusBarNotification -> Notification -> BubbleMetadata - return new NotificationEntry(sbn); - } - - private void sendUpdatedEntryAtTime(NotificationEntry entry, long postTime) { - setPostTime(entry, postTime); - mBubbleData.notificationEntryUpdated(entry); - } - - private void changeExpandedStateAtTime(boolean shouldBeExpanded, long time) { - when(mTimeSource.currentTimeMillis()).thenReturn(time); - mBubbleData.setExpanded(shouldBeExpanded); + // Assert baseline starting state + assertThat(mBubbleData.hasBubbles()).isFalse(); + assertThat(mBubbleData.isExpanded()).isFalse(); + assertThat(mBubbleData.getSelectedBubble()).isNull(); } @Test @@ -171,8 +129,7 @@ public class BubbleDataTest extends SysuiTestCase { mBubbleData.setListener(mListener); // Test - setPostTime(mEntryA1, 1000); - mBubbleData.notificationEntryUpdated(mEntryA1); + sendUpdatedEntryAtTime(mEntryA1, 1000); // Verify verify(mListener).onBubbleAdded(eq(mBubbleA1)); @@ -183,9 +140,9 @@ public class BubbleDataTest extends SysuiTestCase { @Test public void testRemoveBubble() { // Setup - mBubbleData.notificationEntryUpdated(mEntryA1); - mBubbleData.notificationEntryUpdated(mEntryA2); - mBubbleData.notificationEntryUpdated(mEntryA3); + sendUpdatedEntryAtTime(mEntryA1, 1000); + sendUpdatedEntryAtTime(mEntryA2, 2000); + sendUpdatedEntryAtTime(mEntryA3, 3000); mBubbleData.setListener(mListener); // Test @@ -193,515 +150,657 @@ public class BubbleDataTest extends SysuiTestCase { // Verify verify(mListener).onBubbleRemoved(eq(mBubbleA1), eq(BubbleController.DISMISS_USER_GESTURE)); - verify(mListener).onSelectionChanged(eq(mBubbleA2)); verify(mListener).apply(); } + // COLLAPSED / ADD + + /** + * Verifies that the number of bubbles is not allowed to exceed the maximum. The limit is + * enforced by expiring the bubble which was least recently updated (lowest timestamp). + */ @Test - public void test_collapsed_addBubble_atMaxBubbles_expiresLeastActive() { - // Given + public void test_collapsed_addBubble_atMaxBubbles_expiresOldest() { + // Setup sendUpdatedEntryAtTime(mEntryA1, 1000); sendUpdatedEntryAtTime(mEntryA2, 2000); sendUpdatedEntryAtTime(mEntryA3, 3000); sendUpdatedEntryAtTime(mEntryB1, 4000); sendUpdatedEntryAtTime(mEntryB2, 5000); - assertThat(mBubbleData.getSelectedBubble()).isEqualTo(mBubbleA1); + mBubbleData.setListener(mListener); - // When + // Test sendUpdatedEntryAtTime(mEntryC1, 6000); - - // Then - // A2 is removed. A1 is oldest but is the selected bubble. - assertThat(mBubbleData.getBubbles()).doesNotContain(mBubbleA2); - } - - @Test - public void test_collapsed_expand_whenEmpty_doesNothing() { - assertThat(mBubbleData.hasBubbles()).isFalse(); - changeExpandedStateAtTime(true, 2000L); - - verify(mListener, never()).onExpandedChanged(anyBoolean()); - verify(mListener, never()).apply(); + verify(mListener).onBubbleRemoved(eq(mBubbleA1), eq(DISMISS_AGED)); } - // New bubble while stack is collapsed + /** + * Verifies that new bubbles insert to the left when collapsed, carrying along grouped bubbles. + * <p> + * Placement within the list is based on lastUpdate (post time of the notification), descending + * order (with most recent first). + * + * @see #test_expanded_addBubble_sortAndGrouping_newGroup() + * @see #test_expanded_addBubble_sortAndGrouping_existingGroup() + */ @Test - public void test_collapsed_addBubble() { - // Given - assertThat(mBubbleData.hasBubbles()).isFalse(); - assertThat(mBubbleData.isExpanded()).isFalse(); + public void test_collapsed_addBubble_sortAndGrouping() { + // Setup + mBubbleData.setListener(mListener); - // When + // Test sendUpdatedEntryAtTime(mEntryA1, 1000); + verify(mListener, never()).onOrderChanged(anyList()); + + reset(mListener); sendUpdatedEntryAtTime(mEntryB1, 2000); + verify(mListener).onOrderChanged(eq(listOf(mBubbleB1, mBubbleA1))); + + reset(mListener); sendUpdatedEntryAtTime(mEntryB2, 3000); - sendUpdatedEntryAtTime(mEntryA2, 4000); + verify(mListener).onOrderChanged(eq(listOf(mBubbleB2, mBubbleB1, mBubbleA1))); - // Then - // New bubbles move to front when collapsed, bringing bubbles from the same app along - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleA2, mBubbleA1, mBubbleB2, mBubbleB1)); + reset(mListener); + sendUpdatedEntryAtTime(mEntryA2, 4000); + verify(mListener).onOrderChanged(eq(listOf(mBubbleA2, mBubbleA1, mBubbleB2, mBubbleB1))); } - // New bubble while collapsed with ongoing bubble present + /** + * Verifies that new bubbles insert to the left when collapsed, carrying along grouped bubbles. + * Additionally, any bubble which is ongoing is considered "newer" than any non-ongoing bubble. + * <p> + * Because of the ongoing bubble, the new bubble cannot be placed in the first position. This + * causes the 'B' group to remain last, despite having a new button added. + * + * @see #test_expanded_addBubble_sortAndGrouping_newGroup() + * @see #test_expanded_addBubble_sortAndGrouping_existingGroup() + */ @Test - public void test_collapsed_addBubble_withOngoing() { - // Given - assertThat(mBubbleData.hasBubbles()).isFalse(); - assertThat(mBubbleData.isExpanded()).isFalse(); + public void test_collapsed_addBubble_sortAndGrouping_withOngoing() { + // Setup + mBubbleData.setListener(mListener); - // When + // Test setOngoing(mEntryA1, true); - setPostTime(mEntryA1, 1000); - mBubbleData.notificationEntryUpdated(mEntryA1); - setPostTime(mEntryB1, 2000); - mBubbleData.notificationEntryUpdated(mEntryB1); - setPostTime(mEntryB2, 3000); - mBubbleData.notificationEntryUpdated(mEntryB2); - setPostTime(mEntryA2, 4000); - mBubbleData.notificationEntryUpdated(mEntryA2); - - // Then - // New bubbles move to front, but stay behind any ongoing bubbles. - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleA1, mBubbleA2, mBubbleB2, mBubbleB1)); - } + sendUpdatedEntryAtTime(mEntryA1, 1000); + verify(mListener, never()).onOrderChanged(anyList()); - // Remove the selected bubble (middle bubble), while the stack is collapsed. - @Test - public void test_collapsed_removeBubble_selected() { - // Given - assertThat(mBubbleData.hasBubbles()).isFalse(); - assertThat(mBubbleData.isExpanded()).isFalse(); + reset(mListener); + sendUpdatedEntryAtTime(mEntryB1, 2000); + verify(mListener, never()).onOrderChanged(eq(listOf(mBubbleA1, mBubbleB1))); - setPostTime(mEntryA1, 1000); - mBubbleData.notificationEntryUpdated(mEntryA1); + reset(mListener); + sendUpdatedEntryAtTime(mEntryB2, 3000); + verify(mListener).onOrderChanged(eq(listOf(mBubbleA1, mBubbleB2, mBubbleB1))); - setPostTime(mEntryB1, 2000); - mBubbleData.notificationEntryUpdated(mEntryB1); + reset(mListener); + sendUpdatedEntryAtTime(mEntryA2, 4000); + verify(mListener).onOrderChanged(eq(listOf(mBubbleA1, mBubbleA2, mBubbleB2, mBubbleB1))); + } - setPostTime(mEntryB2, 3000); - mBubbleData.notificationEntryUpdated(mEntryB2); + /** + * Verifies that new bubbles become the selected bubble when they appear when the stack is in + * the collapsed state. + * + * @see #test_collapsed_updateBubble_selectionChanges() + * @see #test_collapsed_updateBubble_noSelectionChanges_withOngoing() + */ + @Test + public void test_collapsed_addBubble_selectionChanges() { + // Setup + mBubbleData.setListener(mListener); - setPostTime(mEntryA2, 4000); - mBubbleData.notificationEntryUpdated(mEntryA2); + // Test + sendUpdatedEntryAtTime(mEntryA1, 1000); + verify(mListener).onSelectionChanged(eq(mBubbleA1)); - mBubbleData.setSelectedBubble(mBubbleB2); - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleA2, mBubbleA1, mBubbleB2, mBubbleB1)); + reset(mListener); + sendUpdatedEntryAtTime(mEntryB1, 2000); + verify(mListener).onSelectionChanged(eq(mBubbleB1)); - // When - mBubbleData.notificationEntryRemoved(mEntryB2, BubbleController.DISMISS_USER_GESTURE); + reset(mListener); + sendUpdatedEntryAtTime(mEntryB2, 3000); + verify(mListener).onSelectionChanged(eq(mBubbleB2)); - // Then - // (Selection remains in the same position) - assertThat(mBubbleData.getSelectedBubble()).isEqualTo(mBubbleB1); + reset(mListener); + sendUpdatedEntryAtTime(mEntryA2, 4000); + verify(mListener).onSelectionChanged(eq(mBubbleA2)); } - - // Remove the selected bubble (last bubble), while the stack is collapsed. + /** + * Verifies that while collapsed, the selection will not change if the selected bubble is + * ongoing. It remains the top bubble and as such remains selected. + * + * @see #test_collapsed_addBubble_selectionChanges() + */ @Test - public void test_collapsed_removeSelectedBubble_inLastPosition() { - // Given - assertThat(mBubbleData.hasBubbles()).isFalse(); - assertThat(mBubbleData.isExpanded()).isFalse(); - + public void test_collapsed_addBubble_noSelectionChanges_withOngoing() { + // Setup + setOngoing(mEntryA1, true); sendUpdatedEntryAtTime(mEntryA1, 1000); + assertThat(mBubbleData.getSelectedBubble()).isEqualTo(mBubbleA1); + mBubbleData.setListener(mListener); + + // Test sendUpdatedEntryAtTime(mEntryB1, 2000); sendUpdatedEntryAtTime(mEntryB2, 3000); sendUpdatedEntryAtTime(mEntryA2, 4000); - - mBubbleData.setSelectedBubble(mBubbleB1); - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleA2, mBubbleA1, mBubbleB2, mBubbleB1)); - - // When - mBubbleData.notificationEntryRemoved(mEntryB1, BubbleController.DISMISS_USER_GESTURE); - - // Then - // (Selection is forced to move to previous) - assertThat(mBubbleData.getSelectedBubble()).isEqualTo(mBubbleB2); + verify(mListener, never()).onSelectionChanged(any(Bubble.class)); + assertThat(mBubbleData.getSelectedBubble()).isEqualTo(mBubbleA1); // selection unchanged } - @Test - public void test_collapsed_addBubble_ongoing() { - // Given - assertThat(mBubbleData.hasBubbles()).isFalse(); - assertThat(mBubbleData.isExpanded()).isFalse(); - - // When - setPostTime(mEntryA1, 1000); - mBubbleData.notificationEntryUpdated(mEntryA1); - - setPostTime(mEntryB1, 2000); - mBubbleData.notificationEntryUpdated(mEntryB1); - - setPostTime(mEntryB2, 3000); - setOngoing(mEntryB2, true); - mBubbleData.notificationEntryUpdated(mEntryB2); - - setPostTime(mEntryA2, 4000); - mBubbleData.notificationEntryUpdated(mEntryA2); - - // Then - // New bubbles move to front, but stay behind any ongoing bubbles. - // Does not break grouping. (A2 is inserted after B1, even though it's newer). - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleB2, mBubbleB1, mBubbleA2, mBubbleA1)); - } + // COLLAPSED / REMOVE + /** + * Verifies that groups may reorder when bubbles are removed, while the stack is in the + * collapsed state. + */ @Test - public void test_collapsed_removeBubble() { - // Given - assertThat(mBubbleData.hasBubbles()).isFalse(); - assertThat(mBubbleData.isExpanded()).isFalse(); - + public void test_collapsed_removeBubble_sortAndGrouping() { + // Setup sendUpdatedEntryAtTime(mEntryA1, 1000); sendUpdatedEntryAtTime(mEntryB1, 2000); sendUpdatedEntryAtTime(mEntryB2, 3000); - sendUpdatedEntryAtTime(mEntryA2, 4000); - - // When - mBubbleData.notificationEntryRemoved(mEntryB2, BubbleController.DISMISS_USER_GESTURE); + sendUpdatedEntryAtTime(mEntryA2, 4000); // [A2, A1, B2, B1] + mBubbleData.setListener(mListener); - // Then - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleA2, mBubbleA1, mBubbleB1)); + // Test + mBubbleData.notificationEntryRemoved(mEntryA2, BubbleController.DISMISS_USER_GESTURE); + verify(mListener).onOrderChanged(eq(listOf(mBubbleB2, mBubbleB1, mBubbleA1))); } - @Test - public void test_collapsed_updateBubble() { - // Given - assertThat(mBubbleData.hasBubbles()).isFalse(); - assertThat(mBubbleData.isExpanded()).isFalse(); + /** + * Verifies that onOrderChanged is not called when a bubble is removed if the removal does not + * cause other bubbles to change position. + */ + @Test + public void test_collapsed_removeOldestBubble_doesNotCallOnOrderChanged() { + // Setup sendUpdatedEntryAtTime(mEntryA1, 1000); sendUpdatedEntryAtTime(mEntryB1, 2000); sendUpdatedEntryAtTime(mEntryB2, 3000); - sendUpdatedEntryAtTime(mEntryA2, 4000); - - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleA2, mBubbleA1, mBubbleB2, mBubbleB1)); - - // When - sendUpdatedEntryAtTime(mEntryB2, 5000); + sendUpdatedEntryAtTime(mEntryA2, 4000); // [A2, A1, B2, B1] + mBubbleData.setListener(mListener); - // Then - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleB2, mBubbleB1, mBubbleA2, mBubbleA1)); + // Test + mBubbleData.notificationEntryRemoved(mEntryB1, BubbleController.DISMISS_USER_GESTURE); + verify(mListener, never()).onOrderChanged(anyList()); } + /** + * Verifies that bubble ordering reverts to normal when an ongoing bubble is removed. A group + * which has a newer bubble may move to the front after the ongoing bubble is removed. + */ @Test - public void test_collapsed_updateBubble_withOngoing() { - // Given - assertThat(mBubbleData.hasBubbles()).isFalse(); - assertThat(mBubbleData.isExpanded()).isFalse(); - - setPostTime(mEntryA1, 1000); - mBubbleData.notificationEntryUpdated(mEntryA1); - - setPostTime(mEntryB1, 2000); - mBubbleData.notificationEntryUpdated(mEntryB1); - - setPostTime(mEntryB2, 3000); - mBubbleData.notificationEntryUpdated(mEntryB2); - - setOngoing(mEntryA2, true); - setPostTime(mEntryA2, 4000); - mBubbleData.notificationEntryUpdated(mEntryA2); - - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleA2, mBubbleA1, mBubbleB2, mBubbleB1)); - - // When - setPostTime(mEntryB1, 5000); - mBubbleData.notificationEntryUpdated(mEntryB1); + public void test_collapsed_removeBubble_sortAndGrouping_withOngoing() { + // Setup + setOngoing(mEntryA1, true); + sendUpdatedEntryAtTime(mEntryA1, 1000); + sendUpdatedEntryAtTime(mEntryA2, 2000); + sendUpdatedEntryAtTime(mEntryB1, 3000); + sendUpdatedEntryAtTime(mEntryB2, 4000); // [A1*, A2, B2, B1] + mBubbleData.setListener(mListener); - // Then - // A2 remains in first position, due to being ongoing. B1 moves before B2, Group A - // remains before group B. - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleA2, mBubbleA1, mBubbleB1, mBubbleB2)); + // Test + mBubbleData.notificationEntryRemoved(mEntryA1, BubbleController.DISMISS_NOTIF_CANCEL); + verify(mListener).onOrderChanged(eq(listOf(mBubbleB2, mBubbleB1, mBubbleA2))); } + /** + * Verifies that when the selected bubble is removed with the stack in the collapsed state, + * the selection moves to the next most-recently updated bubble. + */ @Test - public void test_collapse_afterUpdateWhileExpanded() { - // Given - assertThat(mBubbleData.hasBubbles()).isFalse(); - assertThat(mBubbleData.isExpanded()).isFalse(); - + public void test_collapsed_removeBubble_selectionChanges() { + // Setup sendUpdatedEntryAtTime(mEntryA1, 1000); sendUpdatedEntryAtTime(mEntryB1, 2000); sendUpdatedEntryAtTime(mEntryB2, 3000); - sendUpdatedEntryAtTime(mEntryA2, 4000); - - assertThat(mBubbleData.getSelectedBubble()).isEqualTo(mBubbleA1); + sendUpdatedEntryAtTime(mEntryA2, 4000); // [A2, A1, B2, B1] + mBubbleData.setListener(mListener); - changeExpandedStateAtTime(true, 5000L); - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleA2, mBubbleA1, mBubbleB2, mBubbleB1)); + // Test + mBubbleData.notificationEntryRemoved(mEntryA2, BubbleController.DISMISS_NOTIF_CANCEL); + verify(mListener).onSelectionChanged(eq(mBubbleB2)); + } - sendUpdatedEntryAtTime(mEntryB1, 6000); + // COLLAPSED / UPDATE - // (No reordering while expanded) - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleA2, mBubbleA1, mBubbleB2, mBubbleB1)); + /** + * Verifies that bubble and group ordering may change with updates while the stack is in the + * collapsed state. + */ + @Test + public void test_collapsed_updateBubble_orderAndGrouping() { + // Setup + sendUpdatedEntryAtTime(mEntryA1, 1000); + sendUpdatedEntryAtTime(mEntryB1, 2000); + sendUpdatedEntryAtTime(mEntryB2, 3000); + sendUpdatedEntryAtTime(mEntryA2, 4000); // [A2, A1, B2, B1] + mBubbleData.setListener(mListener); - // When - changeExpandedStateAtTime(false, 7000L); + // Test + sendUpdatedEntryAtTime(mEntryB1, 5000); + verify(mListener).onOrderChanged(eq(listOf(mBubbleB1, mBubbleB2, mBubbleA2, mBubbleA1))); - // Then - // A1 moves to front on collapse, since it is the selected bubble (and most recently - // accessed). - // A2 moves next to A1 to maintain grouping. - // B1 moves in front of B2, since it received an update while expanded - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleA1, mBubbleA2, mBubbleB1, mBubbleB2)); + reset(mListener); + sendUpdatedEntryAtTime(mEntryA1, 6000); + verify(mListener).onOrderChanged(eq(listOf(mBubbleA1, mBubbleA2, mBubbleB1, mBubbleB2))); } + /** + * Verifies that selection tracks the most recently updated bubble while in the collapsed state. + */ @Test - public void test_collapse_afterUpdateWhileExpanded_withOngoing() { - // Given - assertThat(mBubbleData.hasBubbles()).isFalse(); - assertThat(mBubbleData.isExpanded()).isFalse(); - + public void test_collapsed_updateBubble_selectionChanges() { + // Setup sendUpdatedEntryAtTime(mEntryA1, 1000); sendUpdatedEntryAtTime(mEntryB1, 2000); - - setOngoing(mEntryB2, true); sendUpdatedEntryAtTime(mEntryB2, 3000); + sendUpdatedEntryAtTime(mEntryA2, 4000); // [A2, A1, B2, B1] + mBubbleData.setListener(mListener); - sendUpdatedEntryAtTime(mEntryA2, 4000); - - assertThat(mBubbleData.getSelectedBubble()).isEqualTo(mBubbleA1); - - changeExpandedStateAtTime(true, 5000L); - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleB2, mBubbleB1, mBubbleA2, mBubbleA1)); + // Test + sendUpdatedEntryAtTime(mEntryB1, 5000); + verify(mListener).onSelectionChanged(eq(mBubbleB1)); + reset(mListener); sendUpdatedEntryAtTime(mEntryA1, 6000); - - // No reordering if expanded - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleB2, mBubbleB1, mBubbleA2, mBubbleA1)); - - // When - changeExpandedStateAtTime(false, 7000L); - - // Then - // B2 remains in first position because it is ongoing. - // B1 remains grouped with B2 - // A1 moves in front of A2, since it is more recently updated (and is selected). - // B1 moves in front of B2, since it has more recent activity. - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleB2, mBubbleB1, mBubbleA1, mBubbleA2)); + verify(mListener).onSelectionChanged(eq(mBubbleA1)); } + /** + * Verifies that selection does not change in response to updates when collapsed, if the + * selected bubble is ongoing. + */ @Test - public void test_collapsed_removeLastBubble_clearsSelectedBubble() { - // Given - assertThat(mBubbleData.hasBubbles()).isFalse(); - assertThat(mBubbleData.isExpanded()).isFalse(); - + public void test_collapsed_updateBubble_noSelectionChanges_withOngoing() { + // Setup + setOngoing(mEntryA1, true); sendUpdatedEntryAtTime(mEntryA1, 1000); sendUpdatedEntryAtTime(mEntryB1, 2000); sendUpdatedEntryAtTime(mEntryB2, 3000); - sendUpdatedEntryAtTime(mEntryA2, 4000); - - assertThat(mBubbleData.getSelectedBubble()).isEqualTo(mBubbleA1); - - mBubbleData.notificationEntryRemoved(mEntryA1, BubbleController.DISMISS_USER_GESTURE); - mBubbleData.notificationEntryRemoved(mEntryB1, BubbleController.DISMISS_USER_GESTURE); - mBubbleData.notificationEntryRemoved(mEntryB2, BubbleController.DISMISS_USER_GESTURE); - mBubbleData.notificationEntryRemoved(mEntryA2, BubbleController.DISMISS_USER_GESTURE); + sendUpdatedEntryAtTime(mEntryA2, 4000); // [A1*, A2, B2, B1] + mBubbleData.setListener(mListener); - assertThat(mBubbleData.getSelectedBubble()).isNull(); + // Test + sendUpdatedEntryAtTime(mEntryB2, 5000); // [A1*, A2, B2, B1] + verify(mListener, never()).onSelectionChanged(any(Bubble.class)); } + /** + * Verifies that a request to expand the stack has no effect if there are no bubbles. + */ @Test - public void test_expanded_addBubble_atMaxBubbles_expiresLeastActive() { - // Given - sendUpdatedEntryAtTime(mEntryA1, 1000); - assertThat(mBubbleData.getSelectedBubble()).isEqualTo(mBubbleA1); - + public void test_collapsed_expansion_whenEmpty_doesNothing() { + assertThat(mBubbleData.hasBubbles()).isFalse(); changeExpandedStateAtTime(true, 2000L); - assertThat(mBubbleData.getSelectedBubble().getLastActivity()).isEqualTo(2000); - sendUpdatedEntryAtTime(mEntryA2, 3000); - sendUpdatedEntryAtTime(mEntryA3, 4000); - sendUpdatedEntryAtTime(mEntryB1, 5000); - sendUpdatedEntryAtTime(mEntryB2, 6000); - sendUpdatedEntryAtTime(mEntryB3, 7000); - - - // Then - // A1 would be removed, but it is selected and expanded, so it should not go away. - // Instead, fall through to removing A2 (the next oldest). - assertThat(mBubbleData.getBubbles()).doesNotContain(mEntryA2); + verify(mListener, never()).onExpandedChanged(anyBoolean()); + verify(mListener, never()).apply(); } @Test - public void test_expanded_removeLastBubble_collapsesStack() { - // Given - setPostTime(mEntryA1, 1000); - mBubbleData.notificationEntryUpdated(mEntryA1); + public void test_collapsed_removeLastBubble_clearsSelectedBubble() { + // Setup + sendUpdatedEntryAtTime(mEntryA1, 1000); + mBubbleData.setListener(mListener); - setPostTime(mEntryB1, 2000); - mBubbleData.notificationEntryUpdated(mEntryB1); + // Test + mBubbleData.notificationEntryRemoved(mEntryA1, BubbleController.DISMISS_USER_GESTURE); - setPostTime(mEntryB2, 3000); - mBubbleData.notificationEntryUpdated(mEntryC1); + // Verify the selection was cleared. + verify(mListener).onSelectionChanged(isNull()); + } - mBubbleData.setExpanded(true); + // EXPANDED / ADD - mBubbleData.notificationEntryRemoved(mEntryA1, BubbleController.DISMISS_USER_GESTURE); - mBubbleData.notificationEntryRemoved(mEntryB1, BubbleController.DISMISS_USER_GESTURE); - mBubbleData.notificationEntryRemoved(mEntryC1, BubbleController.DISMISS_USER_GESTURE); + /** + * Verifies that bubbles added as part of a new group insert before existing groups while + * expanded. + * <p> + * Placement within the list is based on lastUpdate (post time of the notification), descending + * order (with most recent first). + * + * @see #test_collapsed_addBubble_sortAndGrouping() + * @see #test_expanded_addBubble_sortAndGrouping_existingGroup() + */ + @Test + public void test_expanded_addBubble_sortAndGrouping_newGroup() { + // Setup + sendUpdatedEntryAtTime(mEntryA1, 1000); + sendUpdatedEntryAtTime(mEntryA2, 2000); + sendUpdatedEntryAtTime(mEntryB1, 3000); // [B1, A2, A1] + changeExpandedStateAtTime(true, 4000L); + mBubbleData.setListener(mListener); - assertThat(mBubbleData.isExpanded()).isFalse(); - assertThat(mBubbleData.getSelectedBubble()).isNull(); + // Test + sendUpdatedEntryAtTime(mEntryC1, 4000); + verify(mListener).onOrderChanged(eq(listOf(mBubbleC1, mBubbleB1, mBubbleA2, mBubbleA1))); } - // Bubbles do not reorder while expanded + /** + * Verifies that bubbles added as part of a new group insert before existing groups while + * expanded, but not before any groups with ongoing bubbles. + * + * @see #test_collapsed_addBubble_sortAndGrouping_withOngoing() + * @see #test_expanded_addBubble_sortAndGrouping_existingGroup() + */ @Test - public void test_expanded_selection_collapseToTop() { - // Given - assertThat(mBubbleData.hasBubbles()).isFalse(); - assertThat(mBubbleData.isExpanded()).isFalse(); - + public void test_expanded_addBubble_sortAndGrouping_newGroup_withOngoing() { + // Setup + setOngoing(mEntryA1, true); sendUpdatedEntryAtTime(mEntryA1, 1000); sendUpdatedEntryAtTime(mEntryA2, 2000); - sendUpdatedEntryAtTime(mEntryB1, 3000); + sendUpdatedEntryAtTime(mEntryB1, 3000); // [A1*, A2, B1] + changeExpandedStateAtTime(true, 4000L); + mBubbleData.setListener(mListener); - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleB1, mBubbleA2, mBubbleA1)); + // Test + sendUpdatedEntryAtTime(mEntryC1, 4000); + verify(mListener).onOrderChanged(eq(listOf(mBubbleA1, mBubbleA2, mBubbleC1, mBubbleB1))); + } + /** + * Verifies that bubbles added as part of an existing group insert to the beginning of that + * group. The order of groups within the list must not change while in the expanded state. + * + * @see #test_collapsed_addBubble_sortAndGrouping() + * @see #test_expanded_addBubble_sortAndGrouping_newGroup() + */ + @Test + public void test_expanded_addBubble_sortAndGrouping_existingGroup() { + // Setup + sendUpdatedEntryAtTime(mEntryA1, 1000); + sendUpdatedEntryAtTime(mEntryA2, 2000); + sendUpdatedEntryAtTime(mEntryB1, 3000); // [B1, A2, A1] changeExpandedStateAtTime(true, 4000L); + mBubbleData.setListener(mListener); - // regrouping only happens when collapsed (after new or update) or expanded->collapsed - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleB1, mBubbleA2, mBubbleA1)); + // Test + sendUpdatedEntryAtTime(mEntryA3, 4000); + verify(mListener).onOrderChanged(eq(listOf(mBubbleB1, mBubbleA3, mBubbleA2, mBubbleA1))); + } - changeExpandedStateAtTime(false, 6000L); + // EXPANDED / UPDATE - // A1 is still selected and it's lastAccessed time has been updated - // on collapse, sorting is applied, keeping the selected bubble at the front - assertThat(mBubbleData.getSelectedBubble()).isEqualTo(mBubbleA1); - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleA1, mBubbleA2, mBubbleB1)); + /** + * Verifies that updates to bubbles while expanded do not result in any change to sorting + * or grouping of bubbles or sorting of groups. + * + * @see #test_collapsed_addBubble_sortAndGrouping() + * @see #test_expanded_addBubble_sortAndGrouping_existingGroup() + */ + @Test + public void test_expanded_updateBubble_sortAndGrouping_noChanges() { + // Setup + sendUpdatedEntryAtTime(mEntryA1, 1000); + sendUpdatedEntryAtTime(mEntryA2, 2000); + sendUpdatedEntryAtTime(mEntryB1, 3000); + sendUpdatedEntryAtTime(mEntryB2, 4000); // [B2, B1, A2, A1] + changeExpandedStateAtTime(true, 5000L); + mBubbleData.setListener(mListener); + + // Test + sendUpdatedEntryAtTime(mEntryA1, 4000); + verify(mListener, never()).onOrderChanged(anyList()); } - // New bubble from new app while stack is expanded + /** + * Verifies that updates to bubbles while expanded do not result in any change to selection. + * + * @see #test_collapsed_addBubble_selectionChanges() + * @see #test_collapsed_updateBubble_noSelectionChanges_withOngoing() + */ @Test - public void test_expanded_addBubble_newApp() { - // Given + public void test_expanded_updateBubble_noSelectionChanges() { + // Setup sendUpdatedEntryAtTime(mEntryA1, 1000); sendUpdatedEntryAtTime(mEntryA2, 2000); - sendUpdatedEntryAtTime(mEntryA3, 3000); - sendUpdatedEntryAtTime(mEntryB1, 4000); - sendUpdatedEntryAtTime(mEntryB2, 5000); + sendUpdatedEntryAtTime(mEntryB1, 3000); + sendUpdatedEntryAtTime(mEntryB2, 4000); // [B2, B1, A2, A1] + changeExpandedStateAtTime(true, 5000L); + mBubbleData.setListener(mListener); - assertThat(mBubbleData.getSelectedBubble()).isEqualTo(mBubbleA1); + // Test + sendUpdatedEntryAtTime(mEntryA1, 6000); + sendUpdatedEntryAtTime(mEntryA2, 7000); + sendUpdatedEntryAtTime(mEntryB1, 8000); + verify(mListener, never()).onSelectionChanged(any(Bubble.class)); + } - changeExpandedStateAtTime(true, 6000L); + // EXPANDED / REMOVE - assertThat(mBubbleData.getSelectedBubble()).isEqualTo(mBubbleA1); - assertThat(mBubbleData.getSelectedBubble().getLastActivity()).isEqualTo(6000L); + /** + * Verifies that removing a bubble while expanded does not result in reordering of groups + * or any of the remaining bubbles. + * + * @see #test_collapsed_addBubble_sortAndGrouping() + * @see #test_expanded_addBubble_sortAndGrouping_existingGroup() + */ + @Test + public void test_expanded_removeBubble_sortAndGrouping() { + // Setup + sendUpdatedEntryAtTime(mEntryA1, 1000); + sendUpdatedEntryAtTime(mEntryB1, 2000); + sendUpdatedEntryAtTime(mEntryA2, 3000); + sendUpdatedEntryAtTime(mEntryB2, 4000); // [B2, B1, A2, A1] + changeExpandedStateAtTime(true, 5000L); + mBubbleData.setListener(mListener); - // regrouping only happens when collapsed (after new or update) or expanded->collapsed - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleB2, mBubbleB1, mBubbleA3, mBubbleA2, mBubbleA1)); + // Test + mBubbleData.notificationEntryRemoved(mEntryB2, BubbleController.DISMISS_USER_GESTURE); + verify(mListener).onOrderChanged(eq(listOf(mBubbleB1, mBubbleA2, mBubbleA1))); + } + + /** + * Verifies that removing the selected bubble while expanded causes another bubble to become + * selected. The replacement selection is the bubble which appears at the same index as the + * previous one, or the previous index if this was the last position. + * + * @see #test_collapsed_addBubble_sortAndGrouping() + * @see #test_expanded_addBubble_sortAndGrouping_existingGroup() + */ + @Test + public void test_expanded_removeBubble_selectionChanges_whenSelectedRemoved() { + // Setup + sendUpdatedEntryAtTime(mEntryA1, 1000); + sendUpdatedEntryAtTime(mEntryB1, 2000); + sendUpdatedEntryAtTime(mEntryA2, 3000); + sendUpdatedEntryAtTime(mEntryB2, 4000); + changeExpandedStateAtTime(true, 5000L); + mBubbleData.setSelectedBubble(mBubbleA2); // [B2, B1, ^A2, A1] + mBubbleData.setListener(mListener); - // When - sendUpdatedEntryAtTime(mEntryC1, 7000); + // Test + mBubbleData.notificationEntryRemoved(mEntryA2, BubbleController.DISMISS_USER_GESTURE); + verify(mListener).onSelectionChanged(mBubbleA1); - // Then - // A2 is expired. A1 was oldest, but lastActivityTime is reset when expanded, since A1 is - // selected. - // C1 is added at the end since bubbles are expanded. - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleB2, mBubbleB1, mBubbleA3, mBubbleA1, mBubbleC1)); + reset(mListener); + mBubbleData.notificationEntryRemoved(mEntryA1, BubbleController.DISMISS_USER_GESTURE); + verify(mListener).onSelectionChanged(mBubbleB1); } - // New bubble from existing app while stack is expanded @Test - public void test_expanded_addBubble_existingApp() { - // Given - sendUpdatedEntryAtTime(mEntryB1, 1000); - sendUpdatedEntryAtTime(mEntryB2, 2000); - sendUpdatedEntryAtTime(mEntryA1, 3000); - sendUpdatedEntryAtTime(mEntryA2, 4000); - sendUpdatedEntryAtTime(mEntryA3, 5000); - - assertThat(mBubbleData.getSelectedBubble()).isEqualTo(mBubbleB1); + public void test_expandAndCollapse_callsOnExpandedChanged() { + // Setup + sendUpdatedEntryAtTime(mEntryA1, 1000); + mBubbleData.setListener(mListener); - changeExpandedStateAtTime(true, 6000L); + // Test + changeExpandedStateAtTime(true, 3000L); + verify(mListener).onExpandedChanged(eq(true)); - // B1 is first (newest, since it's just been expanded and is selected) - assertThat(mBubbleData.getSelectedBubble()).isEqualTo(mBubbleB1); - assertThat(mBubbleData.getSelectedBubble().getLastActivity()).isEqualTo(6000L); + reset(mListener); + changeExpandedStateAtTime(false, 4000L); + verify(mListener).onExpandedChanged(eq(false)); + } - // regrouping only happens when collapsed (after new or update) or while collapsing + /** + * Verifies that transitions between the collapsed and expanded state maintain sorting and + * grouping rules. + * <p> + * While collapsing, sorting is applied since no sorting happens while expanded. The resulting + * state is the new expanded ordering. This state is saved and restored if possible when next + * expanded. + * <p> + * When the stack transitions to the collapsed state, the selected bubble is brought to the top. + * Bubbles within the same group should move up with it. + * <p> + * When the stack transitions back to the expanded state, the previous ordering is restored, as + * long as no changes have been made (adds, removes or updates) while in the collapsed state. + */ + @Test + public void test_expansionChanges() { + // Setup + sendUpdatedEntryAtTime(mEntryA1, 1000); + sendUpdatedEntryAtTime(mEntryB1, 2000); + sendUpdatedEntryAtTime(mEntryA2, 3000); + sendUpdatedEntryAtTime(mEntryB2, 4000); + changeExpandedStateAtTime(true, 5000L); // [B2=4000, B1=2000, A2=3000, A1=1000] + sendUpdatedEntryAtTime(mEntryB1, 6000); // [B2=4000, B1=6000*, A2=3000, A1=1000] + setCurrentTime(7000); + mBubbleData.setSelectedBubble(mBubbleA2); + mBubbleData.setListener(mListener); assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleA3, mBubbleA2, mBubbleA1, mBubbleB2, mBubbleB1)); + listOf(mBubbleB2, mBubbleB1, mBubbleA2, mBubbleA1)); - // When - sendUpdatedEntryAtTime(mEntryB3, 7000); + // Test - // Then - // (B2 is expired, B1 was oldest, but it's lastActivityTime is updated at the point when - // the stack was expanded, since it is the selected bubble. - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleA3, mBubbleA2, mBubbleA1, mBubbleB3, mBubbleB1)); + // At this point, B1 has been updated but sorting has not been changed because the + // stack is expanded. When next collapsed, sorting will be applied and saved, just prior + // to moving the selected bubble to the top (first). + // + // In this case, the expected re-expand state will be: [B1, B2, A2*, A1] + // + // That state is restored as long as no changes occur (add/remove/update) while in + // the collapsed state. + // + // collapse -> selected bubble (A2) moves first. + changeExpandedStateAtTime(false, 8000L); + verify(mListener).onOrderChanged(eq(listOf(mBubbleA2, mBubbleA1, mBubbleB1, mBubbleB2))); + + // expand -> "original" order/grouping restored + reset(mListener); + changeExpandedStateAtTime(true, 10000L); + verify(mListener).onOrderChanged(eq(listOf(mBubbleB1, mBubbleB2, mBubbleA2, mBubbleA1))); } - // Updated bubble from existing app while stack is expanded + /** + * When a change occurs while collapsed (any update, add, remove), the previous expanded + * order and grouping becomes invalidated, and the order and grouping when next expanded will + * remain the same as collapsed. + */ @Test - public void test_expanded_updateBubble_existingApp() { + public void test_expansionChanges_withUpdatesWhileCollapsed() { + // Setup sendUpdatedEntryAtTime(mEntryA1, 1000); - sendUpdatedEntryAtTime(mEntryA2, 2000); - sendUpdatedEntryAtTime(mEntryB1, 3000); + sendUpdatedEntryAtTime(mEntryB1, 2000); + sendUpdatedEntryAtTime(mEntryA2, 3000); sendUpdatedEntryAtTime(mEntryB2, 4000); + changeExpandedStateAtTime(true, 5000L); // [B2=4000, B1=2000, A2=3000, A1=1000] + sendUpdatedEntryAtTime(mEntryB1, 6000); // [B2=4000, B1=*6000, A2=3000, A1=1000] + setCurrentTime(7000); + mBubbleData.setSelectedBubble(mBubbleA2); // [B2, B1, ^A2, A1] + mBubbleData.setListener(mListener); - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleB2, mBubbleB1, mBubbleA2, mBubbleA1)); - mBubbleData.setExpanded(true); - - sendUpdatedEntryAtTime(mEntryA1, 5000); + // Test - // Does not reorder while expanded (for an update). - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleB2, mBubbleB1, mBubbleA2, mBubbleA1)); + // At this point, B1 has been updated but sorting has not been changed because the + // stack is expanded. When next collapsed, sorting will be applied and saved, just prior + // to moving the selected bubble to the top (first). + // + // In this case, the expected re-expand state will be: [B1, B2, A2*, A1] + // + // That state is restored as long as no changes occur (add/remove/update) while in + // the collapsed state. + // + // collapse -> selected bubble (A2) moves first. + changeExpandedStateAtTime(false, 8000L); + verify(mListener).onOrderChanged(eq(listOf(mBubbleA2, mBubbleA1, mBubbleB1, mBubbleB2))); + + // An update occurs, which causes sorting, and this invalidates the previously saved order. + sendUpdatedEntryAtTime(mEntryA2, 9000); + + // No order changes when expanding because the new sorted order remains. + reset(mListener); + changeExpandedStateAtTime(true, 10000L); + verify(mListener, never()).onOrderChanged(anyList()); } @Test - public void test_expanded_updateBubble() { - // Given - assertThat(mBubbleData.hasBubbles()).isFalse(); - assertThat(mBubbleData.isExpanded()).isFalse(); + public void test_expanded_removeLastBubble_collapsesStack() { + // Setup + sendUpdatedEntryAtTime(mEntryA1, 1000); + changeExpandedStateAtTime(true, 2000); + mBubbleData.setListener(mListener); - setPostTime(mEntryA1, 1000); - mBubbleData.notificationEntryUpdated(mEntryA1); + // Test + mBubbleData.notificationEntryRemoved(mEntryA1, BubbleController.DISMISS_USER_GESTURE); + verify(mListener).onExpandedChanged(eq(false)); + } - setPostTime(mEntryB1, 2000); - mBubbleData.notificationEntryUpdated(mEntryB1); + private NotificationEntry createBubbleEntry(int userId, String notifKey, String packageName) { + return createBubbleEntry(userId, notifKey, packageName, 1000); + } - setPostTime(mEntryB2, 3000); - mBubbleData.notificationEntryUpdated(mEntryB2); + private void setPostTime(NotificationEntry entry, long postTime) { + when(entry.notification.getPostTime()).thenReturn(postTime); + } - setPostTime(mEntryA2, 4000); - mBubbleData.notificationEntryUpdated(mEntryA2); + private void setOngoing(NotificationEntry entry, boolean ongoing) { + if (ongoing) { + entry.notification.getNotification().flags |= Notification.FLAG_FOREGROUND_SERVICE; + } else { + entry.notification.getNotification().flags &= ~Notification.FLAG_FOREGROUND_SERVICE; + } + } - mBubbleData.setExpanded(true); - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleA2, mBubbleA1, mBubbleB2, mBubbleB1)); + /** + * No ExpandableNotificationRow is required to test BubbleData. This setup is all that is + * required for BubbleData functionality and verification. NotificationTestHelper is used only + * as a convenience to create a Notification w/BubbleMetadata. + */ + private NotificationEntry createBubbleEntry(int userId, String notifKey, String packageName, + long postTime) { + // BubbleMetadata + Notification.BubbleMetadata bubbleMetadata = new Notification.BubbleMetadata.Builder() + .setIntent(mExpandIntent) + .setDeleteIntent(mDeleteIntent) + .setIcon(Icon.createWithResource("", 0)) + .build(); + // Notification -> BubbleMetadata + Notification notification = mNotificationTestHelper.createNotification(false, + null /* groupKey */, bubbleMetadata); - // When - setPostTime(mEntryB1, 5000); - mBubbleData.notificationEntryUpdated(mEntryB1); + // StatusBarNotification + StatusBarNotification sbn = mock(StatusBarNotification.class); + when(sbn.getKey()).thenReturn(notifKey); + when(sbn.getUser()).thenReturn(new UserHandle(userId)); + when(sbn.getPackageName()).thenReturn(packageName); + when(sbn.getPostTime()).thenReturn(postTime); + when(sbn.getNotification()).thenReturn(notification); - // Then - // B1 remains in the same place due to being expanded - assertThat(mBubbleData.getBubbles()).isEqualTo( - ImmutableList.of(mBubbleA2, mBubbleA1, mBubbleB2, mBubbleB1)); + // NotificationEntry -> StatusBarNotification -> Notification -> BubbleMetadata + return new NotificationEntry(sbn); + } + + private void setCurrentTime(long time) { + when(mTimeSource.currentTimeMillis()).thenReturn(time); + } + + private void sendUpdatedEntryAtTime(NotificationEntry entry, long postTime) { + setPostTime(entry, postTime); + mBubbleData.notificationEntryUpdated(entry); + } + + private void changeExpandedStateAtTime(boolean shouldBeExpanded, long time) { + setCurrentTime(time); + mBubbleData.setExpanded(shouldBeExpanded); + } + + /** Syntactic sugar to keep assertions more readable */ + private static <T> List<T> listOf(T... a) { + return ImmutableList.copyOf(a); } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManagerTest.java new file mode 100644 index 000000000000..67c4a92bbb02 --- /dev/null +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManagerTest.java @@ -0,0 +1,215 @@ +/* + * 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.statusbar.notification.stack; + +import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyInt; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.RETURNS_DEEP_STUBS; +import static org.mockito.Mockito.clearInvocations; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import android.testing.AndroidTestingRunner; +import android.testing.TestableLooper; +import android.util.AttributeSet; +import android.view.View; +import android.view.ViewGroup; + +import androidx.test.filters.SmallTest; + +import com.android.systemui.ActivityStarterDelegate; +import com.android.systemui.SysuiTestCase; +import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; + +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnit; +import org.mockito.junit.MockitoRule; + +@SmallTest +@RunWith(AndroidTestingRunner.class) +@TestableLooper.RunWithLooper +public class NotificationSectionsManagerTest extends SysuiTestCase { + + @Rule public final MockitoRule mockitoRule = MockitoJUnit.rule(); + + @Mock private NotificationStackScrollLayout mNssl; + @Mock private ActivityStarterDelegate mActivityStarterDelegate; + + private NotificationSectionsManager mSectionsManager; + + @Before + public void setUp() { + mSectionsManager = new NotificationSectionsManager(mNssl, mActivityStarterDelegate, true); + // Required in order for the header inflation to work properly + when(mNssl.generateLayoutParams(any(AttributeSet.class))) + .thenReturn(new ViewGroup.LayoutParams(WRAP_CONTENT, WRAP_CONTENT)); + mSectionsManager.inflateViews(mContext); + when(mNssl.indexOfChild(any(View.class))).thenReturn(-1); + } + + @Test + public void testInsertHeader() { + // GIVEN a stack with HI and LO rows but no section headers + setStackState(ChildType.HIPRI, ChildType.HIPRI, ChildType.HIPRI, ChildType.LOPRI); + + // WHEN we update the section headers + mSectionsManager.updateSectionBoundaries(); + + // THEN a LO section header is added + verify(mNssl).addView(mSectionsManager.getGentleHeaderView(), 3); + } + + @Test + public void testRemoveHeader() { + // GIVEN a stack that originally had a header between the HI and LO sections + setStackState(ChildType.HIPRI, ChildType.HIPRI, ChildType.LOPRI); + mSectionsManager.updateSectionBoundaries(); + + // WHEN the last LO row is replaced with a HI row + setStackState(ChildType.HIPRI, ChildType.HIPRI, ChildType.HEADER, ChildType.HIPRI); + clearInvocations(mNssl); + mSectionsManager.updateSectionBoundaries(); + + // THEN the LO section header is removed + verify(mNssl).removeView(mSectionsManager.getGentleHeaderView()); + } + + @Test + public void testDoNothingIfHeaderAlreadyRemoved() { + // GIVEN a stack with only HI rows + setStackState(ChildType.HIPRI, ChildType.HIPRI, ChildType.HIPRI); + + // WHEN we update the sections headers + mSectionsManager.updateSectionBoundaries(); + + // THEN we don't add any section headers + verify(mNssl, never()).addView(eq(mSectionsManager.getGentleHeaderView()), anyInt()); + } + + @Test + public void testMoveHeaderForward() { + // GIVEN a stack that originally had a header between the HI and LO sections + setStackState( + ChildType.HIPRI, + ChildType.HIPRI, + ChildType.HIPRI, + ChildType.LOPRI); + mSectionsManager.updateSectionBoundaries(); + + // WHEN the LO section moves forward + setStackState( + ChildType.HIPRI, + ChildType.HIPRI, + ChildType.LOPRI, + ChildType.HEADER, + ChildType.LOPRI); + mSectionsManager.updateSectionBoundaries(); + + // THEN the LO section header is also moved forward + verify(mNssl).changeViewPosition(mSectionsManager.getGentleHeaderView(), 2); + } + + @Test + public void testMoveHeaderBackward() { + // GIVEN a stack that originally had a header between the HI and LO sections + setStackState( + ChildType.HIPRI, + ChildType.LOPRI, + ChildType.LOPRI, + ChildType.LOPRI); + mSectionsManager.updateSectionBoundaries(); + + // WHEN the LO section moves backward + setStackState( + ChildType.HIPRI, + ChildType.HEADER, + ChildType.HIPRI, + ChildType.HIPRI, + ChildType.LOPRI); + mSectionsManager.updateSectionBoundaries(); + + // THEN the LO section header is also moved backward (with appropriate index shifting) + verify(mNssl).changeViewPosition(mSectionsManager.getGentleHeaderView(), 3); + } + + @Test + public void testHeaderRemovedFromTransientParent() { + // GIVEN a stack where the header is animating away + setStackState( + ChildType.HIPRI, + ChildType.LOPRI, + ChildType.LOPRI, + ChildType.LOPRI); + mSectionsManager.updateSectionBoundaries(); + setStackState( + ChildType.HIPRI, + ChildType.HEADER); + mSectionsManager.updateSectionBoundaries(); + clearInvocations(mNssl); + + ViewGroup transientParent = mock(ViewGroup.class); + mSectionsManager.getGentleHeaderView().setTransientContainer(transientParent); + + // WHEN the LO section reappears + setStackState( + ChildType.HIPRI, + ChildType.LOPRI); + mSectionsManager.updateSectionBoundaries(); + + // THEN the header is first removed from the transient parent before being added to the + // NSSL. + verify(transientParent).removeTransientView(mSectionsManager.getGentleHeaderView()); + verify(mNssl).addView(mSectionsManager.getGentleHeaderView(), 1); + } + + private enum ChildType { HEADER, HIPRI, LOPRI } + + private void setStackState(ChildType... children) { + when(mNssl.getChildCount()).thenReturn(children.length); + for (int i = 0; i < children.length; i++) { + View child; + switch (children[i]) { + case HEADER: + child = mSectionsManager.getGentleHeaderView(); + break; + case HIPRI: + case LOPRI: + ExpandableNotificationRow notifRow = mock(ExpandableNotificationRow.class, + RETURNS_DEEP_STUBS); + when(notifRow.getVisibility()).thenReturn(View.VISIBLE); + when(notifRow.getEntry().isHighPriority()) + .thenReturn(children[i] == ChildType.HIPRI); + when(notifRow.getParent()).thenReturn(mNssl); + child = notifRow; + break; + default: + throw new RuntimeException("Unknown ChildType: " + children[i]); + } + when(mNssl.getChildAt(i)).thenReturn(child); + when(mNssl.indexOfChild(child)).thenReturn(i); + } + } +} 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 04f911a2b0e8..09b8062390bd 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 @@ -46,6 +46,7 @@ import androidx.test.runner.AndroidJUnit4; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.nano.MetricsProto; +import com.android.systemui.ActivityStarterDelegate; import com.android.systemui.Dependency; import com.android.systemui.ExpandHelper; import com.android.systemui.InitController; @@ -118,6 +119,11 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase { @Before @UiThreadTest public void setUp() throws Exception { + mOriginalInterruptionModelSetting = Settings.Secure.getInt(mContext.getContentResolver(), + NOTIFICATION_NEW_INTERRUPTION_MODEL, 0); + Settings.Secure.putInt(mContext.getContentResolver(), + NOTIFICATION_NEW_INTERRUPTION_MODEL, 1); + // Inject dependencies before initializing the layout mDependency.injectTestDependency( NotificationBlockingHelperManager.class, @@ -146,7 +152,8 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase { mStackScrollerInternal = new NotificationStackScrollLayout(getContext(), null, true /* allowLongPress */, mNotificationRoundnessManager, new AmbientPulseManager(mContext), - mock(DynamicPrivacyController.class)); + mock(DynamicPrivacyController.class), + mock(ActivityStarterDelegate.class)); mStackScroller = spy(mStackScrollerInternal); mStackScroller.setShelf(notificationShelf); mStackScroller.setStatusBar(mBar); @@ -166,11 +173,6 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase { doNothing().when(mExpandHelper).cancelImmediately(); doNothing().when(notificationShelf).setAnimationsEnabled(anyBoolean()); doNothing().when(notificationShelf).fadeInTranslating(); - - mOriginalInterruptionModelSetting = Settings.Secure.getInt(mContext.getContentResolver(), - NOTIFICATION_NEW_INTERRUPTION_MODEL, 0); - Settings.Secure.putInt(mContext.getContentResolver(), - NOTIFICATION_NEW_INTERRUPTION_MODEL, 1); } @After @@ -350,62 +352,6 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase { } @Test - public void testUpdateGapIndex_allHighPriority() { - when(mStackScroller.getChildCount()).thenReturn(3); - for (int i = 0; i < 3; i++) { - ExpandableNotificationRow row = mock(ExpandableNotificationRow.class, - RETURNS_DEEP_STUBS); - String key = Integer.toString(i); - when(row.getStatusBarNotification().getKey()).thenReturn(key); - when(row.getEntry().isHighPriority()).thenReturn(true); - when(mStackScroller.getChildAt(i)).thenReturn(row); - } - - mStackScroller.updateSectionBoundaries(); - assertEquals(-1, mStackScroller.getSectionBoundaryIndex(0)); - } - - @Test - public void testUpdateGapIndex_allLowPriority() { - when(mStackScroller.getChildCount()).thenReturn(3); - for (int i = 0; i < 3; i++) { - ExpandableNotificationRow row = mock(ExpandableNotificationRow.class, - RETURNS_DEEP_STUBS); - String key = Integer.toString(i); - when(row.getStatusBarNotification().getKey()).thenReturn(key); - when(row.getEntry().isHighPriority()).thenReturn(false); - when(mStackScroller.getChildAt(i)).thenReturn(row); - } - - mStackScroller.updateSectionBoundaries(); - assertEquals(-1, mStackScroller.getSectionBoundaryIndex(0)); - } - - @Test - public void testUpdateGapIndex_gapExists() { - when(mStackScroller.getChildCount()).thenReturn(6); - for (int i = 0; i < 6; i++) { - ExpandableNotificationRow row = mock(ExpandableNotificationRow.class, - RETURNS_DEEP_STUBS); - String key = Integer.toString(i); - when(row.getStatusBarNotification().getKey()).thenReturn(key); - when(row.getEntry().isHighPriority()).thenReturn(i < 3); - when(mStackScroller.getChildAt(i)).thenReturn(row); - } - - mStackScroller.updateSectionBoundaries(); - assertEquals(3, mStackScroller.getSectionBoundaryIndex(0)); - } - - @Test - public void testUpdateGapIndex_empty() { - when(mStackScroller.getChildCount()).thenReturn(0); - - mStackScroller.updateSectionBoundaries(); - assertEquals(-1, mStackScroller.getSectionBoundaryIndex(0)); - } - - @Test public void testOnDensityOrFontScaleChanged_reInflatesFooterViews() { clearInvocations(mStackScroller); mStackScroller.onDensityOrFontScaleChanged(); diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml index 8ca452097c4d..bd5aefac7187 100644 --- a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml @@ -13,13 +13,16 @@ ~ 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 - --> +--> <animated-vector xmlns:android="http://schemas.android.com/apk/res/android" - android:drawable="@*android:drawable/ic_bluetooth_transient_animation_drawable"> - <target android:name="_R_G_L_1_G_D_0_P_0" - android:animation="@*android:anim/ic_bluetooth_transient_animation_0"/> - <target android:name="_R_G_L_0_G_D_0_P_0" - android:animation="@*android:anim/ic_bluetooth_transient_animation_1"/> - <target android:name="time_group" - android:animation="@*android:anim/ic_bluetooth_transient_animation_2"/> + android:drawable="@*android:drawable/ic_bluetooth_transient_animation_drawable" > + <target + android:name="_R_G_L_1_G_D_0_P_0" + android:animation="@*android:anim/ic_bluetooth_transient_animation_0" /> + <target + android:name="_R_G_L_0_G_D_0_P_0" + android:animation="@*android:anim/ic_bluetooth_transient_animation_1" /> + <target + android:name="time_group" + android:animation="@*android:anim/ic_bluetooth_transient_animation_2" /> </animated-vector>
\ 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 index 66ac8feff21b..b7acaeb65d09 100644 --- a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml @@ -13,30 +13,46 @@ ~ 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 - --> - -<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:width="24dp" android:viewportHeight="24" - android:viewportWidth="24"> - <group android:name="_R_G"> - <group android:name="_R_G_L_2_G" android:translateX="3.75" - android:translateY="1.75"> - <path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M1.22 3.22 C0.93,3.51 0.93,3.99 1.22,4.28 C1.22,4.28 7.19,10.25 7.19,10.25 C7.19,10.25 1.22,16.22 1.22,16.22 C0.93,16.51 0.93,16.99 1.22,17.28 C1.37,17.43 1.56,17.5 1.75,17.5 C1.94,17.5 2.13,17.43 2.28,17.28 C2.28,17.28 7.25,12.31 7.25,12.31 C7.25,12.31 7.25,20.25 7.25,20.25 C7.25,20.25 8,20.25 8,20.25 C10.96,20.25 13.37,17.84 13.37,14.88 C13.37,12.91 12.31,11.19 10.73,10.25 C12.31,9.31 13.37,7.59 13.37,5.63 C13.37,2.66 10.96,0.25 8,0.25 C8,0.25 7.25,0.25 7.25,0.25 C7.25,0.25 7.25,8.19 7.25,8.19 C7.25,8.19 2.28,3.22 2.28,3.22 C1.99,2.93 1.51,2.93 1.22,3.22c M8.75 1.82 C10.52,2.17 11.87,3.75 11.87,5.63 C11.87,7.5 10.52,9.08 8.75,9.43 C8.75,9.43 8.75,1.82 8.75,1.82c M8.75 11.07 C10.52,11.42 11.87,13 11.87,14.88 C11.87,16.75 10.52,18.33 8.75,18.68 C8.75,18.68 8.75,11.07 8.75,11.07c "/> +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <group android:name="_R_G" > + <group + android:name="_R_G_L_2_G" + android:translateX="3.75" + android:translateY="1.75" > + <path + android:name="_R_G_L_2_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M1.22 3.22 C0.93,3.51 0.93,3.99 1.22,4.28 C1.22,4.28 7.19,10.25 7.19,10.25 C7.19,10.25 1.22,16.22 1.22,16.22 C0.93,16.51 0.93,16.99 1.22,17.28 C1.37,17.43 1.56,17.5 1.75,17.5 C1.94,17.5 2.13,17.43 2.28,17.28 C2.28,17.28 7.25,12.31 7.25,12.31 C7.25,12.31 7.25,20.25 7.25,20.25 C7.25,20.25 8,20.25 8,20.25 C10.96,20.25 13.37,17.84 13.37,14.88 C13.37,12.91 12.31,11.19 10.73,10.25 C12.31,9.31 13.37,7.59 13.37,5.63 C13.37,2.66 10.96,0.25 8,0.25 C8,0.25 7.25,0.25 7.25,0.25 C7.25,0.25 7.25,8.19 7.25,8.19 C7.25,8.19 2.28,3.22 2.28,3.22 C1.99,2.93 1.51,2.93 1.22,3.22c M8.75 1.82 C10.52,2.17 11.87,3.75 11.87,5.63 C11.87,7.5 10.52,9.08 8.75,9.43 C8.75,9.43 8.75,1.82 8.75,1.82c M8.75 11.07 C10.52,11.42 11.87,13 11.87,14.88 C11.87,16.75 10.52,18.33 8.75,18.68 C8.75,18.68 8.75,11.07 8.75,11.07c " /> </group> - <group android:name="_R_G_L_1_G" android:translateX="3.75" - android:translateY="1.75"> - <path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M15.25 9.25 C14.7,9.25 14.25,9.7 14.25,10.25 C14.25,10.8 14.7,11.25 15.25,11.25 C15.8,11.25 16.25,10.8 16.25,10.25 C16.25,9.7 15.8,9.25 15.25,9.25c "/> + <group + android:name="_R_G_L_1_G" + android:translateX="3.75" + android:translateY="1.75" > + <path + android:name="_R_G_L_1_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M15.25 9.25 C14.7,9.25 14.25,9.7 14.25,10.25 C14.25,10.8 14.7,11.25 15.25,11.25 C15.8,11.25 16.25,10.8 16.25,10.25 C16.25,9.7 15.8,9.25 15.25,9.25c " /> </group> - <group android:name="_R_G_L_0_G" android:translateX="3.75" - android:translateY="1.75"> - <path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M0.25 10.25 C0.25,10.8 0.7,11.25 1.25,11.25 C1.8,11.25 2.25,10.8 2.25,10.25 C2.25,9.7 1.8,9.25 1.25,9.25 C0.7,9.25 0.25,9.7 0.25,10.25c "/> + <group + android:name="_R_G_L_0_G" + android:translateX="3.75" + android:translateY="1.75" > + <path + android:name="_R_G_L_0_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M0.25 10.25 C0.25,10.8 0.7,11.25 1.25,11.25 C1.8,11.25 2.25,10.8 2.25,10.25 C2.25,9.7 1.8,9.25 1.25,9.25 C0.7,9.25 0.25,9.7 0.25,10.25c " /> </group> </group> - <group android:name="time_group"/> + <group android:name="time_group" /> </vector> diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml index 5501dd0965b8..aec7bf48bd90 100644 --- a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml @@ -20,7 +20,6 @@ android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > - <path android:pathData="M0,0h24v24H0V0z" /> <path android:fillColor="@android:color/white" android:pathData="M12,1c-4.96,0-9,4.04-9,9v6.78C3,18.56,4.41,20,6.13,20H9v-8H4.5v-2c0-4.13,3.36-7.5,7.5-7.5s7.5,3.36,7.5,7.5v2H15v8h2.87 c0.59,0,1.13-0.18,1.6-0.47c-0.14,1.11-1.08,1.97-2.22,1.97h-4.5c-0.41,0-0.75,0.34-0.75,0.75S12.34,23,12.75,23h4.5 c2.07,0,3.75-1.68,3.75-3.75V10C21,5.04,16.96,1,12,1z M7.5,18.5H6.13c-0.9,0-1.63-0.77-1.63-1.72V13.5h3V18.5z M17.87,18.5H16.5 v-5h3V16v0.78C19.5,17.73,18.77,18.5,17.87,18.5z" /> diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml index d791ce135950..6397e078b38b 100644 --- a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml @@ -19,7 +19,6 @@ android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > - <path android:pathData="M0,0h24v24H0V0z" /> <path android:fillColor="@android:color/white" android:pathData="M6.73,1.73C6.42,1.46,5.94,1.5,5.67,1.81C3.95,3.8,3,6.35,3,9s0.95,5.2,2.67,7.19c0.15,0.17,0.36,0.26,0.57,0.26 c0.17,0,0.35-0.06,0.49-0.18c0.31-0.27,0.35-0.75,0.08-1.06C5.32,13.49,4.5,11.29,4.5,9s0.82-4.49,2.31-6.21 C7.08,2.48,7.04,2,6.73,1.73z M20.34,18.02c-0.4-0.09-0.81,0.15-0.9,0.56c-0.27,1.13-1.27,1.92-2.43,1.92 c-0.35,0-0.71-0.08-0.98-0.2c-0.96-0.51-1.48-1.21-1.96-2.67c-0.47-1.43-1.36-2.11-2.22-2.77c-0.79-0.61-1.68-1.29-2.45-2.68 C8.81,11.14,8.5,10.02,8.5,9c0-3.08,2.42-5.5,5.5-5.5c2.84,0,5.14,2.03,5.46,4.83c0.05,0.41,0.43,0.71,0.83,0.66 C20.7,8.95,21,8.58,20.95,8.17C20.54,4.59,17.62,2,14,2c-3.92,0-7,3.08-7,7c0,1.27,0.38,2.65,1.07,3.9 c0.92,1.66,2.03,2.52,2.85,3.15c0.8,0.62,1.38,1.06,1.71,2.05c0.61,1.85,1.36,2.84,2.73,3.55C15.87,21.88,16.43,22,17,22 c1.86,0,3.46-1.27,3.89-3.08C20.99,18.52,20.74,18.12,20.34,18.02z M11.5,9c0,1.38,1.12,2.5,2.5,2.5s2.5-1.12,2.5-2.5 S15.38,6.5,14,6.5S11.5,7.62,11.5,9z M15,9c0,0.55-0.45,1-1,1s-1-0.45-1-1s0.45-1,1-1S15,8.45,15,9z" /> diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_network_pan.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_network_pan.xml index 54c525b5d008..c7a0266cbfca 100644 --- a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_network_pan.xml +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_network_pan.xml @@ -22,10 +22,10 @@ android:width="24dp" > <path android:fillColor="@android:color/white" - android:pathData="M18.75,17.75c0.2,0,0.4-0.08,0.55-0.24c1.42-1.53,2.2-3.49,2.2-5.51c0-2.02-0.78-3.97-2.2-5.51 c-0.28-0.3-0.76-0.32-1.06-0.04c-0.3,0.28-0.32,0.76-0.04,1.06C19.36,8.77,20,10.36,20,12c0,1.64-0.64,3.24-1.8,4.49 c-0.28,0.3-0.26,0.78,0.04,1.06C18.38,17.68,18.57,17.75,18.75,17.75z" /> + android:pathData="M18.2,16.49c-0.28,0.3-0.26,0.78,0.04,1.06c0.14,0.13,0.33,0.2,0.51,0.2c0.2,0,0.4-0.08,0.55-0.24 c1.42-1.53,2.2-3.49,2.2-5.51c0-2.02-0.78-3.97-2.2-5.51c-0.28-0.3-0.76-0.32-1.06-0.04c-0.3,0.28-0.32,0.76-0.04,1.06 C19.36,8.77,20,10.36,20,12C20,13.64,19.36,15.23,18.2,16.49z" /> <path android:fillColor="@android:color/white" - android:pathData="M16.34,14.64c0.15,0.15,0.34,0.22,0.53,0.22c0.19,0,0.38-0.07,0.53-0.22c0.71-0.7,1.1-1.64,1.1-2.64 c0-1-0.39-1.94-1.09-2.64c-0.29-0.29-0.77-0.29-1.06,0c-0.29,0.29-0.29,0.77,0,1.06C16.77,10.85,17,11.41,17,12 c0,0.6-0.23,1.16-0.66,1.58C16.05,13.87,16.05,14.35,16.34,14.64z" /> + android:pathData="M16.35,9.36c-0.29,0.29-0.29,0.77,0,1.06C16.77,10.85,17,11.41,17,12s-0.23,1.16-0.66,1.58c-0.29,0.29-0.3,0.77,0,1.06 c0.15,0.15,0.34,0.22,0.53,0.22c0.19,0,0.38-0.07,0.53-0.22c0.71-0.7,1.1-1.64,1.1-2.64c0-1-0.39-1.94-1.09-2.64 C17.12,9.07,16.64,9.07,16.35,9.36z" /> <path android:fillColor="@android:color/white" android:pathData="M2.97,19.03c0.15,0.15,0.34,0.22,0.53,0.22s0.38-0.07,0.53-0.22L9,14.06V22h0.75c2.96,0,5.37-2.41,5.37-5.38 c0-1.97-1.06-3.69-2.64-4.62c1.58-0.94,2.64-2.66,2.64-4.62C15.12,4.41,12.71,2,9.75,2H9v7.94L4.03,4.97 c-0.29-0.29-0.77-0.29-1.06,0s-0.29,0.77,0,1.06L8.94,12l-5.97,5.97C2.68,18.26,2.68,18.74,2.97,19.03z M10.5,3.57 c1.78,0.35,3.12,1.92,3.12,3.8s-1.34,3.45-3.12,3.8V3.57z M10.5,12.82c1.78,0.35,3.12,1.92,3.12,3.8s-1.34,3.45-3.12,3.8V12.82z" /> diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml index b8221256756f..a5f66069e19c 100644 --- a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml @@ -20,7 +20,6 @@ android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > - <path android:pathData="M0,0h24v24H0V0z" /> <path android:fillColor="@android:color/white" android:pathData="M12,1.07c-3.87,0-7,3.13-7,7V16c0,3.87,3.13,7,7,7s7-3.13,7-7V8.07C19,4.2,15.87,1.07,12,1.07z M17.5,16 c0,3.03-2.47,5.5-5.5,5.5S6.5,19.03,6.5,16v-5h11V16z M17.5,9.5h-11V8.07c0-3.03,2.47-5.5,5.5-5.5s5.5,2.47,5.5,5.5V9.5z M12,4.04 c-0.41,0-0.75,0.34-0.75,0.75v2.46C11.25,7.66,11.59,8,12,8s0.75-0.34,0.75-0.75V4.79C12.75,4.37,12.41,4.04,12,4.04z" /> 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="@*android:color/accent_device_default_light" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M16,4c0-1.1-0.9-2-2-2h-4C8.9,2,8,2.9,8,4v2H2v12c0,1.7,1.3,3,3,3h14c1.7,0,3-1.3,3-3V6h-6V4z M9.5,4 c0-0.3,0.2-0.5,0.5-0.5h4c0.3,0,0.5,0.2,0.5,0.5v2h-5V4z M20.5,7.5V18c0,0.8-0.7,1.5-1.5,1.5H5c-0.8,0-1.5-0.7-1.5-1.5V7.5H20.5z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 12 12.3 C 12.6627416998 12.3 13.2 12.8372583002 13.2 13.5 C 13.2 14.1627416998 12.6627416998 14.7 12 14.7 C 11.3372583002 14.7 10.8 14.1627416998 10.8 13.5 C 10.8 12.8372583002 11.3372583002 12.3 12 12.3 Z" /> +</vector>
\ 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 index a1a71e31a403..6419515cc594 100644 --- a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_expand_more.xml +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_expand_more.xml @@ -16,6 +16,7 @@ --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" + android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > diff --git a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_file_copy.xml b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_file_copy.xml index 2d525dcd7102..dc6ab95e23b1 100644 --- a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_file_copy.xml +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_file_copy.xml @@ -23,5 +23,4 @@ <path android:fillColor="@android:color/white" android:pathData="M17.5,21.5H4c-0.3,0-0.5-0.2-0.5-0.5V7.5C3.5,7.2,3.3,7,3,7H2.5C2.2,7,2,7.2,2,7.5v14C2,22.3,2.7,23,3.5,23h14 c0.3,0,0.5-0.2,0.5-0.5V22C18,21.7,17.8,21.5,17.5,21.5z M21,16V4c0-1.7-1.4-3-3-3H9C7.3,1,6,2.3,6,4v12c0,1.6,1.3,3,3,3h9 C19.6,19,21,17.6,21,16z M18,17.5H9c-0.8,0-1.5-0.7-1.5-1.5V4c0-0.8,0.7-1.5,1.5-1.5h9c0.8,0,1.5,0.7,1.5,1.5v12 C19.5,16.8,18.8,17.5,18,17.5z" /> - <path android:pathData="M0,0h24v24H0V0z" /> </vector>
\ 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 index 1317f66b4131..9d43e51dc469 100644 --- a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml @@ -13,11 +13,19 @@ ~ 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 - --> +--> <animated-vector xmlns:android="http://schemas.android.com/apk/res/android" - android:drawable="@*android:drawable/ic_hotspot_transient_animation_drawable"> - <target android:name="_R_G_L_0_G_D_0_P_0" android:animation="@*android:anim/ic_hotspot_transient_animation_0"/> - <target android:name="_R_G_L_0_G_D_1_P_0" android:animation="@*android:anim/ic_hotspot_transient_animation_1"/> - <target android:name="_R_G_L_0_G_D_2_P_0" android:animation="@*android:anim/ic_hotspot_transient_animation_2"/> - <target android:name="time_group" android:animation="@*android:anim/ic_hotspot_transient_animation_3"/> + android:drawable="@*android:drawable/ic_hotspot_transient_animation_drawable" > + <target + android:name="_R_G_L_0_G_D_0_P_0" + android:animation="@*android:anim/ic_hotspot_transient_animation_0" /> + <target + android:name="_R_G_L_0_G_D_1_P_0" + android:animation="@*android:anim/ic_hotspot_transient_animation_1" /> + <target + android:name="_R_G_L_0_G_D_2_P_0" + android:animation="@*android:anim/ic_hotspot_transient_animation_2" /> + <target + android:name="time_group" + android:animation="@*android:anim/ic_hotspot_transient_animation_3" /> </animated-vector> 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 index 81531957f24d..15f273569fab 100644 --- a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_hotspot_transient_animation_drawable.xml +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_hotspot_transient_animation_drawable.xml @@ -13,24 +13,36 @@ ~ 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 - --> +--> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:height="24dp" - android:width="24dp" android:viewportHeight="24" - android:viewportWidth="24"> - <group android:name="_R_G"> - <group android:name="_R_G_L_0_G" android:translateX="2" - android:translateY="1.552999999999999"> - <path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M10 12.45 C9.17,12.45 8.5,11.77 8.5,10.95 C8.5,10.12 9.17,9.45 10,9.45 C10.83,9.45 11.5,10.12 11.5,10.95 C11.5,11.77 10.83,12.45 10,12.45c "/> - <path android:name="_R_G_L_0_G_D_1_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M6.47 15.23 C6.27,15.23 6.08,15.16 5.94,15.01 C4.85,13.93 4.25,12.48 4.25,10.95 C4.25,9.41 4.85,7.97 5.94,6.88 C8.18,4.64 11.82,4.64 14.07,6.88 C15.15,7.97 15.75,9.41 15.75,10.95 C15.75,12.48 15.15,13.93 14.07,15.01 C13.77,15.3 13.3,15.3 13.01,15.01 C12.71,14.72 12.71,14.24 13.01,13.95 C13.81,13.15 14.25,12.08 14.25,10.95 C14.25,9.81 13.81,8.74 13.01,7.94 C11.35,6.28 8.65,6.28 6.99,7.94 C6.19,8.75 5.75,9.81 5.75,10.95 C5.75,12.08 6.19,13.15 6.99,13.95 C7.29,14.25 7.29,14.72 6.99,15.01 C6.85,15.16 6.66,15.23 6.47,15.23c "/> - <path android:name="_R_G_L_0_G_D_2_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M16.36 18.06 C16.17,18.06 15.98,17.99 15.83,17.84 C15.54,17.55 15.54,17.07 15.83,16.78 C17.39,15.22 18.25,13.15 18.25,10.95 C18.25,8.74 17.39,6.67 15.83,5.11 C12.62,1.9 7.38,1.9 4.17,5.11 C2.61,6.67 1.75,8.74 1.75,10.95 C1.75,13.15 2.61,15.22 4.17,16.78 C4.46,17.07 4.46,17.55 4.17,17.84 C3.87,18.13 3.4,18.13 3.11,17.84 C1.26,16 0.25,13.55 0.25,10.95 C0.25,8.34 1.26,5.89 3.11,4.05 C6.91,0.25 13.09,0.25 16.89,4.05 C18.74,5.89 19.75,8.34 19.75,10.95 C19.75,13.55 18.74,16 16.89,17.84 C16.75,17.99 16.56,18.06 16.36,18.06c "/> + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <group android:name="_R_G" > + <group + android:name="_R_G_L_0_G" + android:translateX="2" + android:translateY="1.552999999999999" > + <path + android:name="_R_G_L_0_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M10 12.45 C9.17,12.45 8.5,11.77 8.5,10.95 C8.5,10.12 9.17,9.45 10,9.45 C10.83,9.45 11.5,10.12 11.5,10.95 C11.5,11.77 10.83,12.45 10,12.45c " /> + <path + android:name="_R_G_L_0_G_D_1_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M6.47 15.23 C6.27,15.23 6.08,15.16 5.94,15.01 C4.85,13.93 4.25,12.48 4.25,10.95 C4.25,9.41 4.85,7.97 5.94,6.88 C8.18,4.64 11.82,4.64 14.07,6.88 C15.15,7.97 15.75,9.41 15.75,10.95 C15.75,12.48 15.15,13.93 14.07,15.01 C13.77,15.3 13.3,15.3 13.01,15.01 C12.71,14.72 12.71,14.24 13.01,13.95 C13.81,13.15 14.25,12.08 14.25,10.95 C14.25,9.81 13.81,8.74 13.01,7.94 C11.35,6.28 8.65,6.28 6.99,7.94 C6.19,8.75 5.75,9.81 5.75,10.95 C5.75,12.08 6.19,13.15 6.99,13.95 C7.29,14.25 7.29,14.72 6.99,15.01 C6.85,15.16 6.66,15.23 6.47,15.23c " /> + <path + android:name="_R_G_L_0_G_D_2_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M16.36 18.06 C16.17,18.06 15.98,17.99 15.83,17.84 C15.54,17.55 15.54,17.07 15.83,16.78 C17.39,15.22 18.25,13.15 18.25,10.95 C18.25,8.74 17.39,6.67 15.83,5.11 C12.62,1.9 7.38,1.9 4.17,5.11 C2.61,6.67 1.75,8.74 1.75,10.95 C1.75,13.15 2.61,15.22 4.17,16.78 C4.46,17.07 4.46,17.55 4.17,17.84 C3.87,18.13 3.4,18.13 3.11,17.84 C1.26,16 0.25,13.55 0.25,10.95 C0.25,8.34 1.26,5.89 3.11,4.05 C6.91,0.25 13.09,0.25 16.89,4.05 C18.74,5.89 19.75,8.34 19.75,10.95 C19.75,13.55 18.74,16 16.89,17.84 C16.75,17.99 16.56,18.06 16.36,18.06c " /> </group> </group> - <group android:name="time_group"/> + <group android:name="time_group" /> </vector> 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..a558337902c4 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_qs_battery_saver.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M9.75,13.75h1.5v1.5c0,0.41,0.34,0.75,0.75,0.75s0.75-0.34,0.75-0.75v-1.5h1.5c0.41,0,0.75-0.34,0.75-0.75 s-0.34-0.75-0.75-0.75h-1.5v-1.5c0-0.41-0.34-0.75-0.75-0.75s-0.75,0.34-0.75,0.75v1.5h-1.5C9.34,12.25,9,12.59,9,13 S9.34,13.75,9.75,13.75z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M6,19c0,1.66,1.34,3,3,3h6c1.66,0,3-1.34,3-3V7c0-1.66-1.34-3-3-3h-1c0-0.55-0.45-1-1-1h-2c-0.55,0-1,0.45-1,1H9 C7.34,4,6,5.34,6,7V19z M7.5,7c0-0.83,0.67-1.5,1.5-1.5h6c0.83,0,1.5,0.67,1.5,1.5v12c0,0.83-0.67,1.5-1.5,1.5H9 c-0.83,0-1.5-0.67-1.5-1.5V7z" /> +</vector>
\ 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..e09aeb7f1d2f --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_0_4_bar.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M20,22H18.5V4.75A0.76 0.76 ,0,0,1,19.25,4h0a0.76 0.76 ,0,0,1,0.75 0.75 Z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M15.33,22h-1.5V9.75A0.76 0.76 ,0,0,1,14.58,9h0a0.75 0.75 ,0,0,1,0.75 0.75 Z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M10.67,22H9.17V14.75A0.75 0.75 ,0,0,1,9.92,14h0a0.76 0.76 ,0,0,1,0.75 0.75 Z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M6,22H4.5V19.75A0.76 0.76 ,0,0,1,5.25,19h0a0.76 0.76 ,0,0,1,0.75 0.75 Z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M20,22h-1.5V4.75C18.5,4.34,18.84,4,19.25,4l0,0C19.66,4,20,4.34,20,4.75V22z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M16.5,22H15V8.75C15,8.34,15.34,8,15.75,8h0c0.41,0,0.75,0.34,0.75,0.75V22z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M13,22h-1.5v-9.25c0-0.41,0.34-0.75,0.75-0.75h0c0.41,0,0.75,0.34,0.75,0.75V22z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M9.5,22H8v-6.25C8,15.34,8.34,15,8.75,15h0c0.41,0,0.75,0.34,0.75,0.75V22z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M6,22H4.5v-2.25C4.5,19.34,4.84,19,5.25,19h0C5.66,19,6,19.34,6,19.75V22z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> +</vector>
\ 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..26e96ab4c5c8 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_1_4_bar.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M20,22H18.5V4.75A0.76 0.76 ,0,0,1,19.25,4h0a0.76 0.76 ,0,0,1,0.75 0.75 Z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M15.33,22h-1.5V9.75A0.76 0.76 ,0,0,1,14.58,9h0a0.75 0.75 ,0,0,1,0.75 0.75 Z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M10.67,22H9.17V14.75A0.75 0.75 ,0,0,1,9.92,14h0a0.76 0.76 ,0,0,1,0.75 0.75 Z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillColor="@android:color/white" + android:pathData="M6,22H4.5V19.75A0.76 0.76 ,0,0,1,5.25,19h0a0.76 0.76 ,0,0,1,0.75 0.75 Z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M20,22h-1.5V4.75C18.5,4.34,18.84,4,19.25,4l0,0C19.66,4,20,4.34,20,4.75V22z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M16.5,22H15V8.75C15,8.34,15.34,8,15.75,8h0c0.41,0,0.75,0.34,0.75,0.75V22z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M13,22h-1.5v-9.25c0-0.41,0.34-0.75,0.75-0.75h0c0.41,0,0.75,0.34,0.75,0.75V22z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M9.5,22H8v-6.25C8,15.34,8.34,15,8.75,15h0c0.41,0,0.75,0.34,0.75,0.75V22z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillColor="@android:color/white" + android:pathData="M6,22H4.5v-2.25C4.5,19.34,4.84,19,5.25,19h0C5.66,19,6,19.34,6,19.75V22z" /> +</vector>
\ 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..53be899d5a8d --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_2_4_bar.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M20,22H18.5V4.75A0.76 0.76 ,0,0,1,19.25,4h0a0.76 0.76 ,0,0,1,0.75 0.75 Z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M15.33,22h-1.5V9.75A0.76 0.76 ,0,0,1,14.58,9h0a0.75 0.75 ,0,0,1,0.75 0.75 Z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillColor="@android:color/white" + android:pathData="M10.67,22H9.17V14.75A0.75 0.75 ,0,0,1,9.92,14h0a0.76 0.76 ,0,0,1,0.75 0.75 Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M6,22H4.5V19.75A0.76 0.76 ,0,0,1,5.25,19h0a0.76 0.76 ,0,0,1,0.75 0.75 Z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M20,22h-1.5V4.75C18.5,4.34,18.84,4,19.25,4l0,0C19.66,4,20,4.34,20,4.75V22z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M16.5,22H15V8.75C15,8.34,15.34,8,15.75,8h0c0.41,0,0.75,0.34,0.75,0.75V22z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M13,22h-1.5v-9.25c0-0.41,0.34-0.75,0.75-0.75h0c0.41,0,0.75,0.34,0.75,0.75V22z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillColor="@android:color/white" + android:pathData="M9.5,22H8v-6.25C8,15.34,8.34,15,8.75,15h0c0.41,0,0.75,0.34,0.75,0.75V22z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M6,22H4.5v-2.25C4.5,19.34,4.84,19,5.25,19h0C5.66,19,6,19.34,6,19.75V22z" /> +</vector>
\ 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..9139bb449509 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_3_4_bar.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M20,22H18.5V4.75A0.76 0.76 ,0,0,1,19.25,4h0a0.76 0.76 ,0,0,1,0.75 0.75 Z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillColor="@android:color/white" + android:pathData="M15.33,22h-1.5V9.75A0.76 0.76 ,0,0,1,14.58,9h0a0.75 0.75 ,0,0,1,0.75 0.75 Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M10.67,22H9.17V14.75A0.75 0.75 ,0,0,1,9.92,14h0a0.76 0.76 ,0,0,1,0.75 0.75 Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M6,22H4.5V19.75A0.76 0.76 ,0,0,1,5.25,19h0a0.76 0.76 ,0,0,1,0.75 0.75 Z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M20,22h-1.5V4.75C18.5,4.34,18.84,4,19.25,4l0,0C19.66,4,20,4.34,20,4.75V22z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M16.5,22H15V8.75C15,8.34,15.34,8,15.75,8h0c0.41,0,0.75,0.34,0.75,0.75V22z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillColor="@android:color/white" + android:pathData="M13,22h-1.5v-9.25c0-0.41,0.34-0.75,0.75-0.75h0c0.41,0,0.75,0.34,0.75,0.75V22z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M9.5,22H8v-6.25C8,15.34,8.34,15,8.75,15h0c0.41,0,0.75,0.34,0.75,0.75V22z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M6,22H4.5v-2.25C4.5,19.34,4.84,19,5.25,19h0C5.66,19,6,19.34,6,19.75V22z" /> +</vector>
\ 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..2c8d70123f60 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_cellular_4_4_bar.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M20,22H18.5V4.75A0.76 0.76 ,0,0,1,19.25,4h0a0.76 0.76 ,0,0,1,0.75 0.75 Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M15.33,22h-1.5V9.75A0.76 0.76 ,0,0,1,14.58,9h0a0.75 0.75 ,0,0,1,0.75 0.75 Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M10.67,22H9.17V14.75A0.75 0.75 ,0,0,1,9.92,14h0a0.76 0.76 ,0,0,1,0.75 0.75 Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M6,22H4.5V19.75A0.76 0.76 ,0,0,1,5.25,19h0a0.76 0.76 ,0,0,1,0.75 0.75 Z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M20,22h-1.5V4.75C18.5,4.34,18.84,4,19.25,4l0,0C19.66,4,20,4.34,20,4.75V22z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillColor="@android:color/white" + android:pathData="M16.5,22H15V8.75C15,8.34,15.34,8,15.75,8h0c0.41,0,0.75,0.34,0.75,0.75V22z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M13,22h-1.5v-9.25c0-0.41,0.34-0.75,0.75-0.75h0c0.41,0,0.75,0.34,0.75,0.75V22z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M9.5,22H8v-6.25C8,15.34,8.34,15,8.75,15h0c0.41,0,0.75,0.34,0.75,0.75V22z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M6,22H4.5v-2.25C4.5,19.34,4.84,19,5.25,19h0C5.66,19,6,19.34,6,19.75V22z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M20,4.75C20,4.34,19.66,4,19.25,4S18.5,4.34,18.5,4.75V22H20V4.75z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M15.75,8C15.34,8,15,8.34,15,8.75V22h1.5V8.75C16.5,8.34,16.16,8,15.75,8z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M12.25,12c-0.41,0-0.75,0.34-0.75,0.75V22H13v-9.25C13,12.34,12.66,12,12.25,12z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M8.75,15C8.34,15,8,15.34,8,15.75V22h1.5v-6.25C9.5,15.34,9.16,15,8.75,15z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M5.25,19c-0.41,0-0.75,0.34-0.75,0.75V22H6v-2.25C6,19.34,5.66,19,5.25,19z" /> +</vector>
\ 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 index 06755f6e3871..20418a34f200 100644 --- a/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml @@ -13,12 +13,22 @@ ~ 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 - --> +--> <animated-vector xmlns:android="http://schemas.android.com/apk/res/android" - android:drawable="@*android:drawable/ic_signal_wifi_transient_animation_drawable"> - <target android:name="_R_G_L_0_G_D_0_P_0" android:animation="@*android:anim/ic_signal_wifi_transient_animation_0"/> - <target android:name="_R_G_L_0_G_D_1_P_0" android:animation="@*android:anim/ic_signal_wifi_transient_animation_1"/> - <target android:name="_R_G_L_0_G_D_2_P_0" android:animation="@*android:anim/ic_signal_wifi_transient_animation_2"/> - <target android:name="_R_G_L_0_G_D_3_P_0" android:animation="@*android:anim/ic_signal_wifi_transient_animation_3"/> - <target android:name="time_group" android:animation="@*android:anim/ic_signal_wifi_transient_animation_4"/> + android:drawable="@*android:drawable/ic_signal_wifi_transient_animation_drawable" > + <target + android:name="_R_G_L_0_G_D_0_P_0" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_0" /> + <target + android:name="_R_G_L_0_G_D_1_P_0" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_1" /> + <target + android:name="_R_G_L_0_G_D_2_P_0" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_2" /> + <target + android:name="_R_G_L_0_G_D_3_P_0" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_3" /> + <target + android:name="time_group" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_4" /> </animated-vector> 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 index 6e455133e6eb..6dfe9d70e95f 100644 --- 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 @@ -13,25 +13,42 @@ ~ 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 - --> -<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:width="24dp" android:viewportHeight="24" - android:viewportWidth="24"> - <group android:name="_R_G"> - <group android:name="_R_G_L_0_G" android:translateX="0.6440000000000001" - android:translateY="2.755000000000001"> - <path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="0.3" android:fillType="nonZero" - android:pathData=" M12.86 15.75 C12.86,16.58 12.19,17.25 11.36,17.25 C10.53,17.25 9.86,16.58 9.86,15.75 C9.86,14.92 10.53,14.25 11.36,14.25 C12.19,14.25 12.86,14.92 12.86,15.75c "/> - <path android:name="_R_G_L_0_G_D_1_P_0" android:fillColor="#000000" - android:fillAlpha="0.3" android:fillType="nonZero" - android:pathData=" M15.61 12.25 C15.42,12.25 15.23,12.17 15.08,12.03 C14.09,11.04 12.76,10.5 11.36,10.5 C9.95,10.5 8.63,11.04 7.63,12.03 C7.34,12.32 6.86,12.32 6.57,12.02 C6.28,11.73 6.28,11.26 6.58,10.96 C7.86,9.7 9.55,9 11.36,9 C13.16,9 14.86,9.7 16.14,10.96 C16.43,11.25 16.43,11.73 16.14,12.02 C16,12.17 15.8,12.25 15.61,12.25c "/> - <path android:name="_R_G_L_0_G_D_2_P_0" android:fillColor="#000000" - android:fillAlpha="0.3" android:fillType="nonZero" - android:pathData=" M18.77 9.08 C18.58,9.08 18.39,9.01 18.24,8.86 C16.4,7.02 13.96,6 11.36,6 C8.75,6 6.31,7.02 4.47,8.86 C4.18,9.16 3.7,9.16 3.41,8.86 C3.12,8.57 3.11,8.1 3.41,7.8 C5.53,5.67 8.35,4.5 11.36,4.5 C14.36,4.5 17.18,5.67 19.31,7.8 C19.6,8.1 19.6,8.57 19.3,8.86 C19.16,9.01 18.97,9.08 18.77,9.08c "/> - <path android:name="_R_G_L_0_G_D_3_P_0" android:fillColor="#000000" - android:fillAlpha="0.3" android:fillType="nonZero" - android:pathData=" M21.96 5.89 C21.77,5.89 21.58,5.82 21.43,5.67 C18.74,2.98 15.16,1.5 11.36,1.5 C7.55,1.5 3.97,2.98 1.28,5.67 C0.99,5.97 0.51,5.97 0.22,5.67 C-0.07,5.38 -0.07,4.91 0.22,4.61 C3.19,1.64 7.15,0 11.36,0 C15.56,0 19.52,1.64 22.49,4.61 C22.78,4.91 22.78,5.38 22.49,5.67 C22.35,5.82 22.15,5.89 21.96,5.89c "/> +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <group android:name="_R_G" > + <group + android:name="_R_G_L_0_G" + android:translateX="0.6440000000000001" + android:translateY="2.755000000000001" > + <path + android:name="_R_G_L_0_G_D_0_P_0" + android:fillAlpha="0.3" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M12.86 15.75 C12.86,16.58 12.19,17.25 11.36,17.25 C10.53,17.25 9.86,16.58 9.86,15.75 C9.86,14.92 10.53,14.25 11.36,14.25 C12.19,14.25 12.86,14.92 12.86,15.75c " /> + <path + android:name="_R_G_L_0_G_D_1_P_0" + android:fillAlpha="0.3" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M15.61 12.25 C15.42,12.25 15.23,12.17 15.08,12.03 C14.09,11.04 12.76,10.5 11.36,10.5 C9.95,10.5 8.63,11.04 7.63,12.03 C7.34,12.32 6.86,12.32 6.57,12.02 C6.28,11.73 6.28,11.26 6.58,10.96 C7.86,9.7 9.55,9 11.36,9 C13.16,9 14.86,9.7 16.14,10.96 C16.43,11.25 16.43,11.73 16.14,12.02 C16,12.17 15.8,12.25 15.61,12.25c " /> + <path + android:name="_R_G_L_0_G_D_2_P_0" + android:fillAlpha="0.3" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M18.77 9.08 C18.58,9.08 18.39,9.01 18.24,8.86 C16.4,7.02 13.96,6 11.36,6 C8.75,6 6.31,7.02 4.47,8.86 C4.18,9.16 3.7,9.16 3.41,8.86 C3.12,8.57 3.11,8.1 3.41,7.8 C5.53,5.67 8.35,4.5 11.36,4.5 C14.36,4.5 17.18,5.67 19.31,7.8 C19.6,8.1 19.6,8.57 19.3,8.86 C19.16,9.01 18.97,9.08 18.77,9.08c " /> + <path + android:name="_R_G_L_0_G_D_3_P_0" + android:fillAlpha="0.3" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M21.96 5.89 C21.77,5.89 21.58,5.82 21.43,5.67 C18.74,2.98 15.16,1.5 11.36,1.5 C7.55,1.5 3.97,2.98 1.28,5.67 C0.99,5.97 0.51,5.97 0.22,5.67 C-0.07,5.38 -0.07,4.91 0.22,4.61 C3.19,1.64 7.15,0 11.36,0 C15.56,0 19.52,1.64 22.49,4.61 C22.78,4.91 22.78,5.38 22.49,5.67 C22.35,5.82 22.15,5.89 21.96,5.89c " /> </group> </group> - <group android:name="time_group"/> + <group android:name="time_group" /> </vector> 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..781c0f8e8ea5 --- /dev/null +++ b/packages/overlays/IconPackCircularAndroidOverlay/res/drawable/perm_group_calendar.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M 15 12.5 C 16.3807118746 12.5 17.5 13.6192881254 17.5 15 C 17.5 16.3807118746 16.3807118746 17.5 15 17.5 C 13.6192881254 17.5 12.5 16.3807118746 12.5 15 C 12.5 13.6192881254 13.6192881254 12.5 15 12.5 Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M17.5,1.75a0.75 0.75 ,0,0,0-1.5,0V3H8V1.75a0.75 0.75 ,0,0,0-1.5,0V3H3V18a3,3,0,0,0,3,3H18a3,3,0,0,0,3-3V3H17.5ZM19.5,18A1.5,1.5,0,0,1,18,19.5H6A1.5,1.5,0,0,1,4.5,18V9h15Zm0-13.5v3H4.5v-3Z" /> +</vector>
\ No newline at end of file diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_corp.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_corp.xml index 798907c386c7..b0001462bfff 100644 --- a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_corp.xml +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_corp.xml @@ -1,25 +1,29 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorHint" + android:tint="?android:attr/textColorHint" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path android:fillColor="@android:color/white" - android:pathData="M16,4c0-1.1-0.9-2-2-2h-4C8.9,2,8,2.9,8,4v2H2v12c0,1.66,1.34,3,3,3h14c1.66,0,3-1.34,3-3V6h-6V4z M9.5,4 c0-0.28,0.22-0.5,0.5-0.5h4c0.28,0,0.5,0.22,0.5,0.5v2h-5V4z M20.5,7.5V18c0,0.83-0.67,1.5-1.5,1.5H5c-0.83,0-1.5-0.67-1.5-1.5V7.5 H20.5z" /> + android:pathData="M16,4c0-1.1-0.9-2-2-2h-4C8.9,2,8,2.9,8,4v2H2v12c0,1.7,1.3,3,3,3h14c1.7,0,3-1.3,3-3V6h-6V4z M9.5,4 c0-0.3,0.2-0.5,0.5-0.5h4c0.3,0,0.5,0.2,0.5,0.5v2h-5V4z M20.5,7.5V18c0,0.8-0.7,1.5-1.5,1.5H5c-0.8,0-1.5-0.7-1.5-1.5V7.5H20.5z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 12 12.3 C 12.6627416998 12.3 13.2 12.8372583002 13.2 13.5 C 13.2 14.1627416998 12.6627416998 14.7 12 14.7 C 11.3372583002 14.7 10.8 14.1627416998 10.8 13.5 C 10.8 12.8372583002 11.3372583002 12.3 12 12.3 Z" /> </vector>
\ No newline at end of file diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_drag_handle.xml index a7ab99e39af6..5e640bab8392 100644 --- a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_drag_handle.xml +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_drag_handle.xml @@ -1,24 +1,25 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2019 The Android Open Source Project +<!-- + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" android:height="24dp" + android:tint="?android:attr/textColorHint" + android:viewportHeight="24" android:viewportWidth="24" - android:viewportHeight="24" android:tint="?android:attr/textColorHint"> - + android:width="24dp" > <path android:fillColor="@android:color/white" android:pathData="M4.75,10.5h14.5c0.41,0,0.75-0.34,0.75-0.75S19.66,9,19.25,9H4.75C4.34,9,4,9.34,4,9.75S4.34,10.5,4.75,10.5z" /> diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_hourglass_top.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_hourglass_top.xml index 8160e682f4f5..14c6603040f6 100644 --- a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_hourglass_top.xml +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_hourglass_top.xml @@ -1,28 +1,26 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2019 The Android Open Source Project +<!-- + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" android:height="24dp" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary"> - + android:width="24dp" > <path android:fillColor="@android:color/white" - android:pathData="M7,6.8c0,2.23,1.22,4.16,3.02,5.2C8.22,13.04,7,14.97,7,17.2V22h10v-4.8c0-2.23-1.22-4.16-3.02-5.2 -C15.78,10.96,17,9.03,17,6.8V2H7V6.8z -M15.5,17.2v3.3h-7v-3.3c0-1.6,0.87-3.1,2.26-3.9L12,12.59l1.24,0.71 -C14.63,14.1,15.5,15.6,15.5,17.2z" /> + android:pathData="M7,6.8c0,2.23,1.22,4.16,3.02,5.2C8.22,13.04,7,14.97,7,17.2V22h10v-4.8c0-2.23-1.22-4.16-3.02-5.2 C15.78,10.96,17,9.03,17,6.8V2H7V6.8z M15.5,17.2v3.3h-7v-3.3c0-1.6,0.87-3.1,2.26-3.9L12,12.59l1.24,0.71 C14.63,14.1,15.5,15.6,15.5,17.2z" /> </vector>
\ 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 index 82924bb6c983..730f1eacab98 100644 --- a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_info_no_shadow.xml +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_info_no_shadow.xml @@ -1,22 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M12,4c-0.41,0-0.75,0.34-0.75,0.75v8.44L8.03,9.97c-0.29-0.29-0.77-0.29-1.06,0s-0.29,0.77,0,1.06L12,16.06l5.03-5.03 c0.29-0.29,0.29-0.77,0-1.06s-0.77-0.29-1.06,0l-3.22,3.22V4.75C12.75,4.34,12.41,4,12,4z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M4.75,14.5C4.34,14.5,4,14.84,4,15.25v2C4,18.77,5.23,20,6.75,20h10.5c1.52,0,2.75-1.23,2.75-2.75v-2 c0-0.41-0.34-0.75-0.75-0.75s-0.75,0.34-0.75,0.75v2c0,0.69-0.56,1.25-1.25,1.25H6.75c-0.69,0-1.25-0.56-1.25-1.25v-2 C5.5,14.84,5.16,14.5,4.75,14.5z" /> +</vector>
\ 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 index 964955bc96ca..e086ebd95cf7 100644 --- a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_palette.xml +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_palette.xml @@ -1,22 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <group diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_pin.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_pin.xml index 35c0b810ec58..86b4318e8ccb 100644 --- a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_pin.xml +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_pin.xml @@ -1,29 +1,26 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2019 The Android Open Source Project +<!-- + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" android:height="24dp" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary"> - + android:width="24dp" > <path android:fillColor="@android:color/white" - android:pathData="M4.63,14.62C4.24,15.21,4.66,16,5.37,16h5.88c0,0,0,0,0,0v6.25c0,0.41,0.34,0.75,0.75,0.75s0.75-0.34,0.75-0.75V16 -c0,0,0,0,0,0h5.84c0.71,0,1.13-0.79,0.74-1.38c-0.84-1.25-1.99-2.26-3.33-2.95V4.5h1.23c0.41,0,0.75-0.34,0.75-0.75 -S17.65,3,17.23,3H6.73C6.32,3,5.98,3.34,5.98,3.75S6.32,4.5,6.73,4.5H8v7.15C6.64,12.34,5.48,13.36,4.63,14.62z -M14.5,4.5v8.08 -L15.32,13c0.75,0.39,1.43,0.89,2,1.5H6.64c0.58-0.61,1.27-1.12,2.03-1.51l0.82-0.42V4.5H14.5z" /> + android:pathData="M4.63,14.62C4.24,15.21,4.66,16,5.37,16h5.88c0,0,0,0,0,0v6.25c0,0.41,0.34,0.75,0.75,0.75s0.75-0.34,0.75-0.75V16 c0,0,0,0,0,0h5.84c0.71,0,1.13-0.79,0.74-1.38c-0.84-1.25-1.99-2.26-3.33-2.95V4.5h1.23c0.41,0,0.75-0.34,0.75-0.75 S17.65,3,17.23,3H6.73C6.32,3,5.98,3.34,5.98,3.75S6.32,4.5,6.73,4.5H8v7.15C6.64,12.34,5.48,13.36,4.63,14.62z M14.5,4.5v8.08 L15.32,13c0.75,0.39,1.43,0.89,2,1.5H6.64c0.58-0.61,1.27-1.12,2.03-1.51l0.82-0.42V4.5H14.5z" /> </vector>
\ 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 index 5fa740d63acc..f73989127dd5 100644 --- a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_remove_no_shadow.xml +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_remove_no_shadow.xml @@ -1,22 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_setting.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_setting.xml index afa0a150bd65..4c9b5d7b1c48 100644 --- a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_setting.xml +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_setting.xml @@ -1,22 +1,22 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_smartspace_preferences.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_smartspace_preferences.xml index b7d31a216cfd..0717cf99847c 100644 --- a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_smartspace_preferences.xml +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_smartspace_preferences.xml @@ -1,22 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_split_screen.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_split_screen.xml index 649e555cdb92..af5cb0553a1a 100644 --- a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_split_screen.xml +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_split_screen.xml @@ -1,22 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M9,20h6c1.66,0,3-1.34,3-3V6h0.5c0.41,0,0.75-0.34,0.75-0.75S18.91,4.5,18.5,4.5H18h-3l-1-1h-4l-1,1H6H5.5 c-0.41,0-0.75,0.34-0.75,0.75S5.09,6,5.5,6H6v11C6,18.66,7.34,20,9,20z M16.5,6v11c0,0.83-0.67,1.5-1.5,1.5H9 c-0.83,0-1.5-0.67-1.5-1.5V6H16.5z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M13.97,16c0.41,0,0.75-0.34,0.75-0.75v-6.5c0-0.41-0.34-0.75-0.75-0.75s-0.75,0.34-0.75,0.75v6.5 C13.22,15.66,13.55,16,13.97,16z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M10,16c0.41,0,0.75-0.34,0.75-0.75v-6.5C10.75,8.34,10.41,8,10,8S9.25,8.34,9.25,8.75v6.5C9.25,15.66,9.59,16,10,16z" /> +</vector>
\ 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 index e78ae9a2a522..035d9d416e61 100644 --- a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_warning.xml +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_warning.xml @@ -1,30 +1,31 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path android:fillColor="@android:color/white" - android:pathData="M4.47,21h15.06c1.54,0,2.5-1.67,1.73-3L13.73,4.99c-0.39-0.67-1.06-1-1.73-1s-1.35,0.33-1.73,1L2.74,18 C1.97,19.33,2.93,21,4.47,21z M4.04,18.75l7.53-13.01c0.13-0.22,0.33-0.25,0.43-0.25s0.31,0.03,0.43,0.25l7.53,13.01 c0.13,0.22,0.05,0.41,0,0.5c-0.05,0.09-0.18,0.25-0.43,0.25H4.47c-0.25,0-0.38-0.16-0.43-0.25C3.98,19.16,3.91,18.97,4.04,18.75z" /> + android:pathData="M21.26,18L13.73,4.99c-0.39-0.67-1.06-1-1.73-1s-1.35,0.33-1.73,1L2.74,18c-0.77,1.33,0.19,3,1.73,3h15.06 C21.07,21,22.03,19.33,21.26,18z M4.04,19.25c-0.05-0.09-0.13-0.28,0-0.5l7.53-13.01c0.13-0.22,0.33-0.25,0.43-0.25 s0.31,0.03,0.43,0.25l7.53,13.01c0.13,0.22,0.05,0.41,0,0.5c-0.05,0.09-0.18,0.25-0.43,0.25H4.47C4.22,19.5,4.09,19.34,4.04,19.25z" /> <path android:fillColor="@android:color/white" - android:pathData="M12,14.75c0.41,0,0.75-0.34,0.75-0.75V9.75C12.75,9.33,12.41,9,12,9s-0.75,0.34-0.75,0.75V14 C11.25,14.41,11.59,14.75,12,14.75z" /> + android:pathData="M12,14.5c0.41,0,0.75-0.34,0.75-0.75v-4C12.75,9.33,12.41,9,12,9s-0.75,0.34-0.75,0.75v4C11.25,14.16,11.59,14.5,12,14.5z" /> <path android:fillColor="@android:color/white" android:pathData="M 12 16 C 12.5522847498 16 13 16.4477152502 13 17 C 13 17.5522847498 12.5522847498 18 12 18 C 11.4477152502 18 11 17.5522847498 11 17 C 11 16.4477152502 11.4477152502 16 12 16 Z" /> diff --git a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_widget.xml b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_widget.xml index c3bc34976f0c..fcddfc36f939 100644 --- a/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_widget.xml +++ b/packages/overlays/IconPackCircularLauncherOverlay/res/drawable/ic_widget.xml @@ -1,22 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M19.78,8.22c-0.29-0.29-0.77-0.29-1.06,0L12,14.94L5.28,8.22c-0.29-0.29-0.77-0.29-1.06,0s-0.29,0.77,0,1.06L12,17.06 l7.78-7.78C20.07,8.99,20.07,8.51,19.78,8.22z" /> +</vector>
\ 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..9569e68be613 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M7.97,20.03c0.15,0.15,0.34,0.22,0.53,0.22s0.38-0.07,0.53-0.22L17.06,12L9.03,3.97c-0.29-0.29-0.77-0.29-1.06,0 s-0.29,0.77,0,1.06L14.94,12l-6.97,6.97C7.68,19.26,7.68,19.74,7.97,20.03z" /> +</vector>
\ 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 index 87cdb7bb6d15..9dea4ca2ea28 100644 --- a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml @@ -23,5 +23,4 @@ <path android:fillColor="@android:color/white" android:pathData="M17.5,21.5H4c-0.3,0-0.5-0.2-0.5-0.5V7.5C3.5,7.2,3.3,7,3,7H2.5C2.2,7,2,7.2,2,7.5v14C2,22.3,2.7,23,3.5,23h14 c0.3,0,0.5-0.2,0.5-0.5V22C18,21.7,17.8,21.5,17.5,21.5z M21,16V4c0-1.7-1.4-3-3-3H9C7.3,1,6,2.3,6,4v12c0,1.6,1.3,3,3,3h9 C19.6,19,21,17.6,21,16z M18,17.5H9c-0.8,0-1.5-0.7-1.5-1.5V4c0-0.8,0.7-1.5,1.5-1.5h9c0.8,0,1.5,0.7,1.5,1.5v12 C19.5,16.8,18.8,17.5,18,17.5z" /> - <path android:pathData="M0,0h24v24H0V0z" /> </vector>
\ 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..8b388f2d8761 --- /dev/null +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_help_actionbar.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M12,22c0,0,0.01,0,0.01,0c5.51,0,9.98-4.46,9.99-9.98c0-0.01,0-0.01,0-0.02c0-5.52-4.48-10-10-10S2,6.48,2,12 S6.48,22,12,22z M12,3.5c4.69,0,8.5,3.81,8.5,8.52c-0.01,4.68-3.81,8.48-8.5,8.48c-4.69,0-8.5-3.81-8.5-8.5 C3.5,7.31,7.31,3.5,12,3.5z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M8.57,9.89c0.4,0.1,0.81-0.15,0.9-0.56c0.12-0.5,0.36-0.94,0.71-1.29c1.06-1.06,2.78-1.06,3.84,0 c0.53,0.53,0.79,1.23,0.72,1.92c-0.06,0.62-0.39,1.15-0.92,1.5c-0.17,0.11-0.35,0.19-0.52,0.27c-0.7,0.33-1.67,0.78-1.93,2.37 c-0.07,0.41,0.21,0.8,0.61,0.86C12.02,14.99,12.06,15,12.1,15c0.36,0,0.68-0.26,0.74-0.62c0.14-0.82,0.48-0.98,1.09-1.26 c0.25-0.11,0.49-0.23,0.72-0.38c0.91-0.6,1.48-1.53,1.58-2.61c0.12-1.14-0.31-2.28-1.15-3.13c-1.64-1.64-4.32-1.64-5.96,0 c-0.54,0.54-0.93,1.24-1.11,2C7.92,9.39,8.16,9.8,8.57,9.89z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 12 16.5 C 12.5522847498 16.5 13 16.9477152502 13 17.5 C 13 18.0522847498 12.5522847498 18.5 12 18.5 C 11.4477152502 18.5 11 18.0522847498 11 17.5 C 11 16.9477152502 11.4477152502 16.5 12 16.5 Z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M11.99,2C6.47,2,2,6.48,2,12c0,5.52,4.47,10,9.99,10C17.52,22,22,17.52,22,12C22,6.48,17.52,2,11.99,2z M11.99,20.5 c-4.68,0-8.49-3.81-8.49-8.5c0-4.69,3.81-8.5,8.49-8.5c4.69,0,8.51,3.81,8.51,8.5C20.5,16.69,16.68,20.5,11.99,20.5z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M12,10.5c-0.41,0-0.75,0.34-0.75,0.75v5c0,0.41,0.34,0.75,0.75,0.75s0.75-0.34,0.75-0.75v-5 C12.75,10.84,12.41,10.5,12,10.5z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 12 7 C 12.5522847498 7 13 7.44771525017 13 8 C 13 8.55228474983 12.5522847498 9 12 9 C 11.4477152502 9 11 8.55228474983 11 8 C 11 7.44771525017 11.4477152502 7 12 7 Z" /> +</vector>
\ 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 index af4a4aaaf5ea..b6fa9fcf8294 100644 --- a/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_network_cell.xml +++ b/packages/overlays/IconPackCircularSettingsOverlay/res/drawable/ic_network_cell.xml @@ -22,17 +22,14 @@ android:width="24dp" > <path android:fillColor="@android:color/white" - android:pathData="M20,4.75C20,4.34,19.66,4,19.25,4S18.5,4.34,18.5,4.75V22H20V4.75z" /> + android:pathData="M20,22H18.5V4.75A0.76 0.76 ,0,0,1,19.25,4h0a0.76 0.76 ,0,0,1,0.75 0.75 Z" /> <path android:fillColor="@android:color/white" - android:pathData="M15.75,8C15.34,8,15,8.34,15,8.75V22h1.5V8.75C16.5,8.34,16.16,8,15.75,8z" /> + android:pathData="M15.33,22h-1.5V9.75A0.76 0.76 ,0,0,1,14.58,9h0a0.75 0.75 ,0,0,1,0.75 0.75 Z" /> <path android:fillColor="@android:color/white" - android:pathData="M12.25,12c-0.41,0-0.75,0.34-0.75,0.75V22H13v-9.25C13,12.34,12.66,12,12.25,12z" /> + android:pathData="M10.67,22H9.17V14.75A0.75 0.75 ,0,0,1,9.92,14h0a0.76 0.76 ,0,0,1,0.75 0.75 Z" /> <path android:fillColor="@android:color/white" - android:pathData="M8.75,15C8.34,15,8,15.34,8,15.75V22h1.5v-6.25C9.5,15.34,9.16,15,8.75,15z" /> - <path - android:fillColor="@android:color/white" - android:pathData="M5.25,19c-0.41,0-0.75,0.34-0.75,0.75V22H6v-2.25C6,19.34,5.66,19,5.25,19z" /> + android:pathData="M6,22H4.5V19.75A0.76 0.76 ,0,0,1,5.25,19h0a0.76 0.76 ,0,0,1,0.75 0.75 Z" /> </vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M9.5,16c1.51,0,2.9-0.52,4.01-1.39l5.47,5.42c0.15,0.15,0.34,0.22,0.53,0.22c0.19,0,0.39-0.07,0.53-0.22 c0.29-0.29,0.29-0.77,0-1.06l-5.46-5.41C15.46,12.45,16,11.04,16,9.5C16,5.91,13.09,3,9.5,3S3,5.91,3,9.5S5.91,16,9.5,16z M9.5,4.5 c2.76,0,5,2.24,5,5s-2.24,5-5,5s-5-2.24-5-5S6.74,4.5,9.5,4.5z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorAccent" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M12,8.5c-1.93,0-3.5,1.57-3.5,3.5s1.57,3.5,3.5,3.5c1.93,0,3.5-1.57,3.5-3.5S13.93,8.5,12,8.5z M12,14c-1.1,0-2-0.9-2-2 s0.9-2,2-2c1.1,0,2,0.9,2,2S13.1,14,12,14z M21.29,13.9l-1.83-1.05c-0.3-0.17-0.49-0.49-0.48-0.84v-0.01 c0-0.35,0.18-0.67,0.48-0.84l1.83-1.05c0.48-0.28,0.64-0.89,0.37-1.37l-2-3.46c-0.19-0.32-0.52-0.5-0.87-0.5 c-0.17,0-0.34,0.04-0.5,0.13l-1.84,1.06c-0.14,0.08-0.29,0.12-0.45,0.12c-0.17,0-0.35-0.05-0.5-0.14c0,0-0.01,0-0.01-0.01 C15.2,5.77,15,5.47,15,5.12V3c0-0.55-0.45-1-1-1h-4C9.45,2,9,2.45,9,3v2.12c0,0.34-0.2,0.65-0.5,0.82c0,0-0.01,0-0.01,0.01 c-0.16,0.09-0.33,0.14-0.5,0.14c-0.15,0-0.31-0.04-0.45-0.12L5.71,4.9c-0.16-0.09-0.33-0.13-0.5-0.13c-0.35,0-0.68,0.18-0.87,0.5 l-2,3.46C2.06,9.21,2.23,9.82,2.71,10.1l1.83,1.05c0.3,0.17,0.49,0.49,0.48,0.84v0.01c0,0.35-0.18,0.67-0.48,0.84L2.71,13.9 c-0.48,0.28-0.64,0.89-0.37,1.37l2,3.46c0.19,0.32,0.52,0.5,0.87,0.5c0.17,0,0.34-0.04,0.5-0.13l1.84-1.06 c0.14-0.08,0.29-0.12,0.45-0.12c0.17,0,0.35,0.05,0.5,0.14c0,0,0.01,0,0.01,0.01C8.8,18.23,9,18.53,9,18.88V21c0,0.55,0.45,1,1,1h4 c0.55,0,1-0.45,1-1v-2.12c0-0.34,0.2-0.65,0.5-0.82c0,0,0.01,0,0.01-0.01c0.16-0.09,0.33-0.14,0.5-0.14c0.15,0,0.31,0.04,0.45,0.12 l1.84,1.06c0.16,0.09,0.33,0.13,0.5,0.13c0.35,0,0.68-0.18,0.87-0.5l2-3.46C21.94,14.79,21.77,14.18,21.29,13.9z M18.61,17.55 l-1.41-0.81c-0.36-0.21-0.78-0.32-1.2-0.32c-0.43,0-0.86,0.12-1.25,0.34c-0.77,0.44-1.25,1.25-1.25,2.12v1.62h-3v-1.62 c0-0.87-0.48-1.68-1.26-2.12c-0.38-0.22-0.81-0.33-1.25-0.33c-0.42,0-0.84,0.11-1.2,0.32l-1.41,0.81l-1.5-2.6l1.39-0.8 c0.76-0.44,1.24-1.26,1.23-2.15c0-0.88-0.47-1.7-1.23-2.14l-1.39-0.8l1.5-2.6L6.8,7.26c0.36,0.21,0.78,0.32,1.2,0.32 c0.43,0,0.86-0.12,1.25-0.34c0.77-0.44,1.25-1.25,1.25-2.12V3.5h3v1.62c0,0.87,0.48,1.68,1.26,2.12c0.38,0.22,0.81,0.33,1.25,0.33 c0.42,0,0.84-0.11,1.2-0.32l1.41-0.81l1.5,2.6l-1.39,0.8c-0.76,0.44-1.24,1.26-1.23,2.15c0,0.88,0.47,1.7,1.23,2.14l1.39,0.8 L18.61,17.55z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M7.75,19H22v-4.5c0-2.34-1.79-4.27-4.08-4.48C17.45,7.18,14.97,5,12,5C9.82,5,7.83,6.18,6.78,8.06 c-2.97,0.39-5.21,3.19-4.71,6.31C2.5,17.09,5,19,7.75,19z M4.29,11.13c0.65-0.87,1.63-1.45,2.68-1.58l0.75-0.1l0.37-0.66 C8.88,7.38,10.38,6.5,12,6.5c2.18,0,4.08,1.62,4.44,3.76l0.19,1.14l1.15,0.11c1.52,0.14,2.72,1.45,2.72,2.99v3H7.75 c-2.09,0-3.9-1.45-4.2-3.36C3.38,13.07,3.64,12,4.29,11.13z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M9.95,13.1l1.3-1.3v3.45c0,0.41,0.34,0.75,0.75,0.75s0.75-0.34,0.75-0.75V11.8l1.3,1.3c0.15,0.15,0.34,0.22,0.53,0.22 s0.38-0.07,0.53-0.22c0.29-0.29,0.29-0.77,0-1.06L12,8.93l-3.11,3.11c-0.29,0.29-0.29,0.77,0,1.06S9.66,13.39,9.95,13.1z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M21,17c0-1.1-0.9-2-2-2H5c-1.1,0-2,0.9-2,2v3h18V17z M19.5,18.5h-15V17c0-0.28,0.22-0.5,0.5-0.5h14 c0.28,0,0.5,0.22,0.5,0.5V18.5z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M21,5c0-1.1-0.9-2-2-2H5C3.9,3,3,3.9,3,5v3h18V5z M19.5,6.5h-15V5c0-0.28,0.22-0.5,0.5-0.5h14c0.28,0,0.5,0.22,0.5,0.5V6.5 z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M21,11c0-1.1-0.9-2-2-2H5c-1.1,0-2,0.9-2,2v3h18V11z M19.5,12.5h-15V11c0-0.28,0.22-0.5,0.5-0.5h14 c0.28,0,0.5,0.22,0.5,0.5V12.5z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 6.01 4.75 C 6.42421356237 4.75 6.76 5.08578643763 6.76 5.5 C 6.76 5.91421356237 6.42421356237 6.25 6.01 6.25 C 5.59578643763 6.25 5.26 5.91421356237 5.26 5.5 C 5.26 5.08578643763 5.59578643763 4.75 6.01 4.75 Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 6.01 10.75 C 6.42421356237 10.75 6.76 11.0857864376 6.76 11.5 C 6.76 11.9142135624 6.42421356237 12.25 6.01 12.25 C 5.59578643763 12.25 5.26 11.9142135624 5.26 11.5 C 5.26 11.0857864376 5.59578643763 10.75 6.01 10.75 Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 6.01 16.75 C 6.42421356237 16.75 6.76 17.0857864376 6.76 17.5 C 6.76 17.9142135624 6.42421356237 18.25 6.01 18.25 C 5.59578643763 18.25 5.26 17.9142135624 5.26 17.5 C 5.26 17.0857864376 5.59578643763 16.75 6.01 16.75 Z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M20,12c0-2.13-0.83-4.13-2.34-5.64c-0.29-0.29-0.77-0.29-1.06,0s-0.29,0.77,0,1.06c1.23,1.22,1.9,2.85,1.9,4.58 c0,3.57-2.92,6.48-6.5,6.48c-0.43,0-0.86-0.06-1.28-0.14l1.31-1.31c0.29-0.29,0.29-0.77,0-1.06c-0.29-0.29-0.77-0.29-1.06,0 L7.94,19l3.03,3.03c0.15,0.15,0.34,0.22,0.53,0.22s0.38-0.07,0.53-0.22c0.29-0.29,0.29-0.77,0-1.06l-1.07-1.07 c0.34,0.04,0.69,0.07,1.04,0.07C16.41,19.98,20,16.4,20,12z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M5.5,12c0-3.57,2.92-6.48,6.5-6.48c0.43,0,0.86,0.06,1.28,0.14l-1.31,1.31c-0.29,0.29-0.29,0.77,0,1.06 c0.15,0.15,0.34,0.22,0.53,0.22c0.19,0,0.38-0.07,0.53-0.22L16.06,5l-3.03-3.03c-0.29-0.29-0.77-0.29-1.06,0s-0.29,0.77,0,1.06 l1.07,1.07C12.69,4.05,12.35,4.02,12,4.02C7.59,4.02,4,7.6,4,12c0,2.13,0.83,4.13,2.34,5.64c0.15,0.15,0.34,0.22,0.53,0.22 c0.19,0,0.38-0.07,0.53-0.22c0.29-0.29,0.29-0.77,0-1.06C6.18,15.35,5.5,13.73,5.5,12z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M6,5v14c0,1.66,1.34,3,3,3h6c1.66,0,3-1.34,3-3V5c0-1.66-1.34-3-3-3H9C7.34,2,6,3.34,6,5z M16.5,17.5h-9v-11h9V17.5z M15,20.5H9c-0.83,0-1.5-0.67-1.5-1.5h9C16.5,19.83,15.83,20.5,15,20.5z M9,3.5h6c0.83,0,1.5,0.67,1.5,1.5h-9 C7.5,4.17,8.17,3.5,9,3.5z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M8.47,13.03L12,16.56l3.53-3.53c0.29-0.29,0.29-0.77,0-1.06s-0.77-0.29-1.06,0l-1.72,1.72V8.75C12.75,8.34,12.41,8,12,8 s-0.75,0.34-0.75,0.75v4.94l-1.72-1.72c-0.29-0.29-0.77-0.29-1.06,0S8.18,12.74,8.47,13.03z" /> +</vector>
\ 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..920ecb5deb70 --- /dev/null +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_arrow_back.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M20.25,11.25H5.81l6.22-6.22c0.29-0.29,0.29-0.77,0-1.06s-0.77-0.29-1.06,0L2.94,12l8.03,8.03 c0.15,0.15,0.34,0.22,0.53,0.22s0.38-0.07,0.53-0.22c0.29-0.29,0.29-0.77,0-1.06l-6.22-6.22h14.44c0.41,0,0.75-0.34,0.75-0.75 S20.66,11.25,20.25,11.25z" /> +</vector>
\ 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 index ff20e484b2c2..05b490f781f7 100644 --- a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_cast.xml +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_cast.xml @@ -15,10 +15,10 @@ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:height="24dp" + android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" - android:width="24dp" > + android:width="17dp" > <path android:fillColor="@android:color/white" android:pathData="M2.25,9C2.66,9,3,8.66,3,8.25v-1C3,6.01,4.01,5,5.25,5h13.5C19.99,5,21,6.01,21,7.25V19h-7.25C13.34,19,13,19.34,13,19.75 s0.34,0.75,0.75,0.75h8.75V7.25c0-2.07-1.68-3.75-3.75-3.75H5.25C3.18,3.5,1.5,5.18,1.5,7.25v1C1.5,8.66,1.84,9,2.25,9z" /> diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_cast_connected.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_cast_connected.xml index cc181a3a1d8c..a7547db2a8e5 100644 --- a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_cast_connected.xml +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_cast_connected.xml @@ -15,10 +15,10 @@ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:height="17dp" + android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" - android:width="17dp" > + android:width="24dp" > <path android:fillColor="@android:color/white" android:pathData="M2.25,9C2.66,9,3,8.66,3,8.25v-1C3,6.01,4.01,5,5.25,5h13.5C19.99,5,21,6.01,21,7.25V19h-7.25C13.34,19,13,19.34,13,19.75 s0.34,0.75,0.75,0.75h8.75V7.25c0-2.07-1.68-3.75-3.75-3.75H5.25C3.18,3.5,1.5,5.18,1.5,7.25v1C1.5,8.66,1.84,9,2.25,9z" /> 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="17dp" + android:tint="?android:attr/colorError" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="17dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M13.75,15C13.34,15,13,15.34,13,15.75s0.34,0.75,0.75,0.75h4c0.41,0,0.75-0.34,0.75-0.75v-6.5c0-0.96-0.79-1.75-1.75-1.75 H6.25C5.84,7.5,5.5,7.84,5.5,8.25S5.84,9,6.25,9h10.5C16.89,9,17,9.11,17,9.25V15H13.75z" /> +</vector>
\ 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 index a50d431a8926..bbbebb574aa1 100644 --- a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_headset_mic.xml +++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_headset_mic.xml @@ -19,7 +19,6 @@ android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" > - <path android:pathData="M0,0h24v24H0V0z" /> <path android:fillColor="@android:color/white" android:pathData="M12,1c-4.96,0-9,4.04-9,9v6.78C3,18.56,4.41,20,6.13,20H9v-8H4.5v-2c0-4.13,3.36-7.5,7.5-7.5s7.5,3.36,7.5,7.5v2H15v8h2.87 c0.59,0,1.13-0.18,1.6-0.47c-0.14,1.11-1.08,1.97-2.22,1.97h-4.5c-0.41,0-0.75,0.34-0.75,0.75S12.34,23,12.75,23h4.5 c2.07,0,3.75-1.68,3.75-3.75V10C21,5.04,16.96,1,12,1z M7.5,18.5H6.13c-0.9,0-1.63-0.77-1.63-1.72V13.5h3V18.5z M17.87,18.5H16.5 v-5h3V16v0.78C19.5,17.73,18.77,18.5,17.87,18.5z" /> 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="17dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="17dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M16,4c0-1.1-0.9-2-2-2h-4C8.9,2,8,2.9,8,4v2H2v12c0,1.7,1.3,3,3,3h14c1.7,0,3-1.3,3-3V6h-6V4z M9.5,4 c0-0.3,0.2-0.5,0.5-0.5h4c0.3,0,0.5,0.2,0.5,0.5v2h-5V4z M20.5,7.5V18c0,0.8-0.7,1.5-1.5,1.5H5c-0.8,0-1.5-0.7-1.5-1.5V7.5H20.5z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 12 12.3 C 12.6627416998 12.3 13.2 12.8372583002 13.2 13.5 C 13.2 14.1627416998 12.6627416998 14.7 12 14.7 C 11.3372583002 14.7 10.8 14.1627416998 10.8 13.5 C 10.8 12.8372583002 11.3372583002 12.3 12 12.3 Z" /> +</vector>
\ 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 index e884bd3bc249..bd5aefac7187 100644 --- a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml @@ -13,10 +13,16 @@ ~ 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 - --> +--> <animated-vector xmlns:android="http://schemas.android.com/apk/res/android" - android:drawable="@*android:drawable/ic_bluetooth_transient_animation_drawable"> - <target android:name="_R_G_L_1_G_D_0_P_0" android:animation="@*android:anim/ic_bluetooth_transient_animation_0" /> - <target android:name="_R_G_L_0_G_D_0_P_0" android:animation="@*android:anim/ic_bluetooth_transient_animation_1" /> - <target android:name="time_group" android:animation="@*android:anim/ic_bluetooth_transient_animation_2" /> + android:drawable="@*android:drawable/ic_bluetooth_transient_animation_drawable" > + <target + android:name="_R_G_L_1_G_D_0_P_0" + android:animation="@*android:anim/ic_bluetooth_transient_animation_0" /> + <target + android:name="_R_G_L_0_G_D_0_P_0" + android:animation="@*android:anim/ic_bluetooth_transient_animation_1" /> + <target + android:name="time_group" + android:animation="@*android:anim/ic_bluetooth_transient_animation_2" /> </animated-vector>
\ 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 index 79107d8f6214..4b98a0f92706 100644 --- a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml @@ -13,29 +13,46 @@ ~ 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 - --> -<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:width="24dp" android:viewportHeight="24" - android:viewportWidth="24"> - <group android:name="_R_G"> - <group android:name="_R_G_L_2_G" android:translateX="3.099" - android:translateY="1.6400000000000006"> - <path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M10.41 10.36 C10.41,10.36 14.16,6.62 14.16,6.62 C14.57,6.21 14.57,5.55 14.16,5.14 C14.16,5.14 9.69,0.67 9.69,0.67 C9.69,0.67 9.66,0.64 9.66,0.64 C9.24,0.25 8.58,0.27 8.18,0.69 C8,0.88 7.9,1.14 7.9,1.4 C7.9,1.4 7.9,7.84 7.9,7.84 C7.9,7.84 3.85,3.79 3.85,3.79 C3.44,3.38 2.79,3.38 2.38,3.79 C1.97,4.2 1.97,4.85 2.38,5.26 C2.38,5.26 7.47,10.36 7.47,10.36 C7.47,10.36 2.38,15.45 2.38,15.45 C1.97,15.86 1.97,16.51 2.38,16.92 C2.79,17.33 3.44,17.33 3.85,16.92 C3.85,16.92 7.9,12.87 7.9,12.87 C7.9,12.87 7.9,19.32 7.9,19.32 C7.9,19.89 8.37,20.36 8.94,20.36 C9.2,20.36 9.46,20.26 9.65,20.08 C9.65,20.08 9.7,20.03 9.7,20.03 C9.7,20.03 14.16,15.57 14.16,15.57 C14.57,15.16 14.57,14.5 14.16,14.09 C14.16,14.09 10.41,10.36 10.41,10.36c M9.89 3.73 C9.89,3.73 12.04,5.88 12.04,5.88 C12.04,5.88 9.89,8.03 9.89,8.03 C9.89,8.03 9.89,3.73 9.89,3.73c M9.89 16.98 C9.89,16.98 9.89,12.68 9.89,12.68 C9.89,12.68 12.04,14.83 12.04,14.83 C12.04,14.83 9.89,16.98 9.89,16.98c "/> +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <group android:name="_R_G" > + <group + android:name="_R_G_L_2_G" + android:translateX="3.099" + android:translateY="1.6400000000000006" > + <path + android:name="_R_G_L_2_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M10.41 10.36 C10.41,10.36 14.16,6.62 14.16,6.62 C14.57,6.21 14.57,5.55 14.16,5.14 C14.16,5.14 9.69,0.67 9.69,0.67 C9.69,0.67 9.66,0.64 9.66,0.64 C9.24,0.25 8.58,0.27 8.18,0.69 C8,0.88 7.9,1.14 7.9,1.4 C7.9,1.4 7.9,7.84 7.9,7.84 C7.9,7.84 3.85,3.79 3.85,3.79 C3.44,3.38 2.79,3.38 2.38,3.79 C1.97,4.2 1.97,4.85 2.38,5.26 C2.38,5.26 7.47,10.36 7.47,10.36 C7.47,10.36 2.38,15.45 2.38,15.45 C1.97,15.86 1.97,16.51 2.38,16.92 C2.79,17.33 3.44,17.33 3.85,16.92 C3.85,16.92 7.9,12.87 7.9,12.87 C7.9,12.87 7.9,19.32 7.9,19.32 C7.9,19.89 8.37,20.36 8.94,20.36 C9.2,20.36 9.46,20.26 9.65,20.08 C9.65,20.08 9.7,20.03 9.7,20.03 C9.7,20.03 14.16,15.57 14.16,15.57 C14.57,15.16 14.57,14.5 14.16,14.09 C14.16,14.09 10.41,10.36 10.41,10.36c M9.89 3.73 C9.89,3.73 12.04,5.88 12.04,5.88 C12.04,5.88 9.89,8.03 9.89,8.03 C9.89,8.03 9.89,3.73 9.89,3.73c M9.89 16.98 C9.89,16.98 9.89,12.68 9.89,12.68 C9.89,12.68 12.04,14.83 12.04,14.83 C12.04,14.83 9.89,16.98 9.89,16.98c " /> </group> - <group android:name="_R_G_L_1_G" android:translateX="3.099" - android:translateY="1.6400000000000006"> - <path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M16.96 9.3 C16.95,9.3 16.95,9.29 16.95,9.28 C16.36,8.71 15.42,8.72 14.84,9.3 C14.84,9.3 14.83,9.31 14.83,9.31 C14.25,9.9 14.25,10.84 14.84,11.42 C15.42,12.01 16.37,12.01 16.96,11.42 C17.55,10.84 17.55,9.89 16.96,9.3c "/> + <group + android:name="_R_G_L_1_G" + android:translateX="3.099" + android:translateY="1.6400000000000006" > + <path + android:name="_R_G_L_1_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M16.96 9.3 C16.95,9.3 16.95,9.29 16.95,9.28 C16.36,8.71 15.42,8.72 14.84,9.3 C14.84,9.3 14.83,9.31 14.83,9.31 C14.25,9.9 14.25,10.84 14.84,11.42 C15.42,12.01 16.37,12.01 16.96,11.42 C17.55,10.84 17.55,9.89 16.96,9.3c " /> </group> - <group android:name="_R_G_L_0_G" android:translateX="3.099" - android:translateY="1.6400000000000006"> - <path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M2.96 9.3 C2.96,9.3 2.95,9.29 2.95,9.29 C2.36,8.71 1.42,8.71 0.84,9.3 C0.84,9.3 0.83,9.31 0.83,9.31 C0.25,9.9 0.25,10.84 0.84,11.42 C1.42,12.01 2.37,12.01 2.96,11.42 C3.55,10.83 3.55,9.89 2.96,9.3c "/> + <group + android:name="_R_G_L_0_G" + android:translateX="3.099" + android:translateY="1.6400000000000006" > + <path + android:name="_R_G_L_0_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M2.96 9.3 C2.96,9.3 2.95,9.29 2.95,9.29 C2.36,8.71 1.42,8.71 0.84,9.3 C0.84,9.3 0.83,9.31 0.83,9.31 C0.25,9.9 0.25,10.84 0.84,11.42 C1.42,12.01 2.37,12.01 2.96,11.42 C3.55,10.83 3.55,9.89 2.96,9.3c " /> </group> </group> - <group android:name="time_group"/> + <group android:name="time_group" /> </vector> diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml index 0a5005039cef..26527ead9cc4 100644 --- a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_headset_hfp.xml @@ -20,7 +20,6 @@ android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > - <path android:pathData="M0,0h24v24H0V0z" /> <path android:fillColor="@android:color/white" android:pathData="M11.4,1.02C6.62,1.33,3,5.52,3,10.31L3,17c0,1.66,1.34,3,3,3h2c0.55,0,1-0.45,1-1v-6c0-0.55-0.45-1-1-1H5l0-1.71 C5,6.45,7.96,3.11,11.79,3C15.76,2.89,19,6.06,19,10v2h-3c-0.55,0-1,0.45-1,1v6c0,0.55,0.45,1,1,1h3v1h-6c-0.55,0-1,0.45-1,1v0 c0,0.55,0.45,1,1,1h5c1.66,0,3-1.34,3-3V10C21,4.83,16.64,0.68,11.4,1.02z" /> diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml index aeee379f71be..562ed17ae1ec 100644 --- a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_hearing_aid.xml @@ -19,7 +19,6 @@ android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > - <path android:pathData="M0,0h24v24H0V0z" /> <path android:fillColor="@android:color/white" android:pathData="M17,20c-0.29,0-0.56-0.06-0.76-0.15c-0.71-0.37-1.21-0.88-1.71-2.38c-0.51-1.56-1.47-2.29-2.39-3 c-0.79-0.61-1.61-1.24-2.32-2.53C9.29,10.98,9,9.93,9,9c0-2.8,2.2-5,5-5c2.52,0,4.55,1.78,4.94,4.18C19.01,8.65,19.42,9,19.9,9 h0.04c0.59,0,1.07-0.53,0.98-1.11C20.4,4.51,17.55,2,14,2c-3.93,0-7,3.07-7,7c0,1.26,0.38,2.65,1.07,3.9 c0.91,1.65,1.98,2.48,2.85,3.15c0.81,0.62,1.39,1.07,1.71,2.05c0.6,1.82,1.37,2.84,2.73,3.55C15.87,21.88,16.43,22,17,22 c1.77,0,3.27-1.15,3.8-2.74C21,18.64,20.51,18,19.85,18H19.7c-0.38,0-0.68,0.27-0.81,0.63C18.63,19.42,17.88,20,17,20z M6.98,1.98 L6.95,1.95c-0.42-0.42-1.1-0.37-1.47,0.08C3.93,3.93,3,6.36,3,9s0.93,5.07,2.48,6.97c0.37,0.45,1.06,0.5,1.47,0.08l0.02-0.02 c0.35-0.35,0.39-0.92,0.07-1.3C5.77,13.17,5,11.18,5,9c0-2.17,0.77-4.17,2.05-5.71C7.37,2.9,7.33,2.33,6.98,1.98z M11.5,9 c0,1.38,1.12,2.5,2.5,2.5s2.5-1.12,2.5-2.5S15.38,6.5,14,6.5S11.5,7.62,11.5,9z" /> diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_network_pan.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_network_pan.xml index 5da297042f0b..59a18bad6c66 100644 --- a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_network_pan.xml +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_network_pan.xml @@ -22,11 +22,11 @@ android:width="24dp" > <path android:fillColor="@android:color/white" - android:pathData="M11.51,12l3.75-3.73c0.41-0.41,0.41-1.07,0-1.48l-4.47-4.47l-0.03-0.03C10.57,2.11,10.32,2,10.04,2C9.47,2,9,2.47,9,3.04 v6.45L4.95,5.43c-0.41-0.41-1.06-0.41-1.47,0c-0.41,0.41-0.41,1.06,0,1.47L8.57,12l-5.09,5.09c-0.41,0.41-0.41,1.06,0,1.47 c0.41,0.41,1.06,0.41,1.47,0L9,14.51v6.45C9,21.53,9.47,22,10.04,22c0.28,0,0.53-0.11,0.71-0.27l0.05-0.05l4.46-4.46 c0.41-0.41,0.41-1.07,0-1.48L11.51,12z M10.99,5.38l2.15,2.15l-2.15,2.15V5.38z M10.99,18.62v-4.3l2.15,2.15L10.99,18.62z" /> + android:pathData="M14.95,11.3c-0.39,0.39-0.39,1.03,0,1.42l1.61,1.61C16.84,13.61,17,12.82,17,12s-0.16-1.59-0.43-2.31L14.95,11.3z" /> <path android:fillColor="@android:color/white" - android:pathData="M20.08,7.77c-0.24-0.54-0.96-0.66-1.39-0.23c-0.26,0.26-0.32,0.65-0.17,0.98c0.47,1.07,0.72,2.24,0.72,3.47 c0,1.24-0.26,2.43-0.73,3.49c-0.14,0.32-0.09,0.69,0.16,0.94c0.4,0.4,1.09,0.29,1.34-0.23c0.63-1.3,0.98-2.76,0.98-4.3 C20.98,10.43,20.66,9.03,20.08,7.77z" /> + android:pathData="M11.51,12l3.75-3.73c0.41-0.41,0.41-1.07,0-1.48l-4.47-4.47l-0.03-0.03C10.57,2.11,10.32,2,10.04,2C9.47,2,9,2.47,9,3.04 v6.45L4.95,5.43c-0.41-0.41-1.06-0.41-1.47,0c-0.41,0.41-0.41,1.06,0,1.47L8.57,12l-5.09,5.09c-0.41,0.41-0.41,1.06,0,1.47 c0.41,0.41,1.06,0.41,1.47,0L9,14.51v6.45C9,21.53,9.47,22,10.04,22c0.28,0,0.53-0.11,0.71-0.27l0.05-0.05l4.46-4.46 c0.41-0.41,0.41-1.07,0-1.48L11.51,12z M10.99,5.38l2.15,2.15l-2.15,2.15V5.38z M10.99,18.62v-4.3l2.15,2.15L10.99,18.62z" /> <path android:fillColor="@android:color/white" - android:pathData="M14.95,11.3c-0.39,0.39-0.39,1.03,0,1.42l1.61,1.61C16.84,13.61,17,12.82,17,12s-0.16-1.59-0.43-2.31L14.95,11.3z" /> + android:pathData="M20.08,7.77c-0.24-0.54-0.96-0.66-1.39-0.23c-0.26,0.26-0.32,0.65-0.17,0.98c0.47,1.07,0.72,2.24,0.72,3.47 c0,1.24-0.26,2.43-0.73,3.49c-0.14,0.32-0.09,0.69,0.16,0.94c0.4,0.4,1.09,0.29,1.34-0.23c0.63-1.3,0.98-2.76,0.98-4.3 C20.98,10.43,20.66,9.03,20.08,7.77z" /> </vector>
\ 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 index e13b90f1df74..a05cf658b2ec 100644 --- a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_bt_pointing_hid.xml @@ -20,7 +20,6 @@ android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > - <path android:pathData="M0,0h24v24H0V0z" /> <path android:fillColor="@android:color/white" android:pathData="M13,1.07V9h7C20,4.92,16.95,1.56,13,1.07z M4,15c0,4.42,3.58,8,8,8s8-3.58,8-8v-4H4V15z M11,1.07C7.05,1.56,4,4.92,4,9h7 V1.07z" /> 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="@*android:color/accent_device_default_light" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path android:pathData="M 10 4 H 14 V 6 H 10 V 4 Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M20,6h-4V4c0-1.1-0.9-2-2-2h-4C8.9,2,8,2.9,8,4v2H4C2.9,6,2,6.9,2,8l0,11c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8 C22,6.9,21.1,6,20,6z M12,15c-0.8,0-1.5-0.7-1.5-1.5S11.2,12,12,12s1.5,0.7,1.5,1.5S12.8,15,12,15z M14,6h-4V4h4V6z" /> +</vector>
\ 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 index 3a52b878619c..82436f52dd4a 100644 --- a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_expand_more.xml +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_expand_more.xml @@ -16,6 +16,7 @@ --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" + android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > diff --git a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml index 54738c083ca3..eb2345204e7c 100644 --- a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml @@ -13,11 +13,19 @@ ~ 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 - --> +--> <animated-vector xmlns:android="http://schemas.android.com/apk/res/android" - android:drawable="@*android:drawable/ic_hotspot_transient_animation_drawable"> - <target android:name="_R_G_L_0_G_D_0_P_0" android:animation="@*android:anim/ic_hotspot_transient_animation_2"/> - <target android:name="_R_G_L_0_G_D_1_P_0" android:animation="@*android:anim/ic_hotspot_transient_animation_1"/> - <target android:name="_R_G_L_0_G_D_2_P_0" android:animation="@*android:anim/ic_hotspot_transient_animation_0"/> - <target android:name="time_group" android:animation="@*android:anim/ic_hotspot_transient_animation_3"/> + android:drawable="@*android:drawable/ic_hotspot_transient_animation_drawable" > + <target + android:name="_R_G_L_0_G_D_0_P_0" + android:animation="@*android:anim/ic_hotspot_transient_animation_2" /> + <target + android:name="_R_G_L_0_G_D_1_P_0" + android:animation="@*android:anim/ic_hotspot_transient_animation_1" /> + <target + android:name="_R_G_L_0_G_D_2_P_0" + android:animation="@*android:anim/ic_hotspot_transient_animation_0" /> + <target + android:name="time_group" + android:animation="@*android:anim/ic_hotspot_transient_animation_3" /> </animated-vector> 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 index 737b5222c181..317126228e34 100644 --- a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_hotspot_transient_animation_drawable.xml +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_hotspot_transient_animation_drawable.xml @@ -13,23 +13,36 @@ ~ 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 - --> -<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:width="24dp" android:viewportHeight="24" - android:viewportWidth="24"> - <group android:name="_R_G"> - <group android:name="_R_G_L_0_G" android:translateX="1.545" - android:translateY="2.1449999999999996"> - <path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M9.31 0.92 C4.67,1.43 0.92,5.26 0.5,9.92 C0.25,12.64 1.1,15.17 2.65,17.1 C3.02,17.56 3.71,17.6 4.13,17.18 C4.49,16.82 4.52,16.25 4.21,15.86 C2.81,14.11 2.12,11.76 2.61,9.25 C3.22,6.12 5.75,3.6 8.89,3 C14,2.04 18.45,5.92 18.45,10.86 C18.45,12.75 17.79,14.48 16.69,15.86 C16.37,16.25 16.41,16.81 16.77,17.17 C16.77,17.17 16.77,17.17 16.77,17.17 C17.19,17.59 17.89,17.56 18.26,17.09 C19.64,15.39 20.45,13.22 20.45,10.86 C20.45,4.96 15.34,0.25 9.31,0.92c "/> - <path android:name="_R_G_L_0_G_D_1_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M13.91 14.31 C13.91,14.31 13.92,14.32 13.92,14.32 C14.35,14.75 15.08,14.71 15.42,14.21 C16.07,13.25 16.45,12.1 16.45,10.85 C16.45,7.11 13.01,4.16 9.12,5 C6.88,5.49 5.08,7.3 4.6,9.54 C4.22,11.28 4.61,12.92 5.48,14.2 C5.83,14.71 6.56,14.75 6.99,14.32 C6.99,14.32 7,14.31 7,14.31 C7.34,13.97 7.37,13.43 7.1,13.03 C6.6,12.26 6.36,11.32 6.49,10.29 C6.73,8.55 8.16,7.13 9.9,6.89 C12.36,6.56 14.46,8.46 14.46,10.85 C14.46,11.66 14.22,12.4 13.81,13.02 C13.54,13.43 13.57,13.97 13.91,14.31c "/> - <path android:name="_R_G_L_0_G_D_2_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M12.46 10.86 C12.46,11.96 11.56,12.86 10.46,12.86 C9.35,12.86 8.46,11.96 8.46,10.86 C8.46,9.75 9.35,8.86 10.46,8.86 C11.56,8.86 12.46,9.75 12.46,10.86c "/> +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <group android:name="_R_G" > + <group + android:name="_R_G_L_0_G" + android:translateX="1.545" + android:translateY="2.1449999999999996" > + <path + android:name="_R_G_L_0_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M9.31 0.92 C4.67,1.43 0.92,5.26 0.5,9.92 C0.25,12.64 1.1,15.17 2.65,17.1 C3.02,17.56 3.71,17.6 4.13,17.18 C4.49,16.82 4.52,16.25 4.21,15.86 C2.81,14.11 2.12,11.76 2.61,9.25 C3.22,6.12 5.75,3.6 8.89,3 C14,2.04 18.45,5.92 18.45,10.86 C18.45,12.75 17.79,14.48 16.69,15.86 C16.37,16.25 16.41,16.81 16.77,17.17 C16.77,17.17 16.77,17.17 16.77,17.17 C17.19,17.59 17.89,17.56 18.26,17.09 C19.64,15.39 20.45,13.22 20.45,10.86 C20.45,4.96 15.34,0.25 9.31,0.92c " /> + <path + android:name="_R_G_L_0_G_D_1_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M13.91 14.31 C13.91,14.31 13.92,14.32 13.92,14.32 C14.35,14.75 15.08,14.71 15.42,14.21 C16.07,13.25 16.45,12.1 16.45,10.85 C16.45,7.11 13.01,4.16 9.12,5 C6.88,5.49 5.08,7.3 4.6,9.54 C4.22,11.28 4.61,12.92 5.48,14.2 C5.83,14.71 6.56,14.75 6.99,14.32 C6.99,14.32 7,14.31 7,14.31 C7.34,13.97 7.37,13.43 7.1,13.03 C6.6,12.26 6.36,11.32 6.49,10.29 C6.73,8.55 8.16,7.13 9.9,6.89 C12.36,6.56 14.46,8.46 14.46,10.85 C14.46,11.66 14.22,12.4 13.81,13.02 C13.54,13.43 13.57,13.97 13.91,14.31c " /> + <path + android:name="_R_G_L_0_G_D_2_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M12.46 10.86 C12.46,11.96 11.56,12.86 10.46,12.86 C9.35,12.86 8.46,11.96 8.46,10.86 C8.46,9.75 9.35,8.86 10.46,8.86 C11.56,8.86 12.46,9.75 12.46,10.86c " /> </group> </group> - <group android:name="time_group"/> + <group android:name="time_group" /> </vector> 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..22e183c694d5 --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_qs_battery_saver.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M10,2v2H8.33C7.6,4,7,4.6,7,5.33v15.33C7,21.4,7.6,22,8.33,22h7.33C16.4,22,17,21.4,17,20.67V5.33C17,4.6,16.4,4,15.67,4 H14V2H10z M15,13c0,0.55-0.45,1-1,1h-1v1c0,0.55-0.45,1-1,1s-1-0.45-1-1v-1h-1c-0.55,0-1-0.45-1-1s0.45-1,1-1h1v-1 c0-0.55,0.45-1,1-1s1,0.45,1,1v1h1C14.55,12,15,12.45,15,13z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M3.8,22h17.19c0.55,0,1.01-0.45,1.01-1.01V3.8c0-0.71-0.87-1.08-1.38-0.57L3.24,20.62C2.73,21.13,3.09,22,3.8,22z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M3.8,22h17.19c0.55,0,1.01-0.45,1.01-1.01V3.8c0-0.71-0.87-1.08-1.38-0.57L3.24,20.62C2.73,21.13,3.09,22,3.8,22z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M3.8,22h17.19c0.55,0,1.01-0.45,1.01-1.01V3.8c0-0.71-0.87-1.08-1.38-0.57L3.24,20.62C2.73,21.13,3.09,22,3.8,22z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillColor="@android:color/white" + android:pathData="M11.93,11.93l-8.69,8.69C2.73,21.13,3.09,22,3.8,22h8.13V11.93z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M3.8,22H21a1,1,0,0,0,1-1V3.8a0.81 0.81 ,0,0,0-1.38-0.57L3.24,20.62A0.81 0.81 ,0,0,0,3.8,22Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M3.24,20.62A0.81 0.81 ,0,0,0,3.8,22H7.93V15.93Z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M3.8,22h17.19c0.55,0,1.01-0.45,1.01-1.01V3.8c0-0.71-0.87-1.08-1.38-0.57L3.24,20.62C2.73,21.13,3.09,22,3.8,22z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillColor="@android:color/white" + android:pathData="M13.94,9.92l-10.7,10.7C2.73,21.13,3.09,22,3.8,22h10.14L13.94,9.92z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M3.8,22H21a1,1,0,0,0,1-1V3.8a0.81 0.81 ,0,0,0-1.38-0.57L3.24,20.62A0.81 0.81 ,0,0,0,3.8,22Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M3.24,20.62A0.81 0.81 ,0,0,0,3.8,22h7.65V12.41Z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M3.8,22h17.19c0.55,0,1.01-0.45,1.01-1.01V3.8c0-0.71-0.87-1.08-1.38-0.57L3.24,20.62C2.73,21.13,3.09,22,3.8,22z" + android:strokeAlpha="0.3" + android:strokeWidth="1" /> + <path + android:fillColor="@android:color/white" + android:pathData="M16.97,6.9L3.24,20.62C2.73,21.13,3.09,22,3.8,22h13.16V6.9H16.97z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M3.8,22H21a1,1,0,0,0,1-1V3.8a0.81 0.81 ,0,0,0-1.38-0.57L3.24,20.62A0.81 0.81 ,0,0,0,3.8,22Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M3.24,20.62A0.81 0.81 ,0,0,0,3.8,22H15V8.89Z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M22,20.99V3.8c0-0.71-0.87-1.08-1.38-0.57L3.24,20.62C2.73,21.13,3.09,22,3.8,22h17.19C21.54,22,22,21.55,22,20.99z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillAlpha="0.3" + android:fillColor="@android:color/white" + android:pathData="M3.8,22H21c0.6,0,1-0.4,1-1V3.8C22,3.4,21.6,3,21.2,3c-0.2,0-0.4,0.1-0.6,0.2L3.2,20.6c-0.3,0.3-0.3,0.8,0,1.1 C3.4,21.9,3.6,22,3.8,22z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M3.2,20.6C2.7,21.1,3.1,22,3.8,22H18V5.9L3.2,20.6z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M22,20.99V3.8c0-0.71-0.87-1.08-1.38-0.57L3.24,20.62C2.73,21.13,3.09,22,3.8,22h17.19C21.54,22,22,21.55,22,20.99z" /> +</vector>
\ 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 index 49d235b03be2..1407d0f1004b 100644 --- a/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml @@ -15,20 +15,50 @@ limitations under the License. --> <animated-vector xmlns:android="http://schemas.android.com/apk/res/android" - android:drawable="@*android:drawable/ic_signal_wifi_transient_animation_drawable"> - <target android:name="_R_G_L_7_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_0"/> - <target android:name="_R_G_L_6_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_1"/> - <target android:name="_R_G_L_6_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_2"/> - <target android:name="_R_G_L_5_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_1"/> - <target android:name="_R_G_L_5_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_2"/> - <target android:name="_R_G_L_4_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_3"/> - <target android:name="_R_G_L_4_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_4"/> - <target android:name="_R_G_L_3_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_3"/> - <target android:name="_R_G_L_3_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_4"/> - <target android:name="_R_G_L_2_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_5"/> - <target android:name="_R_G_L_2_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_6"/> - <target android:name="_R_G_L_1_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_5"/> - <target android:name="_R_G_L_1_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_6"/> - <target android:name="_R_G_L_0_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_7"/> - <target android:name="time_group" android:animation="@*android:anim/ic_signal_wifi_transient_animation_8"/> + android:drawable="@*android:drawable/ic_signal_wifi_transient_animation_drawable" > + <target + android:name="_R_G_L_7_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_0" /> + <target + android:name="_R_G_L_6_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_1" /> + <target + android:name="_R_G_L_6_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_2" /> + <target + android:name="_R_G_L_5_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_1" /> + <target + android:name="_R_G_L_5_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_2" /> + <target + android:name="_R_G_L_4_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_3" /> + <target + android:name="_R_G_L_4_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_4" /> + <target + android:name="_R_G_L_3_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_3" /> + <target + android:name="_R_G_L_3_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_4" /> + <target + android:name="_R_G_L_2_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_5" /> + <target + android:name="_R_G_L_2_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_6" /> + <target + android:name="_R_G_L_1_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_5" /> + <target + android:name="_R_G_L_1_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_6" /> + <target + android:name="_R_G_L_0_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_7" /> + <target + android:name="time_group" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_8" /> </animated-vector> 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 index 9fcb4795ad68..12092cb77cc5 100644 --- 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 @@ -13,60 +13,101 @@ ~ 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 - --> - +--> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:height="24dp" android:width="24dp" android:viewportHeight="24" - android:viewportWidth="24"> - <group android:name="_R_G"> - <group android:name="_R_G_L_7_G" android:translateX="0.10000000000000142" - android:translateY="3"> - <path android:name="_R_G_L_7_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="0.3" android:fillType="nonZero" - android:pathData=" M23.56 5.11 C23.95,4.63 23.85,3.92 23.34,3.57 C21.57,2.36 17.45,0 11.9,0 C6.34,0 2.23,2.36 0.46,3.57 C-0.05,3.92 -0.15,4.63 0.23,5.11 C0.23,5.11 11.06,18.6 11.06,18.6 C11.48,19.13 12.29,19.13 12.72,18.6 C12.72,18.6 23.56,5.11 23.56,5.11c "/> + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <group android:name="_R_G" > + <group + android:name="_R_G_L_7_G" + android:translateX="0.10000000000000142" + android:translateY="3" > + <path + android:name="_R_G_L_7_G_D_0_P_0" + android:fillAlpha="0.3" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M23.56 5.11 C23.95,4.63 23.85,3.92 23.34,3.57 C21.57,2.36 17.45,0 11.9,0 C6.34,0 2.23,2.36 0.46,3.57 C-0.05,3.92 -0.15,4.63 0.23,5.11 C0.23,5.11 11.06,18.6 11.06,18.6 C11.48,19.13 12.29,19.13 12.72,18.6 C12.72,18.6 23.56,5.11 23.56,5.11c " /> </group> - <group android:name="_R_G_L_6_G" android:translateX="0.10000000000000142" - android:translateY="3"> - <path android:name="_R_G_L_6_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="0.3" android:fillType="nonZero" - android:pathData=" M23.56 5.11 C23.95,4.63 23.85,3.92 23.34,3.57 C21.57,2.36 17.45,0 11.9,0 C6.34,0 2.23,2.36 0.46,3.57 C-0.05,3.92 -0.15,4.63 0.23,5.11 C0.23,5.11 11.06,18.6 11.06,18.6 C11.48,19.13 12.29,19.13 12.72,18.6 C12.72,18.6 23.56,5.11 23.56,5.11c "/> + <group + android:name="_R_G_L_6_G" + android:translateX="0.10000000000000142" + android:translateY="3" > + <path + android:name="_R_G_L_6_G_D_0_P_0" + android:fillAlpha="0.3" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M23.56 5.11 C23.95,4.63 23.85,3.92 23.34,3.57 C21.57,2.36 17.45,0 11.9,0 C6.34,0 2.23,2.36 0.46,3.57 C-0.05,3.92 -0.15,4.63 0.23,5.11 C0.23,5.11 11.06,18.6 11.06,18.6 C11.48,19.13 12.29,19.13 12.72,18.6 C12.72,18.6 23.56,5.11 23.56,5.11c " /> </group> - <group android:name="_R_G_L_5_G" android:translateX="5.81" - android:translateY="12.747"> - <path android:name="_R_G_L_5_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M7.01 8.85 C7.01,8.85 12.12,2.5 12.12,2.5 C10.48,1.05 8.37,0.25 6.19,0.25 C3.91,0.25 1.84,1.1 0.25,2.5 C0.25,2.5 5.35,8.85 5.35,8.85 C5.78,9.38 6.58,9.38 7.01,8.85c "/> + <group + android:name="_R_G_L_5_G" + android:translateX="5.81" + android:translateY="12.747" > + <path + android:name="_R_G_L_5_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M7.01 8.85 C7.01,8.85 12.12,2.5 12.12,2.5 C10.48,1.05 8.37,0.25 6.19,0.25 C3.91,0.25 1.84,1.1 0.25,2.5 C0.25,2.5 5.35,8.85 5.35,8.85 C5.78,9.38 6.58,9.38 7.01,8.85c " /> </group> - <group android:name="_R_G_L_4_G" android:translateX="0.10000000000000142" - android:translateY="3"> - <path android:name="_R_G_L_4_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="0.3" android:fillType="nonZero" - android:pathData=" M23.56 5.11 C23.95,4.63 23.85,3.92 23.34,3.57 C21.57,2.36 17.45,0 11.9,0 C6.34,0 2.23,2.36 0.46,3.57 C-0.05,3.92 -0.15,4.63 0.23,5.11 C0.23,5.11 11.06,18.6 11.06,18.6 C11.48,19.13 12.29,19.13 12.72,18.6 C12.72,18.6 23.56,5.11 23.56,5.11c "/> + <group + android:name="_R_G_L_4_G" + android:translateX="0.10000000000000142" + android:translateY="3" > + <path + android:name="_R_G_L_4_G_D_0_P_0" + android:fillAlpha="0.3" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M23.56 5.11 C23.95,4.63 23.85,3.92 23.34,3.57 C21.57,2.36 17.45,0 11.9,0 C6.34,0 2.23,2.36 0.46,3.57 C-0.05,3.92 -0.15,4.63 0.23,5.11 C0.23,5.11 11.06,18.6 11.06,18.6 C11.48,19.13 12.29,19.13 12.72,18.6 C12.72,18.6 23.56,5.11 23.56,5.11c " /> </group> - <group android:name="_R_G_L_3_G" android:translateX="3.9290000000000003" - android:translateY="9.75"> - <path android:name="_R_G_L_3_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M8.89 11.85 C8.89,11.85 15.88,3.15 15.88,3.15 C13.78,1.35 11.06,0.25 8.07,0.25 C5.08,0.25 2.35,1.35 0.25,3.16 C0.25,3.16 7.23,11.86 7.23,11.86 C7.66,12.38 8.46,12.38 8.89,11.85c "/> + <group + android:name="_R_G_L_3_G" + android:translateX="3.9290000000000003" + android:translateY="9.75" > + <path + android:name="_R_G_L_3_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M8.89 11.85 C8.89,11.85 15.88,3.15 15.88,3.15 C13.78,1.35 11.06,0.25 8.07,0.25 C5.08,0.25 2.35,1.35 0.25,3.16 C0.25,3.16 7.23,11.86 7.23,11.86 C7.66,12.38 8.46,12.38 8.89,11.85c " /> </group> - <group android:name="_R_G_L_2_G" android:translateX="0.10000000000000142" - android:translateY="3"> - <path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="0.3" android:fillType="nonZero" - android:pathData=" M23.56 5.11 C23.95,4.63 23.85,3.92 23.34,3.57 C21.57,2.36 17.45,0 11.9,0 C6.34,0 2.23,2.36 0.46,3.57 C-0.05,3.92 -0.15,4.63 0.23,5.11 C0.23,5.11 11.06,18.6 11.06,18.6 C11.48,19.13 12.29,19.13 12.72,18.6 C12.72,18.6 23.56,5.11 23.56,5.11c "/> + <group + android:name="_R_G_L_2_G" + android:translateX="0.10000000000000142" + android:translateY="3" > + <path + android:name="_R_G_L_2_G_D_0_P_0" + android:fillAlpha="0.3" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M23.56 5.11 C23.95,4.63 23.85,3.92 23.34,3.57 C21.57,2.36 17.45,0 11.9,0 C6.34,0 2.23,2.36 0.46,3.57 C-0.05,3.92 -0.15,4.63 0.23,5.11 C0.23,5.11 11.06,18.6 11.06,18.6 C11.48,19.13 12.29,19.13 12.72,18.6 C12.72,18.6 23.56,5.11 23.56,5.11c " /> </group> - <group android:name="_R_G_L_1_G" android:translateX="2.6799999999999997" - android:translateY="7.748"> - <path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M10.14 13.85 C10.14,13.85 18.39,3.59 18.39,3.59 C15.86,1.43 12.65,0.25 9.32,0.25 C5.86,0.25 2.69,1.51 0.25,3.6 C0.25,3.6 8.48,13.86 8.48,13.86 C8.91,14.38 9.71,14.38 10.14,13.85c "/> + <group + android:name="_R_G_L_1_G" + android:translateX="2.6799999999999997" + android:translateY="7.748" > + <path + android:name="_R_G_L_1_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M10.14 13.85 C10.14,13.85 18.39,3.59 18.39,3.59 C15.86,1.43 12.65,0.25 9.32,0.25 C5.86,0.25 2.69,1.51 0.25,3.6 C0.25,3.6 8.48,13.86 8.48,13.86 C8.91,14.38 9.71,14.38 10.14,13.85c " /> </group> - <group android:name="_R_G_L_0_G" android:translateX="-0.3000000000000007" - android:translateY="2.75"> - <path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M12.3 0.25 C6.74,0.25 2.63,2.61 0.86,3.82 C0.35,4.17 0.25,4.88 0.63,5.36 C0.63,5.36 11.46,18.85 11.46,18.85 C11.88,19.38 12.69,19.38 13.12,18.85 C13.12,18.85 23.96,5.36 23.96,5.36 C24.35,4.88 24.25,4.17 23.74,3.82 C21.97,2.61 17.85,0.25 12.3,0.25c "/> + <group + android:name="_R_G_L_0_G" + android:translateX="-0.3000000000000007" + android:translateY="2.75" > + <path + android:name="_R_G_L_0_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M12.3 0.25 C6.74,0.25 2.63,2.61 0.86,3.82 C0.35,4.17 0.25,4.88 0.63,5.36 C0.63,5.36 11.46,18.85 11.46,18.85 C11.88,19.38 12.69,19.38 13.12,18.85 C13.12,18.85 23.96,5.36 23.96,5.36 C24.35,4.88 24.25,4.17 23.74,3.82 C21.97,2.61 17.85,0.25 12.3,0.25c " /> </group> </group> - <group android:name="time_group"/> + <group android:name="time_group" /> </vector>
\ 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..16359b04178d --- /dev/null +++ b/packages/overlays/IconPackFilledAndroidOverlay/res/drawable/perm_group_calendar.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M19,3H18V2a1,1,0,0,0-1-1h0a1,1,0,0,0-1,1V3H8V2A1,1,0,0,0,7,1H7A1,1,0,0,0,6,2V3H5A2,2,0,0,0,3,5V19a2,2,0,0,0,2,2H19a2,2,0,0,0,2-2V5A2,2,0,0,0,19,3Zm0,16H5V8H19Zm-3.5-6A2.5,2.5,0,1,0,18,15.5,2.5,2.5,0,0,0,15.5,13Z" /> +</vector>
\ No newline at end of file diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_corp.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_corp.xml index 76d8882097a7..7139313a9ef9 100644 --- a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_corp.xml +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_corp.xml @@ -1,25 +1,27 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorHint" + android:tint="?android:attr/textColorHint" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > + <path android:pathData="M 10 4 H 14 V 6 H 10 V 4 Z" /> <path android:fillColor="@android:color/white" - android:pathData="M20,6h-4V4c0-1.11-0.89-2-2-2h-4C8.89,2,8,2.89,8,4v2H4C2.89,6,2.01,6.89,2.01,8L2,19c0,1.11,0.89,2,2,2h16 c1.11,0,2-0.89,2-2V8C22,6.89,21.11,6,20,6z M14,6h-4V4h4V6z" /> + android:pathData="M20,6h-4V4c0-1.1-0.9-2-2-2h-4C8.9,2,8,2.9,8,4v2H4C2.9,6,2,6.9,2,8l0,11c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8 C22,6.9,21.1,6,20,6z M12,15c-0.8,0-1.5-0.7-1.5-1.5S11.2,12,12,12s1.5,0.7,1.5,1.5S12.8,15,12,15z M14,6h-4V4h4V6z" /> </vector>
\ No newline at end of file diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_drag_handle.xml index 3117ae132fe8..1e14a3b8195d 100644 --- a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_drag_handle.xml +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_drag_handle.xml @@ -1,24 +1,25 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2019 The Android Open Source Project +<!-- + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" android:height="24dp" + android:tint="?android:attr/textColorHint" + android:viewportHeight="24" android:viewportWidth="24" - android:viewportHeight="24" android:tint="?android:attr/textColorHint"> - + android:width="24dp" > <path android:fillColor="@android:color/white" android:pathData="M19,13H5c-0.55,0-1,0.45-1,1s0.45,1,1,1h14c0.55,0,1-0.45,1-1S19.55,13,19,13z" /> diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_hourglass_top.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_hourglass_top.xml index b389e4b83d29..b90019c9489a 100644 --- a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_hourglass_top.xml +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_hourglass_top.xml @@ -1,28 +1,26 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2019 The Android Open Source Project +<!-- + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" android:height="24dp" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary"> - + android:width="24dp" > <path android:fillColor="@android:color/white" - android:pathData="M17,2H7C6.45,2,6,2.45,6,3l0.01,3.75c0,0.79,0.32,1.55,0.87,2.11L10,12l-3.12,3.12c-0.56,0.56-0.87,1.32-0.88,2.11L6,21 -c0,0.55,0.45,1,1,1h10c0.55,0,1-0.45,1-1v-3.77c0-0.8-0.32-1.56-0.88-2.12L14,12l3.12-3.13C17.68,8.31,18,7.54,18,6.75V3 -C18,2.45,17.55,2,17,2z -M15.71,16.21c0.19,0.19,0.29,0.44,0.29,0.71V20H8v-3.09c0-0.27,0.11-0.52,0.29-0.71L12,12.5L15.71,16.21z" /> + android:pathData="M17,2H7C6.45,2,6,2.45,6,3l0.01,3.75c0,0.79,0.32,1.55,0.87,2.11L10,12l-3.12,3.12c-0.56,0.56-0.87,1.32-0.88,2.11L6,21 c0,0.55,0.45,1,1,1h10c0.55,0,1-0.45,1-1v-3.77c0-0.8-0.32-1.56-0.88-2.12L14,12l3.12-3.13C17.68,8.31,18,7.54,18,6.75V3 C18,2.45,17.55,2,17,2z M15.71,16.21c0.19,0.19,0.29,0.44,0.29,0.71V20H8v-3.09c0-0.27,0.11-0.52,0.29-0.71L12,12.5L15.71,16.21z" /> </vector>
\ 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 index f50fa2bcdba2..dd095ab801b4 100644 --- a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_info_no_shadow.xml +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_info_no_shadow.xml @@ -1,22 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M19,14c-0.55,0-1,0.45-1,1v3H6v-3c0-0.55-0.45-1-1-1s-1,0.45-1,1v3c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2v-3 C20,14.45,19.55,14,19,14z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M11.62,15.84C11.63,15.84,11.63,15.85,11.62,15.84c0.21,0.21,0.55,0.21,0.75,0l2.95-2.94c0.34-0.33,0.1-0.9-0.37-0.9H13V5 c0-0.55-0.45-1-1-1c-0.55,0-1,0.45-1,1v7H9.04c-0.47,0-0.7,0.57-0.37,0.9L11.62,15.84z" /> +</vector>
\ 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 index e9a89ec569f2..7e7094272529 100644 --- a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_palette.xml +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_palette.xml @@ -1,22 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_pin.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_pin.xml index 698f718090fe..80232d887001 100644 --- a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_pin.xml +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_pin.xml @@ -1,26 +1,26 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2019 The Android Open Source Project +<!-- + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" android:height="24dp" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary"> - + android:width="24dp" > <path android:fillColor="@android:color/white" - android:pathData="M5.71,14.29C5.08,14.92,5.52,16,6.41,16H11v6c0,0.55,0.45,1,1,1s1-0.45,1-1v-6h4.59c0.89,0,1.34-1.08,0.71-1.71L16,12V5 -h0.5c0.55,0,1-0.45,1-1s-0.45-1-1-1h-9c-0.55,0-1,0.45-1,1s0.45,1,1,1H8v7L5.71,14.29z" /> + android:pathData="M5.71,14.29C5.08,14.92,5.52,16,6.41,16H11v6c0,0.55,0.45,1,1,1s1-0.45,1-1v-6h4.59c0.89,0,1.34-1.08,0.71-1.71L16,12V5 h0.5c0.55,0,1-0.45,1-1s-0.45-1-1-1h-9c-0.55,0-1,0.45-1,1s0.45,1,1,1H8v7L5.71,14.29z" /> </vector>
\ 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 index b3288d93d237..f9532a1159df 100644 --- a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_remove_no_shadow.xml +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_remove_no_shadow.xml @@ -1,22 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_setting.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_setting.xml index 513633bdc57d..30e866095675 100644 --- a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_setting.xml +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_setting.xml @@ -1,22 +1,22 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_smartspace_preferences.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_smartspace_preferences.xml index 4ca296701e6f..e0b39fc41b1f 100644 --- a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_smartspace_preferences.xml +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_smartspace_preferences.xml @@ -1,22 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path diff --git a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_split_screen.xml b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_split_screen.xml index 6eddf3d86864..c2c7ede6f796 100644 --- a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_split_screen.xml +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_split_screen.xml @@ -1,22 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M18,4h-2.5l-0.71-0.71C14.61,3.11,14.35,3,14.09,3H9.9C9.64,3,9.38,3.11,9.2,3.29L8.49,4h-2.5c-0.55,0-1,0.45-1,1 s0.45,1,1,1h12c0.55,0,1-0.45,1-1C19,4.45,18.55,4,18,4z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M6,19c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2V7H6V19z" /> +</vector>
\ 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 index 41987590a702..697f5d832d38 100644 --- a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_warning.xml +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_warning.xml @@ -1,25 +1,26 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path android:fillColor="@android:color/white" - android:pathData="M12.87,3.49c-0.39-0.67-1.35-0.67-1.73,0l-9.27,16C1.48,20.17,1.96,21,2.73,21h18.53c0.77,0,1.25-0.83,0.87-1.5L12.87,3.49 z M11,10c0-0.55,0.45-1,1-1s1,0.45,1,1v3c0,0.55-0.45,1-1,1s-1-0.45-1-1V10z M12,18.25c-0.69,0-1.25-0.56-1.25-1.25 s0.56-1.25,1.25-1.25s1.25,0.56,1.25,1.25S12.69,18.25,12,18.25z" /> + android:pathData="M2.73,21h18.53c0.77,0,1.25-0.83,0.87-1.5l-9.27-16c-0.39-0.67-1.35-0.67-1.73,0l-9.27,16C1.48,20.17,1.96,21,2.73,21z M11,10c0-0.55,0.45-1,1-1s1,0.45,1,1v3c0,0.55-0.45,1-1,1s-1-0.45-1-1V10z M12,15.75c0.69,0,1.25,0.56,1.25,1.25 s-0.56,1.25-1.25,1.25s-1.25-0.56-1.25-1.25S11.31,15.75,12,15.75z" /> </vector>
\ 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 index 7316c02d5214..329c0d65f467 100644 --- a/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_widget.xml +++ b/packages/overlays/IconPackFilledLauncherOverlay/res/drawable/ic_widget.xml @@ -1,22 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M19.29,8.29c-0.39-0.39-1.02-0.39-1.41,0L12,14.17L6.12,8.29c-0.39-0.39-1.02-0.39-1.41,0c-0.39,0.39-0.39,1.02,0,1.41 l6.59,6.59c0.39,0.39,1.02,0.39,1.41,0l6.59-6.59C19.68,9.32,19.68,8.68,19.29,8.29z" /> +</vector>
\ 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..e1a8b1feb22b --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M10.42,6C10.03,5.61,9.39,5.61,9,6l0,0C8.61,6.39,8.61,7.03,9,7.42L13.59,12L9,16.58C8.61,16.97,8.61,17.61,9,18l0,0 c0.39,0.39,1.02,0.39,1.41,0l5.29-5.3c0.39-0.39,0.39-1.02,0-1.41L10.42,6z" /> +</vector>
\ 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..ed6d553f5f37 --- /dev/null +++ b/packages/overlays/IconPackFilledSettingsOverlay/res/drawable/ic_help_actionbar.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M12,22c5.52,0,10-4.48,10-10c0-5.52-4.48-10-10-10S2,6.48,2,12C2,17.52,6.48,22,12,22z M12,18.96 c-0.69,0-1.25-0.56-1.25-1.25c0-0.69,0.56-1.25,1.25-1.25s1.25,0.56,1.25,1.25C13.25,18.4,12.69,18.96,12,18.96z M8.16,7.92 c0.63-2.25,2.91-3.38,5.05-2.74c1.71,0.51,2.84,2.16,2.78,3.95c-0.07,2.44-2.49,2.61-2.92,5.06c-0.09,0.52-0.59,0.87-1.13,0.79 c-0.57-0.08-0.94-0.66-0.83-1.23c0.52-2.61,2.66-2.84,2.87-4.5c0.12-0.96-0.42-1.87-1.34-2.17c-1.04-0.33-2.21,0.16-2.55,1.37 C9.97,8.9,9.57,9.19,9.12,9.19C8.46,9.19,7.99,8.56,8.16,7.92z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M12,2C6.48,2,2,6.48,2,12c0,5.52,4.48,10,10,10s10-4.48,10-10C22,6.48,17.52,2,12,2z M13,17c0,0.55-0.45,1-1,1s-1-0.45-1-1 v-5c0-0.55,0.45-1,1-1s1,0.45,1,1V17z M12,9.25c-0.69,0-1.25-0.56-1.25-1.25S11.31,6.75,12,6.75S13.25,7.31,13.25,8 S12.69,9.25,12,9.25z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path android:pathData="M 0.01 -0.24 H 24.01 V 23.76 H 0.01 V -0.24 Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M3.15,10.92c0.48,2.28,2.25,4.16,4.49,4.81c2.13,0.62,4.11,0.13,5.63-0.97l4.94,4.94c0.41,0.41,1.08,0.41,1.49,0 c0.41-0.41,0.41-1.08,0-1.49l-4.94-4.94c1.1-1.53,1.59-3.5,0.97-5.63c-0.65-2.24-2.53-4-4.81-4.49C6.23,2.16,2.16,6.23,3.15,10.92z M9.5,5C11.99,5,14,7.01,14,9.5c0,2.49-2.01,4.5-4.5,4.5S5,11.99,5,9.5C5,7.01,7.01,5,9.5,5z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorAccent" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M21.64,8.39l-1.6-2.76c-0.28-0.48-0.88-0.7-1.36-0.5l-2.14,0.91c-0.48-0.37-1.01-0.68-1.57-0.92l-0.27-2.2 C14.64,2.4,14.14,2,13.59,2h-3.18C9.86,2,9.36,2.4,9.3,2.92L9.04,5.11c-0.57,0.24-1.1,0.55-1.58,0.92L5.32,5.12 c-0.48-0.2-1.08,0.02-1.36,0.5l-1.6,2.76C2.08,8.86,2.18,9.48,2.6,9.8l1.94,1.45C4.51,11.49,4.5,11.74,4.5,12s0.01,0.51,0.04,0.76 L2.6,14.2c-0.42,0.31-0.52,0.94-0.24,1.41l1.6,2.76c0.28,0.48,0.88,0.7,1.36,0.5l2.14-0.91c0.48,0.37,1.01,0.68,1.57,0.92 l0.27,2.19C9.36,21.6,9.86,22,10.41,22h3.18c0.55,0,1.04-0.4,1.11-0.92l0.27-2.19c0.56-0.24,1.09-0.55,1.57-0.92l2.14,0.91 c0.48,0.2,1.08-0.02,1.36-0.5l1.6-2.76c0.28-0.48,0.18-1.1-0.24-1.42l-1.94-1.45c0.03-0.25,0.04-0.5,0.04-0.76 s-0.01-0.51-0.04-0.76L21.4,9.8C21.82,9.49,21.92,8.86,21.64,8.39z M12,15.5c-1.93,0-3.5-1.57-3.5-3.5s1.57-3.5,3.5-3.5 s3.5,1.57,3.5,3.5S13.93,15.5,12,15.5z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M7.5,19h10c2.48,0,4.5-2.02,4.5-4.5c0-2.34-1.79-4.27-4.08-4.48C17.45,7.18,14.97,5,12,5C9.82,5,7.83,6.18,6.78,8.06 C4.09,8.41,2,10.74,2,13.5C2,16.53,4.47,19,7.5,19z M8.68,12.09l2.94-2.95c0,0,0.01-0.01,0.01-0.01c0.21-0.2,0.54-0.2,0.74,0.01 l2.95,2.95c0.34,0.33,0.1,0.9-0.37,0.9H13V16c0,0.55-0.45,1-1,1s-1-0.45-1-1v-3.01H9.05C8.58,12.99,8.35,12.42,8.68,12.09z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M19,10H5c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2C21,10.9,20.1,10,19,10z M6,13.1c-0.61,0-1.1-0.49-1.1-1.1 s0.49-1.1,1.1-1.1s1.1,0.49,1.1,1.1S6.61,13.1,6,13.1z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M21,18c0-1.1-0.9-2-2-2H5c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2h14C20.1,20,21,19.1,21,18z M6,19.1c-0.61,0-1.1-0.49-1.1-1.1 s0.49-1.1,1.1-1.1s1.1,0.49,1.1,1.1S6.61,19.1,6,19.1z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M19,4H5C3.9,4,3,4.9,3,6c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2C21,4.9,20.1,4,19,4z M6,7.1C5.39,7.1,4.9,6.61,4.9,6 S5.39,4.9,6,4.9S7.1,5.39,7.1,6S6.61,7.1,6,7.1z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M19.39,9.06c-0.19-0.48-0.74-0.72-1.22-0.53c0,0-0.01,0-0.01,0c-0.48,0.19-0.72,0.73-0.54,1.22c0,0,0,0.01,0.01,0.01 c0.28,0.71,0.43,1.46,0.43,2.23c0,3.34-2.71,6.05-6.05,6.05v-2c0-0.47-0.57-0.71-0.9-0.37l-2.94,2.95c-0.21,0.21-0.21,0.54,0,0.75 l2.94,2.95c0.33,0.33,0.9,0.1,0.9-0.37v-2c4.38,0,7.95-3.57,7.95-7.95C19.95,10.98,19.76,10,19.39,9.06z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M12,5.95v2c0,0.47,0.57,0.71,0.9,0.37l2.94-2.94c0.21-0.21,0.21-0.54,0-0.75L12.9,1.68C12.57,1.34,12,1.58,12,2.05v2 c-4.38,0-7.95,3.57-7.95,7.95c0,1.02,0.19,2,0.57,2.93c0.14,0.36,0.49,0.6,0.88,0.6c0.12,0,0.23-0.02,0.35-0.07c0,0,0,0,0.01,0 c0.48-0.19,0.72-0.74,0.52-1.23c-0.29-0.7-0.43-1.46-0.43-2.23C5.95,8.66,8.66,5.95,12,5.95z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M17,1.01L7,1C5.9,1,5,1.9,5,3v18c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V3C19,1.9,18.1,1.01,17,1.01z M17,19H7V5h10V19z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M11.62,15.84C11.63,15.84,11.63,15.85,11.62,15.84c0.21,0.21,0.55,0.21,0.75,0l2.95-2.94c0.34-0.33,0.1-0.9-0.37-0.9H13V9 c0-0.55-0.45-1-1-1c-0.55,0-1,0.45-1,1v3H9.04c-0.47,0-0.7,0.57-0.37,0.9L11.62,15.84z" /> +</vector>
\ 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..b4f2a9de63a6 --- /dev/null +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_arrow_back.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M20,12L20,12c0-0.56-0.45-1-1-1H7.83l4.88-4.88c0.39-0.39,0.39-1.03,0-1.42c-0.39-0.39-1.02-0.39-1.41,0l-6.59,6.59 c-0.39,0.39-0.39,1.02,0,1.41l6.59,6.59c0.39,0.39,1.02,0.39,1.41,0c0.39-0.39,0.39-1.02,0-1.41L7.83,13H19 C19.55,13,20,12.55,20,12z" /> +</vector>
\ 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 index 14778556620f..c13bcf9ef7d6 100644 --- a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_cast.xml +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_cast.xml @@ -15,10 +15,10 @@ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:height="24dp" + android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" - android:width="24dp" > + android:width="17dp" > <path android:fillColor="@android:color/white" android:pathData="M2.11,14.08C1.52,13.99,1.02,14.46,1,15.06c-0.01,0.51,0.32,0.93,0.82,1.02c2.08,0.36,3.74,2,4.1,4.08 C6.01,20.64,6.42,21,6.91,21c0.61,0,1.09-0.54,1-1.14C7.42,16.88,5.09,14.56,2.11,14.08z" /> 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="17dp" + android:tint="?android:attr/colorError" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="17dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M19,7H5v1.63c3.96,1.28,7.09,4.41,8.37,8.37H19V7z" /> +</vector>
\ 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 index c0bf21bb44fa..57ad6f07bd62 100644 --- a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_headset_mic.xml +++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_headset_mic.xml @@ -19,7 +19,6 @@ android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" > - <path android:pathData="M0,0h24v24H0V0z" /> <path android:fillColor="@android:color/white" android:pathData="M11.4,1.02C6.62,1.33,3,5.52,3,10.31L3,17c0,1.66,1.34,3,3,3h2c0.55,0,1-0.45,1-1v-6c0-0.55-0.45-1-1-1H5l0-1.71 C5,6.45,7.96,3.11,11.79,3C15.76,2.89,19,6.06,19,10v2h-3c-0.55,0-1,0.45-1,1v6c0,0.55,0.45,1,1,1h3v1h-6c-0.55,0-1,0.45-1,1v0 c0,0.55,0.45,1,1,1h5c1.66,0,3-1.34,3-3V10C21,4.83,16.64,0.68,11.4,1.02z" /> 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="17dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="17dp" > + <path android:pathData="M 10 4 H 14 V 6 H 10 V 4 Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M20,6h-4V4c0-1.1-0.9-2-2-2h-4C8.9,2,8,2.9,8,4v2H4C2.9,6,2,6.9,2,8l0,11c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8 C22,6.9,21.1,6,20,6z M12,15c-0.8,0-1.5-0.7-1.5-1.5S11.2,12,12,12s1.5,0.7,1.5,1.5S12.8,15,12,15z M14,6h-4V4h4V6z" /> +</vector>
\ 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 index 09e7360069c4..3b986a005ebf 100644 --- a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml @@ -13,13 +13,16 @@ ~ 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 - --> +--> <animated-vector xmlns:android="http://schemas.android.com/apk/res/android" - android:drawable="@*android:drawable/ic_bluetooth_transient_animation_drawable"> - <target android:name="_R_G_L_1_G_D_0_P_0" - android:animation="@*android:anim/ic_bluetooth_transient_animation_0"/> - <target android:name="_R_G_L_0_G_D_0_P_0" - android:animation="@*android:anim/ic_bluetooth_transient_animation_1"/> - <target android:name="time_group" - android:animation="@*android:anim/ic_bluetooth_transient_animation_2"/> + android:drawable="@*android:drawable/ic_bluetooth_transient_animation_drawable" > + <target + android:name="_R_G_L_1_G_D_0_P_0" + android:animation="@*android:anim/ic_bluetooth_transient_animation_0" /> + <target + android:name="_R_G_L_0_G_D_0_P_0" + android:animation="@*android:anim/ic_bluetooth_transient_animation_1" /> + <target + android:name="time_group" + android:animation="@*android:anim/ic_bluetooth_transient_animation_2" /> </animated-vector> 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 index e0f155a013ef..6ea152b85345 100644 --- a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bluetooth_transient_animation_drawable.xml @@ -13,30 +13,46 @@ ~ 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 - --> -<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:width="24dp" android:viewportHeight="24" - android:viewportWidth="24"> - <group android:name="_R_G"> - <group android:name="_R_G_L_2_G" android:translateX="3.75" - android:translateY="1.4410000000000007"> - <path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M13.78 5.28 C13.78,5.28 9.03,0.53 9.03,0.53 C8.82,0.31 8.49,0.25 8.21,0.37 C7.93,0.48 7.75,0.75 7.75,1.06 C7.75,1.06 7.75,8.75 7.75,8.75 C7.75,8.75 3.78,4.78 3.78,4.78 C3.49,4.49 3.01,4.49 2.72,4.78 C2.43,5.07 2.43,5.55 2.72,5.84 C2.72,5.84 7.44,10.56 7.44,10.56 C7.44,10.56 2.72,15.28 2.72,15.28 C2.43,15.57 2.43,16.05 2.72,16.34 C3.01,16.63 3.49,16.63 3.78,16.34 C3.78,16.34 7.75,12.37 7.75,12.37 C7.75,12.37 7.75,20.06 7.75,20.06 C7.75,20.36 7.93,20.64 8.21,20.75 C8.31,20.79 8.4,20.81 8.5,20.81 C8.7,20.81 8.89,20.73 9.03,20.59 C9.03,20.59 13.78,15.84 13.78,15.84 C14.07,15.55 14.07,15.07 13.78,14.78 C13.78,14.78 9.56,10.56 9.56,10.56 C9.56,10.56 13.78,6.34 13.78,6.34 C14.07,6.05 14.07,5.57 13.78,5.28c M12.19 15.31 C12.19,15.31 9.25,18.25 9.25,18.25 C9.25,18.25 9.25,12.37 9.25,12.37 C9.25,12.37 12.19,15.31 12.19,15.31c M9.25 8.75 C9.25,8.75 9.25,2.87 9.25,2.87 C9.25,2.87 12.19,5.81 12.19,5.81 C12.19,5.81 9.25,8.75 9.25,8.75c "/> +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <group android:name="_R_G" > + <group + android:name="_R_G_L_2_G" + android:translateX="3.75" + android:translateY="1.4410000000000007" > + <path + android:name="_R_G_L_2_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M13.78 5.28 C13.78,5.28 9.03,0.53 9.03,0.53 C8.82,0.31 8.49,0.25 8.21,0.37 C7.93,0.48 7.75,0.75 7.75,1.06 C7.75,1.06 7.75,8.75 7.75,8.75 C7.75,8.75 3.78,4.78 3.78,4.78 C3.49,4.49 3.01,4.49 2.72,4.78 C2.43,5.07 2.43,5.55 2.72,5.84 C2.72,5.84 7.44,10.56 7.44,10.56 C7.44,10.56 2.72,15.28 2.72,15.28 C2.43,15.57 2.43,16.05 2.72,16.34 C3.01,16.63 3.49,16.63 3.78,16.34 C3.78,16.34 7.75,12.37 7.75,12.37 C7.75,12.37 7.75,20.06 7.75,20.06 C7.75,20.36 7.93,20.64 8.21,20.75 C8.31,20.79 8.4,20.81 8.5,20.81 C8.7,20.81 8.89,20.73 9.03,20.59 C9.03,20.59 13.78,15.84 13.78,15.84 C14.07,15.55 14.07,15.07 13.78,14.78 C13.78,14.78 9.56,10.56 9.56,10.56 C9.56,10.56 13.78,6.34 13.78,6.34 C14.07,6.05 14.07,5.57 13.78,5.28c M12.19 15.31 C12.19,15.31 9.25,18.25 9.25,18.25 C9.25,18.25 9.25,12.37 9.25,12.37 C9.25,12.37 12.19,15.31 12.19,15.31c M9.25 8.75 C9.25,8.75 9.25,2.87 9.25,2.87 C9.25,2.87 12.19,5.81 12.19,5.81 C12.19,5.81 9.25,8.75 9.25,8.75c " /> </group> - <group android:name="_R_G_L_1_G" android:translateX="3.75" - android:translateY="1.4410000000000007"> - <path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M15.25 9.56 C14.7,9.56 14.25,10.01 14.25,10.56 C14.25,11.11 14.7,11.56 15.25,11.56 C15.8,11.56 16.25,11.11 16.25,10.56 C16.25,10.01 15.8,9.56 15.25,9.56c "/> + <group + android:name="_R_G_L_1_G" + android:translateX="3.75" + android:translateY="1.4410000000000007" > + <path + android:name="_R_G_L_1_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M15.25 9.56 C14.7,9.56 14.25,10.01 14.25,10.56 C14.25,11.11 14.7,11.56 15.25,11.56 C15.8,11.56 16.25,11.11 16.25,10.56 C16.25,10.01 15.8,9.56 15.25,9.56c " /> </group> - <group android:name="_R_G_L_0_G" android:translateX="3.75" - android:translateY="1.4410000000000007"> - <path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M1.25 9.56 C0.7,9.56 0.25,10.01 0.25,10.56 C0.25,11.11 0.7,11.56 1.25,11.56 C1.8,11.56 2.25,11.11 2.25,10.56 C2.25,10.01 1.8,9.56 1.25,9.56c "/> + <group + android:name="_R_G_L_0_G" + android:translateX="3.75" + android:translateY="1.4410000000000007" > + <path + android:name="_R_G_L_0_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M1.25 9.56 C0.7,9.56 0.25,10.01 0.25,10.56 C0.25,11.11 0.7,11.56 1.25,11.56 C1.8,11.56 2.25,11.11 2.25,10.56 C2.25,10.01 1.8,9.56 1.25,9.56c " /> </group> </group> - <group android:name="time_group"/> -</vector> -
\ No newline at end of file + <group android:name="time_group" /> +</vector>
\ 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 index cc19f94085f6..85c2bcdbdce0 100644 --- a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_network_pan.xml +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_bt_network_pan.xml @@ -22,7 +22,7 @@ android:width="24dp" > <path android:fillColor="@android:color/white" - android:pathData="M11.31,12l4.22-4.22c0.29-0.29,0.29-0.77,0-1.06l-4.75-4.75c-0.21-0.21-0.54-0.28-0.82-0.16C9.68,1.92,9.5,2.2,9.5,2.5 v7.69L5.53,6.22c-0.29-0.29-0.77-0.29-1.06,0s-0.29,0.77,0,1.06L9.19,12l-4.72,4.72c-0.29,0.29-0.29,0.77,0,1.06s0.77,0.29,1.06,0 l3.97-3.97v7.69c0,0.3,0.18,0.58,0.46,0.69c0.09,0.04,0.19,0.06,0.29,0.06c0.2,0,0.39-0.08,0.53-0.22l4.75-4.75 c0.29-0.29,0.29-0.77,0-1.06L11.31,12z M11,4.31l2.94,2.94L11,10.19V4.31z M11,19.69v-5.88l2.94,2.94L11,19.69z" /> + android:pathData="M11.31,12l4.22-4.22c0.29-0.29,0.29-0.77,0-1.06l-4.75-4.75c-0.21-0.21-0.54-0.28-0.82-0.16C9.68,1.92,9.5,2.2,9.5,2.5 v7.69L5.53,6.22c-0.29-0.29-0.77-0.29-1.06,0s-0.29,0.77,0,1.06L9.19,12l-4.72,4.72c-0.29,0.29-0.29,0.77,0,1.06s0.77,0.29,1.06,0 l3.97-3.97v7.69c0,0.3,0.18,0.58,0.46,0.69c0.09,0.04,0.19,0.06,0.29,0.06c0.19,0,0.39-0.08,0.53-0.22l4.75-4.75 c0.29-0.29,0.29-0.77,0-1.06L11.31,12z M11,4.31l2.94,2.94L11,10.19V4.31z M11,19.69v-5.88l2.94,2.94L11,19.69z" /> <path android:fillColor="@android:color/white" android:pathData="M 16 11 C 16.5522847498 11 17 11.4477152502 17 12 C 17 12.5522847498 16.5522847498 13 16 13 C 15.4477152502 13 15 12.5522847498 15 12 C 15 11.4477152502 15.4477152502 11 16 11 Z" /> 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="@*android:color/accent_device_default_light" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M20,6h-4V4c0-1.1-0.9-2-2-2h-4C8.9,2,8,2.9,8,4v2H4C2.9,6,2,6.9,2,8v11c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8 C22,6.9,21.1,6,20,6z M9.5,4c0-0.3,0.2-0.5,0.5-0.5h4c0.3,0,0.5,0.2,0.5,0.5v2h-5V4z M20.5,19c0,0.3-0.2,0.5-0.5,0.5H4 c-0.3,0-0.5-0.2-0.5-0.5V8c0-0.3,0.2-0.5,0.5-0.5h16c0.3,0,0.5,0.2,0.5,0.5V19z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 12 12.3 C 12.6627416998 12.3 13.2 12.8372583002 13.2 13.5 C 13.2 14.1627416998 12.6627416998 14.7 12 14.7 C 11.3372583002 14.7 10.8 14.1627416998 10.8 13.5 C 10.8 12.8372583002 11.3372583002 12.3 12 12.3 Z" /> +</vector>
\ 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 index 858d48c07507..50a8742be529 100644 --- a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_expand_more.xml +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_expand_more.xml @@ -16,6 +16,7 @@ --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" + android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > diff --git a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_file_copy.xml b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_file_copy.xml index 6a08ecb37ba3..97945f00395e 100644 --- a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_file_copy.xml +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_file_copy.xml @@ -23,5 +23,4 @@ <path android:fillColor="@android:color/white" android:pathData="M17.7,21.5H4c-0.3,0-0.5-0.2-0.5-0.5V7.3C3.5,7.1,3.4,7,3.2,7H2.3C2.1,7,2,7.1,2,7.3v14.2C2,22.3,2.7,23,3.5,23h14.2 c0.2,0,0.3-0.1,0.3-0.3v-0.9C18,21.6,17.9,21.5,17.7,21.5z M21,17V3c0-1.1-0.9-2-2-2H8C6.9,1,6,1.9,6,3v14c0,1.1,0.9,2,2,2h11 C20.1,19,21,18.1,21,17z M19,17.5H8c-0.3,0-0.5-0.2-0.5-0.5V3c0-0.3,0.2-0.5,0.5-0.5h11c0.3,0,0.5,0.2,0.5,0.5v14 C19.5,17.3,19.3,17.5,19,17.5z" /> - <path android:pathData="M0,0h24v24H0V0z" /> </vector>
\ 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 index 1317f66b4131..9d43e51dc469 100644 --- a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml @@ -13,11 +13,19 @@ ~ 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 - --> +--> <animated-vector xmlns:android="http://schemas.android.com/apk/res/android" - android:drawable="@*android:drawable/ic_hotspot_transient_animation_drawable"> - <target android:name="_R_G_L_0_G_D_0_P_0" android:animation="@*android:anim/ic_hotspot_transient_animation_0"/> - <target android:name="_R_G_L_0_G_D_1_P_0" android:animation="@*android:anim/ic_hotspot_transient_animation_1"/> - <target android:name="_R_G_L_0_G_D_2_P_0" android:animation="@*android:anim/ic_hotspot_transient_animation_2"/> - <target android:name="time_group" android:animation="@*android:anim/ic_hotspot_transient_animation_3"/> + android:drawable="@*android:drawable/ic_hotspot_transient_animation_drawable" > + <target + android:name="_R_G_L_0_G_D_0_P_0" + android:animation="@*android:anim/ic_hotspot_transient_animation_0" /> + <target + android:name="_R_G_L_0_G_D_1_P_0" + android:animation="@*android:anim/ic_hotspot_transient_animation_1" /> + <target + android:name="_R_G_L_0_G_D_2_P_0" + android:animation="@*android:anim/ic_hotspot_transient_animation_2" /> + <target + android:name="time_group" + android:animation="@*android:anim/ic_hotspot_transient_animation_3" /> </animated-vector> 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 index 6b87f63eb193..11cb9d225d63 100644 --- a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_hotspot_transient_animation_drawable.xml +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_hotspot_transient_animation_drawable.xml @@ -13,24 +13,36 @@ ~ 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 - --> - -<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:width="24dp" android:viewportHeight="24" - android:viewportWidth="24"> - <group android:name="_R_G"> - <group android:name="_R_G_L_0_G" android:translateX="2" - android:translateY="1.552999999999999"> - <path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M8.5 10.95 C8.5,11.77 9.17,12.45 10,12.45 C10.83,12.45 11.5,11.77 11.5,10.95 C11.5,10.12 10.83,9.45 10,9.45 C9.17,9.45 8.5,10.12 8.5,10.95c "/> - <path android:name="_R_G_L_0_G_D_1_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M13.01 15.01 C13.3,15.31 13.77,15.31 14.07,15.01 C15.15,13.93 15.75,12.48 15.75,10.95 C15.75,9.41 15.15,7.97 14.07,6.88 C11.82,4.64 8.18,4.64 5.94,6.88 C4.85,7.97 4.25,9.41 4.25,10.95 C4.25,12.48 4.85,13.93 5.94,15.01 C6.08,15.16 6.27,15.23 6.47,15.23 C6.66,15.23 6.85,15.16 6.99,15.01 C7.29,14.72 7.29,14.25 6.99,13.95 C6.19,13.15 5.75,12.08 5.75,10.95 C5.75,9.81 6.19,8.74 6.99,7.94 C8.65,6.28 11.35,6.28 13.01,7.94 C13.81,8.74 14.25,9.81 14.25,10.95 C14.25,12.08 13.81,13.15 13.01,13.95 C12.71,14.25 12.71,14.72 13.01,15.01c "/> - <path android:name="_R_G_L_0_G_D_2_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M16.36 18.06 C16.56,18.06 16.75,17.99 16.89,17.84 C18.74,16 19.75,13.55 19.75,10.95 C19.75,8.34 18.74,5.89 16.89,4.05 C13.09,0.25 6.91,0.25 3.11,4.05 C1.26,5.89 0.25,8.34 0.25,10.95 C0.25,13.55 1.26,16 3.11,17.84 C3.4,18.13 3.87,18.13 4.17,17.84 C4.46,17.55 4.46,17.07 4.17,16.78 C2.61,15.22 1.75,13.15 1.75,10.95 C1.75,8.74 2.61,6.67 4.17,5.11 C7.38,1.9 12.62,1.9 15.83,5.11 C17.39,6.67 18.25,8.74 18.25,10.95 C18.25,13.15 17.39,15.22 15.83,16.78 C15.54,17.07 15.54,17.55 15.83,17.84 C15.98,17.99 16.17,18.06 16.36,18.06c "/> +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <group android:name="_R_G" > + <group + android:name="_R_G_L_0_G" + android:translateX="2" + android:translateY="1.552999999999999" > + <path + android:name="_R_G_L_0_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M8.5 10.95 C8.5,11.77 9.17,12.45 10,12.45 C10.83,12.45 11.5,11.77 11.5,10.95 C11.5,10.12 10.83,9.45 10,9.45 C9.17,9.45 8.5,10.12 8.5,10.95c " /> + <path + android:name="_R_G_L_0_G_D_1_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M13.01 15.01 C13.3,15.31 13.77,15.31 14.07,15.01 C15.15,13.93 15.75,12.48 15.75,10.95 C15.75,9.41 15.15,7.97 14.07,6.88 C11.82,4.64 8.18,4.64 5.94,6.88 C4.85,7.97 4.25,9.41 4.25,10.95 C4.25,12.48 4.85,13.93 5.94,15.01 C6.08,15.16 6.27,15.23 6.47,15.23 C6.66,15.23 6.85,15.16 6.99,15.01 C7.29,14.72 7.29,14.25 6.99,13.95 C6.19,13.15 5.75,12.08 5.75,10.95 C5.75,9.81 6.19,8.74 6.99,7.94 C8.65,6.28 11.35,6.28 13.01,7.94 C13.81,8.74 14.25,9.81 14.25,10.95 C14.25,12.08 13.81,13.15 13.01,13.95 C12.71,14.25 12.71,14.72 13.01,15.01c " /> + <path + android:name="_R_G_L_0_G_D_2_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M16.36 18.06 C16.56,18.06 16.75,17.99 16.89,17.84 C18.74,16 19.75,13.55 19.75,10.95 C19.75,8.34 18.74,5.89 16.89,4.05 C13.09,0.25 6.91,0.25 3.11,4.05 C1.26,5.89 0.25,8.34 0.25,10.95 C0.25,13.55 1.26,16 3.11,17.84 C3.4,18.13 3.87,18.13 4.17,17.84 C4.46,17.55 4.46,17.07 4.17,16.78 C2.61,15.22 1.75,13.15 1.75,10.95 C1.75,8.74 2.61,6.67 4.17,5.11 C7.38,1.9 12.62,1.9 15.83,5.11 C17.39,6.67 18.25,8.74 18.25,10.95 C18.25,13.15 17.39,15.22 15.83,16.78 C15.54,17.07 15.54,17.55 15.83,17.84 C15.98,17.99 16.17,18.06 16.36,18.06c " /> </group> </group> - <group android:name="time_group"/> + <group android:name="time_group" /> </vector> 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..db4d302eb240 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_qs_battery_saver.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M9.74,13.75h1.5v1.5c0,0.41,0.34,0.75,0.75,0.75s0.75-0.34,0.75-0.75v-1.5h1.5c0.41,0,0.75-0.34,0.75-0.75 s-0.34-0.75-0.75-0.75h-1.5v-1.5c0-0.41-0.34-0.75-0.75-0.75s-0.75,0.34-0.75,0.75v1.5h-1.5c-0.41,0-0.75,0.34-0.75,0.75 S9.33,13.75,9.74,13.75z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M17,4h-3V3.49c0-0.55-0.45-1-1-1h-2c-0.55,0-1,0.45-1,1V4H7C6.45,4,6,4.45,6,5v16c0,0.55,0.45,1,1,1h10c0.55,0,1-0.45,1-1 V5C18,4.45,17.55,4,17,4z M16.5,20.5h-9v-15h9V20.5z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M20.29,3.71L3.71,20.29C3.08,20.92,3.52,22,4.41,22H21c0.55,0,1-0.45,1-1V4.41c0-0.6-0.49-1-1.01-1 C20.75,3.41,20.5,3.5,20.29,3.71z M20.5,20.5H5.62L20.5,5.62V20.5z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M20.29,3.71L3.71,20.29C3.08,20.92,3.52,22,4.41,22H21c0.55,0,1-0.45,1-1V4.41c0-0.6-0.49-1-1.01-1 C20.75,3.41,20.5,3.5,20.29,3.71z M20.5,20.5H5.62L20.5,5.62V20.5z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M3.84,21.82C4,21.93,4.19,22,4.41,22h0H21c0.55,0,1-0.45,1-1V4.41c0-0.6-0.49-1-1.01-1c-0.25,0-0.5,0.09-0.7,0.29 L3.71,20.29C3.23,20.77,3.37,21.49,3.84,21.82z M20.5,5.62V20.5H11v-5.38L20.5,5.62z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M20.5,5.62V20.5H5.62L20.5,5.62M21,3.41a1,1,0,0,0-0.7 0.3 L3.71,20.29A1,1,0,0,0,4.41,22H21a1,1,0,0,0,1-1V4.41a1,1,0,0,0-1-1Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M3.71,20.29A1,1,0,0,0,4.41,22H7.93V16.07Z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M3.84,21.82C4,21.93,4.19,22,4.41,22h0H21c0.55,0,1-0.45,1-1V4.41c0-0.6-0.49-1-1.01-1c-0.25,0-0.5,0.09-0.7,0.29 L3.71,20.29C3.23,20.77,3.37,21.49,3.84,21.82z M20.5,5.62V20.5H13v-7.38L20.5,5.62z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M20.5,5.62V20.5H5.62L20.5,5.62M21,3.41a1,1,0,0,0-0.7 0.3 L3.71,20.29A1,1,0,0,0,4.41,22H21a1,1,0,0,0,1-1V4.41a1,1,0,0,0-1-1Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M3.71,20.29A1,1,0,0,0,4.41,22h7V12.55Z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M3.84,21.82C4,21.93,4.19,22,4.41,22h0H21c0.55,0,1-0.45,1-1V4.41c0-0.6-0.49-1-1.01-1c-0.25,0-0.5,0.09-0.7,0.29 L3.71,20.29C3.23,20.77,3.37,21.49,3.84,21.82z M20.5,5.62V20.5H16V10.12L20.5,5.62z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M20.5,5.62V20.5H5.62L20.5,5.62M21,3.41a1,1,0,0,0-0.7 0.3 L3.71,20.29A1,1,0,0,0,4.41,22H21a1,1,0,0,0,1-1V4.41a1,1,0,0,0-1-1Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M3.71,20.29A1,1,0,0,0,4.41,22H15V9Z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M4.41,22H21c0.55,0,1-0.45,1-1V4.41c0-0.89-1.08-1.34-1.71-0.71L3.71,20.29C3.08,20.92,3.52,22,4.41,22z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M20.5,5.62V20.5H5.62L20.5,5.62M21,3.41a1,1,0,0,0-0.7 0.3 L3.71,20.29A1,1,0,0,0,4.41,22H21a1,1,0,0,0,1-1V4.41a1,1,0,0,0-1-1Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M3.71,20.29A1,1,0,0,0,4.41,22H18.48V5.52Z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M4.41,22H21c0.55,0,1-0.45,1-1V4.41c0-0.89-1.08-1.34-1.71-0.71L3.71,20.29C3.08,20.92,3.52,22,4.41,22z" /> +</vector>
\ 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 index ae64e569f399..5ecb82619862 100644 --- a/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml @@ -13,16 +13,34 @@ ~ 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 - --> +--> <animated-vector xmlns:android="http://schemas.android.com/apk/res/android" - android:drawable="@*android:drawable/ic_signal_wifi_transient_animation_drawable"> - <target android:name="_R_G_L_4_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_0"/> - <target android:name="_R_G_L_3_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_1"/> - <target android:name="_R_G_L_3_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_2"/> - <target android:name="_R_G_L_2_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_3"/> - <target android:name="_R_G_L_2_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_4"/> - <target android:name="_R_G_L_1_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_5"/> - <target android:name="_R_G_L_1_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_6"/> - <target android:name="_R_G_L_0_G" android:animation="@*android:anim/ic_signal_wifi_transient_animation_7"/> - <target android:name="time_group" android:animation="@*android:anim/ic_signal_wifi_transient_animation_8"/> + android:drawable="@*android:drawable/ic_signal_wifi_transient_animation_drawable" > + <target + android:name="_R_G_L_4_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_0" /> + <target + android:name="_R_G_L_3_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_1" /> + <target + android:name="_R_G_L_3_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_2" /> + <target + android:name="_R_G_L_2_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_3" /> + <target + android:name="_R_G_L_2_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_4" /> + <target + android:name="_R_G_L_1_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_5" /> + <target + android:name="_R_G_L_1_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_6" /> + <target + android:name="_R_G_L_0_G" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_7" /> + <target + android:name="time_group" + android:animation="@*android:anim/ic_signal_wifi_transient_animation_8" /> </animated-vector> 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 index 4a2505adee83..130da579a5bb 100644 --- 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 @@ -13,41 +13,68 @@ ~ 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 - --> +--> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:height="24dp" android:width="24dp" android:viewportHeight="24" - android:viewportWidth="24"> - <group android:name="_R_G"> - <group android:name="_R_G_L_4_G" android:translateX="0.10500000000000043" - android:translateY="1.7490000000000006"> - <path android:name="_R_G_L_4_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M11.9 0.25 C7.65,0.25 3.78,1.91 0.88,4.63 C0.3,5.17 0.25,6.07 0.75,6.68 C0.75,6.68 11.12,19.31 11.12,19.31 C11.32,19.55 11.61,19.67 11.9,19.67 C12.18,19.67 12.47,19.55 12.67,19.31 C12.67,19.31 23.04,6.68 23.04,6.68 C23.54,6.07 23.49,5.17 22.91,4.63 C20.01,1.91 16.14,0.25 11.9,0.25c M11.9 17.89 C11.9,17.89 1.91,5.73 1.91,5.73 C4.64,3.16 8.18,1.75 11.9,1.75 C15.61,1.75 19.15,3.16 21.88,5.73 C21.88,5.73 11.9,17.89 11.9,17.89c "/> + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <group android:name="_R_G" > + <group + android:name="_R_G_L_4_G" + android:translateX="0.10500000000000043" + android:translateY="1.7490000000000006" > + <path + android:name="_R_G_L_4_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M11.9 0.25 C7.65,0.25 3.78,1.91 0.88,4.63 C0.3,5.17 0.25,6.07 0.75,6.68 C0.75,6.68 11.12,19.31 11.12,19.31 C11.32,19.55 11.61,19.67 11.9,19.67 C12.18,19.67 12.47,19.55 12.67,19.31 C12.67,19.31 23.04,6.68 23.04,6.68 C23.54,6.07 23.49,5.17 22.91,4.63 C20.01,1.91 16.14,0.25 11.9,0.25c M11.9 17.89 C11.9,17.89 1.91,5.73 1.91,5.73 C4.64,3.16 8.18,1.75 11.9,1.75 C15.61,1.75 19.15,3.16 21.88,5.73 C21.88,5.73 11.9,17.89 11.9,17.89c " /> </group> - <group android:name="_R_G_L_3_G" android:translateX="0.10500000000000043" - android:translateY="1.75"> - <path android:name="_R_G_L_3_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M11.9 0.25 C7.65,0.25 3.78,1.91 0.88,4.63 C0.3,5.17 0.25,6.07 0.75,6.68 C0.75,6.68 7.48,14.87 7.48,14.87 C7.48,14.87 7.48,14.87 7.48,14.87 C7.48,14.87 8,15.51 8,15.51 C8,15.51 11.12,19.31 11.12,19.31 C11.32,19.55 11.61,19.67 11.9,19.67 C12.18,19.67 12.47,19.55 12.67,19.31 C12.67,19.31 15.79,15.51 15.79,15.51 C15.79,15.51 16.31,14.87 16.31,14.87 C16.31,14.87 16.31,14.87 16.31,14.87 C16.31,14.87 23.04,6.68 23.04,6.68 C23.54,6.07 23.49,5.17 22.91,4.63 C20.01,1.91 16.14,0.25 11.9,0.25c M15.67 13.29 C15.57,13.15 15.47,13.01 15.36,12.88 C14.54,11.88 13.3,11.24 11.9,11.24 C10.5,11.24 9.25,11.88 8.43,12.88 C8.32,13.01 8.22,13.15 8.12,13.29 C8.12,13.29 1.91,5.73 1.91,5.73 C4.64,3.16 8.18,1.75 11.9,1.75 C15.61,1.75 19.15,3.16 21.88,5.73 C21.88,5.73 15.67,13.29 15.67,13.29c "/> + <group + android:name="_R_G_L_3_G" + android:translateX="0.10500000000000043" + android:translateY="1.75" > + <path + android:name="_R_G_L_3_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M11.9 0.25 C7.65,0.25 3.78,1.91 0.88,4.63 C0.3,5.17 0.25,6.07 0.75,6.68 C0.75,6.68 7.48,14.87 7.48,14.87 C7.48,14.87 7.48,14.87 7.48,14.87 C7.48,14.87 8,15.51 8,15.51 C8,15.51 11.12,19.31 11.12,19.31 C11.32,19.55 11.61,19.67 11.9,19.67 C12.18,19.67 12.47,19.55 12.67,19.31 C12.67,19.31 15.79,15.51 15.79,15.51 C15.79,15.51 16.31,14.87 16.31,14.87 C16.31,14.87 16.31,14.87 16.31,14.87 C16.31,14.87 23.04,6.68 23.04,6.68 C23.54,6.07 23.49,5.17 22.91,4.63 C20.01,1.91 16.14,0.25 11.9,0.25c M15.67 13.29 C15.57,13.15 15.47,13.01 15.36,12.88 C14.54,11.88 13.3,11.24 11.9,11.24 C10.5,11.24 9.25,11.88 8.43,12.88 C8.32,13.01 8.22,13.15 8.12,13.29 C8.12,13.29 1.91,5.73 1.91,5.73 C4.64,3.16 8.18,1.75 11.9,1.75 C15.61,1.75 19.15,3.16 21.88,5.73 C21.88,5.73 15.67,13.29 15.67,13.29c " /> </group> - <group android:name="_R_G_L_2_G" android:translateX="0.10500000000000043" - android:translateY="1.7490000000000006"> - <path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M11.89 0.25 C7.65,0.25 3.77,1.91 0.88,4.63 C0.3,5.17 0.25,6.07 0.75,6.68 C0.75,6.68 11.12,19.31 11.12,19.31 C11.32,19.55 11.61,19.67 11.89,19.67 C12.18,19.67 12.47,19.55 12.67,19.31 C12.67,19.31 23.04,6.68 23.04,6.68 C23.54,6.07 23.48,5.17 22.91,4.63 C20.01,1.91 16.14,0.25 11.89,0.25c M17.61 10.93 C17.5,10.8 17.4,10.66 17.28,10.54 C15.92,9.12 14.01,8.24 11.89,8.24 C9.77,8.24 7.86,9.12 6.51,10.54 C6.39,10.66 6.29,10.8 6.18,10.92 C6.18,10.92 1.91,5.73 1.91,5.73 C4.64,3.16 8.18,1.75 11.89,1.75 C15.6,1.75 19.15,3.16 21.88,5.73 C21.88,5.73 17.61,10.93 17.61,10.93c "/> + <group + android:name="_R_G_L_2_G" + android:translateX="0.10500000000000043" + android:translateY="1.7490000000000006" > + <path + android:name="_R_G_L_2_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M11.89 0.25 C7.65,0.25 3.77,1.91 0.88,4.63 C0.3,5.17 0.25,6.07 0.75,6.68 C0.75,6.68 11.12,19.31 11.12,19.31 C11.32,19.55 11.61,19.67 11.89,19.67 C12.18,19.67 12.47,19.55 12.67,19.31 C12.67,19.31 23.04,6.68 23.04,6.68 C23.54,6.07 23.48,5.17 22.91,4.63 C20.01,1.91 16.14,0.25 11.89,0.25c M17.61 10.93 C17.5,10.8 17.4,10.66 17.28,10.54 C15.92,9.12 14.01,8.24 11.89,8.24 C9.77,8.24 7.86,9.12 6.51,10.54 C6.39,10.66 6.29,10.8 6.18,10.92 C6.18,10.92 1.91,5.73 1.91,5.73 C4.64,3.16 8.18,1.75 11.89,1.75 C15.6,1.75 19.15,3.16 21.88,5.73 C21.88,5.73 17.61,10.93 17.61,10.93c " /> </group> - <group android:name="_R_G_L_1_G" android:translateX="0.10500000000000043" - android:translateY="1.7490000000000006"> - <path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M11.9 0.25 C7.65,0.25 3.78,1.91 0.88,4.63 C0.3,5.17 0.25,6.07 0.75,6.68 C0.75,6.68 3.2,9.66 3.2,9.66 C3.2,9.66 3.2,9.66 3.2,9.66 C3.2,9.66 11.12,19.31 11.12,19.31 C11.52,19.8 12.27,19.8 12.67,19.31 C12.67,19.31 20.6,9.66 20.6,9.66 C20.6,9.66 20.59,9.66 20.59,9.66 C20.59,9.66 23.04,6.68 23.04,6.68 C23.54,6.07 23.49,5.17 22.91,4.63 C20.01,1.91 16.14,0.25 11.9,0.25c M19.6 8.5 C19.51,8.41 19.43,8.32 19.34,8.23 C17.41,6.37 14.8,5.24 11.9,5.24 C8.99,5.24 6.38,6.38 4.45,8.23 C4.36,8.32 4.28,8.41 4.19,8.51 C4.19,8.51 1.91,5.73 1.91,5.73 C4.64,3.16 8.18,1.75 11.9,1.75 C15.61,1.75 19.15,3.16 21.88,5.73 C21.88,5.73 19.6,8.5 19.6,8.5c "/> + <group + android:name="_R_G_L_1_G" + android:translateX="0.10500000000000043" + android:translateY="1.7490000000000006" > + <path + android:name="_R_G_L_1_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M11.9 0.25 C7.65,0.25 3.78,1.91 0.88,4.63 C0.3,5.17 0.25,6.07 0.75,6.68 C0.75,6.68 3.2,9.66 3.2,9.66 C3.2,9.66 3.2,9.66 3.2,9.66 C3.2,9.66 11.12,19.31 11.12,19.31 C11.52,19.8 12.27,19.8 12.67,19.31 C12.67,19.31 20.6,9.66 20.6,9.66 C20.6,9.66 20.59,9.66 20.59,9.66 C20.59,9.66 23.04,6.68 23.04,6.68 C23.54,6.07 23.49,5.17 22.91,4.63 C20.01,1.91 16.14,0.25 11.9,0.25c M19.6 8.5 C19.51,8.41 19.43,8.32 19.34,8.23 C17.41,6.37 14.8,5.24 11.9,5.24 C8.99,5.24 6.38,6.38 4.45,8.23 C4.36,8.32 4.28,8.41 4.19,8.51 C4.19,8.51 1.91,5.73 1.91,5.73 C4.64,3.16 8.18,1.75 11.9,1.75 C15.61,1.75 19.15,3.16 21.88,5.73 C21.88,5.73 19.6,8.5 19.6,8.5c " /> </group> - <group android:name="_R_G_L_0_G" android:translateX="0.10500000000000043" - android:translateY="1.75"> - <path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000000" - android:fillAlpha="1" android:fillType="nonZero" - android:pathData=" M11.9 0.25 C7.65,0.25 3.78,1.91 0.88,4.63 C0.3,5.17 0.25,6.07 0.75,6.68 C0.75,6.68 11.12,19.31 11.12,19.31 C11.52,19.8 12.27,19.8 12.67,19.31 C12.67,19.31 23.04,6.68 23.04,6.68 C23.54,6.07 23.49,5.17 22.91,4.63 C20.01,1.91 16.14,0.25 11.9,0.25c "/> + <group + android:name="_R_G_L_0_G" + android:translateX="0.10500000000000043" + android:translateY="1.75" > + <path + android:name="_R_G_L_0_G_D_0_P_0" + android:fillAlpha="1" + android:fillColor="#000000" + android:fillType="nonZero" + android:pathData=" M11.9 0.25 C7.65,0.25 3.78,1.91 0.88,4.63 C0.3,5.17 0.25,6.07 0.75,6.68 C0.75,6.68 11.12,19.31 11.12,19.31 C11.52,19.8 12.27,19.8 12.67,19.31 C12.67,19.31 23.04,6.68 23.04,6.68 C23.54,6.07 23.49,5.17 22.91,4.63 C20.01,1.91 16.14,0.25 11.9,0.25c " /> </group> </group> - <group android:name="time_group"/> + <group android:name="time_group" /> </vector> 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..e9dddd071481 --- /dev/null +++ b/packages/overlays/IconPackRoundedAndroidOverlay/res/drawable/perm_group_calendar.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M19,3H17.5V1.75a0.75 0.75 ,0,0,0-1.5,0V3H8V1.75a0.75 0.75 ,0,0,0-1.5,0V3H5A2,2,0,0,0,3,5V19a2,2,0,0,0,2,2H19a2,2,0,0,0,2-2V5A2,2,0,0,0,19,3Zm0.5,16a0.5 0.5 ,0,0,1-0.5 0.5 H5a0.5 0.5 ,0,0,1-0.5-0.5V9h15ZM4.5,7.5V5A0.5 0.5 ,0,0,1,5,4.5H19a0.5 0.5 ,0,0,1,0.5 0.5 V7.5Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 13.5 12.5 L 16.5 12.5 Q 17.5 12.5 17.5 13.5 L 17.5 16.5 Q 17.5 17.5 16.5 17.5 L 13.5 17.5 Q 12.5 17.5 12.5 16.5 L 12.5 13.5 Q 12.5 12.5 13.5 12.5 Z" /> +</vector>
\ No newline at end of file diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_corp.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_corp.xml index dccc23c82530..38f515fdb22d 100644 --- a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_corp.xml +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_corp.xml @@ -1,25 +1,29 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorHint" + android:tint="?android:attr/textColorHint" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path android:fillColor="@android:color/white" - android:pathData="M20,6h-4V4c0-1.1-0.9-2-2-2h-4C8.9,2,8,2.9,8,4v2H4C2.9,6,2,6.9,2,8v11c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8 C22,6.9,21.1,6,20,6z M9.5,4c0-0.28,0.22-0.5,0.5-0.5h4c0.28,0,0.5,0.22,0.5,0.5v2h-5V4z M20.5,19c0,0.28-0.22,0.5-0.5,0.5H4 c-0.28,0-0.5-0.22-0.5-0.5V8c0-0.28,0.22-0.5,0.5-0.5h16c0.28,0,0.5,0.22,0.5,0.5V19z" /> + android:pathData="M20,6h-4V4c0-1.1-0.9-2-2-2h-4C8.9,2,8,2.9,8,4v2H4C2.9,6,2,6.9,2,8v11c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8 C22,6.9,21.1,6,20,6z M9.5,4c0-0.3,0.2-0.5,0.5-0.5h4c0.3,0,0.5,0.2,0.5,0.5v2h-5V4z M20.5,19c0,0.3-0.2,0.5-0.5,0.5H4 c-0.3,0-0.5-0.2-0.5-0.5V8c0-0.3,0.2-0.5,0.5-0.5h16c0.3,0,0.5,0.2,0.5,0.5V19z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 12 12.3 C 12.6627416998 12.3 13.2 12.8372583002 13.2 13.5 C 13.2 14.1627416998 12.6627416998 14.7 12 14.7 C 11.3372583002 14.7 10.8 14.1627416998 10.8 13.5 C 10.8 12.8372583002 11.3372583002 12.3 12 12.3 Z" /> </vector>
\ No newline at end of file diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_drag_handle.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_drag_handle.xml index 68c0a8022e79..1e7fcaf0a52f 100644 --- a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_drag_handle.xml +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_drag_handle.xml @@ -1,24 +1,25 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2019 The Android Open Source Project +<!-- + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" android:height="24dp" + android:tint="?android:attr/textColorHint" + android:viewportHeight="24" android:viewportWidth="24" - android:viewportHeight="24" android:tint="?android:attr/textColorHint"> - + android:width="24dp" > <path android:fillColor="@android:color/white" android:pathData="M5.75,10.5h12.5c0.41,0,0.75-0.34,0.75-0.75S18.66,9,18.25,9H5.75C5.34,9,5,9.34,5,9.75S5.34,10.5,5.75,10.5z" /> diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_hourglass_top.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_hourglass_top.xml index 0fd3229c26f3..28da99fe3218 100644 --- a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_hourglass_top.xml +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_hourglass_top.xml @@ -1,29 +1,26 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2019 The Android Open Source Project +<!-- + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" android:height="24dp" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary"> - + android:width="24dp" > <path android:fillColor="@android:color/white" - android:pathData="M16,3H8C7.45,3,7,3.45,7,4v1.93v0c0,0.33,0.03,0.66,0.1,0.98c0.19,0.96,0.66,1.85,1.37,2.56L11,12l-2.54,2.54 -C7.53,15.47,7,16.74,7,18.07V20c0,0.55,0.45,1,1,1h8c0.55,0,1-0.45,1-1v-1.93c0-1.33-0.53-2.6-1.46-3.54L13,12l2.54-2.54 -c0.7-0.7,1.18-1.59,1.37-2.56C16.97,6.59,17,6.26,17,5.93v0V4C17,3.45,16.55,3,16,3z -M14.47,15.6c0.66,0.66,1.03,1.54,1.03,2.47 -v1.43h-7v-1.43c0-0.93,0.36-1.81,1.03-2.47L12,13.12L14.47,15.6z" /> + android:pathData="M16,3H8C7.45,3,7,3.45,7,4v1.93v0c0,0.33,0.03,0.66,0.1,0.98c0.19,0.96,0.66,1.85,1.37,2.56L11,12l-2.54,2.54 C7.53,15.47,7,16.74,7,18.07V20c0,0.55,0.45,1,1,1h8c0.55,0,1-0.45,1-1v-1.93c0-1.33-0.53-2.6-1.46-3.54L13,12l2.54-2.54 c0.7-0.7,1.18-1.59,1.37-2.56C16.97,6.59,17,6.26,17,5.93v0V4C17,3.45,16.55,3,16,3z M14.47,15.6c0.66,0.66,1.03,1.54,1.03,2.47 v1.43h-7v-1.43c0-0.93,0.36-1.81,1.03-2.47L12,13.12L14.47,15.6z" /> </vector>
\ 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 index f799d40cacc7..168f86f1cc36 100644 --- a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_info_no_shadow.xml +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_info_no_shadow.xml @@ -1,22 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M12,3c-0.41,0-0.75,0.34-0.75,0.75v9.28l-2.24-2.08c-0.3-0.28-0.78-0.26-1.06,0.04c-0.28,0.3-0.26,0.78,0.04,1.06l3.5,3.25 c0.14,0.13,0.33,0.2,0.51,0.2c0.18,0,0.37-0.07,0.51-0.2l3.49-3.25c0.3-0.28,0.32-0.76,0.04-1.06c-0.28-0.3-0.76-0.32-1.06-0.04 l-2.23,2.08V3.75C12.75,3.34,12.41,3,12,3z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M4.75,13C4.34,13,4,13.34,4,13.75v4.5C4,19.21,4.79,20,5.75,20h12.5c0.96,0,1.75-0.79,1.75-1.75v-4.5 c0-0.41-0.34-0.75-0.75-0.75s-0.75,0.34-0.75,0.75v4.5c0,0.14-0.11,0.25-0.25,0.25H5.75c-0.14,0-0.25-0.11-0.25-0.25v-4.5 C5.5,13.34,5.16,13,4.75,13z" /> +</vector>
\ 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 index 964955bc96ca..e086ebd95cf7 100644 --- a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_palette.xml +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_palette.xml @@ -1,22 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <group diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_pin.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_pin.xml index f1bf5c345474..6ac4e122b83a 100644 --- a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_pin.xml +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_pin.xml @@ -1,29 +1,26 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2019 The Android Open Source Project +<!-- + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" android:height="24dp" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary"> - + android:width="24dp" > <path android:fillColor="@android:color/white" - android:pathData="M5.71,14.29C5.08,14.92,5.53,16,6.42,16h4.83v6.25c0,0.41,0.34,0.75,0.75,0.75s0.75-0.34,0.75-0.75V16h4.84 -c0.89,0,1.34-1.08,0.71-1.71L16,12V4.5h1.23c0.41,0,0.75-0.34,0.75-0.75S17.65,3,17.23,3H16H8H6.73C6.32,3,5.98,3.34,5.98,3.75 -S6.32,4.5,6.73,4.5H8V12L5.71,14.29z -M14.5,4.5V12c0,0.4,0.16,0.78,0.44,1.06l1.44,1.44H7.62l1.44-1.44C9.34,12.78,9.5,12.4,9.5,12 -V4.5H14.5z" /> + android:pathData="M5.71,14.29C5.08,14.92,5.53,16,6.42,16h4.83v6.25c0,0.41,0.34,0.75,0.75,0.75s0.75-0.34,0.75-0.75V16h4.84 c0.89,0,1.34-1.08,0.71-1.71L16,12V4.5h1.23c0.41,0,0.75-0.34,0.75-0.75S17.65,3,17.23,3H16H8H6.73C6.32,3,5.98,3.34,5.98,3.75 S6.32,4.5,6.73,4.5H8V12L5.71,14.29z M14.5,4.5V12c0,0.4,0.16,0.78,0.44,1.06l1.44,1.44H7.62l1.44-1.44C9.34,12.78,9.5,12.4,9.5,12 V4.5H14.5z" /> </vector>
\ 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 index 864a047844a4..fcfadbe8e60a 100644 --- a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_remove_no_shadow.xml +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_remove_no_shadow.xml @@ -1,22 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_setting.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_setting.xml index 6ff3144b9a73..86cb525e203a 100644 --- a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_setting.xml +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_setting.xml @@ -1,22 +1,22 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_smartspace_preferences.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_smartspace_preferences.xml index 3cc9e51c21cb..49f732726de5 100644 --- a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_smartspace_preferences.xml +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_smartspace_preferences.xml @@ -1,22 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_split_screen.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_split_screen.xml index aaf490046407..85443eb0a1d2 100644 --- a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_split_screen.xml +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_split_screen.xml @@ -1,22 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M20,4h-1h-4c0-0.55-0.45-1-1-1h-4C9.45,3,9,3.45,9,4H5H4C3.59,4,3.25,4.34,3.25,4.75S3.59,5.5,4,5.5h1V18 c0,1.66,1.34,3,3,3h8c1.66,0,3-1.34,3-3V5.5h1c0.41,0,0.75-0.34,0.75-0.75S20.41,4,20,4z M17.5,18c0,0.83-0.67,1.5-1.5,1.5H8 c-0.83,0-1.5-0.67-1.5-1.5V5.5h11V18z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M14.25,8c-0.41,0-0.75,0.34-0.75,0.75v7.5c0,0.41,0.34,0.75,0.75,0.75S15,16.66,15,16.25v-7.5C15,8.34,14.66,8,14.25,8z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M9.75,8C9.34,8,9,8.34,9,8.75v7.5C9,16.66,9.34,17,9.75,17s0.75-0.34,0.75-0.75v-7.5C10.5,8.34,10.16,8,9.75,8z" /> +</vector>
\ 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 index 63d7b78f76c2..2426f6f898eb 100644 --- a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_warning.xml +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_warning.xml @@ -1,30 +1,31 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path android:fillColor="@android:color/white" - android:pathData="M4.47,21h15.06c1.54,0,2.5-1.67,1.73-3L13.73,4.99c-0.39-0.67-1.06-1-1.73-1s-1.35,0.33-1.73,1L2.74,18 C1.97,19.33,2.93,21,4.47,21z M4.04,18.75l7.53-13.01c0.13-0.22,0.33-0.25,0.43-0.25s0.31,0.03,0.43,0.25l7.53,13.01 c0.13,0.22,0.05,0.41,0,0.5c-0.05,0.09-0.18,0.25-0.43,0.25H4.47c-0.25,0-0.38-0.16-0.43-0.25C3.98,19.16,3.91,18.97,4.04,18.75z" /> + android:pathData="M12,3.99c-0.67,0-1.35,0.33-1.73,1L2.74,18c-0.77,1.33,0.19,3,1.73,3h15.06c1.54,0,2.5-1.67,1.73-3L13.73,4.99 C13.35,4.32,12.67,3.99,12,3.99z M19.96,19.25c-0.05,0.09-0.18,0.25-0.43,0.25H4.47c-0.25,0-0.38-0.16-0.43-0.25 c-0.05-0.09-0.13-0.28,0-0.5l7.53-13.01c0.13-0.22,0.33-0.25,0.43-0.25s0.31,0.03,0.43,0.25l7.53,13.01 C20.09,18.97,20.02,19.16,19.96,19.25z" /> <path android:fillColor="@android:color/white" - android:pathData="M12,14.5c0.41,0,0.75-0.34,0.75-0.75v-4C12.75,9.33,12.41,9,12,9s-0.75,0.34-0.75,0.75v4C11.25,14.16,11.59,14.5,12,14.5z" /> + android:pathData="M11.25,9.75v4c0,0.41,0.34,0.75,0.75,0.75s0.75-0.34,0.75-0.75v-4C12.75,9.33,12.41,9,12,9S11.25,9.33,11.25,9.75z" /> <path android:fillColor="@android:color/white" android:pathData="M 12 16 C 12.5522847498 16 13 16.4477152502 13 17 C 13 17.5522847498 12.5522847498 18 12 18 C 11.4477152502 18 11 17.5522847498 11 17 C 11 16.4477152502 11.4477152502 16 12 16 Z" /> diff --git a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_widget.xml b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_widget.xml index df3a9fdcc40f..1e84ba461d9b 100644 --- a/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_widget.xml +++ b/packages/overlays/IconPackRoundedLauncherOverlay/res/drawable/ic_widget.xml @@ -1,22 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2019 The Android Open Source Project + 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 + 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. + 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" - android:viewportHeight="24" android:tint="?android:attr/textColorPrimary" + android:tint="?android:attr/textColorPrimary" + android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" > <path 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M18.79,8.23c-0.29-0.3-0.76-0.3-1.06-0.01L12,13.82L6.27,8.21C5.98,7.92,5.5,7.93,5.21,8.23C4.92,8.52,4.93,9,5.23,9.29 l6,5.87c0.24,0.24,0.51,0.37,0.78,0.37c0.27,0,0.53-0.12,0.77-0.36l6-5.88C19.07,9,19.08,8.52,18.79,8.23z" /> +</vector>
\ 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..7df03ad48705 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_chevron_right_24dp.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M8.98,18.04c0.15,0.14,0.33,0.21,0.52,0.21c0.19,0,0.39-0.08,0.54-0.23l5.12-5.24c0.49-0.49,0.49-1.07,0.01-1.55 l-5.12-5.25c-0.29-0.3-0.76-0.3-1.06-0.01c-0.3,0.29-0.3,0.76-0.01,1.06L13.82,12l-4.86,4.98C8.67,17.27,8.68,17.75,8.98,18.04z" /> +</vector>
\ 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 index 280f5dfda536..b3f642191ca3 100644 --- a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_content_copy_grey600_24dp.xml @@ -23,5 +23,4 @@ <path android:fillColor="@android:color/white" android:pathData="M17.7,21.5H4c-0.3,0-0.5-0.2-0.5-0.5V7.3C3.5,7.1,3.4,7,3.2,7H2.3C2.1,7,2,7.1,2,7.3v14.2C2,22.3,2.7,23,3.5,23h14.2 c0.2,0,0.3-0.1,0.3-0.3v-0.9C18,21.6,17.9,21.5,17.7,21.5z M21,17V3c0-1.1-0.9-2-2-2H8C6.9,1,6,1.9,6,3v14c0,1.1,0.9,2,2,2h11 C20.1,19,21,18.1,21,17z M19,17.5H8c-0.3,0-0.5-0.2-0.5-0.5V3c0-0.3,0.2-0.5,0.5-0.5h11c0.3,0,0.5,0.2,0.5,0.5v14 C19.5,17.3,19.3,17.5,19,17.5z" /> - <path android:pathData="M0,0h24v24H0V0z" /> </vector>
\ 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..e0a6f9553b15 --- /dev/null +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_help_actionbar.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M12,22c0,0,0.01,0,0.01,0c5.5,0,9.98-4.47,9.99-9.98V12c0-5.51-4.49-10-10-10S2,6.49,2,12S6.49,22,12,22z M12,3.5 c4.69,0,8.5,3.81,8.5,8.5v0.02c0,4.68-3.81,8.48-8.49,8.48c0,0-0.01,0-0.01,0c-4.69,0-8.5-3.81-8.5-8.5S7.31,3.5,12,3.5z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M8.67,9.98c0.4,0.1,0.81-0.15,0.9-0.56c0.11-0.47,0.33-0.86,0.65-1.19c0.94-0.94,2.59-0.94,3.54,0 c0.49,0.49,0.73,1.13,0.67,1.76c-0.06,0.57-0.36,1.06-0.84,1.38c-0.13,0.08-0.26,0.16-0.4,0.24c-0.7,0.4-1.67,0.94-1.93,2.51 c-0.07,0.41,0.21,0.8,0.61,0.86C11.92,15,11.96,15,12,15c0.36,0,0.68-0.26,0.74-0.62c0.15-0.87,0.58-1.12,1.19-1.46 c0.17-0.09,0.33-0.19,0.49-0.29c0.87-0.58,1.41-1.46,1.51-2.48c0.11-1.08-0.29-2.17-1.1-2.97c-1.51-1.51-4.15-1.51-5.66,0 c-0.52,0.51-0.88,1.17-1.05,1.9C8.02,9.48,8.27,9.88,8.67,9.98z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 12 16 C 12.5522847498 16 13 16.4477152502 13 17 C 13 17.5522847498 12.5522847498 18 12 18 C 11.4477152502 18 11 17.5522847498 11 17 C 11 16.4477152502 11.4477152502 16 12 16 Z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M4.92,4.94c-3.9,3.91-3.9,10.24,0.01,14.14s10.24,3.9,14.14-0.01C20.95,17.2,22,14.65,22,12c0-2.65-1.06-5.19-2.93-7.07 C15.16,1.03,8.83,1.03,4.92,4.94z M18,18c-1.6,1.59-3.76,2.48-6.02,2.48c-4.69-0.01-8.49-3.83-8.48-8.52 c0.01-4.69,3.83-8.49,8.52-8.48c4.69,0.01,8.49,3.83,8.48,8.52C20.49,14.25,19.6,16.41,18,18z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 12 7 C 12.5522847498 7 13 7.44771525017 13 8 C 13 8.55228474983 12.5522847498 9 12 9 C 11.4477152502 9 11 8.55228474983 11 8 C 11 7.44771525017 11.4477152502 7 12 7 Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M12,10.5c-0.41,0-0.75,0.34-0.75,0.75v5c0,0.41,0.34,0.75,0.75,0.75s0.75-0.34,0.75-0.75v-5 C12.75,10.84,12.41,10.5,12,10.5z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M19.25,20c0.19,0,0.38-0.07,0.53-0.22c0.29-0.29,0.29-0.77,0-1.06l-5.19-5.19C15.47,12.42,16,11.02,16,9.5 C16,5.92,13.08,3,9.5,3S3,5.92,3,9.5S5.92,16,9.5,16c1.52,0,2.92-0.53,4.03-1.41l5.19,5.19C18.87,19.93,19.06,20,19.25,20z M4.5,9.5c0-2.76,2.24-5,5-5s5,2.24,5,5s-2.24,5-5,5S4.5,12.26,4.5,9.5z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorAccent" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M2.43,15.45l1.79,3.09c0.25,0.45,0.74,0.73,1.25,0.73c0.17,0,0.35-0.03,0.52-0.09l1.76-0.7c0.25,0.17,0.51,0.31,0.77,0.45 l0.26,1.84c0.09,0.71,0.69,1.24,1.42,1.24h3.61c0.72,0,1.33-0.53,1.43-1.19l0.26-1.86c0.25-0.14,0.51-0.28,0.76-0.45l1.76,0.7 c0.17,0.07,0.35,0.1,0.53,0.1c0.5,0,0.98-0.27,1.23-0.72l1.82-3.14c0.34-0.61,0.19-1.38-0.36-1.82l-1.48-1.16 c0.01-0.15,0.02-0.29,0.02-0.45s-0.01-0.3-0.02-0.45l1.48-1.16c0.55-0.43,0.7-1.19,0.35-1.84l-1.8-3.1 c-0.25-0.45-0.74-0.73-1.26-0.73c-0.17,0-0.35,0.03-0.52,0.09l-1.76,0.7c-0.25-0.17-0.51-0.31-0.77-0.45l-0.26-1.84 c-0.09-0.71-0.69-1.24-1.42-1.24h-3.61c-0.71,0-1.32,0.54-1.41,1.22L8.52,5.09C8.26,5.23,8.01,5.37,7.75,5.54L5.99,4.83 c-0.17-0.07-0.35-0.1-0.52-0.1c-0.5,0-0.98,0.27-1.22,0.72L2.43,8.55c-0.36,0.61-0.21,1.4,0.36,1.84l1.48,1.16 C4.27,11.7,4.26,11.85,4.26,12c0,0.16,0.01,0.3,0.02,0.45l-1.49,1.16C2.24,14.04,2.09,14.8,2.43,15.45z M5.2,13.63l0.63-0.49 l-0.05-0.79c-0.01-0.11-0.01-0.58,0-0.7l0.05-0.79L5.2,10.37L3.77,9.25l1.74-3l1.69,0.68l0.73,0.29l0.66-0.43 c0.19-0.13,0.4-0.25,0.65-0.38l0.67-0.36L10,5.3l0.25-1.79h3.48l0.26,1.8l0.11,0.76l0.69,0.36c0.23,0.12,0.44,0.24,0.64,0.37 l0.65,0.43l0.72-0.29l1.7-0.68l1.75,3.02l-1.43,1.12l-0.62,0.49l0.05,0.79c0.01,0.11,0.01,0.58,0,0.7l-0.05,0.79l0.62,0.49 l1.43,1.12l-1.74,3.02l-1.69-0.68l-0.72-0.29l-0.65,0.43c-0.19,0.13-0.4,0.25-0.65,0.38l-0.67,0.36l-0.11,0.75l-0.25,1.77h-3.5 L10,18.71l-0.11-0.76l-0.69-0.36c-0.23-0.12-0.44-0.24-0.64-0.37l-0.65-0.43l-0.72,0.29L5.5,17.76l-1.73-3.01L5.2,13.63z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M12,16c2.21,0,4-1.79,4-4s-1.79-4-4-4c-2.21,0-4,1.79-4,4S9.79,16,12,16z M12,9.5c1.38,0,2.5,1.12,2.5,2.5 s-1.12,2.5-2.5,2.5c-1.38,0-2.5-1.12-2.5-2.5S10.62,9.5,12,9.5z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M17.92,10.02C17.45,7.18,14.97,5,12,5C9.82,5,7.83,6.18,6.78,8.06C4.09,8.41,2,10.74,2,13.5C2,16.53,4.47,19,7.5,19h10 c2.48,0,4.5-2.02,4.5-4.5C22,12.16,20.21,10.23,17.92,10.02z M17.5,17.5h-10c-2.21,0-4-1.79-4-4c0-2,1.49-3.69,3.47-3.95l0.75-0.1 l0.37-0.66C8.88,7.38,10.38,6.5,12,6.5c2.18,0,4.08,1.62,4.44,3.76l0.19,1.14l1.15,0.11c1.52,0.14,2.72,1.45,2.72,2.99 C20.5,16.15,19.15,17.5,17.5,17.5z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M12.53,9.47c-0.29-0.29-0.77-0.29-1.06,0l-2.5,2.5c-0.29,0.29-0.29,0.77,0,1.06s0.77,0.29,1.06,0l1.22-1.22v3.44 c0,0.41,0.34,0.75,0.75,0.75s0.75-0.34,0.75-0.75v-3.44l1.22,1.22c0.15,0.15,0.34,0.22,0.53,0.22s0.38-0.07,0.53-0.22 c0.29-0.29,0.29-0.77,0-1.06L12.53,9.47z" /> +</vector>
\ 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 index e48cc146a515..b9c131b80ab6 100644 --- a/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_data_usage.xml +++ b/packages/overlays/IconPackRoundedSettingsOverlay/res/drawable/ic_settings_data_usage.xml @@ -22,8 +22,8 @@ android:width="24dp" > <path android:fillColor="@android:color/white" - android:pathData="M12,19.52a7.5,7.5,0,0,1-0.77-15V2.06A10,10,0,1,0,22,12.77h-2.5A7.52,7.52,0,0,1,12,19.52Z" /> + android:pathData="M12,20c-4.4,0-8-3.6-8-8c0-4.2,3.2-7.6,7.2-8V2C5.7,2.4,1.6,7.3,2,12.8c0.4,5.5,5.3,9.6,10.8,9.2c4.9-0.4,8.8-4.3,9.2-9.2 h-2C19.6,16.8,16.2,20,12,20z" /> <path android:fillColor="@android:color/white" - android:pathData="M19.48,11.27H22a10,10,0,0,0-9.23-9.22v2.5A7.51,7.51,0,0,1,19.48,11.27Z" /> + android:pathData="M20,11.2h2c-0.4-4.9-4.3-8.9-9.2-9.2v2C16.6,4.4,19.6,7.4,20,11.2z" /> </vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M20.25,2H3.75C3.34,2,3,2.34,3,2.75v4.5C3,7.66,3.34,8,3.75,8h16.5C20.66,8,21,7.66,21,7.25v-4.5C21,2.34,20.66,2,20.25,2 z M19.5,6.5h-15v-3h15V6.5z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 5.25 4.25 H 6.75 V 5.75 H 5.25 V 4.25 Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M20.25,9H3.75C3.34,9,3,9.34,3,9.75v4.5C3,14.66,3.34,15,3.75,15h16.5c0.41,0,0.75-0.34,0.75-0.75v-4.5 C21,9.34,20.66,9,20.25,9z M19.5,13.5h-15v-3h15V13.5z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 5.25 11.25 H 6.75 V 12.75 H 5.25 V 11.25 Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M20.25,16H3.75C3.34,16,3,16.34,3,16.75v4.5C3,21.66,3.34,22,3.75,22h16.5c0.41,0,0.75-0.34,0.75-0.75v-4.5 C21,16.34,20.66,16,20.25,16z M19.5,20.5h-15v-3h15V20.5z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 5.25 18.25 H 6.75 V 19.75 H 5.25 V 18.25 Z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M21.25,3.5c-0.41,0-0.75,0.34-0.75,0.75v2.5c-2.91-4.7-9.07-6.15-13.77-3.24C4.85,4.68,3.41,6.43,2.64,8.5 C2.55,8.91,2.81,9.3,3.21,9.39C3.54,9.46,3.88,9.3,4.03,9c1.65-4.4,6.55-6.62,10.94-4.97C16.92,4.76,18.53,6.17,19.5,8h-2.75 C16.34,8,16,8.34,16,8.75s0.34,0.75,0.75,0.75h4.5C21.66,9.5,22,9.16,22,8.75v-4.5C22,3.84,21.66,3.5,21.25,3.5z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M21.04,14.49c-0.37-0.19-0.82-0.05-1.01,0.32C20,14.87,19.98,14.93,19.97,15c-1.65,4.4-6.55,6.62-10.94,4.97 C7.08,19.24,5.47,17.83,4.5,16h2.75C7.66,16,8,15.66,8,15.25S7.66,14.5,7.25,14.5h-4.5C2.34,14.5,2,14.84,2,15.25v4.5 c0,0.41,0.34,0.75,0.75,0.75s0.75-0.34,0.75-0.75v-2.5c2.91,4.7,9.07,6.15,13.77,3.24c1.88-1.16,3.32-2.92,4.1-4.99 C21.56,15.13,21.41,14.68,21.04,14.49z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M8.97,13.03l2.5,2.5c0.15,0.15,0.34,0.22,0.53,0.22s0.38-0.07,0.53-0.22l2.5-2.5c0.29-0.29,0.29-0.77,0-1.06 s-0.77-0.29-1.06,0l-1.22,1.22V8.75C12.75,8.34,12.41,8,12,8s-0.75,0.34-0.75,0.75v4.44l-1.22-1.22c-0.29-0.29-0.77-0.29-1.06,0 S8.68,12.74,8.97,13.03z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M16,1H8C6.34,1,5,2.34,5,4v16c0,1.66,1.34,3,3,3h8c1.66,0,3-1.34,3-3V4C19,2.34,17.66,1,16,1z M16,21.5H8 c-0.83,0-1.5-0.67-1.5-1.5h11C17.5,20.83,16.83,21.5,16,21.5z M17.5,18.5h-11v-13h11V18.5z M6.5,4c0-0.83,0.67-1.5,1.5-1.5h8 c0.83,0,1.5,0.67,1.5,1.5H6.5z" /> +</vector>
\ 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..03f06e997e26 --- /dev/null +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_arrow_back.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?android:attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M8.2,18.79l0.03,0.03c0.01,0.01,0.02,0.02,0.04,0.04c0.31,0.28,0.78,0.26,1.06-0.05c0.28-0.31,0.26-0.78-0.05-1.06l-4.78-5 h16.59c0.46,0.04,0.86-0.29,0.91-0.75c-0.05-0.46-0.45-0.79-0.91-0.75H4.5l4.79-4.99c0.27-0.29,0.26-0.74-0.02-1.03 c-0.29-0.3-0.76-0.3-1.06-0.01l-6,6.24c-0.28,0.29-0.28,0.75,0,1.04L8.2,18.79z" /> +</vector>
\ 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 index 9386e7014a49..fed248aea26a 100644 --- a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_cast.xml +++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_cast.xml @@ -15,10 +15,10 @@ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:height="24dp" + android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" - android:width="24dp" > + android:width="17dp" > <path android:fillColor="@android:color/white" android:pathData="M2.75,14.25C2.34,14.25,2,14.59,2,15s0.34,0.75,0.75,0.75c1.93,0,3.5,1.57,3.5,3.5C6.25,19.66,6.59,20,7,20 s0.75-0.34,0.75-0.75C7.75,16.49,5.51,14.25,2.75,14.25z" /> 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="17dp" + android:tint="?android:attr/colorError" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="17dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M13.25,15.5c-0.41,0-0.75,0.34-0.75,0.75S12.84,17,13.25,17h5c0.41,0,0.75-0.34,0.75-0.75v-8.5C19,7.34,18.66,7,18.25,7 H5.75C5.34,7,5,7.34,5,7.75v1C5,9.16,5.34,9.5,5.75,9.5S6.5,9.16,6.5,8.75V8.5h11v7H13.25z" /> +</vector>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="17dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="17dp" > + <path + android:fillColor="@android:color/white" + android:pathData="M20,6h-4V4c0-1.1-0.9-2-2-2h-4C8.9,2,8,2.9,8,4v2H4C2.9,6,2,6.9,2,8v11c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8 C22,6.9,21.1,6,20,6z M9.5,4c0-0.3,0.2-0.5,0.5-0.5h4c0.3,0,0.5,0.2,0.5,0.5v2h-5V4z M20.5,19c0,0.3-0.2,0.5-0.5,0.5H4 c-0.3,0-0.5-0.2-0.5-0.5V8c0-0.3,0.2-0.5,0.5-0.5h16c0.3,0,0.5,0.2,0.5,0.5V19z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 12 12.3 C 12.6627416998 12.3 13.2 12.8372583002 13.2 13.5 C 13.2 14.1627416998 12.6627416998 14.7 12 14.7 C 11.3372583002 14.7 10.8 14.1627416998 10.8 13.5 C 10.8 12.8372583002 11.3372583002 12.3 12 12.3 Z" /> +</vector>
\ No newline at end of file diff --git a/proto/src/metrics_constants/metrics_constants.proto b/proto/src/metrics_constants/metrics_constants.proto index 65338cb2126f..e30e166a46b5 100644 --- a/proto/src/metrics_constants/metrics_constants.proto +++ b/proto/src/metrics_constants/metrics_constants.proto @@ -263,6 +263,14 @@ message MetricsEvent { PREVIOUSLY_VISIBLE = 2; } + // Types for ACTION_SHORTCUTS_CHANGED + enum ShortcutsChangesInfo { + SHORTCUTS_CHANGED_UNKNOWN = 0; + SHORTCUTS_CHANGED_USER_ID = 1; + SHORTCUTS_CHANGED_PACKAGE_COUNT = 2; + SHORTCUTS_CHANGED_SHORTCUT_COUNT = 3; + } + // Explanations for notification importance, derived from // NotificationRecord.mImportanceExplanation. enum NotificationImportanceExplanation { @@ -4183,6 +4191,8 @@ message MetricsEvent { // Tag FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode. // Tag FIELD_AUTOFILL_NUMBER_REQUESTS: number of requests made to the service (each request // is logged by a separate AUTOFILL_REQUEST metric) + // NOTE: starting on OS Q, it also added the following fields: + // TAg FIELD_AUTOFILL_AUGMENTED_ONLY: if the session was used just for augmented autofill AUTOFILL_SESSION_FINISHED = 919; // meta-event: a reader has checkpointed the log here. @@ -7222,6 +7232,64 @@ message MetricsEvent { // OS: Q ASSISTANT = 1716; + // ACTION: Published shortcuts in ShortcutManager changed + // TYPE: All the SHORTCUTS_CHANGED_* values in ShortcutsChangesInfo + // OS: Q + ACTION_SHORTCUTS_CHANGED = 1717; + + // ACTION: Direct share targets loaded via ShortcutManager + // OS: Q + ACTION_DIRECT_SHARE_TARGETS_LOADED_SHORTCUT_MANAGER = 1718; + + // ACTION: Direct share targets loaded via ChooserService + // OS: Q + ACTION_DIRECT_SHARE_TARGETS_LOADED_CHOOSER_SERVICE = 1719; + + // Field indicating that an autofill session was created just for augmented autofill purposes. + // OS: Q + // Value: 1 for true, absent when false + FIELD_AUTOFILL_AUGMENTED_ONLY = 1720; + + // The augmented autofill service set its whitelisted packages and activities. + // OS: Q + // Tag FIELD_AUTOFILL_SERVICE: Package of the augmented autofill service that processed the + // request + // Tag FIELD_AUTOFILL_NUMBER_PACKAGES: Number of whitelisted packages. + // Tag FIELD_AUTOFILL_NUMBER_ACTIVITIES: Number of whitelisted activities. + AUTOFILL_AUGMENTED_WHITELIST_REQUEST = 1721; + + // Generic field used to indicate the number of packages in an Autofill metric (typically a + // whitelist request). + // OS: Q + FIELD_AUTOFILL_NUMBER_PACKAGES = 1722; + + // Generic field used to indicate the number of activities in an Autofill metric (typically a + // whitelist request). + // OS: Q + FIELD_AUTOFILL_NUMBER_ACTIVITIES = 1723; + + // Reports the result of a request made to the augmented autofill service + // OS: Q + // Type TYPE_UNKNOWN: if the type of response could not be determined + // Type TYPE_SUCCESS: service called onSucess() passing null + // Type TYPE_OPEN: service shown the UI + // Type TYPE_CLOSE: service hid the UI + // Type TYPE_ERROR: service timed out responding + + // Tag FIELD_CLASS_NAME: Class name of the activity that is autofilled. + // Tag FIELD_AUTOFILL_SERVICE: Package of the augmented autofill service that processed the + // request + // Tag FIELD_AUTOFILL_SESSION_ID: id of the autofill session associated with this metric + // Tag FIELD_AUTOFILL_DURATION: how long it took (in ms) to the service to respond, or -1 if the + // type of response could not be determined + AUTOFILL_AUGMENTED_RESPONSE = 1724; + + // ---- Skipping ahead to avoid conflicts between master and release branches. + // OPEN: Settings > System > Gestures > Global Actions Panel + // CATEGORY: SETTINGS + // OS: Q + GLOBAL_ACTIONS_PANEL_SETTINGS = 1800; + // ---- End Q Constants, all Q constants go above this line ---- // Add new aosp constants above this line. // END OF AOSP CONSTANTS diff --git a/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java b/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java index 386dec472019..6bb1cfaf11c2 100644 --- a/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java +++ b/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java @@ -1177,8 +1177,8 @@ final class AutofillManagerServiceImpl * @return whether caller UID is the augmented autofill service for the user */ @GuardedBy("mLock") - boolean setAugmentedAutofillWhitelistLocked(List<String> packages, - List<ComponentName> activities, int callingUid) { + boolean setAugmentedAutofillWhitelistLocked(@Nullable List<String> packages, + @Nullable List<ComponentName> activities, int callingUid) { if (!isCalledByAugmentedAutofillServiceLocked("setAugmentedAutofillWhitelistLocked", callingUid)) { @@ -1189,8 +1189,25 @@ final class AutofillManagerServiceImpl + activities + ")"); } whitelistForAugmentedAutofillPackages(packages, activities); + final String serviceName; + if (mRemoteAugmentedAutofillServiceInfo != null) { + serviceName = mRemoteAugmentedAutofillServiceInfo.getComponentName() + .flattenToShortString(); + } else { + Slog.e(TAG, "setAugmentedAutofillWhitelistLocked(): no service"); + serviceName = "N/A"; + } + + final LogMaker log = new LogMaker(MetricsEvent.AUTOFILL_AUGMENTED_WHITELIST_REQUEST) + .addTaggedData(MetricsEvent.FIELD_AUTOFILL_SERVICE, serviceName); + if (packages != null) { + log.addTaggedData(MetricsEvent.FIELD_AUTOFILL_NUMBER_PACKAGES, packages.size()); + } + if (activities != null) { + log.addTaggedData(MetricsEvent.FIELD_AUTOFILL_NUMBER_ACTIVITIES, activities.size()); + } + mMetricsLogger.write(log); - // TODO(b/122858578): log metrics return true; } @@ -1233,7 +1250,6 @@ final class AutofillManagerServiceImpl } /** - * * @throws IllegalArgumentException if packages or components are empty. */ private void whitelistForAugmentedAutofillPackages(@Nullable List<String> packages, diff --git a/services/autofill/java/com/android/server/autofill/RemoteAugmentedAutofillService.java b/services/autofill/java/com/android/server/autofill/RemoteAugmentedAutofillService.java index 609904b32230..d2b71e591b22 100644 --- a/services/autofill/java/com/android/server/autofill/RemoteAugmentedAutofillService.java +++ b/services/autofill/java/com/android/server/autofill/RemoteAugmentedAutofillService.java @@ -16,6 +16,8 @@ package com.android.server.autofill; +import static android.service.autofill.augmented.Helper.logResponse; + import static com.android.server.autofill.Helper.sDebug; import static com.android.server.autofill.Helper.sVerbose; @@ -43,6 +45,7 @@ import android.view.autofill.AutofillValue; import android.view.autofill.IAutoFillManagerClient; import com.android.internal.infra.AbstractSinglePendingRequestRemoteService; +import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.internal.os.IResultReceiver; final class RemoteAugmentedAutofillService @@ -173,6 +176,7 @@ final class RemoteAugmentedAutofillService private final @Nullable AutofillValue mFocusedValue; private final @NonNull IAutoFillManagerClient mClient; private final @NonNull ComponentName mActivityComponent; + private final int mSessionId; private final int mTaskId; private final long mRequestTime = SystemClock.elapsedRealtime(); private final @NonNull IFillCallback mCallback; @@ -184,6 +188,7 @@ final class RemoteAugmentedAutofillService @Nullable AutofillValue focusedValue) { super(service, sessionId); mClient = client; + mSessionId = sessionId; mTaskId = taskId; mActivityComponent = activityComponent; mFocusedId = focusedId; @@ -283,6 +288,8 @@ final class RemoteAugmentedAutofillService remoteService.dispatchOnFillTimeout(cancellation); } finish(); + logResponse(MetricsEvent.TYPE_ERROR, remoteService.getComponentName().getPackageName(), + mActivityComponent, mSessionId, remoteService.mRequestTimeoutMs); } @Override diff --git a/services/autofill/java/com/android/server/autofill/Session.java b/services/autofill/java/com/android/server/autofill/Session.java index 1a0353cde8ce..e61fa326215f 100644 --- a/services/autofill/java/com/android/server/autofill/Session.java +++ b/services/autofill/java/com/android/server/autofill/Session.java @@ -570,7 +570,6 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState private void requestNewFillResponseLocked(@NonNull ViewState viewState, int newState, int flags) { if (mForAugmentedAutofillOnly) { - // TODO(b/122858578): log metrics if (sVerbose) { Slog.v(TAG, "requestNewFillResponse(): triggering augmented autofill instead " + "(mForAugmentedAutofillOnly=" + mForAugmentedAutofillOnly @@ -3253,6 +3252,9 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState log.addTaggedData(MetricsEvent.FIELD_AUTOFILL_NUMBER_AUGMENTED_REQUESTS, totalAugmentedRequests); } + if (mForAugmentedAutofillOnly) { + log.addTaggedData(MetricsEvent.FIELD_AUTOFILL_AUGMENTED_ONLY, 1); + } mMetricsLogger.write(log); return mRemoteFillService; diff --git a/services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java b/services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java index 4399e4267fda..67c3d01cb86b 100644 --- a/services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java +++ b/services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java @@ -54,6 +54,7 @@ import android.util.ArrayMap; import android.util.ArraySet; import android.util.Slog; import android.util.SparseArray; +import android.util.SparseBooleanArray; import android.view.contentcapture.ContentCaptureCondition; import android.view.contentcapture.DataRemovalRequest; @@ -552,6 +553,39 @@ final class ContentCapturePerUserService + " for user " + mUserId); } mMaster.mGlobalContentCaptureOptions.setWhitelist(mUserId, packages, activities); + + // Must disable session that are not the whitelist anymore... + final int numSessions = mSessions.size(); + if (numSessions <= 0) return; + + // ...but without holding the lock on mGlobalContentCaptureOptions + final SparseBooleanArray blacklistedSessions = new SparseBooleanArray(numSessions); + + for (int i = 0; i < numSessions; i++) { + final ContentCaptureServerSession session = mSessions.valueAt(i); + final boolean whitelisted = mMaster.mGlobalContentCaptureOptions + .isWhitelisted(mUserId, session.appComponentName); + if (!whitelisted) { + final int sessionId = mSessions.keyAt(i); + if (mMaster.debug) { + Slog.d(TAG, "marking session " + sessionId + " (" + session.appComponentName + + ") for un-whitelisting"); + } + blacklistedSessions.append(sessionId, true); + } + } + final int numBlacklisted = blacklistedSessions.size(); + + if (numBlacklisted <= 0) return; + + synchronized (mLock) { + for (int i = 0; i < numBlacklisted; i++) { + final int sessionId = blacklistedSessions.keyAt(i); + if (mMaster.debug) Slog.d(TAG, "un-whitelisting " + sessionId); + final ContentCaptureServerSession session = mSessions.get(sessionId); + session.setContentCaptureEnabledLocked(false); + } + } } @Override diff --git a/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureServerSession.java b/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureServerSession.java index 2643db1d5851..aa63e40747ee 100644 --- a/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureServerSession.java +++ b/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureServerSession.java @@ -72,6 +72,8 @@ final class ContentCaptureServerSession { private final Object mLock; + public final ComponentName appComponentName; + ContentCaptureServerSession(@NonNull Object lock, @NonNull IBinder activityToken, @NonNull ContentCapturePerUserService service, @NonNull ComponentName appComponentName, @NonNull IResultReceiver sessionStateReceiver, int taskId, int displayId, int sessionId, @@ -79,6 +81,7 @@ final class ContentCaptureServerSession { Preconditions.checkArgument(sessionId != NO_SESSION_ID); mLock = lock; mActivityToken = activityToken; + this.appComponentName = appComponentName; mService = service; mId = sessionId; mUid = uid; @@ -228,6 +231,7 @@ final class ContentCaptureServerSession { pw.print(prefix); pw.print("uid: "); pw.print(mUid); pw.println(); pw.print(prefix); pw.print("context: "); mContentCaptureContext.dump(pw); pw.println(); pw.print(prefix); pw.print("activity token: "); pw.println(mActivityToken); + pw.print(prefix); pw.print("app component: "); pw.println(appComponentName); pw.print(prefix); pw.print("has autofill callback: "); } diff --git a/services/core/java/com/android/server/AlarmManagerService.java b/services/core/java/com/android/server/AlarmManagerService.java index 1220e82485e7..b66de22201b8 100644 --- a/services/core/java/com/android/server/AlarmManagerService.java +++ b/services/core/java/com/android/server/AlarmManagerService.java @@ -1764,8 +1764,7 @@ class AlarmManagerService extends SystemService { + ", callingPackage: " + callingPackage; // STOPSHIP (b/128866264): Just to catch breakages. Remove before final release. Slog.wtf(TAG, errorMsg); - // TODO b/129995049: Resume throwing after some soak time without errors - // throw new UnsupportedOperationException(errorMsg); + throw new UnsupportedOperationException(errorMsg); } setImplLocked(type, triggerAtTime, triggerElapsed, windowLength, maxElapsed, interval, operation, directReceiver, listenerTag, flags, true, workSource, diff --git a/services/core/java/com/android/server/PackageWatchdog.java b/services/core/java/com/android/server/PackageWatchdog.java index 086088bdcfb8..32671144aee3 100644 --- a/services/core/java/com/android/server/PackageWatchdog.java +++ b/services/core/java/com/android/server/PackageWatchdog.java @@ -529,8 +529,7 @@ public class PackageWatchdog { while (pit.hasNext()) { MonitoredPackage monitoredPackage = pit.next(); String packageName = monitoredPackage.getName(); - if (monitoredPackage.getHealthCheckStateLocked() - != MonitoredPackage.STATE_PASSED) { + if (monitoredPackage.isPendingHealthChecksLocked()) { packages.add(packageName); } } @@ -1093,7 +1092,10 @@ public class PackageWatchdog { */ @GuardedBy("mLock") public long getShortestScheduleDurationMsLocked() { - return Math.min(toPositive(mDurationMs), toPositive(mHealthCheckDurationMs)); + // Consider health check duration only if #isPendingHealthChecksLocked is true + return Math.min(toPositive(mDurationMs), + isPendingHealthChecksLocked() + ? toPositive(mHealthCheckDurationMs) : Long.MAX_VALUE); } /** @@ -1106,6 +1108,15 @@ public class PackageWatchdog { } /** + * Returns {@code true} if the package, {@link #getName} is expecting health check results + * {@code false} otherwise. + */ + @GuardedBy("mLock") + public boolean isPendingHealthChecksLocked() { + return mHealthCheckState == STATE_ACTIVE || mHealthCheckState == STATE_INACTIVE; + } + + /** * Updates the health check state based on {@link #mHasPassedHealthCheck} * and {@link #mHealthCheckDurationMs}. * diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java index 28bc34859e6c..225c08092b49 100644 --- a/services/core/java/com/android/server/TelephonyRegistry.java +++ b/services/core/java/com/android/server/TelephonyRegistry.java @@ -342,7 +342,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { Integer newDefaultSubIdObj = new Integer(intent.getIntExtra( PhoneConstants.SUBSCRIPTION_KEY, SubscriptionManager.getDefaultSubscriptionId())); - int newDefaultPhoneId = intent.getIntExtra(PhoneConstants.SLOT_KEY, + int newDefaultPhoneId = intent.getIntExtra(PhoneConstants.PHONE_KEY, SubscriptionManager.getPhoneId(mDefaultSubId)); if (DBG) { log("onReceive:current mDefaultSubId=" + mDefaultSubId @@ -1935,8 +1935,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { pw.println("mEmergencyNumberList=" + mEmergencyNumberList); pw.println("mCallQuality=" + mCallQuality); pw.println("mCallAttributes=" + mCallAttributes); - pw.println("mDefaultPhoneId" + mDefaultPhoneId); - pw.println("mDefaultSubId" + mDefaultSubId); + pw.println("mDefaultPhoneId=" + mDefaultPhoneId); + pw.println("mDefaultSubId=" + mDefaultSubId); pw.decreaseIndent(); diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 46c8ce77d7cf..4d0d3d2dc578 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -272,7 +272,6 @@ import android.os.UserManager; import android.os.WorkSource; import android.os.storage.IStorageManager; import android.os.storage.StorageManager; -import android.permission.PermissionManager; import android.provider.DeviceConfig; import android.provider.Settings; import android.sysprop.VoldProperties; @@ -5737,17 +5736,6 @@ public class ActivityManagerService extends IActivityManager.Stub owningUid, exported); } - @Override - public int checkPermissionWithDenialHintForwarding(String permission, int pid, int uid, - List<String> permissionDenialHints) { - List<String> prev = PermissionManager.resetPermissionDenialHints(permissionDenialHints); - try { - return checkPermission(permission, pid, uid); - } finally { - PermissionManager.resetPermissionDenialHints(prev); - } - } - /** * As the only public entry point for permissions checking, this method * can enforce the semantic that requesting a check on a null global @@ -5760,7 +5748,6 @@ public class ActivityManagerService extends IActivityManager.Stub @Override public int checkPermission(String permission, int pid, int uid) { if (permission == null) { - PermissionManager.addPermissionDenialHint("Permission is null"); return PackageManager.PERMISSION_DENIED; } return checkComponentPermission(permission, pid, uid, -1, true); diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index d5109123ab12..ad5f4e6e33c2 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -36,6 +36,8 @@ import android.app.AppGlobals; import android.app.AppOpsManager; import android.app.IUidObserver; import android.app.NotificationManager; +import android.app.role.OnRoleHoldersChangedListener; +import android.app.role.RoleManager; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothHeadset; @@ -158,6 +160,7 @@ import java.util.Iterator; import java.util.List; import java.util.NoSuchElementException; import java.util.Objects; +import java.util.concurrent.Executor; /** * The implementation of the volume manager service. @@ -889,9 +892,48 @@ public class AudioService extends IAudioService.Stub 0 : SAFE_VOLUME_CONFIGURE_TIMEOUT_MS); initA11yMonitoring(); + + mRoleObserver = new RoleObserver(); + mRoleObserver.register(); + onIndicateSystemReady(); } + RoleObserver mRoleObserver; + + class RoleObserver implements OnRoleHoldersChangedListener { + private RoleManager mRm; + private final Executor mExecutor; + + RoleObserver() { + mExecutor = mContext.getMainExecutor(); + } + + public void register() { + mRm = (RoleManager) mContext.getSystemService(Context.ROLE_SERVICE); + if (mRm != null) { + mRm.addOnRoleHoldersChangedListenerAsUser(mExecutor, this, UserHandle.ALL); + updateAssistantUId(true); + } + } + + @Override + public void onRoleHoldersChanged(@NonNull String roleName, @NonNull UserHandle user) { + if (RoleManager.ROLE_ASSISTANT.equals(roleName)) { + updateAssistantUId(false); + } + } + + public String getAssistantRoleHolder() { + String assitantPackage = ""; + if (mRm != null) { + List<String> assistants = mRm.getRoleHolders(RoleManager.ROLE_ASSISTANT); + assitantPackage = assistants.size() == 0 ? "" : assistants.get(0); + } + return assitantPackage; + } + } + void onIndicateSystemReady() { if (AudioSystem.systemReady() == AudioSystem.SUCCESS) { return; @@ -1391,21 +1433,33 @@ public class AudioService extends IAudioService.Stub int assistantUid = 0; // Consider assistants in the following order of priority: - // 1) voice interaction service - // 2) assistant - String assistantName = Settings.Secure.getStringForUser( + // 1) apk in assistant role + // 2) voice interaction service + // 3) assistant service + + String packageName = ""; + if (mRoleObserver != null) { + packageName = mRoleObserver.getAssistantRoleHolder(); + } + if (TextUtils.isEmpty(packageName)) { + String assistantName = Settings.Secure.getStringForUser( + mContentResolver, + Settings.Secure.VOICE_INTERACTION_SERVICE, UserHandle.USER_CURRENT); + if (TextUtils.isEmpty(assistantName)) { + assistantName = Settings.Secure.getStringForUser( mContentResolver, - Settings.Secure.VOICE_INTERACTION_SERVICE, UserHandle.USER_CURRENT); - if (TextUtils.isEmpty(assistantName)) { - assistantName = Settings.Secure.getStringForUser( - mContentResolver, - Settings.Secure.ASSISTANT, UserHandle.USER_CURRENT); - } - if (!TextUtils.isEmpty(assistantName)) { - String packageName = ComponentName.unflattenFromString(assistantName).getPackageName(); - if (!TextUtils.isEmpty(packageName)) { + Settings.Secure.ASSISTANT, UserHandle.USER_CURRENT); + } + if (!TextUtils.isEmpty(assistantName)) { + packageName = ComponentName.unflattenFromString(assistantName).getPackageName(); + } + } + if (!TextUtils.isEmpty(packageName)) { + PackageManager pm = mContext.getPackageManager(); + if (pm.checkPermission(Manifest.permission.CAPTURE_AUDIO_HOTWORD, packageName) + == PackageManager.PERMISSION_GRANTED) { try { - assistantUid = mContext.getPackageManager().getPackageUid(packageName, 0); + assistantUid = pm.getPackageUid(packageName, 0); } catch (PackageManager.NameNotFoundException e) { Log.e(TAG, "updateAssistantUId() could not find UID for package: " + packageName); diff --git a/services/core/java/com/android/server/display/color/ColorDisplayService.java b/services/core/java/com/android/server/display/color/ColorDisplayService.java index f599adb5118a..85fb1e0f4bdf 100644 --- a/services/core/java/com/android/server/display/color/ColorDisplayService.java +++ b/services/core/java/com/android/server/display/color/ColorDisplayService.java @@ -473,6 +473,20 @@ public final class ColorDisplayService extends SystemService { onDisplayColorModeChanged(getColorModeInternal()); } + private boolean isAccessiblityDaltonizerEnabled() { + return Secure.getIntForUser(getContext().getContentResolver(), + Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED, 0, mCurrentUser) != 0; + } + + private boolean isAccessiblityInversionEnabled() { + return Secure.getIntForUser(getContext().getContentResolver(), + Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED, 0, mCurrentUser) != 0; + } + + private boolean isAccessibilityEnabled() { + return isAccessiblityDaltonizerEnabled() || isAccessiblityInversionEnabled(); + } + /** * Apply the accessibility daltonizer transform based on the settings value. */ @@ -480,11 +494,10 @@ public final class ColorDisplayService extends SystemService { if (mCurrentUser == UserHandle.USER_NULL) { return; } - final boolean enabled = Secure.getIntForUser(getContext().getContentResolver(), - Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED, 0, mCurrentUser) != 0; - final int daltonizerMode = enabled ? Secure.getIntForUser(getContext().getContentResolver(), - Secure.ACCESSIBILITY_DISPLAY_DALTONIZER, - AccessibilityManager.DALTONIZER_CORRECT_DEUTERANOMALY, mCurrentUser) + final int daltonizerMode = isAccessiblityDaltonizerEnabled() + ? Secure.getIntForUser(getContext().getContentResolver(), + Secure.ACCESSIBILITY_DISPLAY_DALTONIZER, + AccessibilityManager.DALTONIZER_CORRECT_DEUTERANOMALY, mCurrentUser) : AccessibilityManager.DALTONIZER_DISABLED; final DisplayTransformManager dtm = getLocalService(DisplayTransformManager.class); @@ -506,11 +519,9 @@ public final class ColorDisplayService extends SystemService { if (mCurrentUser == UserHandle.USER_NULL) { return; } - final boolean enabled = Secure.getIntForUser(getContext().getContentResolver(), - Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED, 0, mCurrentUser) != 0; final DisplayTransformManager dtm = getLocalService(DisplayTransformManager.class); dtm.setColorMatrix(DisplayTransformManager.LEVEL_COLOR_MATRIX_INVERT_COLOR, - enabled ? MATRIX_INVERT_COLOR : null); + isAccessiblityInversionEnabled() ? MATRIX_INVERT_COLOR : null); } /** @@ -598,6 +609,7 @@ public final class ColorDisplayService extends SystemService { boolean oldActivated = mDisplayWhiteBalanceTintController.isActivated(); mDisplayWhiteBalanceTintController.setActivated(isDisplayWhiteBalanceSettingEnabled() && !mNightDisplayTintController.isActivated() + && !isAccessibilityEnabled() && DisplayTransformManager.needsLinearColorMatrix()); boolean activated = mDisplayWhiteBalanceTintController.isActivated(); @@ -761,10 +773,7 @@ public final class ColorDisplayService extends SystemService { private @ColorMode int getColorModeInternal() { final ContentResolver cr = getContext().getContentResolver(); - if (Secure.getIntForUser(cr, Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED, - 0, mCurrentUser) == 1 - || Secure.getIntForUser(cr, Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED, - 0, mCurrentUser) == 1) { + if (isAccessibilityEnabled()) { // There are restrictions on the available color modes combined with a11y transforms. if (isColorModeAvailable(COLOR_MODE_SATURATED)) { return COLOR_MODE_SATURATED; diff --git a/services/core/java/com/android/server/display/color/DisplayWhiteBalanceTintController.java b/services/core/java/com/android/server/display/color/DisplayWhiteBalanceTintController.java index 97c9c7939129..d2c6cd9f1007 100644 --- a/services/core/java/com/android/server/display/color/DisplayWhiteBalanceTintController.java +++ b/services/core/java/com/android/server/display/color/DisplayWhiteBalanceTintController.java @@ -32,6 +32,7 @@ import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import java.io.PrintWriter; +import java.lang.System; final class DisplayWhiteBalanceTintController extends TintController { @@ -39,6 +40,7 @@ final class DisplayWhiteBalanceTintController extends TintController { private static final int NUM_VALUES_PER_PRIMARY = 3; // Four colors: red, green, blue, and white private static final int NUM_DISPLAY_PRIMARIES_VALS = 4 * NUM_VALUES_PER_PRIMARY; + private static final int COLORSPACE_MATRIX_LENGTH = 9; private final Object mLock = new Object(); @VisibleForTesting @@ -46,14 +48,16 @@ final class DisplayWhiteBalanceTintController extends TintController { @VisibleForTesting int mTemperatureMax; private int mTemperatureDefault; - private float[] mDisplayNominalWhiteXYZ = new float[NUM_VALUES_PER_PRIMARY]; + @VisibleForTesting + float[] mDisplayNominalWhiteXYZ = new float[NUM_VALUES_PER_PRIMARY]; @VisibleForTesting ColorSpace.Rgb mDisplayColorSpaceRGB; private float[] mChromaticAdaptationMatrix; @VisibleForTesting int mCurrentColorTemperature; private float[] mCurrentColorTemperatureXYZ; - private boolean mSetUp = false; + @VisibleForTesting + boolean mSetUp = false; private float[] mMatrixDisplayWhiteBalance = new float[16]; private Boolean mIsAvailable; @@ -73,6 +77,16 @@ final class DisplayWhiteBalanceTintController extends TintController { } } + // Make sure display color space is valid + if (!isColorMatrixValid(displayColorSpaceRGB.getTransform())) { + Slog.e(ColorDisplayService.TAG, "Invalid display color space RGB-to-XYZ transform"); + return; + } + if (!isColorMatrixValid(displayColorSpaceRGB.getInverseTransform())) { + Slog.e(ColorDisplayService.TAG, "Invalid display color space XYZ-to-RGB transform"); + return; + } + final String[] nominalWhiteValues = res.getStringArray( R.array.config_displayWhiteBalanceDisplayNominalWhite); float[] displayNominalWhiteXYZ = new float[NUM_VALUES_PER_PRIMARY]; @@ -157,11 +171,16 @@ final class DisplayWhiteBalanceTintController extends TintController { final float adaptedMaxG = result[1] + result[4] + result[7]; final float adaptedMaxB = result[2] + result[5] + result[8]; final float denum = Math.max(Math.max(adaptedMaxR, adaptedMaxG), adaptedMaxB); + + Matrix.setIdentityM(mMatrixDisplayWhiteBalance, 0); for (int i = 0; i < result.length; i++) { result[i] /= denum; + if (!isColorMatrixCoeffValid(result[i])) { + Slog.e(ColorDisplayService.TAG, "Invalid DWB color matrix"); + return; + } } - Matrix.setIdentityM(mMatrixDisplayWhiteBalance, 0); java.lang.System.arraycopy(result, 0, mMatrixDisplayWhiteBalance, 0, 3); java.lang.System.arraycopy(result, 3, mMatrixDisplayWhiteBalance, 4, 3); java.lang.System.arraycopy(result, 6, mMatrixDisplayWhiteBalance, 8, 3); @@ -277,4 +296,27 @@ final class DisplayWhiteBalanceTintController extends TintController { return makeRgbColorSpaceFromXYZ(displayRedGreenBlueXYZ, displayWhiteXYZ); } + + private boolean isColorMatrixCoeffValid(float coeff) { + if (Float.isNaN(coeff) || Float.isInfinite(coeff)) { + return false; + } + + return true; + } + + private boolean isColorMatrixValid(float[] matrix) { + if (matrix == null || matrix.length != COLORSPACE_MATRIX_LENGTH) { + return false; + } + + for (int i = 0; i < matrix.length; i++) { + if (!isColorMatrixCoeffValid(matrix[i])) { + return false; + } + } + + return true; + } + } diff --git a/services/core/java/com/android/server/location/GnssLocationProvider.java b/services/core/java/com/android/server/location/GnssLocationProvider.java index 44228eec8e94..5f1f20294bc1 100644 --- a/services/core/java/com/android/server/location/GnssLocationProvider.java +++ b/services/core/java/com/android/server/location/GnssLocationProvider.java @@ -1597,8 +1597,7 @@ public class GnssLocationProvider extends AbstractLocationProvider implements private void reportGnssServiceDied() { if (DEBUG) Log.d(TAG, "reportGnssServiceDied"); mHandler.post(() -> { - class_init_native(); - setupNativeGnssService(); + setupNativeGnssService(/* reinitializeGnssServiceHandle = */ true); if (isEnabled()) { synchronized (mLock) { mEnabled = false; @@ -2052,7 +2051,8 @@ public class GnssLocationProvider extends AbstractLocationProvider implements * this handler. */ private void handleInitialize() { - setupNativeGnssService(); + // class_init_native() already initializes the GNSS service handle during class loading. + setupNativeGnssService(/* reinitializeGnssServiceHandle = */ false); if (native_is_gnss_visibility_control_supported()) { mGnssVisibilityControl = new GnssVisibilityControl(mContext, mLooper); @@ -2214,8 +2214,8 @@ public class GnssLocationProvider extends AbstractLocationProvider implements pw.append(s); } - private void setupNativeGnssService() { - native_init_once(); + private void setupNativeGnssService(boolean reinitializeGnssServiceHandle) { + native_init_once(reinitializeGnssServiceHandle); /* * A cycle of native_init() and native_cleanup() is needed so that callbacks are @@ -2244,7 +2244,7 @@ public class GnssLocationProvider extends AbstractLocationProvider implements private static native boolean native_is_gnss_visibility_control_supported(); - private static native void native_init_once(); + private static native void native_init_once(boolean reinitializeGnssServiceHandle); private native boolean native_init(); diff --git a/services/core/java/com/android/server/om/DumpState.java b/services/core/java/com/android/server/om/DumpState.java new file mode 100644 index 000000000000..1e2e054bbc6c --- /dev/null +++ b/services/core/java/com/android/server/om/DumpState.java @@ -0,0 +1,63 @@ +/* + * 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.server.om; + +import android.annotation.Nullable; +import android.annotation.UserIdInt; +import android.os.UserHandle; + +/** + * State for dumps performed by the OverlayManagerService. + */ +public final class DumpState { + @UserIdInt private int mUserId = UserHandle.USER_ALL; + @Nullable private String mPackageName; + @Nullable private String mField; + private boolean mVerbose; + + /** Sets the user to dump the state for */ + public void setUserId(@UserIdInt int userId) { + mUserId = userId; + } + @UserIdInt public int getUserId() { + return mUserId; + } + + /** Sets the name of the package to dump the state for */ + public void setPackageName(String packageName) { + mPackageName = packageName; + } + @Nullable public String getPackageName() { + return mPackageName; + } + + /** Sets the name of the field to dump the state of */ + public void setField(String field) { + mField = field; + } + @Nullable public String getField() { + return mField; + } + + /** Enables verbose dump state */ + public void setVerbose(boolean verbose) { + mVerbose = verbose; + } + public boolean isVerbose() { + return mVerbose; + } +} diff --git a/services/core/java/com/android/server/om/OverlayManagerService.java b/services/core/java/com/android/server/om/OverlayManagerService.java index 209ccdae75d0..da69986cd59f 100644 --- a/services/core/java/com/android/server/om/OverlayManagerService.java +++ b/services/core/java/com/android/server/om/OverlayManagerService.java @@ -749,15 +749,77 @@ public final class OverlayManagerService extends SystemService { } @Override - protected void dump(@NonNull final FileDescriptor fd, @NonNull final PrintWriter pw, - @NonNull final String[] argv) { - enforceDumpPermission("dump"); - - final boolean verbose = argv.length > 0 && "--verbose".equals(argv[0]); + protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) { + final DumpState dumpState = new DumpState(); + dumpState.setUserId(UserHandle.getUserId(Binder.getCallingUid())); + + int opti = 0; + while (opti < args.length) { + final String opt = args[opti]; + if (opt == null || opt.length() <= 0 || opt.charAt(0) != '-') { + break; + } + opti++; + + if ("-h".equals(opt)) { + pw.println("dump [-h] [--verbose] [--user USER_ID] [[FIELD] PACKAGE]"); + pw.println(" Print debugging information about the overlay manager."); + pw.println(" With optional parameter PACKAGE, limit output to the specified"); + pw.println(" package. With optional parameter FIELD, limit output to"); + pw.println(" the value of that SettingsItem field. Field names are"); + pw.println(" case insensitive and out.println the m prefix can be omitted,"); + pw.println(" so the following are equivalent: mState, mstate, State, state."); + return; + } else if ("--user".equals(opt)) { + opti++; + if (opti >= args.length) { + pw.println("Error: user missing argument"); + return; + } + try { + dumpState.setUserId(Integer.parseInt(args[opti])); + } catch (NumberFormatException e) { + pw.println("Error: user argument is not a number: " + args[opti]); + return; + } + } else if ("--verbose".equals(opt)) { + dumpState.setVerbose(true); + } else { + pw.println("Unknown argument: " + opt + "; use -h for help"); + } + } + if (opti < args.length) { + final String arg = args[opti]; + opti++; + switch (arg) { + case "packagename": + case "userid": + case "targetpackagename": + case "targetoverlayablename": + case "basecodepath": + case "state": + case "isenabled": + case "isstatic": + case "priority": + case "category": + dumpState.setField(arg); + break; + default: + dumpState.setPackageName(arg); + break; + } + } + if (dumpState.getPackageName() == null && opti < args.length) { + dumpState.setPackageName(args[opti]); + opti++; + } + enforceDumpPermission("dump"); synchronized (mLock) { - mImpl.onDump(pw); - mPackageManager.dump(pw, verbose); + mImpl.dump(pw, dumpState); + if (dumpState.getPackageName() == null) { + mPackageManager.dump(pw, dumpState); + } } } @@ -1046,10 +1108,10 @@ public final class OverlayManagerService extends SystemService { private static final String TAB1 = " "; private static final String TAB2 = TAB1 + TAB1; - public void dump(@NonNull final PrintWriter pw, final boolean verbose) { + public void dump(@NonNull final PrintWriter pw, @NonNull DumpState dumpState) { pw.println("PackageInfo cache"); - if (!verbose) { + if (!dumpState.isVerbose()) { int count = 0; final int n = mCache.size(); for (int i = 0; i < n; i++) { diff --git a/services/core/java/com/android/server/om/OverlayManagerServiceImpl.java b/services/core/java/com/android/server/om/OverlayManagerServiceImpl.java index 092dbc817e32..6f28675d051b 100644 --- a/services/core/java/com/android/server/om/OverlayManagerServiceImpl.java +++ b/services/core/java/com/android/server/om/OverlayManagerServiceImpl.java @@ -636,9 +636,11 @@ final class OverlayManagerServiceImpl { return true; } - void onDump(@NonNull final PrintWriter pw) { - mSettings.dump(pw); - pw.println("Default overlays: " + TextUtils.join(";", mDefaultOverlays)); + void dump(@NonNull final PrintWriter pw, @NonNull DumpState dumpState) { + mSettings.dump(pw, dumpState); + if (dumpState.getPackageName() == null) { + pw.println("Default overlays: " + TextUtils.join(";", mDefaultOverlays)); + } } @NonNull String[] getDefaultOverlayPackages() { diff --git a/services/core/java/com/android/server/om/OverlayManagerSettings.java b/services/core/java/com/android/server/om/OverlayManagerSettings.java index f35c70780db9..b7346d455319 100644 --- a/services/core/java/com/android/server/om/OverlayManagerSettings.java +++ b/services/core/java/com/android/server/om/OverlayManagerSettings.java @@ -22,6 +22,7 @@ import static com.android.server.om.OverlayManagerService.TAG; import android.annotation.NonNull; import android.annotation.Nullable; import android.content.om.OverlayInfo; +import android.os.UserHandle; import android.util.ArrayMap; import android.util.Slog; import android.util.Xml; @@ -288,35 +289,78 @@ final class OverlayManagerSettings { return true; } - void dump(@NonNull final PrintWriter p) { + void dump(@NonNull final PrintWriter p, @NonNull DumpState dumpState) { + // select items to display + Stream<SettingsItem> items = mItems.stream(); + if (dumpState.getUserId() != UserHandle.USER_ALL) { + items = items.filter(item -> item.mUserId == dumpState.getUserId()); + } + if (dumpState.getPackageName() != null) { + items = items.filter(item -> item.mPackageName.equals(dumpState.getPackageName())); + } + + // display items final IndentingPrintWriter pw = new IndentingPrintWriter(p, " "); - pw.println("Settings"); + if (dumpState.getField() != null) { + items.forEach(item -> dumpSettingsItemField(pw, item, dumpState.getField())); + } else { + items.forEach(item -> dumpSettingsItem(pw, item)); + } + } + + private void dumpSettingsItem(@NonNull final IndentingPrintWriter pw, + @NonNull final SettingsItem item) { + pw.println(item.mPackageName + ":" + item.getUserId() + " {"); pw.increaseIndent(); - if (mItems.isEmpty()) { - pw.println("<none>"); - return; - } + pw.println("mPackageName...........: " + item.mPackageName); + pw.println("mUserId................: " + item.getUserId()); + pw.println("mTargetPackageName.....: " + item.getTargetPackageName()); + pw.println("mTargetOverlayableName.: " + item.getTargetOverlayableName()); + pw.println("mBaseCodePath..........: " + item.getBaseCodePath()); + pw.println("mState.................: " + OverlayInfo.stateToString(item.getState())); + pw.println("mIsEnabled.............: " + item.isEnabled()); + pw.println("mIsStatic..............: " + item.isStatic()); + pw.println("mPriority..............: " + item.mPriority); + pw.println("mCategory..............: " + item.mCategory); + + pw.decreaseIndent(); + pw.println("}"); + } - final int n = mItems.size(); - for (int i = 0; i < n; i++) { - final SettingsItem item = mItems.get(i); - pw.println(item.mPackageName + ":" + item.getUserId() + " {"); - pw.increaseIndent(); - - pw.println("mPackageName...........: " + item.mPackageName); - pw.println("mUserId................: " + item.getUserId()); - pw.println("mTargetPackageName.....: " + item.getTargetPackageName()); - pw.println("mTargetOverlayableName.: " + item.getTargetOverlayableName()); - pw.println("mBaseCodePath..........: " + item.getBaseCodePath()); - pw.println("mState.................: " + OverlayInfo.stateToString(item.getState())); - pw.println("mIsEnabled.............: " + item.isEnabled()); - pw.println("mIsStatic..............: " + item.isStatic()); - pw.println("mPriority..............: " + item.mPriority); - pw.println("mCategory..............: " + item.mCategory); - - pw.decreaseIndent(); - pw.println("}"); + private void dumpSettingsItemField(@NonNull final IndentingPrintWriter pw, + @NonNull final SettingsItem item, @NonNull final String field) { + switch (field) { + case "packagename": + pw.println(item.mPackageName); + break; + case "userid": + pw.println(item.mUserId); + break; + case "targetpackagename": + pw.println(item.mTargetPackageName); + break; + case "targetoverlayablename": + pw.println(item.mTargetOverlayableName); + break; + case "basecodepath": + pw.println(item.mBaseCodePath); + break; + case "state": + pw.println(OverlayInfo.stateToString(item.mState)); + break; + case "isenabled": + pw.println(item.mIsEnabled); + break; + case "isstatic": + pw.println(item.mIsStatic); + break; + case "priority": + pw.println(item.mPriority); + break; + case "category": + pw.println(item.mCategory); + break; } } diff --git a/services/core/java/com/android/server/om/OverlayManagerShellCommand.java b/services/core/java/com/android/server/om/OverlayManagerShellCommand.java index e2b1cba3819f..7ee167adfd38 100644 --- a/services/core/java/com/android/server/om/OverlayManagerShellCommand.java +++ b/services/core/java/com/android/server/om/OverlayManagerShellCommand.java @@ -77,13 +77,17 @@ final class OverlayManagerShellCommand extends ShellCommand { out.println("Overlay manager (overlay) commands:"); out.println(" help"); out.println(" Print this help text."); - out.println(" dump [--verbose] [--user USER_ID] [PACKAGE [PACKAGE [...]]]"); + out.println(" dump [--verbose] [--user USER_ID] [[FIELD] PACKAGE]"); out.println(" Print debugging information about the overlay manager."); - out.println(" list [--user USER_ID] [PACKAGE [PACKAGE [...]]]"); + out.println(" With optional parameter PACKAGE, limit output to the specified"); + out.println(" package. With optional parameter FIELD, limit output to"); + out.println(" the value of that SettingsItem field. Field names are"); + out.println(" case insensitive and out.println the m prefix can be omitted,"); + out.println(" so the following are equivalent: mState, mstate, State, state."); + out.println(" list [--user USER_ID] [PACKAGE]"); out.println(" Print information about target and overlay packages."); out.println(" Overlay packages are printed in priority order. With optional"); - out.println(" parameters PACKAGEs, limit output to the specified packages"); - out.println(" but include more information about each package."); + out.println(" parameter PACKAGE, limit output to the specified package."); out.println(" enable [--user USER_ID] PACKAGE"); out.println(" Enable overlay package PACKAGE."); out.println(" disable [--user USER_ID] PACKAGE"); @@ -116,14 +120,20 @@ final class OverlayManagerShellCommand extends ShellCommand { return 1; } } + final String packageName = getNextArg(); final Map<String, List<OverlayInfo>> allOverlays = mInterface.getAllOverlays(userId); for (final String targetPackageName : allOverlays.keySet()) { - out.println(targetPackageName); + if (targetPackageName.equals(packageName)) { + out.println(targetPackageName); + } List<OverlayInfo> overlaysForTarget = allOverlays.get(targetPackageName); final int n = overlaysForTarget.size(); for (int i = 0; i < n; i++) { final OverlayInfo oi = overlaysForTarget.get(i); + if (!targetPackageName.equals(packageName) && !oi.packageName.equals(packageName)) { + continue; + } String status; switch (oi.state) { case OverlayInfo.STATE_ENABLED_STATIC: @@ -139,7 +149,9 @@ final class OverlayManagerShellCommand extends ShellCommand { } out.println(String.format("%s %s", status, oi.packageName)); } - out.println(); + if (targetPackageName.equals(packageName)) { + out.println(); + } } return 0; } diff --git a/services/core/java/com/android/server/pm/PackageInstallerService.java b/services/core/java/com/android/server/pm/PackageInstallerService.java index e6313d9dcbe4..35f21496f2cc 100644 --- a/services/core/java/com/android/server/pm/PackageInstallerService.java +++ b/services/core/java/com/android/server/pm/PackageInstallerService.java @@ -531,16 +531,6 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements + "to use the PackageManager.INSTALL_GRANT_RUNTIME_PERMISSIONS flag"); } - // Only system components can circumvent restricted whitelisting when installing. - if ((params.installFlags - & PackageManager.INSTALL_ALL_WHITELIST_RESTRICTED_PERMISSIONS) != 0 - && mContext.checkCallingOrSelfPermission(Manifest.permission - .WHITELIST_RESTRICTED_PERMISSIONS) == PackageManager.PERMISSION_DENIED) { - throw new SecurityException("You need the " - + "android.permission.WHITELIST_RESTRICTED_PERMISSIONS permission to" - + " use the PackageManager.INSTALL_WHITELIST_RESTRICTED_PERMISSIONS flag"); - } - // Defensively resize giant app icons if (params.appIcon != null) { final ActivityManager am = (ActivityManager) mContext.getSystemService( diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index 963f49df19d0..ed83cbced49f 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -240,7 +240,6 @@ import android.os.storage.StorageManager; import android.os.storage.StorageManagerInternal; import android.os.storage.VolumeInfo; import android.os.storage.VolumeRecord; -import android.permission.PermissionManager; import android.provider.DeviceConfig; import android.provider.MediaStore; import android.provider.Settings.Global; @@ -4331,19 +4330,13 @@ public class PackageManagerService extends IPackageManager.Stub @Nullable ComponentName component, @ComponentType int componentType, int userId) { // if we're in an isolated process, get the real calling UID if (Process.isIsolated(callingUid)) { - int newCallingUid = mIsolatedOwners.get(callingUid); - PermissionManager.addPermissionDenialHint( - "callingUid=" + callingUid + " is changed to " + newCallingUid - + " as process is isolated"); - callingUid = newCallingUid; + callingUid = mIsolatedOwners.get(callingUid); } final String instantAppPkgName = getInstantAppPackageName(callingUid); final boolean callerIsInstantApp = instantAppPkgName != null; if (ps == null) { if (callerIsInstantApp) { // pretend the application exists, but, needs to be filtered - PermissionManager.addPermissionDenialHint( - "No package setting but caller is instant app"); return true; } return false; @@ -4355,7 +4348,6 @@ public class PackageManagerService extends IPackageManager.Stub if (callerIsInstantApp) { // both caller and target are both instant, but, different applications, filter if (ps.getInstantApp(userId)) { - PermissionManager.addPermissionDenialHint("Apps are different instant apps"); return true; } // request for a specific component; if it hasn't been explicitly exposed through @@ -4367,23 +4359,10 @@ public class PackageManagerService extends IPackageManager.Stub && isCallerSameApp(instrumentation.info.targetPackage, callingUid)) { return false; } - if (!isComponentVisibleToInstantApp(component, componentType)) { - PermissionManager.addPermissionDenialHint( - "Component is not visible to instant app: " - + component.flattenToShortString()); - return true; - } else { - return false; - } + return !isComponentVisibleToInstantApp(component, componentType); } // request for application; if no components have been explicitly exposed, filter - if (!ps.pkg.visibleToInstantApps) { - PermissionManager.addPermissionDenialHint( - "Package is not visible to instant app: " + ps.pkg.packageName); - return true; - } else { - return false; - } + return !ps.pkg.visibleToInstantApps; } if (ps.getInstantApp(userId)) { // caller can see all components of all instant applications, don't filter @@ -4392,19 +4371,11 @@ public class PackageManagerService extends IPackageManager.Stub } // request for a specific instant application component, filter if (component != null) { - PermissionManager.addPermissionDenialHint( - "Component is not null: " + component.flattenToShortString()); return true; } // request for an instant application; if the caller hasn't been granted access, filter - if (!mInstantAppRegistry.isInstantAccessGranted( - userId, UserHandle.getAppId(callingUid), ps.appId)) { - PermissionManager.addPermissionDenialHint( - "Instant access is not granted: " + ps.appId); - return true; - } else { - return false; - } + return !mInstantAppRegistry.isInstantAccessGranted( + userId, UserHandle.getAppId(callingUid), ps.appId); } return false; } @@ -5649,17 +5620,6 @@ public class PackageManagerService extends IPackageManager.Stub } @Override - public int checkUidPermissionWithDenialHintForwarding(String permName, int uid, - List<String> permissionDenialHints) { - List<String> prev = PermissionManager.resetPermissionDenialHints(permissionDenialHints); - try { - return checkUidPermission(permName, uid); - } finally { - PermissionManager.resetPermissionDenialHints(prev); - } - } - - @Override public int checkUidPermission(String permName, int uid) { final CheckPermissionDelegate checkPermissionDelegate; synchronized (mPackages) { @@ -11766,7 +11726,12 @@ public class PackageManagerService extends IPackageManager.Stub "Code and resource paths haven't been set correctly"); } - if (mApexManager.isApexPackage(pkg.packageName)) { + // Check that there is an APEX package with the same name only during install/first boot + // after OTA. + final boolean isUserInstall = (scanFlags & SCAN_BOOTING) == 0; + final boolean isFirstBootOrUpgrade = (scanFlags & SCAN_FIRST_BOOT_OR_UPGRADE) != 0; + if ((isUserInstall || isFirstBootOrUpgrade) + && mApexManager.isApexPackage(pkg.packageName)) { throw new PackageManagerException(INSTALL_FAILED_DUPLICATE_PACKAGE, pkg.packageName + " is an APEX package and can't be installed as an APK."); } @@ -13703,30 +13668,44 @@ public class PackageManagerService extends IPackageManager.Stub return unactionedPackages.toArray(new String[0]); } - @Override - public String[] setPackagesSuspendedAsUser(String[] packageNames, boolean suspended, - PersistableBundle appExtras, PersistableBundle launcherExtras, - SuspendDialogInfo dialogInfo, String callingPackage, int userId) { + private void enforceCanSetPackagesSuspendedAsUser(String callingPackage, int callingUid, + int userId, String callingMethod) { + if (callingUid == Process.ROOT_UID || callingUid == Process.SYSTEM_UID) { + return; + } + + final String ownerPackage = mProtectedPackages.getDeviceOwnerOrProfileOwnerPackage(userId); + if (ownerPackage != null) { + final int ownerUid = getPackageUid(ownerPackage, 0, userId); + if (ownerUid == callingUid) { + return; + } + throw new UnsupportedOperationException("Cannot suspend/unsuspend packages. User " + + userId + " has an active DO or PO"); + } + mContext.enforceCallingOrSelfPermission(android.Manifest.permission.SUSPEND_APPS, - "setPackagesSuspendedAsUser"); + callingMethod); - final int callingUid = Binder.getCallingUid(); final int packageUid = getPackageUid(callingPackage, 0, userId); - final boolean allowedCallingUid = callingUid == Process.ROOT_UID - || callingUid == Process.SYSTEM_UID; final boolean allowedPackageUid = packageUid == callingUid; final boolean allowedShell = callingUid == SHELL_UID && UserHandle.isSameApp(packageUid, callingUid); - if (!allowedCallingUid && !allowedShell && !allowedPackageUid) { + if (!allowedShell && !allowedPackageUid) { throw new SecurityException("Calling package " + callingPackage + " in user " + userId + " does not belong to calling uid " + callingUid); } - if (!PLATFORM_PACKAGE_NAME.equals(callingPackage) - && mProtectedPackages.getDeviceOwnerOrProfileOwnerPackage(userId) != null) { - throw new UnsupportedOperationException("Cannot suspend/unsuspend packages. User " - + userId + " has an active DO or PO"); - } + } + + @Override + public String[] setPackagesSuspendedAsUser(String[] packageNames, boolean suspended, + PersistableBundle appExtras, PersistableBundle launcherExtras, + SuspendDialogInfo dialogInfo, String callingPackage, int userId) { + final int callingUid = Binder.getCallingUid(); + enforceCanSetPackagesSuspendedAsUser(callingPackage, callingUid, userId, + "setPackagesSuspendedAsUser"); + if (ArrayUtils.isEmpty(packageNames)) { return packageNames; } diff --git a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java index 33dd48a1ac6a..fbf074e3ba15 100644 --- a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java +++ b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java @@ -2351,9 +2351,10 @@ class PackageManagerShellCommand extends ShellCommand { break; case "-g": sessionParams.installFlags |= PackageManager.INSTALL_GRANT_RUNTIME_PERMISSIONS; - case "-w": - sessionParams.installFlags |= - PackageManager.INSTALL_ALL_WHITELIST_RESTRICTED_PERMISSIONS; + break; + case "--restrict-permissions": + sessionParams.installFlags &= + ~PackageManager.INSTALL_ALL_WHITELIST_RESTRICTED_PERMISSIONS; break; case "--dont-kill": sessionParams.installFlags |= PackageManager.INSTALL_DONT_KILL_APP; @@ -3004,10 +3005,10 @@ class PackageManagerShellCommand extends ShellCommand { pw.println(" -d: allow version code downgrade (debuggable packages only)"); pw.println(" -p: partial application install (new split on top of existing pkg)"); pw.println(" -g: grant all runtime permissions"); - pw.println(" -w: whitelist all restricted permissions"); pw.println(" -S: size in bytes of package, required for stdin"); pw.println(" --user: install under the given user."); pw.println(" --dont-kill: installing a new feature split, don't kill running app"); + pw.println(" --restrict-permissions: don't whitelist restricted permissions at install"); pw.println(" --originating-uri: set URI where app was downloaded from"); pw.println(" --referrer: set URI that instigated the install of the app"); pw.println(" --pkg: specify expected package name of app being installed"); diff --git a/services/core/java/com/android/server/pm/ShortcutPackage.java b/services/core/java/com/android/server/pm/ShortcutPackage.java index 9782648efb6b..eec4b70880a5 100644 --- a/services/core/java/com/android/server/pm/ShortcutPackage.java +++ b/services/core/java/com/android/server/pm/ShortcutPackage.java @@ -680,20 +680,23 @@ class ShortcutPackage extends ShortcutPackageItem { final List<ShortcutManager.ShareShortcutInfo> result = new ArrayList<>(); for (int i = 0; i < shortcuts.size(); i++) { - final ShortcutInfo si = shortcuts.get(i); + final Set<String> categories = shortcuts.get(i).getCategories(); + if (categories == null || categories.isEmpty()) { + continue; + } for (int j = 0; j < matchedTargets.size(); j++) { // Shortcut must have all of share target categories boolean hasAllCategories = true; final ShareTargetInfo target = matchedTargets.get(j); for (int q = 0; q < target.mCategories.length; q++) { - if (!si.getCategories().contains(target.mCategories[q])) { + if (!categories.contains(target.mCategories[q])) { hasAllCategories = false; break; } } if (hasAllCategories) { - result.add(new ShortcutManager.ShareShortcutInfo(si, new ComponentName( - getPackageName(), target.mTargetClass))); + result.add(new ShortcutManager.ShareShortcutInfo(shortcuts.get(i), + new ComponentName(getPackageName(), target.mTargetClass))); break; } } @@ -706,6 +709,45 @@ class ShortcutPackage extends ShortcutPackageItem { } /** + * Returns the number of shortcuts that can be used as a share target in the ShareSheet. Such + * shortcuts must have a matching category with at least one of the defined ShareTargets from + * the app's Xml resource. + */ + int getSharingShortcutCount() { + if (mShortcuts.isEmpty() || mShareTargets.isEmpty()) { + return 0; + } + + // Get the list of all dynamic shortcuts in this package + final ArrayList<ShortcutInfo> shortcuts = new ArrayList<>(); + findAll(shortcuts, ShortcutInfo::isDynamicVisible, ShortcutInfo.CLONE_REMOVE_FOR_LAUNCHER); + + int sharingShortcutCount = 0; + for (int i = 0; i < shortcuts.size(); i++) { + final Set<String> categories = shortcuts.get(i).getCategories(); + if (categories == null || categories.isEmpty()) { + continue; + } + for (int j = 0; j < mShareTargets.size(); j++) { + // A SharingShortcut must have all of share target categories + boolean hasAllCategories = true; + final ShareTargetInfo target = mShareTargets.get(j); + for (int q = 0; q < target.mCategories.length; q++) { + if (!categories.contains(target.mCategories[q])) { + hasAllCategories = false; + break; + } + } + if (hasAllCategories) { + sharingShortcutCount++; + break; + } + } + } + return sharingShortcutCount; + } + + /** * Return the filenames (excluding path names) of icon bitmap files from this package. */ public ArraySet<String> getUsedBitmapFiles() { diff --git a/services/core/java/com/android/server/pm/ShortcutService.java b/services/core/java/com/android/server/pm/ShortcutService.java index daef4e064004..2d8a2acd575f 100644 --- a/services/core/java/com/android/server/pm/ShortcutService.java +++ b/services/core/java/com/android/server/pm/ShortcutService.java @@ -95,6 +95,7 @@ import android.view.IWindowManager; import com.android.internal.annotations.GuardedBy; import com.android.internal.annotations.VisibleForTesting; +import com.android.internal.logging.MetricsLogger; import com.android.internal.os.BackgroundThread; import com.android.internal.util.DumpUtils; import com.android.internal.util.FastXmlSerializer; @@ -413,6 +414,9 @@ public class ShortcutService extends IShortcutService.Stub { @GuardedBy("mLock") private Exception mLastWtfStacktrace; + @GuardedBy("mLock") + private final MetricsLogger mMetricsLogger = new MetricsLogger(); + static class InvalidFileFormatException extends Exception { public InvalidFileFormatException(String message, Throwable cause) { super(message, cause); @@ -981,6 +985,8 @@ public class ShortcutService extends IShortcutService.Stub { Slog.e(TAG, "Failed to write to file " + file.getBaseFile(), e); file.failWrite(os); } + + getUserShortcutsLocked(userId).logSharingShortcutStats(mMetricsLogger); } @GuardedBy("mLock") diff --git a/services/core/java/com/android/server/pm/ShortcutUser.java b/services/core/java/com/android/server/pm/ShortcutUser.java index 1fd9b69e521d..8c207a8e1a6f 100644 --- a/services/core/java/com/android/server/pm/ShortcutUser.java +++ b/services/core/java/com/android/server/pm/ShortcutUser.java @@ -20,6 +20,7 @@ import android.annotation.Nullable; import android.annotation.UserIdInt; import android.content.ComponentName; import android.content.pm.ShortcutManager; +import android.metrics.LogMaker; import android.text.TextUtils; import android.text.format.Formatter; import android.util.ArrayMap; @@ -27,6 +28,8 @@ import android.util.Log; import android.util.Slog; import com.android.internal.annotations.VisibleForTesting; +import com.android.internal.logging.MetricsLogger; +import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.internal.util.Preconditions; import com.android.server.pm.ShortcutService.DumpFilter; import com.android.server.pm.ShortcutService.InvalidFileFormatException; @@ -647,4 +650,23 @@ class ShortcutUser { return result; } + + void logSharingShortcutStats(MetricsLogger logger) { + int packageWithShareTargetsCount = 0; + int totalSharingShortcutCount = 0; + for (int i = 0; i < mPackages.size(); i++) { + if (mPackages.valueAt(i).hasShareTargets()) { + packageWithShareTargetsCount++; + totalSharingShortcutCount += mPackages.valueAt(i).getSharingShortcutCount(); + } + } + + final LogMaker logMaker = new LogMaker(MetricsEvent.ACTION_SHORTCUTS_CHANGED); + logger.write(logMaker.setType(MetricsEvent.SHORTCUTS_CHANGED_USER_ID) + .setSubtype(mUserId)); + logger.write(logMaker.setType(MetricsEvent.SHORTCUTS_CHANGED_PACKAGE_COUNT) + .setSubtype(packageWithShareTargetsCount)); + logger.write(logMaker.setType(MetricsEvent.SHORTCUTS_CHANGED_SHORTCUT_COUNT) + .setSubtype(totalSharingShortcutCount)); + } } 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 e0256460042a..4fdf1bc58e05 100644 --- a/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java +++ b/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java @@ -1134,7 +1134,7 @@ public final class DefaultPermissionGrantPolicy { private void grantRuntimePermissions(PackageInfo pkg, Set<String> permissionsWithoutSplits, boolean systemFixed, boolean ignoreSystemPackage, boolean whitelistRestrictedPermissions, int userId) { - UserHandle user = UserHandle.of(userId); + UserHandle user = UserHandle.of(userId); if (pkg == null) { return; } @@ -1203,7 +1203,7 @@ public final class DefaultPermissionGrantPolicy { if (ArrayUtils.isEmpty(disabledPkg.requestedPermissions)) { return; } - if (!requestedPermissions.equals(disabledPkg.requestedPermissions)) { + if (!Arrays.equals(requestedPermissions, disabledPkg.requestedPermissions)) { grantablePermissions = new ArraySet<>(Arrays.asList(requestedPermissions)); requestedPermissions = disabledPkg.requestedPermissions; } @@ -1213,7 +1213,7 @@ public final class DefaultPermissionGrantPolicy { final int numRequestedPermissions = requestedPermissions.length; // Sort requested permissions so that all permissions that are a foreground permission (i.e. - // permisions that have background permission) are before their background permissions. + // permissions that have a background permission) are before their background permissions. final String[] sortedRequestedPermissions = new String[numRequestedPermissions]; int numForeground = 0; int numOther = 0; @@ -1258,9 +1258,16 @@ public final class DefaultPermissionGrantPolicy { continue; } - int uid = UserHandle.getUid(userId, - UserHandle.getAppId(pkg.applicationInfo.uid)); - String op = AppOpsManager.permissionToOp(permission); + // Preserve whitelisting flags. + newFlags |= (flags & PackageManager.FLAGS_PERMISSION_RESTRICTION_ANY_EXEMPT); + + // If we are whitelisting the permission, update the exempt flag before grant. + if (whitelistRestrictedPermissions && isPermissionRestricted(permission)) { + mContext.getPackageManager().updatePermissionFlags(permission, + pkg.packageName, + PackageManager.FLAG_PERMISSION_RESTRICTION_SYSTEM_EXEMPT, + PackageManager.FLAG_PERMISSION_RESTRICTION_SYSTEM_EXEMPT, user); + } if (pm.checkPermission(permission, pkg.packageName) != PackageManager.PERMISSION_GRANTED) { @@ -1268,13 +1275,12 @@ public final class DefaultPermissionGrantPolicy { .grantRuntimePermission(pkg.packageName, permission, user); } - if (whitelistRestrictedPermissions && isPermissionRestricted(permission)) { - newFlags |= PackageManager.FLAG_PERMISSION_RESTRICTION_SYSTEM_EXEMPT; - } - mContext.getPackageManager().updatePermissionFlags(permission, pkg.packageName, newFlags, newFlags, user); + int uid = UserHandle.getUid(userId, + UserHandle.getAppId(pkg.applicationInfo.uid)); + List<String> fgPerms = mPermissionManager.getBackgroundPermissions() .get(permission); if (fgPerms != null) { @@ -1285,6 +1291,7 @@ public final class DefaultPermissionGrantPolicy { if (pm.checkPermission(fgPerm, pkg.packageName) == PackageManager.PERMISSION_GRANTED) { // Upgrade the app-op state of the fg permission to allow bg access + // TODO: Dont' call app ops from package manager code. mContext.getSystemService(AppOpsManager.class).setUidMode( AppOpsManager.permissionToOp(fgPerm), uid, AppOpsManager.MODE_ALLOWED); @@ -1295,8 +1302,10 @@ public final class DefaultPermissionGrantPolicy { } String bgPerm = getBackgroundPermission(permission); + String op = AppOpsManager.permissionToOp(permission); if (bgPerm == null) { if (op != null) { + // TODO: Dont' call app ops from package manager code. mContext.getSystemService(AppOpsManager.class).setUidMode(op, uid, AppOpsManager.MODE_ALLOWED); } diff --git a/services/core/java/com/android/server/pm/permission/PermissionManagerService.java b/services/core/java/com/android/server/pm/permission/PermissionManagerService.java index 448e595014bc..37c1aaa45b8b 100644 --- a/services/core/java/com/android/server/pm/permission/PermissionManagerService.java +++ b/services/core/java/com/android/server/pm/permission/PermissionManagerService.java @@ -32,7 +32,6 @@ import static android.content.pm.PackageManager.FLAG_PERMISSION_WHITELIST_INSTAL import static android.content.pm.PackageManager.FLAG_PERMISSION_WHITELIST_SYSTEM; import static android.content.pm.PackageManager.FLAG_PERMISSION_WHITELIST_UPGRADE; import static android.content.pm.PackageManager.MASK_PERMISSION_FLAGS_ALL; -import static android.content.pm.PackageManager.RESTRICTED_PERMISSIONS_ENABLED; import static android.os.Trace.TRACE_TAG_PACKAGE_MANAGER; import static com.android.server.pm.PackageManagerService.DEBUG_INSTALL; @@ -333,22 +332,15 @@ public class PermissionManagerService { mPackageManagerInt.getInstantAppPackageName(uid) != null; final int userId = UserHandle.getUserId(uid); if (!mUserManagerInt.exists(userId)) { - PermissionManager.addPermissionDenialHint("User does not exist. userId=" + userId); return PackageManager.PERMISSION_DENIED; } if (pkg != null) { if (pkg.mSharedUserId != null) { if (isCallerInstantApp) { - PermissionManager.addPermissionDenialHint( - "Caller is instant app. Pkg is shared. callingUid=" + callingUid - + " pkg=" + pkg.packageName); return PackageManager.PERMISSION_DENIED; } } else if (mPackageManagerInt.filterAppAccess(pkg, callingUid, callingUserId)) { - PermissionManager.addPermissionDenialHint( - "Access is filtered. pkg=" + pkg + " callingUid=" + callingUid - + " callingUserId=" + callingUserId); return PackageManager.PERMISSION_DENIED; } final PermissionsState permissionsState = @@ -358,8 +350,6 @@ public class PermissionManagerService { if (mSettings.isPermissionInstant(permName)) { return PackageManager.PERMISSION_GRANTED; } - PermissionManager.addPermissionDenialHint( - "Caller instant app, but perm is not instant"); } else { return PackageManager.PERMISSION_GRANTED; } @@ -367,7 +357,6 @@ public class PermissionManagerService { if (isImpliedPermissionGranted(permissionsState, permName, userId)) { return PackageManager.PERMISSION_GRANTED; } - PermissionManager.addPermissionDenialHint("Does not have permission " + permName); } else { ArraySet<String> perms = mSystemPermissions.get(uid); if (perms != null) { @@ -379,8 +368,6 @@ public class PermissionManagerService { return PackageManager.PERMISSION_GRANTED; } } - PermissionManager.addPermissionDenialHint( - "System permissions do not contain " + permName); } return PackageManager.PERMISSION_DENIED; } @@ -1070,8 +1057,8 @@ public class PermissionManagerService { boolean wasChanged = false; - boolean restrictionExempt = !RESTRICTED_PERMISSIONS_ENABLED - || (origPermissions.getPermissionFlags(bp.name, userId) + boolean restrictionExempt = + (origPermissions.getPermissionFlags(bp.name, userId) & FLAGS_PERMISSION_RESTRICTION_ANY_EXEMPT) != 0; boolean restrictionApplied = (origPermissions.getPermissionFlags( bp.name, userId) & FLAG_PERMISSION_APPLY_RESTRICTION) != 0; @@ -1189,8 +1176,8 @@ public class PermissionManagerService { for (int userId : currentUserIds) { boolean wasChanged = false; - boolean restrictionExempt = !RESTRICTED_PERMISSIONS_ENABLED - || (origPermissions.getPermissionFlags(bp.name, userId) + boolean restrictionExempt = + (origPermissions.getPermissionFlags(bp.name, userId) & FLAGS_PERMISSION_RESTRICTION_ANY_EXEMPT) != 0; boolean restrictionApplied = (origPermissions.getPermissionFlags( bp.name, userId) & FLAG_PERMISSION_APPLY_RESTRICTION) != 0; @@ -2066,7 +2053,7 @@ public class PermissionManagerService { return; } - if (RESTRICTED_PERMISSIONS_ENABLED && bp.isHardOrSoftRestricted() + if (bp.isHardOrSoftRestricted() && (flags & PackageManager.FLAGS_PERMISSION_RESTRICTION_ANY_EXEMPT) == 0) { Log.e(TAG, "Cannot grant restricted non-exempt permission " + permName + " for package " + packageName); diff --git a/services/core/java/com/android/server/policy/PermissionPolicyService.java b/services/core/java/com/android/server/policy/PermissionPolicyService.java index a280d83fac27..250f3313e3c4 100644 --- a/services/core/java/com/android/server/policy/PermissionPolicyService.java +++ b/services/core/java/com/android/server/policy/PermissionPolicyService.java @@ -326,8 +326,8 @@ public final class PermissionPolicyService extends SystemService { return; } - final boolean applyRestriction = PackageManager.RESTRICTED_PERMISSIONS_ENABLED - && (mPackageManager.getPermissionFlags(permission, pkg.packageName, + final boolean applyRestriction = + (mPackageManager.getPermissionFlags(permission, pkg.packageName, mContext.getUser()) & FLAG_PERMISSION_APPLY_RESTRICTION) != 0; if (permissionInfo.isHardRestricted()) { diff --git a/services/core/java/com/android/server/wm/ActivityMetricsLogger.java b/services/core/java/com/android/server/wm/ActivityMetricsLogger.java index 9decb58aff2e..feef5e27d26a 100644 --- a/services/core/java/com/android/server/wm/ActivityMetricsLogger.java +++ b/services/core/java/com/android/server/wm/ActivityMetricsLogger.java @@ -326,7 +326,7 @@ class ActivityMetricsLogger { intent)); } - if (!isAnyTransitionActive()) { + if (mCurrentTransitionStartTime == INVALID_START_TIME) { mCurrentTransitionStartTime = SystemClock.uptimeMillis(); mLastTransitionStartTime = mCurrentTransitionStartTime; diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java index 802683a67f80..39eda044a5b3 100644 --- a/services/core/java/com/android/server/wm/ActivityRecord.java +++ b/services/core/java/com/android/server/wm/ActivityRecord.java @@ -2322,7 +2322,9 @@ final class ActivityRecord extends ConfigurationContainer { return; } - if (configChanges == 0 && mAppWindowToken.okToDisplay()) { + // Window configuration changes only effect windows, so don't require a screen freeze. + int freezableConfigChanges = configChanges & ~(CONFIG_WINDOW_CONFIGURATION); + if (freezableConfigChanges == 0 && mAppWindowToken.okToDisplay()) { if (DEBUG_ORIENTATION) Slog.v(TAG_WM, "Skipping set freeze of " + appToken); return; } diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java index 4a6aa336e36f..b234bc6f77c3 100644 --- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java +++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java @@ -141,6 +141,7 @@ import android.app.IActivityTaskManager; import android.app.IApplicationThread; import android.app.IAssistDataReceiver; import android.app.INotificationManager; +import android.app.IRequestFinishCallback; import android.app.ITaskStackListener; import android.app.Notification; import android.app.NotificationManager; @@ -2288,6 +2289,32 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { } } + @Override + public void onBackPressedOnTaskRoot(IBinder token, IRequestFinishCallback callback) { + synchronized (mGlobalLock) { + ActivityRecord r = ActivityRecord.isInStackLocked(token); + if (r == null) { + return; + } + ActivityStack stack = r.getActivityStack(); + if (stack != null && stack.isSingleTaskInstance()) { + // Single-task stacks are used for activities which are presented in floating + // windows above full screen activities. Instead of directly finishing the + // task, a task change listener is used to notify SystemUI so the action can be + // handled specially. + final TaskRecord task = r.getTaskRecord(); + mTaskChangeNotificationController + .notifyBackPressedOnTaskRoot(task.getTaskInfo()); + } else { + try { + callback.requestFinish(); + } catch (RemoteException e) { + Slog.e(TAG, "Failed to invoke request finish callback", e); + } + } + } + } + /** * TODO: Add mController hook */ diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java index 649949701419..fd90f0339e63 100644 --- a/services/core/java/com/android/server/wm/AppWindowToken.java +++ b/services/core/java/com/android/server/wm/AppWindowToken.java @@ -509,6 +509,10 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree final DisplayContent displayContent = getDisplayContent(); displayContent.mOpeningApps.remove(this); displayContent.mClosingApps.remove(this); + if (isInChangeTransition()) { + clearChangeLeash(getPendingTransaction(), true /* cancel */); + } + displayContent.mChangingApps.remove(this); waitingToShow = false; hiddenRequested = !visible; mDeferHidingClient = deferHidingClient; @@ -1310,7 +1314,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree void onDisplayChanged(DisplayContent dc) { DisplayContent prevDc = mDisplayContent; super.onDisplayChanged(dc); - if (prevDc == null) { + if (prevDc == null || prevDc == mDisplayContent) { return; } if (prevDc.mChangingApps.contains(this)) { @@ -1333,7 +1337,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree } } - if (prevDc != mDisplayContent && mLetterbox != null) { + if (mLetterbox != null) { mLetterbox.onMovedToDisplay(mDisplayContent.getDisplayId()); } } diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java index b6295e194aac..b8504db8e810 100644 --- a/services/core/java/com/android/server/wm/DisplayPolicy.java +++ b/services/core/java/com/android/server/wm/DisplayPolicy.java @@ -70,6 +70,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER; import static android.view.WindowManager.LayoutParams.TYPE_DREAM; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_CONSUMER; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD; +import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG; import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR; import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL; import static android.view.WindowManager.LayoutParams.TYPE_SCREENSHOT; @@ -2007,7 +2008,8 @@ public class DisplayPolicy { pf.set(displayFrames.mOverscan); } else if ((sysUiFl & SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION) != 0 && (type >= FIRST_APPLICATION_WINDOW && type <= LAST_SUB_WINDOW - || type == TYPE_VOLUME_OVERLAY)) { + || type == TYPE_VOLUME_OVERLAY + || type == TYPE_KEYGUARD_DIALOG)) { // Asking for layout as if the nav bar is hidden, lets the application // extend into the unrestricted overscan screen area. We only do this for // application windows and certain system windows to ensure no window that diff --git a/services/core/java/com/android/server/wm/TaskChangeNotificationController.java b/services/core/java/com/android/server/wm/TaskChangeNotificationController.java index 3d57219209d7..66200e39938b 100644 --- a/services/core/java/com/android/server/wm/TaskChangeNotificationController.java +++ b/services/core/java/com/android/server/wm/TaskChangeNotificationController.java @@ -53,6 +53,7 @@ class TaskChangeNotificationController { private static final int NOTIFY_ACTIVITY_LAUNCH_ON_SECONDARY_DISPLAY_FAILED_MSG = 18; private static final int NOTIFY_ACTIVITY_LAUNCH_ON_SECONDARY_DISPLAY_REROUTED_MSG = 19; private static final int NOTIFY_SIZE_COMPAT_MODE_ACTIVITY_CHANGED_MSG = 20; + private static final int NOTIFY_BACK_PRESSED_ON_TASK_ROOT = 21; // Delay in notifying task stack change listeners (in millis) private static final int NOTIFY_TASK_STACK_CHANGE_LISTENERS_DELAY = 100; @@ -92,6 +93,10 @@ class TaskChangeNotificationController { l.onTaskDescriptionChanged((RunningTaskInfo) m.obj); }; + private final TaskStackConsumer mNotifyBackPressedOnTaskRoot = (l, m) -> { + l.onBackPressedOnTaskRoot((RunningTaskInfo) m.obj); + }; + private final TaskStackConsumer mNotifyActivityRequestedOrientationChanged = (l, m) -> { l.onActivityRequestedOrientationChanged(m.arg1, m.arg2); }; @@ -225,6 +230,9 @@ class TaskChangeNotificationController { case NOTIFY_SIZE_COMPAT_MODE_ACTIVITY_CHANGED_MSG: forAllRemoteListeners(mOnSizeCompatModeActivityChanged, msg); break; + case NOTIFY_BACK_PRESSED_ON_TASK_ROOT: + forAllRemoteListeners(mNotifyBackPressedOnTaskRoot, msg); + break; } } } @@ -458,4 +466,15 @@ class TaskChangeNotificationController { forAllLocalListeners(mOnSizeCompatModeActivityChanged, msg); msg.sendToTarget(); } + + /** + * Notify listeners that an activity received a back press when there are no other activities + * in the back stack. + */ + void notifyBackPressedOnTaskRoot(TaskInfo taskInfo) { + final Message msg = mHandler.obtainMessage(NOTIFY_BACK_PRESSED_ON_TASK_ROOT, + taskInfo); + forAllLocalListeners(mNotifyBackPressedOnTaskRoot, msg); + msg.sendToTarget(); + } } diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index eac771639688..088d2f0fd288 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -137,6 +137,7 @@ import android.database.ContentObserver; import android.graphics.Bitmap; import android.graphics.Insets; import android.graphics.Matrix; +import android.graphics.PixelFormat; import android.graphics.Point; import android.graphics.Rect; import android.graphics.RectF; @@ -2604,9 +2605,11 @@ public class WindowManagerService extends IWindowManager.Stub final AppWindowToken wtoken = mRoot.getAppWindowToken(token); if (wtoken != null) { final WindowState win = wtoken.findMainWindow(); - if (win != null) { - win.mWinAnimator.setOpaqueLocked(isOpaque); + if (win == null) { + return; } + isOpaque = isOpaque & !PixelFormat.formatHasAlpha(win.getAttrs().format); + win.mWinAnimator.setOpaqueLocked(isOpaque); } } @@ -6828,9 +6831,26 @@ public class WindowManagerService extends IWindowManager.Stub return; } + int lastWindowingMode = displayContent.getWindowingMode(); mDisplayWindowSettings.setWindowingModeLocked(displayContent, mode); reconfigureDisplayLocked(displayContent); + + if (lastWindowingMode != displayContent.getWindowingMode()) { + // reconfigure won't detect this change in isolation because the windowing mode is + // already set on the display, so fire off a new config now. + mH.removeMessages(H.SEND_NEW_CONFIGURATION); + + final long origId = Binder.clearCallingIdentity(); + try { + // direct call since lock is shared. + sendNewConfiguration(displayId); + } finally { + Binder.restoreCallingIdentity(origId); + } + // Now that all configurations are updated, execute pending transitions + displayContent.executeAppTransition(); + } } } @@ -7415,8 +7435,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public boolean shouldShowIme(int displayId) { synchronized (mGlobalLock) { - final DisplayContent displayContent = mRoot.getDisplayContent(displayId); - return mDisplayWindowSettings.shouldShowImeLocked(displayContent); + return WindowManagerService.this.shouldShowIme(displayId); } } } diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index 3834d57c3525..dd3c6004dcad 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -1078,7 +1078,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP + mRequestedWidth + ", mRequestedheight=" + mRequestedHeight + ") to" + " (pw=" + pw + ", ph=" + ph + "): frame=" + mWindowFrames.mFrame.toShortString() - + " " + mWindowFrames.getInsetsInfo()); + + " " + mWindowFrames.getInsetsInfo() + + " " + mAttrs.getTitle()); } // TODO: Look into whether this override is still necessary. diff --git a/services/core/jni/com_android_server_location_GnssLocationProvider.cpp b/services/core/jni/com_android_server_location_GnssLocationProvider.cpp index 89a1ec8507d6..da175792268f 100644 --- a/services/core/jni/com_android_server_location_GnssLocationProvider.cpp +++ b/services/core/jni/com_android_server_location_GnssLocationProvider.cpp @@ -1495,7 +1495,8 @@ struct GnssBatchingCallback_V2_0 : public IGnssBatchingCallback_V2_0 { } }; -static void android_location_GnssLocationProvider_class_init_native(JNIEnv* env, jclass clazz) { +/* Initializes the GNSS service handle. */ +static void android_location_GnssLocationProvider_set_gps_service_handle() { gnssHal_V2_0 = IGnss_V2_0::getService(); if (gnssHal_V2_0 != nullptr) { gnssHal = gnssHal_V2_0; @@ -1514,7 +1515,12 @@ static void android_location_GnssLocationProvider_class_init_native(JNIEnv* env, gnssHal = IGnss_V1_0::getService(); } -static void android_location_GnssLocationProvider_init_once(JNIEnv* env, jclass clazz) { +/* One time initialization at system boot */ +static void android_location_GnssLocationProvider_class_init_native(JNIEnv* env, jclass clazz) { + // Initialize the top level gnss HAL handle. + android_location_GnssLocationProvider_set_gps_service_handle(); + + // Cache methodIDs and class IDs. method_reportLocation = env->GetMethodID(clazz, "reportLocation", "(ZLandroid/location/Location;)V"); method_reportStatus = env->GetMethodID(clazz, "reportStatus", "(I)V"); @@ -1638,7 +1644,11 @@ static void android_location_GnssLocationProvider_init_once(JNIEnv* env, jclass (jclass) env->NewGlobalRef(gnssConfiguration_halInterfaceVersionClass); method_halInterfaceVersionCtor = env->GetMethodID(class_gnssConfiguration_halInterfaceVersion, "<init>", "(II)V"); +} +/* Initialization needed at system boot and whenever GNSS service dies. */ +static void android_location_GnssLocationProvider_init_once(JNIEnv* env, jclass clazz, + jboolean reinitializeGnssServiceHandle) { /* * Save a pointer to JVM. */ @@ -1647,6 +1657,10 @@ static void android_location_GnssLocationProvider_init_once(JNIEnv* env, jclass LOG_ALWAYS_FATAL("Unable to get Java VM. Error: %d", jvmStatus); } + if (reinitializeGnssServiceHandle) { + android_location_GnssLocationProvider_set_gps_service_handle(); + } + if (gnssHal == nullptr) { ALOGE("Unable to get GPS service\n"); return; @@ -1871,6 +1885,7 @@ static jobject android_location_GnssConfiguration_get_gnss_configuration_version return createHalInterfaceVersionJavaObject(env, major, minor); } +/* Initialization needed each time the GPS service is shutdown. */ static jboolean android_location_GnssLocationProvider_init(JNIEnv* env, jobject obj) { /* * This must be set before calling into the HAL library. @@ -3026,7 +3041,7 @@ static const JNINativeMethod sMethods[] = { android_location_GnssLocationProvider_class_init_native)}, {"native_is_supported", "()Z", reinterpret_cast<void *>( android_location_GnssLocationProvider_is_supported)}, - {"native_init_once", "()V", reinterpret_cast<void *>( + {"native_init_once", "(Z)V", reinterpret_cast<void *>( android_location_GnssLocationProvider_init_once)}, {"native_init", "()Z", reinterpret_cast<void *>(android_location_GnssLocationProvider_init)}, {"native_cleanup", "()V", reinterpret_cast<void *>( diff --git a/services/tests/mockingservicestests/src/com/android/server/display/color/DisplayWhiteBalanceTintControllerTest.java b/services/tests/mockingservicestests/src/com/android/server/display/color/DisplayWhiteBalanceTintControllerTest.java new file mode 100644 index 000000000000..4538cacbf9c4 --- /dev/null +++ b/services/tests/mockingservicestests/src/com/android/server/display/color/DisplayWhiteBalanceTintControllerTest.java @@ -0,0 +1,191 @@ +/* + * 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.server.display.color; + +import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn; + +import static com.google.common.truth.Truth.assertWithMessage; + +import android.content.Context; +import android.content.res.Resources; +import android.os.Binder; +import android.os.IBinder; +import android.view.SurfaceControl; +import android.view.SurfaceControl.DisplayPrimaries; +import android.view.SurfaceControl.CieXyz; + +import androidx.test.InstrumentationRegistry; +import androidx.test.runner.AndroidJUnit4; + +import com.android.internal.R; +import com.android.dx.mockito.inline.extended.ExtendedMockito; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.MockitoSession; +import org.mockito.quality.Strictness; + +@RunWith(AndroidJUnit4.class) +public class DisplayWhiteBalanceTintControllerTest { + @Mock + private Context mMockedContext; + @Mock + private Resources mMockedResources; + + private MockitoSession mSession; + private Resources mResources; + IBinder mDisplayToken; + DisplayWhiteBalanceTintController mDisplayWhiteBalanceTintController; + + @Before + public void setUp() { + mSession = ExtendedMockito.mockitoSession() + .initMocks(this) + .mockStatic(SurfaceControl.class) + .strictness(Strictness.LENIENT) + .startMocking(); + + mResources = InstrumentationRegistry.getContext().getResources(); + // These Resources are common to all tests. + doReturn(mResources.getInteger(R.integer.config_displayWhiteBalanceColorTemperatureMin)) + .when(mMockedResources) + .getInteger(R.integer.config_displayWhiteBalanceColorTemperatureMin); + doReturn(mResources.getInteger(R.integer.config_displayWhiteBalanceColorTemperatureMax)) + .when(mMockedResources) + .getInteger(R.integer.config_displayWhiteBalanceColorTemperatureMax); + doReturn(mResources.getInteger(R.integer.config_displayWhiteBalanceColorTemperatureDefault)) + .when(mMockedResources) + .getInteger(R.integer.config_displayWhiteBalanceColorTemperatureDefault); + doReturn(mResources.getStringArray(R.array.config_displayWhiteBalanceDisplayNominalWhite)) + .when(mMockedResources) + .getStringArray(R.array.config_displayWhiteBalanceDisplayNominalWhite); + doReturn(mMockedResources).when(mMockedContext).getResources(); + + mDisplayToken = new Binder(); + doReturn(mDisplayToken).when(() -> SurfaceControl.getInternalDisplayToken()); + } + + @After + public void tearDown() throws Exception { + if (mSession != null) { + mSession.finishMocking(); + } + } + + /** + * Setup should succeed when SurfaceControl setup results in a valid color transform. + */ + @Test + public void displayWhiteBalance_setupWithSurfaceControl() { + // Make SurfaceControl return sRGB primaries + DisplayPrimaries displayPrimaries = new DisplayPrimaries(); + displayPrimaries.red = new CieXyz(); + displayPrimaries.red.X = 0.412315f; + displayPrimaries.red.Y = 0.212600f; + displayPrimaries.red.Z = 0.019327f; + displayPrimaries.green = new CieXyz(); + displayPrimaries.green.X = 0.357600f; + displayPrimaries.green.Y = 0.715200f; + displayPrimaries.green.Z = 0.119200f; + displayPrimaries.blue = new CieXyz(); + displayPrimaries.blue.X = 0.180500f; + displayPrimaries.blue.Y = 0.072200f; + displayPrimaries.blue.Z = 0.950633f; + displayPrimaries.white = new CieXyz(); + displayPrimaries.white.X = 0.950456f; + displayPrimaries.white.Y = 1.000000f; + displayPrimaries.white.Z = 1.089058f; + doReturn(displayPrimaries) + .when(() -> SurfaceControl.getDisplayNativePrimaries(mDisplayToken)); + + setUpTintController(); + assertWithMessage("Setup with valid SurfaceControl failed") + .that(mDisplayWhiteBalanceTintController.mSetUp) + .isTrue(); + } + + /** + * Setup should fail when SurfaceControl setup results in an invalid color transform. + */ + @Test + public void displayWhiteBalance_setupWithInvalidSurfaceControlData() { + // Make SurfaceControl return invalid display primaries + DisplayPrimaries displayPrimaries = new DisplayPrimaries(); + displayPrimaries.red = new CieXyz(); + displayPrimaries.green = new CieXyz(); + displayPrimaries.blue = new CieXyz(); + displayPrimaries.white = new CieXyz(); + doReturn(displayPrimaries) + .when(() -> SurfaceControl.getDisplayNativePrimaries(mDisplayToken)); + + setUpTintController(); + assertWithMessage("Setup with invalid SurfaceControl succeeded") + .that(mDisplayWhiteBalanceTintController.mSetUp) + .isFalse(); + } + + /** + * Setup should succeed when SurfaceControl setup fails and Resources result in a valid color + * transform. + */ + @Test + public void displayWhiteBalance_setupWithResources() { + // Use default (valid) Resources + doReturn(mResources.getStringArray(R.array.config_displayWhiteBalanceDisplayPrimaries)) + .when(mMockedResources) + .getStringArray(R.array.config_displayWhiteBalanceDisplayPrimaries); + // Make SurfaceControl setup fail + doReturn(null).when(() -> SurfaceControl.getDisplayNativePrimaries(mDisplayToken)); + + setUpTintController(); + assertWithMessage("Setup with valid Resources failed") + .that(mDisplayWhiteBalanceTintController.mSetUp) + .isTrue(); + } + + /** + * Setup should fail when SurfaceControl setup fails and Resources result in an invalid color + * transform. + */ + @Test + public void displayWhiteBalance_setupWithInvalidResources() { + // Use Resources with invalid color data + doReturn(new String[] { + "0", "0", "0", // Red X, Y, Z + "0", "0", "0", // Green X, Y, Z + "0", "0", "0", // Blue X, Y, Z + "0", "0", "0", // White X, Y, Z + }) + .when(mMockedResources) + .getStringArray(R.array.config_displayWhiteBalanceDisplayPrimaries); + // Make SurfaceControl setup fail + doReturn(null).when(() -> SurfaceControl.getDisplayNativePrimaries(mDisplayToken)); + + setUpTintController(); + assertWithMessage("Setup with invalid Resources succeeded") + .that(mDisplayWhiteBalanceTintController.mSetUp) + .isFalse(); + } + + private void setUpTintController() { + mDisplayWhiteBalanceTintController = new DisplayWhiteBalanceTintController(); + mDisplayWhiteBalanceTintController.setUp(mMockedContext, true); + } +} diff --git a/services/tests/servicestests/src/com/android/server/display/color/ColorDisplayServiceTest.java b/services/tests/servicestests/src/com/android/server/display/color/ColorDisplayServiceTest.java index de841a0ac4ec..8bb8aae76849 100644 --- a/services/tests/servicestests/src/com/android/server/display/color/ColorDisplayServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/display/color/ColorDisplayServiceTest.java @@ -1029,6 +1029,34 @@ public class ColorDisplayServiceTest { assertDwbActive(true); } + @Test + public void displayWhiteBalance_disabledWhileAccessibilityColorCorrectionEnabled() { + setDisplayWhiteBalanceEnabled(true); + startService(); + setAccessibilityColorCorrection(true); + + mCds.updateDisplayWhiteBalanceStatus(); + assertDwbActive(false); + + setAccessibilityColorCorrection(false); + mCds.updateDisplayWhiteBalanceStatus(); + assertDwbActive(true); + } + + @Test + public void displayWhiteBalance_disabledWhileAccessibilityColorInversionEnabled() { + setDisplayWhiteBalanceEnabled(true); + startService(); + setAccessibilityColorInversion(true); + + mCds.updateDisplayWhiteBalanceStatus(); + assertDwbActive(false); + + setAccessibilityColorInversion(false); + mCds.updateDisplayWhiteBalanceStatus(); + assertDwbActive(true); + } + /** * Configures Night display to use a custom schedule. * diff --git a/services/tests/servicestests/src/com/android/server/display/color/DisplayWhiteBalanceTintControllerTest.java b/services/tests/servicestests/src/com/android/server/display/color/DisplayWhiteBalanceTintControllerTest.java index 1dd4e1579866..4ef156e239d3 100644 --- a/services/tests/servicestests/src/com/android/server/display/color/DisplayWhiteBalanceTintControllerTest.java +++ b/services/tests/servicestests/src/com/android/server/display/color/DisplayWhiteBalanceTintControllerTest.java @@ -18,6 +18,11 @@ package com.android.server.display.color; import static com.google.common.truth.Truth.assertWithMessage; +import androidx.test.InstrumentationRegistry; + +import java.lang.System; +import java.util.Arrays; + import org.junit.Before; import org.junit.Test; @@ -28,6 +33,8 @@ public class DisplayWhiteBalanceTintControllerTest { @Before public void setUp() { mDisplayWhiteBalanceTintController = new DisplayWhiteBalanceTintController(); + mDisplayWhiteBalanceTintController.setUp(InstrumentationRegistry.getContext(), true); + mDisplayWhiteBalanceTintController.setActivated(true); } @Test @@ -59,4 +66,31 @@ public class DisplayWhiteBalanceTintControllerTest { .isEqualTo(colorTemperature); } + @Test + public void displayWhiteBalance_setMatrixValidDwbCalculation() { + float[] currentMatrix = mDisplayWhiteBalanceTintController.getMatrix(); + float[] oldMatrix = Arrays.copyOf(currentMatrix, currentMatrix.length); + + mDisplayWhiteBalanceTintController + .setMatrix(mDisplayWhiteBalanceTintController.mCurrentColorTemperature + 1); + assertWithMessage("DWB matrix did not change when setting a new temperature") + .that(Arrays.equals(oldMatrix, currentMatrix)) + .isFalse(); + } + + @Test + public void displayWhiteBalance_setMatrixInvalidDwbCalculation() { + Arrays.fill(mDisplayWhiteBalanceTintController.mDisplayNominalWhiteXYZ, 0); + mDisplayWhiteBalanceTintController + .setMatrix(mDisplayWhiteBalanceTintController.mCurrentColorTemperature + 1); + assertWithMessage("DWB matrix not set to identity after an invalid DWB calculation") + .that(Arrays.equals(mDisplayWhiteBalanceTintController.getMatrix(), + new float[] { + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + }) + ).isTrue(); + } } diff --git a/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java b/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java index 6845f15f6a28..b806180a8584 100644 --- a/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java +++ b/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java @@ -1584,6 +1584,22 @@ public abstract class BaseShortcutManagerTest extends InstrumentationTestCase { } /** + * Make a shortcut with an ID and Category. + */ + protected ShortcutInfo makeShortcutWithCategory(String id, Set<String> categories) { + final ShortcutInfo.Builder b = new ShortcutInfo.Builder(mClientContext, id) + .setActivity(new ComponentName(mClientContext.getPackageName(), "main")) + .setShortLabel("title-" + id) + .setIntent(makeIntent(Intent.ACTION_VIEW, ShortcutActivity.class)) + .setCategories(categories); + final ShortcutInfo s = b.build(); + + s.setTimestamp(mInjectedCurrentTimeMillis); // HACK + + return s; + } + + /** * Make an intent. */ protected Intent makeIntent(String action, Class<?> clazz, Object... bundleKeysAndValues) { @@ -1818,6 +1834,17 @@ public abstract class BaseShortcutManagerTest extends InstrumentationTestCase { } /** + * @return the number of shortcuts stored internally for the caller that can be used as a share + * target in the ShareSheet. Such shortcuts have a matching category with at least one of the + * defined ShareTargets from the app's Xml resource. + */ + protected int getCallerSharingShortcutCount() { + final ShortcutPackage p = mService.getPackageShortcutForTest( + getCallingPackage(), getCallingUserId()); + return p == null ? 0 : p.getSharingShortcutCount(); + } + + /** * @return all shortcuts owned by caller that are actually visible via ShortcutManager. * See also {@link #getCallerShortcuts}. */ diff --git a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest3.java b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest3.java index eb4db7a0f4af..ba26f7930dcb 100644 --- a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest3.java +++ b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest3.java @@ -17,6 +17,7 @@ package com.android.server.pm; import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertWith; import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.list; +import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.set; import android.content.ComponentName; import android.content.pm.ShortcutInfo; @@ -25,6 +26,8 @@ import android.test.suitebuilder.annotation.SmallTest; import com.android.frameworks.servicestests.R; import com.android.server.pm.ShortcutService.ConfigConstants; +import java.util.Set; + /** * Tests related to shortcut rank auto-adjustment. */ @@ -50,6 +53,10 @@ public class ShortcutManagerTest3 extends BaseShortcutManagerTest { return makeShortcutWithActivityAndRank(id, activity, ShortcutInfo.RANK_NOT_SET); } + private ShortcutInfo shortcut(String id, Set<String> categories) { + return makeShortcutWithCategory(id, categories); + } + @Override protected void setUp() throws Exception { super.setUp(); @@ -502,4 +509,30 @@ public class ShortcutManagerTest3 extends BaseShortcutManagerTest { runTestWithManifestShortcuts(() -> testDisableShortcuts_noManifestShortcuts()); } + public void testGetSharingShortcutCount() { + addManifestShortcutResource( + new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()), + R.xml.shortcut_share_targets); + updatePackageVersion(CALLING_PACKAGE_1, 1); + mService.mPackageMonitor.onReceive(getTestContext(), + genPackageAddIntent(CALLING_PACKAGE_1, USER_0)); + + // There are two valid <share-target> definitions in the test manifest with two different + // categories: {"com.test.category.CATEGORY1", "com.test.category.CATEGORY2"} and + // {"com.test.category.CATEGORY5", "com.test.category.CATEGORY6"}. + // + // Note that a shortcut is a match, only if it has ALL of the categories of at least one + // of the share-target definitions from the manifest. + + mManager.addDynamicShortcuts(list( + shortcut("s1", set("com.test.category.CATEGORY1", "com.test.category.CATEGORY2")), + shortcut("s2", set("com.test.category.CATEGORY5")), + shortcut("s3", set("com.test.category.CATEGORY5", "com.test.category.CATEGORY6")), + shortcut("s4", set("com.test.category.CATEGORY1", "com.test.category.CATEGORY2", + "com.test.category.CATEGORY5", "com.test.category.CATEGORY6")), + shortcut("s5", A1) + )); + + assertEquals(3, getCallerSharingShortcutCount()); + } } diff --git a/services/tests/servicestests/src/com/android/server/pm/SuspendPackagesTest.java b/services/tests/servicestests/src/com/android/server/pm/SuspendPackagesTest.java index c6be1c022283..d5d32bdd00cc 100644 --- a/services/tests/servicestests/src/com/android/server/pm/SuspendPackagesTest.java +++ b/services/tests/servicestests/src/com/android/server/pm/SuspendPackagesTest.java @@ -509,25 +509,17 @@ public class SuspendPackagesTest { } @Test - public void testCannotSuspendWhenProfileOwner() throws IOException { + public void testCanSuspendWhenProfileOwner() throws IOException { assumeTrue(mPackageManager.hasSystemFeature(PackageManager.FEATURE_DEVICE_ADMIN)); assertTrue("Profile-owner could not be set", setProfileOwner()); - try { - suspendTestPackage(null, null, null); - fail("Suspend succeeded. Expected UnsupportedOperationException"); - } catch (UnsupportedOperationException uex) { - } + suspendTestPackage(null, null, null); } @Test - public void testCannotSuspendWhenDeviceOwner() throws IOException { + public void testCanSuspendWhenDeviceOwner() throws IOException { assumeTrue(mPackageManager.hasSystemFeature(PackageManager.FEATURE_DEVICE_ADMIN)); assertTrue("Device-owner could not be set", setDeviceOwner()); - try { - suspendTestPackage(null, null, null); - fail("Suspend succeeded. Expected UnsupportedOperationException"); - } catch (UnsupportedOperationException uex) { - } + suspendTestPackage(null, null, null); } @Test diff --git a/services/tests/servicestests/src/com/android/server/usage/UsageStatsDatabaseTest.java b/services/tests/servicestests/src/com/android/server/usage/UsageStatsDatabaseTest.java index e74b959b6abe..c55f459c9fe7 100644 --- a/services/tests/servicestests/src/com/android/server/usage/UsageStatsDatabaseTest.java +++ b/services/tests/servicestests/src/com/android/server/usage/UsageStatsDatabaseTest.java @@ -223,6 +223,22 @@ public class UsageStatsDatabaseTest { config9.densityDpi = 19; mIntervalStats.getOrCreateConfigurationStats(config9); + Configuration config10 = new Configuration(); + final Locale locale10 = new Locale.Builder() + .setLocale(new Locale("zh", "CN")) + .setScript("Hans") + .build(); + config10.setLocale(locale10); + mIntervalStats.getOrCreateConfigurationStats(config10); + + Configuration config11 = new Configuration(); + final Locale locale11 = new Locale.Builder() + .setLocale(new Locale("zh", "CN")) + .setScript("Hant") + .build(); + config11.setLocale(locale11); + mIntervalStats.getOrCreateConfigurationStats(config11); + mIntervalStats.activeConfiguration = config9; } 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 777e4f4915b8..035568f489be 100644 --- a/services/tests/wmtests/src/com/android/server/wm/AppChangeTransitionTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/AppChangeTransitionTests.java @@ -158,4 +158,22 @@ public class AppChangeTransitionTests extends WindowTestsBase { waitUntilHandlersIdle(); mToken.removeImmediately(); } + + @Test + public void testCancelPendingChangeOnHide() { + // setup currently defaults to no snapshot. + setUpOnDisplay(mDisplayContent); + + mTask.setWindowingMode(WINDOWING_MODE_FREEFORM); + assertEquals(1, mDisplayContent.mChangingApps.size()); + assertTrue(mToken.isInChangeTransition()); + + // Changing visibility should cancel the change transition and become closing + mToken.setVisibility(false, false); + assertEquals(0, mDisplayContent.mChangingApps.size()); + assertFalse(mToken.isInChangeTransition()); + + waitUntilHandlersIdle(); + mToken.removeImmediately(); + } } diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyLayoutTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyLayoutTests.java index e90f094636f7..4a87aa46db58 100644 --- a/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyLayoutTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyLayoutTests.java @@ -21,6 +21,7 @@ import static android.view.Surface.ROTATION_270; import static android.view.Surface.ROTATION_90; import static android.view.View.SYSTEM_UI_FLAG_FULLSCREEN; import static android.view.View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN; +import static android.view.View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION; import static android.view.ViewGroup.LayoutParams.MATCH_PARENT; import static android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS; import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR; @@ -32,6 +33,7 @@ import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING; import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY; +import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertEquals; @@ -160,6 +162,25 @@ public class DisplayPolicyLayoutTests extends DisplayPolicyTestsBase { } @Test + public void layoutWindowLw_keyguardDialog_hideNav() { + synchronized (mWm.mGlobalLock) { + mWindow.mAttrs.type = TYPE_KEYGUARD_DIALOG; + mWindow.mAttrs.flags |= FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS; + mWindow.mAttrs.systemUiVisibility = SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION; + addWindow(mWindow); + + mDisplayPolicy.beginLayoutLw(mFrames, 0 /* uiMode */); + mDisplayPolicy.layoutWindowLw(mWindow, null /* attached */, mFrames); + + assertInsetByTopBottom(mWindow.getParentFrame(), 0, 0); + assertInsetByTopBottom(mWindow.getStableFrameLw(), STATUS_BAR_HEIGHT, NAV_BAR_HEIGHT); + assertInsetByTopBottom(mWindow.getContentFrameLw(), STATUS_BAR_HEIGHT, NAV_BAR_HEIGHT); + assertInsetByTopBottom(mWindow.getDecorFrame(), 0, 0); + assertInsetByTopBottom(mWindow.getDisplayFrameLw(), 0, 0); + } + } + + @Test public void layoutWindowLw_withDisplayCutout() { synchronized (mWm.mGlobalLock) { addDisplayCutout(); diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayWindowSettingsTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplayWindowSettingsTests.java index 652ea7d32953..336fa041dea8 100644 --- a/services/tests/wmtests/src/com/android/server/wm/DisplayWindowSettingsTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/DisplayWindowSettingsTests.java @@ -51,6 +51,7 @@ import android.view.Surface; import androidx.test.filters.SmallTest; import com.android.dx.mockito.inline.extended.ExtendedMockito; +import com.android.server.LocalServices; import com.android.server.policy.WindowManagerPolicy; import org.junit.After; @@ -588,6 +589,23 @@ public class DisplayWindowSettingsTests extends WindowTestsBase { getStoredDisplayAttributeValue("shouldShowIme")); } + @Test + public void testShouldShowImeWithinForceDesktopMode() { + try { + // Presume display enabled force desktop mode from developer options. + final DisplayContent dc = createMockSimulatedDisplay(); + mWm.setForceDesktopModeOnExternalDisplays(true); + final WindowManagerInternal wmInternal = LocalServices.getService( + WindowManagerInternal.class); + // Make sure WindowManagerInter#shouldShowIme as true is due to + // mForceDesktopModeOnExternalDisplays as true. + assertFalse(mWm.mDisplayWindowSettings.shouldShowImeLocked(dc)); + assertTrue(wmInternal.shouldShowIme(dc.getDisplayId())); + } finally { + mWm.setForceDesktopModeOnExternalDisplays(false); + } + } + /** * Prepares display settings and stores in {@link #mStorage}. Uses provided display identifier * and stores windowingMode=WINDOWING_MODE_PINNED. diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java b/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java index 8c37ca5e309e..3a702cb9521c 100644 --- a/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java +++ b/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java @@ -19,6 +19,7 @@ package com.android.server.wm; import static android.app.AppOpsManager.OP_NONE; import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; +import static android.os.Process.SYSTEM_UID; import static android.view.Display.DEFAULT_DISPLAY; import static android.view.DisplayAdjustments.DEFAULT_DISPLAY_ADJUSTMENTS; import static android.view.View.VISIBLE; @@ -445,4 +446,13 @@ class WindowTestsBase { return new WindowTestUtils.TestWindowState(mWm, mMockSession, mIWindow, attrs, token); } } + + /** Creates a {@link DisplayContent} as parts of simulate display info for test. */ + DisplayContent createMockSimulatedDisplay() { + DisplayInfo displayInfo = new DisplayInfo(); + displayInfo.copyFrom(mDisplayInfo); + displayInfo.type = Display.TYPE_VIRTUAL; + displayInfo.ownerUid = SYSTEM_UID; + return createNewDisplay(displayInfo); + } } diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 69500d77fd6f..d2334d4a3125 100755 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -2819,6 +2819,59 @@ public class CarrierConfigManager { } } + /** + * Wi-Fi configs used in Carrier Wi-Fi application. + * TODO(b/132059890): Expose it in a future release as systemapi. + * + * @hide + */ + public static final class Wifi { + /** Prefix of all Wifi.KEY_* constants. */ + public static final String KEY_PREFIX = "wifi."; + + /** + * Whenever any information under wifi namespace is changed, the version should be + * incremented by 1 so that the device is able to figure out the latest profiles based on + * the version. + */ + public static final String KEY_CARRIER_PROFILES_VERSION_INT = + KEY_PREFIX + "carrier_profiles_version_int"; + + /** + * It contains the package name of connection manager that the carrier owns. + * + * <P>Once it is installed, the profiles installed by Carrier Wi-Fi Application + * will be deleted. + * Once it is uninstalled, Carrier Wi-Fi Application will re-install the latest profiles. + */ + public static final String KEY_CARRIER_CONNECTION_MANAGER_PACKAGE_STRING = + KEY_PREFIX + "carrier_connection_manager_package_string"; + /** + * It is to have the list of wifi networks profiles which contain the information about + * the wifi-networks to which carrier wants the device to connect. + */ + public static final String KEY_NETWORK_PROFILES_STRING_ARRAY = + KEY_PREFIX + "network_profiles_string_array"; + + /** + * It is to have the list of Passpoint profiles which contain the information about + * the Passpoint networks to which carrier wants the device to connect. + */ + public static final String KEY_PASSPOINT_PROFILES_STRING_ARRAY = + KEY_PREFIX + "passpoint_profiles_string_array"; + + private static PersistableBundle getDefaults() { + PersistableBundle defaults = new PersistableBundle(); + defaults.putInt(KEY_CARRIER_PROFILES_VERSION_INT, -1); + defaults.putString(KEY_CARRIER_CONNECTION_MANAGER_PACKAGE_STRING, null); + defaults.putStringArray(KEY_NETWORK_PROFILES_STRING_ARRAY, null); + defaults.putStringArray(KEY_PASSPOINT_PROFILES_STRING_ARRAY, null); + return defaults; + } + + private Wifi() {} + } + /** * An int array containing CDMA enhanced roaming indicator values for Home (non-roaming) network. * The default values come from 3GPP2 C.R1001 table 8.1-1. @@ -3307,6 +3360,7 @@ public class CarrierConfigManager { /* Default value is 10 seconds. */ sDefaults.putLong(KEY_OPPORTUNISTIC_NETWORK_DATA_SWITCH_HYSTERESIS_TIME_LONG, 10000); sDefaults.putAll(Gps.getDefaults()); + sDefaults.putAll(Wifi.getDefaults()); sDefaults.putIntArray(KEY_CDMA_ENHANCED_ROAMING_INDICATOR_FOR_HOME_NETWORK_INT_ARRAY, new int[] { 1 /* Roaming Indicator Off */ diff --git a/telephony/java/android/telephony/SmsManager.java b/telephony/java/android/telephony/SmsManager.java index 63d427a6f3c4..6a71c4fa74b3 100644 --- a/telephony/java/android/telephony/SmsManager.java +++ b/telephony/java/android/telephony/SmsManager.java @@ -337,12 +337,12 @@ public final class SmsManager { String destinationAddress, String scAddress, String text, PendingIntent sentIntent, PendingIntent deliveryIntent) { sendTextMessageInternal(destinationAddress, scAddress, text, sentIntent, deliveryIntent, - true /* persistMessage*/); + true /* persistMessage*/, ActivityThread.currentPackageName()); } private void sendTextMessageInternal(String destinationAddress, String scAddress, String text, PendingIntent sentIntent, PendingIntent deliveryIntent, - boolean persistMessage) { + boolean persistMessage, String packageName) { if (TextUtils.isEmpty(destinationAddress)) { throw new IllegalArgumentException("Invalid destinationAddress"); } @@ -355,9 +355,8 @@ public final class SmsManager { // If the subscription is invalid or default, we will use the default phone to send the // SMS and possibly fail later in the SMS sending process. ISms iSms = getISmsServiceOrThrow(); - iSms.sendTextForSubscriber(getSubscriptionId(), ActivityThread.currentPackageName(), - destinationAddress, - scAddress, text, sentIntent, deliveryIntent, + iSms.sendTextForSubscriber(getSubscriptionId(), packageName, + destinationAddress, scAddress, text, sentIntent, deliveryIntent, persistMessage); } catch (RemoteException ex) { // ignore it @@ -389,7 +388,7 @@ public final class SmsManager { String destinationAddress, String scAddress, String text, PendingIntent sentIntent, PendingIntent deliveryIntent) { sendTextMessageInternal(destinationAddress, scAddress, text, sentIntent, deliveryIntent, - false /* persistMessage */); + false /* persistMessage */, ActivityThread.currentPackageName()); } /** @@ -630,13 +629,30 @@ public final class SmsManager { String destinationAddress, String scAddress, ArrayList<String> parts, ArrayList<PendingIntent> sentIntents, ArrayList<PendingIntent> deliveryIntents) { sendMultipartTextMessageInternal(destinationAddress, scAddress, parts, sentIntents, - deliveryIntents, true /* persistMessage*/); + deliveryIntents, true /* persistMessage*/, ActivityThread.currentPackageName()); + } + + /** + * @hide + * Similar method as #sendMultipartTextMessage(String, String, ArrayList, ArrayList, ArrayList) + * With an additional argument + * @param packageName serves as the default package name if ActivityThread.currentpackageName is + * null. + */ + public void sendMultipartTextMessageExternal( + String destinationAddress, String scAddress, ArrayList<String> parts, + ArrayList<PendingIntent> sentIntents, ArrayList<PendingIntent> deliveryIntents, + String packageName) { + sendMultipartTextMessageInternal(destinationAddress, scAddress, parts, sentIntents, + deliveryIntents, true /* persistMessage*/, + ActivityThread.currentPackageName() == null + ? packageName : ActivityThread.currentPackageName()); } private void sendMultipartTextMessageInternal( String destinationAddress, String scAddress, List<String> parts, List<PendingIntent> sentIntents, List<PendingIntent> deliveryIntents, - boolean persistMessage) { + boolean persistMessage, String packageName) { if (TextUtils.isEmpty(destinationAddress)) { throw new IllegalArgumentException("Invalid destinationAddress"); } @@ -648,8 +664,7 @@ public final class SmsManager { try { ISms iSms = getISmsServiceOrThrow(); iSms.sendMultipartTextForSubscriber(getSubscriptionId(), - ActivityThread.currentPackageName(), - destinationAddress, scAddress, parts, + packageName, destinationAddress, scAddress, parts, sentIntents, deliveryIntents, persistMessage); } catch (RemoteException ex) { // ignore it @@ -663,8 +678,8 @@ public final class SmsManager { if (deliveryIntents != null && deliveryIntents.size() > 0) { deliveryIntent = deliveryIntents.get(0); } - sendTextMessage(destinationAddress, scAddress, parts.get(0), - sentIntent, deliveryIntent); + sendTextMessageInternal(destinationAddress, scAddress, parts.get(0), + sentIntent, deliveryIntent, true, packageName); } } @@ -685,7 +700,7 @@ public final class SmsManager { String destinationAddress, String scAddress, List<String> parts, List<PendingIntent> sentIntents, List<PendingIntent> deliveryIntents) { sendMultipartTextMessageInternal(destinationAddress, scAddress, parts, sentIntents, - deliveryIntents, false /* persistMessage*/); + deliveryIntents, false /* persistMessage*/, ActivityThread.currentPackageName()); } /** diff --git a/telephony/java/android/telephony/UiccSlotInfo.java b/telephony/java/android/telephony/UiccSlotInfo.java index 9a8d7cd35cb0..785d7aea2a6f 100644 --- a/telephony/java/android/telephony/UiccSlotInfo.java +++ b/telephony/java/android/telephony/UiccSlotInfo.java @@ -140,10 +140,6 @@ public class UiccSlotInfo implements Parcelable { return mIsEuicc; } - /** - * Returns the ICCID of a the UICC in the given slot, or the EID if it is an eUICC. Note that if - * the value is unavailble this will return null. - */ public String getCardId() { return mCardId; } diff --git a/telephony/java/android/telephony/emergency/EmergencyNumber.java b/telephony/java/android/telephony/emergency/EmergencyNumber.java index 22f078fc0c05..7b5145740b08 100644 --- a/telephony/java/android/telephony/emergency/EmergencyNumber.java +++ b/telephony/java/android/telephony/emergency/EmergencyNumber.java @@ -558,6 +558,24 @@ public final class EmergencyNumber implements Parcelable, Comparable<EmergencyNu } else if (this.getDisplayPriorityScore() < emergencyNumber.getDisplayPriorityScore()) { return 1; + } else if (this.getNumber().compareTo(emergencyNumber.getNumber()) != 0) { + return this.getNumber().compareTo(emergencyNumber.getNumber()); + } else if (this.getCountryIso().compareTo(emergencyNumber.getCountryIso()) != 0) { + return this.getCountryIso().compareTo(emergencyNumber.getCountryIso()); + } else if (this.getMnc().compareTo(emergencyNumber.getMnc()) != 0) { + return this.getMnc().compareTo(emergencyNumber.getMnc()); + } else if (this.getEmergencyServiceCategoryBitmask() + != emergencyNumber.getEmergencyServiceCategoryBitmask()) { + return this.getEmergencyServiceCategoryBitmask() + > emergencyNumber.getEmergencyServiceCategoryBitmask() ? -1 : 1; + } else if (this.getEmergencyUrns().toString().compareTo( + emergencyNumber.getEmergencyUrns().toString()) != 0) { + return this.getEmergencyUrns().toString().compareTo( + emergencyNumber.getEmergencyUrns().toString()); + } else if (this.getEmergencyCallRouting() + != emergencyNumber.getEmergencyCallRouting()) { + return this.getEmergencyCallRouting() + > emergencyNumber.getEmergencyCallRouting() ? -1 : 1; } else { return 0; } @@ -579,13 +597,9 @@ public final class EmergencyNumber implements Parcelable, Comparable<EmergencyNu if (emergencyNumberList == null) { return; } - Set<EmergencyNumber> mergedEmergencyNumber = new HashSet<>(); + Set<Integer> duplicatedEmergencyNumberPosition = new HashSet<>(); for (int i = 0; i < emergencyNumberList.size(); i++) { - // Skip the check because it was merged. - if (mergedEmergencyNumber.contains(emergencyNumberList.get(i))) { - continue; - } - for (int j = i + 1; j < emergencyNumberList.size(); j++) { + for (int j = 0; j < i; j++) { if (areSameEmergencyNumbers( emergencyNumberList.get(i), emergencyNumberList.get(j))) { Rlog.e(LOG_TAG, "Found unexpected duplicate numbers: " @@ -594,14 +608,15 @@ public final class EmergencyNumber implements Parcelable, Comparable<EmergencyNu emergencyNumberList.set(i, mergeSameEmergencyNumbers( emergencyNumberList.get(i), emergencyNumberList.get(j))); // Mark the emergency number has been merged - mergedEmergencyNumber.add(emergencyNumberList.get(j)); + duplicatedEmergencyNumberPosition.add(j); } } } - // Remove the marked emergency number in the orignal list - for (int i = 0; i < emergencyNumberList.size(); i++) { - if (mergedEmergencyNumber.contains(emergencyNumberList.get(i))) { - emergencyNumberList.remove(i--); + + // Remove the marked emergency number in the original list + for (int i = emergencyNumberList.size() - 1; i >= 0; i--) { + if (duplicatedEmergencyNumberPosition.contains(i)) { + emergencyNumberList.remove(i); } } Collections.sort(emergencyNumberList); diff --git a/tools/aapt2/Android.bp b/tools/aapt2/Android.bp index 326c88d47064..53372bff3e67 100644 --- a/tools/aapt2/Android.bp +++ b/tools/aapt2/Android.bp @@ -41,6 +41,7 @@ cc_defaults { windows: { enabled: true, cflags: ["-Wno-maybe-uninitialized"], + ldflags: ["-static"], }, darwin: { cflags: ["-D_DARWIN_UNLIMITED_STREAMS"], diff --git a/tools/aapt2/ResourceValues_test.cpp b/tools/aapt2/ResourceValues_test.cpp index c4a1108ac62a..dbf51143f720 100644 --- a/tools/aapt2/ResourceValues_test.cpp +++ b/tools/aapt2/ResourceValues_test.cpp @@ -284,8 +284,58 @@ TEST(ResourcesValuesTest, AttributeIsCompatible) { EXPECT_FALSE(attr_three.IsCompatibleWith(attr_one)); EXPECT_FALSE(attr_three.IsCompatibleWith(attr_two)); - EXPECT_FALSE(attr_three.IsCompatibleWith(attr_three)); + EXPECT_TRUE(attr_three.IsCompatibleWith(attr_three)); EXPECT_FALSE(attr_three.IsCompatibleWith(attr_four)); + + EXPECT_FALSE(attr_four.IsCompatibleWith(attr_one)); + EXPECT_FALSE(attr_four.IsCompatibleWith(attr_two)); + EXPECT_FALSE(attr_four.IsCompatibleWith(attr_three)); + EXPECT_TRUE(attr_four.IsCompatibleWith(attr_four)); +} + +TEST(ResourcesValuesTest, AttributeEnumIsCompatible) { + Attribute attr_one(TYPE_ENUM); + attr_one.symbols.push_back( + Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/foo")), 0x01u}); + attr_one.symbols.push_back( + Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/bar")), 0x07u}); + + Attribute attr_two(TYPE_ENUM); + attr_two.symbols.push_back( + Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/foo")), 0x01u}); + attr_two.symbols.push_back( + Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/bar")), 0x07u}); + EXPECT_TRUE(attr_one.IsCompatibleWith(attr_two)); +} + +TEST(ResourcesValuesTest, DifferentAttributeEnumDifferentNameIsNotCompatible) { + Attribute attr_one(TYPE_ENUM); + attr_one.symbols.push_back( + Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/foo")), 0x01u}); + attr_one.symbols.push_back( + Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/bar")), 0x07u}); + + Attribute attr_two(TYPE_ENUM); + attr_two.symbols.push_back( + Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/foo")), 0x01u}); + attr_one.symbols.push_back( + Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/baz")), 0x07u}); + EXPECT_FALSE(attr_one.IsCompatibleWith(attr_two)); +} + +TEST(ResourcesValuesTest, DifferentAttributeEnumDifferentValueIsNotCompatible) { + Attribute attr_one(TYPE_ENUM); + attr_one.symbols.push_back( + Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/foo")), 0x01u}); + attr_one.symbols.push_back( + Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/bar")), 0x07u}); + + Attribute attr_two(TYPE_ENUM); + attr_two.symbols.push_back( + Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/foo")), 0x01u}); + attr_two.symbols.push_back( + Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/bar")), 0x09u}); + EXPECT_FALSE(attr_one.IsCompatibleWith(attr_two)); } } // namespace aapt diff --git a/tools/aapt2/link/TableMerger_test.cpp b/tools/aapt2/link/TableMerger_test.cpp index be9c84b3f8a6..78d42a160e21 100644 --- a/tools/aapt2/link/TableMerger_test.cpp +++ b/tools/aapt2/link/TableMerger_test.cpp @@ -408,54 +408,6 @@ TEST_F(TableMergerTest, FailToOverrideConflictingAttributeFormatsWithOverlay) { ASSERT_FALSE(merger.Merge({}, overlay.get(), true /*overlay*/)); } -TEST_F(TableMergerTest, FailToOverrideConflictingFlagsAndEnumsWithOverlay) { - std::unique_ptr<ResourceTable> base = - test::ResourceTableBuilder() - .SetPackageId("", 0x7f) - .AddValue("attr/foo", test::AttributeBuilder() - .SetTypeMask(android::ResTable_map::TYPE_FLAGS) - .Build()) - .Build(); - - std::unique_ptr<ResourceTable> overlay = - test::ResourceTableBuilder() - .SetPackageId("", 0x7f) - .AddValue("attr/foo", test::AttributeBuilder() - .SetTypeMask(android::ResTable_map::TYPE_FLAGS) - .SetWeak(false) - .Build()) - .Build(); - - ResourceTable final_table; - TableMergerOptions options; - options.auto_add_overlay = false; - TableMerger merger(context_.get(), &final_table, options); - - ASSERT_TRUE(merger.Merge({}, base.get(), false /*overlay*/)); - ASSERT_FALSE(merger.Merge({}, overlay.get(), true /*overlay*/)); - - base = test::ResourceTableBuilder() - .SetPackageId("", 0x7f) - .AddValue("attr/foo", test::AttributeBuilder() - .SetTypeMask(android::ResTable_map::TYPE_ENUM) - .Build()) - .Build(); - - overlay = test::ResourceTableBuilder() - .SetPackageId("", 0x7f) - .AddValue("attr/foo", test::AttributeBuilder() - .SetTypeMask(android::ResTable_map::TYPE_ENUM) - .SetWeak(false) - .Build()) - .Build(); - - ResourceTable final_table2; - TableMerger merger2(context_.get(), &final_table2, options); - - ASSERT_TRUE(merger2.Merge({}, base.get(), false /*overlay*/)); - ASSERT_FALSE(merger2.Merge({}, overlay.get(), true /*overlay*/)); -} - TEST_F(TableMergerTest, FailToMergeNewResourceWithoutAutoAddOverlay) { std::unique_ptr<ResourceTable> table_a = test::ResourceTableBuilder().SetPackageId("", 0x7f).Build(); diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pManager.java b/wifi/java/android/net/wifi/p2p/WifiP2pManager.java index a7793785fb9b..cd659e2a934a 100644 --- a/wifi/java/android/net/wifi/p2p/WifiP2pManager.java +++ b/wifi/java/android/net/wifi/p2p/WifiP2pManager.java @@ -93,7 +93,9 @@ import java.util.Map; * {@link WifiP2pInfo} contains the address of the group owner * {@link WifiP2pInfo#groupOwnerAddress} and a flag {@link WifiP2pInfo#isGroupOwner} to indicate * if the current device is a p2p group owner. A p2p client can thus communicate with - * the p2p group owner through a socket connection. + * the p2p group owner through a socket connection. If the current device is the p2p group owner, + * {@link WifiP2pInfo#groupOwnerAddress} is anonymized unless the caller holds the + * {@code android.Manifest.permission#LOCAL_MAC_ADDRESS} permission. * * <p> With peer discovery using {@link #discoverPeers}, an application discovers the neighboring * peers, but has no good way to figure out which peer to establish a connection with. For example, @@ -300,6 +302,11 @@ public class WifiP2pManager { * To get information notifications on P2P getting enabled refers * {@link #WIFI_P2P_STATE_ENABLED}. * + * <p> The {@link #EXTRA_WIFI_P2P_DEVICE} extra contains an anonymized version of the device's + * MAC address. Callers holding the {@code android.Manifest.permission#LOCAL_MAC_ADDRESS} + * permission can use {@link #requestDeviceInfo} to obtain the actual MAC address of this + * device. + * * All of these permissions are required to receive this broadcast: * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} and * {@link android.Manifest.permission#ACCESS_WIFI_STATE} @@ -1881,6 +1888,10 @@ public class WifiP2pManager { * <p> This {@link android.net.wifi.p2p.WifiP2pDevice} is returned using the * {@link DeviceInfoListener} listener. * + * <p> {@link android.net.wifi.p2p.WifiP2pDevice#deviceAddress} is only available if the caller + * holds the {@code android.Manifest.permission#LOCAL_MAC_ADDRESS} permission, and holds the + * anonymized MAC address (02:00:00:00:00:00) otherwise. + * * <p> This information is also included in the {@link #WIFI_P2P_THIS_DEVICE_CHANGED_ACTION} * broadcast event with extra {@link #EXTRA_WIFI_P2P_DEVICE}. * |