diff options
278 files changed, 5296 insertions, 3130 deletions
diff --git a/Android.mk b/Android.mk index 55ea69a7b437..cc347676f94b 100644 --- a/Android.mk +++ b/Android.mk @@ -238,6 +238,7 @@ LOCAL_SRC_FILES += \  	core/java/android/net/INetworkScoreService.aidl \  	core/java/android/net/INetworkStatsService.aidl \  	core/java/android/net/INetworkStatsSession.aidl \ +	core/java/android/net/ITetheringStatsProvider.aidl \  	core/java/android/net/nsd/INsdManager.aidl \  	core/java/android/nfc/IAppCallback.aidl \  	core/java/android/nfc/INfcAdapter.aidl \ diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index 204df63f600d..abf48a85c45e 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -6480,9 +6480,9 @@ public final class ActivityThread {      private <T> T instantiate(ClassLoader cl, String className, Context c,              Instantiator<T> instantiator)              throws ClassNotFoundException, IllegalAccessException, InstantiationException { -        if (c.getApplicationContext() instanceof Application) { -            T a = instantiator.instantiate((Application) c.getApplicationContext(), -                    cl, className); +        Application app = getApp(c); +        if (app != null) { +            T a = instantiator.instantiate(app, cl, className);              if (a != null) return a;          }          return (T) cl.loadClass(className).newInstance(); @@ -6491,14 +6491,25 @@ public final class ActivityThread {      private <T> T instantiate(ClassLoader cl, String className, Intent intent, Context c,              IntentInstantiator<T> instantiator)              throws ClassNotFoundException, IllegalAccessException, InstantiationException { -        if (c.getApplicationContext() instanceof Application) { -            T a = instantiator.instantiate((Application) c.getApplicationContext(), -                    cl, className, intent); +        Application app = getApp(c); +        if (app != null) { +            T a = instantiator.instantiate(app, cl, className, intent);              if (a != null) return a;          }          return (T) cl.loadClass(className).newInstance();      } +    private Application getApp(Context c) { +        // We need this shortcut to avoid actually calling getApplicationContext() on an Application +        // because the Application may not return itself for getApplicationContext() because the +        // API doesn't enforce it. +        if (c instanceof Application) return (Application) c; +        if (c.getApplicationContext() instanceof Application) { +            return (Application) c.getApplicationContext(); +        } +        return null; +    } +      private interface Instantiator<T> {          T instantiate(Application app, ClassLoader cl, String className)                  throws ClassNotFoundException, IllegalAccessException, InstantiationException; diff --git a/core/java/android/app/NotificationChannel.java b/core/java/android/app/NotificationChannel.java index 143d147ab4e7..d6e36914ac6c 100644 --- a/core/java/android/app/NotificationChannel.java +++ b/core/java/android/app/NotificationChannel.java @@ -15,11 +15,6 @@   */  package android.app; -import org.json.JSONException; -import org.json.JSONObject; -import org.xmlpull.v1.XmlPullParser; -import org.xmlpull.v1.XmlSerializer; -  import android.annotation.SystemApi;  import android.app.NotificationManager.Importance;  import android.content.Intent; @@ -31,6 +26,11 @@ import android.provider.Settings;  import android.service.notification.NotificationListenerService;  import android.text.TextUtils; +import org.json.JSONException; +import org.json.JSONObject; +import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlSerializer; +  import java.io.IOException;  import java.util.Arrays; @@ -743,7 +743,7 @@ public final class NotificationChannel implements Parcelable {      private static String longArrayToString(long[] values) {          StringBuffer sb = new StringBuffer(); -        if (values != null) { +        if (values != null && values.length > 0) {              for (int i = 0; i < values.length - 1; i++) {                  sb.append(values[i]).append(DELIMITER);              } diff --git a/core/java/android/companion/CompanionDeviceManager.java b/core/java/android/companion/CompanionDeviceManager.java index 86a30cf0c846..076deab5d211 100644 --- a/core/java/android/companion/CompanionDeviceManager.java +++ b/core/java/android/companion/CompanionDeviceManager.java @@ -280,12 +280,24 @@ public final class CompanionDeviceManager {          @Override          public void onSuccess(PendingIntent launcher) { -            mHandler.post(() -> mCallback.onDeviceFound(launcher.getIntentSender())); +            Handler handler = mHandler; +            if (handler == null) return; +            handler.post(() -> { +                Callback callback = mCallback; +                if (callback == null) return; +                callback.onDeviceFound(launcher.getIntentSender()); +            });          }          @Override          public void onFailure(CharSequence reason) { -            mHandler.post(() -> mCallback.onFailure(reason)); +            Handler handler = mHandler; +            if (handler == null) return; +            handler.post(() -> { +                Callback callback = mCallback; +                if (callback == null) return; +                callback.onFailure(reason); +            });          }          @Override diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java index 9a014766c206..f098f2a7c143 100644 --- a/core/java/android/content/pm/ActivityInfo.java +++ b/core/java/android/content/pm/ActivityInfo.java @@ -765,6 +765,16 @@ public class ActivityInfo extends ComponentInfo       * constant starts at the high bits.       */      public static final int CONFIG_FONT_SCALE = 0x40000000; +    /** +     * Bit in {@link #configChanges} that indicates that the activity +     * can itself handle changes to the rotation.  Set from the +     * {@link android.R.attr#configChanges} attribute.  This is +     * not a core resource configuration, but a higher-level value, so its +     * constant starts at the high bits. +     * @hide We do not want apps to handle this. It will eventually be moved out of +     * {@link Configuration}. +     */ +    public static final int CONFIG_ROTATION = 0x20000000;      /** @hide       * Unfortunately the constants for config changes in native code are diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index c67376c25885..b39f9a5816fe 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -200,6 +200,8 @@ public class PackageParser {      // Temporary workaround; allow meta-data to expose components to instant apps      private static final String META_DATA_INSTANT_APPS = "instantapps.clients.allowed"; +    private static final String METADATA_MAX_ASPECT_RATIO = "android.max_aspect"; +      /**       * Bit mask of all the valid bits that can be set in recreateOnConfigChanges.       * @hide @@ -3639,6 +3641,7 @@ public class PackageParser {          final int innerDepth = parser.getDepth();          int type; +          while ((type = parser.next()) != XmlPullParser.END_DOCUMENT                  && (type != XmlPullParser.END_TAG || parser.getDepth() > innerDepth)) {              if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) { @@ -3815,6 +3818,10 @@ public class PackageParser {              }          } +        // Must be ran after the entire {@link ApplicationInfo} has been fully processed and after +        // every activity info has had a chance to set it from its attributes. +        setMaxAspectRatio(owner); +          modifySharedLibrariesForBackwardCompatibility(owner);          if (hasDomainURLs(owner)) { @@ -4258,7 +4265,12 @@ public class PackageParser {                  a.info.flags |= FLAG_ALWAYS_FOCUSABLE;              } -            setActivityMaxAspectRatio(a.info, sa, owner); +            if (sa.hasValue(R.styleable.AndroidManifestActivity_maxAspectRatio) +                    && sa.getType(R.styleable.AndroidManifestActivity_maxAspectRatio) +                    == TypedValue.TYPE_FLOAT) { +                a.setMaxAspectRatio(sa.getFloat(R.styleable.AndroidManifestActivity_maxAspectRatio, +                        0 /*default*/)); +            }              a.info.lockTaskLaunchMode =                      sa.getInt(R.styleable.AndroidManifestActivity_lockTaskMode, 0); @@ -4496,28 +4508,40 @@ public class PackageParser {          }      } -    private void setActivityMaxAspectRatio(ActivityInfo aInfo, TypedArray sa, Package owner) { -        if (aInfo.resizeMode == RESIZE_MODE_RESIZEABLE -                || aInfo.resizeMode == RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION) { -            // Resizeable activities can be put in any aspect ratio. -            aInfo.maxAspectRatio = 0; -            return; -        } - +    /** +     * Sets every the max aspect ratio of every child activity that doesn't already have an aspect +     * ratio set. +     */ +    private void setMaxAspectRatio(Package owner) {          // Default to (1.86) 16.7:9 aspect ratio for pre-O apps and unset for O and greater.          // NOTE: 16.7:9 was the max aspect ratio Android devices can support pre-O per the CDD. -        float defaultMaxAspectRatio = owner.applicationInfo.targetSdkVersion < O +        float maxAspectRatio = owner.applicationInfo.targetSdkVersion < O                  ? DEFAULT_PRE_O_MAX_ASPECT_RATIO : 0; -        if (owner.applicationInfo.maxAspectRatio != 0 ) { + +        if (owner.applicationInfo.maxAspectRatio != 0) {              // Use the application max aspect ration as default if set. -            defaultMaxAspectRatio = owner.applicationInfo.maxAspectRatio; +            maxAspectRatio = owner.applicationInfo.maxAspectRatio; +        } else if (owner.mAppMetaData != null +                && owner.mAppMetaData.containsKey(METADATA_MAX_ASPECT_RATIO)) { +            maxAspectRatio = owner.mAppMetaData.getFloat(METADATA_MAX_ASPECT_RATIO, maxAspectRatio);          } -        aInfo.maxAspectRatio = sa.getFloat( -                R.styleable.AndroidManifestActivity_maxAspectRatio, defaultMaxAspectRatio); -        if (aInfo.maxAspectRatio < 1.0f && aInfo.maxAspectRatio != 0) { -            // Ignore any value lesser than 1.0. -            aInfo.maxAspectRatio = 0; +        for (Activity activity : owner.activities) { +            // If the max aspect ratio for the activity has already been set, skip. +            if (activity.hasMaxAspectRatio()) { +                continue; +            } + +            // By default we prefer to use a values defined on the activity directly than values +            // defined on the application. We do not check the styled attributes on the activity +            // as it would have already been set when we processed the activity. We wait to process +            // the meta data here since this method is called at the end of processing the +            // application and all meta data is guaranteed. +            final float activityAspectRatio = activity.metaData != null +                    ? activity.metaData.getFloat(METADATA_MAX_ASPECT_RATIO, maxAspectRatio) +                    : maxAspectRatio; + +            activity.setMaxAspectRatio(activityAspectRatio);          }      } @@ -4658,6 +4682,7 @@ public class PackageParser {          info.windowLayout = target.info.windowLayout;          info.resizeMode = target.info.resizeMode;          info.maxAspectRatio = target.info.maxAspectRatio; +          info.encryptionAware = info.directBootAware = target.info.directBootAware;          Activity a = new Activity(mParseActivityAliasArgs, info); @@ -6940,6 +6965,11 @@ public class PackageParser {      public final static class Activity extends Component<ActivityIntentInfo> implements Parcelable {          public final ActivityInfo info; +        private boolean mHasMaxAspectRatio; + +        private boolean hasMaxAspectRatio() { +            return mHasMaxAspectRatio; +        }          public Activity(final ParseComponentArgs args, final ActivityInfo _info) {              super(args, _info); @@ -6952,6 +6982,23 @@ public class PackageParser {              info.packageName = packageName;          } + +        private void setMaxAspectRatio(float maxAspectRatio) { +            if (info.resizeMode == RESIZE_MODE_RESIZEABLE +                    || info.resizeMode == RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION) { +                // Resizeable activities can be put in any aspect ratio. +                return; +            } + +            if (maxAspectRatio < 1.0f && maxAspectRatio != 0) { +                // Ignore any value lesser than 1.0. +                return; +            } + +            info.maxAspectRatio = maxAspectRatio; +            mHasMaxAspectRatio = true; +        } +          public String toString() {              StringBuilder sb = new StringBuilder(128);              sb.append("Activity{"); @@ -6971,11 +7018,13 @@ public class PackageParser {          public void writeToParcel(Parcel dest, int flags) {              super.writeToParcel(dest, flags);              dest.writeParcelable(info, flags | Parcelable.PARCELABLE_ELIDE_DUPLICATES); +            dest.writeBoolean(mHasMaxAspectRatio);          }          private Activity(Parcel in) {              super(in);              info = in.readParcelable(Object.class.getClassLoader()); +            mHasMaxAspectRatio = in.readBoolean();              for (ActivityIntentInfo aii : intents) {                  aii.activity = this; diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java index ef279b86662a..68d4cd8c5f7d 100644 --- a/core/java/android/content/res/Configuration.java +++ b/core/java/android/content/res/Configuration.java @@ -1395,7 +1395,7 @@ public final class Configuration implements Parcelable, Comparable<Configuration          }          if ((compareUndefined || delta.mRotation != ROTATION_UNDEFINED)                  && mRotation != delta.mRotation) { -            changed |= ActivityInfo.CONFIG_ORIENTATION; +            changed |= ActivityInfo.CONFIG_ROTATION;          }          if ((compareUndefined || getScreenLayoutNoDirection(delta.screenLayout) !=                  (SCREENLAYOUT_SIZE_UNDEFINED | SCREENLAYOUT_LONG_UNDEFINED)) diff --git a/core/java/android/hardware/camera2/CameraManager.java b/core/java/android/hardware/camera2/CameraManager.java index 1b150bfca63a..90bf896c2225 100644 --- a/core/java/android/hardware/camera2/CameraManager.java +++ b/core/java/android/hardware/camera2/CameraManager.java @@ -16,28 +16,29 @@  package android.hardware.camera2; -import android.annotation.RequiresPermission; -import android.annotation.SystemService;  import android.annotation.NonNull;  import android.annotation.Nullable; +import android.annotation.RequiresPermission; +import android.annotation.SystemService;  import android.content.Context; -import android.hardware.ICameraService; -import android.hardware.ICameraServiceListener;  import android.hardware.CameraInfo;  import android.hardware.CameraStatus; +import android.hardware.ICameraService; +import android.hardware.ICameraServiceListener;  import android.hardware.camera2.impl.CameraMetadataNative;  import android.hardware.camera2.legacy.CameraDeviceUserShim;  import android.hardware.camera2.legacy.LegacyMetadataMapper; -import android.os.IBinder;  import android.os.Binder;  import android.os.DeadObjectException;  import android.os.Handler; +import android.os.IBinder;  import android.os.Looper;  import android.os.RemoteException;  import android.os.ServiceManager;  import android.os.ServiceSpecificException; -import android.util.Log; +import android.os.SystemProperties;  import android.util.ArrayMap; +import android.util.Log;  import java.util.ArrayList; @@ -210,7 +211,9 @@ public final class CameraManager {      public CameraCharacteristics getCameraCharacteristics(@NonNull String cameraId)              throws CameraAccessException {          CameraCharacteristics characteristics = null; - +        if (CameraManagerGlobal.sCameraServiceDisabled) { +            throw new IllegalArgumentException("No cameras available on device"); +        }          synchronized (mLock) {              /*               * Get the camera characteristics from the camera service directly if it supports it, @@ -462,6 +465,9 @@ public final class CameraManager {                          "Handler argument is null, but no looper exists in the calling thread");              }          } +        if (CameraManagerGlobal.sCameraServiceDisabled) { +            throw new IllegalArgumentException("No cameras available on device"); +        }          openCameraDeviceUserAsync(cameraId, callback, handler, clientUid);      } @@ -507,6 +513,9 @@ public final class CameraManager {       */      public void setTorchMode(@NonNull String cameraId, boolean enabled)              throws CameraAccessException { +        if (CameraManagerGlobal.sCameraServiceDisabled) { +            throw new IllegalArgumentException("No cameras available on device"); +        }          CameraManagerGlobal.get().setTorchMode(cameraId, enabled);      } @@ -745,6 +754,9 @@ public final class CameraManager {          private CameraManagerGlobal() {          } +        public static final boolean sCameraServiceDisabled = +                SystemProperties.getBoolean("config.disable_cameraservice", false); +          public static CameraManagerGlobal get() {              return gCameraManager;          } @@ -764,7 +776,7 @@ public final class CameraManager {          public ICameraService getCameraService() {              synchronized(mLock) {                  connectCameraServiceLocked(); -                if (mCameraService == null) { +                if (mCameraService == null && !sCameraServiceDisabled) {                      Log.e(TAG, "Camera service is unavailable");                  }                  return mCameraService; @@ -779,7 +791,7 @@ public final class CameraManager {           */          private void connectCameraServiceLocked() {              // Only reconnect if necessary -            if (mCameraService != null) return; +            if (mCameraService != null || sCameraServiceDisabled) return;              Log.i(TAG, "Connecting to camera service"); diff --git a/core/java/android/net/ITetheringStatsProvider.aidl b/core/java/android/net/ITetheringStatsProvider.aidl new file mode 100644 index 000000000000..769086da42b4 --- /dev/null +++ b/core/java/android/net/ITetheringStatsProvider.aidl @@ -0,0 +1,33 @@ +/* + * 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 android.net; + +import android.net.NetworkStats; + +/** + * Interface that allows NetworkManagementService to query for tethering statistics. + * + * TODO: this does not really need to be an interface since Tethering runs in the same process + * as NetworkManagementService. Consider refactoring Tethering to use direct access to + * NetworkManagementService instead of using INetworkManagementService, and then deleting this + * interface. + * + * @hide + */ +interface ITetheringStatsProvider { +    NetworkStats getTetherStats(); +} diff --git a/core/java/android/os/INetworkManagementService.aidl b/core/java/android/os/INetworkManagementService.aidl index 92e78bc8d977..3de217494ac5 100644 --- a/core/java/android/os/INetworkManagementService.aidl +++ b/core/java/android/os/INetworkManagementService.aidl @@ -20,6 +20,7 @@ package android.os;  import android.net.InterfaceConfiguration;  import android.net.INetd;  import android.net.INetworkManagementEventObserver; +import android.net.ITetheringStatsProvider;  import android.net.Network;  import android.net.NetworkStats;  import android.net.RouteInfo; @@ -207,6 +208,18 @@ interface INetworkManagementService      void disableNat(String internalInterface, String externalInterface);      /** +     * Registers a {@code ITetheringStatsProvider} to provide tethering statistics. +     * All registered providers will be called in order, and their results will be added together. +     * Netd is always registered as a tethering stats provider. +     */ +    void registerTetheringStatsProvider(ITetheringStatsProvider provider, String name); + +    /** +     * Unregisters a previously-registered {@code ITetheringStatsProvider}. +     */ +    void unregisterTetheringStatsProvider(ITetheringStatsProvider provider); + +    /**       ** PPPD       **/ diff --git a/core/java/android/os/RecoverySystem.java b/core/java/android/os/RecoverySystem.java index 2c6c7f96c517..7fa1c5acb688 100644 --- a/core/java/android/os/RecoverySystem.java +++ b/core/java/android/os/RecoverySystem.java @@ -751,7 +751,9 @@ public class RecoverySystem {          // Block until the ordered broadcast has completed.          condition.block(); -        wipeEuiccData(context, wipeEuicc); +        // TODO(b/63693573): Uncomment this once the pSIM slot is restored as needed +        // after the ensuing boot. Currently you end up stuck on the eSIM. +        // wipeEuiccData(context, wipeEuicc);          String shutdownArg = null;          if (shutdown) { @@ -808,7 +810,8 @@ public class RecoverySystem {              HandlerThread euiccHandlerThread = new HandlerThread("euiccWipeFinishReceiverThread");              euiccHandlerThread.start();              Handler euiccHandler = new Handler(euiccHandlerThread.getLooper()); -            context.registerReceiver(euiccWipeFinishReceiver, filterConsent, null, euiccHandler); +            context.getApplicationContext() +                    .registerReceiver(euiccWipeFinishReceiver, filterConsent, null, euiccHandler);              if (isWipeEuicc) {                  euiccManager.eraseSubscriptions(callbackIntent);              } else { @@ -831,7 +834,7 @@ public class RecoverySystem {                          Log.e(TAG, "Timeout retaining eUICC data.");                      }                  } -                context.unregisterReceiver(euiccWipeFinishReceiver); +                context.getApplicationContext().unregisterReceiver(euiccWipeFinishReceiver);              } catch (InterruptedException e) {                  Thread.currentThread().interrupt();                  if (isWipeEuicc) { diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 41cc12b8ffe1..e84a041dae08 100755 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -6515,6 +6515,12 @@ public final class Settings {          public static final String DOZE_PULSE_ON_PICK_UP = "doze_pulse_on_pick_up";          /** +         * Whether the device should pulse on long press gesture. +         * @hide +         */ +        public static final String DOZE_PULSE_ON_LONG_PRESS = "doze_pulse_on_long_press"; + +        /**           * Whether the device should pulse on double tap gesture.           * @hide           */ diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java index 7538f6561c1e..ba9e05c2d870 100644 --- a/core/java/android/view/WindowManagerPolicy.java +++ b/core/java/android/view/WindowManagerPolicy.java @@ -150,6 +150,11 @@ public interface WindowManagerPolicy {      public final static int PRESENCE_INTERNAL = 1 << 0;      public final static int PRESENCE_EXTERNAL = 1 << 1; +    // Navigation bar position values +    int NAV_BAR_LEFT = 1 << 0; +    int NAV_BAR_RIGHT = 1 << 1; +    int NAV_BAR_BOTTOM = 1 << 2; +      public final static boolean WATCH_POINTER = false;      /** @@ -1676,6 +1681,14 @@ public interface WindowManagerPolicy {      public boolean isNavBarForcedShownLw(WindowState win);      /** +     * @return The side of the screen where navigation bar is positioned. +     * @see #NAV_BAR_LEFT +     * @see #NAV_BAR_RIGHT +     * @see #NAV_BAR_BOTTOM +     */ +    int getNavBarPosition(); + +    /**       * Calculates the insets for the areas that could never be removed in Honeycomb, i.e. system       * bar or button bar. See {@link #getNonDecorDisplayWidth}.       * diff --git a/core/java/android/widget/TextInputTimePickerView.java b/core/java/android/widget/TextInputTimePickerView.java index 11b7514d6ac8..0cf8faad1c57 100644 --- a/core/java/android/widget/TextInputTimePickerView.java +++ b/core/java/android/widget/TextInputTimePickerView.java @@ -17,6 +17,7 @@  package android.widget;  import android.content.Context; +import android.os.LocaleList;  import android.text.Editable;  import android.text.InputFilter;  import android.text.TextWatcher; @@ -141,6 +142,9 @@ public class TextInputTimePickerView extends RelativeLayout {                  new InputFilter.LengthFilter(maxCharLength)});          mMinuteEditText.setFilters(new InputFilter[] {                  new InputFilter.LengthFilter(maxCharLength)}); +        final LocaleList locales = mContext.getResources().getConfiguration().getLocales(); +        mHourEditText.setImeHintLocales(locales); +        mMinuteEditText.setImeHintLocales(locales);      }      boolean validateInput() { diff --git a/core/java/com/android/internal/colorextraction/ColorExtractor.java b/core/java/com/android/internal/colorextraction/ColorExtractor.java index 2608698f5b63..2648604291d9 100644 --- a/core/java/com/android/internal/colorextraction/ColorExtractor.java +++ b/core/java/com/android/internal/colorextraction/ColorExtractor.java @@ -43,10 +43,6 @@ public class ColorExtractor implements WallpaperManager.OnColorsChangedListener      private static final String TAG = "ColorExtractor"; -    public static final int FALLBACK_COLOR = 0xff83888d; - -    private int mMainFallbackColor = FALLBACK_COLOR; -    private int mSecondaryFallbackColor = FALLBACK_COLOR;      private final SparseArray<GradientColors[]> mGradientColors;      private final ArrayList<OnColorsChangedListener> mOnColorsChangedListeners;      private final Context mContext; @@ -55,7 +51,7 @@ public class ColorExtractor implements WallpaperManager.OnColorsChangedListener      private WallpaperColors mLockColors;      public ColorExtractor(Context context) { -        this(context, new Tonal()); +        this(context, new Tonal(context));      }      @VisibleForTesting @@ -73,6 +69,9 @@ public class ColorExtractor implements WallpaperManager.OnColorsChangedListener          }          mOnColorsChangedListeners = new ArrayList<>(); +        GradientColors[] systemColors = mGradientColors.get(WallpaperManager.FLAG_SYSTEM); +        GradientColors[] lockColors = mGradientColors.get(WallpaperManager.FLAG_LOCK); +          WallpaperManager wallpaperManager = mContext.getSystemService(WallpaperManager.class);          if (wallpaperManager == null) {              Log.w(TAG, "Can't listen to color changes!"); @@ -83,23 +82,18 @@ public class ColorExtractor implements WallpaperManager.OnColorsChangedListener              Trace.beginSection("ColorExtractor#getWallpaperColors");              mSystemColors = wallpaperManager.getWallpaperColors(WallpaperManager.FLAG_SYSTEM);              mLockColors = wallpaperManager.getWallpaperColors(WallpaperManager.FLAG_LOCK); - -            GradientColors[] systemColors = mGradientColors.get( -                    WallpaperManager.FLAG_SYSTEM); -            extractInto(mSystemColors, -                    systemColors[TYPE_NORMAL], -                    systemColors[TYPE_DARK], -                    systemColors[TYPE_EXTRA_DARK]); - -            GradientColors[] lockColors = mGradientColors.get(WallpaperManager.FLAG_LOCK); -            extractInto(mLockColors, -                    lockColors[TYPE_NORMAL], -                    lockColors[TYPE_DARK], -                    lockColors[TYPE_EXTRA_DARK]); -            triggerColorsChanged(WallpaperManager.FLAG_SYSTEM -                    | WallpaperManager.FLAG_LOCK);              Trace.endSection();          } + +        // Initialize all gradients with the current colors +        extractInto(mSystemColors, +                systemColors[TYPE_NORMAL], +                systemColors[TYPE_DARK], +                systemColors[TYPE_EXTRA_DARK]); +        extractInto(mLockColors, +                lockColors[TYPE_NORMAL], +                lockColors[TYPE_DARK], +                lockColors[TYPE_EXTRA_DARK]);      }      /** @@ -181,25 +175,8 @@ public class ColorExtractor implements WallpaperManager.OnColorsChangedListener      private void extractInto(WallpaperColors inWallpaperColors,              GradientColors outGradientColorsNormal, GradientColors outGradientColorsDark,              GradientColors outGradientColorsExtraDark) { -        if (inWallpaperColors == null) { -            applyFallback(outGradientColorsNormal); -            applyFallback(outGradientColorsDark); -            applyFallback(outGradientColorsExtraDark); -            return; -        } -        boolean success = mExtractionType.extractInto(inWallpaperColors, outGradientColorsNormal, +        mExtractionType.extractInto(inWallpaperColors, outGradientColorsNormal,                  outGradientColorsDark, outGradientColorsExtraDark); -        if (!success) { -            applyFallback(outGradientColorsNormal); -            applyFallback(outGradientColorsDark); -            applyFallback(outGradientColorsExtraDark); -        } -    } - -    private void applyFallback(GradientColors outGradientColors) { -        outGradientColors.setMainColor(mMainFallbackColor); -        outGradientColors.setSecondaryColor(mSecondaryFallbackColor); -        outGradientColors.setSupportsDarkText(false);      }      public void destroy() { @@ -218,8 +195,8 @@ public class ColorExtractor implements WallpaperManager.OnColorsChangedListener      }      public static class GradientColors { -        private int mMainColor = FALLBACK_COLOR; -        private int mSecondaryColor = FALLBACK_COLOR; +        private int mMainColor; +        private int mSecondaryColor;          private boolean mSupportsDarkText;          public void setMainColor(int mainColor) { diff --git a/core/java/com/android/internal/colorextraction/types/ExtractionType.java b/core/java/com/android/internal/colorextraction/types/ExtractionType.java index 762b54fb1e6b..7000e798f87b 100644 --- a/core/java/com/android/internal/colorextraction/types/ExtractionType.java +++ b/core/java/com/android/internal/colorextraction/types/ExtractionType.java @@ -38,9 +38,8 @@ public interface ExtractionType {       * @param outGradientColorsNormal object that should receive normal colors       * @param outGradientColorsDark object that should receive dark colors       * @param outGradientColorsExtraDark object that should receive extra dark colors -     * @return true if successful.       */ -    boolean extractInto(WallpaperColors inWallpaperColors, +    void extractInto(WallpaperColors inWallpaperColors,              ColorExtractor.GradientColors outGradientColorsNormal,              ColorExtractor.GradientColors outGradientColorsDark,              ColorExtractor.GradientColors outGradientColorsExtraDark); diff --git a/core/java/com/android/internal/colorextraction/types/Tonal.java b/core/java/com/android/internal/colorextraction/types/Tonal.java index b8ebe3000d8e..dbc086c21304 100644 --- a/core/java/com/android/internal/colorextraction/types/Tonal.java +++ b/core/java/com/android/internal/colorextraction/types/Tonal.java @@ -19,15 +19,22 @@ package com.android.internal.colorextraction.types;  import android.annotation.NonNull;  import android.annotation.Nullable;  import android.app.WallpaperColors; +import android.content.Context;  import android.graphics.Color;  import android.util.Log;  import android.util.MathUtils;  import android.util.Range; +import com.android.internal.R;  import com.android.internal.annotations.VisibleForTesting;  import com.android.internal.colorextraction.ColorExtractor.GradientColors;  import com.android.internal.graphics.ColorUtils; +import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlPullParserException; + +import java.io.IOException; +import java.util.ArrayList;  import java.util.Arrays;  import java.util.List; @@ -44,24 +51,68 @@ public class Tonal implements ExtractionType {      private static final boolean DEBUG = true; +    public static final int MAIN_COLOR_LIGHT = 0xffe0e0e0; +    public static final int SECONDARY_COLOR_LIGHT = 0xff9e9e9e; +    public static final int MAIN_COLOR_DARK = 0xff212121; +    public static final int SECONDARY_COLOR_DARK = 0xff000000; + +    private final TonalPalette mGreyPalette; +    private final ArrayList<TonalPalette> mTonalPalettes; +    private final ArrayList<ColorRange> mBlacklistedColors; +      // Temporary variable to avoid allocations      private float[] mTmpHSL = new float[3]; +    public Tonal(Context context) { + +        ConfigParser parser = new ConfigParser(context); +        mTonalPalettes = parser.getTonalPalettes(); +        mBlacklistedColors = parser.getBlacklistedColors(); + +        mGreyPalette = mTonalPalettes.get(0); +        mTonalPalettes.remove(0); +    } + +    /** +     * Grab colors from WallpaperColors and set them into GradientColors. +     * Also applies the default gradient in case extraction fails. +     * +     * @param inWallpaperColors Input. +     * @param outColorsNormal Colors for normal theme. +     * @param outColorsDark Colors for dar theme. +     * @param outColorsExtraDark Colors for extra dark theme. +     */ +    public void extractInto(@Nullable WallpaperColors inWallpaperColors, +            @NonNull GradientColors outColorsNormal, @NonNull GradientColors outColorsDark, +            @NonNull GradientColors outColorsExtraDark) { +        boolean success = runTonalExtraction(inWallpaperColors, outColorsNormal, outColorsDark, +                outColorsExtraDark); +        if (!success) { +            applyFallback(inWallpaperColors, outColorsNormal, outColorsDark, outColorsExtraDark); +        } +    } +      /** -     * Grab colors from WallpaperColors as set them into GradientColors +     * Grab colors from WallpaperColors and set them into GradientColors.       * -     * @param inWallpaperColors input -     * @param outColorsNormal colors for normal theme -     * @param outColorsDark colors for dar theme -     * @param outColorsExtraDark colors for extra dark theme -     * @return true if successful +     * @param inWallpaperColors Input. +     * @param outColorsNormal Colors for normal theme. +     * @param outColorsDark Colors for dar theme. +     * @param outColorsExtraDark Colors for extra dark theme. +     * @return True if succeeded or false if failed.       */ -    public boolean extractInto(@NonNull WallpaperColors inWallpaperColors, +    private boolean runTonalExtraction(@Nullable WallpaperColors inWallpaperColors,              @NonNull GradientColors outColorsNormal, @NonNull GradientColors outColorsDark,              @NonNull GradientColors outColorsExtraDark) { +        if (inWallpaperColors == null) { +            return false; +        } +          final List<Color> mainColors = inWallpaperColors.getMainColors();          final int mainColorsSize = mainColors.size(); +        final boolean supportsDarkText = (inWallpaperColors.getColorHints() & +                WallpaperColors.HINT_SUPPORTS_DARK_TEXT) != 0;          if (mainColorsSize == 0) {              return false; @@ -120,7 +171,6 @@ public class Tonal implements ExtractionType {          float[] s = fit(palette.s, hsl[1], fitIndex, 0.0f, 1.0f);          float[] l = fit(palette.l, hsl[2], fitIndex, 0.0f, 1.0f); -        final int textInversionIndex = h.length - 3;          if (DEBUG) {              StringBuilder builder = new StringBuilder("Tonal Palette - index: " + fitIndex +                      ". Main color: " + Integer.toHexString(getColorInt(fitIndex, h, s, l)) + @@ -135,21 +185,38 @@ public class Tonal implements ExtractionType {              Log.d(TAG, builder.toString());          } +        int primaryIndex = fitIndex; +        int mainColor = getColorInt(primaryIndex, h, s, l); + +        // We might want use the fallback in case the extracted color is brighter than our +        // light fallback or darker than our dark fallback. +        ColorUtils.colorToHSL(mainColor, mTmpHSL); +        final float mainLuminosity = mTmpHSL[2]; +        ColorUtils.colorToHSL(MAIN_COLOR_LIGHT, mTmpHSL); +        final float lightLuminosity = mTmpHSL[2]; +        if (mainLuminosity > lightLuminosity) { +            return false; +        } +        ColorUtils.colorToHSL(MAIN_COLOR_DARK, mTmpHSL); +        final float darkLuminosity = mTmpHSL[2]; +        if (mainLuminosity < darkLuminosity) { +            return false; +        } +          // Normal colors:          // best fit + a 2 colors offset -        int primaryIndex = fitIndex; +        outColorsNormal.setMainColor(mainColor);          int secondaryIndex = primaryIndex + (primaryIndex >= 2 ? -2 : 2); -        outColorsNormal.setMainColor(getColorInt(primaryIndex, h, s, l));          outColorsNormal.setSecondaryColor(getColorInt(secondaryIndex, h, s, l));          // Dark colors:          // Stops at 4th color, only lighter if dark text is supported -        if (fitIndex < 2) { +        if (supportsDarkText) { +            primaryIndex = h.length - 1; +        } else if (fitIndex < 2) {              primaryIndex = 0; -        } else if (fitIndex < textInversionIndex) { -            primaryIndex = Math.min(fitIndex, 3);          } else { -            primaryIndex = h.length - 1; +            primaryIndex = Math.min(fitIndex, 3);          }          secondaryIndex = primaryIndex + (primaryIndex >= 2 ? -2 : 2);          outColorsDark.setMainColor(getColorInt(primaryIndex, h, s, l)); @@ -157,30 +224,56 @@ public class Tonal implements ExtractionType {          // Extra Dark:          // Stay close to dark colors until dark text is supported -        if (fitIndex < 2) { +        if (supportsDarkText) { +            primaryIndex = h.length - 1; +        } else if (fitIndex < 2) {              primaryIndex = 0; -        } else if (fitIndex < textInversionIndex) { -            primaryIndex = 2;          } else { -            primaryIndex = h.length - 1; +            primaryIndex = 2;          }          secondaryIndex = primaryIndex + (primaryIndex >= 2 ? -2 : 2);          outColorsExtraDark.setMainColor(getColorInt(primaryIndex, h, s, l));          outColorsExtraDark.setSecondaryColor(getColorInt(secondaryIndex, h, s, l)); -        final boolean supportsDarkText = fitIndex >= textInversionIndex;          outColorsNormal.setSupportsDarkText(supportsDarkText);          outColorsDark.setSupportsDarkText(supportsDarkText);          outColorsExtraDark.setSupportsDarkText(supportsDarkText);          if (DEBUG) {              Log.d(TAG, "Gradients: \n\tNormal " + outColorsNormal + "\n\tDark " + outColorsDark -            + "\n\tExtra dark: " + outColorsExtraDark); +                    + "\n\tExtra dark: " + outColorsExtraDark);          }          return true;      } +    private void applyFallback(@Nullable WallpaperColors inWallpaperColors, +            GradientColors outColorsNormal, GradientColors outColorsDark, +            GradientColors outColorsExtraDark) { +        applyFallback(inWallpaperColors, outColorsNormal); +        applyFallback(inWallpaperColors, outColorsDark); +        applyFallback(inWallpaperColors, outColorsExtraDark); +    } + +    /** +     * Sets the gradient to the light or dark fallbacks based on the current wallpaper colors. +     * +     * @param inWallpaperColors Colors to read. +     * @param outGradientColors Destination. +     */ +    public static void applyFallback(@Nullable WallpaperColors inWallpaperColors, +            @NonNull GradientColors outGradientColors) { +        boolean light = inWallpaperColors != null +                && (inWallpaperColors.getColorHints() & WallpaperColors.HINT_SUPPORTS_DARK_TEXT) +                != 0; +        int innerColor = light ? MAIN_COLOR_LIGHT : MAIN_COLOR_DARK; +        int outerColor = light ? SECONDARY_COLOR_LIGHT : SECONDARY_COLOR_DARK; + +        outGradientColors.setMainColor(innerColor); +        outGradientColors.setSecondaryColor(outerColor); +        outGradientColors.setSupportsDarkText(light); +    } +      private int getColorInt(int fitIndex, float[] h, float[] s, float[] l) {          mTmpHSL[0] = fract(h[fitIndex]) * 360.0f;          mTmpHSL[1] = s[fitIndex]; @@ -194,7 +287,8 @@ public class Tonal implements ExtractionType {       * @return true if color should be avoided       */      private boolean isBlacklisted(float[] hsl) { -        for (ColorRange badRange: BLACKLISTED_COLORS) { +        for (int i = mBlacklistedColors.size() - 1; i >= 0; i--) { +            ColorRange badRange = mBlacklistedColors.get(i);              if (badRange.containsColor(hsl[0], hsl[1], hsl[2])) {                  return true;              } @@ -250,19 +344,25 @@ public class Tonal implements ExtractionType {          return minErrorIndex;      } +    @VisibleForTesting +    public List<ColorRange> getBlacklistedColors() { +        return mBlacklistedColors; +    } +      @Nullable -    private static TonalPalette findTonalPalette(float h, float s) { +    private TonalPalette findTonalPalette(float h, float s) {          // Fallback to a grey palette if the color is too desaturated.          // This avoids hue shifts.          if (s < 0.05f) { -            return GREY_PALETTE; +            return mGreyPalette;          }          TonalPalette best = null;          float error = Float.POSITIVE_INFINITY; -        for (int i = 0; i < TONAL_PALETTES.length; i++) { -            final TonalPalette candidate = TONAL_PALETTES[i]; +        final int tonalPalettesCount = mTonalPalettes.size(); +        for (int i = 0; i < tonalPalettesCount; i++) { +            final TonalPalette candidate = mTonalPalettes.get(i);              if (h >= candidate.minHue && h <= candidate.maxHue) {                  best = candidate; @@ -316,7 +416,6 @@ public class Tonal implements ExtractionType {                          + Arrays.toString(h) + " s: " + Arrays.toString(s) + " l: "                          + Arrays.toString(l));              } -              this.h = h;              this.s = s;              this.l = l; @@ -334,430 +433,6 @@ public class Tonal implements ExtractionType {          }      } -    // Data definition of Material Design tonal palettes -    // When the sort type is set to TONAL, these palettes are used to find -    // a best fit. Each palette is defined as 22 HSL colors -    private static final TonalPalette[] TONAL_PALETTES = { -            new TonalPalette( -                    new float[] {1f, 1f, 0.991f, 0.991f, 0.9833333333333333f, 0f, 0f, 0f, -                            0.01134380453752181f, 0.015625000000000003f, 0.024193548387096798f, -                            0.027397260273972573f, 0.017543859649122865f}, -                    new float[] {1f, 1f, 1f, 1f, 1f, 1f, 1f, 0.8434782608695652f, 1f, 1f, 1f, 1f, -                            1f}, -                    new float[] {0.04f, 0.09f, 0.14f, 0.2f, 0.27450980392156865f, -                            0.34901960784313724f, 0.4235294117647059f, 0.5490196078431373f, -                            0.6254901960784314f, 0.6862745098039216f, 0.7568627450980392f, -                            0.8568627450980393f, 0.9254901960784314f} -            ), -            new TonalPalette( -                    new float[] {0.638f, 0.638f, 0.6385767790262171f, 0.6301169590643275f, -                            0.6223958333333334f, 0.6151079136690647f, 0.6065400843881856f, -                            0.5986964618249534f, 0.5910746812386157f, 0.5833333333333334f, -                            0.5748031496062993f, 0.5582010582010583f}, -                    new float[] {1f, 1f, 1f, 1f, 0.9014084507042253f, 0.8128654970760234f, -                            0.7979797979797981f, 0.7816593886462883f, 0.778723404255319f, 1f, 1f, -                            1f}, -                    new float[] {0.05f, 0.12f, 0.17450980392156862f, 0.2235294117647059f, -                            0.2784313725490196f, 0.3352941176470588f, 0.388235294117647f, -                            0.44901960784313727f, 0.5392156862745098f, 0.6509803921568628f, -                            0.7509803921568627f, 0.8764705882352941f} -            ), -            new TonalPalette( -                    new float[] {0.563f, 0.569f, 0.5666f, 0.5669934640522876f, 0.5748031496062993f, -                            0.5595238095238095f, 0.5473118279569893f, 0.5393258426966292f, -                            0.5315955766192734f, 0.524031007751938f, 0.5154711673699016f, -                            0.508080808080808f, 0.5f}, -                    new float[] {1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0.8847736625514403f, 1f, 1f, -                            1f}, -                    new float[] {0.07f, 0.12f, 0.16f, 0.2f, 0.24901960784313726f, -                            0.27450980392156865f, 0.30392156862745096f, 0.34901960784313724f, -                            0.4137254901960784f, 0.47647058823529415f, 0.5352941176470588f, -                            0.6764705882352942f, 0.8f} -            ), -            new TonalPalette( -                    new float[] {0.508f, 0.511f, 0.508f, 0.508f, 0.5082304526748972f, -                            0.5069444444444444f, 0.5f, 0.5f, 0.5f, 0.48724954462659376f, -                            0.4800347222222222f, 0.4755134281200632f, 0.4724409448818897f, -                            0.4671052631578947f}, -                    new float[] {1f, 1f, 1f, 1f, 1f, 0.8888888888888887f, 0.9242424242424242f, 1f, -                            1f, 0.8133333333333332f, 0.7868852459016393f, 1f, 1f, 1f}, -                    new float[] {0.04f, 0.06f, 0.08f, 0.12f, 0.1588235294117647f, -                            0.21176470588235297f, 0.25882352941176473f, 0.3f, 0.34901960784313724f, -                            0.44117647058823534f, 0.5215686274509804f, 0.5862745098039216f, -                            0.7509803921568627f, 0.8509803921568627f} -            ), -            new TonalPalette( -                    new float[] {0.333f, 0.333f, 0.333f, 0.3333333333333333f, 0.3333333333333333f, -                            0.34006734006734f, 0.34006734006734f, 0.34006734006734f, -                            0.34259259259259256f, 0.3475783475783476f, 0.34767025089605735f, -                            0.3467741935483871f, 0.3703703703703704f}, -                    new float[] {0.70f, 0.72f, 0.69f, 0.6703296703296703f, 0.728813559322034f, -                            0.5657142857142856f, 0.5076923076923077f, 0.3944223107569721f, -                            0.6206896551724138f, 0.8931297709923666f, 1f, 1f, 1f}, -                    new float[] {0.05f, 0.08f, 0.14f, 0.1784313725490196f, 0.23137254901960785f, -                            0.3431372549019608f, 0.38235294117647056f, 0.49215686274509807f, -                            0.6588235294117647f, 0.7431372549019608f, 0.8176470588235294f, -                            0.8784313725490196f, 0.9294117647058824f} -            ), -            new TonalPalette( -                    new float[] {0.161f, 0.163f, 0.163f, 0.162280701754386f, 0.15032679738562088f, -                            0.15879265091863518f, 0.16236559139784948f, 0.17443868739205526f, -                            0.17824074074074076f, 0.18674698795180725f, 0.18692449355432778f, -                            0.1946778711484594f, 0.18604651162790695f}, -                    new float[] {1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f}, -                    new float[] {0.05f, 0.08f, 0.11f, 0.14901960784313725f, 0.2f, -                            0.24901960784313726f, 0.30392156862745096f, 0.3784313725490196f, -                            0.4235294117647059f, 0.48823529411764705f, 0.6450980392156863f, -                            0.7666666666666666f, 0.8313725490196078f} -            ), -            new TonalPalette( -                    new float[] {0.108f, 0.105f, 0.105f, 0.105f, 0.10619469026548674f, -                            0.11924686192468618f, 0.13046448087431692f, 0.14248366013071895f, -                            0.1506024096385542f, 0.16220238095238093f, 0.16666666666666666f, -                            0.16666666666666666f, 0.162280701754386f, 0.15686274509803924f}, -                    new float[] {1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f}, -                    new float[] {0.17f, 0.22f, 0.28f, 0.35f, 0.44313725490196076f, -                            0.46862745098039216f, 0.47843137254901963f, 0.5f, 0.5117647058823529f, -                            0.5607843137254902f, 0.6509803921568628f, 0.7509803921568627f, -                            0.8509803921568627f, 0.9f} -            ), -            new TonalPalette( -                    new float[] {0.036f, 0.036f, 0.036f, 0.036f, 0.03561253561253561f, -                            0.05098039215686275f, 0.07516339869281045f, 0.09477124183006536f, -                            0.1150326797385621f, 0.134640522875817f, 0.14640522875816991f, -                            0.1582397003745319f, 0.15773809523809523f, 0.15359477124183002f}, -                    new float[] {1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f}, -                    new float[] {0.19f, 0.26f, 0.34f, 0.39f, 0.4588235294117647f, 0.5f, 0.5f, 0.5f, -                            0.5f, 0.5f, 0.5f, 0.6509803921568628f, 0.7803921568627451f, 0.9f} -            ), -            new TonalPalette( -                    new float[] {0.955f, 0.961f, 0.958f, 0.9596491228070175f, 0.9593837535014005f, -                            0.9514767932489452f, 0.943859649122807f, 0.9396825396825397f, -                            0.9395424836601307f, 0.9393939393939394f, 0.9362745098039216f, -                            0.9754098360655739f, 0.9824561403508771f}, -                    new float[] {0.87f, 0.85f, 0.85f, 0.84070796460177f, 0.8206896551724138f, -                            0.7979797979797981f, 0.7661290322580644f, 0.9051724137931036f, -                            1f, 1f, 1f, 1f, 1f}, -                    new float[] {0.06f, 0.11f, 0.16f, 0.22156862745098038f, 0.2843137254901961f, -                            0.388235294117647f, 0.48627450980392156f, 0.5450980392156863f, -                            0.6f, 0.6764705882352942f, 0.8f, 0.8803921568627451f, -                            0.9254901960784314f} -            ), -            new TonalPalette( -                    new float[] {0.866f, 0.855f, 0.841025641025641f, 0.8333333333333334f, -                            0.8285256410256411f, 0.821522309711286f, 0.8083333333333333f, -                            0.8046594982078853f, 0.8005822416302766f, 0.7842377260981912f, -                            0.7771084337349398f, 0.7747747747747749f}, -                    new float[] {1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, -                            0.737142857142857f, 0.6434108527131781f, 0.46835443037974644f}, -                    new float[] {0.05f, 0.08f, 0.12745098039215685f, 0.15490196078431373f, -                            0.20392156862745098f, 0.24901960784313726f, 0.3137254901960784f, -                            0.36470588235294116f, 0.44901960784313727f, 0.6568627450980392f, -                            0.7470588235294118f, 0.8450980392156863f} -            ), -            new TonalPalette( -                    new float[] {0.925f, 0.93f, 0.938f, 0.947f, 0.955952380952381f, -                            0.9681069958847737f, 0.9760479041916167f, 0.9873563218390804f, 0f, 0f, -                            0.009057971014492771f, 0.026748971193415648f, -                            0.041666666666666616f, 0.05303030303030304f}, -                    new float[] {1f, 1f, 1f, 1f, 1f, 0.8350515463917526f, 0.6929460580912863f, -                            0.6387665198237885f, 0.6914893617021276f, 0.7583892617449666f, -                            0.8070175438596495f, 0.9310344827586209f, 1f, 1f}, -                    new float[] {0.10f, 0.13f, 0.17f, 0.2f, 0.27450980392156865f, -                            0.3803921568627451f, 0.4725490196078432f, 0.5549019607843138f, -                            0.6313725490196078f, 0.707843137254902f, 0.7764705882352941f, -                            0.8294117647058823f, 0.9058823529411765f, 0.9568627450980391f} -            ), -            new TonalPalette( -                    new float[] {0.733f, 0.736f, 0.744f, 0.7514619883040936f, 0.7679738562091503f, -                            0.7802083333333333f, 0.7844311377245509f, 0.796875f, -                            0.8165618448637316f, 0.8487179487179487f, 0.8582375478927203f, -                            0.8562091503267975f, 0.8666666666666667f}, -                    new float[] {1f, 1f, 1f, 1f, 1f, 0.8163265306122449f, 0.6653386454183268f, -                            0.7547169811320753f, 0.929824561403509f, 0.9558823529411766f, -                            0.9560439560439562f, 1f, 1f}, -                    new float[] {0.07f, 0.12f, 0.17f, 0.2235294117647059f, 0.3f, -                            0.38431372549019605f, 0.492156862745098f, 0.5843137254901961f, -                            0.6647058823529411f, 0.7333333333333334f, 0.8215686274509804f, 0.9f, -                            0.9411764705882353f} -            ), -            new TonalPalette( -                    new float[] {0.6666666666666666f, 0.6666666666666666f, 0.6666666666666666f, -                            0.6666666666666666f, 0.6666666666666666f, 0.6666666666666666f, -                            0.6666666666666666f, 0.6666666666666666f, 0.6666666666666666f, -                            0.6666666666666666f, 0.6666666666666666f}, -                    new float[] {0.25f, 0.24590163934426232f, 0.17880794701986752f, -                            0.14606741573033713f, 0.13761467889908252f, 0.14893617021276592f, -                            0.16756756756756758f, 0.20312500000000017f, 0.26086956521739135f, -                            0.29999999999999966f, 0.5000000000000004f}, -                    new float[] {0.18f, 0.2392156862745098f, 0.296078431372549f, -                            0.34901960784313724f, 0.4274509803921569f, 0.5392156862745098f, -                            0.6372549019607843f, 0.7490196078431373f, 0.8196078431372549f, -                            0.8823529411764706f, 0.9372549019607843f} -            ), -            new TonalPalette( -                    new float[] {0.938f, 0.944f, 0.952f, 0.961f, 0.9678571428571429f, -                            0.9944812362030905f, 0f, 0f, -                            0.0047348484848484815f, 0.00316455696202532f, 0f, -                            0.9980392156862745f, 0.9814814814814816f, 0.9722222222222221f}, -                    new float[] {1f, 1f, 1f, 1f, 1f, 0.7023255813953488f, 0.6638655462184874f, -                            0.6521739130434782f, 0.7719298245614035f, 0.8315789473684211f, -                            0.6867469879518071f, 0.7264957264957265f, 0.8181818181818182f, -                            0.8181818181818189f}, -                    new float[] {0.08f, 0.13f, 0.18f, 0.23f, 0.27450980392156865f, -                            0.4215686274509804f, -                            0.4666666666666667f, 0.503921568627451f, 0.5529411764705883f, -                            0.6274509803921569f, 0.6745098039215687f, 0.7705882352941176f, -                            0.892156862745098f, 0.9568627450980391f} -            ), -            new TonalPalette( -                    new float[] {0.88f, 0.888f, 0.897f, 0.9052287581699346f, 0.9112021857923498f, -                            0.9270152505446624f, 0.9343137254901961f, 0.9391534391534391f, -                            0.9437984496124031f, 0.943661971830986f, 0.9438943894389439f, -                            0.9426229508196722f, 0.9444444444444444f}, -                    new float[] {1f, 1f, 1f, 1f, 0.8133333333333332f, 0.7927461139896375f, -                            0.7798165137614679f, 0.7777777777777779f, 0.8190476190476191f, -                            0.8255813953488372f, 0.8211382113821142f, 0.8133333333333336f, -                            0.8000000000000006f}, -                    new float[] {0.08f, 0.12f, 0.16f, 0.2f, 0.29411764705882354f, -                            0.3784313725490196f, 0.42745098039215684f, 0.4764705882352941f, -                            0.5882352941176471f, 0.6627450980392157f, 0.7588235294117647f, -                            0.8529411764705882f, 0.9411764705882353f} -            ), -            new TonalPalette( -                    new float[] {0.669f, 0.680f, 0.6884057971014492f, 0.6974789915966387f, -                            0.7079889807162534f, 0.7154471544715447f, 0.7217741935483872f, -                            0.7274143302180687f, 0.7272727272727273f, 0.7258064516129031f, -                            0.7252252252252251f, 0.7333333333333333f}, -                    new float[] {0.81f, 0.81f, 0.8214285714285715f, 0.6878612716763006f, -                            0.6080402010050251f, 0.5774647887323943f, 0.5391304347826086f, -                            0.46724890829694316f, 0.4680851063829788f, 0.462686567164179f, -                            0.45679012345678977f, 0.4545454545454551f}, -                    new float[] {0.12f, 0.16f, 0.2196078431372549f, 0.33921568627450976f, -                            0.39019607843137255f, 0.4176470588235294f, 0.45098039215686275f, -                            0.5509803921568628f, 0.6313725490196078f, 0.7372549019607844f, -                            0.8411764705882353f, 0.9352941176470588f} -            ), -            new TonalPalette( -                    new float[] {0.6470588235294118f, 0.6516666666666667f, 0.6464174454828661f, -                            0.6441441441441442f, 0.6432748538011696f, 0.6416666666666667f, -                            0.6402439024390243f, 0.6412429378531074f, 0.6435185185185186f, -                            0.6428571428571429f}, -                    new float[] {0.8095238095238095f, 0.6578947368421053f, 0.5721925133689839f, -                            0.5362318840579711f, 0.5f, 0.4424778761061947f, 0.44086021505376327f, -                            0.44360902255639095f, 0.4499999999999997f, 0.4375000000000006f}, -                    new float[] {0.16470588235294117f, 0.2980392156862745f, 0.36666666666666664f, -                            0.40588235294117647f, 0.44705882352941173f, -                            0.5568627450980392f, 0.6352941176470588f, 0.7392156862745098f, -                            0.8431372549019608f, 0.9372549019607843f} -            ), -            new TonalPalette( -                    new float[] {0.469f, 0.46732026143790845f, 0.4718614718614719f, -                            0.4793650793650794f, 0.48071625344352614f, 0.4829683698296837f, -                            0.484375f, 0.4841269841269842f, 0.48444444444444457f, -                            0.48518518518518516f, 0.4907407407407408f}, -                    new float[] {1f, 1f, 1f, 1f, 1f, 1f, 0.6274509803921569f, 0.41832669322709176f, -                            0.41899441340782106f, 0.4128440366972478f, 0.4090909090909088f}, -                    new float[] {0.07f, 0.1f, 0.15098039215686274f, 0.20588235294117646f, -                            0.2372549019607843f, 0.26862745098039215f, 0.4f, 0.5078431372549019f, -                            0.6490196078431372f, 0.7862745098039216f, 0.9137254901960784f} -            ), -            new TonalPalette( -                    new float[] {0.542f, 0.5444444444444444f, 0.5555555555555556f, -                            0.5555555555555556f, 0.553763440860215f, 0.5526315789473684f, -                            0.5555555555555556f, 0.5555555555555555f, 0.5555555555555556f, -                            0.5512820512820514f, 0.5666666666666667f}, -                    new float[] {0.25f, 0.24590163934426232f, 0.19148936170212766f, -                            0.1791044776119403f, 0.18343195266272191f, 0.18446601941747576f, -                            0.1538461538461539f, 0.15625000000000003f, 0.15328467153284678f, -                            0.15662650602409653f, 0.151515151515151f}, -                    new float[] {0.05f, 0.1196078431372549f, 0.1843137254901961f, -                            0.2627450980392157f, -                            0.33137254901960783f, 0.403921568627451f, 0.5411764705882354f, -                            0.6235294117647059f, 0.7313725490196079f, 0.8372549019607843f, -                            0.9352941176470588f} -            ), -            new TonalPalette( -                    new float[] {0.022222222222222223f, 0.02469135802469136f, 0.031249999999999997f, -                            0.03947368421052631f, 0.04166666666666668f, -                            0.043650793650793655f, 0.04411764705882352f, 0.04166666666666652f, -                            0.04444444444444459f, 0.05555555555555529f}, -                    new float[] {0.33333333333333337f, 0.2783505154639175f, 0.2580645161290323f, -                            0.25675675675675674f, 0.2528735632183908f, 0.17500000000000002f, -                            0.15315315315315312f, 0.15189873417721522f, -                            0.15789473684210534f, 0.15789473684210542f}, -                    new float[] {0.08823529411764705f, 0.19019607843137254f, 0.2431372549019608f, -                            0.2901960784313725f, 0.3411764705882353f, 0.47058823529411764f, -                            0.5647058823529412f, 0.6901960784313725f, 0.8137254901960784f, -                            0.9254901960784314f} -            ), -            new TonalPalette( -                    new float[] {0.027f, 0.03f, 0.038f, 0.044f, 0.050884955752212385f, -                            0.07254901960784313f, 0.0934640522875817f, -                            0.10457516339869281f, 0.11699346405228758f, -                            0.1255813953488372f, 0.1268939393939394f, 0.12533333333333332f, -                            0.12500000000000003f, 0.12777777777777777f}, -                    new float[] {1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f}, -                    new float[] {0.25f, 0.3f, 0.35f, 0.4f, 0.44313725490196076f, 0.5f, 0.5f, 0.5f, -                            0.5f, 0.5784313725490196f, -                            0.6549019607843137f, 0.7549019607843137f, 0.8509803921568627f, -                            0.9411764705882353f} -            ) -    }; - -    private static final TonalPalette GREY_PALETTE = new TonalPalette( -            new float[]{0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f}, -            new float[]{0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f}, -            new float[]{0.08f, 0.11f, 0.14901960784313725f, 0.2f, 0.2980392156862745f, 0.4f, -                    0.4980392156862745f, 0.6196078431372549f, 0.7176470588235294f, -                    0.8196078431372549f, 0.9176470588235294f, 0.9490196078431372f} -    ); - -    @SuppressWarnings("WeakerAccess") -    @VisibleForTesting -    public static final ColorRange[] BLACKLISTED_COLORS = new ColorRange[] { - -            // Red -            new ColorRange( -                    new Range<>(0f, 20f) /* H */, -                    new Range<>(0.7f, 1f) /* S */, -                    new Range<>(0.21f, 0.79f)) /* L */, -            new ColorRange( -                    new Range<>(0f, 20f), -                    new Range<>(0.3f, 0.7f), -                    new Range<>(0.355f, 0.653f)), - -            // Red Orange -            new ColorRange( -                    new Range<>(20f, 40f), -                    new Range<>(0.7f, 1f), -                    new Range<>(0.28f, 0.643f)), -            new ColorRange( -                    new Range<>(20f, 40f), -                    new Range<>(0.3f, 0.7f), -                    new Range<>(0.414f, 0.561f)), -            new ColorRange( -                    new Range<>(20f, 40f), -                    new Range<>(0f, 3f), -                    new Range<>(0.343f, 0.584f)), - -            // Orange -            new ColorRange( -                    new Range<>(40f, 60f), -                    new Range<>(0.7f, 1f), -                    new Range<>(0.173f, 0.349f)), -            new ColorRange( -                    new Range<>(40f, 60f), -                    new Range<>(0.3f, 0.7f), -                    new Range<>(0.233f, 0.427f)), -            new ColorRange( -                    new Range<>(40f, 60f), -                    new Range<>(0f, 0.3f), -                    new Range<>(0.231f, 0.484f)), - -            // Yellow 60 -            new ColorRange( -                    new Range<>(60f, 80f), -                    new Range<>(0.7f, 1f), -                    new Range<>(0.488f, 0.737f)), -            new ColorRange( -                    new Range<>(60f, 80f), -                    new Range<>(0.3f, 0.7f), -                    new Range<>(0.673f, 0.837f)), - -            // Yellow Green 80 -            new ColorRange( -                    new Range<>(80f, 100f), -                    new Range<>(0.7f, 1f), -                    new Range<>(0.469f, 0.61f)), - -            // Yellow green 100 -            new ColorRange( -                    new Range<>(100f, 120f), -                    new Range<>(0.7f, 1f), -                    new Range<>(0.388f, 0.612f)), -            new ColorRange( -                    new Range<>(100f, 120f), -                    new Range<>(0.3f, 0.7f), -                    new Range<>(0.424f, 0.541f)), - -            // Green -            new ColorRange( -                    new Range<>(120f, 140f), -                    new Range<>(0.7f, 1f), -                    new Range<>(0.375f, 0.52f)), -            new ColorRange( -                    new Range<>(120f, 140f), -                    new Range<>(0.3f, 0.7f), -                    new Range<>(0.435f, 0.524f)), - -            // Green Blue 140 -            new ColorRange( -                    new Range<>(140f, 160f), -                    new Range<>(0.7f, 1f), -                    new Range<>(0.496f, 0.641f)), - -            // Seafoam -            new ColorRange( -                    new Range<>(160f, 180f), -                    new Range<>(0.7f, 1f), -                    new Range<>(0.496f, 0.567f)), - -            // Cyan -            new ColorRange( -                    new Range<>(180f, 200f), -                    new Range<>(0.7f, 1f), -                    new Range<>(0.52f, 0.729f)), - -            // Blue -            new ColorRange( -                    new Range<>(220f, 240f), -                    new Range<>(0.7f, 1f), -                    new Range<>(0.396f, 0.571f)), -            new ColorRange( -                    new Range<>(220f, 240f), -                    new Range<>(0.3f, 0.7f), -                    new Range<>(0.425f, 0.551f)), - -            // Blue Purple 240 -            new ColorRange( -                    new Range<>(240f, 260f), -                    new Range<>(0.7f, 1f), -                    new Range<>(0.418f, 0.639f)), -            new ColorRange( -                    new Range<>(220f, 240f), -                    new Range<>(0.3f, 0.7f), -                    new Range<>(0.441f, 0.576f)), - -            // Blue Purple 260 -            new ColorRange( -                    new Range<>(260f, 280f), -                    new Range<>(0.3f, 1f), // Bigger range -                    new Range<>(0.461f, 0.553f)), - -            // Fuchsia -            new ColorRange( -                    new Range<>(300f, 320f), -                    new Range<>(0.7f, 1f), -                    new Range<>(0.484f, 0.588f)), -            new ColorRange( -                    new Range<>(300f, 320f), -                    new Range<>(0.3f, 0.7f), -                    new Range<>(0.48f, 0.592f)), - -            // Pink -            new ColorRange( -                    new Range<>(320f, 340f), -                    new Range<>(0.7f, 1f), -                    new Range<>(0.466f, 0.629f)), - -            // Soft red -            new ColorRange( -                    new Range<>(340f, 360f), -                    new Range<>(0.7f, 1f), -                    new Range<>(0.437f, 0.596f)) -    }; -      /**       * Representation of an HSL color range.       * <ul> @@ -802,4 +477,124 @@ public class Tonal implements ExtractionType {              return String.format("H: %s, S: %s, L %s", mHue, mSaturation, mLightness);          }      } -} + +    @VisibleForTesting +    public static class ConfigParser { +        private final ArrayList<TonalPalette> mTonalPalettes; +        private final ArrayList<ColorRange> mBlacklistedColors; + +        public ConfigParser(Context context) { +            mTonalPalettes = new ArrayList<>(); +            mBlacklistedColors = new ArrayList<>(); + +            // Load all palettes and the blacklist from an XML. +            try { +                XmlPullParser parser = context.getResources().getXml(R.xml.color_extraction); +                int eventType = parser.getEventType(); +                while (eventType != XmlPullParser.END_DOCUMENT) { +                    if (eventType == XmlPullParser.START_DOCUMENT || +                            eventType == XmlPullParser.END_TAG) { +                        // just skip +                    } else if (eventType == XmlPullParser.START_TAG) { +                        String tagName = parser.getName(); +                        if (tagName.equals("palettes")) { +                            parsePalettes(parser); +                        } else if (tagName.equals("blacklist")) { +                            parseBlacklist(parser); +                        } +                    } else { +                        throw new XmlPullParserException("Invalid XML event " + eventType + " - " +                                + parser.getName(), parser, null); +                    } +                    eventType = parser.next(); +                } +            } catch (XmlPullParserException | IOException e) { +                throw new RuntimeException(e); +            } +        } + +        public ArrayList<TonalPalette> getTonalPalettes() { +            return mTonalPalettes; +        } + +        public ArrayList<ColorRange> getBlacklistedColors() { +            return mBlacklistedColors; +        } + +        private void parseBlacklist(XmlPullParser parser) +                throws XmlPullParserException, IOException { +            parser.require(XmlPullParser.START_TAG, null, "blacklist"); +            while (parser.next() != XmlPullParser.END_TAG) { +                if (parser.getEventType() != XmlPullParser.START_TAG) { +                    continue; +                } +                String name = parser.getName(); +                // Starts by looking for the entry tag +                if (name.equals("range")) { +                    mBlacklistedColors.add(readRange(parser)); +                    parser.next(); +                } else { +                    throw new XmlPullParserException("Invalid tag: " + name, parser, null); +                } +            } +        } + +        private ColorRange readRange(XmlPullParser parser) +                throws XmlPullParserException, IOException { +            parser.require(XmlPullParser.START_TAG, null, "range"); +            float[] h = readFloatArray(parser.getAttributeValue(null, "h")); +            float[] s = readFloatArray(parser.getAttributeValue(null, "s")); +            float[] l = readFloatArray(parser.getAttributeValue(null, "l")); + +            if (h == null || s == null || l == null) { +                throw new XmlPullParserException("Incomplete range tag.", parser, null); +            } + +            return new ColorRange(new Range<>(h[0], h[1]), new Range<>(s[0], s[1]), +                    new Range<>(l[0], l[1])); +        } + +        private void parsePalettes(XmlPullParser parser) +                throws XmlPullParserException, IOException { +            parser.require(XmlPullParser.START_TAG, null, "palettes"); +            while (parser.next() != XmlPullParser.END_TAG) { +                if (parser.getEventType() != XmlPullParser.START_TAG) { +                    continue; +                } +                String name = parser.getName(); +                // Starts by looking for the entry tag +                if (name.equals("palette")) { +                    mTonalPalettes.add(readPalette(parser)); +                    parser.next(); +                } else { +                    throw new XmlPullParserException("Invalid tag: " + name); +                } +            } +        } + +        private TonalPalette readPalette(XmlPullParser parser) +                throws XmlPullParserException, IOException { +            parser.require(XmlPullParser.START_TAG, null, "palette"); + +            float[] h = readFloatArray(parser.getAttributeValue(null, "h")); +            float[] s = readFloatArray(parser.getAttributeValue(null, "s")); +            float[] l = readFloatArray(parser.getAttributeValue(null, "l")); + +            if (h == null || s == null || l == null) { +                throw new XmlPullParserException("Incomplete range tag.", parser, null); +            } + +            return new TonalPalette(h, s, l); +        } + +        private float[] readFloatArray(String attributeValue) +                throws IOException, XmlPullParserException { +            String[] tokens = attributeValue.replaceAll(" ", "").replaceAll("\n", "").split(","); +            float[] numbers = new float[tokens.length]; +            for (int i = 0; i < tokens.length; i++) { +                numbers[i] = Float.parseFloat(tokens[i]); +            } +            return numbers; +        } +    } +}
\ No newline at end of file diff --git a/core/java/com/android/internal/hardware/AmbientDisplayConfiguration.java b/core/java/com/android/internal/hardware/AmbientDisplayConfiguration.java index 00fa711aed3f..df9c27b9df14 100644 --- a/core/java/com/android/internal/hardware/AmbientDisplayConfiguration.java +++ b/core/java/com/android/internal/hardware/AmbientDisplayConfiguration.java @@ -36,6 +36,7 @@ public class AmbientDisplayConfiguration {          return pulseOnNotificationEnabled(user)                  || pulseOnPickupEnabled(user)                  || pulseOnDoubleTapEnabled(user) +                || pulseOnLongPressEnabled(user)                  || alwaysOnEnabled(user);      } @@ -53,8 +54,8 @@ public class AmbientDisplayConfiguration {      }      public boolean pulseOnPickupEnabled(int user) { -        return boolSettingDefaultOn(Settings.Secure.DOZE_PULSE_ON_PICK_UP, user) -                && pulseOnPickupAvailable(); +        boolean settingEnabled = boolSettingDefaultOn(Settings.Secure.DOZE_PULSE_ON_PICK_UP, user); +        return (settingEnabled || alwaysOnEnabled(user)) && pulseOnPickupAvailable();      }      public boolean pulseOnPickupAvailable() { @@ -62,6 +63,10 @@ public class AmbientDisplayConfiguration {                  && ambientDisplayAvailable();      } +    public boolean pulseOnPickupCanBeModified(int user) { +        return !alwaysOnEnabled(user); +    } +      public boolean pulseOnDoubleTapEnabled(int user) {          return boolSettingDefaultOn(Settings.Secure.DOZE_PULSE_ON_DOUBLE_TAP, user)                  && pulseOnDoubleTapAvailable(); @@ -75,6 +80,19 @@ public class AmbientDisplayConfiguration {          return mContext.getResources().getString(R.string.config_dozeDoubleTapSensorType);      } +    public String longPressSensorType() { +        return mContext.getResources().getString(R.string.config_dozeLongPressSensorType); +    } + +    public boolean pulseOnLongPressEnabled(int user) { +        return pulseOnLongPressAvailable() && boolSettingDefaultOff( +                Settings.Secure.DOZE_PULSE_ON_LONG_PRESS, user); +    } + +    private boolean pulseOnLongPressAvailable() { +        return !TextUtils.isEmpty(longPressSensorType()); +    } +      public boolean alwaysOnEnabled(int user) {          return boolSettingDefaultOn(Settings.Secure.DOZE_ALWAYS_ON, user)                  && alwaysOnAvailable(); diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java index 9e61a99096d9..21cf95fdf1dc 100644 --- a/core/java/com/android/internal/os/ZygoteInit.java +++ b/core/java/com/android/internal/os/ZygoteInit.java @@ -132,6 +132,9 @@ public class ZygoteInit {          bootTimingsTraceLog.traceBegin("PreloadResources");          preloadResources();          bootTimingsTraceLog.traceEnd(); // PreloadResources +        Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "PreloadAppProcessHALs"); +        nativePreloadAppProcessHALs(); +        Trace.traceEnd(Trace.TRACE_TAG_DALVIK);          Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "PreloadOpenGL");          preloadOpenGL();          Trace.traceEnd(Trace.TRACE_TAG_DALVIK); @@ -184,6 +187,8 @@ public class ZygoteInit {          System.loadLibrary("jnigraphics");      } +    native private static void nativePreloadAppProcessHALs(); +      private static void preloadOpenGL() {          String driverPackageName = SystemProperties.get(PROPERTY_GFX_DRIVER);          if (!SystemProperties.getBoolean(PROPERTY_DISABLE_OPENGL_PRELOADING, false) && diff --git a/core/java/com/android/internal/widget/ImageFloatingTextView.java b/core/java/com/android/internal/widget/ImageFloatingTextView.java index 6b53368c3443..31b167d43f66 100644 --- a/core/java/com/android/internal/widget/ImageFloatingTextView.java +++ b/core/java/com/android/internal/widget/ImageFloatingTextView.java @@ -22,6 +22,7 @@ import android.text.BoringLayout;  import android.text.Layout;  import android.text.StaticLayout;  import android.text.TextUtils; +import android.text.method.TransformationMethod;  import android.util.AttributeSet;  import android.view.RemotableViewMethod;  import android.widget.RemoteViews; @@ -68,7 +69,12 @@ public class ImageFloatingTextView extends TextView {      protected Layout makeSingleLayout(int wantWidth, BoringLayout.Metrics boring, int ellipsisWidth,              Layout.Alignment alignment, boolean shouldEllipsize,              TextUtils.TruncateAt effectiveEllipsize, boolean useSaved) { -        CharSequence text = getText() == null ? "" : getText(); +        TransformationMethod transformationMethod = getTransformationMethod(); +        CharSequence text = getText(); +        if (transformationMethod != null) { +            text = transformationMethod.getTransformation(text, this); +        } +        text = text == null ? "" : text;          StaticLayout.Builder builder = StaticLayout.Builder.obtain(text, 0, text.length(),                  getPaint(), wantWidth)                  .setAlignment(alignment) diff --git a/core/java/com/android/server/BootReceiver.java b/core/java/com/android/server/BootReceiver.java index 2cf58d7ac465..4f9e8a51b9a4 100644 --- a/core/java/com/android/server/BootReceiver.java +++ b/core/java/com/android/server/BootReceiver.java @@ -143,7 +143,6 @@ public class BootReceiver extends BroadcastReceiver {          try {              return FileUtils.readTextFile(lastHeaderFile, 0, null);          } catch (IOException e) { -            Slog.e(TAG, "Error reading " + lastHeaderFile, e);              return null;          }      } diff --git a/core/jni/Android.bp b/core/jni/Android.bp index 7e71ce9d4131..a228d3486d45 100644 --- a/core/jni/Android.bp +++ b/core/jni/Android.bp @@ -188,6 +188,7 @@ cc_library_shared {          "com_android_internal_os_FuseAppLoop.cpp",          "com_android_internal_os_PathClassLoaderFactory.cpp",          "com_android_internal_os_Zygote.cpp", +        "com_android_internal_os_ZygoteInit.cpp",          "com_android_internal_util_VirtualRefBasePtr.cpp",          "com_android_internal_view_animation_NativeInterpolatorFactoryHelper.cpp",          "hwbinder/EphemeralStorage.cpp", diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index 1adc6dde3860..daf815a4c023 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -206,6 +206,7 @@ extern int register_com_android_internal_net_NetworkStatsFactory(JNIEnv *env);  extern int register_com_android_internal_os_FuseAppLoop(JNIEnv* env);  extern int register_com_android_internal_os_PathClassLoaderFactory(JNIEnv* env);  extern int register_com_android_internal_os_Zygote(JNIEnv *env); +extern int register_com_android_internal_os_ZygoteInit(JNIEnv *env);  extern int register_com_android_internal_util_VirtualRefBasePtr(JNIEnv *env);  static AndroidRuntime* gCurRuntime = NULL; @@ -245,7 +246,7 @@ int register_com_android_internal_os_RuntimeInit(JNIEnv* env)          methods, NELEM(methods));  } -int register_com_android_internal_os_ZygoteInit(JNIEnv* env) +int register_com_android_internal_os_ZygoteInit_nativeZygoteInit(JNIEnv* env)  {      const JNINativeMethod methods[] = {          { "nativeZygoteInit", "()V", @@ -1286,7 +1287,7 @@ static int register_jni_procs(const RegJNIRec array[], size_t count, JNIEnv* env  static const RegJNIRec gRegJNI[] = {      REG_JNI(register_com_android_internal_os_RuntimeInit), -    REG_JNI(register_com_android_internal_os_ZygoteInit), +    REG_JNI(register_com_android_internal_os_ZygoteInit_nativeZygoteInit),      REG_JNI(register_android_os_SystemClock),      REG_JNI(register_android_util_EventLog),      REG_JNI(register_android_util_Log), @@ -1388,6 +1389,7 @@ static const RegJNIRec gRegJNI[] = {      REG_JNI(register_android_os_MemoryFile),      REG_JNI(register_com_android_internal_os_PathClassLoaderFactory),      REG_JNI(register_com_android_internal_os_Zygote), +    REG_JNI(register_com_android_internal_os_ZygoteInit),      REG_JNI(register_com_android_internal_util_VirtualRefBasePtr),      REG_JNI(register_android_hardware_Camera),      REG_JNI(register_android_hardware_camera2_CameraMetadata), diff --git a/core/jni/com_android_internal_os_ZygoteInit.cpp b/core/jni/com_android_internal_os_ZygoteInit.cpp new file mode 100644 index 000000000000..258a55c7123a --- /dev/null +++ b/core/jni/com_android_internal_os_ZygoteInit.cpp @@ -0,0 +1,45 @@ +/* + * 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. + */ + +#define LOG_TAG "Zygote" + +#include <ui/GraphicBufferMapper.h> + +#include "core_jni_helpers.h" + +namespace { + +void android_internal_os_ZygoteInit_nativePreloadAppProcessHALs(JNIEnv* env, jclass) { +    android::GraphicBufferMapper::preloadHal(); +    // Add preloading here for other HALs that are (a) always passthrough, and +    // (b) loaded by most app processes. +} + +const JNINativeMethod gMethods[] = { +    { "nativePreloadAppProcessHALs", "()V", +      (void*)android_internal_os_ZygoteInit_nativePreloadAppProcessHALs }, +}; + +}  // anonymous namespace + +namespace android { + +int register_com_android_internal_os_ZygoteInit(JNIEnv* env) { +    return RegisterMethodsOrDie(env, "com/android/internal/os/ZygoteInit", +            gMethods, NELEM(gMethods)); +} + +}  // namespace android diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 4059c302ca5a..ae115d3e4379 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -3817,6 +3817,11 @@          <service android:name="com.android.server.PreloadsFileCacheExpirationJobService"                   android:permission="android.permission.BIND_JOB_SERVICE" >          </service> + +        <service android:name="com.android.server.camera.CameraStatsJobService" +                 android:permission="android.permission.BIND_JOB_SERVICE" > +        </service> +      </application>  </manifest> diff --git a/core/res/res/values-bs/strings.xml b/core/res/res/values-bs/strings.xml index 425fd951570c..797335ff6f1e 100644 --- a/core/res/res/values-bs/strings.xml +++ b/core/res/res/values-bs/strings.xml @@ -1521,7 +1521,7 @@      <string name="leave_accessibility_shortcut_on" msgid="7653111894438512680">"Koristi prečicu"</string>      <string name="accessibility_shortcut_enabling_service" msgid="7771852911861522636">"Prečica za pristupačnost je uključila uslugu <xliff:g id="SERVICE_NAME">%1$s</xliff:g>"</string>      <string name="accessibility_shortcut_disabling_service" msgid="2747243438223109821">"Prečica za pristupačnost je isključila uslugu <xliff:g id="SERVICE_NAME">%1$s</xliff:g>"</string> -    <string name="accessibility_button_prompt_text" msgid="4234556536456854251">"Izaberite funkciju koja će se koristiti kada dodirnete dugme Pristupačnost:"</string> +    <string name="accessibility_button_prompt_text" msgid="4234556536456854251">"Odaberite funkciju koja će se koristiti kada dodirnete dugme Pristupačnost:"</string>      <string name="accessibility_button_instructional_text" msgid="6942300463612999993">"Da promijenite funkcije, dodirnite i držite dugme Pristupačnost."</string>      <string name="accessibility_magnification_chooser_text" msgid="1227146738764986237">"Uvećanje"</string>      <string name="user_switched" msgid="3768006783166984410">"Trenutni korisnik <xliff:g id="NAME">%1$s</xliff:g>."</string> @@ -1748,7 +1748,7 @@      <string name="user_creation_adding" msgid="4482658054622099197">"Da li dozvoljavate da <xliff:g id="APP">%1$s</xliff:g> kreira novog korisnika za <xliff:g id="ACCOUNT">%2$s</xliff:g> (Korisnik sa ovim nalogom već postoji)?"</string>      <string name="language_selection_title" msgid="2680677278159281088">"Dodaj jezik"</string>      <string name="country_selection_title" msgid="2954859441620215513">"Izbor regije"</string> -    <string name="search_language_hint" msgid="7042102592055108574">"Ukucajte ime jezika"</string> +    <string name="search_language_hint" msgid="7042102592055108574">"Upišite ime jezika"</string>      <string name="language_picker_section_suggested" msgid="8414489646861640885">"Predloženo"</string>      <string name="language_picker_section_all" msgid="3097279199511617537">"Svi jezici"</string>      <string name="region_picker_section_all" msgid="8966316787153001779">"Sve regije"</string> diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml index faaa6a2c49a3..db531b5dac61 100644 --- a/core/res/res/values-es/strings.xml +++ b/core/res/res/values-es/strings.xml @@ -1308,7 +1308,7 @@      <string name="submit" msgid="1602335572089911941">"Enviar"</string>      <string name="car_mode_disable_notification_title" msgid="3164768212003864316">"Se ha habilitado el modo coche"</string>      <string name="car_mode_disable_notification_message" msgid="6301524980144350051">"Toca para salir del modo coche."</string> -    <string name="tethered_notification_title" msgid="3146694234398202601">"Compartir Internet/Zona Wi-Fi activado"</string> +    <string name="tethered_notification_title" msgid="3146694234398202601">"Compartir conexión/Zona Wi-Fi activada"</string>      <string name="tethered_notification_message" msgid="2113628520792055377">"Toca para configurar."</string>      <string name="back_button_label" msgid="2300470004503343439">"Atrás"</string>      <string name="next_button_label" msgid="1080555104677992408">"Siguiente"</string> @@ -1395,7 +1395,7 @@      <string name="data_usage_mobile_limit_snoozed_title" msgid="279240572165412168">"Límite de datos móviles superado"</string>      <string name="data_usage_wifi_limit_snoozed_title" msgid="8743856006384825974">"Límite de datos Wi-Fi superado"</string>      <string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"Límite superado en <xliff:g id="SIZE">%s</xliff:g>"</string> -    <string name="data_usage_restricted_title" msgid="5965157361036321914">"Conexiones automáticas restringidas"</string> +    <string name="data_usage_restricted_title" msgid="5965157361036321914">"Datos en segundo plano restringidos"</string>      <string name="data_usage_restricted_body" msgid="469866376337242726">"Toca para quitar la restricción."</string>      <string name="ssl_certificate" msgid="6510040486049237639">"Certificado de seguridad"</string>      <string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Este certificado es válido."</string> @@ -1630,7 +1630,7 @@      <string name="package_installed_device_owner" msgid="6875717669960212648">"Instalado por el administrador"</string>      <string name="package_updated_device_owner" msgid="1847154566357862089">"Actualizado por el administrador"</string>      <string name="package_deleted_device_owner" msgid="2307122077550236438">"Eliminado por el administrador"</string> -    <string name="battery_saver_description" msgid="1960431123816253034">"Para mejorar la duración de la batería, la función de ahorro de batería reduce el rendimiento del dispositivo y limita la vibración, los servicios de ubicación y la mayor parte de la transmisión de datos en segundo plano. Es posible que las aplicaciones que se sincronizan, como las de correo y mensajes, no se actualicen a menos que las abras.\n\nLa función de ahorro de batería se desactiva automáticamente cuando el dispositivo se está cargando."</string> +    <string name="battery_saver_description" msgid="1960431123816253034">"Para mejorar la duración de la batería, la función de ahorro de batería reduce el rendimiento del dispositivo y limita la vibración, los servicios de ubicación y la mayor parte de los datos en segundo plano. Es posible que las aplicaciones que se sincronizan, como las de correo y mensajes, no se actualicen a menos que las abras.\n\nLa función de ahorro de batería se desactiva automáticamente cuando el dispositivo se está cargando."</string>      <string name="data_saver_description" msgid="6015391409098303235">"El ahorro de datos evita que algunas aplicaciones envíen o reciban datos en segundo plano, lo que permite reducir el uso de datos. Una aplicación activa podrá acceder a los datos, aunque con menos frecuencia. Esto significa que, por ejemplo, algunas imágenes no se muestren hasta que no las toques."</string>      <string name="data_saver_enable_title" msgid="4674073932722787417">"¿Activar ahorro de datos?"</string>      <string name="data_saver_enable_button" msgid="7147735965247211818">"Activar"</string> diff --git a/core/res/res/values-eu/strings.xml b/core/res/res/values-eu/strings.xml index 951933c7ad35..686bdf16d4b1 100644 --- a/core/res/res/values-eu/strings.xml +++ b/core/res/res/values-eu/strings.xml @@ -1782,8 +1782,7 @@      <string name="etws_primary_default_message_tsunami" msgid="1887685943498368548">"Ebakuatu kostaldeak eta ibaialdeak berehala eta joan toki seguru batera, adibidez, toki garai batera."</string>      <string name="etws_primary_default_message_earthquake_and_tsunami" msgid="998797956848445862">"Ez larritu eta bilatu babesleku bat inguruan."</string>      <string name="etws_primary_default_message_test" msgid="2709597093560037455">"Larrialdi-mezuen proba"</string> -    <!-- no translation found for notification_reply_button_accessibility (3621714652387814344) --> -    <skip /> +    <string name="notification_reply_button_accessibility" msgid="3621714652387814344">"Erantzun"</string>      <string name="etws_primary_default_message_others" msgid="6293148756130398971"></string>      <string name="mmcc_authentication_reject" msgid="7729819349669603406">"Ez da onartzen SIM txartela"</string>      <string name="mmcc_imsi_unknown_in_hlr" msgid="6321202257374418726">"Ez dago SIM txartelik"</string> diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml index cbd23b2cfb38..e26ca990ca78 100644 --- a/core/res/res/values-fr-rCA/strings.xml +++ b/core/res/res/values-fr-rCA/strings.xml @@ -1781,8 +1781,7 @@      <string name="etws_primary_default_message_tsunami" msgid="1887685943498368548">"Évacuez immédiatement les zones côtières et les rives des fleuves, et réfugiez-vous dans un endroit plus sécuritaire, comme un terrain surélevé."</string>      <string name="etws_primary_default_message_earthquake_and_tsunami" msgid="998797956848445862">"Restez calme et cherchez un abri à proximité."</string>      <string name="etws_primary_default_message_test" msgid="2709597093560037455">"Test de messages d\'urgence"</string> -    <!-- no translation found for notification_reply_button_accessibility (3621714652387814344) --> -    <skip /> +    <string name="notification_reply_button_accessibility" msgid="3621714652387814344">"Répondre"</string>      <string name="etws_primary_default_message_others" msgid="6293148756130398971"></string>      <string name="mmcc_authentication_reject" msgid="7729819349669603406">"Carte SIM non autorisée"</string>      <string name="mmcc_imsi_unknown_in_hlr" msgid="6321202257374418726">"Carte SIM non configurée"</string> diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml index f9a7673e34ce..660eb025431b 100644 --- a/core/res/res/values-fr/strings.xml +++ b/core/res/res/values-fr/strings.xml @@ -1432,7 +1432,7 @@      <string name="media_route_button_content_description" msgid="591703006349356016">"Caster"</string>      <string name="media_route_chooser_title" msgid="1751618554539087622">"Connexion à l\'appareil"</string>      <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Caster l\'écran sur l\'appareil"</string> -    <string name="media_route_chooser_searching" msgid="4776236202610828706">"Recherche d\'appareils en cours…"</string> +    <string name="media_route_chooser_searching" msgid="4776236202610828706">"Recherche d\'appareils…"</string>      <string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Paramètres"</string>      <string name="media_route_controller_disconnect" msgid="8966120286374158649">"Déconnecter"</string>      <string name="media_route_status_scanning" msgid="7279908761758293783">"Analyse en cours..."</string> diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml index f4135659d179..a36903a3126f 100644 --- a/core/res/res/values-hi/strings.xml +++ b/core/res/res/values-hi/strings.xml @@ -849,7 +849,7 @@      <string name="save_password_remember" msgid="6491879678996749466">"याद रखें"</string>      <string name="save_password_never" msgid="8274330296785855105">"कभी नहीं"</string>      <string name="open_permission_deny" msgid="7374036708316629800">"आपके पास इस पेज को खोलने की अनुमति नहीं है."</string> -    <string name="text_copied" msgid="4985729524670131385">"लेख की क्लिपबोर्ड पर प्रतिलिपि बनाई गई."</string> +    <string name="text_copied" msgid="4985729524670131385">"लेख को क्लिपबोर्ड पर कॉपी किया गया."</string>      <string name="more_item_label" msgid="4650918923083320495">"अधिक"</string>      <string name="prepend_shortcut_label" msgid="2572214461676015642">"मेनू+"</string>      <string name="menu_space_shortcut_label" msgid="2410328639272162537">"space"</string> @@ -966,12 +966,12 @@      <string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string>      <string name="selectAll" msgid="6876518925844129331">"सभी को चुनें"</string>      <string name="cut" msgid="3092569408438626261">"काटें"</string> -    <string name="copy" msgid="2681946229533511987">"प्रतिलिपि बनाएं"</string> +    <string name="copy" msgid="2681946229533511987">"कॉपी करें"</string>      <string name="paste" msgid="5629880836805036433">"चिपकाएं"</string>      <string name="paste_as_plain_text" msgid="5427792741908010675">"सादे पाठ के रूप में चिपकाएं"</string>      <string name="replace" msgid="5781686059063148930">"बदलें•"</string>      <string name="delete" msgid="6098684844021697789">"हटाएं"</string> -    <string name="copyUrl" msgid="2538211579596067402">"URL की प्रतिलिपि बनाएं"</string> +    <string name="copyUrl" msgid="2538211579596067402">"URL को कॉपी करें"</string>      <string name="selectTextMode" msgid="1018691815143165326">"लेख को चुनें"</string>      <string name="undo" msgid="7905788502491742328">"वापस लाएं"</string>      <string name="redo" msgid="7759464876566803888">"फिर से करें"</string> diff --git a/core/res/res/values-hy/strings.xml b/core/res/res/values-hy/strings.xml index 5e68adef2aad..7f35c2884a44 100644 --- a/core/res/res/values-hy/strings.xml +++ b/core/res/res/values-hy/strings.xml @@ -579,8 +579,8 @@      <string name="policydesc_setGlobalProxy" msgid="8459859731153370499">"Կարգավորել, որ սարքի համընդհանուր պրոքսի-սերվերն օգտագործվի, երբ քաղաքականությունը միացված է: Միայն սարքի սեփականատերը կարող է կարգավորել համընդհանուր պրոքսի-սերվերը:"</string>      <string name="policylab_expirePassword" msgid="5610055012328825874">"Նշել էկր կողպ գաղտնաբ սպառումը"</string>      <string name="policydesc_expirePassword" msgid="5367525762204416046">"Փոխել էկրանի կողպման գաղտնաբառի, PIN-ի կամ նախշի փոփոխման հաճախականությունը:"</string> -    <string name="policylab_encryptedStorage" msgid="8901326199909132915">"Կարգավորել պահոցի կոդավորումը"</string> -    <string name="policydesc_encryptedStorage" msgid="2637732115325316992">"Պահանջել, որ պահվող հավելվածների տվյալները լինեն կոդավորված:"</string> +    <string name="policylab_encryptedStorage" msgid="8901326199909132915">"Կարգավորել պահոցի գաղտնագրումը"</string> +    <string name="policydesc_encryptedStorage" msgid="2637732115325316992">"Պահանջել, որ պահվող հավելվածների տվյալները լինեն գաղտնագրված:"</string>      <string name="policylab_disableCamera" msgid="6395301023152297826">"Կասեցնել տեսախցիկները"</string>      <string name="policydesc_disableCamera" msgid="2306349042834754597">"Կանխել բոլոր սարքերի ֆոտոխցիկների օգտագործումը:"</string>      <string name="policylab_disableKeyguardFeatures" msgid="8552277871075367771">"Անջատել կողպման գործառույթները"</string> diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml index 8e813ab910e6..445ff9442cde 100644 --- a/core/res/res/values-iw/strings.xml +++ b/core/res/res/values-iw/strings.xml @@ -1849,8 +1849,7 @@      <string name="etws_primary_default_message_tsunami" msgid="1887685943498368548">"יש להתפנות מיידית מאזורים הסמוכים לחופים ולנהרות למקום בטוח יותר, כגון שטח גבוה יותר."</string>      <string name="etws_primary_default_message_earthquake_and_tsunami" msgid="998797956848445862">"הישאר רגוע וחפש מחסה בקרבת מקום."</string>      <string name="etws_primary_default_message_test" msgid="2709597093560037455">"בדיקה של הודעות חירום"</string> -    <!-- no translation found for notification_reply_button_accessibility (3621714652387814344) --> -    <skip /> +    <string name="notification_reply_button_accessibility" msgid="3621714652387814344">"השב"</string>      <string name="etws_primary_default_message_others" msgid="6293148756130398971"></string>      <string name="mmcc_authentication_reject" msgid="7729819349669603406">"כרטיס ה-SIM לא מורשה"</string>      <string name="mmcc_imsi_unknown_in_hlr" msgid="6321202257374418726">"כרטיס ה-SIM לא מזוהה"</string> diff --git a/core/res/res/values-lo/strings.xml b/core/res/res/values-lo/strings.xml index 9356169eb026..34ca6b166fc2 100644 --- a/core/res/res/values-lo/strings.xml +++ b/core/res/res/values-lo/strings.xml @@ -1781,8 +1781,7 @@      <string name="etws_primary_default_message_tsunami" msgid="1887685943498368548">"ອົບພະຍົບອອກຈາກເຂດຊາຍຝັ່ງທະເລ ແລະ ບໍລິເວນແມ່ນ້ຳໄປບ່ອນທີ່ປອດໄພກວ່າ ເຊັ່ນ: ບ່ອນສູງ ໂດຍທັນທີ."</string>      <string name="etws_primary_default_message_earthquake_and_tsunami" msgid="998797956848445862">"ໃຈເຢັນໆ ແລະ ຊອກຫາບ່ອນພັກຢູ່ໃກ້ໆ."</string>      <string name="etws_primary_default_message_test" msgid="2709597093560037455">"ທົດສອບຂໍ້ຄວາມສຸກເສີນ"</string> -    <!-- no translation found for notification_reply_button_accessibility (3621714652387814344) --> -    <skip /> +    <string name="notification_reply_button_accessibility" msgid="3621714652387814344">"ຕອບກັບ"</string>      <string name="etws_primary_default_message_others" msgid="6293148756130398971"></string>      <string name="mmcc_authentication_reject" msgid="7729819349669603406">"ບໍ່ອະນຸຍາດໃຫ້ໃຊ້ SIM"</string>      <string name="mmcc_imsi_unknown_in_hlr" msgid="6321202257374418726">"ບໍ່ມີການນຳໃຊ້ SIM"</string> diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml index 0a5804f4dcbb..45ae315791fe 100644 --- a/core/res/res/values-sl/strings.xml +++ b/core/res/res/values-sl/strings.xml @@ -1849,8 +1849,7 @@      <string name="etws_primary_default_message_tsunami" msgid="1887685943498368548">"Takoj se umaknite z obalnih območij in bregov rek na varnejše mesto, na primer na višje ležeča mesta."</string>      <string name="etws_primary_default_message_earthquake_and_tsunami" msgid="998797956848445862">"Ostanite mirni in poiščite zavetje v bližini."</string>      <string name="etws_primary_default_message_test" msgid="2709597093560037455">"Preskus sporočil v sili"</string> -    <!-- no translation found for notification_reply_button_accessibility (3621714652387814344) --> -    <skip /> +    <string name="notification_reply_button_accessibility" msgid="3621714652387814344">"Odgovor"</string>      <string name="etws_primary_default_message_others" msgid="6293148756130398971"></string>      <string name="mmcc_authentication_reject" msgid="7729819349669603406">"Kartica SIM ni dovoljena"</string>      <string name="mmcc_imsi_unknown_in_hlr" msgid="6321202257374418726">"Kartica SIM ni omogočena za uporabo"</string> diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml index ab0353e19ac5..9ef46a7bdefa 100644 --- a/core/res/res/values-tr/strings.xml +++ b/core/res/res/values-tr/strings.xml @@ -1781,8 +1781,7 @@      <string name="etws_primary_default_message_tsunami" msgid="1887685943498368548">"Kıyı kesimlerini ve nehir kenarlarını hemen boşaltarak yüksek yerler gibi daha güvenli bölgelere gidin."</string>      <string name="etws_primary_default_message_earthquake_and_tsunami" msgid="998797956848445862">"Sakin olun ve yakınlarda sığınabileceğiniz bir yer bulun."</string>      <string name="etws_primary_default_message_test" msgid="2709597093560037455">"Acil durum mesajları testi"</string> -    <!-- no translation found for notification_reply_button_accessibility (3621714652387814344) --> -    <skip /> +    <string name="notification_reply_button_accessibility" msgid="3621714652387814344">"Yanıtla"</string>      <string name="etws_primary_default_message_others" msgid="6293148756130398971"></string>      <string name="mmcc_authentication_reject" msgid="7729819349669603406">"SIM\'e izin verilmiyor"</string>      <string name="mmcc_imsi_unknown_in_hlr" msgid="6321202257374418726">"SIM için temel hazırlık yapılmadı"</string> diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml index 0560330ca3ab..c2ee71f2720a 100644 --- a/core/res/res/values-zh-rCN/strings.xml +++ b/core/res/res/values-zh-rCN/strings.xml @@ -1011,7 +1011,7 @@      <string name="whichSendApplicationNamed" msgid="2799370240005424391">"使用%1$s分享"</string>      <string name="whichSendApplicationLabel" msgid="4579076294675975354">"分享"</string>      <string name="whichSendToApplication" msgid="8272422260066642057">"通过以下应用发送"</string> -    <string name="whichSendToApplicationNamed" msgid="7768387871529295325">"通过1$s发送"</string> +    <string name="whichSendToApplicationNamed" msgid="7768387871529295325">"通过%1$s发送"</string>      <string name="whichSendToApplicationLabel" msgid="8878962419005813500">"发送"</string>      <string name="whichHomeApplication" msgid="4307587691506919691">"选择主屏幕应用"</string>      <string name="whichHomeApplicationNamed" msgid="4493438593214760979">"将“%1$s”设为主屏幕应用"</string> @@ -1781,8 +1781,7 @@      <string name="etws_primary_default_message_tsunami" msgid="1887685943498368548">"请立即从沿海和河滨区域撤离到高地等较安全的地方。"</string>      <string name="etws_primary_default_message_earthquake_and_tsunami" msgid="998797956848445862">"请保持冷静,并寻找附近的避难地点。"</string>      <string name="etws_primary_default_message_test" msgid="2709597093560037455">"紧急消息测试"</string> -    <!-- no translation found for notification_reply_button_accessibility (3621714652387814344) --> -    <skip /> +    <string name="notification_reply_button_accessibility" msgid="3621714652387814344">"回复"</string>      <string name="etws_primary_default_message_others" msgid="6293148756130398971"></string>      <string name="mmcc_authentication_reject" msgid="7729819349669603406">"不受允许的 SIM 卡"</string>      <string name="mmcc_imsi_unknown_in_hlr" msgid="6321202257374418726">"未配置的 SIM 卡"</string> diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index ab909cf922c0..7b437fa2d355 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -559,6 +559,14 @@      <!-- Boolean indicating that wifi only link configuratios that have exact same credentials (i.e PSK) -->      <bool translatable="false" name="config_wifi_only_link_same_credential_configurations">true</bool> +    <!-- Boolean indicating whether framework needs to set the tx power limit for meeting SAR requirements +         during voice calls --> +    <bool translatable="false" name="config_wifi_framework_enable_voice_call_sar_tx_power_limit">false</bool> + +    <!-- Integer indicating the value that framework needs to set the tx power to for meeting SAR requirements +         during voice calls --> +    <integer translatable="false" name="config_wifi_framework_voice_call_sar_tx_power_limit_in_dbm">0</integer> +      <!-- Wifi driver supports batched scan -->      <bool translatable="false" name="config_wifi_batched_scan_supported">false</bool> @@ -1841,6 +1849,9 @@      <!-- Type of the double tap sensor. Empty if double tap is not supported. -->      <string name="config_dozeDoubleTapSensorType" translatable="false"></string> +    <!-- Type of the long press sensor. Empty if long press is not supported. --> +    <string name="config_dozeLongPressSensorType" translatable="false"></string> +      <!-- Control whether the always on display mode is available. This should only be enabled on           devices where the display has be tuned to be power efficient in DOZE and/or DOZE_SUSPEND           states. --> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index ad9b5af37788..2f81f43024d6 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -312,6 +312,8 @@    <java-symbol type="bool" name="config_windowEnableCircularEmulatorDisplayOverlay" />    <java-symbol type="bool" name="config_wifi_framework_enable_associated_network_selection" />    <java-symbol type="bool" name="config_wifi_only_link_same_credential_configurations" /> +  <java-symbol type="bool" name="config_wifi_framework_enable_voice_call_sar_tx_power_limit" /> +  <java-symbol type="integer" name="config_wifi_framework_voice_call_sar_tx_power_limit_in_dbm" />    <java-symbol type="bool" name="config_wifi_enable_disconnection_debounce" />    <java-symbol type="bool" name="config_wifi_revert_country_code_on_cellular_loss" />    <java-symbol type="bool" name="config_wifi_enable_wifi_firmware_debugging" /> @@ -1483,6 +1485,7 @@    <java-symbol type="xml" name="global_keys" />    <java-symbol type="xml" name="default_zen_mode_config" />    <java-symbol type="xml" name="sms_7bit_translation_table" /> +  <java-symbol type="xml" name="color_extraction" />    <java-symbol type="raw" name="color_fade_vert" />    <java-symbol type="raw" name="color_fade_frag" /> @@ -3042,6 +3045,8 @@    <java-symbol type="array" name="config_hideWhenDisabled_packageNames" /> +  <java-symbol type="string" name="config_dozeLongPressSensorType" /> +    <java-symbol type="array" name="config_allowedGlobalInstantAppSettings" />    <java-symbol type="array" name="config_allowedSystemInstantAppSettings" />    <java-symbol type="array" name="config_allowedSecureInstantAppSettings" /> diff --git a/core/res/res/xml/color_extraction.xml b/core/res/res/xml/color_extraction.xml new file mode 100644 index 000000000000..7d52b20f7614 --- /dev/null +++ b/core/res/res/xml/color_extraction.xml @@ -0,0 +1,348 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +  ~ 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 +  --> + +<colorextraction> +    <!-- List of material color palettes in HSL --> +    <palettes> +        <!-- Grey scale --> +        <palette h="0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f" +                 s="0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f" +                 l="0.08f, 0.11f, 0.14901960784313725f, 0.2f, 0.2980392156862745f, 0.4f, +                0.4980392156862745f, 0.6196078431372549f, 0.7176470588235294f, +                0.8196078431372549f, 0.9176470588235294f, 0.9490196078431372f"/> +        <!-- All colors --> +        <palette h="1,1,0.991,0.991,0.9833333333333333,0,0,0, +                0.01134380453752181,0.015625000000000003,0.024193548387096798, +                0.027397260273972573,0.017543859649122865" +                 s="1,1,1,1,1,1,1,0.8434782608695652,1,1,1,1,1" +                 l="0.04,0.09,0.14,0.2,0.27450980392156865, +                0.34901960784313724,0.4235294117647059,0.5490196078431373, +                0.6254901960784314,0.6862745098039216,0.7568627450980392, +                0.8568627450980393,0.9254901960784314"/> +        <palette h="0.638,0.638,0.6385767790262171,0.6301169590643275, +                0.6223958333333334,0.6151079136690647,0.6065400843881856, +                0.5986964618249534,0.5910746812386157,0.5833333333333334, +                0.5748031496062993,0.5582010582010583" +                 s="1,1,1,1,0.9014084507042253,0.8128654970760234, +                0.7979797979797981,0.7816593886462883,0.778723404255319,1,1,1" +                 l="0.05,0.12,0.17450980392156862,0.2235294117647059, +                0.2784313725490196,0.3352941176470588,0.388235294117647, +                0.44901960784313727,0.5392156862745098,0.6509803921568628, +                0.7509803921568627,0.8764705882352941"/> +        <palette h="0.563,0.569,0.5666,0.5669934640522876,0.5748031496062993, +                0.5595238095238095,0.5473118279569893,0.5393258426966292, +                0.5315955766192734,0.524031007751938,0.5154711673699016, +                0.508080808080808,0.5" +                 s="1,1,1,1,1,1,1,1,1,0.8847736625514403,1,1,1" +                 l="0.07,0.12,0.16,0.2,0.24901960784313726, +                0.27450980392156865,0.30392156862745096,0.34901960784313724, +                0.4137254901960784,0.47647058823529415,0.5352941176470588, +                0.6764705882352942,0.8"/> +        <palette h="0.508,0.511,0.508,0.508,0.5082304526748972, +                0.5069444444444444,0.5,0.5,0.5,0.48724954462659376, +                0.4800347222222222,0.4755134281200632,0.4724409448818897, +                0.4671052631578947" +                 s="1,1,1,1,1,0.8888888888888887,0.9242424242424242,1, +                1,0.8133333333333332,0.7868852459016393,1,1,1" +                 l="0.04,0.06,0.08,0.12,0.1588235294117647, +                0.21176470588235297,0.25882352941176473,0.3,0.34901960784313724, +                0.44117647058823534,0.5215686274509804,0.5862745098039216, +                0.7509803921568627,0.8509803921568627"/> +        <palette h="0.333,0.333,0.333,0.3333333333333333,0.3333333333333333, +                0.34006734006734,0.34006734006734,0.34006734006734, +                0.34259259259259256,0.3475783475783476,0.34767025089605735, +                0.3467741935483871,0.3703703703703704" +                 s="0.70,0.72,0.69,0.6703296703296703,0.728813559322034, +                0.5657142857142856,0.5076923076923077,0.3944223107569721, +                0.6206896551724138,0.8931297709923666,1,1,1" +                 l="0.05,0.08,0.14,0.1784313725490196,0.23137254901960785, +                0.3431372549019608,0.38235294117647056,0.49215686274509807, +                0.6588235294117647,0.7431372549019608,0.8176470588235294, +                0.8784313725490196,0.9294117647058824"/> +        <palette h="0.161,0.163,0.163,0.162280701754386,0.15032679738562088, +                0.15879265091863518,0.16236559139784948,0.17443868739205526, +                0.17824074074074076,0.18674698795180725,0.18692449355432778, +                0.1946778711484594,0.18604651162790695" +                 s="1,1,1,1,1,1,1,1,1,1,1,1,1" +                 l="0.05,0.08,0.11,0.14901960784313725,0.2, +                0.24901960784313726,0.30392156862745096,0.3784313725490196, +                0.4235294117647059,0.48823529411764705,0.6450980392156863, +                0.7666666666666666,0.8313725490196078"/> +        <palette h="0.108,0.105,0.105,0.105,0.10619469026548674, +                0.11924686192468618,0.13046448087431692,0.14248366013071895, +                0.1506024096385542,0.16220238095238093,0.16666666666666666, +                0.16666666666666666,0.162280701754386,0.15686274509803924" +                 s="1,1,1,1,1,1,1,1,1,1,1,1,1,1" +                 l="0.17,0.22,0.28,0.35,0.44313725490196076, +                0.46862745098039216,0.47843137254901963,0.5,0.5117647058823529, +                0.5607843137254902,0.6509803921568628,0.7509803921568627, +                0.8509803921568627,0.9"/> +        <palette h="0.036,0.036,0.036,0.036,0.03561253561253561, +                0.05098039215686275,0.07516339869281045,0.09477124183006536, +                0.1150326797385621,0.134640522875817,0.14640522875816991, +                0.1582397003745319,0.15773809523809523,0.15359477124183002" +                 s="1,1,1,1,1,1,1,1,1,1,1,1,1,1" +                 l="0.19,0.26,0.34,0.39,0.4588235294117647,0.5,0.5,0.5, +                0.5,0.5,0.5,0.6509803921568628,0.7803921568627451,0.9"/> +        <palette h="0.955,0.961,0.958,0.9596491228070175,0.9593837535014005, +                0.9514767932489452,0.943859649122807,0.9396825396825397, +                0.9395424836601307,0.9393939393939394,0.9362745098039216, +                0.9754098360655739,0.9824561403508771" +                 s="0.87,0.85,0.85,0.84070796460177,0.8206896551724138, +                0.7979797979797981,0.7661290322580644,0.9051724137931036, +                1,1,1,1,1" +                 l="0.06,0.11,0.16,0.22156862745098038,0.2843137254901961, +                0.388235294117647,0.48627450980392156,0.5450980392156863, +                0.6,0.6764705882352942,0.8,0.8803921568627451, +                0.9254901960784314"/> +        <palette h="0.866,0.855,0.841025641025641,0.8333333333333334, +                0.8285256410256411,0.821522309711286,0.8083333333333333, +                0.8046594982078853,0.8005822416302766,0.7842377260981912, +                0.7771084337349398,0.7747747747747749" +                 s="1,1,1,1,1,1,1,1,1, +                0.737142857142857,0.6434108527131781,0.46835443037974644" +                 l="0.05,0.08,0.12745098039215685,0.15490196078431373, +                0.20392156862745098,0.24901960784313726,0.3137254901960784, +                0.36470588235294116,0.44901960784313727,0.6568627450980392, +                0.7470588235294118,0.8450980392156863"/> +        <palette h="0.925,0.93,0.938,0.947,0.955952380952381, +                0.9681069958847737,0.9760479041916167,0.9873563218390804,0,0, +                0.009057971014492771,0.026748971193415648, +                0.041666666666666616,0.05303030303030304" +                 s="1,1,1,1,1,0.8350515463917526,0.6929460580912863, +                0.6387665198237885,0.6914893617021276,0.7583892617449666, +                0.8070175438596495,0.9310344827586209,1,1" +                 l="0.10,0.13,0.17,0.2,0.27450980392156865, +                0.3803921568627451,0.4725490196078432,0.5549019607843138, +                0.6313725490196078,0.707843137254902,0.7764705882352941, +                0.8294117647058823,0.9058823529411765,0.9568627450980391"/> +        <palette h="0.733,0.736,0.744,0.7514619883040936,0.7679738562091503, +                0.7802083333333333,0.7844311377245509,0.796875, +                0.8165618448637316,0.8487179487179487,0.8582375478927203, +                0.8562091503267975,0.8666666666666667" +                 s="1,1,1,1,1,0.8163265306122449,0.6653386454183268, +                0.7547169811320753,0.929824561403509,0.9558823529411766, +                0.9560439560439562,1,1" +                 l="0.07,0.12,0.17,0.2235294117647059,0.3, +                0.38431372549019605,0.492156862745098,0.5843137254901961, +                0.6647058823529411,0.7333333333333334,0.8215686274509804,0.9, +                0.9411764705882353"/> +        <palette h="0.6666666666666666,0.6666666666666666,0.6666666666666666, +                0.6666666666666666,0.6666666666666666,0.6666666666666666, +                0.6666666666666666,0.6666666666666666,0.6666666666666666, +                0.6666666666666666,0.6666666666666666" +                 s="0.25,0.24590163934426232,0.17880794701986752, +                0.14606741573033713,0.13761467889908252,0.14893617021276592, +                0.16756756756756758,0.20312500000000017,0.26086956521739135, +                0.29999999999999966,0.5000000000000004" +                 l="0.18,0.2392156862745098,0.296078431372549, +                0.34901960784313724,0.4274509803921569,0.5392156862745098, +                0.6372549019607843,0.7490196078431373,0.8196078431372549, +                0.8823529411764706,0.9372549019607843"/> +        <palette h="0.938,0.944,0.952,0.961,0.9678571428571429, +                0.9944812362030905,0,0, +                0.0047348484848484815,0.00316455696202532,0, +                0.9980392156862745,0.9814814814814816,0.9722222222222221" +                 s="1,1,1,1,1,0.7023255813953488,0.6638655462184874, +                0.6521739130434782,0.7719298245614035,0.8315789473684211, +                0.6867469879518071,0.7264957264957265,0.8181818181818182, +                0.8181818181818189" +                 l="0.08,0.13,0.18,0.23,0.27450980392156865, +                0.4215686274509804, +                0.4666666666666667,0.503921568627451,0.5529411764705883, +                0.6274509803921569,0.6745098039215687,0.7705882352941176, +                0.892156862745098,0.9568627450980391"/> +        <palette h="0.88,0.888,0.897,0.9052287581699346,0.9112021857923498, +                0.9270152505446624,0.9343137254901961,0.9391534391534391, +                0.9437984496124031,0.943661971830986,0.9438943894389439, +                0.9426229508196722,0.9444444444444444" +                 s="1,1,1,1,0.8133333333333332,0.7927461139896375, +                0.7798165137614679,0.7777777777777779,0.8190476190476191, +                0.8255813953488372,0.8211382113821142,0.8133333333333336, +                0.8000000000000006" +                 l="0.08,0.12,0.16,0.2,0.29411764705882354, +                0.3784313725490196,0.42745098039215684,0.4764705882352941, +                0.5882352941176471,0.6627450980392157,0.7588235294117647, +                0.8529411764705882,0.9411764705882353"/> +        <palette h="0.669,0.680,0.6884057971014492,0.6974789915966387, +                0.7079889807162534,0.7154471544715447,0.7217741935483872, +                0.7274143302180687,0.7272727272727273,0.7258064516129031, +                0.7252252252252251,0.7333333333333333" +                 s="0.81,0.81,0.8214285714285715,0.6878612716763006, +                0.6080402010050251,0.5774647887323943,0.5391304347826086, +                0.46724890829694316,0.4680851063829788,0.462686567164179, +                0.45679012345678977,0.4545454545454551" +                 l="0.12,0.16,0.2196078431372549,0.33921568627450976, +                0.39019607843137255,0.4176470588235294,0.45098039215686275, +                0.5509803921568628,0.6313725490196078,0.7372549019607844, +                0.8411764705882353,0.9352941176470588"/> +        <palette h="0.6470588235294118,0.6516666666666667,0.6464174454828661, +                0.6441441441441442,0.6432748538011696,0.6416666666666667, +                0.6402439024390243,0.6412429378531074,0.6435185185185186, +                0.6428571428571429" +                 s="0.8095238095238095,0.6578947368421053,0.5721925133689839, +                0.5362318840579711,0.5,0.4424778761061947,0.44086021505376327, +                0.44360902255639095,0.4499999999999997,0.4375000000000006" +                 l="0.16470588235294117,0.2980392156862745,0.36666666666666664, +                0.40588235294117647,0.44705882352941173, +                0.5568627450980392,0.6352941176470588,0.7392156862745098, +                0.8431372549019608,0.9372549019607843"/> +        <palette h="0.469,0.46732026143790845,0.4718614718614719, +                0.4793650793650794,0.48071625344352614,0.4829683698296837, +                0.484375,0.4841269841269842,0.48444444444444457, +                0.48518518518518516,0.4907407407407408" +                 s="1,1,1,1,1,1,0.6274509803921569,0.41832669322709176, +                0.41899441340782106,0.4128440366972478,0.4090909090909088" +                 l="0.07,0.1,0.15098039215686274,0.20588235294117646, +                0.2372549019607843,0.26862745098039215,0.4,0.5078431372549019, +                0.6490196078431372,0.7862745098039216,0.9137254901960784"/> +        <palette h="0.542,0.5444444444444444,0.5555555555555556, +                0.5555555555555556,0.553763440860215,0.5526315789473684, +                0.5555555555555556,0.5555555555555555,0.5555555555555556, +                0.5512820512820514,0.5666666666666667" +                 s="0.25,0.24590163934426232,0.19148936170212766, +                0.1791044776119403,0.18343195266272191,0.18446601941747576, +                0.1538461538461539,0.15625000000000003,0.15328467153284678, +                0.15662650602409653,0.151515151515151" +                 l="0.05,0.1196078431372549,0.1843137254901961, +                0.2627450980392157, +                0.33137254901960783,0.403921568627451,0.5411764705882354, +                0.6235294117647059,0.7313725490196079,0.8372549019607843, +                0.9352941176470588"/> +        <palette h="0.022222222222222223,0.02469135802469136,0.031249999999999997, +                0.03947368421052631,0.04166666666666668, +                0.043650793650793655,0.04411764705882352,0.04166666666666652, +                0.04444444444444459,0.05555555555555529" +                 s="0.33333333333333337,0.2783505154639175,0.2580645161290323, +                0.25675675675675674,0.2528735632183908,0.17500000000000002, +                0.15315315315315312,0.15189873417721522, +                0.15789473684210534,0.15789473684210542" +                 l="0.08823529411764705,0.19019607843137254,0.2431372549019608, +                0.2901960784313725,0.3411764705882353,0.47058823529411764, +                0.5647058823529412,0.6901960784313725,0.8137254901960784, +                0.9254901960784314"/> +        <palette h="0.027,0.03,0.038,0.044,0.050884955752212385, +                0.07254901960784313,0.0934640522875817, +                0.10457516339869281,0.11699346405228758, +                0.1255813953488372,0.1268939393939394,0.12533333333333332, +                0.12500000000000003,0.12777777777777777" +                 s="1,1,1,1,1,1,1,1,1,1,1,1,1,1" +                 l="0.25,0.3,0.35,0.4,0.44313725490196076,0.5,0.5,0.5, +                0.5,0.5784313725490196, +                0.6549019607843137,0.7549019607843137,0.8509803921568627, +                0.9411764705882353"/> +    </palettes> +    <blacklist> +        <!-- Red --> +        <range h="0, 20" +               s="0.7, 1" +               l="0.21, 0.79"/> +        <range h="0, 20" +               s="0.3, 0.7" +               l="0.355, 0.653"/> +        <!-- Red Orange --> +        <range h="20, 40" +               s="0.7, 1" +               l="0.28, 0.643"/> +        <range h="20, 40" +               s="0.3, 0.7" +               l="0.414, 0.561"/> +        <range h="20, 40" +               s="0, 3" +               l="0.343, 0.584"/> +        <!-- Orange --> +        <range h="40, 60" +               s="0.7, 1" +               l="0.173, 0.349"/> +        <range h="40, 60" +               s="0.3, 0.7" +               l="0.233, 0.427"/> +        <range h="40, 60" +               s="0, 0.3" +               l="0.231, 0.484"/> +        <!-- Yellow 60 --> +        <range h="60, 80" +               s="0.7, 1" +               l="0.488, 0.737"/> +        <range h="60, 80" +               s="0.3, 0.7" +               l="0.673, 0.837"/> +        <!-- Yellow Green 80 --> +        <range h="80, 100" +               s="0.7, 1" +               l="0.469, 0.61"/> +        <!-- Yellow green 100 --> +        <range h="100, 120" +               s="0.7, 1" +               l="0.388, 0.612"/> +        <range h="100, 120" +               s="0.3, 0.7" +               l="0.424, 0.541"/> +        <!-- Green --> +        <range h="120, 140" +               s="0.7, 1" +               l="0.375, 0.52"/> +        <range h="120, 140" +               s="0.3, 0.7" +               l="0.435, 0.524"/> +        <!-- Green Blue 140 --> +        <range h="140, 160" +               s="0.7, 1" +               l="0.496, 0.641"/> +        <!-- Seaoam --> +        <range h="160, 180" +               s="0.7, 1" +               l="0.496, 0.567"/> +        <!-- Cyan --> +        <range h="180, 200" +               s="0.7, 1" +               l="0.52, 0.729"/> +        <!-- Blue --> +        <range h="220, 240" +               s="0.7, 1" +               l="0.396, 0.571"/> +        <range h="220, 240" +               s="0.3, 0.7" +               l="0.425, 0.551"/> +        <!-- Blue Purple 240 --> +        <range h="240, 260" +               s="0.7, 1" +               l="0.418, 0.639"/> +        <range h="220, 240" +               s="0.3, 0.7" +               l="0.441, 0.576"/> +        <!-- Blue Purple 260 --> +        <range h="260, 280" +               s="0.3, 1" +               l="0.461, 0.553"/> +        <!-- Fuchsia --> +        <range h="300, 320" +               s="0.7, 1" +               l="0.484, 0.588"/> +        <range h="300, 320" +               s="0.3, 0.7" +               l="0.48, 0.592"/> +        <!-- Pink --> +        <range h="320, 340" +               s="0.7, 1" +               l="0.466, 0.629"/> +        <!-- Soft red --> +        <range h="340, 360" +               s="0.7, 1" +               l="0.437, 0.596"/> +    </blacklist> +</colorextraction>
\ No newline at end of file diff --git a/core/tests/coretests/src/android/provider/SettingsBackupTest.java b/core/tests/coretests/src/android/provider/SettingsBackupTest.java index 01dfd32df322..ca53885b78b8 100644 --- a/core/tests/coretests/src/android/provider/SettingsBackupTest.java +++ b/core/tests/coretests/src/android/provider/SettingsBackupTest.java @@ -430,6 +430,7 @@ public class SettingsBackupTest {                   Settings.Secure.DISABLED_SYSTEM_INPUT_METHODS,                   Settings.Secure.DISPLAY_DENSITY_FORCED,                   Settings.Secure.DOZE_ALWAYS_ON, +                 Settings.Secure.DOZE_PULSE_ON_LONG_PRESS,                   Settings.Secure.EMERGENCY_ASSISTANCE_APPLICATION,                   Settings.Secure.ENABLED_NOTIFICATION_ASSISTANT,                   Settings.Secure.ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES, diff --git a/core/tests/coretests/src/com/android/internal/widget/ImageFloatingTextViewTest.java b/core/tests/coretests/src/com/android/internal/widget/ImageFloatingTextViewTest.java index a2499252da93..1806b226e7b3 100644 --- a/core/tests/coretests/src/com/android/internal/widget/ImageFloatingTextViewTest.java +++ b/core/tests/coretests/src/com/android/internal/widget/ImageFloatingTextViewTest.java @@ -21,9 +21,11 @@ import static org.junit.Assert.assertTrue;  import android.content.Context;  import android.support.test.InstrumentationRegistry;  import android.support.test.filters.SmallTest; +import android.text.Layout;  import android.view.View.MeasureSpec;  import android.widget.TextView; +import org.junit.Assert;  import org.junit.Before;  import org.junit.Test; @@ -102,6 +104,16 @@ public class ImageFloatingTextViewTest {                  + "Yada yada, yada yada. Lorem ipsum dolor sit amet.");      } +    @Test +    public void usesTransformationMethod() { +        mView.setSingleLine(); +        String text = "Test \n Test"; +        parametrizedTest(text); +        Layout layout = mView.getLayout(); +        Assert.assertFalse("The transformation method wasn't used, string is still the same", +                text.equals(layout.getText())); +    } +      private void parametrizedTest(CharSequence text) {          int heightMeasureSpec = MeasureSpec.makeMeasureSpec(500, MeasureSpec.AT_MOST);          int widthMeasureSpec = MeasureSpec.makeMeasureSpec(500, MeasureSpec.EXACTLY); diff --git a/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java b/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java index f5f102467998..833376cfa057 100644 --- a/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java +++ b/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java @@ -21,6 +21,8 @@ import android.os.SystemClock;  import android.util.Base64;  import android.util.TimeUtils; +import java.util.Arrays; +  import com.android.internal.location.nano.GnssLogsProto.GnssLog;  /** @@ -40,6 +42,7 @@ public class GnssMetrics {      locationFailureStatistics = new Statistics();      timeToFirstFixSecStatistics = new Statistics();      positionAccuracyMeterStatistics = new Statistics(); +    topFourAverageCn0Statistics = new Statistics();      reset();    } @@ -95,6 +98,27 @@ public class GnssMetrics {      return;    } +  /* +  * Logs CN0 when at least 4 SVs are available +  * +  */ +  public void logCn0(float[] cn0s, int numSv) { +    if (numSv < 4) { +      return; +    } +    float[] cn0Array = Arrays.copyOf(cn0s, numSv); +    Arrays.sort(cn0Array); +    if (cn0Array[numSv - 4] > 0.0) { +      double top4AvgCn0 = 0.0; +      for (int i = numSv - 4; i < numSv; i++) { +        top4AvgCn0 += (double) cn0Array[i]; +      } +      top4AvgCn0 /= 4; +      topFourAverageCn0Statistics.addItem(top4AvgCn0); +    } +    return; +  } +    /**     * Dumps GNSS metrics as a proto string     * @return @@ -117,6 +141,12 @@ public class GnssMetrics {        msg.standardDeviationPositionAccuracyMeters            = (int) positionAccuracyMeterStatistics.getStandardDeviation();      } +    if (topFourAverageCn0Statistics.getCount() > 0) { +      msg.numTopFourAverageCn0Processed = topFourAverageCn0Statistics.getCount(); +      msg.meanTopFourAverageCn0DbHz = topFourAverageCn0Statistics.getMean(); +      msg.standardDeviationTopFourAverageCn0DbHz +          = topFourAverageCn0Statistics.getStandardDeviation(); +    }      String s = Base64.encodeToString(GnssLog.toByteArray(msg), Base64.DEFAULT);      reset();      return s; @@ -155,6 +185,14 @@ public class GnssMetrics {        s.append("  Position accuracy standard deviation (m): ").append(            positionAccuracyMeterStatistics.getStandardDeviation()).append("\n");      } +    s.append("  Number of CN0 reports: ").append( +        topFourAverageCn0Statistics.getCount()).append("\n"); +    if (topFourAverageCn0Statistics.getCount() > 0) { +      s.append("  Top 4 Avg CN0 mean (dB-Hz): ").append( +          topFourAverageCn0Statistics.getMean()).append("\n"); +      s.append("  Top 4 Avg CN0 standard deviation (dB-Hz): ").append( +          topFourAverageCn0Statistics.getStandardDeviation()).append("\n"); +    }      s.append("GNSS_KPI_END").append("\n");      return s.toString();    } @@ -211,6 +249,9 @@ public class GnssMetrics {    /** Position accuracy statistics */    private Statistics positionAccuracyMeterStatistics; +  /** Top 4 average CN0 statistics */ +  private Statistics topFourAverageCn0Statistics; +    /**     * Resets GNSS metrics     */ @@ -221,6 +262,7 @@ public class GnssMetrics {      locationFailureStatistics.reset();      timeToFirstFixSecStatistics.reset();      positionAccuracyMeterStatistics.reset(); +    topFourAverageCn0Statistics.reset();      return;    }  }
\ No newline at end of file diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java index 29fe275777b0..ea4d8024911d 100644 --- a/media/java/android/media/AudioSystem.java +++ b/media/java/android/media/AudioSystem.java @@ -803,14 +803,14 @@ public class AudioSystem          4,  // STREAM_VOICE_CALL          7,  // STREAM_SYSTEM          5,  // STREAM_RING -        11, // STREAM_MUSIC +        5, // STREAM_MUSIC          6,  // STREAM_ALARM          5,  // STREAM_NOTIFICATION          7,  // STREAM_BLUETOOTH_SCO          7,  // STREAM_SYSTEM_ENFORCED -        11, // STREAM_DTMF -        11, // STREAM_TTS -        11, // STREAM_ACCESSIBILITY +        5, // STREAM_DTMF +        5, // STREAM_TTS +        5, // STREAM_ACCESSIBILITY      };      public static String streamToString(int stream) { diff --git a/packages/SettingsLib/res/layout/preference_two_target.xml b/packages/SettingsLib/res/layout/preference_two_target.xml index 7000940d3720..2309ec6f1f8d 100644 --- a/packages/SettingsLib/res/layout/preference_two_target.xml +++ b/packages/SettingsLib/res/layout/preference_two_target.xml @@ -18,6 +18,7 @@  <!-- Based off preference_material_settings.xml except that ripple on only on the left side. -->  <LinearLayout      xmlns:android="http://schemas.android.com/apk/res/android" +    xmlns:settings="http://schemas.android.com/apk/res-auto"      android:layout_width="match_parent"      android:layout_height="wrap_content"      android:minHeight="?android:attr/listPreferredItemHeightSmall" @@ -50,8 +51,8 @@                  android:id="@android:id/icon"                  android:layout_width="wrap_content"                  android:layout_height="wrap_content" -                android:maxWidth="48dp" -                android:maxHeight="48dp" /> +                settings:maxWidth="48dp" +                settings:maxHeight="48dp" />          </LinearLayout>          <RelativeLayout diff --git a/packages/SettingsLib/res/values-ca/strings.xml b/packages/SettingsLib/res/values-ca/strings.xml index 56627031286b..00bb4a98a5ef 100644 --- a/packages/SettingsLib/res/values-ca/strings.xml +++ b/packages/SettingsLib/res/values-ca/strings.xml @@ -36,7 +36,7 @@      <string name="wifi_no_internet" msgid="3880396223819116454">"No hi ha accés a Internet"</string>      <string name="saved_network" msgid="4352716707126620811">"Desat per <xliff:g id="NAME">%1$s</xliff:g>"</string>      <string name="connected_via_network_scorer" msgid="5713793306870815341">"Connectada automàticament a través de: %1$s"</string> -    <string name="connected_via_network_scorer_default" msgid="7867260222020343104">"Connectada automàticament a través d\'un proveïdor de valoració de la xarxa"</string> +    <string name="connected_via_network_scorer_default" msgid="7867260222020343104">"Connectada automàticament a través d\'un proveïdor de valoració de xarxes"</string>      <string name="connected_via_passpoint" msgid="2826205693803088747">"Connectada mitjançant %1$s"</string>      <string name="available_via_passpoint" msgid="1617440946846329613">"Disponible mitjançant %1$s"</string>      <string name="wifi_connected_no_internet" msgid="3149853966840874992">"Connectada, sense Internet"</string> @@ -186,7 +186,7 @@      <string name="wifi_aggressive_handover" msgid="5309131983693661320">"Transferència agressiva de Wi-Fi a mòbil"</string>      <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Permet sempre cerca de Wi-Fi en ininerància"</string>      <string name="mobile_data_always_on" msgid="8774857027458200434">"Dades mòbils sempre actives"</string> -    <string name="tethering_hardware_offload" msgid="7470077827090325814">"Acceleració per maquinari per a la compartició de xarxa"</string> +    <string name="tethering_hardware_offload" msgid="7470077827090325814">"Acceleració per maquinari per compartir la xarxa"</string>      <string name="bluetooth_disable_absolute_volume" msgid="2660673801947898809">"Desactiva el volum absolut"</string>      <string name="bluetooth_enable_inband_ringing" msgid="3291686366721786740">"Activa el so al mateix canal"</string>      <string name="bluetooth_select_avrcp_version_string" msgid="3750059931120293633">"Versió AVRCP de Bluetooth"</string> @@ -218,7 +218,7 @@      <string name="allow_mock_location_summary" msgid="317615105156345626">"Permet les ubicacions simulades"</string>      <string name="debug_view_attributes" msgid="6485448367803310384">"Inspecció d\'atributs de visualització"</string>      <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Mantén les dades mòbils sempre actives, fins i tot quan la Wi‑Fi està activada (per canviar de xarxa ràpidament)."</string> -    <string name="tethering_hardware_offload_summary" msgid="7726082075333346982">"Fes servir l\'acceleració per maquinari per a la compartició de xarxa, si està disponible"</string> +    <string name="tethering_hardware_offload_summary" msgid="7726082075333346982">"Fes servir l\'acceleració per maquinari per compartir la xarxa, si està disponible"</string>      <string name="adb_warning_title" msgid="6234463310896563253">"Voleu permetre la depuració USB?"</string>      <string name="adb_warning_message" msgid="7316799925425402244">"La depuració USB només està indicada per a activitats de desenvolupament. Fes-la servir intercanviar dades entre l\'ordinador i el dispositiu, per instal·lar aplicacions al dispositiu sense rebre notificacions i per llegir dades de registre."</string>      <string name="adb_keys_warning_message" msgid="5659849457135841625">"Vols revocar l\'accés a la depuració d\'USB dels ordinadors que has autoritzat anteriorment?"</string> diff --git a/packages/SettingsLib/res/values-es/strings.xml b/packages/SettingsLib/res/values-es/strings.xml index e2e0e6212499..4a6f12d75f73 100644 --- a/packages/SettingsLib/res/values-es/strings.xml +++ b/packages/SettingsLib/res/values-es/strings.xml @@ -104,11 +104,11 @@      <string name="process_kernel_label" msgid="3916858646836739323">"SO Android"</string>      <string name="data_usage_uninstalled_apps" msgid="614263770923231598">"Aplicaciones eliminadas"</string>      <string name="data_usage_uninstalled_apps_users" msgid="7986294489899813194">"Usuarios y aplicaciones eliminados"</string> -    <string name="tether_settings_title_usb" msgid="6688416425801386511">"Compartir por USB"</string> +    <string name="tether_settings_title_usb" msgid="6688416425801386511">"Compartir conexión por USB"</string>      <string name="tether_settings_title_wifi" msgid="3277144155960302049">"Zona Wi-Fi portátil"</string> -    <string name="tether_settings_title_bluetooth" msgid="355855408317564420">"Compartir por Bluetooth"</string> -    <string name="tether_settings_title_usb_bluetooth" msgid="5355828977109785001">"Compartir Internet"</string> -    <string name="tether_settings_title_all" msgid="8356136101061143841">"Compartir Internet y zona Wi-Fi"</string> +    <string name="tether_settings_title_bluetooth" msgid="355855408317564420">"Compartir conexión por Bluetooth"</string> +    <string name="tether_settings_title_usb_bluetooth" msgid="5355828977109785001">"Compartir conexión"</string> +    <string name="tether_settings_title_all" msgid="8356136101061143841">"Compartir conexión y zona Wi-Fi"</string>      <string name="managed_user_title" msgid="8109605045406748842">"Todas las aplicaciones de trabajo"</string>      <string name="user_guest" msgid="8475274842845401871">"Invitado"</string>      <string name="unknown" msgid="1592123443519355854">"Desconocido"</string> @@ -162,7 +162,7 @@      <string name="development_settings_summary" msgid="1815795401632854041">"Establecer opciones de desarrollo de aplicaciones"</string>      <string name="development_settings_not_available" msgid="4308569041701535607">"Las opciones de desarrollador no están disponibles para este usuario"</string>      <string name="vpn_settings_not_available" msgid="956841430176985598">"Los ajustes de VPN no están disponibles para este usuario"</string> -    <string name="tethering_settings_not_available" msgid="6765770438438291012">"Los ajustes para compartir Internet no están disponibles para este usuario"</string> +    <string name="tethering_settings_not_available" msgid="6765770438438291012">"Los ajustes para compartir conexión no están disponibles para este usuario"</string>      <string name="apn_settings_not_available" msgid="7873729032165324000">"Los ajustes del nombre de punto de acceso no están disponibles para este usuario"</string>      <string name="enable_adb" msgid="7982306934419797485">"Depuración por USB"</string>      <string name="enable_adb_summary" msgid="4881186971746056635">"Activar el modo de depuración cuando el dispositivo esté conectado por USB"</string> @@ -186,7 +186,7 @@      <string name="wifi_aggressive_handover" msgid="5309131983693661320">"Transferencia agresiva de Wi-Fi a móvil"</string>      <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Permitir siempre búsquedas de Wi-Fi"</string>      <string name="mobile_data_always_on" msgid="8774857027458200434">"Datos móviles siempre activos"</string> -    <string name="tethering_hardware_offload" msgid="7470077827090325814">"Aceleración por hardware para conexión mediante dispositivo portátil"</string> +    <string name="tethering_hardware_offload" msgid="7470077827090325814">"Aceleración por hardware para conexión compartida"</string>      <string name="bluetooth_disable_absolute_volume" msgid="2660673801947898809">"Inhabilitar volumen absoluto"</string>      <string name="bluetooth_enable_inband_ringing" msgid="3291686366721786740">"Habilitar tono de llamada por Bluetooth"</string>      <string name="bluetooth_select_avrcp_version_string" msgid="3750059931120293633">"Versión AVRCP del Bluetooth"</string> @@ -218,7 +218,7 @@      <string name="allow_mock_location_summary" msgid="317615105156345626">"Permitir ubicaciones simuladas"</string>      <string name="debug_view_attributes" msgid="6485448367803310384">"Inspección de atributos de vista"</string>      <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Mantén los datos móviles siempre activos, aunque la conexión Wi‑Fi esté activada (para cambiar de red rápidamente)."</string> -    <string name="tethering_hardware_offload_summary" msgid="7726082075333346982">"Usar la aceleración por hardware para conexión mediante dispositivo portátil si está disponible"</string> +    <string name="tethering_hardware_offload_summary" msgid="7726082075333346982">"Usar la conexión compartida con aceleración por hardware si está disponible"</string>      <string name="adb_warning_title" msgid="6234463310896563253">"¿Permitir depuración por USB?"</string>      <string name="adb_warning_message" msgid="7316799925425402244">"La depuración por USB solo está indicada para actividades de desarrollo. Puedes utilizarla para intercambiar datos entre el ordenador y el dispositivo, para instalar aplicaciones en el dispositivo sin recibir notificaciones y para leer datos de registro."</string>      <string name="adb_keys_warning_message" msgid="5659849457135841625">"¿Quieres revocar el acceso a la depuración por USB de todos los ordenadores que has autorizado?"</string> diff --git a/packages/SettingsLib/res/values/attrs.xml b/packages/SettingsLib/res/values/attrs.xml index a8a179358744..6d852df2f907 100644 --- a/packages/SettingsLib/res/values/attrs.xml +++ b/packages/SettingsLib/res/values/attrs.xml @@ -48,4 +48,9 @@      <attr name="footerPreferenceStyle" format="reference" /> +    <declare-styleable name="PreferenceImageView"> +        <attr name="maxWidth" format="dimension" /> +        <attr name="maxHeight" format="dimension" /> +    </declare-styleable> +  </resources> diff --git a/packages/SettingsLib/src/com/android/settingslib/drawer/ProfileSelectDialog.java b/packages/SettingsLib/src/com/android/settingslib/drawer/ProfileSelectDialog.java index 512049fc1eaf..c79b1466d606 100644 --- a/packages/SettingsLib/src/com/android/settingslib/drawer/ProfileSelectDialog.java +++ b/packages/SettingsLib/src/com/android/settingslib/drawer/ProfileSelectDialog.java @@ -68,10 +68,8 @@ public class ProfileSelectDialog extends DialogFragment implements OnClickListen      public void onClick(DialogInterface dialog, int which) {          UserHandle user = mSelectedTile.userHandle.get(which);          // Show menu on top level items. -        mSelectedTile.intent.putExtra(SettingsDrawerActivity.EXTRA_SHOW_MENU, true);          mSelectedTile.intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);          getActivity().startActivityAsUser(mSelectedTile.intent, user); -        ((SettingsDrawerActivity) getActivity()).onProfileTileOpen();      }      public static void updateUserHandlesIfNeeded(Context context, Tile tile) { diff --git a/packages/SystemUI/res-keyguard/drawable/ic_access_alarms_big.xml b/packages/SystemUI/res-keyguard/drawable/ic_access_alarms_big.xml index fd385fcc71fa..fffa0bd621e5 100644 --- a/packages/SystemUI/res-keyguard/drawable/ic_access_alarms_big.xml +++ b/packages/SystemUI/res-keyguard/drawable/ic_access_alarms_big.xml @@ -19,6 +19,6 @@ Copyright (C) 2017 The Android Open Source Project      android:viewportWidth="24.0"      android:viewportHeight="24.0">      <path -        android:fillColor="?attr/bgProtectSecondaryTextColor" +        android:fillColor="@android:color/white"          android:pathData="M21.35,6.49c-0.35,0.42 -0.98,0.47 -1.4,0.12l-3.07,-2.57a1,1 0,1 1,1.29 -1.53l3.07,2.57c0.42,0.35 0.47,0.98 0.11,1.41zM7.24,2.63a1,1 0,0 0,-1.41 -0.13L2.77,5.07A0.996,0.996 0,1 0,4.05 6.6l3.06,-2.57c0.43,-0.35 0.48,-0.98 0.13,-1.4zM11.75,8c-0.41,0 -0.75,0.34 -0.75,0.75v4.68c0,0.35 0.18,0.68 0.49,0.86l3.65,2.19c0.34,0.2 0.78,0.1 0.98,-0.24a0.71,0.71 0,0 0,-0.25 -0.99l-3.37,-2v-4.5c0,-0.41 -0.34,-0.75 -0.75,-0.75zM12,5.9c-3.91,0 -7.1,3.18 -7.1,7.1s3.19,7.1 7.1,7.1 7.1,-3.18 7.1,-7.1 -3.19,-7.1 -7.1,-7.1M12,4a9,9 0,1 1,-0.001 18.001A9,9 0,0 1,12 4z" />  </vector> diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_status_area.xml b/packages/SystemUI/res-keyguard/layout/keyguard_status_area.xml index a0850f492531..7d12504604c8 100644 --- a/packages/SystemUI/res-keyguard/layout/keyguard_status_area.xml +++ b/packages/SystemUI/res-keyguard/layout/keyguard_status_area.xml @@ -39,6 +39,8 @@          android:layout_height="wrap_content"          android:drawablePadding="6dp"          android:drawableStart="@drawable/ic_access_alarms_big" +        android:drawableTint="?attr/bgProtectSecondaryTextColor" +        android:drawableTintMode="src_in"          android:textColor="?attr/bgProtectSecondaryTextColor"          android:letterSpacing="0.15"          style="@style/widget_label" diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml index 795f20ee814e..9eceeb40d6d5 100644 --- a/packages/SystemUI/res-keyguard/values/styles.xml +++ b/packages/SystemUI/res-keyguard/values/styles.xml @@ -38,7 +38,7 @@          <item name="android:paddingBottom">-16dp</item>      </style>      <style name="Keyguard.ImageButton.NumPadEnter" parent="@android:style/Widget.ImageButton"> -        <item name="android:tint">?attr/bgProtectTextColor</item> +        <item name="android:tint">@color/background_protected</item>      </style>      <style name="Widget.TextView.NumPadKey.Klondike" parent="Widget.TextView.NumPadKey">          <item name="android:textSize">12sp</item> diff --git a/packages/SystemUI/res/anim/error_to_trustedstate_bottompath_animation.xml b/packages/SystemUI/res/anim/error_to_trustedstate_bottompath_animation.xml new file mode 100644 index 000000000000..073bf6d194a6 --- /dev/null +++ b/packages/SystemUI/res/anim/error_to_trustedstate_bottompath_animation.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <objectAnimator +        android:duration="283" +        android:propertyName="pathData" +        android:valueFrom="M 0.0,-1.1 l 0.0,0.0 c 0.60751322478,0.0 1.1,0.49248677522 1.1,1.1 l 0.0,0.0 c 0.0,0.60751322478 -0.49248677522,1.1 -1.1,1.1 l 0.0,0.0 c -0.60751322478,0.0 -1.1,-0.49248677522 -1.1,-1.1 l 0.0,0.0 c 0.0,-0.60751322478 0.49248677522,-1.1 1.1,-1.1 Z" +        android:valueTo="M 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" +        android:valueType="pathType" +        android:interpolator="@interpolator/error_to_trustedstate_animation_interpolator_0" /> +</set> diff --git a/packages/SystemUI/res/anim/ic_volume_expand_chevron_01_animation.xml b/packages/SystemUI/res/anim/error_to_trustedstate_circlepath_animation.xml index e43e6453d82d..990392d28e26 100644 --- a/packages/SystemUI/res/anim/ic_volume_expand_chevron_01_animation.xml +++ b/packages/SystemUI/res/anim/error_to_trustedstate_circlepath_animation.xml @@ -1,5 +1,5 @@ -<!-- -     Copyright (C) 2015 The Android Open Source Project +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. @@ -13,13 +13,13 @@       See the License for the specific language governing permissions and       limitations under the License.  --> -<set xmlns:android="http://schemas.android.com/apk/res/android" > - +<set +    xmlns:android="http://schemas.android.com/apk/res/android" >      <objectAnimator -        android:duration="250" -        android:interpolator="@android:interpolator/fast_out_slow_in" -        android:pathData="M 12.0,15.0 c 0.0,-1.0 0.0,-5.33333 0.0,-6.0" -        android:propertyXName="translateX" -        android:propertyYName="translateY" /> - -</set>
\ No newline at end of file +        android:duration="383" +        android:propertyName="trimPathEnd" +        android:valueFrom="1.0" +        android:valueTo="0.0" +        android:valueType="floatType" +        android:interpolator="@android:interpolator/fast_out_slow_in" /> +</set> diff --git a/packages/SystemUI/res/anim/error_to_trustedstate_ellipse_path_1_animation.xml b/packages/SystemUI/res/anim/error_to_trustedstate_ellipse_path_1_animation.xml index 1c501658a2eb..a00d93746b9a 100755..100644 --- a/packages/SystemUI/res/anim/error_to_trustedstate_ellipse_path_1_animation.xml +++ b/packages/SystemUI/res/anim/error_to_trustedstate_ellipse_path_1_animation.xml @@ -1,46 +1,35 @@  <?xml version="1.0" encoding="utf-8"?> -<!-- -Copyright (C) 2015 The Android Open Source Project +<!-- 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 +     Licensed under the Apache License, Version 2.0 (the "License"); +     you may not use this file except in compliance with the License. +     You may obtain a copy of the License at -         http://www.apache.org/licenses/LICENSE-2.0 +          http://www.apache.org/licenses/LICENSE-2.0 -    Unless required by applicable law or agreed to in writing, software -    distributed under the License is distributed on an "AS IS" BASIS, -    WITHOUT 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.  -->  <set      xmlns:android="http://schemas.android.com/apk/res/android" > -    <objectAnimator -        android:duration="600" -        android:propertyName="strokeColor" -        android:valueFrom="#FFF3511E" -        android:valueTo="#FFFFFFFF" -        android:interpolator="@android:interpolator/fast_out_slow_in" /> -    <objectAnimator -        android:duration="600" -        android:propertyName="strokeAlpha" -        android:valueFrom="1.0" -        android:valueTo="0.5" -        android:valueType="floatType" -        android:interpolator="@android:interpolator/fast_out_slow_in" /> -    <objectAnimator -        android:duration="383" -        android:propertyName="trimPathStart" -        android:valueFrom="0.5001" -        android:valueTo="0.0" -        android:valueType="floatType" -        android:interpolator="@interpolator/error_to_trustedstate_animation_interpolator_3" /> -    <objectAnimator -        android:duration="383" -        android:propertyName="trimPathEnd" -        android:valueFrom="1.5" -        android:valueTo="0.0" -        android:valueType="floatType" -        android:interpolator="@interpolator/error_to_trustedstate_animation_interpolator_1" /> +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="350" +            android:propertyName="pathData" +            android:valueFrom="M 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" +            android:valueTo="M 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" +            android:valueType="pathType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="200" +            android:propertyName="pathData" +            android:valueFrom="M 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" +            android:valueTo="M 0.0,-1.988645 c 1.09829830627,0.0 1.988645,0.890346693734 1.988645,1.988645 c 0.0,1.09829830627 -0.890346693734,1.988645 -1.988645,1.988645 c -1.09829830627,0.0 -1.988645,-0.890346693734 -1.988645,-1.988645 c 0.0,-1.09829830627 0.890346693734,-1.988645 1.988645,-1.988645 Z" +            android:valueType="pathType" +            android:interpolator="@interpolator/error_to_trustedstate_animation_interpolator_6" /> +    </set>  </set> diff --git a/packages/SystemUI/res/anim/error_to_trustedstate_ellipse_path_2_animation.xml b/packages/SystemUI/res/anim/error_to_trustedstate_ellipse_path_2_animation.xml deleted file mode 100755 index 598255cb8397..000000000000 --- a/packages/SystemUI/res/anim/error_to_trustedstate_ellipse_path_2_animation.xml +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -Copyright (C) 2015 The Android Open Source Project - -   Licensed under the Apache License, Version 2.0 (the "License"); -    you may not use this file except in compliance with the License. -    You may obtain a copy of the License at - -         http://www.apache.org/licenses/LICENSE-2.0 - -    Unless required by applicable law or agreed to in writing, software -    distributed under the License is distributed on an "AS IS" BASIS, -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -    See the License for the specific language governing permissions and -    limitations under the License. ---> -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="316" -            android:propertyName="pathData" -            android:valueFrom="M 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" -            android:valueTo="M 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" -            android:valueType="pathType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="233" -            android:propertyName="pathData" -            android:valueFrom="M 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" -            android:valueTo="M 0.0,-1.988645 c 1.09829830627,0.0 1.988645,0.890346693734 1.988645,1.988645 c 0.0,1.09829830627 -0.890346693734,1.988645 -1.988645,1.988645 c -1.09829830627,0.0 -1.988645,-0.890346693734 -1.988645,-1.988645 c 0.0,-1.09829830627 0.890346693734,-1.988645 1.988645,-1.988645 Z" -            android:valueType="pathType" -            android:interpolator="@interpolator/error_to_trustedstate_animation_interpolator_1" /> -    </set> -    <objectAnimator -        android:duration="600" -        android:propertyName="fillColor" -        android:valueFrom="#FFF3511E" -        android:valueTo="#FFFFFFFF" -        android:interpolator="@android:interpolator/fast_out_slow_in" /> -    <objectAnimator -        android:duration="600" -        android:propertyName="fillAlpha" -        android:valueFrom="1.0" -        android:valueTo="0.5" -        android:valueType="floatType" -        android:interpolator="@android:interpolator/fast_out_slow_in" /> -</set> diff --git a/packages/SystemUI/res/anim/error_to_trustedstate_errorcircle_animation.xml b/packages/SystemUI/res/anim/error_to_trustedstate_errorcircle_animation.xml new file mode 100644 index 000000000000..59d623232757 --- /dev/null +++ b/packages/SystemUI/res/anim/error_to_trustedstate_errorcircle_animation.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="33" +            android:propertyName="rotation" +            android:valueFrom="5.0" +            android:valueTo="5.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="366" +            android:propertyName="rotation" +            android:valueFrom="5.0" +            android:valueTo="-180.0" +            android:valueType="floatType" +            android:interpolator="@interpolator/error_to_trustedstate_animation_interpolator_1" /> +    </set> +</set> diff --git a/packages/SystemUI/res/anim/ic_volume_collapse_rectangle_2_animation.xml b/packages/SystemUI/res/anim/error_to_trustedstate_errorexclamationdot_animation.xml index 0bc66bd71321..55bfa58c5184 100644 --- a/packages/SystemUI/res/anim/ic_volume_collapse_rectangle_2_animation.xml +++ b/packages/SystemUI/res/anim/error_to_trustedstate_errorexclamationdot_animation.xml @@ -1,5 +1,5 @@ -<!-- -     Copyright (C) 2015 The Android Open Source Project +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. @@ -13,14 +13,12 @@       See the License for the specific language governing permissions and       limitations under the License.  --> -<set xmlns:android="http://schemas.android.com/apk/res/android" > - +<set +    xmlns:android="http://schemas.android.com/apk/res/android" >      <objectAnimator -        android:duration="200" -        android:interpolator="@interpolator/ic_volume_collapse_animation_interpolator_0" -        android:propertyName="rotation" -        android:valueFrom="-45.0" -        android:valueTo="45.0" -        android:valueType="floatType" /> - -</set>
\ No newline at end of file +        android:duration="283" +        android:propertyXName="translateX" +        android:propertyYName="translateY" +        android:pathData="M 12.0,12.0 c 0.0,-0.66667 0.0,-3.33333 0.0,-4.0" +        android:interpolator="@interpolator/error_to_trustedstate_animation_interpolator_5" /> +</set> diff --git a/packages/SystemUI/res/anim/error_to_trustedstate_exclamation_dot_animation.xml b/packages/SystemUI/res/anim/error_to_trustedstate_exclamation_dot_animation.xml deleted file mode 100755 index 7e0fa437f719..000000000000 --- a/packages/SystemUI/res/anim/error_to_trustedstate_exclamation_dot_animation.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -Copyright (C) 2015 The Android Open Source Project - -   Licensed under the Apache License, Version 2.0 (the "License"); -    you may not use this file except in compliance with the License. -    You may obtain a copy of the License at - -         http://www.apache.org/licenses/LICENSE-2.0 - -    Unless required by applicable law or agreed to in writing, software -    distributed under the License is distributed on an "AS IS" BASIS, -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -    See the License for the specific language governing permissions and -    limitations under the License. ---> -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <objectAnimator -        android:duration="133" -        android:propertyXName="translateX" -        android:propertyYName="translateY" -        android:pathData="M -0.00391,5.333 c 0.00065,-0.22217 0.00326,-1.11083 0.00391,-1.333" -        android:interpolator="@interpolator/error_to_trustedstate_animation_interpolator_0" /> -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="83" -            android:propertyName="scaleX" -            android:valueFrom="1.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="16" -            android:propertyName="scaleX" -            android:valueFrom="1.0" -            android:valueTo="0.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -    </set> -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="83" -            android:propertyName="scaleY" -            android:valueFrom="1.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="16" -            android:propertyName="scaleY" -            android:valueFrom="1.0" -            android:valueTo="0.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -    </set> -</set> diff --git a/packages/SystemUI/res/anim/ic_volume_collapse_chevron_02_animation.xml b/packages/SystemUI/res/anim/error_to_trustedstate_exclamationtop_animation.xml index 443f2a651e59..4c44c6bd5eeb 100644 --- a/packages/SystemUI/res/anim/ic_volume_collapse_chevron_02_animation.xml +++ b/packages/SystemUI/res/anim/error_to_trustedstate_exclamationtop_animation.xml @@ -1,5 +1,5 @@ -<!-- -     Copyright (C) 2015 The Android Open Source Project +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. @@ -13,13 +13,12 @@       See the License for the specific language governing permissions and       limitations under the License.  --> -<set xmlns:android="http://schemas.android.com/apk/res/android" > - +<set +    xmlns:android="http://schemas.android.com/apk/res/android" >      <objectAnimator -        android:duration="250" -        android:interpolator="@android:interpolator/fast_out_slow_in" -        android:pathData="M 12.0,9.0 c 0.0,0.66667 0.0,5.0 0.0,6.0" +        android:duration="283"          android:propertyXName="translateX" -        android:propertyYName="translateY" /> - -</set>
\ No newline at end of file +        android:propertyYName="translateY" +        android:pathData="M 0.0,-2.0 c 0.0,0.5 0.0,2.5 0.0,3.0" +        android:interpolator="@interpolator/error_to_trustedstate_animation_interpolator_2" /> +</set> diff --git a/packages/SystemUI/res/anim/error_to_trustedstate_lock_left_side_animation.xml b/packages/SystemUI/res/anim/error_to_trustedstate_lock_left_side_animation.xml deleted file mode 100755 index f413cbf87c30..000000000000 --- a/packages/SystemUI/res/anim/error_to_trustedstate_lock_left_side_animation.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -Copyright (C) 2015 The Android Open Source Project - -   Licensed under the Apache License, Version 2.0 (the "License"); -    you may not use this file except in compliance with the License. -    You may obtain a copy of the License at - -         http://www.apache.org/licenses/LICENSE-2.0 - -    Unless required by applicable law or agreed to in writing, software -    distributed under the License is distributed on an "AS IS" BASIS, -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -    See the License for the specific language governing permissions and -    limitations under the License. ---> -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="33" -            android:propertyName="scaleX" -            android:valueFrom="1.33333" -            android:valueTo="1.33333" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="183" -            android:propertyName="scaleX" -            android:valueFrom="1.33333" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> -    </set> -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="33" -            android:propertyName="scaleY" -            android:valueFrom="1.33333" -            android:valueTo="1.33333" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="183" -            android:propertyName="scaleY" -            android:valueFrom="1.33333" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> -    </set> -</set> diff --git a/packages/SystemUI/res/anim/error_to_trustedstate_lock_right_side_animation.xml b/packages/SystemUI/res/anim/error_to_trustedstate_lock_right_side_animation.xml deleted file mode 100755 index f413cbf87c30..000000000000 --- a/packages/SystemUI/res/anim/error_to_trustedstate_lock_right_side_animation.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -Copyright (C) 2015 The Android Open Source Project - -   Licensed under the Apache License, Version 2.0 (the "License"); -    you may not use this file except in compliance with the License. -    You may obtain a copy of the License at - -         http://www.apache.org/licenses/LICENSE-2.0 - -    Unless required by applicable law or agreed to in writing, software -    distributed under the License is distributed on an "AS IS" BASIS, -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -    See the License for the specific language governing permissions and -    limitations under the License. ---> -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="33" -            android:propertyName="scaleX" -            android:valueFrom="1.33333" -            android:valueTo="1.33333" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="183" -            android:propertyName="scaleX" -            android:valueFrom="1.33333" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> -    </set> -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="33" -            android:propertyName="scaleY" -            android:valueFrom="1.33333" -            android:valueTo="1.33333" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="183" -            android:propertyName="scaleY" -            android:valueFrom="1.33333" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> -    </set> -</set> diff --git a/packages/SystemUI/res/anim/error_to_trustedstate_lock_top_animation.xml b/packages/SystemUI/res/anim/error_to_trustedstate_lock_top_animation.xml index 2518041f3c1a..6f7d692e86c0 100755..100644 --- a/packages/SystemUI/res/anim/error_to_trustedstate_lock_top_animation.xml +++ b/packages/SystemUI/res/anim/error_to_trustedstate_lock_top_animation.xml @@ -1,32 +1,31 @@  <?xml version="1.0" encoding="utf-8"?> -<!-- -Copyright (C) 2015 The Android Open Source Project +<!-- 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 +     Licensed under the Apache License, Version 2.0 (the "License"); +     you may not use this file except in compliance with the License. +     You may obtain a copy of the License at -         http://www.apache.org/licenses/LICENSE-2.0 +          http://www.apache.org/licenses/LICENSE-2.0 -    Unless required by applicable law or agreed to in writing, software -    distributed under the License is distributed on an "AS IS" BASIS, -    WITHOUT 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.  -->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <set          android:ordering="sequentially" >          <objectAnimator -            android:duration="333" +            android:duration="266"              android:propertyName="scaleX"              android:valueFrom="0.0"              android:valueTo="0.0"              android:valueType="floatType"              android:interpolator="@android:interpolator/linear" />          <objectAnimator -            android:duration="16" +            android:duration="66"              android:propertyName="scaleX"              android:valueFrom="0.0"              android:valueTo="1.0" @@ -36,14 +35,14 @@ Copyright (C) 2015 The Android Open Source Project      <set          android:ordering="sequentially" >          <objectAnimator -            android:duration="333" +            android:duration="266"              android:propertyName="scaleY"              android:valueFrom="0.0"              android:valueTo="0.0"              android:valueType="floatType"              android:interpolator="@android:interpolator/linear" />          <objectAnimator -            android:duration="16" +            android:duration="66"              android:propertyName="scaleY"              android:valueFrom="0.0"              android:valueTo="1.0" diff --git a/packages/SystemUI/res/anim/error_to_trustedstate_path_1_animation.xml b/packages/SystemUI/res/anim/error_to_trustedstate_path_1_animation.xml index 15f8d2ec3e42..acc8531217d4 100755..100644 --- a/packages/SystemUI/res/anim/error_to_trustedstate_path_1_animation.xml +++ b/packages/SystemUI/res/anim/error_to_trustedstate_path_1_animation.xml @@ -1,56 +1,52 @@  <?xml version="1.0" encoding="utf-8"?> -<!-- -Copyright (C) 2015 The Android Open Source Project +<!-- 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 +     Licensed under the Apache License, Version 2.0 (the "License"); +     you may not use this file except in compliance with the License. +     You may obtain a copy of the License at -         http://www.apache.org/licenses/LICENSE-2.0 +          http://www.apache.org/licenses/LICENSE-2.0 -    Unless required by applicable law or agreed to in writing, software -    distributed under the License is distributed on an "AS IS" BASIS, -    WITHOUT 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.  -->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <set          android:ordering="sequentially" >          <objectAnimator -            android:duration="33" +            android:duration="283"              android:propertyName="pathData" -            android:valueFrom="M 0.02685546875,-4.96875 c 0.0,0.0 -0.005615234375,0.015625 -0.005615234375,0.015625 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 0.00375366210938,-0.015625 0.00375366210938,-0.015625 c 0.0,0.0 -0.00936889648438,3.9296875 -0.00936889648438,3.9296875 c 0.0,0.0 -0.0040283203125,0.015625 -0.0040283203125,0.015625 c 0.0,0.0 -0.0028076171875,0.0234375 -0.0028076171875,0.0234375 c 0.0,0.0 0.010498046875,-0.015625 0.010498046875,-0.015625 c 0.0,0.0 0.985595703125,0.0078125 0.985595703125,0.0078125 c 0.0,0.0 0.017578125,-6.015625 0.017578125,-6.015625 c 0.0,0.0 0.104400634766,0.0546875 -0.99560546875,0.0546875 Z" -            android:valueTo="M 0.02685546875,-4.96875 c 0.0,0.0 -0.005615234375,0.015625 -0.005615234375,0.015625 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 0.00375366210938,-0.015625 0.00375366210938,-0.015625 c 0.0,0.0 -0.00936889648438,3.9296875 -0.00936889648438,3.9296875 c 0.0,0.0 -0.0040283203125,0.015625 -0.0040283203125,0.015625 c 0.0,0.0 -0.0028076171875,0.0234375 -0.0028076171875,0.0234375 c 0.0,0.0 0.010498046875,-0.015625 0.010498046875,-0.015625 c 0.0,0.0 0.985595703125,0.0078125 0.985595703125,0.0078125 c 0.0,0.0 0.017578125,-6.015625 0.017578125,-6.015625 c 0.0,0.0 0.104400634766,0.0546875 -0.99560546875,0.0546875 Z" -            android:valueType="pathType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="183" -            android:propertyName="pathData" -            android:valueFrom="M 0.02685546875,-4.96875 c 0.0,0.0 -0.005615234375,0.015625 -0.005615234375,0.015625 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 0.00375366210938,-0.015625 0.00375366210938,-0.015625 c 0.0,0.0 -0.00936889648438,3.9296875 -0.00936889648438,3.9296875 c 0.0,0.0 -0.0040283203125,0.015625 -0.0040283203125,0.015625 c 0.0,0.0 -0.0028076171875,0.0234375 -0.0028076171875,0.0234375 c 0.0,0.0 0.010498046875,-0.015625 0.010498046875,-0.015625 c 0.0,0.0 0.985595703125,0.0078125 0.985595703125,0.0078125 c 0.0,0.0 0.017578125,-6.015625 0.017578125,-6.015625 c 0.0,0.0 0.104400634766,0.0546875 -0.99560546875,0.0546875 Z" +            android:valueFrom="M 1.63623046875,-4.953125 c 0.0,0.0 -1.61499023438,0.0 -1.61499023438,0.0 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 0.00375366210938,-0.015625 0.00375366210938,-0.015625 c 0.0,0.0 0.0118713378906,7.9296875 0.0118713378906,7.9296875 c 0.0,0.0 -0.0040283203125,0.015625 -0.0040283203125,0.015625 c 0.0,0.0 -0.0052490234375,2.0 -0.0052490234375,2.0 c 0.0,0.0 1.61987304688,0.0 1.61987304688,0.0 c 1.10000610352,0.0 2.0,-0.900024414062 2.0,-2.0 c 0.0,0.0 -0.01123046875,-7.9296875 -0.01123046875,-7.9296875 c 0.0,-1.09997558594 -0.899993896484,-2.0 -2.0,-2.0 Z"              android:valueTo="M 1.63623046875,-4.953125 c 0.0,0.0 -1.61499023438,0.0 -1.61499023438,0.0 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 0.00375366210938,-0.015625 0.00375366210938,-0.015625 c 0.0,0.0 0.0118713378906,7.9296875 0.0118713378906,7.9296875 c 0.0,0.0 -0.0040283203125,0.015625 -0.0040283203125,0.015625 c 0.0,0.0 -0.0052490234375,2.0 -0.0052490234375,2.0 c 0.0,0.0 1.61987304688,0.0 1.61987304688,0.0 c 1.10000610352,0.0 2.0,-0.900024414062 2.0,-2.0 c 0.0,0.0 -0.01123046875,-7.9296875 -0.01123046875,-7.9296875 c 0.0,-1.09997558594 -0.899993896484,-2.0 -2.0,-2.0 Z"              android:valueType="pathType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> +            android:interpolator="@android:interpolator/linear" />          <objectAnimator -            android:duration="316" +            android:duration="266"              android:propertyName="pathData"              android:valueFrom="M 1.63623046875,-4.953125 c 0.0,0.0 -1.61499023438,0.0 -1.61499023438,0.0 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 0.00375366210938,-0.015625 0.00375366210938,-0.015625 c 0.0,0.0 0.0118713378906,7.9296875 0.0118713378906,7.9296875 c 0.0,0.0 -0.0040283203125,0.015625 -0.0040283203125,0.015625 c 0.0,0.0 -0.0052490234375,2.0 -0.0052490234375,2.0 c 0.0,0.0 1.61987304688,0.0 1.61987304688,0.0 c 1.10000610352,0.0 2.0,-0.900024414062 2.0,-2.0 c 0.0,0.0 -0.01123046875,-7.9296875 -0.01123046875,-7.9296875 c 0.0,-1.09997558594 -0.899993896484,-2.0 -2.0,-2.0 Z"              android:valueTo="M 6.00561523438,-4.046875 c 0.0,0.0 -5.98999023438,0.0 -5.98999023438,0.0 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 5.98812866211,0.0 5.98812866211,0.0 c 0.0,0.0 0.00064086914062,10.0 0.00064086914062,10.0 c 0.0,0.0 -5.98840332031,0.0 -5.98840332031,0.0 c 0.0,0.0 -0.0052490234375,2.0 -0.0052490234375,2.0 c 0.0,0.0 5.99487304688,0.0 5.99487304688,0.0 c 1.10000610352,0.0 2.0,-0.900024414062 2.0,-2.0 c 0.0,0.0 0.0,-10.0 0.0,-10.0 c 0.0,-1.09997558594 -0.899993896484,-2.0 -2.0,-2.0 Z"              android:valueType="pathType" -            android:interpolator="@interpolator/error_to_trustedstate_animation_interpolator_4" /> +            android:interpolator="@interpolator/error_to_trustedstate_animation_interpolator_3" /> +    </set> +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="266" +            android:propertyName="fillAlpha" +            android:valueFrom="0.0" +            android:valueTo="0.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="16" +            android:propertyName="fillAlpha" +            android:valueFrom="0.0" +            android:valueTo="1.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" />      </set> -    <objectAnimator -        android:duration="600" -        android:propertyName="fillColor" -        android:valueFrom="#FFF3511E" -        android:valueTo="#FFFFFFFF" -        android:interpolator="@android:interpolator/fast_out_slow_in" /> -    <objectAnimator -        android:duration="600" -        android:propertyName="fillAlpha" -        android:valueFrom="1.0" -        android:valueTo="0.5" -        android:valueType="floatType" -        android:interpolator="@android:interpolator/fast_out_slow_in" />  </set> diff --git a/packages/SystemUI/res/anim/error_to_trustedstate_path_2_animation.xml b/packages/SystemUI/res/anim/error_to_trustedstate_path_2_animation.xml index aa81fcff0da5..fac1ece2dadd 100755..100644 --- a/packages/SystemUI/res/anim/error_to_trustedstate_path_2_animation.xml +++ b/packages/SystemUI/res/anim/error_to_trustedstate_path_2_animation.xml @@ -1,56 +1,52 @@  <?xml version="1.0" encoding="utf-8"?> -<!-- -Copyright (C) 2015 The Android Open Source Project +<!-- 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 +     Licensed under the Apache License, Version 2.0 (the "License"); +     you may not use this file except in compliance with the License. +     You may obtain a copy of the License at -         http://www.apache.org/licenses/LICENSE-2.0 +          http://www.apache.org/licenses/LICENSE-2.0 -    Unless required by applicable law or agreed to in writing, software -    distributed under the License is distributed on an "AS IS" BASIS, -    WITHOUT 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.  -->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <set          android:ordering="sequentially" >          <objectAnimator -            android:duration="33" +            android:duration="283"              android:propertyName="pathData" -            android:valueFrom="M 0.0252990722656,-2.96914672852 c 0.0,0.0 -0.00390625,0.0160217285156 -0.00390625,0.0160217285156 c 0.0,0.0 -0.00015258789062,-2.0 -0.00015258789062,-2.0 c 0.0,0.0 0.005615234375,-0.015625 0.005615234375,-0.015625 c -1.10000610352,0.0 -1.01220703125,-0.0546875 -1.01220703125,-0.0546875 c 0.0,0.0 -0.017578125,6.015625 -0.017578125,6.015625 c 0.0,0.0 -0.0777893066406,-0.0078125 1.02221679688,-0.0078125 c 0.0,0.0 -0.005615234375,0.015625 -0.005615234375,0.015625 c 0.0,0.0 -0.002685546875,-0.0244140625 -0.002685546875,-0.0244140625 c 0.0,0.0 0.00390625,-0.0152587890625 0.00390625,-0.0152587890625 c 0.0,0.0 0.0104064941406,-3.92947387695 0.0104064941406,-3.92947387695 Z" -            android:valueTo="M 0.0252990722656,-2.96914672852 c 0.0,0.0 -0.00390625,0.0160217285156 -0.00390625,0.0160217285156 c 0.0,0.0 -0.00015258789062,-2.0 -0.00015258789062,-2.0 c 0.0,0.0 0.005615234375,-0.015625 0.005615234375,-0.015625 c -1.10000610352,0.0 -1.01220703125,-0.0546875 -1.01220703125,-0.0546875 c 0.0,0.0 -0.017578125,6.015625 -0.017578125,6.015625 c 0.0,0.0 -0.0777893066406,-0.0078125 1.02221679688,-0.0078125 c 0.0,0.0 -0.005615234375,0.015625 -0.005615234375,0.015625 c 0.0,0.0 -0.002685546875,-0.0244140625 -0.002685546875,-0.0244140625 c 0.0,0.0 0.00390625,-0.0152587890625 0.00390625,-0.0152587890625 c 0.0,0.0 0.0104064941406,-3.92947387695 0.0104064941406,-3.92947387695 Z" -            android:valueType="pathType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="183" -            android:propertyName="pathData" -            android:valueFrom="M 0.0252990722656,-2.96914672852 c 0.0,0.0 -0.00390625,0.0160217285156 -0.00390625,0.0160217285156 c 0.0,0.0 -0.00015258789062,-2.0 -0.00015258789062,-2.0 c 0.0,0.0 0.005615234375,-0.015625 0.005615234375,-0.015625 c -1.10000610352,0.0 -1.01220703125,-0.0546875 -1.01220703125,-0.0546875 c 0.0,0.0 -0.017578125,6.015625 -0.017578125,6.015625 c 0.0,0.0 -0.0777893066406,-0.0078125 1.02221679688,-0.0078125 c 0.0,0.0 -0.005615234375,0.015625 -0.005615234375,0.015625 c 0.0,0.0 -0.002685546875,-0.0244140625 -0.002685546875,-0.0244140625 c 0.0,0.0 0.00390625,-0.0152587890625 0.00390625,-0.0152587890625 c 0.0,0.0 0.0104064941406,-3.92947387695 0.0104064941406,-3.92947387695 Z" +            android:valueFrom="M 0.0252990722656,-2.96975708008 c 0.0,0.0 -0.00390625,0.0166320800781 -0.00390625,0.0166320800781 c 0.0,0.0 -0.00015258789062,-2.0 -0.00015258789062,-2.0 c 0.0,0.0 -1.63500976562,0.0 -1.63500976562,0.0 c -1.10000610352,0.0 -2.0,0.900024414062 -2.0,2.0 c 0.0,0.0 0.01123046875,7.9296875 0.01123046875,7.9296875 c 0.0,1.09997558594 0.899993896484,2.0 2.0,2.0 c 0.0,0.0 1.63500976562,0.0 1.63500976562,0.0 c 0.0,0.0 -0.000244140625,-2.0009765625 -0.000244140625,-2.0009765625 c 0.0,0.0 0.00390625,-0.015869140625 0.00390625,-0.015869140625 c 0.0,0.0 -0.0108337402344,-7.92947387695 -0.0108337402344,-7.92947387695 Z"              android:valueTo="M 0.0252990722656,-2.96975708008 c 0.0,0.0 -0.00390625,0.0166320800781 -0.00390625,0.0166320800781 c 0.0,0.0 -0.00015258789062,-2.0 -0.00015258789062,-2.0 c 0.0,0.0 -1.63500976562,0.0 -1.63500976562,0.0 c -1.10000610352,0.0 -2.0,0.900024414062 -2.0,2.0 c 0.0,0.0 0.01123046875,7.9296875 0.01123046875,7.9296875 c 0.0,1.09997558594 0.899993896484,2.0 2.0,2.0 c 0.0,0.0 1.63500976562,0.0 1.63500976562,0.0 c 0.0,0.0 -0.000244140625,-2.0009765625 -0.000244140625,-2.0009765625 c 0.0,0.0 0.00390625,-0.015869140625 0.00390625,-0.015869140625 c 0.0,0.0 -0.0108337402344,-7.92947387695 -0.0108337402344,-7.92947387695 Z"              android:valueType="pathType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> +            android:interpolator="@android:interpolator/linear" />          <objectAnimator -            android:duration="316" +            android:duration="266"              android:propertyName="pathData"              android:valueFrom="M 0.0252990722656,-2.96975708008 c 0.0,0.0 -0.00390625,0.0166320800781 -0.00390625,0.0166320800781 c 0.0,0.0 -0.00015258789062,-2.0 -0.00015258789062,-2.0 c 0.0,0.0 -1.63500976562,0.0 -1.63500976562,0.0 c -1.10000610352,0.0 -2.0,0.900024414062 -2.0,2.0 c 0.0,0.0 0.01123046875,7.9296875 0.01123046875,7.9296875 c 0.0,1.09997558594 0.899993896484,2.0 2.0,2.0 c 0.0,0.0 1.63500976562,0.0 1.63500976562,0.0 c 0.0,0.0 -0.000244140625,-2.0009765625 -0.000244140625,-2.0009765625 c 0.0,0.0 0.00390625,-0.015869140625 0.00390625,-0.015869140625 c 0.0,0.0 -0.0108337402344,-7.92947387695 -0.0108337402344,-7.92947387695 Z"              android:valueTo="M -5.9959564209,-2.04727172852 c 0.0,0.0 6.01173400879,0.00039672851562 6.01173400879,0.00039672851562 c 0.0,0.0 -0.00015258789062,-2.0 -0.00015258789062,-2.0 c 0.0,0.0 -6.01000976562,0.0 -6.01000976562,0.0 c -1.10000610352,0.0 -2.0,0.900024414062 -2.0,2.0 c 0.0,0.0 0.0,10.0 0.0,10.0 c 0.0,1.09997558594 0.899993896484,2.0 2.0,2.0 c 0.0,0.0 6.01000976562,0.0 6.01000976562,0.0 c 0.0,0.0 -0.000244140625,-2.0009765625 -0.000244140625,-2.0009765625 c 0.0,0.0 -6.01171875,0.0003662109375 -6.01171875,0.0003662109375 c 0.0,0.0 0.00038146972656,-9.99978637695 0.00038146972656,-9.99978637695 Z"              android:valueType="pathType" -            android:interpolator="@interpolator/error_to_trustedstate_animation_interpolator_4" /> +            android:interpolator="@interpolator/error_to_trustedstate_animation_interpolator_3" /> +    </set> +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="266" +            android:propertyName="fillAlpha" +            android:valueFrom="0.0" +            android:valueTo="0.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="16" +            android:propertyName="fillAlpha" +            android:valueFrom="0.0" +            android:valueTo="1.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" />      </set> -    <objectAnimator -        android:duration="600" -        android:propertyName="fillColor" -        android:valueFrom="#FFF3511E" -        android:valueTo="#FFFFFFFF" -        android:interpolator="@android:interpolator/fast_out_slow_in" /> -    <objectAnimator -        android:duration="600" -        android:propertyName="fillAlpha" -        android:valueFrom="1.0" -        android:valueTo="0.5" -        android:valueType="floatType" -        android:interpolator="@android:interpolator/fast_out_slow_in" />  </set> diff --git a/packages/SystemUI/res/anim/error_to_trustedstate_path_3_animation.xml b/packages/SystemUI/res/anim/error_to_trustedstate_path_3_animation.xml index f94fe0a96974..c1ece081e293 100755..100644 --- a/packages/SystemUI/res/anim/error_to_trustedstate_path_3_animation.xml +++ b/packages/SystemUI/res/anim/error_to_trustedstate_path_3_animation.xml @@ -1,49 +1,35 @@  <?xml version="1.0" encoding="utf-8"?> -<!-- -Copyright (C) 2015 The Android Open Source Project +<!-- 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 +     Licensed under the Apache License, Version 2.0 (the "License"); +     you may not use this file except in compliance with the License. +     You may obtain a copy of the License at -         http://www.apache.org/licenses/LICENSE-2.0 +          http://www.apache.org/licenses/LICENSE-2.0 -    Unless required by applicable law or agreed to in writing, software -    distributed under the License is distributed on an "AS IS" BASIS, -    WITHOUT 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.  -->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <set          android:ordering="sequentially" >          <objectAnimator -            android:duration="233" +            android:duration="250"              android:propertyName="pathData"              android:valueFrom="M 5.01239013672,3.390625 c 0.0,-2.76000976562 -2.23999023438,-5.0 -5.0,-5.0 c -2.76000976562,0.0 -5.0,2.23999023438 -5.0,5.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,-1.71002197266 1.38999938965,-3.09997558594 3.10000610352,-3.09997558594 c 1.71000671387,0.0 3.10000610352,1.38995361328 3.10000610352,3.09997558594 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,0.0 0.0,-2.0 0.0,-2.0 Z"              android:valueTo="M 5.01239013672,3.390625 c 0.0,-2.76000976562 -2.23999023438,-5.0 -5.0,-5.0 c -2.76000976562,0.0 -5.0,2.23999023438 -5.0,5.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,-1.71002197266 1.38999938965,-3.09997558594 3.10000610352,-3.09997558594 c 1.71000671387,0.0 3.10000610352,1.38995361328 3.10000610352,3.09997558594 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,0.0 0.0,-2.0 0.0,-2.0 Z"              android:valueType="pathType"              android:interpolator="@android:interpolator/linear" />          <objectAnimator -            android:duration="366" +            android:duration="216"              android:propertyName="pathData"              android:valueFrom="M 5.01239013672,3.390625 c 0.0,-2.76000976562 -2.23999023438,-5.0 -5.0,-5.0 c -2.76000976562,0.0 -5.0,2.23999023438 -5.0,5.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,-1.71002197266 1.38999938965,-3.09997558594 3.10000610352,-3.09997558594 c 1.71000671387,0.0 3.10000610352,1.38995361328 3.10000610352,3.09997558594 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,0.0 0.0,-2.0 0.0,-2.0 Z"              android:valueTo="M 5.00619506836,-6.046875 c 0.0,-2.76000976562 -2.23999023438,-5.0 -5.0,-5.0 c -2.76000976562,0.0 -5.0,2.23999023438 -5.0,5.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,-1.71002197266 1.38999938965,-3.09997558594 3.10000610352,-3.09997558594 c 1.71000671387,0.0 3.10000610352,1.38995361328 3.10000610352,3.09997558594 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,0.0 0.0,-2.0 0.0,-2.0 Z"              android:valueType="pathType" -            android:interpolator="@interpolator/error_to_trustedstate_animation_interpolator_2" /> +            android:interpolator="@interpolator/error_to_trustedstate_animation_interpolator_4" />      </set> -    <objectAnimator -        android:duration="600" -        android:propertyName="fillColor" -        android:valueFrom="#FFF3511E" -        android:valueTo="#FFFFFFFF" -        android:interpolator="@android:interpolator/fast_out_slow_in" /> -    <objectAnimator -        android:duration="600" -        android:propertyName="fillAlpha" -        android:valueFrom="1.0" -        android:valueTo="0.5" -        android:valueType="floatType" -        android:interpolator="@android:interpolator/fast_out_slow_in" />  </set> diff --git a/packages/SystemUI/res/anim/error_to_trustedstate_toppath_animation.xml b/packages/SystemUI/res/anim/error_to_trustedstate_toppath_animation.xml new file mode 100644 index 000000000000..d9781dfdba3a --- /dev/null +++ b/packages/SystemUI/res/anim/error_to_trustedstate_toppath_animation.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="66" +            android:propertyName="pathData" +            android:valueFrom="M 0.0,-3.0 l 0.0,0.0 c 0.5522847498,0.0 1.0,0.4477152502 1.0,1.0 l 0.0,4.0 c 0.0,0.5522847498 -0.4477152502,1.0 -1.0,1.0 l 0.0,0.0 c -0.5522847498,0.0 -1.0,-0.4477152502 -1.0,-1.0 l 0.0,-4.0 c 0.0,-0.5522847498 0.4477152502,-1.0 1.0,-1.0 Z" +            android:valueTo="M 0.0,-3.0 l 0.0,0.0 c 0.5522847498,0.0 1.0,0.4477152502 1.0,1.0 l 0.0,4.0 c 0.0,0.5522847498 -0.4477152502,1.0 -1.0,1.0 l 0.0,0.0 c -0.5522847498,0.0 -1.0,-0.4477152502 -1.0,-1.0 l 0.0,-4.0 c 0.0,-0.5522847498 0.4477152502,-1.0 1.0,-1.0 Z" +            android:valueType="pathType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="216" +            android:propertyName="pathData" +            android:valueFrom="M 0.0,-3.0 l 0.0,0.0 c 0.5522847498,0.0 1.0,0.4477152502 1.0,1.0 l 0.0,4.0 c 0.0,0.5522847498 -0.4477152502,1.0 -1.0,1.0 l 0.0,0.0 c -0.5522847498,0.0 -1.0,-0.4477152502 -1.0,-1.0 l 0.0,-4.0 c 0.0,-0.5522847498 0.4477152502,-1.0 1.0,-1.0 Z" +            android:valueTo="M 0.0,-6.0 l 0.0,0.0 c 1.9329966243,0.0 3.5,1.5670033757 3.5,3.5 l 0.0,5.0 c 0.0,1.9329966243 -1.5670033757,3.5 -3.5,3.5 l 0.0,0.0 c -1.9329966243,0.0 -3.5,-1.5670033757 -3.5,-3.5 l 0.0,-5.0 c 0.0,-1.9329966243 1.5670033757,-3.5 3.5,-3.5 Z" +            android:valueType="pathType" +            android:interpolator="@interpolator/error_to_trustedstate_animation_interpolator_0" /> +    </set> +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="283" +            android:propertyName="fillAlpha" +            android:valueFrom="1.0" +            android:valueTo="1.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="16" +            android:propertyName="fillAlpha" +            android:valueFrom="1.0" +            android:valueTo="0.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +    </set> +</set> diff --git a/packages/SystemUI/res/anim/ic_bluetooth_transient_dot_left_animation.xml b/packages/SystemUI/res/anim/ic_bluetooth_transient_dot_left_animation.xml new file mode 100644 index 000000000000..b5dd5c359a9e --- /dev/null +++ b/packages/SystemUI/res/anim/ic_bluetooth_transient_dot_left_animation.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="16" +            android:propertyName="fillAlpha" +            android:valueFrom="0.5" +            android:valueTo="1.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="233" +            android:propertyName="fillAlpha" +            android:valueFrom="1.0" +            android:valueTo="1.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="16" +            android:propertyName="fillAlpha" +            android:valueFrom="1.0" +            android:valueTo="0.5" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="233" +            android:propertyName="fillAlpha" +            android:valueFrom="0.5" +            android:valueTo="0.5" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="16" +            android:propertyName="fillAlpha" +            android:valueFrom="0.5" +            android:valueTo="1.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="233" +            android:propertyName="fillAlpha" +            android:valueFrom="1.0" +            android:valueTo="1.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="16" +            android:propertyName="fillAlpha" +            android:valueFrom="1.0" +            android:valueTo="0.5" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="233" +            android:propertyName="fillAlpha" +            android:valueFrom="0.5" +            android:valueTo="0.5" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +    </set> +</set> diff --git a/packages/SystemUI/res/anim/ic_bluetooth_transient_dot_right_animation.xml b/packages/SystemUI/res/anim/ic_bluetooth_transient_dot_right_animation.xml new file mode 100644 index 000000000000..14704bf3da5d --- /dev/null +++ b/packages/SystemUI/res/anim/ic_bluetooth_transient_dot_right_animation.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="16" +            android:propertyName="fillAlpha" +            android:valueFrom="1.0" +            android:valueTo="0.5" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="233" +            android:propertyName="fillAlpha" +            android:valueFrom="0.5" +            android:valueTo="0.5" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="16" +            android:propertyName="fillAlpha" +            android:valueFrom="0.5" +            android:valueTo="1.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="233" +            android:propertyName="fillAlpha" +            android:valueFrom="1.0" +            android:valueTo="1.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="16" +            android:propertyName="fillAlpha" +            android:valueFrom="1.0" +            android:valueTo="0.5" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="233" +            android:propertyName="fillAlpha" +            android:valueFrom="0.5" +            android:valueTo="0.5" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="16" +            android:propertyName="fillAlpha" +            android:valueFrom="0.5" +            android:valueTo="1.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="233" +            android:propertyName="fillAlpha" +            android:valueFrom="1.0" +            android:valueTo="1.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +    </set> +</set> diff --git a/packages/SystemUI/res/anim/ic_bluetooth_transient_group_1_animation.xml b/packages/SystemUI/res/anim/ic_bluetooth_transient_group_1_animation.xml deleted file mode 100644 index 26c6aa706cbf..000000000000 --- a/packages/SystemUI/res/anim/ic_bluetooth_transient_group_1_animation.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="83" -            android:propertyName="scaleX" -            android:valueFrom="1.0" -            android:valueTo="0.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> -        <objectAnimator -            android:duration="333" -            android:propertyName="scaleX" -            android:valueFrom="0.0" -            android:valueTo="0.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> -        <objectAnimator -            android:duration="83" -            android:propertyName="scaleX" -            android:valueFrom="0.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> -        <objectAnimator -            android:duration="333" -            android:propertyName="scaleX" -            android:valueFrom="1.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> -    </set> -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="83" -            android:propertyName="scaleY" -            android:valueFrom="1.0" -            android:valueTo="0.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> -        <objectAnimator -            android:duration="333" -            android:propertyName="scaleY" -            android:valueFrom="0.0" -            android:valueTo="0.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> -        <objectAnimator -            android:duration="83" -            android:propertyName="scaleY" -            android:valueFrom="0.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> -    </set> -</set> diff --git a/packages/SystemUI/res/anim/ic_bluetooth_transient_group_2_animation.xml b/packages/SystemUI/res/anim/ic_bluetooth_transient_group_2_animation.xml deleted file mode 100644 index e1f8989b9a21..000000000000 --- a/packages/SystemUI/res/anim/ic_bluetooth_transient_group_2_animation.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="83" -            android:propertyName="scaleX" -            android:valueFrom="0.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> -        <objectAnimator -            android:duration="333" -            android:propertyName="scaleX" -            android:valueFrom="1.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@interpolator/ic_bluetooth_transient_animation_interpolator_0" /> -        <objectAnimator -            android:duration="83" -            android:propertyName="scaleX" -            android:valueFrom="1.0" -            android:valueTo="0.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> -    </set> -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="83" -            android:propertyName="scaleY" -            android:valueFrom="0.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> -        <objectAnimator -            android:duration="333" -            android:propertyName="scaleY" -            android:valueFrom="1.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@interpolator/ic_bluetooth_transient_animation_interpolator_0" /> -        <objectAnimator -            android:duration="83" -            android:propertyName="scaleY" -            android:valueFrom="1.0" -            android:valueTo="0.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> -    </set> -</set> diff --git a/packages/SystemUI/res/anim/ic_volume_expand_rectangle_4_animation.xml b/packages/SystemUI/res/anim/ic_caret_down_left_animation.xml index 6ae0fefa9bef..d465f198a679 100644 --- a/packages/SystemUI/res/anim/ic_volume_expand_rectangle_4_animation.xml +++ b/packages/SystemUI/res/anim/ic_caret_down_left_animation.xml @@ -1,5 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?>  <!-- -     Copyright (C) 2015 The Android Open Source Project +     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. @@ -13,14 +14,19 @@       See the License for the specific language governing permissions and       limitations under the License.  --> -<set xmlns:android="http://schemas.android.com/apk/res/android" > - +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <objectAnimator +        android:duration="250" +        android:propertyXName="translateX" +        android:propertyYName="translateY" +        android:pathData="M 12.699,8.701 c 0.0,1.09767 0.0,5.48833 0.0,6.586" +        android:interpolator="@android:interpolator/fast_out_slow_in" />      <objectAnimator          android:duration="200" -        android:interpolator="@interpolator/ic_volume_expand_animation_interpolator_0"          android:propertyName="rotation"          android:valueFrom="-45.0"          android:valueTo="45.0" -        android:valueType="floatType" /> - -</set>
\ No newline at end of file +        android:valueType="floatType" +        android:interpolator="@interpolator/ic_caret_down_animation_interpolator_0" /> +</set> diff --git a/packages/SystemUI/res/anim/ic_volume_expand_rectangle_3_animation.xml b/packages/SystemUI/res/anim/ic_caret_down_right_animation.xml index 9b575d856c77..7a38ac323242 100644 --- a/packages/SystemUI/res/anim/ic_volume_expand_rectangle_3_animation.xml +++ b/packages/SystemUI/res/anim/ic_caret_down_right_animation.xml @@ -1,5 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?>  <!-- -     Copyright (C) 2015 The Android Open Source Project +     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. @@ -13,14 +14,19 @@       See the License for the specific language governing permissions and       limitations under the License.  --> -<set xmlns:android="http://schemas.android.com/apk/res/android" > - +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <objectAnimator +        android:duration="250" +        android:propertyXName="translateX" +        android:propertyYName="translateY" +        android:pathData="M 11.287,8.701 c 0.0,1.09767 0.0,5.48833 0.0,6.586" +        android:interpolator="@android:interpolator/fast_out_slow_in" />      <objectAnimator          android:duration="200" -        android:interpolator="@interpolator/ic_volume_expand_animation_interpolator_0"          android:propertyName="rotation"          android:valueFrom="45.0"          android:valueTo="-45.0" -        android:valueType="floatType" /> - -</set>
\ No newline at end of file +        android:valueType="floatType" +        android:interpolator="@interpolator/ic_caret_down_animation_interpolator_0" /> +</set> diff --git a/packages/SystemUI/res/anim/ic_caret_up_left_animation.xml b/packages/SystemUI/res/anim/ic_caret_up_left_animation.xml new file mode 100644 index 000000000000..125a6164bfd1 --- /dev/null +++ b/packages/SystemUI/res/anim/ic_caret_up_left_animation.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +     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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <objectAnimator +        android:duration="250" +        android:propertyXName="translateX" +        android:propertyYName="translateY" +        android:pathData="M 12.699,15.287 c -0.04833,0.452 -0.04833,-7.03583 0.0,-6.586" +        android:interpolator="@android:interpolator/fast_out_slow_in" /> +    <objectAnimator +        android:duration="200" +        android:propertyName="rotation" +        android:valueFrom="45.0" +        android:valueTo="-45.0" +        android:valueType="floatType" +        android:interpolator="@interpolator/ic_caret_up_animation_interpolator_0" /> +</set> diff --git a/packages/SystemUI/res/anim/ic_caret_up_right_animation.xml b/packages/SystemUI/res/anim/ic_caret_up_right_animation.xml new file mode 100644 index 000000000000..3fd4df58f51c --- /dev/null +++ b/packages/SystemUI/res/anim/ic_caret_up_right_animation.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +     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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <objectAnimator +        android:duration="250" +        android:propertyXName="translateX" +        android:propertyYName="translateY" +        android:pathData="M 11.287,15.287 c 0.04883,0.452 0.04883,-7.03583 0.0,-6.586" +        android:interpolator="@android:interpolator/fast_out_slow_in" /> +    <objectAnimator +        android:duration="200" +        android:propertyName="rotation" +        android:valueFrom="-45.0" +        android:valueTo="45.0" +        android:valueType="floatType" +        android:interpolator="@interpolator/ic_caret_up_animation_interpolator_0" /> +</set> diff --git a/packages/SystemUI/res/anim/ic_fingerprint_toerror_bottompath_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_toerror_bottompath_animation.xml new file mode 100644 index 000000000000..91829c020f66 --- /dev/null +++ b/packages/SystemUI/res/anim/ic_fingerprint_toerror_bottompath_animation.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="316" +            android:propertyName="pathData" +            android:valueFrom="M 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" +            android:valueTo="M 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" +            android:valueType="pathType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="83" +            android:propertyName="pathData" +            android:valueFrom="M 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" +            android:valueTo="M 0.0,-1.1 l 0.0,0.0 c 0.60751322478,0.0 1.1,0.49248677522 1.1,1.1 l 0.0,0.0 c 0.0,0.60751322478 -0.49248677522,1.1 -1.1,1.1 l 0.0,0.0 c -0.60751322478,0.0 -1.1,-0.49248677522 -1.1,-1.1 l 0.0,0.0 c 0.0,-0.60751322478 0.49248677522,-1.1 1.1,-1.1 Z" +            android:valueType="pathType" +            android:interpolator="@interpolator/ic_fingerprint_toerror_animation_interpolator_5" /> +    </set> +</set> diff --git a/packages/SystemUI/res/anim/ic_fingerprint_toerror_circlepath_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_toerror_circlepath_animation.xml new file mode 100644 index 000000000000..9b08fa26b4ad --- /dev/null +++ b/packages/SystemUI/res/anim/ic_fingerprint_toerror_circlepath_animation.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="166" +            android:propertyName="trimPathStart" +            android:valueFrom="1.0" +            android:valueTo="1.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="533" +            android:propertyName="trimPathStart" +            android:valueFrom="1.0" +            android:valueTo="0.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/fast_out_slow_in" /> +    </set> +</set> diff --git a/packages/SystemUI/res/anim/ic_fingerprint_toerror_errorcircle_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_toerror_errorcircle_animation.xml new file mode 100644 index 000000000000..1ea2100eacdb --- /dev/null +++ b/packages/SystemUI/res/anim/ic_fingerprint_toerror_errorcircle_animation.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="150" +            android:propertyName="rotation" +            android:valueFrom="190.0" +            android:valueTo="190.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="549" +            android:propertyName="rotation" +            android:valueFrom="190.0" +            android:valueTo="-6.0" +            android:valueType="floatType" +            android:interpolator="@interpolator/ic_fingerprint_toerror_animation_interpolator_2" /> +    </set> +</set> diff --git a/packages/SystemUI/res/anim/ic_fingerprint_toerror_errorexclamation_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_toerror_errorexclamation_animation.xml new file mode 100644 index 000000000000..0b9cb95ee35e --- /dev/null +++ b/packages/SystemUI/res/anim/ic_fingerprint_toerror_errorexclamation_animation.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="200" +            android:propertyName="rotation" +            android:valueFrom="180.0" +            android:valueTo="180.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="499" +            android:propertyName="rotation" +            android:valueFrom="180.0" +            android:valueTo="0.0" +            android:valueType="floatType" +            android:interpolator="@interpolator/ic_fingerprint_toerror_animation_interpolator_6" /> +    </set> +</set> diff --git a/packages/SystemUI/res/interpolator/ic_volume_collapse_animation_interpolator_0.xml b/packages/SystemUI/res/anim/ic_fingerprint_toerror_exclamationbottom_animation.xml index c3930e42cdaa..c597b821eeac 100644 --- a/packages/SystemUI/res/interpolator/ic_volume_collapse_animation_interpolator_0.xml +++ b/packages/SystemUI/res/anim/ic_fingerprint_toerror_exclamationbottom_animation.xml @@ -1,5 +1,5 @@ -<!-- -     Copyright (C) 2015 The Android Open Source Project +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. @@ -13,5 +13,5 @@       See the License for the specific language governing permissions and       limitations under the License.  --> -<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.0001,0.0 0.0,1.0 1.0,1.0" /> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" /> diff --git a/packages/SystemUI/res/anim/ic_volume_collapse_rectangle_1_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_toerror_exclamationtop_animation.xml index d82f6706a633..bde83de1636b 100644 --- a/packages/SystemUI/res/anim/ic_volume_collapse_rectangle_1_animation.xml +++ b/packages/SystemUI/res/anim/ic_fingerprint_toerror_exclamationtop_animation.xml @@ -1,5 +1,5 @@ -<!-- -     Copyright (C) 2015 The Android Open Source Project +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. @@ -13,14 +13,12 @@       See the License for the specific language governing permissions and       limitations under the License.  --> -<set xmlns:android="http://schemas.android.com/apk/res/android" > - +<set +    xmlns:android="http://schemas.android.com/apk/res/android" >      <objectAnimator -        android:duration="200" -        android:interpolator="@interpolator/ic_volume_collapse_animation_interpolator_0" -        android:propertyName="rotation" -        android:valueFrom="45.0" -        android:valueTo="-45.0" -        android:valueType="floatType" /> - -</set>
\ No newline at end of file +        android:duration="700" +        android:propertyXName="translateX" +        android:propertyYName="translateY" +        android:pathData="M 0.0,0.0 c 0.0,-0.33333 0.0,-1.66667 0.0,-2.0" +        android:interpolator="@interpolator/ic_fingerprint_toerror_animation_interpolator_3" /> +</set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_fingerprint_ridges_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_toerror_fingerprinterror_animation.xml index ada421351274..a3afaef50b40 100644 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_fingerprint_ridges_animation.xml +++ b/packages/SystemUI/res/anim/ic_fingerprint_toerror_fingerprinterror_animation.xml @@ -1,4 +1,19 @@  <?xml version="1.0" encoding="utf-8"?> +<!-- +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. +-->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <set @@ -11,25 +26,25 @@              android:valueType="floatType"              android:interpolator="@android:interpolator/linear" />          <objectAnimator -            android:duration="516" +            android:duration="566"              android:propertyName="rotation"              android:valueFrom="0.0"              android:valueTo="-305.0"              android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_3" /> +            android:interpolator="@interpolator/ic_fingerprint_toerror_animation_interpolator_2" />          <objectAnimator -            android:duration="1116" +            android:duration="1066"              android:propertyName="rotation"              android:valueFrom="-305.0"              android:valueTo="-305.0"              android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_0" /> +            android:interpolator="@interpolator/ic_fingerprint_toerror_animation_interpolator_0" />          <objectAnimator              android:duration="800"              android:propertyName="rotation"              android:valueFrom="-305.0"              android:valueTo="-720.0"              android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_0" /> +            android:interpolator="@interpolator/ic_fingerprint_toerror_animation_interpolator_0" />      </set>  </set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_white_fingerprint_ridges_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_toerror_fingerprintwhite_animation.xml index ada421351274..a3afaef50b40 100644 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_white_fingerprint_ridges_animation.xml +++ b/packages/SystemUI/res/anim/ic_fingerprint_toerror_fingerprintwhite_animation.xml @@ -1,4 +1,19 @@  <?xml version="1.0" encoding="utf-8"?> +<!-- +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. +-->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <set @@ -11,25 +26,25 @@              android:valueType="floatType"              android:interpolator="@android:interpolator/linear" />          <objectAnimator -            android:duration="516" +            android:duration="566"              android:propertyName="rotation"              android:valueFrom="0.0"              android:valueTo="-305.0"              android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_3" /> +            android:interpolator="@interpolator/ic_fingerprint_toerror_animation_interpolator_2" />          <objectAnimator -            android:duration="1116" +            android:duration="1066"              android:propertyName="rotation"              android:valueFrom="-305.0"              android:valueTo="-305.0"              android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_0" /> +            android:interpolator="@interpolator/ic_fingerprint_toerror_animation_interpolator_0" />          <objectAnimator              android:duration="800"              android:propertyName="rotation"              android:valueFrom="-305.0"              android:valueTo="-720.0"              android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_0" /> +            android:interpolator="@interpolator/ic_fingerprint_toerror_animation_interpolator_0" />      </set>  </set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_1_path_0_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_1_path_0_animation.xml index 26622dd6b165..1c3a766f7a3c 100644 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_1_path_0_animation.xml +++ b/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_1_path_0_animation.xml @@ -1,4 +1,19 @@  <?xml version="1.0" encoding="utf-8"?> +<!-- +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. +-->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <objectAnimator @@ -23,6 +38,6 @@              android:valueFrom="0.0"              android:valueTo="1.0"              android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_2" /> +            android:interpolator="@interpolator/ic_fingerprint_toerror_animation_interpolator_1" />      </set>  </set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_1_path_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_1_path_animation.xml index 443e6fb0ec72..5a9258a29534 100644 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_1_path_animation.xml +++ b/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_1_path_animation.xml @@ -1,20 +1,19 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> +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. +-->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <set diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_2_path_0_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_2_path_0_animation.xml index f383c0abf981..04b8b8029cdb 100644 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_2_path_0_animation.xml +++ b/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_2_path_0_animation.xml @@ -1,4 +1,19 @@  <?xml version="1.0" encoding="utf-8"?> +<!-- +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. +-->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <set @@ -16,7 +31,7 @@              android:valueFrom="1.0"              android:valueTo="0.0"              android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_3" /> +            android:interpolator="@interpolator/ic_fingerprint_toerror_animation_interpolator_2" />      </set>      <objectAnimator          android:duration="166" @@ -24,5 +39,5 @@          android:valueFrom="1.0"          android:valueTo="0.0"          android:valueType="floatType" -        android:interpolator="@interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_3" /> +        android:interpolator="@interpolator/ic_fingerprint_toerror_animation_interpolator_2" />  </set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_2_path_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_2_path_animation.xml index f8140d5c4aea..c69001ce8ee1 100644 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_2_path_animation.xml +++ b/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_2_path_animation.xml @@ -1,4 +1,19 @@  <?xml version="1.0" encoding="utf-8"?> +<!-- +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. +-->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <set diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_5_path_0_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_5_path_0_animation.xml index 870c44d7c752..6fb22cd4dd62 100644 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_5_path_0_animation.xml +++ b/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_5_path_0_animation.xml @@ -1,4 +1,19 @@  <?xml version="1.0" encoding="utf-8"?> +<!-- +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. +-->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <objectAnimator @@ -23,6 +38,6 @@              android:valueFrom="0.0"              android:valueTo="1.0"              android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_2" /> +            android:interpolator="@interpolator/ic_fingerprint_toerror_animation_interpolator_1" />      </set>  </set> diff --git a/packages/SystemUI/res/anim/trusted_state_to_error_rectangle_path_1_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_5_path_animation.xml index 46d571cac76d..8e9a05101598 100755..100644 --- a/packages/SystemUI/res/anim/trusted_state_to_error_rectangle_path_1_animation.xml +++ b/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_5_path_animation.xml @@ -1,8 +1,8 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -Copyright (C) 2015 The Android Open Source Project +Copyright (C) 2017 The Android Open Source Project -   Licensed under the Apache License, Version 2.0 (the "License"); +    Licensed under the Apache License, Version 2.0 (the "License");      you may not use this file except in compliance with the License.      You may obtain a copy of the License at @@ -17,16 +17,10 @@ Copyright (C) 2015 The Android Open Source Project  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <objectAnimator -        android:duration="600" -        android:propertyName="fillColor" -        android:valueFrom="#FFFFFFFF" -        android:valueTo="#FFF3511E" -        android:interpolator="@android:interpolator/fast_out_slow_in" /> -    <objectAnimator -        android:duration="600" -        android:propertyName="fillAlpha" -        android:valueFrom="0.5" +        android:duration="150" +        android:propertyName="trimPathStart" +        android:valueFrom="0.0"          android:valueTo="1.0"          android:valueType="floatType" -        android:interpolator="@android:interpolator/fast_out_slow_in" /> +        android:interpolator="@android:interpolator/linear" />  </set> diff --git a/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_6_path_0_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_6_path_0_animation.xml new file mode 100644 index 000000000000..3ffb8f8db9b4 --- /dev/null +++ b/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_6_path_0_animation.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <objectAnimator +        android:duration="250" +        android:propertyName="trimPathEnd" +        android:valueFrom="0.0" +        android:valueTo="1.0" +        android:valueType="floatType" +        android:interpolator="@interpolator/ic_fingerprint_toerror_animation_interpolator_0" /> +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="133" +            android:propertyName="trimPathStart" +            android:valueFrom="0.0" +            android:valueTo="0.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="199" +            android:propertyName="trimPathStart" +            android:valueFrom="0.0" +            android:valueTo="1.0" +            android:valueType="floatType" +            android:interpolator="@interpolator/ic_fingerprint_toerror_animation_interpolator_0" /> +    </set> +</set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_6_path_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_6_path_animation.xml index ad37bc1407b7..3584f91ba86c 100644 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_6_path_animation.xml +++ b/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_6_path_animation.xml @@ -1,4 +1,19 @@  <?xml version="1.0" encoding="utf-8"?> +<!-- +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. +-->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <set diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_7_path_0_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_7_path_0_animation.xml index cd04abaf6f69..0d4481026be2 100644 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_7_path_0_animation.xml +++ b/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_7_path_0_animation.xml @@ -1,4 +1,19 @@  <?xml version="1.0" encoding="utf-8"?> +<!-- +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. +-->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <set @@ -33,6 +48,6 @@              android:valueFrom="0.0"              android:valueTo="1.0"              android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_2" /> +            android:interpolator="@interpolator/ic_fingerprint_toerror_animation_interpolator_1" />      </set>  </set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_7_path_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_7_path_animation.xml index a09bdea36339..52a5b3e2c615 100644 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_7_path_animation.xml +++ b/packages/SystemUI/res/anim/ic_fingerprint_toerror_ridge_7_path_animation.xml @@ -1,4 +1,19 @@  <?xml version="1.0" encoding="utf-8"?> +<!-- +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. +-->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <set diff --git a/packages/SystemUI/res/anim/ic_fingerprint_toerror_toppath_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_toerror_toppath_animation.xml new file mode 100644 index 000000000000..ff7420b44501 --- /dev/null +++ b/packages/SystemUI/res/anim/ic_fingerprint_toerror_toppath_animation.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="200" +            android:propertyName="pathData" +            android:valueFrom="M -1.0,0.0 l 2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l -2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" +            android:valueTo="M -1.0,0.0 l 2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l -2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" +            android:valueType="pathType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="499" +            android:propertyName="pathData" +            android:valueFrom="M -1.0,0.0 l 2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l -2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" +            android:valueTo="M 0.0,-3.0 l 0.0,0.0 c 0.5522847498,0.0 1.0,0.4477152502 1.0,1.0 l 0.0,4.0 c 0.0,0.5522847498 -0.4477152502,1.0 -1.0,1.0 l 0.0,0.0 c -0.5522847498,0.0 -1.0,-0.4477152502 -1.0,-1.0 l 0.0,-4.0 c 0.0,-0.5522847498 0.4477152502,-1.0 1.0,-1.0 Z" +            android:valueType="pathType" +            android:interpolator="@interpolator/ic_fingerprint_toerror_animation_interpolator_4" /> +    </set> +</set> diff --git a/packages/SystemUI/res/anim/ic_fingerprint_tofp_bottompath_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_tofp_bottompath_animation.xml new file mode 100644 index 000000000000..4bc18f24a3af --- /dev/null +++ b/packages/SystemUI/res/anim/ic_fingerprint_tofp_bottompath_animation.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="250" +            android:propertyName="pathData" +            android:valueFrom="M 0.0,-1.1 l 0.0,0.0 c 0.60751322478,0.0 1.1,0.49248677522 1.1,1.1 l 0.0,0.0 c 0.0,0.60751322478 -0.49248677522,1.1 -1.1,1.1 l 0.0,0.0 c -0.60751322478,0.0 -1.1,-0.49248677522 -1.1,-1.1 l 0.0,0.0 c 0.0,-0.60751322478 0.49248677522,-1.1 1.1,-1.1 Z" +            android:valueTo="M 0.0,-1.1 l 0.0,0.0 c 0.60751322478,0.0 1.1,0.49248677522 1.1,1.1 l 0.0,0.0 c 0.0,0.60751322478 -0.49248677522,1.1 -1.1,1.1 l 0.0,0.0 c -0.60751322478,0.0 -1.1,-0.49248677522 -1.1,-1.1 l 0.0,0.0 c 0.0,-0.60751322478 0.49248677522,-1.1 1.1,-1.1 Z" +            android:valueType="pathType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="150" +            android:propertyName="pathData" +            android:valueFrom="M 0.0,-1.1 l 0.0,0.0 c 0.60751322478,0.0 1.1,0.49248677522 1.1,1.1 l 0.0,0.0 c 0.0,0.60751322478 -0.49248677522,1.1 -1.1,1.1 l 0.0,0.0 c -0.60751322478,0.0 -1.1,-0.49248677522 -1.1,-1.1 l 0.0,0.0 c 0.0,-0.60751322478 0.49248677522,-1.1 1.1,-1.1 Z" +            android:valueTo="M 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" +            android:valueType="pathType" +            android:interpolator="@interpolator/ic_fingerprint_tofp_animation_interpolator_1" /> +    </set> +</set> diff --git a/packages/SystemUI/res/anim/error_to_trustedstate_rectangle_path_1_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_tofp_circlepath_animation.xml index bcc8c4177426..9273b9adc20d 100755..100644 --- a/packages/SystemUI/res/anim/error_to_trustedstate_rectangle_path_1_animation.xml +++ b/packages/SystemUI/res/anim/ic_fingerprint_tofp_circlepath_animation.xml @@ -1,8 +1,8 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -Copyright (C) 2015 The Android Open Source Project +Copyright (C) 2017 The Android Open Source Project -   Licensed under the Apache License, Version 2.0 (the "License"); +    Licensed under the Apache License, Version 2.0 (the "License");      you may not use this file except in compliance with the License.      You may obtain a copy of the License at @@ -17,16 +17,10 @@ Copyright (C) 2015 The Android Open Source Project  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <objectAnimator -        android:duration="600" -        android:propertyName="fillColor" -        android:valueFrom="#FFF3511E" -        android:valueTo="#FFFFFFFF" -        android:interpolator="@android:interpolator/fast_out_slow_in" /> -    <objectAnimator -        android:duration="600" -        android:propertyName="fillAlpha" +        android:duration="383" +        android:propertyName="trimPathEnd"          android:valueFrom="1.0" -        android:valueTo="0.5" +        android:valueTo="0.0"          android:valueType="floatType" -        android:interpolator="@android:interpolator/fast_out_slow_in" /> +        android:interpolator="@interpolator/ic_fingerprint_tofp_animation_interpolator_4" />  </set> diff --git a/packages/SystemUI/res/anim/ic_fingerprint_tofp_errorcircle_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_tofp_errorcircle_animation.xml new file mode 100644 index 000000000000..062c6a0c4966 --- /dev/null +++ b/packages/SystemUI/res/anim/ic_fingerprint_tofp_errorcircle_animation.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="33" +            android:propertyName="rotation" +            android:valueFrom="10.0" +            android:valueTo="10.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="366" +            android:propertyName="rotation" +            android:valueFrom="10.0" +            android:valueTo="-180.0" +            android:valueType="floatType" +            android:interpolator="@interpolator/ic_fingerprint_tofp_animation_interpolator_2" /> +    </set> +</set> diff --git a/packages/SystemUI/res/anim/ic_fingerprint_tofp_errorexclamation_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_tofp_errorexclamation_animation.xml new file mode 100644 index 000000000000..5d4b268ed239 --- /dev/null +++ b/packages/SystemUI/res/anim/ic_fingerprint_tofp_errorexclamation_animation.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="33" +            android:propertyName="rotation" +            android:valueFrom="0.0" +            android:valueTo="0.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="416" +            android:propertyName="rotation" +            android:valueFrom="0.0" +            android:valueTo="-180.0" +            android:valueType="floatType" +            android:interpolator="@interpolator/ic_fingerprint_tofp_animation_interpolator_5" /> +    </set> +</set> diff --git a/packages/SystemUI/res/anim/ic_fingerprint_tofp_exclamationbottom_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_tofp_exclamationbottom_animation.xml new file mode 100644 index 000000000000..d3d7d1c47bdc --- /dev/null +++ b/packages/SystemUI/res/anim/ic_fingerprint_tofp_exclamationbottom_animation.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <objectAnimator +        android:duration="450" +        android:propertyXName="translateX" +        android:propertyYName="translateY" +        android:pathData="M 0.0,4.0 c 0.0,-0.66667 0.0,-3.33333 0.0,-4.0" +        android:interpolator="@interpolator/ic_fingerprint_tofp_animation_interpolator_0" /> +</set> diff --git a/packages/SystemUI/res/anim/ic_fingerprint_tofp_exclamationtop_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_tofp_exclamationtop_animation.xml new file mode 100644 index 000000000000..04b6868e5a5b --- /dev/null +++ b/packages/SystemUI/res/anim/ic_fingerprint_tofp_exclamationtop_animation.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <objectAnimator +        android:duration="450" +        android:propertyXName="translateX" +        android:propertyYName="translateY" +        android:pathData="M 0.0,-2.0 c 0.0,0.33333 0.0,1.66667 0.0,2.0" +        android:interpolator="@interpolator/ic_fingerprint_tofp_animation_interpolator_3" /> +</set> diff --git a/packages/SystemUI/res/anim/ic_fingerprint_tofp_fingerprintwhite_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_tofp_fingerprintwhite_animation.xml new file mode 100644 index 000000000000..25f2c43a92c1 --- /dev/null +++ b/packages/SystemUI/res/anim/ic_fingerprint_tofp_fingerprintwhite_animation.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="200" +            android:propertyName="rotation" +            android:valueFrom="180.0" +            android:valueTo="180.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="499" +            android:propertyName="rotation" +            android:valueFrom="180.0" +            android:valueTo="0.0" +            android:valueType="floatType" +            android:interpolator="@interpolator/ic_fingerprint_tofp_animation_interpolator_2" /> +    </set> +</set> diff --git a/packages/SystemUI/res/anim/ic_fingerprint_tofp_ridge_1_path_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_tofp_ridge_1_path_animation.xml new file mode 100644 index 000000000000..4a6f39a6f0a0 --- /dev/null +++ b/packages/SystemUI/res/anim/ic_fingerprint_tofp_ridge_1_path_animation.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="416" +            android:propertyName="trimPathEnd" +            android:valueFrom="0.0" +            android:valueTo="0.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="116" +            android:propertyName="trimPathEnd" +            android:valueFrom="0.0" +            android:valueTo="1.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/fast_out_slow_in" /> +    </set> +</set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_path_3_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_tofp_ridge_2_path_animation.xml index ec658051a9f5..c9a9f64efcbd 100644 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_path_3_animation.xml +++ b/packages/SystemUI/res/anim/ic_fingerprint_tofp_ridge_2_path_animation.xml @@ -1,33 +1,32 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> +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. +-->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <set          android:ordering="sequentially" >          <objectAnimator -            android:duration="183" +            android:duration="350"              android:propertyName="trimPathStart"              android:valueFrom="1.0"              android:valueTo="1.0"              android:valueType="floatType"              android:interpolator="@android:interpolator/linear" />          <objectAnimator -            android:duration="400" +            android:duration="116"              android:propertyName="trimPathStart"              android:valueFrom="1.0"              android:valueTo="0.0" diff --git a/packages/SystemUI/res/anim/ic_fingerprint_tofp_ridge_5_path_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_tofp_ridge_5_path_animation.xml new file mode 100644 index 000000000000..43e44cf5acea --- /dev/null +++ b/packages/SystemUI/res/anim/ic_fingerprint_tofp_ridge_5_path_animation.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="350" +            android:propertyName="trimPathEnd" +            android:valueFrom="0.0" +            android:valueTo="0.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="350" +            android:propertyName="trimPathEnd" +            android:valueFrom="0.0" +            android:valueTo="1.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/fast_out_slow_in" /> +    </set> +</set> diff --git a/packages/SystemUI/res/anim/trusted_state_to_error_lock_left_side_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_tofp_ridge_6_path_animation.xml index 2a4753a2287a..04a6036966bb 100755..100644 --- a/packages/SystemUI/res/anim/trusted_state_to_error_lock_left_side_animation.xml +++ b/packages/SystemUI/res/anim/ic_fingerprint_tofp_ridge_6_path_animation.xml @@ -1,8 +1,8 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -Copyright (C) 2015 The Android Open Source Project +Copyright (C) 2017 The Android Open Source Project -   Licensed under the Apache License, Version 2.0 (the "License"); +    Licensed under the Apache License, Version 2.0 (the "License");      you may not use this file except in compliance with the License.      You may obtain a copy of the License at @@ -19,34 +19,17 @@ Copyright (C) 2015 The Android Open Source Project      <set          android:ordering="sequentially" >          <objectAnimator -            android:duration="200" -            android:propertyName="scaleX" +            android:duration="250" +            android:propertyName="trimPathStart"              android:valueFrom="1.0"              android:valueTo="1.0"              android:valueType="floatType"              android:interpolator="@android:interpolator/linear" />          <objectAnimator -            android:duration="200" -            android:propertyName="scaleX" +            android:duration="250" +            android:propertyName="trimPathStart"              android:valueFrom="1.0" -            android:valueTo="1.33333" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> -    </set> -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="200" -            android:propertyName="scaleY" -            android:valueFrom="1.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="200" -            android:propertyName="scaleY" -            android:valueFrom="1.0" -            android:valueTo="1.33333" +            android:valueTo="0.0"              android:valueType="floatType"              android:interpolator="@android:interpolator/fast_out_slow_in" />      </set> diff --git a/packages/SystemUI/res/anim/ic_fingerprint_tofp_ridge_7_path_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_tofp_ridge_7_path_animation.xml new file mode 100644 index 000000000000..031c5e679a01 --- /dev/null +++ b/packages/SystemUI/res/anim/ic_fingerprint_tofp_ridge_7_path_animation.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="266" +            android:propertyName="trimPathEnd" +            android:valueFrom="0.0" +            android:valueTo="0.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="433" +            android:propertyName="trimPathEnd" +            android:valueFrom="0.0" +            android:valueTo="1.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/fast_out_slow_in" /> +    </set> +</set> diff --git a/packages/SystemUI/res/anim/ic_fingerprint_tofp_toppath_animation.xml b/packages/SystemUI/res/anim/ic_fingerprint_tofp_toppath_animation.xml new file mode 100644 index 000000000000..9b3498ffa585 --- /dev/null +++ b/packages/SystemUI/res/anim/ic_fingerprint_tofp_toppath_animation.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="200" +            android:propertyName="pathData" +            android:valueFrom="M 0.0,-3.0 l 0.0,0.0 c 0.5522847498,0.0 1.0,0.4477152502 1.0,1.0 l 0.0,4.0 c 0.0,0.5522847498 -0.4477152502,1.0 -1.0,1.0 l 0.0,0.0 c -0.5522847498,0.0 -1.0,-0.4477152502 -1.0,-1.0 l 0.0,-4.0 c 0.0,-0.5522847498 0.4477152502,-1.0 1.0,-1.0 Z" +            android:valueTo="M 0.0,-3.0 l 0.0,0.0 c 0.5522847498,0.0 1.0,0.4477152502 1.0,1.0 l 0.0,4.0 c 0.0,0.5522847498 -0.4477152502,1.0 -1.0,1.0 l 0.0,0.0 c -0.5522847498,0.0 -1.0,-0.4477152502 -1.0,-1.0 l 0.0,-4.0 c 0.0,-0.5522847498 0.4477152502,-1.0 1.0,-1.0 Z" +            android:valueType="pathType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="250" +            android:propertyName="pathData" +            android:valueFrom="M 0.0,-3.0 l 0.0,0.0 c 0.5522847498,0.0 1.0,0.4477152502 1.0,1.0 l 0.0,4.0 c 0.0,0.5522847498 -0.4477152502,1.0 -1.0,1.0 l 0.0,0.0 c -0.5522847498,0.0 -1.0,-0.4477152502 -1.0,-1.0 l 0.0,-4.0 c 0.0,-0.5522847498 0.4477152502,-1.0 1.0,-1.0 Z" +            android:valueTo="M -1.0,0.0 l 2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l -2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" +            android:valueType="pathType" +            android:interpolator="@interpolator/ic_fingerprint_tofp_animation_interpolator_1" /> +    </set> +</set> diff --git a/packages/SystemUI/res/anim/ic_hotspot_transient_circle_1_animation.xml b/packages/SystemUI/res/anim/ic_hotspot_transient_circle_1_animation.xml index 3444747f3a24..5e7184700614 100644 --- a/packages/SystemUI/res/anim/ic_hotspot_transient_circle_1_animation.xml +++ b/packages/SystemUI/res/anim/ic_hotspot_transient_circle_1_animation.xml @@ -1,16 +1,24 @@  <?xml version="1.0" encoding="utf-8"?> +<!-- +    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. +-->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <set          android:ordering="sequentially" >          <objectAnimator -            android:duration="266" -            android:propertyName="fillAlpha" -            android:valueFrom="1.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator              android:duration="16"              android:propertyName="fillAlpha"              android:valueFrom="1.0" @@ -18,7 +26,7 @@              android:valueType="floatType"              android:interpolator="@android:interpolator/linear" />          <objectAnimator -            android:duration="433" +            android:duration="633"              android:propertyName="fillAlpha"              android:valueFrom="0.5"              android:valueTo="0.5" diff --git a/packages/SystemUI/res/anim/ic_hotspot_transient_circle_2_animation.xml b/packages/SystemUI/res/anim/ic_hotspot_transient_circle_2_animation.xml index 06e08cd9486f..9081e6f48f11 100644 --- a/packages/SystemUI/res/anim/ic_hotspot_transient_circle_2_animation.xml +++ b/packages/SystemUI/res/anim/ic_hotspot_transient_circle_2_animation.xml @@ -1,10 +1,25 @@  <?xml version="1.0" encoding="utf-8"?> +<!-- +    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. +-->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <set          android:ordering="sequentially" >          <objectAnimator -            android:duration="133" +            android:duration="200"              android:propertyName="fillAlpha"              android:valueFrom="1.0"              android:valueTo="1.0" @@ -18,7 +33,7 @@              android:valueType="floatType"              android:interpolator="@android:interpolator/linear" />          <objectAnimator -            android:duration="433" +            android:duration="633"              android:propertyName="fillAlpha"              android:valueFrom="0.5"              android:valueTo="0.5" diff --git a/packages/SystemUI/res/anim/ic_hotspot_transient_circle_3_animation.xml b/packages/SystemUI/res/anim/ic_hotspot_transient_circle_3_animation.xml index 6b01687904b8..eaf5f05b8863 100644 --- a/packages/SystemUI/res/anim/ic_hotspot_transient_circle_3_animation.xml +++ b/packages/SystemUI/res/anim/ic_hotspot_transient_circle_3_animation.xml @@ -1,9 +1,31 @@  <?xml version="1.0" encoding="utf-8"?> +<!-- +    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. +-->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <set          android:ordering="sequentially" >          <objectAnimator +            android:duration="400" +            android:propertyName="fillAlpha" +            android:valueFrom="1.0" +            android:valueTo="1.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator              android:duration="16"              android:propertyName="fillAlpha"              android:valueFrom="1.0" @@ -11,7 +33,7 @@              android:valueType="floatType"              android:interpolator="@android:interpolator/linear" />          <objectAnimator -            android:duration="433" +            android:duration="633"              android:propertyName="fillAlpha"              android:valueFrom="0.5"              android:valueTo="0.5" diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_group_1_animation.xml b/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_group_1_animation.xml deleted file mode 100644 index 0c87c4b92dd7..000000000000 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_group_1_animation.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> - -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <objectAnimator -        android:duration="416" -        android:propertyName="rotation" -        android:valueFrom="430.0" -        android:valueTo="206.0" -        android:valueType="floatType" -        android:interpolator="@android:interpolator/fast_out_linear_in" /> -</set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_group_2_animation.xml b/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_group_2_animation.xml deleted file mode 100644 index 0ff1c8c7bb28..000000000000 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_group_2_animation.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> - -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <objectAnimator -        android:duration="233" -        android:propertyName="rotation" -        android:valueFrom="0.0" -        android:valueTo="-289.0" -        android:valueType="floatType" -        android:interpolator="@interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_1" /> -</set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_path_1_animation.xml b/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_path_1_animation.xml deleted file mode 100644 index a1cadf8eae6b..000000000000 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_path_1_animation.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> - -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="16" -            android:propertyName="pathData" -            android:valueFrom="M 1.35363769531,1.36633300781 c 0.0,0.0 -2.69998168945,0.0 -2.69998168945,0.0 c 0.0,0.0 0.0,-8.09997558594 0.0,-8.09997558594 c 0.0,0.0 2.69998168945,0.0 2.69998168945,0.0 c 0.0,0.0 0.0,8.09997558594 0.0,8.09997558594 Z" -            android:valueTo="M 1.35363769531,1.36633300781 c 0.0,0.0 -2.69998168945,0.0 -2.69998168945,0.0 c 0.0,0.0 0.0,-8.09997558594 0.0,-8.09997558594 c 0.0,0.0 2.69998168945,0.0 2.69998168945,0.0 c 0.0,0.0 0.0,8.09997558594 0.0,8.09997558594 Z" -            android:valueType="pathType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="83" -            android:propertyName="pathData" -            android:valueFrom="M 1.35363769531,1.36633300781 c 0.0,0.0 -2.69998168945,0.0 -2.69998168945,0.0 c 0.0,0.0 0.0,-8.09997558594 0.0,-8.09997558594 c 0.0,0.0 2.69998168945,0.0 2.69998168945,0.0 c 0.0,0.0 0.0,8.09997558594 0.0,8.09997558594 Z" -            android:valueTo="M 1.35363769531,1.36633300781 c 0.0,0.0 -2.69998168945,0.0 -2.69998168945,0.0 c 0.0,0.0 -0.0213623046875,0.0250244140625 -0.0213623046875,0.0250244140625 c 0.0,0.0 2.69998168945,0.0 2.69998168945,0.0 c 0.0,0.0 0.0213623046875,-0.0250244140625 0.0213623046875,-0.0250244140625 Z" -            android:valueType="pathType" -            android:interpolator="@android:interpolator/linear" /> -    </set> -</set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_path_2_animation.xml b/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_path_2_animation.xml deleted file mode 100644 index 1ca49ba78dc3..000000000000 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_path_2_animation.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> - -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="100" -            android:propertyName="pathData" -            android:valueFrom="M 1.35900878906,6.76104736328 c 0.0,0.0 -2.69998168945,0.0 -2.69998168945,0.0 c 0.0,0.0 0.0,-2.69995117188 0.0,-2.69995117188 c 0.0,0.0 2.69998168945,0.0 2.69998168945,0.0 c 0.0,0.0 0.0,2.69995117188 0.0,2.69995117188 Z" -            android:valueTo="M 1.35900878906,6.76104736328 c 0.0,0.0 -2.69998168945,0.0 -2.69998168945,0.0 c 0.0,0.0 0.0,-2.69995117188 0.0,-2.69995117188 c 0.0,0.0 2.69998168945,0.0 2.69998168945,0.0 c 0.0,0.0 0.0,2.69995117188 0.0,2.69995117188 Z" -            android:valueType="pathType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="83" -            android:propertyName="pathData" -            android:valueFrom="M 1.35900878906,6.76104736328 c 0.0,0.0 -2.69998168945,0.0 -2.69998168945,0.0 c 0.0,0.0 0.0,-2.69995117188 0.0,-2.69995117188 c 0.0,0.0 2.69998168945,0.0 2.69998168945,0.0 c 0.0,0.0 0.0,2.69995117188 0.0,2.69995117188 Z" -            android:valueTo="M 1.35900878906,6.76104736328 c 0.0,0.0 -2.69998168945,0.0 -2.69998168945,0.0 c 0.0,0.0 0.0340270996094,0.050048828125 0.0340270996094,0.050048828125 c 0.0,0.0 2.69998168945,0.0 2.69998168945,0.0 c 0.0,0.0 -0.0340270996094,-0.050048828125 -0.0340270996094,-0.050048828125 Z" -            android:valueType="pathType" -            android:interpolator="@android:interpolator/linear" /> -    </set> -</set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_path_3_animation.xml b/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_path_3_animation.xml deleted file mode 100644 index 84917477a561..000000000000 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_path_3_animation.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <objectAnimator -        android:duration="383" -        android:propertyName="trimPathEnd" -        android:valueFrom="1.0" -        android:valueTo="0.0" -        android:valueType="floatType" -        android:interpolator="@android:interpolator/fast_out_linear_in" /> -</set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_ridge_1_path_animation.xml b/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_ridge_1_path_animation.xml deleted file mode 100644 index b9636ae86af2..000000000000 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_ridge_1_path_animation.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="400" -            android:propertyName="trimPathEnd" -            android:valueFrom="0.0" -            android:valueTo="0.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="199" -            android:propertyName="trimPathEnd" -            android:valueFrom="0.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_2" /> -    </set> -</set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_ridge_2_path_animation.xml b/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_ridge_2_path_animation.xml deleted file mode 100644 index c1a3ecfb6fb0..000000000000 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_ridge_2_path_animation.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="333" -            android:propertyName="trimPathStart" -            android:valueFrom="1.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="200" -            android:propertyName="trimPathStart" -            android:valueFrom="1.0" -            android:valueTo="0.0" -            android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_3" /> -    </set> -</set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_ridge_5_path_animation.xml b/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_ridge_5_path_animation.xml deleted file mode 100644 index e285edce5ed5..000000000000 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_ridge_5_path_animation.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="216" -            android:propertyName="trimPathEnd" -            android:valueFrom="0.0" -            android:valueTo="0.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="316" -            android:propertyName="trimPathEnd" -            android:valueFrom="0.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_0" /> -    </set> -</set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_ridge_6_path_animation.xml b/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_ridge_6_path_animation.xml deleted file mode 100644 index 2ea102109c02..000000000000 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_ridge_6_path_animation.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="183" -            android:propertyName="trimPathStart" -            android:valueFrom="1.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="350" -            android:propertyName="trimPathStart" -            android:valueFrom="1.0" -            android:valueTo="0.0" -            android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_5" /> -    </set> -</set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_ridge_7_path_animation.xml b/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_ridge_7_path_animation.xml deleted file mode 100644 index 1481cfa3a1a7..000000000000 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_ridge_7_path_animation.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="233" -            android:propertyName="trimPathStart" -            android:valueFrom="1.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="200" -            android:propertyName="trimPathStart" -            android:valueFrom="1.0" -            android:valueTo="0.0" -            android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_2" /> -    </set> -</set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_white_fingerprint_ridges_animation.xml b/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_white_fingerprint_ridges_animation.xml deleted file mode 100644 index 9dc587cb10ec..000000000000 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_error_state_to_fp_white_fingerprint_ridges_animation.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="183" -            android:propertyName="rotation" -            android:valueFrom="200.66753" -            android:valueTo="200.66753" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="266" -            android:propertyName="rotation" -            android:valueFrom="200.66753" -            android:valueTo="0.0" -            android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_4" /> -    </set> -</set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_group_1_animation.xml b/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_group_1_animation.xml deleted file mode 100644 index 2cdd02c1b4c8..000000000000 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_group_1_animation.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="183" -            android:propertyName="rotation" -            android:valueFrom="231.0" -            android:valueTo="231.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="400" -            android:propertyName="rotation" -            android:valueFrom="231.0" -            android:valueTo="0.0" -            android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_4" /> -    </set> -</set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_group_2_animation.xml b/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_group_2_animation.xml deleted file mode 100644 index 7b62f207784f..000000000000 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_group_2_animation.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="266" -            android:propertyName="scaleX" -            android:valueFrom="0.63838" -            android:valueTo="0.63838" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="316" -            android:propertyName="scaleX" -            android:valueFrom="0.63838" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_1" /> -    </set> -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="266" -            android:propertyName="scaleY" -            android:valueFrom="0.63838" -            android:valueTo="0.63838" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="316" -            android:propertyName="scaleY" -            android:valueFrom="0.63838" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_1" /> -    </set> -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="266" -            android:propertyName="rotation" -            android:valueFrom="184.0" -            android:valueTo="184.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="316" -            android:propertyName="rotation" -            android:valueFrom="184.0" -            android:valueTo="0.0" -            android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_4" /> -    </set> -</set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_path_1_animation.xml b/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_path_1_animation.xml deleted file mode 100644 index bdd24b762e38..000000000000 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_path_1_animation.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> - -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="316" -            android:propertyName="pathData" -            android:valueFrom="M -1.3737487793,-6.77532958984 c 0.0,0.0 0.00604248046875,0.0166625976562 0.00604248046876,0.0166625976562 c 0.0,0.0 0.0213623046875,0.0250244140625 0.0213623046875,0.0250244140625 c 0.0,0.0 -0.00604248046875,-0.0166625976562 -0.00604248046876,-0.0166625976562 c 0.0,0.0 -0.0213623046875,-0.0250244140625 -0.0213623046875,-0.0250244140625 Z" -            android:valueTo="M -1.3737487793,-6.77532958984 c 0.0,0.0 0.00604248046875,0.0166625976562 0.00604248046876,0.0166625976562 c 0.0,0.0 0.0213623046875,0.0250244140625 0.0213623046875,0.0250244140625 c 0.0,0.0 -0.00604248046875,-0.0166625976562 -0.00604248046876,-0.0166625976562 c 0.0,0.0 -0.0213623046875,-0.0250244140625 -0.0213623046875,-0.0250244140625 Z" -            android:valueType="pathType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="16" -            android:propertyName="pathData" -            android:valueFrom="M -1.3737487793,-6.77532958984 c 0.0,0.0 0.00604248046875,0.0166625976562 0.00604248046876,0.0166625976562 c 0.0,0.0 0.0213623046875,0.0250244140625 0.0213623046875,0.0250244140625 c 0.0,0.0 -0.00604248046875,-0.0166625976562 -0.00604248046876,-0.0166625976562 c 0.0,0.0 -0.0213623046875,-0.0250244140625 -0.0213623046875,-0.0250244140625 Z" -            android:valueTo="M 1.33227539062,-6.75866699219 c 0.0,0.0 -2.69998168945,0.0 -2.69998168945,0.0 c 0.0,0.0 0.0213623046875,0.0250244140625 0.0213623046875,0.0250244140625 c 0.0,0.0 2.69998168945,0.0 2.69998168945,0.0 c 0.0,0.0 -0.0213623046875,-0.0250244140625 -0.0213623046875,-0.0250244140625 Z" -            android:valueType="pathType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="133" -            android:propertyName="pathData" -            android:valueFrom="M 1.33227539062,-6.75866699219 c 0.0,0.0 -2.69998168945,0.0 -2.69998168945,0.0 c 0.0,0.0 0.0213623046875,0.0250244140625 0.0213623046875,0.0250244140625 c 0.0,0.0 2.69998168945,0.0 2.69998168945,0.0 c 0.0,0.0 -0.0213623046875,-0.0250244140625 -0.0213623046875,-0.0250244140625 Z" -            android:valueTo="M 1.35363769531,1.36633300781 c 0.0,0.0 -2.69998168945,0.0 -2.69998168945,0.0 c 0.0,0.0 0.0,-8.09997558594 0.0,-8.09997558594 c 0.0,0.0 2.69998168945,0.0 2.69998168945,0.0 c 0.0,0.0 0.0,8.09997558594 0.0,8.09997558594 Z" -            android:valueType="pathType" -            android:interpolator="@interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_5" /> -    </set> -</set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_path_2_animation.xml b/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_path_2_animation.xml deleted file mode 100644 index 8ec7c30e9496..000000000000 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_path_2_animation.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="316" -            android:propertyName="pathData" -            android:valueFrom="M -1.3705291748,4.06730651855 c 0.0,0.0 0.036376953125,-0.0102386474609 0.036376953125,-0.0102386474609 c 0.0,0.0 -0.00682067871094,0.0040283203125 -0.00682067871093,0.0040283203125 c 0.0,0.0 -0.0161437988281,0.00479125976562 -0.0161437988281,0.00479125976563 c 0.0,0.0 -0.0134124755859,0.00141906738281 -0.0134124755859,0.00141906738281 Z" -            android:valueTo="M -1.3705291748,4.06730651855 c 0.0,0.0 0.036376953125,-0.0102386474609 0.036376953125,-0.0102386474609 c 0.0,0.0 -0.00682067871094,0.0040283203125 -0.00682067871093,0.0040283203125 c 0.0,0.0 -0.0161437988281,0.00479125976562 -0.0161437988281,0.00479125976563 c 0.0,0.0 -0.0134124755859,0.00141906738281 -0.0134124755859,0.00141906738281 Z" -            android:valueType="pathType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="16" -            android:propertyName="pathData" -            android:valueFrom="M -1.3705291748,4.06730651855 c 0.0,0.0 0.036376953125,-0.0102386474609 0.036376953125,-0.0102386474609 c 0.0,0.0 -0.00682067871094,0.0040283203125 -0.00682067871093,0.0040283203125 c 0.0,0.0 -0.0161437988281,0.00479125976562 -0.0161437988281,0.00479125976563 c 0.0,0.0 -0.0134124755859,0.00141906738281 -0.0134124755859,0.00141906738281 Z" -            android:valueTo="M 1.36582946777,4.05706787109 c 0.0,0.0 -2.69998168945,0.0 -2.69998168945,0.0 c 0.0,0.0 -0.00682067871094,0.0040283203125 -0.00682067871093,0.0040283203125 c 0.0,0.0 2.72023010254,-0.00544738769531 2.72023010254,-0.00544738769531 c 0.0,0.0 -0.013427734375,0.00141906738281 -0.013427734375,0.00141906738281 Z" -            android:valueType="pathType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="100" -            android:propertyName="pathData" -            android:valueFrom="M 1.36582946777,4.05706787109 c 0.0,0.0 -2.69998168945,0.0 -2.69998168945,0.0 c 0.0,0.0 -0.00682067871094,0.0040283203125 -0.00682067871093,0.0040283203125 c 0.0,0.0 2.72023010254,-0.00544738769531 2.72023010254,-0.00544738769531 c 0.0,0.0 -0.013427734375,0.00141906738281 -0.013427734375,0.00141906738281 Z" -            android:valueTo="M 1.36582946777,4.05706787109 c 0.0,0.0 -2.69998168945,0.0 -2.69998168945,0.0 c 0.0,0.0 -0.00682067871094,0.0040283203125 -0.00682067871093,0.0040283203125 c 0.0,0.0 2.69998168945,0.0 2.69998168945,0.0 c 0.0,0.0 0.00682067871094,-0.0040283203125 0.00682067871094,-0.0040283203125 Z" -            android:valueType="pathType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="99" -            android:propertyName="pathData" -            android:valueFrom="M 1.36582946777,4.05706787109 c 0.0,0.0 -2.69998168945,0.0 -2.69998168945,0.0 c 0.0,0.0 -0.00682067871094,0.0040283203125 -0.00682067871093,0.0040283203125 c 0.0,0.0 2.69998168945,0.0 2.69998168945,0.0 c 0.0,0.0 0.00682067871094,-0.0040283203125 0.00682067871094,-0.0040283203125 Z" -            android:valueTo="M 1.35900878906,6.76104736328 c 0.0,0.0 -2.69998168945,0.0 -2.69998168945,0.0 c 0.0,0.0 0.0,-2.69995117188 0.0,-2.69995117188 c 0.0,0.0 2.69998168945,0.0 2.69998168945,0.0 c 0.0,0.0 0.0,2.69995117188 0.0,2.69995117188 Z" -            android:valueType="pathType" -            android:interpolator="@interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_5" /> -    </set> -</set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_5_path_animation.xml b/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_5_path_animation.xml deleted file mode 100644 index eef1efdd2841..000000000000 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_5_path_animation.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <objectAnimator -        android:duration="150" -        android:propertyName="trimPathStart" -        android:valueFrom="0.0" -        android:valueTo="1.0" -        android:valueType="floatType" -        android:interpolator="@android:interpolator/linear" /> -</set> diff --git a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_6_path_0_animation.xml b/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_6_path_0_animation.xml deleted file mode 100644 index 1b8a77f49118..000000000000 --- a/packages/SystemUI/res/anim/lockscreen_fingerprint_fp_to_error_state_ridge_6_path_0_animation.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <objectAnimator -        android:duration="250" -        android:propertyName="trimPathEnd" -        android:valueFrom="0.0" -        android:valueTo="1.0" -        android:valueType="floatType" -        android:interpolator="@interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_0" /> -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="133" -            android:propertyName="trimPathStart" -            android:valueFrom="0.0" -            android:valueTo="0.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="216" -            android:propertyName="trimPathStart" -            android:valueFrom="0.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_0" /> -    </set> -</set> diff --git a/packages/SystemUI/res/anim/trusted_state_to_error_bottompath_animation.xml b/packages/SystemUI/res/anim/trusted_state_to_error_bottompath_animation.xml new file mode 100644 index 000000000000..7a01896c6789 --- /dev/null +++ b/packages/SystemUI/res/anim/trusted_state_to_error_bottompath_animation.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="200" +            android:propertyName="pathData" +            android:valueFrom="M 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" +            android:valueTo="M 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" +            android:valueType="pathType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="149" +            android:propertyName="pathData" +            android:valueFrom="M 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" +            android:valueTo="M 0.0,-1.1 l 0.0,0.0 c 0.60751322478,0.0 1.1,0.49248677522 1.1,1.1 l 0.0,0.0 c 0.0,0.60751322478 -0.49248677522,1.1 -1.1,1.1 l 0.0,0.0 c -0.60751322478,0.0 -1.1,-0.49248677522 -1.1,-1.1 l 0.0,0.0 c 0.0,-0.60751322478 0.49248677522,-1.1 1.1,-1.1 Z" +            android:valueType="pathType" +            android:interpolator="@interpolator/trusted_state_to_error_animation_interpolator_0" /> +    </set> +</set> diff --git a/packages/SystemUI/res/anim/trusted_state_to_error_lock_right_side_animation.xml b/packages/SystemUI/res/anim/trusted_state_to_error_circlepath_animation.xml index 2a4753a2287a..ac5e44894539 100755..100644 --- a/packages/SystemUI/res/anim/trusted_state_to_error_lock_right_side_animation.xml +++ b/packages/SystemUI/res/anim/trusted_state_to_error_circlepath_animation.xml @@ -1,8 +1,8 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -Copyright (C) 2015 The Android Open Source Project +Copyright (C) 2017 The Android Open Source Project -   Licensed under the Apache License, Version 2.0 (the "License"); +    Licensed under the Apache License, Version 2.0 (the "License");      you may not use this file except in compliance with the License.      You may obtain a copy of the License at @@ -19,34 +19,17 @@ Copyright (C) 2015 The Android Open Source Project      <set          android:ordering="sequentially" >          <objectAnimator -            android:duration="200" -            android:propertyName="scaleX" +            android:duration="100" +            android:propertyName="trimPathStart"              android:valueFrom="1.0"              android:valueTo="1.0"              android:valueType="floatType"              android:interpolator="@android:interpolator/linear" />          <objectAnimator -            android:duration="200" -            android:propertyName="scaleX" +            android:duration="450" +            android:propertyName="trimPathStart"              android:valueFrom="1.0" -            android:valueTo="1.33333" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> -    </set> -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="200" -            android:propertyName="scaleY" -            android:valueFrom="1.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="200" -            android:propertyName="scaleY" -            android:valueFrom="1.0" -            android:valueTo="1.33333" +            android:valueTo="0.0"              android:valueType="floatType"              android:interpolator="@android:interpolator/fast_out_slow_in" />      </set> diff --git a/packages/SystemUI/res/anim/trusted_state_to_error_ellipse_path_1_animation.xml b/packages/SystemUI/res/anim/trusted_state_to_error_ellipse_path_1_animation.xml index 5cf48093a05e..66973166790c 100755..100644 --- a/packages/SystemUI/res/anim/trusted_state_to_error_ellipse_path_1_animation.xml +++ b/packages/SystemUI/res/anim/trusted_state_to_error_ellipse_path_1_animation.xml @@ -1,66 +1,25 @@  <?xml version="1.0" encoding="utf-8"?> -<!-- -Copyright (C) 2015 The Android Open Source Project +<!-- 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 +     Licensed under the Apache License, Version 2.0 (the "License"); +     you may not use this file except in compliance with the License. +     You may obtain a copy of the License at -         http://www.apache.org/licenses/LICENSE-2.0 +          http://www.apache.org/licenses/LICENSE-2.0 -    Unless required by applicable law or agreed to in writing, software -    distributed under the License is distributed on an "AS IS" BASIS, -    WITHOUT 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.  -->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <objectAnimator -        android:duration="600" -        android:propertyName="strokeColor" -        android:valueFrom="#FFFFFFFF" -        android:valueTo="#FFF3511E" -        android:interpolator="@android:interpolator/fast_out_slow_in" /> -    <objectAnimator -        android:duration="600" -        android:propertyName="strokeAlpha" -        android:valueFrom="0.5" -        android:valueTo="1.0" -        android:valueType="floatType" -        android:interpolator="@android:interpolator/fast_out_slow_in" /> -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="166" -            android:propertyName="trimPathOffset" -            android:valueFrom="1.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="433" -            android:propertyName="trimPathOffset" -            android:valueFrom="1.0" -            android:valueTo="0.5" -            android:valueType="floatType" -            android:interpolator="@interpolator/trusted_state_to_error_animation_interpolator_2" /> -    </set> -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="166" -            android:propertyName="trimPathStart" -            android:valueFrom="1.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="433" -            android:propertyName="trimPathStart" -            android:valueFrom="1.0" -            android:valueTo="0.0" -            android:valueType="floatType" -            android:interpolator="@interpolator/trusted_state_to_error_animation_interpolator_0" /> -    </set> +        android:duration="200" +        android:propertyName="pathData" +        android:valueFrom="M 0.0,-1.988645 c 1.09829830627,0.0 1.988645,0.890346693734 1.988645,1.988645 c 0.0,1.09829830627 -0.890346693734,1.988645 -1.988645,1.988645 c -1.09829830627,0.0 -1.988645,-0.890346693734 -1.988645,-1.988645 c 0.0,-1.09829830627 0.890346693734,-1.988645 1.988645,-1.988645 Z" +        android:valueTo="M 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" +        android:valueType="pathType" +        android:interpolator="@interpolator/trusted_state_to_error_animation_interpolator_0" />  </set> diff --git a/packages/SystemUI/res/anim/trusted_state_to_error_ellipse_path_2_animation.xml b/packages/SystemUI/res/anim/trusted_state_to_error_ellipse_path_2_animation.xml deleted file mode 100755 index a387f97730d0..000000000000 --- a/packages/SystemUI/res/anim/trusted_state_to_error_ellipse_path_2_animation.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -Copyright (C) 2015 The Android Open Source Project - -   Licensed under the Apache License, Version 2.0 (the "License"); -    you may not use this file except in compliance with the License. -    You may obtain a copy of the License at - -         http://www.apache.org/licenses/LICENSE-2.0 - -    Unless required by applicable law or agreed to in writing, software -    distributed under the License is distributed on an "AS IS" BASIS, -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -    See the License for the specific language governing permissions and -    limitations under the License. ---> -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <objectAnimator -        android:duration="200" -        android:propertyName="pathData" -        android:valueFrom="M 0.0,-1.988645 c 1.09829830627,0.0 1.988645,0.890346693734 1.988645,1.988645 c 0.0,1.09829830627 -0.890346693734,1.988645 -1.988645,1.988645 c -1.09829830627,0.0 -1.988645,-0.890346693734 -1.988645,-1.988645 c 0.0,-1.09829830627 0.890346693734,-1.988645 1.988645,-1.988645 Z" -        android:valueTo="M 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" -        android:valueType="pathType" -        android:interpolator="@android:interpolator/fast_out_slow_in" /> -    <objectAnimator -        android:duration="600" -        android:propertyName="fillColor" -        android:valueFrom="#FFFFFFFF" -        android:valueTo="#FFF3511E" -        android:interpolator="@android:interpolator/fast_out_slow_in" /> -    <objectAnimator -        android:duration="600" -        android:propertyName="fillAlpha" -        android:valueFrom="0.5" -        android:valueTo="1.0" -        android:valueType="floatType" -        android:interpolator="@android:interpolator/fast_out_slow_in" /> -</set> diff --git a/packages/SystemUI/res/anim/trusted_state_to_error_errorcircle_animation.xml b/packages/SystemUI/res/anim/trusted_state_to_error_errorcircle_animation.xml new file mode 100644 index 000000000000..903d97e0f2f8 --- /dev/null +++ b/packages/SystemUI/res/anim/trusted_state_to_error_errorcircle_animation.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="50" +            android:propertyName="rotation" +            android:valueFrom="184.0" +            android:valueTo="184.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="450" +            android:propertyName="rotation" +            android:valueFrom="184.0" +            android:valueTo="0.0" +            android:valueType="floatType" +            android:interpolator="@interpolator/trusted_state_to_error_animation_interpolator_1" /> +    </set> +</set> diff --git a/packages/SystemUI/res/anim/trusted_state_to_error_errorexclamationdot_animation.xml b/packages/SystemUI/res/anim/trusted_state_to_error_errorexclamationdot_animation.xml new file mode 100644 index 000000000000..c5339a0b11a0 --- /dev/null +++ b/packages/SystemUI/res/anim/trusted_state_to_error_errorexclamationdot_animation.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <objectAnimator +        android:duration="550" +        android:propertyXName="translateX" +        android:propertyYName="translateY" +        android:pathData="M 12.0,8.0 c 0.0,0.66667 0.0,3.33333 0.0,4.0" +        android:interpolator="@interpolator/trusted_state_to_error_animation_interpolator_3" /> +</set> diff --git a/packages/SystemUI/res/anim/trusted_state_to_error_exclamation_dot_animation.xml b/packages/SystemUI/res/anim/trusted_state_to_error_exclamation_dot_animation.xml deleted file mode 100755 index 7a9fb3b3372d..000000000000 --- a/packages/SystemUI/res/anim/trusted_state_to_error_exclamation_dot_animation.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -Copyright (C) 2015 The Android Open Source Project - -   Licensed under the Apache License, Version 2.0 (the "License"); -    you may not use this file except in compliance with the License. -    You may obtain a copy of the License at - -         http://www.apache.org/licenses/LICENSE-2.0 - -    Unless required by applicable law or agreed to in writing, software -    distributed under the License is distributed on an "AS IS" BASIS, -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -    See the License for the specific language governing permissions and -    limitations under the License. ---> -<set -    xmlns:android="http://schemas.android.com/apk/res/android" > -    <objectAnimator -        android:duration="566" -        android:propertyXName="translateX" -        android:propertyYName="translateY" -        android:pathData="M 0.0,4.0 c -0.00065,0.22217 -0.00326,1.11083 -0.00391,1.333" -        android:interpolator="@interpolator/trusted_state_to_error_animation_interpolator_1" /> -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="300" -            android:propertyName="scaleX" -            android:valueFrom="0.0" -            android:valueTo="0.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="16" -            android:propertyName="scaleX" -            android:valueFrom="0.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -    </set> -    <set -        android:ordering="sequentially" > -        <objectAnimator -            android:duration="300" -            android:propertyName="scaleY" -            android:valueFrom="0.0" -            android:valueTo="0.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="16" -            android:propertyName="scaleY" -            android:valueFrom="0.0" -            android:valueTo="1.0" -            android:valueType="floatType" -            android:interpolator="@android:interpolator/linear" /> -    </set> -</set> diff --git a/packages/SystemUI/res/anim/trusted_state_to_error_exclamationtop_animation.xml b/packages/SystemUI/res/anim/trusted_state_to_error_exclamationtop_animation.xml new file mode 100644 index 000000000000..c5b2c126bef1 --- /dev/null +++ b/packages/SystemUI/res/anim/trusted_state_to_error_exclamationtop_animation.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <objectAnimator +        android:duration="500" +        android:propertyXName="translateX" +        android:propertyYName="translateY" +        android:pathData="M 0.0,2.5 c 0.0,-0.75 0.0,-3.75 0.0,-4.5" +        android:interpolator="@interpolator/trusted_state_to_error_animation_interpolator_4" /> +</set> diff --git a/packages/SystemUI/res/anim/trusted_state_to_error_lock_top_animation.xml b/packages/SystemUI/res/anim/trusted_state_to_error_lock_top_animation.xml index 1f601d34d9f7..63a25d9a8da5 100755..100644 --- a/packages/SystemUI/res/anim/trusted_state_to_error_lock_top_animation.xml +++ b/packages/SystemUI/res/anim/trusted_state_to_error_lock_top_animation.xml @@ -1,25 +1,24 @@  <?xml version="1.0" encoding="utf-8"?> -<!-- -Copyright (C) 2015 The Android Open Source Project +<!-- 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 +     Licensed under the Apache License, Version 2.0 (the "License"); +     you may not use this file except in compliance with the License. +     You may obtain a copy of the License at -         http://www.apache.org/licenses/LICENSE-2.0 +          http://www.apache.org/licenses/LICENSE-2.0 -    Unless required by applicable law or agreed to in writing, software -    distributed under the License is distributed on an "AS IS" BASIS, -    WITHOUT 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.  -->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <set          android:ordering="sequentially" >          <objectAnimator -            android:duration="116" +            android:duration="150"              android:propertyName="scaleX"              android:valueFrom="1.0"              android:valueTo="1.0" @@ -36,7 +35,7 @@ Copyright (C) 2015 The Android Open Source Project      <set          android:ordering="sequentially" >          <objectAnimator -            android:duration="116" +            android:duration="150"              android:propertyName="scaleY"              android:valueFrom="1.0"              android:valueTo="1.0" diff --git a/packages/SystemUI/res/anim/trusted_state_to_error_path_1_animation.xml b/packages/SystemUI/res/anim/trusted_state_to_error_path_1_animation.xml index 7b9be5c7ddf9..138c06a73911 100755..100644 --- a/packages/SystemUI/res/anim/trusted_state_to_error_path_1_animation.xml +++ b/packages/SystemUI/res/anim/trusted_state_to_error_path_1_animation.xml @@ -1,56 +1,52 @@  <?xml version="1.0" encoding="utf-8"?> -<!-- -Copyright (C) 2015 The Android Open Source Project +<!-- 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 +     Licensed under the Apache License, Version 2.0 (the "License"); +     you may not use this file except in compliance with the License. +     You may obtain a copy of the License at -         http://www.apache.org/licenses/LICENSE-2.0 +          http://www.apache.org/licenses/LICENSE-2.0 -    Unless required by applicable law or agreed to in writing, software -    distributed under the License is distributed on an "AS IS" BASIS, -    WITHOUT 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.  -->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <set          android:ordering="sequentially" >          <objectAnimator -            android:duration="33" -            android:propertyName="pathData" -            android:valueFrom="M 6.00561523438,-4.046875 c 0.0,0.0 -5.98999023438,0.0 -5.98999023438,0.0 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 5.98812866211,0.0 5.98812866211,0.0 c 0.0,0.0 0.00064086914062,10.0 0.00064086914062,10.0 c 0.0,0.0 -5.98840332031,0.0 -5.98840332031,0.0 c 0.0,0.0 -0.0052490234375,2.0 -0.0052490234375,2.0 c 0.0,0.0 5.99487304688,0.0 5.99487304688,0.0 c 1.10000610352,0.0 2.0,-0.900024414062 2.0,-2.0 c 0.0,0.0 0.0,-10.0 0.0,-10.0 c 0.0,-1.09997558594 -0.899993896484,-2.0 -2.0,-2.0 Z" -            android:valueTo="M 6.00561523438,-4.046875 c 0.0,0.0 -5.98999023438,0.0 -5.98999023438,0.0 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 5.98812866211,0.0 5.98812866211,0.0 c 0.0,0.0 0.00064086914062,10.0 0.00064086914062,10.0 c 0.0,0.0 -5.98840332031,0.0 -5.98840332031,0.0 c 0.0,0.0 -0.0052490234375,2.0 -0.0052490234375,2.0 c 0.0,0.0 5.99487304688,0.0 5.99487304688,0.0 c 1.10000610352,0.0 2.0,-0.900024414062 2.0,-2.0 c 0.0,0.0 0.0,-10.0 0.0,-10.0 c 0.0,-1.09997558594 -0.899993896484,-2.0 -2.0,-2.0 Z" -            android:valueType="pathType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="166" +            android:duration="200"              android:propertyName="pathData"              android:valueFrom="M 6.00561523438,-4.046875 c 0.0,0.0 -5.98999023438,0.0 -5.98999023438,0.0 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 5.98812866211,0.0 5.98812866211,0.0 c 0.0,0.0 0.00064086914062,10.0 0.00064086914062,10.0 c 0.0,0.0 -5.98840332031,0.0 -5.98840332031,0.0 c 0.0,0.0 -0.0052490234375,2.0 -0.0052490234375,2.0 c 0.0,0.0 5.99487304688,0.0 5.99487304688,0.0 c 1.10000610352,0.0 2.0,-0.900024414062 2.0,-2.0 c 0.0,0.0 0.0,-10.0 0.0,-10.0 c 0.0,-1.09997558594 -0.899993896484,-2.0 -2.0,-2.0 Z"              android:valueTo="M 1.63623046875,-4.953125 c 0.0,0.0 -1.61499023438,0.0 -1.61499023438,0.0 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 0.00375366210938,-0.015625 0.00375366210938,-0.015625 c 0.0,0.0 0.00064086914062,10.625 0.00064086914062,10.625 c 0.0,0.0 -0.0040283203125,0.015625 -0.0040283203125,0.015625 c 0.0,0.0 -0.0052490234375,2.0 -0.0052490234375,2.0 c 0.0,0.0 1.61987304688,0.0 1.61987304688,0.0 c 1.10000610352,0.0 2.0,-0.900024414062 2.0,-2.0 c 0.0,0.0 0.0,-10.625 0.0,-10.625 c 0.0,-1.09997558594 -0.899993896484,-2.0 -2.0,-2.0 Z"              android:valueType="pathType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> +            android:interpolator="@interpolator/trusted_state_to_error_animation_interpolator_0" />          <objectAnimator -            android:duration="200" +            android:duration="149"              android:propertyName="pathData"              android:valueFrom="M 1.63623046875,-4.953125 c 0.0,0.0 -1.61499023438,0.0 -1.61499023438,0.0 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 0.00375366210938,-0.015625 0.00375366210938,-0.015625 c 0.0,0.0 0.00064086914062,10.625 0.00064086914062,10.625 c 0.0,0.0 -0.0040283203125,0.015625 -0.0040283203125,0.015625 c 0.0,0.0 -0.0052490234375,2.0 -0.0052490234375,2.0 c 0.0,0.0 1.61987304688,0.0 1.61987304688,0.0 c 1.10000610352,0.0 2.0,-0.900024414062 2.0,-2.0 c 0.0,0.0 0.0,-10.625 0.0,-10.625 c 0.0,-1.09997558594 -0.899993896484,-2.0 -2.0,-2.0 Z"              android:valueTo="M 0.02685546875,-4.96875 c 0.0,0.0 -0.005615234375,0.015625 -0.005615234375,0.015625 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 0.00375366210938,-0.015625 0.00375366210938,-0.015625 c 0.0,0.0 -0.00936889648438,3.9296875 -0.00936889648438,3.9296875 c 0.0,0.0 -0.0040283203125,0.015625 -0.0040283203125,0.015625 c 0.0,0.0 -0.0028076171875,0.0234375 -0.0028076171875,0.0234375 c 0.0,0.0 0.010498046875,-0.015625 0.010498046875,-0.015625 c 0.0,0.0 0.985595703125,0.0078125 0.985595703125,0.0078125 c 0.0,0.0 0.017578125,-6.015625 0.017578125,-6.015625 c 0.0,0.0 0.104400634766,0.0546875 -0.99560546875,0.0546875 Z"              android:valueType="pathType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> +            android:interpolator="@interpolator/trusted_state_to_error_animation_interpolator_5" /> +    </set> +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="183" +            android:propertyName="fillAlpha" +            android:valueFrom="1.0" +            android:valueTo="1.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="16" +            android:propertyName="fillAlpha" +            android:valueFrom="1.0" +            android:valueTo="0.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" />      </set> -    <objectAnimator -        android:duration="600" -        android:propertyName="fillColor" -        android:valueFrom="#FFFFFFFF" -        android:valueTo="#FFF3511E" -        android:interpolator="@android:interpolator/fast_out_slow_in" /> -    <objectAnimator -        android:duration="600" -        android:propertyName="fillAlpha" -        android:valueFrom="0.5" -        android:valueTo="1.0" -        android:valueType="floatType" -        android:interpolator="@android:interpolator/fast_out_slow_in" />  </set> diff --git a/packages/SystemUI/res/anim/trusted_state_to_error_path_2_animation.xml b/packages/SystemUI/res/anim/trusted_state_to_error_path_2_animation.xml index 8eb0c62da690..c4d38e00dc9e 100755..100644 --- a/packages/SystemUI/res/anim/trusted_state_to_error_path_2_animation.xml +++ b/packages/SystemUI/res/anim/trusted_state_to_error_path_2_animation.xml @@ -1,56 +1,52 @@  <?xml version="1.0" encoding="utf-8"?> -<!-- -Copyright (C) 2015 The Android Open Source Project +<!-- 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 +     Licensed under the Apache License, Version 2.0 (the "License"); +     you may not use this file except in compliance with the License. +     You may obtain a copy of the License at -         http://www.apache.org/licenses/LICENSE-2.0 +          http://www.apache.org/licenses/LICENSE-2.0 -    Unless required by applicable law or agreed to in writing, software -    distributed under the License is distributed on an "AS IS" BASIS, -    WITHOUT 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.  -->  <set      xmlns:android="http://schemas.android.com/apk/res/android" >      <set          android:ordering="sequentially" >          <objectAnimator -            android:duration="33" -            android:propertyName="pathData" -            android:valueFrom="M -5.9959564209,-2.04727172852 c 0.0,0.0 6.01173400879,0.00039672851562 6.01173400879,0.00039672851562 c 0.0,0.0 -0.00015258789062,-2.0 -0.00015258789062,-2.0 c 0.0,0.0 -6.01000976562,0.0 -6.01000976562,0.0 c -1.10000610352,0.0 -2.0,0.900024414062 -2.0,2.0 c 0.0,0.0 0.0,10.0 0.0,10.0 c 0.0,1.09997558594 0.899993896484,2.0 2.0,2.0 c 0.0,0.0 6.01000976562,0.0 6.01000976562,0.0 c 0.0,0.0 -0.000244140625,-2.0009765625 -0.000244140625,-2.0009765625 c 0.0,0.0 -6.01171875,0.0003662109375 -6.01171875,0.0003662109375 c 0.0,0.0 0.00038146972656,-9.99978637695 0.00038146972656,-9.99978637695 Z" -            android:valueTo="M -5.9959564209,-2.04727172852 c 0.0,0.0 6.01173400879,0.00039672851562 6.01173400879,0.00039672851562 c 0.0,0.0 -0.00015258789062,-2.0 -0.00015258789062,-2.0 c 0.0,0.0 -6.01000976562,0.0 -6.01000976562,0.0 c -1.10000610352,0.0 -2.0,0.900024414062 -2.0,2.0 c 0.0,0.0 0.0,10.0 0.0,10.0 c 0.0,1.09997558594 0.899993896484,2.0 2.0,2.0 c 0.0,0.0 6.01000976562,0.0 6.01000976562,0.0 c 0.0,0.0 -0.000244140625,-2.0009765625 -0.000244140625,-2.0009765625 c 0.0,0.0 -6.01171875,0.0003662109375 -6.01171875,0.0003662109375 c 0.0,0.0 0.00038146972656,-9.99978637695 0.00038146972656,-9.99978637695 Z" -            android:valueType="pathType" -            android:interpolator="@android:interpolator/linear" /> -        <objectAnimator -            android:duration="166" +            android:duration="200"              android:propertyName="pathData"              android:valueFrom="M -5.9959564209,-2.04727172852 c 0.0,0.0 6.01173400879,0.00039672851562 6.01173400879,0.00039672851562 c 0.0,0.0 -0.00015258789062,-2.0 -0.00015258789062,-2.0 c 0.0,0.0 -6.01000976562,0.0 -6.01000976562,0.0 c -1.10000610352,0.0 -2.0,0.900024414062 -2.0,2.0 c 0.0,0.0 0.0,10.0 0.0,10.0 c 0.0,1.09997558594 0.899993896484,2.0 2.0,2.0 c 0.0,0.0 6.01000976562,0.0 6.01000976562,0.0 c 0.0,0.0 -0.000244140625,-2.0009765625 -0.000244140625,-2.0009765625 c 0.0,0.0 -6.01171875,0.0003662109375 -6.01171875,0.0003662109375 c 0.0,0.0 0.00038146972656,-9.99978637695 0.00038146972656,-9.99978637695 Z"              android:valueTo="M 0.0252990722656,-2.96975708008 c 0.0,0.0 -0.00390625,0.0166320800781 -0.00390625,0.0166320800781 c 0.0,0.0 -0.00015258789062,-2.0 -0.00015258789062,-2.0 c 0.0,0.0 -1.63500976562,0.0 -1.63500976562,0.0 c -1.10000610352,0.0 -2.0,0.900024414062 -2.0,2.0 c 0.0,0.0 0.0,10.625 0.0,10.625 c 0.0,1.09997558594 0.899993896484,2.0 2.0,2.0 c 0.0,0.0 1.63500976562,0.0 1.63500976562,0.0 c 0.0,0.0 -0.000244140625,-2.0009765625 -0.000244140625,-2.0009765625 c 0.0,0.0 0.00390625,-0.015869140625 0.00390625,-0.015869140625 c 0.0,0.0 0.00039672851562,-10.624786377 0.00039672851562,-10.624786377 Z"              android:valueType="pathType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> +            android:interpolator="@interpolator/trusted_state_to_error_animation_interpolator_0" />          <objectAnimator -            android:duration="200" +            android:duration="149"              android:propertyName="pathData"              android:valueFrom="M 0.0252990722656,-2.96975708008 c 0.0,0.0 -0.00390625,0.0166320800781 -0.00390625,0.0166320800781 c 0.0,0.0 -0.00015258789062,-2.0 -0.00015258789062,-2.0 c 0.0,0.0 -1.63500976562,0.0 -1.63500976562,0.0 c -1.10000610352,0.0 -2.0,0.900024414062 -2.0,2.0 c 0.0,0.0 0.0,10.625 0.0,10.625 c 0.0,1.09997558594 0.899993896484,2.0 2.0,2.0 c 0.0,0.0 1.63500976562,0.0 1.63500976562,0.0 c 0.0,0.0 -0.000244140625,-2.0009765625 -0.000244140625,-2.0009765625 c 0.0,0.0 0.00390625,-0.015869140625 0.00390625,-0.015869140625 c 0.0,0.0 0.00039672851562,-10.624786377 0.00039672851562,-10.624786377 Z"              android:valueTo="M 0.0252990722656,-2.96914672852 c 0.0,0.0 -0.00390625,0.0160217285156 -0.00390625,0.0160217285156 c 0.0,0.0 -0.00015258789062,-2.0 -0.00015258789062,-2.0 c 0.0,0.0 0.005615234375,-0.015625 0.005615234375,-0.015625 c -1.10000610352,0.0 -1.01220703125,-0.0546875 -1.01220703125,-0.0546875 c 0.0,0.0 -0.017578125,6.015625 -0.017578125,6.015625 c 0.0,0.0 -0.0777893066406,-0.0078125 1.02221679688,-0.0078125 c 0.0,0.0 -0.005615234375,0.015625 -0.005615234375,0.015625 c 0.0,0.0 -0.002685546875,-0.0244140625 -0.002685546875,-0.0244140625 c 0.0,0.0 0.00390625,-0.0152587890625 0.00390625,-0.0152587890625 c 0.0,0.0 0.0104064941406,-3.92947387695 0.0104064941406,-3.92947387695 Z"              android:valueType="pathType" -            android:interpolator="@android:interpolator/fast_out_slow_in" /> +            android:interpolator="@interpolator/trusted_state_to_error_animation_interpolator_5" /> +    </set> +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="183" +            android:propertyName="fillAlpha" +            android:valueFrom="1.0" +            android:valueTo="1.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="16" +            android:propertyName="fillAlpha" +            android:valueFrom="1.0" +            android:valueTo="0.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" />      </set> -    <objectAnimator -        android:duration="600" -        android:propertyName="fillColor" -        android:valueFrom="#FFFFFFFF" -        android:valueTo="#FFF3511E" -        android:interpolator="@android:interpolator/fast_out_slow_in" /> -    <objectAnimator -        android:duration="600" -        android:propertyName="fillAlpha" -        android:valueFrom="0.5" -        android:valueTo="1.0" -        android:valueType="floatType" -        android:interpolator="@android:interpolator/fast_out_slow_in" />  </set> diff --git a/packages/SystemUI/res/anim/trusted_state_to_error_path_3_animation.xml b/packages/SystemUI/res/anim/trusted_state_to_error_path_3_animation.xml index 2e867449b2f3..455d0b89be15 100755..100644 --- a/packages/SystemUI/res/anim/trusted_state_to_error_path_3_animation.xml +++ b/packages/SystemUI/res/anim/trusted_state_to_error_path_3_animation.xml @@ -1,39 +1,35 @@  <?xml version="1.0" encoding="utf-8"?> -<!-- -Copyright (C) 2015 The Android Open Source Project +<!-- 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 +     Licensed under the Apache License, Version 2.0 (the "License"); +     you may not use this file except in compliance with the License. +     You may obtain a copy of the License at -         http://www.apache.org/licenses/LICENSE-2.0 +          http://www.apache.org/licenses/LICENSE-2.0 -    Unless required by applicable law or agreed to in writing, software -    distributed under the License is distributed on an "AS IS" BASIS, -    WITHOUT 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.  -->  <set      xmlns:android="http://schemas.android.com/apk/res/android" > -    <objectAnimator -        android:duration="200" -        android:propertyName="pathData" -        android:valueFrom="M 5.00619506836,-6.046875 c 0.0,-2.76000976562 -2.23999023438,-5.0 -5.0,-5.0 c -2.76000976562,0.0 -5.0,2.23999023438 -5.0,5.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,-1.71002197266 1.38999938965,-3.09997558594 3.10000610352,-3.09997558594 c 1.71000671387,0.0 3.10000610352,1.38995361328 3.10000610352,3.09997558594 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,0.0 0.0,-2.0 0.0,-2.0 Z" -        android:valueTo="M 5.01239013672,3.390625 c 0.0,-2.76000976562 -2.23999023438,-5.0 -5.0,-5.0 c -2.76000976562,0.0 -5.0,2.23999023438 -5.0,5.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,-1.71002197266 1.38999938965,-3.09997558594 3.10000610352,-3.09997558594 c 1.71000671387,0.0 3.10000610352,1.38995361328 3.10000610352,3.09997558594 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,0.0 0.0,-2.0 0.0,-2.0 Z" -        android:valueType="pathType" -        android:interpolator="@interpolator/trusted_state_to_error_animation_interpolator_3" /> -    <objectAnimator -        android:duration="600" -        android:propertyName="fillColor" -        android:valueFrom="#FFFFFFFF" -        android:valueTo="#FFF3511E" -        android:interpolator="@android:interpolator/fast_out_slow_in" /> -    <objectAnimator -        android:duration="600" -        android:propertyName="fillAlpha" -        android:valueFrom="0.5" -        android:valueTo="1.0" -        android:valueType="floatType" -        android:interpolator="@android:interpolator/fast_out_slow_in" /> +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="50" +            android:propertyName="pathData" +            android:valueFrom="M 5.00619506836,-6.046875 c 0.0,-2.76000976562 -2.23999023438,-5.0 -5.0,-5.0 c -2.76000976562,0.0 -5.0,2.23999023438 -5.0,5.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,-1.71002197266 1.38999938965,-3.09997558594 3.10000610352,-3.09997558594 c 1.71000671387,0.0 3.10000610352,1.38995361328 3.10000610352,3.09997558594 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,0.0 0.0,-2.0 0.0,-2.0 Z" +            android:valueTo="M 5.00619506836,-6.046875 c 0.0,-2.76000976562 -2.23999023438,-5.0 -5.0,-5.0 c -2.76000976562,0.0 -5.0,2.23999023438 -5.0,5.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,-1.71002197266 1.38999938965,-3.09997558594 3.10000610352,-3.09997558594 c 1.71000671387,0.0 3.10000610352,1.38995361328 3.10000610352,3.09997558594 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,0.0 0.0,-2.0 0.0,-2.0 Z" +            android:valueType="pathType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="150" +            android:propertyName="pathData" +            android:valueFrom="M 5.00619506836,-6.046875 c 0.0,-2.76000976562 -2.23999023438,-5.0 -5.0,-5.0 c -2.76000976562,0.0 -5.0,2.23999023438 -5.0,5.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,-1.71002197266 1.38999938965,-3.09997558594 3.10000610352,-3.09997558594 c 1.71000671387,0.0 3.10000610352,1.38995361328 3.10000610352,3.09997558594 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,0.0 0.0,-2.0 0.0,-2.0 Z" +            android:valueTo="M 5.01239013672,3.390625 c 0.0,-2.76000976562 -2.23999023438,-5.0 -5.0,-5.0 c -2.76000976562,0.0 -5.0,2.23999023438 -5.0,5.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,-1.71002197266 1.38999938965,-3.09997558594 3.10000610352,-3.09997558594 c 1.71000671387,0.0 3.10000610352,1.38995361328 3.10000610352,3.09997558594 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,0.0 0.0,-2.0 0.0,-2.0 Z" +            android:valueType="pathType" +            android:interpolator="@interpolator/trusted_state_to_error_animation_interpolator_0" /> +    </set>  </set> diff --git a/packages/SystemUI/res/anim/trusted_state_to_error_toppath_animation.xml b/packages/SystemUI/res/anim/trusted_state_to_error_toppath_animation.xml new file mode 100644 index 000000000000..b2944e5debe4 --- /dev/null +++ b/packages/SystemUI/res/anim/trusted_state_to_error_toppath_animation.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<set +    xmlns:android="http://schemas.android.com/apk/res/android" > +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="200" +            android:propertyName="pathData" +            android:valueFrom="M 0.0,-7.0 l 0.0,0.0 c 1.9329966243,0.0 3.5,1.5670033757 3.5,3.5 l 0.0,7.0 c 0.0,1.9329966243 -1.5670033757,3.5 -3.5,3.5 l 0.0,0.0 c -1.9329966243,0.0 -3.5,-1.5670033757 -3.5,-3.5 l 0.0,-7.0 c 0.0,-1.9329966243 1.5670033757,-3.5 3.5,-3.5 Z" +            android:valueTo="M 0.0,-7.0 l 0.0,0.0 c 1.9329966243,0.0 3.5,1.5670033757 3.5,3.5 l 0.0,7.0 c 0.0,1.9329966243 -1.5670033757,3.5 -3.5,3.5 l 0.0,0.0 c -1.9329966243,0.0 -3.5,-1.5670033757 -3.5,-3.5 l 0.0,-7.0 c 0.0,-1.9329966243 1.5670033757,-3.5 3.5,-3.5 Z" +            android:valueType="pathType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="300" +            android:propertyName="pathData" +            android:valueFrom="M 0.0,-7.0 l 0.0,0.0 c 1.9329966243,0.0 3.5,1.5670033757 3.5,3.5 l 0.0,7.0 c 0.0,1.9329966243 -1.5670033757,3.5 -3.5,3.5 l 0.0,0.0 c -1.9329966243,0.0 -3.5,-1.5670033757 -3.5,-3.5 l 0.0,-7.0 c 0.0,-1.9329966243 1.5670033757,-3.5 3.5,-3.5 Z" +            android:valueTo="M 0.0,-3.0 l 0.0,0.0 c 0.5522847498,0.0 1.0,0.4477152502 1.0,1.0 l 0.0,4.0 c 0.0,0.5522847498 -0.4477152502,1.0 -1.0,1.0 l 0.0,0.0 c -0.5522847498,0.0 -1.0,-0.4477152502 -1.0,-1.0 l 0.0,-4.0 c 0.0,-0.5522847498 0.4477152502,-1.0 1.0,-1.0 Z" +            android:valueType="pathType" +            android:interpolator="@interpolator/trusted_state_to_error_animation_interpolator_2" /> +    </set> +    <set +        android:ordering="sequentially" > +        <objectAnimator +            android:duration="183" +            android:propertyName="fillAlpha" +            android:valueFrom="0.0" +            android:valueTo="0.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +        <objectAnimator +            android:duration="16" +            android:propertyName="fillAlpha" +            android:valueFrom="0.0" +            android:valueTo="1.0" +            android:valueType="floatType" +            android:interpolator="@android:interpolator/linear" /> +    </set> +</set> diff --git a/packages/SystemUI/res/drawable/error_to_trustedstate.xml b/packages/SystemUI/res/drawable/error_to_trustedstate.xml index 6211edf2a9de..8bfe5f4a5bd1 100755 --- a/packages/SystemUI/res/drawable/error_to_trustedstate.xml +++ b/packages/SystemUI/res/drawable/error_to_trustedstate.xml @@ -1,8 +1,8 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -Copyright (C) 2015 The Android Open Source Project +Copyright (C) 2017 The Android Open Source Project -   Licensed under the Apache License, Version 2.0 (the "License"); +    Licensed under the Apache License, Version 2.0 (the "License");      you may not use this file except in compliance with the License.      You may obtain a copy of the License at @@ -18,49 +18,36 @@ Copyright (C) 2015 The Android Open Source Project      xmlns:android="http://schemas.android.com/apk/res/android"      android:name="error_to_trustedstate"      android:width="32dp" -    android:viewportWidth="32" +    android:viewportWidth="24"      android:height="32dp" -    android:viewportHeight="32" > +    android:viewportHeight="24" >      <group -        android:name="error_to_trusted_state" -        android:translateX="16" -        android:translateY="16" > -        <group -            android:name="error_circle" > -            <path -                android:name="ellipse_path_1" -                android:trimPathStart="0" -                android:trimPathEnd="1" -                android:trimPathOffset="0.0" -                android:strokeColor="#FFF3511E" -                android:strokeWidth="2" -                android:pathData="M 0.0,-12.0 c 6.6274169976,0.0 12.0,5.3725830024 12.0,12.0 c 0.0,6.6274169976 -5.3725830024,12.0 -12.0,12.0 c -6.6274169976,0.0 -12.0,-5.3725830024 -12.0,-12.0 c 0.0,-6.6274169976 5.3725830024,-12.0 12.0,-12.0 Z" /> -        </group> +        android:name="lock" +        android:translateX="12" +        android:translateY="12" >          <group              android:name="middle_ellipse"              android:translateY="2.9375" >              <path -                android:name="ellipse_path_2" -                android:fillColor="#FFF3511E" +                android:name="ellipse_path_1" +                android:fillColor="#FFFFFFFF"                  android:pathData="M 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" />          </group>          <group -            android:name="lock_right_side" -            android:scaleX="1.33333" -            android:scaleY="1.33333" > +            android:name="lock_right_side" >              <path                  android:name="path_1" -                android:pathData="M 0.02685546875,-4.96875 c 0.0,0.0 -0.005615234375,0.015625 -0.005615234375,0.015625 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 0.00375366210938,-0.015625 0.00375366210938,-0.015625 c 0.0,0.0 -0.00936889648438,3.9296875 -0.00936889648438,3.9296875 c 0.0,0.0 -0.0040283203125,0.015625 -0.0040283203125,0.015625 c 0.0,0.0 -0.0028076171875,0.0234375 -0.0028076171875,0.0234375 c 0.0,0.0 0.010498046875,-0.015625 0.010498046875,-0.015625 c 0.0,0.0 0.985595703125,0.0078125 0.985595703125,0.0078125 c 0.0,0.0 0.017578125,-6.015625 0.017578125,-6.015625 c 0.0,0.0 0.104400634766,0.0546875 -0.99560546875,0.0546875 Z" -                android:fillColor="#FFF3511E" /> +                android:pathData="M 1.63623046875,-4.953125 c 0.0,0.0 -1.61499023438,0.0 -1.61499023438,0.0 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 0.00375366210938,-0.015625 0.00375366210938,-0.015625 c 0.0,0.0 0.0118713378906,7.9296875 0.0118713378906,7.9296875 c 0.0,0.0 -0.0040283203125,0.015625 -0.0040283203125,0.015625 c 0.0,0.0 -0.0052490234375,2.0 -0.0052490234375,2.0 c 0.0,0.0 1.61987304688,0.0 1.61987304688,0.0 c 1.10000610352,0.0 2.0,-0.900024414062 2.0,-2.0 c 0.0,0.0 -0.01123046875,-7.9296875 -0.01123046875,-7.9296875 c 0.0,-1.09997558594 -0.899993896484,-2.0 -2.0,-2.0 Z" +                android:fillColor="#FFFFFFFF" +                android:fillAlpha="0" />          </group>          <group -            android:name="lock_left_side" -            android:scaleX="1.33333" -            android:scaleY="1.33333" > +            android:name="lock_left_side" >              <path                  android:name="path_2" -                android:pathData="M 0.0252990722656,-2.96914672852 c 0.0,0.0 -0.00390625,0.0160217285156 -0.00390625,0.0160217285156 c 0.0,0.0 -0.00015258789062,-2.0 -0.00015258789062,-2.0 c 0.0,0.0 0.005615234375,-0.015625 0.005615234375,-0.015625 c -1.10000610352,0.0 -1.01220703125,-0.0546875 -1.01220703125,-0.0546875 c 0.0,0.0 -0.017578125,6.015625 -0.017578125,6.015625 c 0.0,0.0 -0.0777893066406,-0.0078125 1.02221679688,-0.0078125 c 0.0,0.0 -0.005615234375,0.015625 -0.005615234375,0.015625 c 0.0,0.0 -0.002685546875,-0.0244140625 -0.002685546875,-0.0244140625 c 0.0,0.0 0.00390625,-0.0152587890625 0.00390625,-0.0152587890625 c 0.0,0.0 0.0104064941406,-3.92947387695 0.0104064941406,-3.92947387695 Z" -                android:fillColor="#FFF3511E" /> +                android:pathData="M 0.0252990722656,-2.96975708008 c 0.0,0.0 -0.00390625,0.0166320800781 -0.00390625,0.0166320800781 c 0.0,0.0 -0.00015258789062,-2.0 -0.00015258789062,-2.0 c 0.0,0.0 -1.63500976562,0.0 -1.63500976562,0.0 c -1.10000610352,0.0 -2.0,0.900024414062 -2.0,2.0 c 0.0,0.0 0.01123046875,7.9296875 0.01123046875,7.9296875 c 0.0,1.09997558594 0.899993896484,2.0 2.0,2.0 c 0.0,0.0 1.63500976562,0.0 1.63500976562,0.0 c 0.0,0.0 -0.000244140625,-2.0009765625 -0.000244140625,-2.0009765625 c 0.0,0.0 0.00390625,-0.015869140625 0.00390625,-0.015869140625 c 0.0,0.0 -0.0108337402344,-7.92947387695 -0.0108337402344,-7.92947387695 Z" +                android:fillColor="#FFFFFFFF" +                android:fillAlpha="0" />          </group>          <group              android:name="lock_top" @@ -69,16 +56,48 @@ Copyright (C) 2015 The Android Open Source Project              <path                  android:name="path_3"                  android:pathData="M 5.01239013672,3.390625 c 0.0,-2.76000976562 -2.23999023438,-5.0 -5.0,-5.0 c -2.76000976562,0.0 -5.0,2.23999023438 -5.0,5.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,-1.71002197266 1.38999938965,-3.09997558594 3.10000610352,-3.09997558594 c 1.71000671387,0.0 3.10000610352,1.38995361328 3.10000610352,3.09997558594 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,0.0 0.0,-2.0 0.0,-2.0 Z" -                android:fillColor="#FFF3511E" /> +                android:fillColor="#FFFFFFFF" />          </group> +    </group> +    <group +        android:name="errorexclamationdot" +        android:translateX="12" +        android:translateY="12" >          <group -            android:name="exclamation_dot" -            android:translateX="-0.00391" -            android:translateY="5.333" > +            android:name="exclamationbottom" +            android:translateY="4" >              <path -                android:name="rectangle_path_1" -                android:fillColor="#FFF3511E" -                android:pathData="M -1.33871,-1.3335 l 2.67742,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,2.667 c 0.0,0.0 0.0,0.0 0.0,0.0 l -2.67742,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,-2.667 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" /> +                android:name="bottompath" +                android:fillColor="#FFFFFFFF" +                android:pathData="M 0.0,-1.1 l 0.0,0.0 c 0.60751322478,0.0 1.1,0.49248677522 1.1,1.1 l 0.0,0.0 c 0.0,0.60751322478 -0.49248677522,1.1 -1.1,1.1 l 0.0,0.0 c -0.60751322478,0.0 -1.1,-0.49248677522 -1.1,-1.1 l 0.0,0.0 c 0.0,-0.60751322478 0.49248677522,-1.1 1.1,-1.1 Z" /> +        </group> +    </group> +    <group +        android:name="errorexclamation" +        android:translateX="12" +        android:translateY="12" > +        <group +            android:name="exclamationtop" +            android:translateY="-2" > +            <path +                android:name="toppath" +                android:fillColor="#FFFFFFFF" +                android:pathData="M 0.0,-3.0 l 0.0,0.0 c 0.5522847498,0.0 1.0,0.4477152502 1.0,1.0 l 0.0,4.0 c 0.0,0.5522847498 -0.4477152502,1.0 -1.0,1.0 l 0.0,0.0 c -0.5522847498,0.0 -1.0,-0.4477152502 -1.0,-1.0 l 0.0,-4.0 c 0.0,-0.5522847498 0.4477152502,-1.0 1.0,-1.0 Z" /> +        </group> +    </group> +    <group +        android:name="errorcircle" +        android:translateX="12" +        android:translateY="12" +        android:rotation="5" > +        <group +            android:name="circle" > +            <path +                android:name="circlepath" +                android:strokeColor="#FFFFFFFF" +                android:strokeWidth="2" +                android:strokeLineCap="round" +                android:pathData="M 0.0,-9.0 c 4.9705627482,0.0 9.0,4.0294372518 9.0,9.0 c 0.0,4.9705627482 -4.0294372518,9.0 -9.0,9.0 c -4.9705627482,0.0 -9.0,-4.0294372518 -9.0,-9.0 c 0.0,-4.9705627482 4.0294372518,-9.0 9.0,-9.0 Z" />          </group>      </group>  </vector> diff --git a/packages/SystemUI/res/drawable/error_to_trustedstate_animation.xml b/packages/SystemUI/res/drawable/error_to_trustedstate_animation.xml index 6befe13a1a1a..a494f1d9e7ee 100755 --- a/packages/SystemUI/res/drawable/error_to_trustedstate_animation.xml +++ b/packages/SystemUI/res/drawable/error_to_trustedstate_animation.xml @@ -1,6 +1,6 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -Copyright (C) 2015 The Android Open Source Project +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. @@ -21,18 +21,9 @@ Copyright (C) 2015 The Android Open Source Project          android:name="ellipse_path_1"          android:animation="@anim/error_to_trustedstate_ellipse_path_1_animation" />      <target -        android:name="ellipse_path_2" -        android:animation="@anim/error_to_trustedstate_ellipse_path_2_animation" /> -    <target -        android:name="lock_right_side" -        android:animation="@anim/error_to_trustedstate_lock_right_side_animation" /> -    <target          android:name="path_1"          android:animation="@anim/error_to_trustedstate_path_1_animation" />      <target -        android:name="lock_left_side" -        android:animation="@anim/error_to_trustedstate_lock_left_side_animation" /> -    <target          android:name="path_2"          android:animation="@anim/error_to_trustedstate_path_2_animation" />      <target @@ -42,9 +33,21 @@ Copyright (C) 2015 The Android Open Source Project          android:name="path_3"          android:animation="@anim/error_to_trustedstate_path_3_animation" />      <target -        android:name="exclamation_dot" -        android:animation="@anim/error_to_trustedstate_exclamation_dot_animation" /> +        android:name="errorexclamationdot" +        android:animation="@anim/error_to_trustedstate_errorexclamationdot_animation" /> +    <target +        android:name="bottompath" +        android:animation="@anim/error_to_trustedstate_bottompath_animation" /> +    <target +        android:name="exclamationtop" +        android:animation="@anim/error_to_trustedstate_exclamationtop_animation" /> +    <target +        android:name="toppath" +        android:animation="@anim/error_to_trustedstate_toppath_animation" /> +    <target +        android:name="errorcircle" +        android:animation="@anim/error_to_trustedstate_errorcircle_animation" />      <target -        android:name="rectangle_path_1" -        android:animation="@anim/error_to_trustedstate_rectangle_path_1_animation" /> +        android:name="circlepath" +        android:animation="@anim/error_to_trustedstate_circlepath_animation" />  </animated-vector> diff --git a/packages/SystemUI/res/drawable/ic_bluetooth_transient.xml b/packages/SystemUI/res/drawable/ic_bluetooth_transient.xml index 76026af392ec..33d1fb3fbe2b 100644 --- a/packages/SystemUI/res/drawable/ic_bluetooth_transient.xml +++ b/packages/SystemUI/res/drawable/ic_bluetooth_transient.xml @@ -1,4 +1,18 @@  <?xml version="1.0" encoding="utf-8"?> +<!-- 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. +-->  <vector      xmlns:android="http://schemas.android.com/apk/res/android"      android:name="ic_bluetooth_transient" @@ -7,89 +21,54 @@      android:height="48dp"      android:viewportHeight="48" >      <group -        android:name="ic_signal_wifi_4_bar_48px_outlines_" -        android:translateX="21.9995" -        android:translateY="25.73401" > +        android:name="ic_bluetooth_transient_0" +        android:translateX="23.99883" +        android:translateY="23.99839" >          <group -            android:name="ic_signal_wifi_4_bar_48px_outlines__pivot" -            android:translateX="-23.21545" -            android:translateY="-18.86649" > +            android:name="ic_bluetooth_transient_pivot" +            android:translateX="-23.99883" +            android:translateY="-23.99839" >              <group -                android:name="bluetooth" -                android:translateX="22.08789" -                android:translateY="18.72031" > +                android:name="ic_bluetooth_white_outlines" +                android:translateX="22.73986" +                android:translateY="23.99839" >                  <group -                    android:name="bluetooth_pivot" -                    android:translateX="-22.08789" -                    android:translateY="-18.72031" > -                    <group -                        android:name="cross" -                        android:rotation="-1.88453" > -                        <path -                            android:name="extented_cross" -                            android:pathData="M 10.6188659668,6.56344604492 c 0.0,0.0 21.7386016846,23.1297454834 21.7386016846,23.1297454834" -                            android:strokeColor="#FFFFFFFF" -                            android:strokeWidth="4" /> -                    </group> -                    <group -                        android:name="bluetooth_0" -                        android:translateX="23.38789" -                        android:translateY="18.72031" > -                        <path -                            android:name="b_shape_merged" -                            android:pathData="M 11.3999938965,-8.60000610352 c 0.0,0.0 -11.3999938965,-11.3999938965 -11.3999938965,-11.3999938965 c 0.0,0.0 -2.0,0.0 -2.0,0.0 c 0.0,0.0 0.0,15.1999969482 0.0,15.1999969482 c 0.0,0.0 -9.19999694824,-9.19999694824 -9.19999694824,-9.19999694824 c 0.0,0.0 -2.80000305176,2.80000305176 -2.80000305176,2.80000305176 c 0.0,0.0 11.1999969482,11.1999969482 11.1999969482,11.1999969482 c 0.0,0.0 -11.1999969482,11.1999969482 -11.1999969482,11.1999969482 c 0.0,0.0 2.80000305176,2.80000305176 2.80000305176,2.80000305176 c 0.0,0.0 9.19999694824,-9.19999694824 9.19999694824,-9.19999694824 c 0.0,0.0 0.0,15.1999969482 0.0,15.1999969482 c 0.0,0.0 2.0,0.0 2.0,0.0 c 0.0,0.0 11.3999938965,-11.3999938965 11.3999938965,-11.3999938965 c 0.0,0.0 -8.59999084473,-8.60000610352 -8.59999084473,-8.60000610352 c 0.0,0.0 8.59999084473,-8.60000610352 8.59999084473,-8.60000610352 Z M 2.0,-12.3000030518 c 0.0,0.0 3.80000305176,3.80000305176 3.80000305176,3.80000305176 c 0.0,0.0 -3.80000305176,3.69999694824 -3.80000305176,3.69999694824 c 0.0,0.0 0.0,-7.5 0.0,-7.5 Z M 5.80000305176,8.60000610352 c 0.0,0.0 -3.80000305176,3.69999694824 -3.80000305176,3.69999694824 c 0.0,0.0 0.0,-7.5 0.0,-7.5 c 0.0,0.0 3.80000305176,3.80000305176 3.80000305176,3.80000305176 Z" -                            android:fillColor="#FFFFFFFF" /> -                    </group> +                    android:name="ic_bluetooth_white_outlines_pivot" +                    android:translateX="-12.84937" +                    android:translateY="-20.4772" > +                    <path +                        android:name="b_shape_merged" +                        android:pathData="M 17.1289978027,20.4790039062 c 0.0,0.0 7.5,-7.48100280762 7.5,-7.48100280762 c 0.81999206543,-0.819000244141 0.81999206543,-2.13899230957 0.0,-2.95999145508 c 0.0,0.0 -8.93899536133,-8.93899536133 -8.93899536133,-8.93899536133 c 0.0,0.0 -0.0610046386719,-0.0610046386719 -0.0610046386718,-0.0610046386719 c -0.844009399414,-0.788009643555 -2.16799926758,-0.74299621582 -2.95600891113,0.102005004883 c -0.359985351562,0.384994506836 -0.561996459961,0.891998291016 -0.56298828125,1.41899108887 c 0.0,0.0 0.0,12.8800048828 0.0,12.8800048828 c 0.0,0.0 -8.10000610352,-8.10000610352 -8.10000610352,-8.10000610352 c -0.81999206543,-0.81999206543 -2.12100219727,-0.81999206543 -2.9409942627,0.0 c -0.819000244141,0.819000244141 -0.819000244141,2.12001037598 0.0,2.94000244141 c 0.0,0.0 10.1799926758,10.1999969482 10.1799926758,10.1999969482 c 0.0,0.0 -10.1799926758,10.1790008545 -10.1799926758,10.1790008545 c -0.819000244141,0.820999145508 -0.819000244141,2.12100219727 0.0,2.94100952148 c 0.81999206543,0.81999206543 2.12100219727,0.81999206543 2.9409942627,0.0 c 0.0,0.0 8.10000610352,-8.1009979248 8.10000610352,-8.1009979248 c 0.0,0.0 0.0,12.9009857178 0.0,12.9009857178 c 0.0,1.14801025391 0.929992675781,2.08000183105 2.08000183105,2.08000183105 c 0.526992797852,0.0 1.03399658203,-0.199996948242 1.41999816895,-0.559997558594 c 0.0,0.0 0.0989990234375,-0.100006103516 0.0989990234375,-0.100006103516 c 0.0,0.0 8.91999816895,-8.91999816895 8.91999816895,-8.91999816895 c 0.81999206543,-0.820999145508 0.81999206543,-2.13999938965 0.0,-2.95999145508 c 0.0,0.0 -7.5,-7.46000671387 -7.5,-7.46000671387 Z M 16.0899963379,15.8190002441 c 0.0,0.0 0.0,-8.59999084473 0.0,-8.59999084473 c 0.0,0.0 4.30000305176,4.30000305176 4.30000305176,4.30000305176 c 0.0,0.0 -4.30000305176,4.29998779297 -4.30000305176,4.29998779297 Z M 16.0899963379,33.7190093994 c 0.0,0.0 0.0,-8.6009979248 0.0,-8.6009979248 c 0.0,0.0 4.30000305176,4.30099487305 4.30000305176,4.30099487305 c 0.0,0.0 -4.30000305176,4.30000305176 -4.30000305176,4.30000305176 Z" +                        android:fillColor="#FFFFFFFF" />                  </group>              </group>              <group -                android:name="dot_left" -                android:translateX="20.16992" -                android:translateY="18.64258" > +                android:name="dot_left_outlines" +                android:translateX="20.6501" +                android:translateY="24.00011" >                  <group -                    android:name="dot_left_pivot" -                    android:translateX="-20.16992" -                    android:translateY="-18.64258" > -                    <group -                        android:name="group_1" -                        android:translateX="9.38789" -                        android:translateY="18.72031" > -                        <group -                            android:name="group_1_pivot" -                            android:translateX="-9.38789" -                            android:translateY="-18.72031" > -                            <path -                                android:name="dot_left_0" -                                android:pathData="M 13.3878936768,18.7203063965 c 0.0,0.0 -4.0,-4.0 -4.0,-4.0 c 0.0,0.0 -4.0,4.0 -4.0,4.0 c 0.0,0.0 4.0,4.0 4.0,4.0 c 0.0,0.0 4.0,-4.0 4.0,-4.0 Z" -                                android:fillColor="#FFFFFFFF" /> -                        </group> -                    </group> +                    android:name="dot_left_outlines_pivot" +                    android:translateX="-14.2" +                    android:translateY="-3.55" > +                    <path +                        android:name="dot_left" +                        android:pathData="M 5.66999816895,5.66999816895 c -1.18000793457,1.17999267578 -3.08000183105,1.17999267578 -4.24000549316,0.0 c -1.17999267578,-1.16000366211 -1.17999267578,-3.03999328613 -0.0199890136719,-4.2200012207 c 0.0,0.0 0.0199890136719,-0.0200042724609 0.0199890136719,-0.0200042724609 c 1.16000366211,-1.17999267578 3.04000854492,-1.17999267578 4.2200012207,-0.0199890136719 c 0.0,0.0 0.0200042724609,0.0199890136719 0.0200042724609,0.0199890136719 c 1.17999267578,1.17900085449 1.17999267578,3.06001281738 0.0,4.24000549316 Z" +                        android:fillColor="#FFFFFFFF" +                        android:fillAlpha="0.5" />                  </group>              </group>              <group -                android:name="dot_right" -                android:translateX="26.16094" -                android:translateY="18.60898" > +                android:name="dot_right_outlines" +                android:translateX="27.3501" +                android:translateY="23.99741" >                  <group -                    android:name="dot_right_pivot" -                    android:translateX="-26.16094" -                    android:translateY="-18.60898" > -                    <group -                        android:name="group_2" -                        android:translateX="37.38789" -                        android:translateY="18.72031" -                        android:scaleX="0" -                        android:scaleY="0" > -                        <group -                            android:name="group_1_pivot_0" -                            android:translateX="-37.38789" -                            android:translateY="-18.72031" > -                            <path -                                android:name="dot_right_0" -                                android:pathData="M 37.3878936768,14.7203063965 c 0.0,0.0 -4.0,4.0 -4.0,4.0 c 0.0,0.0 4.0,4.0 4.0,4.0 c 0.0,0.0 4.0,-4.0 4.0,-4.0 c 0.0,0.0 -4.0,-4.0 -4.0,-4.0 Z" -                                android:fillColor="#FFFFFFFF" /> -                        </group> -                    </group> +                    android:name="dot_right_outlines_pivot" +                    android:translateX="7.1" +                    android:translateY="-3.5525" > +                    <path +                        android:name="dot_right" +                        android:pathData="M 5.66999816895,1.43499755859 c 1.17999267578,1.18000793457 1.17999267578,3.08000183105 0.0,4.24000549316 c -1.18000793457,1.17999267578 -3.08000183105,1.17999267578 -4.24000549316,0.0 c -1.17999267578,-1.16000366211 -1.17999267578,-3.04000854492 -0.0200042724609,-4.21899414062 c 0.0,0.0 0.0200042724609,-0.0210113525391 0.0200042724609,-0.0210113525391 c 1.15299987793,-1.17098999023 3.03799438477,-1.18499755859 4.20899963379,-0.0309906005859 c 0.0,0.0 0.031005859375,0.0309906005859 0.031005859375,0.0309906005859 Z" +                        android:fillColor="#FFFFFFFF" />                  </group>              </group>          </group> diff --git a/packages/SystemUI/res/drawable/ic_bluetooth_transient_animation.xml b/packages/SystemUI/res/drawable/ic_bluetooth_transient_animation.xml index f7eb23c1c89d..dc3c3e24c68a 100644 --- a/packages/SystemUI/res/drawable/ic_bluetooth_transient_animation.xml +++ b/packages/SystemUI/res/drawable/ic_bluetooth_transient_animation.xml @@ -1,11 +1,25 @@  <?xml version="1.0" encoding="utf-8"?> +<!-- 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. +-->  <animated-vector      xmlns:android="http://schemas.android.com/apk/res/android"      android:drawable="@drawable/ic_bluetooth_transient" >      <target -        android:name="group_1" -        android:animation="@anim/ic_bluetooth_transient_group_1_animation" /> +        android:name="dot_left" +        android:animation="@anim/ic_bluetooth_transient_dot_left_animation" />      <target -        android:name="group_2" -        android:animation="@anim/ic_bluetooth_transient_group_2_animation" /> +        android:name="dot_right" +        android:animation="@anim/ic_bluetooth_transient_dot_right_animation" />  </animated-vector> diff --git a/packages/SystemUI/res/drawable/ic_hotspot_transient.xml b/packages/SystemUI/res/drawable/ic_hotspot_transient.xml index 8c1f7ea79c44..22f72675ffc0 100644 --- a/packages/SystemUI/res/drawable/ic_hotspot_transient.xml +++ b/packages/SystemUI/res/drawable/ic_hotspot_transient.xml @@ -1,4 +1,19 @@  <?xml version="1.0" encoding="utf-8"?> +<!-- +    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. +-->  <vector      xmlns:android="http://schemas.android.com/apk/res/android"      android:name="ic_hotspot_transient" @@ -7,42 +22,53 @@      android:height="48dp"      android:viewportHeight="48" >      <group -        android:name="ic_hotspot" -        android:translateX="23.97354" -        android:translateY="24.26306" > +        android:name="ic_hotspot_transient_0" +        android:translateX="24.00209" +        android:translateY="24.2354" >          <group -            android:name="ic_hotspot_pivot" -            android:translateX="-23.21545" -            android:translateY="-18.86649" > +            android:name="ic_hotspot_transient_pivot" +            android:translateX="-24.00209" +            android:translateY="-24.2354" >              <group -                android:name="hotspot" -                android:translateX="23.481" -                android:translateY="18.71151" > +                android:name="circle01" +                android:translateX="24.0002" +                android:translateY="25.9996" >                  <group -                    android:name="circles" -                    android:translateX="-0.23909" -                    android:translateY="-0.10807" > -                    <group -                        android:name="group_3" > -                        <path -                            android:name="circle_3" -                            android:pathData="M -0.154739379883,-3.04708862305 c -2.30102539062,0.0 -4.16702270508,1.86602783203 -4.16702270508,4.16702270508 c 0.0,2.29898071289 1.86599731445,4.16598510742 4.16702270508,4.16598510742 c 2.29998779297,0.0 4.16598510742,-1.86700439453 4.16598510742,-4.16598510742 c 0.0,-2.30099487305 -1.86599731445,-4.16702270508 -4.16598510742,-4.16702270508 Z" -                            android:fillColor="#FFFFFFFF" /> -                    </group> -                    <group -                        android:name="group_1" > -                        <path -                            android:name="circle_2" -                            android:pathData="M 10.8794403076,5.72583007812 c 0.0,0.0 0.0009765625,0.00100708007812 0.0009765625,0.00100708007812 c 0.14501953125,-0.356994628906 0.27099609375,-0.725006103516 0.382995605469,-1.09799194336 c 0.0570068359375,-0.195007324219 0.101013183594,-0.394989013672 0.149017333984,-0.595001220703 c 0.0690002441406,-0.281005859375 0.126983642578,-0.563995361328 0.175994873047,-0.851989746094 c 0.0270080566406,-0.169006347656 0.0559997558594,-0.337005615234 0.0759887695312,-0.509002685547 c 0.0580139160156,-0.468017578125 0.0970153808594,-0.942993164062 0.0970153808594,-1.4280090332 c 0.0,0.0 0.0,-0.00100708007812 0.0,-0.00100708007813 c 0.0,-5.03900146484 -3.11099243164,-9.3450012207 -7.5119934082,-11.1229858398 c -0.00601196289062,-0.00299072265625 -0.0130004882812,-0.0050048828125 -0.0190124511719,-0.00701904296875 c -0.686004638672,-0.275970458984 -1.39999389648,-0.492980957031 -2.14099121094,-0.638977050781 c -0.072998046875,-0.0150146484375 -0.149017333984,-0.02099609375 -0.222991943359,-0.0339965820312 c -0.302001953125,-0.0540161132812 -0.605010986328,-0.106018066406 -0.916015625,-0.136016845703 c -0.389984130859,-0.0390014648438 -0.786987304688,-0.0599975585938 -1.18899536133,-0.0599975585937 c -0.402008056641,0.0 -0.799011230469,0.02099609375 -1.19000244141,0.0599975585937 c -0.304992675781,0.0299987792969 -0.602996826172,0.0809936523438 -0.901000976563,0.132995605469 c -0.0790100097656,0.0150146484375 -0.160003662109,0.02099609375 -0.238006591797,0.0370178222656 c -0.368988037109,0.0719909667969 -0.730987548828,0.164001464844 -1.08700561523,0.269989013672 c -0.00299072265625,0.00100708007812 -0.0059814453125,0.00201416015625 -0.00900268554687,0.0020141601562 c -0.351989746094,0.10498046875 -0.694000244141,0.226989746094 -1.0309753418,0.361999511719 c -0.0110168457031,0.00399780273438 -0.0220031738281,0.00698852539062 -0.0320129394531,0.0119934082031 c -4.40200805664,1.77798461914 -7.51098632812,6.083984375 -7.5119934082,11.1229858398 c 0.0,0.00799560546875 0.00198364257812,0.0160217285156 0.0019836425781,0.0240173339844 c 0.00100708007812,0.475006103516 0.0380249023438,0.940002441406 0.0950012207032,1.39898681641 c 0.02001953125,0.175994873047 0.0490112304688,0.348999023438 0.0780029296875,0.523010253906 c 0.0469970703125,0.281982421875 0.105010986328,0.557983398438 0.171997070312,0.833984375 c 0.0480041503906,0.204010009766 0.093017578125,0.410003662109 0.152008056641,0.610015869141 c 0.110992431641,0.372009277344 0.238006591797,0.736999511719 0.382019042969,1.09298706055 c 0.0,0.0 0.0009765625,0.0 0.0009765625,0.0 c 1.00701904297,2.48400878906 2.81301879883,4.56100463867 5.11001586914,5.89501953125 c 0.0,0.0 2.01599121094,-3.48300170898 2.01599121094,-3.48300170898 c -2.03900146484,-1.18402099609 -3.5119934082,-3.22500610352 -3.89898681641,-5.63900756836 c 0.0,0.0 0.0009765625,-0.00100708007812 0.0009765625,-0.00100708007813 c -0.0220031738281,-0.130981445312 -0.0369873046875,-0.265991210938 -0.052978515625,-0.399993896484 c -0.0290222167969,-0.274993896484 -0.0570068359375,-0.552001953125 -0.0570068359375,-0.834991455078 c 0.0,0.0 0.0,-0.0190124511719 0.0,-0.0190124511719 c 0.0,-3.98999023438 2.92498779297,-7.28900146484 6.74398803711,-7.89199829102 c 0.0,0.0 0.0180053710938,0.0169982910156 0.0180053710938,0.0169982910156 c 0.404998779297,-0.0639953613281 0.81298828125,-0.125 1.23599243164,-0.125 c 0.0,0.0 0.00201416015625,0.0 0.00201416015625,0.0 c 0.0,0.0 0.00299072265625,0.0 0.00299072265625,0.0 c 0.423004150391,0.0 0.830017089844,0.0610046386719 1.23501586914,0.125 c 0.0,0.0 0.0169982910156,-0.0180053710938 0.0169982910156,-0.0180053710938 c 3.81997680664,0.60400390625 6.74499511719,3.90301513672 6.74499511719,7.89199829102 c 0.0,0.292999267578 -0.0280151367188,0.578002929688 -0.0589904785156,0.861999511719 c -0.0150146484375,0.132019042969 -0.0290222167969,0.264007568359 -0.051025390625,0.393005371094 c -0.385986328125,2.41500854492 -1.85897827148,4.45599365234 -3.89797973633,5.64001464844 c 0.0,0.0 2.01599121094,3.48300170898 2.01599121094,3.48300170898 c 2.29699707031,-1.33401489258 4.10299682617,-3.41101074219 5.11001586914,-5.89602661133 Z" -                            android:fillColor="#FFFFFFFF" /> -                    </group> -                    <group -                        android:name="group_2" > -                        <path -                            android:name="circle_1" -                            android:pathData="M 19.6909332275,2.8489074707 c 0.0059814453125,-0.0659790039062 0.0159912109375,-0.130981445312 0.02099609375,-0.196990966797 c 0.031982421875,-0.462005615234 0.0479736328125,-0.928009033203 0.0489807128906,-1.39700317383 c 0.0,0.0 0.0,-0.00997924804688 0.0,-0.00997924804687 c 0.0,0.0 0.0,-0.00100708007812 0.0,-0.00100708007813 c 0.0,-7.22500610352 -3.84399414062,-13.5360107422 -9.58599853516,-17.0500183105 c -1.06500244141,-0.652984619141 -2.19299316406,-1.20599365234 -3.37799072266,-1.65197753906 c -0.157989501953,-0.0599975585938 -0.317016601562,-0.118011474609 -0.476989746094,-0.174011230469 c -0.317016601562,-0.110992431641 -0.634002685547,-0.218994140625 -0.9580078125,-0.31298828125 c -0.470001220703,-0.139007568359 -0.944000244141,-0.264007568359 -1.4280090332,-0.368011474609 c -0.186004638672,-0.0390014648438 -0.376983642578,-0.0669860839844 -0.565002441406,-0.101013183594 c -0.414001464844,-0.0759887695312 -0.832000732422,-0.140991210938 -1.25500488281,-0.190979003906 c -0.184997558594,-0.0220031738281 -0.369995117188,-0.0429992675781 -0.556976318359,-0.0599975585937 c -0.592010498047,-0.0530090332031 -1.18801879883,-0.0899963378906 -1.79602050781,-0.0899963378907 c -0.605987548828,0.0 -1.20300292969,0.0369873046875 -1.79598999023,0.0899963378907 c -0.186004638672,0.0169982910156 -0.371002197266,0.0379943847656 -0.555999755859,0.0599975585937 c -0.423004150391,0.0499877929688 -0.842010498047,0.114990234375 -1.25601196289,0.190979003906 c -0.18798828125,0.0350036621094 -0.377990722656,0.06201171875 -0.563995361328,0.101013183594 c -0.483001708984,0.10400390625 -0.959991455078,0.22900390625 -1.42999267578,0.368011474609 c -0.321990966797,0.093994140625 -0.638000488281,0.201995849609 -0.953002929688,0.311981201172 c -0.162994384766,0.0570068359375 -0.324005126953,0.115997314453 -0.484985351562,0.177001953125 c -1.18099975586,0.445007324219 -2.30599975586,0.997009277344 -3.36801147461,1.64700317383 c -0.00201416015625,0.00100708007812 -0.00399780273438,0.00201416015625 -0.0060119628907,0.0029907226562 c -5.74099731445,3.51400756836 -9.58499145508,9.82501220703 -9.58599853516,17.0500183105 c 0.0,0.0 0.0,0.00100708007812 0.0,0.00100708007813 c 0.0,0.0059814453125 0.00100708007812,0.0130004882812 0.0010070800781,0.0199890136719 c 0.0,0.466003417969 0.0169982910156,0.928009033203 0.0490112304688,1.38598632813 c 0.0050048828125,0.0690002441406 0.0159912109375,0.136016845703 0.02099609375,0.206024169922 c 0.031982421875,0.401000976562 0.0719909667969,0.799987792969 0.127990722656,1.19400024414 c 0.00201416015625,0.0189819335938 0.00701904296875,0.0369873046875 0.010009765625,0.0569763183594 c 0.888000488281,6.17202758789 4.59799194336,11.4250183105 9.7799987793,14.4309997559 c 0.0,0.0 2.00198364258,-3.458984375 2.00198364258,-3.458984375 c -2.58599853516,-1.5 -4.708984375,-3.70401000977 -6.11697387695,-6.34399414063 c 0.0,0.0 0.0169982910156,-0.0180053710938 0.0169982910156,-0.0180053710938 c -0.890014648438,-1.67098999023 -1.50601196289,-3.5110168457 -1.76000976563,-5.46499633789 c -0.00698852539062,-0.0500183105469 -0.010009765625,-0.102020263672 -0.0159912109375,-0.152008056641 c -0.0330200195312,-0.273010253906 -0.0610046386719,-0.545989990234 -0.0800170898437,-0.821990966797 c -0.0220031738281,-0.343017578125 -0.0350036621094,-0.68701171875 -0.0350036621094,-1.03500366211 c 0.0,-6.53701782227 3.92599487305,-12.1480102539 9.54299926758,-14.6310119629 c 0.157012939453,-0.0700073242188 0.313995361328,-0.135986328125 0.472015380859,-0.199981689453 c 0.373992919922,-0.151000976562 0.751983642578,-0.294006347656 1.13900756836,-0.417022705078 c 0.108978271484,-0.0350036621094 0.221984863281,-0.0619812011719 0.332000732422,-0.0950012207031 c 0.349975585938,-0.102996826172 0.705993652344,-0.194976806641 1.06597900391,-0.273986816406 c 0.114013671875,-0.0249938964844 0.227996826172,-0.052001953125 0.342010498047,-0.0750122070313 c 0.440002441406,-0.0869750976562 0.885986328125,-0.154998779297 1.33700561523,-0.203979492188 c 0.10400390625,-0.0120239257812 0.209991455078,-0.02001953125 0.315002441406,-0.0299987792969 c 0.47998046875,-0.0429992675781 0.963989257812,-0.072998046875 1.45397949219,-0.072998046875 c 0.492004394531,0.0 0.975006103516,0.0299987792969 1.45401000977,0.072998046875 c 0.105987548828,0.00997924804688 0.212005615234,0.0179748535156 0.316986083984,0.0299987792969 c 0.450012207031,0.0489807128906 0.89501953125,0.117004394531 1.33502197266,0.203002929688 c 0.115997314453,0.0239868164062 0.22998046875,0.0509948730469 0.345001220703,0.0769958496094 c 0.358001708984,0.0780029296875 0.710998535156,0.169982910156 1.06097412109,0.272003173828 c 0.111022949219,0.0329895019531 0.226013183594,0.0609741210938 0.336029052734,0.0969848632813 c 0.385986328125,0.123016357422 0.761993408203,0.265014648438 1.13497924805,0.415008544922 c 0.160003662109,0.0650024414062 0.319000244141,0.131988525391 0.477020263672,0.201995849609 c 5.61599731445,2.48400878906 9.53997802734,8.09399414062 9.53997802734,14.6310119629 c 0.0,0.346984863281 -0.0130004882812,0.690979003906 -0.0350036621094,1.03399658203 c -0.0179748535156,0.274993896484 -0.0469970703125,0.548004150391 -0.0789794921875,0.819000244141 c -0.00601196289062,0.052001953125 -0.010009765625,0.10498046875 -0.0160217285156,0.154998779297 c -0.252990722656,1.95498657227 -0.871002197266,3.79400634766 -1.75997924805,5.46499633789 c 0.0,0.0 0.0169982910156,0.0180053710938 0.0169982910156,0.0180053710938 c -1.40802001953,2.63998413086 -3.53100585938,4.84399414062 -6.11700439453,6.34399414063 c 0.0,0.0 2.00198364258,3.458984375 2.00198364258,3.458984375 c 5.18402099609,-3.00698852539 8.89501953125,-8.26300048828 9.78100585937,-14.4379882813 c 0.00201416015625,-0.0169982910156 0.00601196289062,-0.0320129394531 0.0079956054688,-0.0490112304688 c 0.0570068359375,-0.39697265625 0.0970153808594,-0.798980712891 0.129028320312,-1.20300292969 Z" -                            android:fillColor="#FFFFFFFF" /> -                    </group> +                    android:name="circle01_pivot" +                    android:translateX="-24.0002" +                    android:translateY="-25.9996" > +                    <path +                        android:name="circle01_0" +                        android:pathData="M 24.0001983643,21.9996032715 c -2.19999694824,0.0 -4.0,1.80000305176 -4.0,4.0 c 0.0,2.20100402832 1.80000305176,4.0 4.0,4.0 c 2.19999694824,0.0 4.0,-1.79899597168 4.0,-4.0 c 0.0,-2.19999694824 -1.80000305176,-4.0 -4.0,-4.0 Z" +                        android:fillColor="#FFFFFFFF" /> +                </group> +            </group> +            <group +                android:name="circle02" +                android:translateX="24.00071" +                android:translateY="24.74686" > +                <group +                    android:name="circle02_pivot" +                    android:translateX="-24.00071" +                    android:translateY="-24.74686" > +                    <path +                        android:name="circle02_0" +                        android:pathData="M 36.0001983643,25.9996032715 c -0.00299072265625,-6.62699890137 -5.37899780273,-11.9969940186 -12.0059967041,-11.9940032959 c -0.5,0.0 -0.999008178711,0.031005859375 -1.4940032959,0.0940093994141 c -5.24000549316,0.640991210938 -9.55999755859,4.81999206543 -10.3600006104,10.0399932861 c -0.639999389648,4.2799987793 0.979995727539,8.22099304199 3.83999633789,10.7799987793 c 0.960006713867,0.86100769043 2.48001098633,0.660003662109 3.1190032959,-0.460006713867 c 0.481002807617,-0.839996337891 0.281005859375,-1.87998962402 -0.438995361328,-2.51899719238 c -2.21299743652,-1.97099304199 -3.15200805664,-5.00500488281 -2.44000244141,-7.8809967041 c 0.695007324219,-2.86999511719 2.93099975586,-5.11500549316 5.79899597168,-5.81900024414 c 4.29100036621,-1.08599853516 8.65000915527,1.51100158691 9.73600769043,5.80200195312 c 0.162002563477,0.639999389648 0.244003295898,1.29699707031 0.244995117188,1.95700073242 c 0.0,2.36099243164 -1.02000427246,4.45999145508 -2.66000366211,5.91999816895 c -0.720001220703,0.660003662109 -0.939987182617,1.69999694824 -0.459991455078,2.53999328613 c 0.619995117188,1.08000183105 2.08000183105,1.38000488281 3.0,0.560012817383 c 2.61599731445,-2.26699829102 4.1190032959,-5.55801391602 4.11999511719,-9.02000427246 Z" +                        android:fillColor="#FFFFFFFF" /> +                </group> +            </group> +            <group +                android:name="circle03" +                android:translateX="24.00209" +                android:translateY="24.23539" > +                <group +                    android:name="circle03_pivot" +                    android:translateX="-24.00209" +                    android:translateY="-24.23539" > +                    <path +                        android:name="circle03_0" +                        android:pathData="M 21.6602020264,6.13960266113 c -9.24000549316,1.03999328613 -16.6999969482,8.66000366211 -17.5599975586,17.9199981689 c -0.690002441406,7.00500488281 2.36599731445,13.8540039062 8.03999328613,18.0200042725 c 0.958999633789,0.700988769531 2.32000732422,0.401000976562 2.91900634766,-0.620010375977 c 0.5,-0.860000610352 0.280990600586,-1.97898864746 -0.518997192383,-2.57998657227 c -4.56001281738,-3.38000488281 -7.30000305176,-9.09901428223 -6.32000732422,-15.3990020752 c 1.08000183105,-7.0 6.91900634766,-12.5800018311 13.9600067139,-13.3610076904 c 9.63999938965,-1.09999084473 17.8199920654,6.44000244141 17.8199920654,15.8800048828 c 0.0,5.30000305176 -2.57998657227,9.95999145508 -6.53999328613,12.8800048828 c -0.800003051758,0.600997924805 -1.02000427246,1.69999694824 -0.520004272461,2.57998657227 c 0.600006103516,1.04000854492 1.96000671387,1.32099914551 2.91999816895,0.620010375977 c 5.12100219727,-3.75500488281 8.14500427246,-9.72799682617 8.13999938965,-16.0800018311 c 0.0,-11.8200073242 -10.2599945068,-21.2400054932 -22.3399963379,-19.8600006104 Z" +                        android:fillColor="#FFFFFFFF" />                  </group>              </group>          </group> diff --git a/packages/SystemUI/res/drawable/ic_hotspot_transient_animation.xml b/packages/SystemUI/res/drawable/ic_hotspot_transient_animation.xml index b2945f187595..929a941164a6 100644 --- a/packages/SystemUI/res/drawable/ic_hotspot_transient_animation.xml +++ b/packages/SystemUI/res/drawable/ic_hotspot_transient_animation.xml @@ -1,14 +1,29 @@  <?xml version="1.0" encoding="utf-8"?> +<!-- +    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. +-->  <animated-vector      xmlns:android="http://schemas.android.com/apk/res/android"      android:drawable="@drawable/ic_hotspot_transient" >      <target -        android:name="circle_3" -        android:animation="@anim/ic_hotspot_transient_circle_3_animation" /> +        android:name="circle01_0" +        android:animation="@anim/ic_hotspot_transient_circle_1_animation" />      <target -        android:name="circle_2" +        android:name="circle02_0"          android:animation="@anim/ic_hotspot_transient_circle_2_animation" />      <target -        android:name="circle_1" -        android:animation="@anim/ic_hotspot_transient_circle_1_animation" /> +        android:name="circle03_0" +        android:animation="@anim/ic_hotspot_transient_circle_3_animation" />  </animated-vector> diff --git a/packages/SystemUI/res/drawable/ic_mic_26dp.xml b/packages/SystemUI/res/drawable/ic_mic_26dp.xml index 83e4ba820b53..15c97b363509 100644 --- a/packages/SystemUI/res/drawable/ic_mic_26dp.xml +++ b/packages/SystemUI/res/drawable/ic_mic_26dp.xml @@ -1,5 +1,5 @@  <!-- -Copyright (C) 2015 The Android Open Source Project +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. @@ -19,6 +19,6 @@ Copyright (C) 2015 The Android Open Source Project          android:viewportWidth="24.0"          android:viewportHeight="24.0">      <path -        android:pathData="M12.000000,14.000000c1.700000,0.000000 3.000000,-1.300000 3.000000,-3.000000l0.000000,-6.000000c0.000000,-1.700000 -1.300000,-3.000000 -3.000000,-3.000000c-1.700000,0.000000 -3.000000,1.300000 -3.000000,3.000000l0.000000,6.000000C9.000000,12.700000 10.300000,14.000000 12.000000,14.000000zM17.299999,11.000000c0.000000,3.000000 -2.500000,5.100000 -5.300000,5.100000c-2.800000,0.000000 -5.300000,-2.100000 -5.300000,-5.100000L5.000000,11.000000c0.000000,3.400000 2.700000,6.200000 6.000000,6.700000L11.000000,21.000000l2.000000,0.000000l0.000000,-3.300000c3.300000,-0.500000 6.000000,-3.300000 6.000000,-6.700000L17.299999,11.000001z" -        android:fillColor="#FF000000"/> +        android:fillColor="#FF000000" +        android:pathData="M12,14c1.66,0 2.99,-1.34 2.99,-3L15,5c0,-1.66 -1.34,-3 -3,-3S9,3.34 9,5v6c0,1.66 1.34,3 3,3zM18.08,11c-0.42,0 -0.77,0.3 -0.83,0.71 -0.37,2.61 -2.72,4.39 -5.25,4.39s-4.88,-1.77 -5.25,-4.39a0.839,0.839 0,0 0,-0.83 -0.71c-0.52,0 -0.92,0.46 -0.85,0.97 0.46,2.96 2.96,5.3 5.93,5.75v2.43c0,0.47 0.38,0.85 0.85,0.85h0.31c0.47,0 0.85,-0.38 0.85,-0.85v-2.43c2.96,-0.43 5.47,-2.78 5.93,-5.75a0.87,0.87 0,0 0,-0.86 -0.97z"/>  </vector> diff --git a/packages/SystemUI/res/drawable/ic_volume_collapse.xml b/packages/SystemUI/res/drawable/ic_volume_collapse.xml index 0f488a4f6112..3853d121ce2c 100644 --- a/packages/SystemUI/res/drawable/ic_volume_collapse.xml +++ b/packages/SystemUI/res/drawable/ic_volume_collapse.xml @@ -1,5 +1,5 @@  <!-- -     Copyright (C) 2015 The Android Open Source Project +     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. @@ -13,51 +13,43 @@       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:name="ic_volume_collapse" +<vector +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:name="ic_caret_down" +    android:width="24dp" +    android:viewportWidth="24"      android:height="24dp"      android:viewportHeight="24" -    android:viewportWidth="24" -    android:width="24dp"      android:tint="?android:attr/colorControlNormal" > -      <group -        android:name="chevron_02" -        android:rotation="90" -        android:translateX="12" -        android:translateY="9" > +        android:name="caret___4" >          <group -            android:name="rectangle_2" -            android:rotation="-45" > +            android:name="right" +            android:translateX="11.287" +            android:translateY="8.701" +            android:rotation="45" >              <group -                android:name="rectangle_2_pivot" -                android:translateY="4" > -                <group -                    android:name="rectangle_path_2_position" -                    android:translateY="-1" > -                    <path -                        android:name="rectangle_path_2" -                        android:fillColor="#FFFFFFFF" -                        android:pathData="M -1.0,-4.0 l 2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l -2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,-8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" /> -                </group> +                android:name="right_pivot" +                android:translateX="4.242" > +                <path +                    android:name="rectangle_path_1" +                    android:fillColor="#FFFFFFFF" +                    android:pathData="M -3.242,-1.0 l 6.484,0.0 c 0.5522847498,0.0 1.0,0.4477152502 1.0,1.0 l 0.0,0.0 c 0.0,0.5522847498 -0.4477152502,1.0 -1.0,1.0 l -6.484,0.0 c -0.5522847498,0.0 -1.0,-0.4477152502 -1.0,-1.0 l 0.0,0.0 c 0.0,-0.5522847498 0.4477152502,-1.0 1.0,-1.0 Z" />              </group>          </group>          <group -            android:name="rectangle_1" -            android:rotation="45" > +            android:name="left" +            android:translateX="12.699" +            android:translateY="8.701" +            android:rotation="-45" >              <group -                android:name="rectangle_1_pivot" -                android:translateY="-4" > -                <group -                    android:name="rectangle_path_1_position" -                    android:translateY="1" > -                    <path -                        android:name="rectangle_path_1" -                        android:fillColor="#FFFFFFFF" -                        android:pathData="M -1.0,-4.0 l 2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l -2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,-8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" /> -                </group> +                android:name="left_pivot" +                android:translateX="-4.242" > +                <path +                    android:name="rectangle_path_2" +                    android:fillColor="#FFFFFFFF" +                    android:pathData="M -3.242,-1.0 l 6.484,0.0 c 0.5522847498,0.0 1.0,0.4477152502 1.0,1.0 l 0.0,0.0 c 0.0,0.5522847498 -0.4477152502,1.0 -1.0,1.0 l -6.484,0.0 c -0.5522847498,0.0 -1.0,-0.4477152502 -1.0,-1.0 l 0.0,0.0 c 0.0,-0.5522847498 0.4477152502,-1.0 1.0,-1.0 Z" />              </group>          </group>      </group> - -</vector>
\ No newline at end of file +</vector> diff --git a/packages/SystemUI/res/drawable/ic_volume_collapse_animation.xml b/packages/SystemUI/res/drawable/ic_volume_collapse_animation.xml index 5c482bc54dbc..18c6307b9ad9 100644 --- a/packages/SystemUI/res/drawable/ic_volume_collapse_animation.xml +++ b/packages/SystemUI/res/drawable/ic_volume_collapse_animation.xml @@ -1,5 +1,5 @@  <!-- -     Copyright (C) 2015 The Android Open Source Project +     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. @@ -13,17 +13,13 @@       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" +<animated-vector +    xmlns:android="http://schemas.android.com/apk/res/android"      android:drawable="@drawable/ic_volume_collapse" > - -    <target -        android:name="chevron_02" -        android:animation="@anim/ic_volume_collapse_chevron_02_animation" />      <target -        android:name="rectangle_2" -        android:animation="@anim/ic_volume_collapse_rectangle_2_animation" /> +        android:name="right" +        android:animation="@anim/ic_caret_down_right_animation" />      <target -        android:name="rectangle_1" -        android:animation="@anim/ic_volume_collapse_rectangle_1_animation" /> - -</animated-vector>
\ No newline at end of file +        android:name="left" +        android:animation="@anim/ic_caret_down_left_animation" /> +</animated-vector> diff --git a/packages/SystemUI/res/drawable/ic_volume_expand.xml b/packages/SystemUI/res/drawable/ic_volume_expand.xml index 70ff1f3c4ee3..79ff80806438 100644 --- a/packages/SystemUI/res/drawable/ic_volume_expand.xml +++ b/packages/SystemUI/res/drawable/ic_volume_expand.xml @@ -1,5 +1,5 @@  <!-- -     Copyright (C) 2015 The Android Open Source Project +     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. @@ -13,51 +13,43 @@       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:name="ic_volume_expand" +<vector +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:name="ic_caret_up" +    android:width="24dp" +    android:viewportWidth="24"      android:height="24dp"      android:viewportHeight="24" -    android:viewportWidth="24" -    android:width="24dp"      android:tint="?android:attr/colorControlNormal" > -      <group -        android:name="chevron_01" -        android:rotation="90" -        android:translateX="12" -        android:translateY="15" > +        android:name="caret___4" >          <group -            android:name="rectangle_3" -            android:rotation="45" > +            android:name="right" +            android:translateX="11.287" +            android:translateY="15.287" +            android:rotation="-45" >              <group -                android:name="rectangle_2_pivot_0" -                android:translateY="4" > -                <group -                    android:name="rectangle_path_3_position" -                    android:translateY="-1" > -                    <path -                        android:name="rectangle_path_3" -                        android:fillColor="#FFFFFFFF" -                        android:pathData="M -1.0,-4.0 l 2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l -2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,-8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" /> -                </group> +                android:name="right_pivot" +                android:translateX="4.242" > +                <path +                    android:name="rectangle_path_1" +                    android:fillColor="#FFFFFFFF" +                    android:pathData="M -3.242,-1.0 l 6.484,0.0 c 0.5522847498,0.0 1.0,0.4477152502 1.0,1.0 l 0.0,0.0 c 0.0,0.5522847498 -0.4477152502,1.0 -1.0,1.0 l -6.484,0.0 c -0.5522847498,0.0 -1.0,-0.4477152502 -1.0,-1.0 l 0.0,0.0 c 0.0,-0.5522847498 0.4477152502,-1.0 1.0,-1.0 Z" />              </group>          </group>          <group -            android:name="rectangle_4" -            android:rotation="-45" > +            android:name="left" +            android:translateX="12.699" +            android:translateY="15.287" +            android:rotation="45" >              <group -                android:name="rectangle_1_pivot_0" -                android:translateY="-4" > -                <group -                    android:name="rectangle_path_4_position" -                    android:translateY="1" > -                    <path -                        android:name="rectangle_path_4" -                        android:fillColor="#FFFFFFFF" -                        android:pathData="M -1.0,-4.0 l 2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l -2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,-8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" /> -                </group> +                android:name="left_pivot" +                android:translateX="-4.242" > +                <path +                    android:name="rectangle_path_2" +                    android:fillColor="#FFFFFFFF" +                    android:pathData="M -3.242,-1.0 l 6.484,0.0 c 0.5522847498,0.0 1.0,0.4477152502 1.0,1.0 l 0.0,0.0 c 0.0,0.5522847498 -0.4477152502,1.0 -1.0,1.0 l -6.484,0.0 c -0.5522847498,0.0 -1.0,-0.4477152502 -1.0,-1.0 l 0.0,0.0 c 0.0,-0.5522847498 0.4477152502,-1.0 1.0,-1.0 Z" />              </group>          </group>      </group> - -</vector>
\ No newline at end of file +</vector> diff --git a/packages/SystemUI/res/drawable/ic_volume_expand_animation.xml b/packages/SystemUI/res/drawable/ic_volume_expand_animation.xml index ae2d7e414815..abd6678e335f 100644 --- a/packages/SystemUI/res/drawable/ic_volume_expand_animation.xml +++ b/packages/SystemUI/res/drawable/ic_volume_expand_animation.xml @@ -1,5 +1,5 @@  <!-- -     Copyright (C) 2015 The Android Open Source Project +     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. @@ -13,17 +13,13 @@       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" +<animated-vector +    xmlns:android="http://schemas.android.com/apk/res/android"      android:drawable="@drawable/ic_volume_expand" > - -    <target -        android:name="chevron_01" -        android:animation="@anim/ic_volume_expand_chevron_01_animation" />      <target -        android:name="rectangle_3" -        android:animation="@anim/ic_volume_expand_rectangle_3_animation" /> +        android:name="right" +        android:animation="@anim/ic_caret_up_right_animation" />      <target -        android:name="rectangle_4" -        android:animation="@anim/ic_volume_expand_rectangle_4_animation" /> - -</animated-vector>
\ No newline at end of file +        android:name="left" +        android:animation="@anim/ic_caret_up_left_animation" /> +</animated-vector> diff --git a/packages/SystemUI/res/drawable/lockscreen_fingerprint_error_state_to_fp.xml b/packages/SystemUI/res/drawable/lockscreen_fingerprint_error_state_to_fp.xml index 3af2f7fbbc3f..f2eca8ced896 100644 --- a/packages/SystemUI/res/drawable/lockscreen_fingerprint_error_state_to_fp.xml +++ b/packages/SystemUI/res/drawable/lockscreen_fingerprint_error_state_to_fp.xml @@ -1,6 +1,6 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -  ~ Copyright (C) 2015 The Android Open Source Project +  ~ 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. @@ -16,27 +16,28 @@    -->  <vector      xmlns:android="http://schemas.android.com/apk/res/android" -    android:name="lockscreen_fingerprint_error_state_to_fp" +    android:name="ic_fingerprint_tofp"      android:width="32dp" -    android:viewportWidth="32" +    android:viewportWidth="24"      android:height="32dp" -    android:viewportHeight="32" > +    android:viewportHeight="24" >      <group -        android:name="white_fingerprint_ridges" -        android:translateX="16.125" -        android:translateY="19.75" -        android:rotation="200.66753" > +        android:name="fingerprintwhite" +        android:translateX="12" +        android:translateY="12.4" +        android:scaleX="0.738" +        android:scaleY="0.738" +        android:rotation="180" >          <group -            android:name="white_fingerprint_ridges_pivot" -            android:translateX="33.2085" -            android:translateY="30.91685" > +            android:name="fingerprintwhite_pivot" +            android:translateX="33" +            android:translateY="34" >              <group                  android:name="ridge_5" >                  <path                      android:name="ridge_5_path"                      android:pathData="M -25.3591003418,-24.4138946533 c -0.569000244141,0.106399536133 -1.12660217285,0.140594482422 -1.45460510254,0.140594482422 c -1.29689025879,0.0 -2.53239440918,-0.343307495117 -3.62019348145,-1.12400817871 c -1.67700195312,-1.20349121094 -2.76950073242,-3.17008972168 -2.76950073242,-5.39189147949"                      android:strokeColor="#FFFFFFFF" -                    android:strokeAlpha="0.5"                      android:strokeWidth="1.45"                      android:strokeLineCap="round"                      android:trimPathEnd="0" /> @@ -47,10 +48,9 @@                      android:name="ridge_7_path"                      android:pathData="M -36.1409912109,-21.7843475342 c -1.00540161133,-1.19300842285 -1.57499694824,-1.9181060791 -2.36520385742,-3.50170898438 c -0.827560424805,-1.65869140625 -1.31352233887,-3.49159240723 -1.31352233887,-5.48489379883 c 0.0,-3.66279602051 2.96932983398,-6.63220214844 6.63221740723,-6.63220214844 c 3.6628112793,0.0 6.63220214844,2.96940612793 6.63220214844,6.63220214844"                      android:strokeColor="#FFFFFFFF" -                    android:strokeAlpha="0.5"                      android:strokeWidth="1.45"                      android:strokeLineCap="round" -                    android:trimPathStart="1" /> +                    android:trimPathEnd="0" />              </group>              <group                  android:name="ridge_3" > @@ -58,7 +58,6 @@                      android:name="ridge_6_path"                      android:pathData="M -42.1907958984,-25.6756896973 c -0.758117675781,-2.14370727539 -0.896545410156,-3.86891174316 -0.896545410156,-5.12921142578 c 0.0,-1.46069335938 0.249176025391,-2.84799194336 0.814682006836,-4.09748840332 c 1.56153869629,-3.45030212402 5.03434753418,-5.85076904297 9.0679473877,-5.85076904297 c 5.49430847168,0.0 9.94830322266,4.4539642334 9.94830322266,9.94825744629 c 0.0,1.83151245117 -1.48460388184,3.31610107422 -3.31610107422,3.31610107422 c -1.83149719238,0.0 -3.31610107422,-1.48469543457 -3.31610107422,-3.31610107422 c 0.0,-1.83139038086 -1.48458862305,-3.31610107422 -3.31610107422,-3.31610107422 c -1.83149719238,0.0 -3.31610107422,1.48471069336 -3.31610107422,3.31610107422 c 0.0,2.57020568848 0.989517211914,4.88710021973 2.60510253906,6.5865020752 c 1.22210693359,1.28550720215 2.43139648438,2.09950256348 4.47590637207,2.69030761719"                      android:strokeColor="#FFFFFFFF" -                    android:strokeAlpha="0.5"                      android:strokeWidth="1.45"                      android:strokeLineCap="round"                      android:trimPathStart="1" /> @@ -69,7 +68,6 @@                      android:name="ridge_2_path"                      android:pathData="M -44.0646514893,-38.1672973633 c 1.19026184082,-1.77430725098 2.67503356934,-3.24531555176 4.55902099609,-4.27278137207 c 1.88395690918,-1.0274810791 4.04466247559,-1.61137390137 6.34175109863,-1.61137390137 c 2.28761291504,0.0 4.43991088867,0.579071044922 6.31831359863,1.59861755371 c 1.8784942627,1.01954650879 3.36059570312,2.4796295166 4.55279541016,4.24153137207"                      android:strokeColor="#FFFFFFFF" -                    android:strokeAlpha="0.5"                      android:strokeWidth="1.45"                      android:strokeLineCap="round"                      android:trimPathStart="1" /> @@ -82,7 +80,6 @@                      android:name="ridge_1_path"                      android:pathData="M 71.7812347412,97.0507202148 c -2.27149963379,-1.31344604492 -4.71360778809,-2.07006835938 -7.56221008301,-2.07006835938 c -2.84869384766,0.0 -5.23320007324,0.779556274414 -7.34411621094,2.07006835938"                      android:strokeColor="#FFFFFFFF" -                    android:strokeAlpha="0.5"                      android:strokeWidth="1.45"                      android:strokeLineCap="round"                      android:trimPathEnd="0" /> @@ -90,37 +87,39 @@          </group>      </group>      <group -        android:name="exclamation" -        android:translateX="16" -        android:translateY="16" > +        android:name="errorcircle" +        android:translateX="12" +        android:translateY="12" +        android:rotation="10" >          <group -            android:name="group_2" > -            <path -                android:name="path_2" -                android:pathData="M 1.35900878906,6.76104736328 c 0.0,0.0 -2.69998168945,0.0 -2.69998168945,0.0 c 0.0,0.0 0.0,-2.69995117188 0.0,-2.69995117188 c 0.0,0.0 2.69998168945,0.0 2.69998168945,0.0 c 0.0,0.0 0.0,2.69995117188 0.0,2.69995117188 Z" -                android:fillColor="?android:attr/colorError" /> +            android:name="circle" >              <path -                android:name="path_1" -                android:pathData="M 1.35363769531,1.36633300781 c 0.0,0.0 -2.69998168945,0.0 -2.69998168945,0.0 c 0.0,0.0 0.0,-8.09997558594 0.0,-8.09997558594 c 0.0,0.0 2.69998168945,0.0 2.69998168945,0.0 c 0.0,0.0 0.0,8.09997558594 0.0,8.09997558594 Z" -                android:fillColor="?android:attr/colorError" /> +                android:name="circlepath" +                android:strokeColor="?android:attr/colorError" +                android:strokeWidth="2" +                android:strokeLineCap="round" +                android:pathData="M 0.0,-9.0 c 4.9705627482,0.0 9.0,4.0294372518 9.0,9.0 c 0.0,4.9705627482 -4.0294372518,9.0 -9.0,9.0 c -4.9705627482,0.0 -9.0,-4.0294372518 -9.0,-9.0 c 0.0,-4.9705627482 4.0294372518,-9.0 9.0,-9.0 Z" />          </group>      </group>      <group -        android:name="circle_outline" -        android:translateX="16" -        android:translateY="16" > +        android:name="errorexclamation" +        android:translateX="12" +        android:translateY="12" >          <group -            android:name="group_1" -            android:scaleX="1.12734" -            android:scaleY="1.12734" -            android:rotation="430" > +            android:name="exclamationbottom" +            android:translateY="4" >              <path -                android:name="path_3" -                android:pathData="M 0.0101470947266,10.8087768555 c -5.96701049805,0.0 -10.8000183105,-4.8330078125 -10.8000183105,-10.8000488281 c 0.0,-5.96691894531 4.8330078125,-10.7999267578 10.8000183105,-10.7999267578 c 5.96697998047,0.0 10.799987793,4.8330078125 10.799987793,10.7999267578 c 0.0,5.96704101562 -4.8330078125,10.8000488281 -10.799987793,10.8000488281 Z" -                android:strokeColor="?android:attr/colorError" -                android:strokeWidth="2" -                android:trimPathStart="0" -                android:trimPathEnd="1" /> +                android:name="bottompath" +                android:fillColor="?android:attr/colorError" +                android:pathData="M 0.0,-1.1 l 0.0,0.0 c 0.60751322478,0.0 1.1,0.49248677522 1.1,1.1 l 0.0,0.0 c 0.0,0.60751322478 -0.49248677522,1.1 -1.1,1.1 l 0.0,0.0 c -0.60751322478,0.0 -1.1,-0.49248677522 -1.1,-1.1 l 0.0,0.0 c 0.0,-0.60751322478 0.49248677522,-1.1 1.1,-1.1 Z" /> +        </group> +        <group +            android:name="exclamationtop" +            android:translateY="-2" > +            <path +                android:name="toppath" +                android:fillColor="?android:attr/colorError" +                android:pathData="M 0.0,-3.0 l 0.0,0.0 c 0.5522847498,0.0 1.0,0.4477152502 1.0,1.0 l 0.0,4.0 c 0.0,0.5522847498 -0.4477152502,1.0 -1.0,1.0 l 0.0,0.0 c -0.5522847498,0.0 -1.0,-0.4477152502 -1.0,-1.0 l 0.0,-4.0 c 0.0,-0.5522847498 0.4477152502,-1.0 1.0,-1.0 Z" />          </group>      </group>  </vector> diff --git a/packages/SystemUI/res/drawable/lockscreen_fingerprint_error_state_to_fp_animation.xml b/packages/SystemUI/res/drawable/lockscreen_fingerprint_error_state_to_fp_animation.xml index 03515249ed0b..2f33306c2457 100644 --- a/packages/SystemUI/res/drawable/lockscreen_fingerprint_error_state_to_fp_animation.xml +++ b/packages/SystemUI/res/drawable/lockscreen_fingerprint_error_state_to_fp_animation.xml @@ -1,53 +1,59 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> +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. +-->  <animated-vector      xmlns:android="http://schemas.android.com/apk/res/android"      android:drawable="@drawable/lockscreen_fingerprint_error_state_to_fp" >      <target -        android:name="white_fingerprint_ridges" -        android:animation="@anim/lockscreen_fingerprint_error_state_to_fp_white_fingerprint_ridges_animation" /> +        android:name="fingerprintwhite" +        android:animation="@anim/ic_fingerprint_tofp_fingerprintwhite_animation" />      <target          android:name="ridge_5_path" -        android:animation="@anim/lockscreen_fingerprint_error_state_to_fp_ridge_5_path_animation" /> +        android:animation="@anim/ic_fingerprint_tofp_ridge_5_path_animation" />      <target          android:name="ridge_7_path" -        android:animation="@anim/lockscreen_fingerprint_error_state_to_fp_ridge_7_path_animation" /> +        android:animation="@anim/ic_fingerprint_tofp_ridge_7_path_animation" />      <target          android:name="ridge_6_path" -        android:animation="@anim/lockscreen_fingerprint_error_state_to_fp_ridge_6_path_animation" /> +        android:animation="@anim/ic_fingerprint_tofp_ridge_6_path_animation" />      <target          android:name="ridge_2_path" -        android:animation="@anim/lockscreen_fingerprint_error_state_to_fp_ridge_2_path_animation" /> +        android:animation="@anim/ic_fingerprint_tofp_ridge_2_path_animation" />      <target          android:name="ridge_1_path" -        android:animation="@anim/lockscreen_fingerprint_error_state_to_fp_ridge_1_path_animation" /> +        android:animation="@anim/ic_fingerprint_tofp_ridge_1_path_animation" />      <target -        android:name="group_2" -        android:animation="@anim/lockscreen_fingerprint_error_state_to_fp_group_2_animation" /> +        android:name="errorcircle" +        android:animation="@anim/ic_fingerprint_tofp_errorcircle_animation" />      <target -        android:name="path_2" -        android:animation="@anim/lockscreen_fingerprint_error_state_to_fp_path_2_animation" /> +        android:name="circlepath" +        android:animation="@anim/ic_fingerprint_tofp_circlepath_animation" />      <target -        android:name="path_1" -        android:animation="@anim/lockscreen_fingerprint_error_state_to_fp_path_1_animation" /> +        android:name="errorexclamation" +        android:animation="@anim/ic_fingerprint_tofp_errorexclamation_animation" />      <target -        android:name="group_1" -        android:animation="@anim/lockscreen_fingerprint_error_state_to_fp_group_1_animation" /> +        android:name="exclamationbottom" +        android:animation="@anim/ic_fingerprint_tofp_exclamationbottom_animation" />      <target -        android:name="path_3" -        android:animation="@anim/lockscreen_fingerprint_error_state_to_fp_path_3_animation" /> +        android:name="bottompath" +        android:animation="@anim/ic_fingerprint_tofp_bottompath_animation" /> +    <target +        android:name="exclamationtop" +        android:animation="@anim/ic_fingerprint_tofp_exclamationtop_animation" /> +    <target +        android:name="toppath" +        android:animation="@anim/ic_fingerprint_tofp_toppath_animation" />  </animated-vector> diff --git a/packages/SystemUI/res/drawable/lockscreen_fingerprint_fp_to_error_state.xml b/packages/SystemUI/res/drawable/lockscreen_fingerprint_fp_to_error_state.xml index a577afc75d9e..218dd06dc178 100644 --- a/packages/SystemUI/res/drawable/lockscreen_fingerprint_fp_to_error_state.xml +++ b/packages/SystemUI/res/drawable/lockscreen_fingerprint_fp_to_error_state.xml @@ -1,34 +1,36 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> +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. +-->  <vector      xmlns:android="http://schemas.android.com/apk/res/android" -    android:name="lockscreen_fingerprint_fp_to_error_state" +    android:name="ic_fingerprint_toerror"      android:width="32dp" -    android:viewportWidth="32" +    android:viewportWidth="24"      android:height="32dp" -    android:viewportHeight="32" > +    android:viewportHeight="24" >      <group -        android:name="white_fingerprint_ridges" -        android:translateX="16.125" -        android:translateY="19.75" > +        android:name="fingerprintwhite" +        android:translateX="12" +        android:translateY="12.4" +        android:scaleX="0.738" +        android:scaleY="0.738" >          <group -            android:name="white_fingerprint_ridges_pivot" -            android:translateX="33.2085" -            android:translateY="30.91685" > +            android:name="fingerprintwhite_pivot" +            android:translateX="33" +            android:translateY="34" >              <group                  android:name="ridge_5" >                  <path @@ -84,13 +86,15 @@          </group>      </group>      <group -        android:name="fingerprint_ridges" -        android:translateX="16.125" -        android:translateY="19.75" > +        android:name="fingerprinterror" +        android:translateX="12" +        android:translateY="12.4" +        android:scaleX="0.738" +        android:scaleY="0.738" >          <group -            android:name="fingerprint_ridges_pivot" -            android:translateX="33.2085" -            android:translateY="30.91685" > +            android:name="fingerprinterror_pivot" +            android:translateX="33" +            android:translateY="34" >              <group                  android:name="ridge_6" >                  <path @@ -146,39 +150,40 @@          </group>      </group>      <group -        android:name="exclamation" -        android:translateX="16" -        android:translateY="16" > +        android:name="errorcircle" +        android:translateX="12" +        android:translateY="12" +        android:rotation="190" >          <group -            android:name="group_2" -            android:scaleX="0.63838" -            android:scaleY="0.63838" -            android:rotation="184" > +            android:name="circle" >              <path -                android:name="path_2" -                android:pathData="M -1.3705291748,4.06730651855 c 0.0,0.0 0.036376953125,-0.0102386474609 0.036376953125,-0.0102386474609 c 0.0,0.0 -0.00682067871094,0.0040283203125 -0.00682067871093,0.0040283203125 c 0.0,0.0 -0.0161437988281,0.00479125976562 -0.0161437988281,0.00479125976563 c 0.0,0.0 -0.0134124755859,0.00141906738281 -0.0134124755859,0.00141906738281 Z" -                android:fillColor="?android:attr/colorError" /> -            <path -                android:name="path_1" -                android:pathData="M -1.3737487793,-6.77532958984 c 0.0,0.0 0.00604248046875,0.0166625976562 0.00604248046876,0.0166625976562 c 0.0,0.0 0.0213623046875,0.0250244140625 0.0213623046875,0.0250244140625 c 0.0,0.0 -0.00604248046875,-0.0166625976562 -0.00604248046876,-0.0166625976562 c 0.0,0.0 -0.0213623046875,-0.0250244140625 -0.0213623046875,-0.0250244140625 Z" -                android:fillColor="?android:attr/colorError" /> +                android:name="circlepath" +                android:strokeColor="?android:attr/colorError" +                android:strokeWidth="2" +                android:strokeLineCap="round" +                android:trimPathStart="1" +                android:pathData="M 0.0,-9.0 c 4.9705627482,0.0 9.0,4.0294372518 9.0,9.0 c 0.0,4.9705627482 -4.0294372518,9.0 -9.0,9.0 c -4.9705627482,0.0 -9.0,-4.0294372518 -9.0,-9.0 c 0.0,-4.9705627482 4.0294372518,-9.0 9.0,-9.0 Z" />          </group>      </group>      <group -        android:name="circle_outline" -        android:translateX="16" -        android:translateY="16" > +        android:name="errorexclamation" +        android:translateX="12" +        android:translateY="12" +        android:rotation="180" >          <group -            android:name="group_1" -            android:scaleX="1.12734" -            android:scaleY="1.12734" -            android:rotation="231" > +            android:name="exclamationbottom" +            android:translateY="4" >              <path -                android:name="path_3" -                android:pathData="M 0.0101470947266,10.8087768555 c -5.96701049805,0.0 -10.8000183105,-4.8330078125 -10.8000183105,-10.8000488281 c 0.0,-5.96691894531 4.8330078125,-10.7999267578 10.8000183105,-10.7999267578 c 5.96697998047,0.0 10.799987793,4.8330078125 10.799987793,10.7999267578 c 0.0,5.96704101562 -4.8330078125,10.8000488281 -10.799987793,10.8000488281 Z" -                android:strokeColor="?android:attr/colorError" -                android:strokeWidth="2" -                android:trimPathStart="1" /> +                android:name="bottompath" +                android:fillColor="?android:attr/colorError" +                android:pathData="M 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" /> +        </group> +        <group +            android:name="exclamationtop" > +            <path +                android:name="toppath" +                android:fillColor="?android:attr/colorError" +                android:pathData="M -1.0,0.0 l 2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l -2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" />          </group>      </group>  </vector> diff --git a/packages/SystemUI/res/drawable/lockscreen_fingerprint_fp_to_error_state_animation.xml b/packages/SystemUI/res/drawable/lockscreen_fingerprint_fp_to_error_state_animation.xml index f7b710f39510..38096a97ad0d 100644 --- a/packages/SystemUI/res/drawable/lockscreen_fingerprint_fp_to_error_state_animation.xml +++ b/packages/SystemUI/res/drawable/lockscreen_fingerprint_fp_to_error_state_animation.xml @@ -1,71 +1,77 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> +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. +-->  <animated-vector      xmlns:android="http://schemas.android.com/apk/res/android"      android:drawable="@drawable/lockscreen_fingerprint_fp_to_error_state" >      <target -        android:name="white_fingerprint_ridges" -        android:animation="@anim/lockscreen_fingerprint_fp_to_error_state_white_fingerprint_ridges_animation" /> +        android:name="fingerprintwhite" +        android:animation="@anim/ic_fingerprint_toerror_fingerprintwhite_animation" />      <target          android:name="ridge_5_path" -        android:animation="@anim/lockscreen_fingerprint_fp_to_error_state_ridge_5_path_animation" /> +        android:animation="@anim/ic_fingerprint_toerror_ridge_5_path_animation" />      <target          android:name="ridge_7_path" -        android:animation="@anim/lockscreen_fingerprint_fp_to_error_state_ridge_7_path_animation" /> +        android:animation="@anim/ic_fingerprint_toerror_ridge_7_path_animation" />      <target          android:name="ridge_6_path" -        android:animation="@anim/lockscreen_fingerprint_fp_to_error_state_ridge_6_path_animation" /> +        android:animation="@anim/ic_fingerprint_toerror_ridge_6_path_animation" />      <target          android:name="ridge_2_path" -        android:animation="@anim/lockscreen_fingerprint_fp_to_error_state_ridge_2_path_animation" /> +        android:animation="@anim/ic_fingerprint_toerror_ridge_2_path_animation" />      <target          android:name="ridge_1_path" -        android:animation="@anim/lockscreen_fingerprint_fp_to_error_state_ridge_1_path_animation" /> +        android:animation="@anim/ic_fingerprint_toerror_ridge_1_path_animation" />      <target -        android:name="fingerprint_ridges" -        android:animation="@anim/lockscreen_fingerprint_fp_to_error_state_fingerprint_ridges_animation" /> +        android:name="fingerprinterror" +        android:animation="@anim/ic_fingerprint_toerror_fingerprinterror_animation" />      <target          android:name="ridge_5_path_0" -        android:animation="@anim/lockscreen_fingerprint_fp_to_error_state_ridge_5_path_0_animation" /> +        android:animation="@anim/ic_fingerprint_toerror_ridge_5_path_0_animation" />      <target          android:name="ridge_7_path_0" -        android:animation="@anim/lockscreen_fingerprint_fp_to_error_state_ridge_7_path_0_animation" /> +        android:animation="@anim/ic_fingerprint_toerror_ridge_7_path_0_animation" />      <target          android:name="ridge_6_path_0" -        android:animation="@anim/lockscreen_fingerprint_fp_to_error_state_ridge_6_path_0_animation" /> +        android:animation="@anim/ic_fingerprint_toerror_ridge_6_path_0_animation" />      <target          android:name="ridge_2_path_0" -        android:animation="@anim/lockscreen_fingerprint_fp_to_error_state_ridge_2_path_0_animation" /> +        android:animation="@anim/ic_fingerprint_toerror_ridge_2_path_0_animation" />      <target          android:name="ridge_1_path_0" -        android:animation="@anim/lockscreen_fingerprint_fp_to_error_state_ridge_1_path_0_animation" /> +        android:animation="@anim/ic_fingerprint_toerror_ridge_1_path_0_animation" />      <target -        android:name="group_2" -        android:animation="@anim/lockscreen_fingerprint_fp_to_error_state_group_2_animation" /> +        android:name="errorcircle" +        android:animation="@anim/ic_fingerprint_toerror_errorcircle_animation" />      <target -        android:name="path_2" -        android:animation="@anim/lockscreen_fingerprint_fp_to_error_state_path_2_animation" /> +        android:name="circlepath" +        android:animation="@anim/ic_fingerprint_toerror_circlepath_animation" />      <target -        android:name="path_1" -        android:animation="@anim/lockscreen_fingerprint_fp_to_error_state_path_1_animation" /> +        android:name="errorexclamation" +        android:animation="@anim/ic_fingerprint_toerror_errorexclamation_animation" />      <target -        android:name="group_1" -        android:animation="@anim/lockscreen_fingerprint_fp_to_error_state_group_1_animation" /> +        android:name="exclamationbottom" +        android:animation="@anim/ic_fingerprint_toerror_exclamationbottom_animation" />      <target -        android:name="path_3" -        android:animation="@anim/lockscreen_fingerprint_fp_to_error_state_path_3_animation" /> +        android:name="bottompath" +        android:animation="@anim/ic_fingerprint_toerror_bottompath_animation" /> +    <target +        android:name="exclamationtop" +        android:animation="@anim/ic_fingerprint_toerror_exclamationtop_animation" /> +    <target +        android:name="toppath" +        android:animation="@anim/ic_fingerprint_toerror_toppath_animation" />  </animated-vector> diff --git a/packages/SystemUI/res/drawable/trusted_state_to_error.xml b/packages/SystemUI/res/drawable/trusted_state_to_error.xml index 534a9a54c3ea..260940f4fe65 100755 --- a/packages/SystemUI/res/drawable/trusted_state_to_error.xml +++ b/packages/SystemUI/res/drawable/trusted_state_to_error.xml @@ -1,8 +1,8 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -Copyright (C) 2015 The Android Open Source Project +Copyright (C) 2017 The Android Open Source Project -   Licensed under the Apache License, Version 2.0 (the "License"); +    Licensed under the Apache License, Version 2.0 (the "License");      you may not use this file except in compliance with the License.      You may obtain a copy of the License at @@ -18,31 +18,19 @@ Copyright (C) 2015 The Android Open Source Project      xmlns:android="http://schemas.android.com/apk/res/android"      android:name="trusted_state_to_error"      android:width="32dp" -    android:viewportWidth="32" +    android:viewportWidth="24"      android:height="32dp" -    android:viewportHeight="32" > +    android:viewportHeight="24" >      <group -        android:name="trusted_state_to_error_0" -        android:translateX="16" -        android:translateY="16" > -        <group -            android:name="error_circle" > -            <path -                android:name="ellipse_path_1" -                android:trimPathStart="1" -                android:trimPathOffset="1" -                android:strokeColor="#FFFFFFFF" -                android:strokeAlpha="0.5" -                android:strokeWidth="2" -                android:pathData="M 0.0,-12.0 c 6.6274169976,0.0 12.0,5.3725830024 12.0,12.0 c 0.0,6.6274169976 -5.3725830024,12.0 -12.0,12.0 c -6.6274169976,0.0 -12.0,-5.3725830024 -12.0,-12.0 c 0.0,-6.6274169976 5.3725830024,-12.0 12.0,-12.0 Z" /> -        </group> +        android:name="lock" +        android:translateX="12" +        android:translateY="12" >          <group              android:name="middle_ellipse"              android:translateY="2.9375" >              <path -                android:name="ellipse_path_2" +                android:name="ellipse_path_1"                  android:fillColor="#FFFFFFFF" -                android:fillAlpha="0.5"                  android:pathData="M 0.0,-1.988645 c 1.09829830627,0.0 1.988645,0.890346693734 1.988645,1.988645 c 0.0,1.09829830627 -0.890346693734,1.988645 -1.988645,1.988645 c -1.09829830627,0.0 -1.988645,-0.890346693734 -1.988645,-1.988645 c 0.0,-1.09829830627 0.890346693734,-1.988645 1.988645,-1.988645 Z" />          </group>          <group @@ -50,35 +38,64 @@ Copyright (C) 2015 The Android Open Source Project              <path                  android:name="path_1"                  android:pathData="M 6.00561523438,-4.046875 c 0.0,0.0 -5.98999023438,0.0 -5.98999023438,0.0 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 5.98812866211,0.0 5.98812866211,0.0 c 0.0,0.0 0.00064086914062,10.0 0.00064086914062,10.0 c 0.0,0.0 -5.98840332031,0.0 -5.98840332031,0.0 c 0.0,0.0 -0.0052490234375,2.0 -0.0052490234375,2.0 c 0.0,0.0 5.99487304688,0.0 5.99487304688,0.0 c 1.10000610352,0.0 2.0,-0.900024414062 2.0,-2.0 c 0.0,0.0 0.0,-10.0 0.0,-10.0 c 0.0,-1.09997558594 -0.899993896484,-2.0 -2.0,-2.0 Z" -                android:fillColor="#FFFFFFFF" -                android:fillAlpha="0.5" /> +                android:fillColor="#FFFFFFFF" />          </group>          <group              android:name="lock_left_side" >              <path                  android:name="path_2"                  android:pathData="M -5.9959564209,-2.04727172852 c 0.0,0.0 6.01173400879,0.00039672851562 6.01173400879,0.00039672851562 c 0.0,0.0 -0.00015258789062,-2.0 -0.00015258789062,-2.0 c 0.0,0.0 -6.01000976562,0.0 -6.01000976562,0.0 c -1.10000610352,0.0 -2.0,0.900024414062 -2.0,2.0 c 0.0,0.0 0.0,10.0 0.0,10.0 c 0.0,1.09997558594 0.899993896484,2.0 2.0,2.0 c 0.0,0.0 6.01000976562,0.0 6.01000976562,0.0 c 0.0,0.0 -0.000244140625,-2.0009765625 -0.000244140625,-2.0009765625 c 0.0,0.0 -6.01171875,0.0003662109375 -6.01171875,0.0003662109375 c 0.0,0.0 0.00038146972656,-9.99978637695 0.00038146972656,-9.99978637695 Z" -                android:fillColor="#FFFFFFFF" -                android:fillAlpha="0.5" /> +                android:fillColor="#FFFFFFFF" />          </group>          <group              android:name="lock_top" >              <path                  android:name="path_3"                  android:pathData="M 5.00619506836,-6.046875 c 0.0,-2.76000976562 -2.23999023438,-5.0 -5.0,-5.0 c -2.76000976562,0.0 -5.0,2.23999023438 -5.0,5.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,-1.71002197266 1.38999938965,-3.09997558594 3.10000610352,-3.09997558594 c 1.71000671387,0.0 3.10000610352,1.38995361328 3.10000610352,3.09997558594 c 0.0,0.0 0.0,2.0 0.0,2.0 c 0.0,0.0 1.89999389648,0.0 1.89999389648,0.0 c 0.0,0.0 0.0,-2.0 0.0,-2.0 Z" +                android:fillColor="#FFFFFFFF" /> +        </group> +    </group> +    <group +        android:name="errorexclamationdot" +        android:translateX="12" +        android:translateY="8" > +        <group +            android:name="exclamationbottom" +            android:translateY="4" > +            <path +                android:name="bottompath"                  android:fillColor="#FFFFFFFF" -                android:fillAlpha="0.5" /> +                android:pathData="M 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" />          </group> +    </group> +    <group +        android:name="errorexclamation" +        android:translateX="12" +        android:translateY="12" >          <group -            android:name="exclamation_dot" -            android:translateY="4" -            android:scaleX="0" -            android:scaleY="0" > +            android:name="exclamationtop" +            android:translateY="2.5" >              <path -                android:name="rectangle_path_1" +                android:name="toppath"                  android:fillColor="#FFFFFFFF" -                android:fillAlpha="0.5" -                android:pathData="M -1.33871,-1.3335 l 2.67742,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,2.667 c 0.0,0.0 0.0,0.0 0.0,0.0 l -2.67742,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,-2.667 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" /> +                android:fillAlpha="0" +                android:pathData="M 0.0,-7.0 l 0.0,0.0 c 1.9329966243,0.0 3.5,1.5670033757 3.5,3.5 l 0.0,7.0 c 0.0,1.9329966243 -1.5670033757,3.5 -3.5,3.5 l 0.0,0.0 c -1.9329966243,0.0 -3.5,-1.5670033757 -3.5,-3.5 l 0.0,-7.0 c 0.0,-1.9329966243 1.5670033757,-3.5 3.5,-3.5 Z" /> +        </group> +    </group> +    <group +        android:name="errorcircle" +        android:translateX="12" +        android:translateY="12" +        android:rotation="184" > +        <group +            android:name="circle" > +            <path +                android:name="circlepath" +                android:strokeColor="#FFFFFFFF" +                android:strokeWidth="2" +                android:strokeLineCap="round" +                android:trimPathStart="1" +                android:pathData="M 0.0,-9.0 c 4.9705627482,0.0 9.0,4.0294372518 9.0,9.0 c 0.0,4.9705627482 -4.0294372518,9.0 -9.0,9.0 c -4.9705627482,0.0 -9.0,-4.0294372518 -9.0,-9.0 c 0.0,-4.9705627482 4.0294372518,-9.0 9.0,-9.0 Z" />          </group>      </group>  </vector> diff --git a/packages/SystemUI/res/drawable/trusted_state_to_error_animation.xml b/packages/SystemUI/res/drawable/trusted_state_to_error_animation.xml index 5686d541c6d3..3457be5ae42e 100755 --- a/packages/SystemUI/res/drawable/trusted_state_to_error_animation.xml +++ b/packages/SystemUI/res/drawable/trusted_state_to_error_animation.xml @@ -1,8 +1,8 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -Copyright (C) 2015 The Android Open Source Project +Copyright (C) 2017 The Android Open Source Project -   Licensed under the Apache License, Version 2.0 (the "License"); +    Licensed under the Apache License, Version 2.0 (the "License");      you may not use this file except in compliance with the License.      You may obtain a copy of the License at @@ -21,18 +21,9 @@ Copyright (C) 2015 The Android Open Source Project          android:name="ellipse_path_1"          android:animation="@anim/trusted_state_to_error_ellipse_path_1_animation" />      <target -        android:name="ellipse_path_2" -        android:animation="@anim/trusted_state_to_error_ellipse_path_2_animation" /> -    <target -        android:name="lock_right_side" -        android:animation="@anim/trusted_state_to_error_lock_right_side_animation" /> -    <target          android:name="path_1"          android:animation="@anim/trusted_state_to_error_path_1_animation" />      <target -        android:name="lock_left_side" -        android:animation="@anim/trusted_state_to_error_lock_left_side_animation" /> -    <target          android:name="path_2"          android:animation="@anim/trusted_state_to_error_path_2_animation" />      <target @@ -42,9 +33,21 @@ Copyright (C) 2015 The Android Open Source Project          android:name="path_3"          android:animation="@anim/trusted_state_to_error_path_3_animation" />      <target -        android:name="exclamation_dot" -        android:animation="@anim/trusted_state_to_error_exclamation_dot_animation" /> +        android:name="errorexclamationdot" +        android:animation="@anim/trusted_state_to_error_errorexclamationdot_animation" /> +    <target +        android:name="bottompath" +        android:animation="@anim/trusted_state_to_error_bottompath_animation" /> +    <target +        android:name="exclamationtop" +        android:animation="@anim/trusted_state_to_error_exclamationtop_animation" /> +    <target +        android:name="toppath" +        android:animation="@anim/trusted_state_to_error_toppath_animation" /> +    <target +        android:name="errorcircle" +        android:animation="@anim/trusted_state_to_error_errorcircle_animation" />      <target -        android:name="rectangle_path_1" -        android:animation="@anim/trusted_state_to_error_rectangle_path_1_animation" /> +        android:name="circlepath" +        android:animation="@anim/trusted_state_to_error_circlepath_animation" />  </animated-vector> diff --git a/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_0.xml b/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_0.xml index 262cb88b48ac..7f4fdbfbe38d 100755..100644 --- a/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_0.xml +++ b/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_0.xml @@ -1,8 +1,8 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -Copyright (C) 2015 The Android Open Source Project +Copyright (C) 2017 The Android Open Source Project -   Licensed under the Apache License, Version 2.0 (the "License"); +    Licensed under the Apache License, Version 2.0 (the "License");      you may not use this file except in compliance with the License.      You may obtain a copy of the License at @@ -16,4 +16,4 @@ Copyright (C) 2015 The Android Open Source Project  -->  <pathInterpolator      xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 l 0.254777070064,0.0 c 0.00007,0.0 0.447133757962,1.0 0.745222929936,1.0 L 1.0,1.0" /> +    android:pathData="M 0.0,0.0 c 1.0,0.0 0.6,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_1.xml b/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_1.xml index 9ecee94bc915..169596299bef 100755..100644 --- a/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_1.xml +++ b/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_1.xml @@ -1,8 +1,8 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -Copyright (C) 2015 The Android Open Source Project +Copyright (C) 2017 The Android Open Source Project -   Licensed under the Apache License, Version 2.0 (the "License"); +    Licensed under the Apache License, Version 2.0 (the "License");      you may not use this file except in compliance with the License.      You may obtain a copy of the License at @@ -16,4 +16,4 @@ Copyright (C) 2015 The Android Open Source Project  -->  <pathInterpolator      xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.00010,0.0 0.6,1.0 1.0,1.0" /> +    android:pathData="M 0.0,0.0 c 0.4,0.0 0.6,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_2.xml b/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_2.xml index ae0b2d7740d5..91c08f869baf 100755..100644 --- a/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_2.xml +++ b/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_2.xml @@ -1,8 +1,8 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -Copyright (C) 2015 The Android Open Source Project +Copyright (C) 2017 The Android Open Source Project -   Licensed under the Apache License, Version 2.0 (the "License"); +    Licensed under the Apache License, Version 2.0 (the "License");      you may not use this file except in compliance with the License.      You may obtain a copy of the License at @@ -16,4 +16,4 @@ Copyright (C) 2015 The Android Open Source Project  -->  <pathInterpolator      xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.000100000000009,0.0 0.6,1.0 1.0,1.0" /> +    android:pathData="M 0.0,0.0 l 0.236439499305,0.0 c 0.763560500695,0.0 0.458136300417,1.0 0.763560500695,1.0 L 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_3.xml b/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_3.xml index be7cc69ebda1..f5cbc3142986 100755..100644 --- a/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_3.xml +++ b/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_3.xml @@ -1,8 +1,8 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -Copyright (C) 2015 The Android Open Source Project +Copyright (C) 2017 The Android Open Source Project -   Licensed under the Apache License, Version 2.0 (the "License"); +    Licensed under the Apache License, Version 2.0 (the "License");      you may not use this file except in compliance with the License.      You may obtain a copy of the License at @@ -16,4 +16,4 @@ Copyright (C) 2015 The Android Open Source Project  -->  <pathInterpolator      xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.00010,0.0 0.2,1.0 1.0,1.0" /> +    android:pathData="M 0.0,0.0 c 0.00100000000001,0.0 0.2,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_4.xml b/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_4.xml index f8f978d7dc06..cf21d8153b43 100755..100644 --- a/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_4.xml +++ b/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_4.xml @@ -1,8 +1,8 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -Copyright (C) 2015 The Android Open Source Project +Copyright (C) 2017 The Android Open Source Project -   Licensed under the Apache License, Version 2.0 (the "License"); +    Licensed under the Apache License, Version 2.0 (the "License");      you may not use this file except in compliance with the License.      You may obtain a copy of the License at @@ -16,4 +16,4 @@ Copyright (C) 2015 The Android Open Source Project  -->  <pathInterpolator      xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.4,0.0 0.6,1.0 1.0,1.0" /> +    android:pathData="M 0.0,0.0 c 0.00100000000002,0.0 0.2,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_5.xml b/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_5.xml new file mode 100644 index 000000000000..0c18d9293933 --- /dev/null +++ b/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_5.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<pathInterpolator +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:pathData="M 0.0,0.0 c 0.8,0.0 0.2,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_6.xml b/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_6.xml new file mode 100644 index 000000000000..0bf41e54d386 --- /dev/null +++ b/packages/SystemUI/res/interpolator/error_to_trustedstate_animation_interpolator_6.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<pathInterpolator +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:pathData="M 0.0,0.0 c 0.2,0.0 0.0,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/ic_bluetooth_transient_animation_interpolator_0.xml b/packages/SystemUI/res/interpolator/ic_bluetooth_transient_animation_interpolator_0.xml deleted file mode 100644 index c421f9e9e81c..000000000000 --- a/packages/SystemUI/res/interpolator/ic_bluetooth_transient_animation_interpolator_0.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<pathInterpolator -    xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.16666666667,0.0 0.83333333333,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/ic_volume_expand_animation_interpolator_0.xml b/packages/SystemUI/res/interpolator/ic_caret_down_animation_interpolator_0.xml index c3930e42cdaa..ed90d64fdeff 100644 --- a/packages/SystemUI/res/interpolator/ic_volume_expand_animation_interpolator_0.xml +++ b/packages/SystemUI/res/interpolator/ic_caret_down_animation_interpolator_0.xml @@ -1,5 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?>  <!-- -     Copyright (C) 2015 The Android Open Source Project +     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. @@ -13,5 +14,6 @@       See the License for the specific language governing permissions and       limitations under the License.  --> -<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.0001,0.0 0.0,1.0 1.0,1.0" /> +<pathInterpolator +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:pathData="M 0.0,0.0 c 0.2,0.0 0.0,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/ic_caret_up_animation_interpolator_0.xml b/packages/SystemUI/res/interpolator/ic_caret_up_animation_interpolator_0.xml new file mode 100644 index 000000000000..ed90d64fdeff --- /dev/null +++ b/packages/SystemUI/res/interpolator/ic_caret_up_animation_interpolator_0.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +     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. +--> +<pathInterpolator +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:pathData="M 0.0,0.0 c 0.2,0.0 0.0,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_0.xml b/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_0.xml new file mode 100644 index 000000000000..fcd751dadb26 --- /dev/null +++ b/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_0.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<pathInterpolator +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:pathData="M 0.0,0.0 c 0.16666666667,0.0 0.83333333333,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_1.xml b/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_1.xml new file mode 100644 index 000000000000..38dbdb71f35f --- /dev/null +++ b/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_1.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<pathInterpolator +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:pathData="M 0.0,0.0 c 0.8,0.0 0.5,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_2.xml b/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_2.xml new file mode 100644 index 000000000000..169596299bef --- /dev/null +++ b/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_2.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<pathInterpolator +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:pathData="M 0.0,0.0 c 0.4,0.0 0.6,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_3.xml b/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_3.xml new file mode 100644 index 000000000000..8538f9895aa9 --- /dev/null +++ b/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_3.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<pathInterpolator +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:pathData="M 0.0,0.0 l 0.286298568507,0.0 c 0.142740286299,0.0 0.0,1.0 0.713701431493,1.0 L 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_4.xml b/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_4.xml new file mode 100644 index 000000000000..0bf41e54d386 --- /dev/null +++ b/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_4.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<pathInterpolator +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:pathData="M 0.0,0.0 c 0.2,0.0 0.0,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_5.xml b/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_5.xml new file mode 100644 index 000000000000..220209432136 --- /dev/null +++ b/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_5.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<pathInterpolator +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:pathData="M 0.0,0.0 c 0.00010,0.0 0.2,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_6.xml b/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_6.xml new file mode 100644 index 000000000000..0c18d9293933 --- /dev/null +++ b/packages/SystemUI/res/interpolator/ic_fingerprint_toerror_animation_interpolator_6.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<pathInterpolator +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:pathData="M 0.0,0.0 c 0.8,0.0 0.2,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/ic_fingerprint_tofp_animation_interpolator_0.xml b/packages/SystemUI/res/interpolator/ic_fingerprint_tofp_animation_interpolator_0.xml new file mode 100644 index 000000000000..ac1b566e9dc4 --- /dev/null +++ b/packages/SystemUI/res/interpolator/ic_fingerprint_tofp_animation_interpolator_0.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<pathInterpolator +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:pathData="M 0.0,0.0 l 0.555555555556,0.0 c 0.177777777778,0.0 0.0888888888889,1.0 0.444444444444,1.0 L 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/ic_fingerprint_tofp_animation_interpolator_1.xml b/packages/SystemUI/res/interpolator/ic_fingerprint_tofp_animation_interpolator_1.xml new file mode 100644 index 000000000000..7f4fdbfbe38d --- /dev/null +++ b/packages/SystemUI/res/interpolator/ic_fingerprint_tofp_animation_interpolator_1.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<pathInterpolator +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:pathData="M 0.0,0.0 c 1.0,0.0 0.6,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/ic_fingerprint_tofp_animation_interpolator_2.xml b/packages/SystemUI/res/interpolator/ic_fingerprint_tofp_animation_interpolator_2.xml new file mode 100644 index 000000000000..169596299bef --- /dev/null +++ b/packages/SystemUI/res/interpolator/ic_fingerprint_tofp_animation_interpolator_2.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<pathInterpolator +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:pathData="M 0.0,0.0 c 0.4,0.0 0.6,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/ic_fingerprint_tofp_animation_interpolator_3.xml b/packages/SystemUI/res/interpolator/ic_fingerprint_tofp_animation_interpolator_3.xml new file mode 100644 index 000000000000..02c6cd51b65a --- /dev/null +++ b/packages/SystemUI/res/interpolator/ic_fingerprint_tofp_animation_interpolator_3.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<pathInterpolator +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:pathData="M 0.0,0.0 l 0.445544554455,0.0 c 0.554455445545,0.0 0.332673267327,1.0 0.554455445545,1.0 L 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/ic_fingerprint_tofp_animation_interpolator_4.xml b/packages/SystemUI/res/interpolator/ic_fingerprint_tofp_animation_interpolator_4.xml new file mode 100644 index 000000000000..7ae249e9bc4f --- /dev/null +++ b/packages/SystemUI/res/interpolator/ic_fingerprint_tofp_animation_interpolator_4.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<pathInterpolator +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:pathData="M 0.0,0.0 c 0.00010,0.0 0.6,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/ic_fingerprint_tofp_animation_interpolator_5.xml b/packages/SystemUI/res/interpolator/ic_fingerprint_tofp_animation_interpolator_5.xml new file mode 100644 index 000000000000..0c18d9293933 --- /dev/null +++ b/packages/SystemUI/res/interpolator/ic_fingerprint_tofp_animation_interpolator_5.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<pathInterpolator +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:pathData="M 0.0,0.0 c 0.8,0.0 0.2,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_0.xml b/packages/SystemUI/res/interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_0.xml deleted file mode 100644 index 708de2a2cb53..000000000000 --- a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_0.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> -<pathInterpolator -    xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.0,0.0 0.29,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_1.xml b/packages/SystemUI/res/interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_1.xml deleted file mode 100644 index 07cae89f22b2..000000000000 --- a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_1.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> -<pathInterpolator -    xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.4,0.0 0.83333333333,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_2.xml b/packages/SystemUI/res/interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_2.xml deleted file mode 100644 index a5ffc400901b..000000000000 --- a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_2.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> -<pathInterpolator -    xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.0,0.0 0.5,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_3.xml b/packages/SystemUI/res/interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_3.xml deleted file mode 100644 index 34156c37a079..000000000000 --- a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_3.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> -<pathInterpolator -    xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.0,0.0 0.9999,0.999933333333 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_4.xml b/packages/SystemUI/res/interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_4.xml deleted file mode 100644 index 24a3d4345796..000000000000 --- a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_4.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> -<pathInterpolator -    xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.0,0.0 0.612659627466,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_5.xml b/packages/SystemUI/res/interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_5.xml deleted file mode 100644 index c0a68e2789a7..000000000000 --- a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_error_state_to_fp_animation_interpolator_5.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> -<pathInterpolator -    xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.0,0.0 0.9999,0.999883333333 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_0.xml b/packages/SystemUI/res/interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_0.xml deleted file mode 100644 index 39c5211fe4f0..000000000000 --- a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_0.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> -<pathInterpolator -    xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.16666666667,0.0 0.83333333333,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_1.xml b/packages/SystemUI/res/interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_1.xml deleted file mode 100644 index 9769a83c0d8a..000000000000 --- a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_1.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> -<pathInterpolator -    xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.312548622571,1.03663900165 0.662518487347,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_2.xml b/packages/SystemUI/res/interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_2.xml deleted file mode 100644 index e10db01ac697..000000000000 --- a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_2.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> -<pathInterpolator -    xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.8,0.0 0.5,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_3.xml b/packages/SystemUI/res/interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_3.xml deleted file mode 100644 index 736eac68f9ca..000000000000 --- a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_3.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> -<pathInterpolator -    xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.4,0.0 0.6,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_4.xml b/packages/SystemUI/res/interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_4.xml deleted file mode 100644 index d3ae9d74ec06..000000000000 --- a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_4.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> -<pathInterpolator -    xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.0,0.0 0.6,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_5.xml b/packages/SystemUI/res/interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_5.xml deleted file mode 100644 index a5ffc400901b..000000000000 --- a/packages/SystemUI/res/interpolator/lockscreen_fingerprint_fp_to_error_state_animation_interpolator_5.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -  ~ Copyright (C) 2015 The Android Open Source Project -  ~ -  ~ Licensed under the Apache License, Version 2.0 (the "License"); -  ~ you may not use this file except in compliance with the License. -  ~ You may obtain a copy of the License at -  ~ -  ~      http://www.apache.org/licenses/LICENSE-2.0 -  ~ -  ~ Unless required by applicable law or agreed to in writing, software -  ~ distributed under the License is distributed on an "AS IS" BASIS, -  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -  ~ See the License for the specific language governing permissions and -  ~ limitations under the License -  --> -<pathInterpolator -    xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.0,0.0 0.5,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_0.xml b/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_0.xml index 9ecee94bc915..7f4fdbfbe38d 100755..100644 --- a/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_0.xml +++ b/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_0.xml @@ -1,8 +1,8 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -Copyright (C) 2015 The Android Open Source Project +Copyright (C) 2017 The Android Open Source Project -   Licensed under the Apache License, Version 2.0 (the "License"); +    Licensed under the Apache License, Version 2.0 (the "License");      you may not use this file except in compliance with the License.      You may obtain a copy of the License at @@ -16,4 +16,4 @@ Copyright (C) 2015 The Android Open Source Project  -->  <pathInterpolator      xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.00010,0.0 0.6,1.0 1.0,1.0" /> +    android:pathData="M 0.0,0.0 c 1.0,0.0 0.6,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_1.xml b/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_1.xml index 87ef1d49d6ab..169596299bef 100755..100644 --- a/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_1.xml +++ b/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_1.xml @@ -1,8 +1,8 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -Copyright (C) 2015 The Android Open Source Project +Copyright (C) 2017 The Android Open Source Project -   Licensed under the Apache License, Version 2.0 (the "License"); +    Licensed under the Apache License, Version 2.0 (the "License");      you may not use this file except in compliance with the License.      You may obtain a copy of the License at @@ -16,4 +16,4 @@ Copyright (C) 2015 The Android Open Source Project  -->  <pathInterpolator      xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 l 0.412907702984,0.0 c 0.00006,0.0 0.35225537821,1.0 0.587092297016,1.0 L 1.0,1.0" /> +    android:pathData="M 0.0,0.0 c 0.4,0.0 0.6,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_2.xml b/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_2.xml index be7cc69ebda1..138851e307d9 100755..100644 --- a/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_2.xml +++ b/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_2.xml @@ -1,8 +1,8 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -Copyright (C) 2015 The Android Open Source Project +Copyright (C) 2017 The Android Open Source Project -   Licensed under the Apache License, Version 2.0 (the "License"); +    Licensed under the Apache License, Version 2.0 (the "License");      you may not use this file except in compliance with the License.      You may obtain a copy of the License at @@ -16,4 +16,4 @@ Copyright (C) 2015 The Android Open Source Project  -->  <pathInterpolator      xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.00010,0.0 0.2,1.0 1.0,1.0" /> +    android:pathData="M 0.0,0.0 c 0.001,0.0 0.2,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_3.xml b/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_3.xml index 83af65a6e60e..7657cb6b1ac7 100755..100644 --- a/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_3.xml +++ b/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_3.xml @@ -1,8 +1,8 @@  <?xml version="1.0" encoding="utf-8"?>  <!-- -Copyright (C) 2015 The Android Open Source Project +Copyright (C) 2017 The Android Open Source Project -   Licensed under the Apache License, Version 2.0 (the "License"); +    Licensed under the Apache License, Version 2.0 (the "License");      you may not use this file except in compliance with the License.      You may obtain a copy of the License at @@ -16,4 +16,4 @@ Copyright (C) 2015 The Android Open Source Project  -->  <pathInterpolator      xmlns:android="http://schemas.android.com/apk/res/android" -    android:pathData="M 0.0,0.0 c 0.4,0.0 0.9999,1.0 1.0,1.0" /> +    android:pathData="M 0.0,0.0 l 0.364238410596,0.0 c 0.127152317881,0.0 0.0,1.0 0.635761589404,1.0 L 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_4.xml b/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_4.xml new file mode 100644 index 000000000000..3e5efd7699ba --- /dev/null +++ b/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_4.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<pathInterpolator +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:pathData="M 0.0,0.0 l 0.4,0.0 c 0.0006,0.0 0.12,1.0 0.6,1.0 L 1.0,1.0" /> diff --git a/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_5.xml b/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_5.xml new file mode 100644 index 000000000000..220209432136 --- /dev/null +++ b/packages/SystemUI/res/interpolator/trusted_state_to_error_animation_interpolator_5.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<pathInterpolator +    xmlns:android="http://schemas.android.com/apk/res/android" +    android:pathData="M 0.0,0.0 c 0.00010,0.0 0.2,1.0 1.0,1.0" /> diff --git a/packages/SystemUI/res/values-bs/strings.xml b/packages/SystemUI/res/values-bs/strings.xml index 8af0ab59cb36..9a6595e860c3 100644 --- a/packages/SystemUI/res/values-bs/strings.xml +++ b/packages/SystemUI/res/values-bs/strings.xml @@ -97,7 +97,7 @@      <string name="phone_label" msgid="2320074140205331708">"otvori telefon"</string>      <string name="voice_assist_label" msgid="3956854378310019854">"otvori glasovnu pomoć"</string>      <string name="camera_label" msgid="7261107956054836961">"otvori kameru"</string> -    <string name="recents_caption_resize" msgid="3517056471774958200">"Izaberite novi raspored zadataka"</string> +    <string name="recents_caption_resize" msgid="3517056471774958200">"Odaberite novi raspored zadataka"</string>      <string name="cancel" msgid="6442560571259935130">"Otkaži"</string>      <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Dugme za uvećavanje u slučaju nekompatibilnosti."</string>      <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Uvećani prikaz manjeg ekrana na većem ekranu."</string> @@ -355,8 +355,8 @@      <string name="description_target_search" msgid="3091587249776033139">"Pretraživanje"</string>      <string name="description_direction_up" msgid="7169032478259485180">"Povucite gore za <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>      <string name="description_direction_left" msgid="7207478719805562165">"Povucite lijevo za <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string> -    <string name="zen_priority_introduction" msgid="7577965386868311310">"Neće vas ometati zvukovi i vibracije, osim alarma, podsjetnika, događaja i pozivalaca koje odredite. I dalje ćete čuti sve što ste izabrali za reprodukciju, uključujući muziku, videozapise i igre."</string> -    <string name="zen_alarms_introduction" msgid="7034415210361973827">"Neće vas ometati zvukovi i vibracije, osim alarma. I dalje ćete čuti sve što ste izabrali za reprodukciju, uključujući muziku, videozapise i igre."</string> +    <string name="zen_priority_introduction" msgid="7577965386868311310">"Neće vas ometati zvukovi i vibracije, osim alarma, podsjetnika, događaja i pozivalaca koje odredite. I dalje ćete čuti sve što ste odabrali za reprodukciju, uključujući muziku, videozapise i igre."</string> +    <string name="zen_alarms_introduction" msgid="7034415210361973827">"Neće vas ometati zvukovi i vibracije, osim alarma. I dalje ćete čuti sve što ste odabrali za reprodukciju, uključujući muziku, videozapise i igre."</string>      <string name="zen_priority_customize_button" msgid="7948043278226955063">"Prilagodi"</string>      <string name="zen_silence_introduction_voice" msgid="2284540992298200729">"Ovim se blokiraju SVI zvukovi i vibracije, uključujući alarme, muziku, videozapise i igre. I dalje ćete moći obavljati pozive."</string>      <string name="zen_silence_introduction" msgid="3137882381093271568">"Ovim se blokiraju SVI zvukovi i vibracije, uključujući alarme, muziku, video zapise i igre."</string> diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml index 7911cab938b7..869bca7a8323 100644 --- a/packages/SystemUI/res/values-de/strings.xml +++ b/packages/SystemUI/res/values-de/strings.xml @@ -314,7 +314,7 @@      <string name="quick_settings_more_settings" msgid="326112621462813682">"Weitere Einstellungen"</string>      <string name="quick_settings_done" msgid="3402999958839153376">"Fertig"</string>      <string name="quick_settings_connected" msgid="1722253542984847487">"Verbunden"</string> -    <string name="quick_settings_connected_battery_level" msgid="4136051440381328892">"Verbunden, Akkustand <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g>"</string> +    <string name="quick_settings_connected_battery_level" msgid="4136051440381328892">"Verbunden, Akkustand: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g>"</string>      <string name="quick_settings_connecting" msgid="47623027419264404">"Verbindung wird hergestellt…"</string>      <string name="quick_settings_tethering_label" msgid="7153452060448575549">"Tethering"</string>      <string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string> diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml index 78457bdb7b8a..bb44d9904eab 100644 --- a/packages/SystemUI/res/values-el/strings.xml +++ b/packages/SystemUI/res/values-el/strings.xml @@ -310,7 +310,7 @@      <string name="quick_settings_more_settings" msgid="326112621462813682">"Περισσότερες ρυθμίσεις"</string>      <string name="quick_settings_done" msgid="3402999958839153376">"Τέλος"</string>      <string name="quick_settings_connected" msgid="1722253542984847487">"Συνδέθηκε"</string> -    <string name="quick_settings_connected_battery_level" msgid="4136051440381328892">"Σύνδεση, μπαταρία <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g>"</string> +    <string name="quick_settings_connected_battery_level" msgid="4136051440381328892">"Συνδεδεμένη, μπαταρία <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g>"</string>      <string name="quick_settings_connecting" msgid="47623027419264404">"Σύνδεση…"</string>      <string name="quick_settings_tethering_label" msgid="7153452060448575549">"Πρόσδεση"</string>      <string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Σημείο πρόσβασης Wi-Fi"</string> diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml index 434b0488dc7b..f8bd8ff3af62 100644 --- a/packages/SystemUI/res/values-es/strings.xml +++ b/packages/SystemUI/res/values-es/strings.xml @@ -155,7 +155,7 @@      <string name="accessibility_cell_data" msgid="5326139158682385073">"Datos móviles"</string>      <string name="accessibility_cell_data_on" msgid="5927098403452994422">"Datos móviles activados"</string>      <string name="accessibility_cell_data_off" msgid="443267573897409704">"Datos móviles desactivados"</string> -    <string name="accessibility_bluetooth_tether" msgid="4102784498140271969">"Compartir por Bluetooth"</string> +    <string name="accessibility_bluetooth_tether" msgid="4102784498140271969">"Compartir conexión por Bluetooth"</string>      <string name="accessibility_airplane_mode" msgid="834748999790763092">"Modo avión"</string>      <string name="accessibility_vpn_on" msgid="5993385083262856059">"La red VPN está activada."</string>      <string name="accessibility_no_sims" msgid="3957997018324995781">"No hay tarjeta SIM."</string> @@ -314,7 +314,7 @@      <string name="quick_settings_connected" msgid="1722253542984847487">"Conectado"</string>      <string name="quick_settings_connected_battery_level" msgid="4136051440381328892">"Conectado (<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g> de batería)"</string>      <string name="quick_settings_connecting" msgid="47623027419264404">"Conectando..."</string> -    <string name="quick_settings_tethering_label" msgid="7153452060448575549">"Compartir Internet"</string> +    <string name="quick_settings_tethering_label" msgid="7153452060448575549">"Compartir conexión"</string>      <string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Zona Wi-Fi"</string>      <string name="quick_settings_notifications_label" msgid="4818156442169154523">"Notificaciones"</string>      <string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Linterna"</string> @@ -407,7 +407,7 @@      <string name="user_remove_user_message" msgid="1453218013959498039">"Se eliminarán todas las aplicaciones y todos los datos de este usuario."</string>      <string name="user_remove_user_remove" msgid="7479275741742178297">"Quitar"</string>      <string name="battery_saver_notification_title" msgid="237918726750955859">"Ahorro de batería activado"</string> -    <string name="battery_saver_notification_text" msgid="820318788126672692">"Reduce el rendimiento y el envío de datos en segundo plano"</string> +    <string name="battery_saver_notification_text" msgid="820318788126672692">"Reduce el rendimiento y los datos en segundo plano"</string>      <string name="battery_saver_notification_action_text" msgid="109158658238110382">"Desactivar ahorro de batería"</string>      <string name="media_projection_dialog_text" msgid="3071431025448218928">"<xliff:g id="APP_SEEKING_PERMISSION">%s</xliff:g> empezará a capturar todo lo que aparezca en la pantalla."</string>      <string name="media_projection_remember_text" msgid="3103510882172746752">"No volver a mostrar"</string> @@ -589,7 +589,7 @@      <string name="battery_panel_title" msgid="7944156115535366613">"Uso de la batería"</string>      <string name="battery_detail_charging_summary" msgid="1279095653533044008">"Ahorro de batería no disponible mientras se carga el dispositivo"</string>      <string name="battery_detail_switch_title" msgid="6285872470260795421">"Ahorro de batería"</string> -    <string name="battery_detail_switch_summary" msgid="9049111149407626804">"Reduce el rendimiento y las conexiones automáticas"</string> +    <string name="battery_detail_switch_summary" msgid="9049111149407626804">"Reduce el rendimiento y los datos en segundo plano"</string>      <string name="keyboard_key_button_template" msgid="6230056639734377300">"Botón <xliff:g id="NAME">%1$s</xliff:g>"</string>      <string name="keyboard_key_home" msgid="2243500072071305073">"Inicio"</string>      <string name="keyboard_key_back" msgid="2337450286042721351">"Atrás"</string> diff --git a/packages/SystemUI/res/values-eu/strings.xml b/packages/SystemUI/res/values-eu/strings.xml index 1e817ddcec7a..0d5e58f576db 100644 --- a/packages/SystemUI/res/values-eu/strings.xml +++ b/packages/SystemUI/res/values-eu/strings.xml @@ -312,8 +312,7 @@      <string name="quick_settings_more_settings" msgid="326112621462813682">"Ezarpen gehiago"</string>      <string name="quick_settings_done" msgid="3402999958839153376">"Eginda"</string>      <string name="quick_settings_connected" msgid="1722253542984847487">"Konektatuta"</string> -    <!-- no translation found for quick_settings_connected_battery_level (4136051440381328892) --> -    <skip /> +    <string name="quick_settings_connected_battery_level" msgid="4136051440381328892">"Konektatuta. Bateria: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g>"</string>      <string name="quick_settings_connecting" msgid="47623027419264404">"Konektatzen…"</string>      <string name="quick_settings_tethering_label" msgid="7153452060448575549">"Konexioa partekatzea"</string>      <string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Sare publikoa"</string> diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml index 3fe787d20fe8..616667163910 100644 --- a/packages/SystemUI/res/values-in/strings.xml +++ b/packages/SystemUI/res/values-in/strings.xml @@ -310,7 +310,7 @@      <string name="quick_settings_more_settings" msgid="326112621462813682">"Setelan lainnya"</string>      <string name="quick_settings_done" msgid="3402999958839153376">"Selesai"</string>      <string name="quick_settings_connected" msgid="1722253542984847487">"Tersambung"</string> -    <string name="quick_settings_connected_battery_level" msgid="4136051440381328892">"Terhubung, daya baterai <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g>"</string> +    <string name="quick_settings_connected_battery_level" msgid="4136051440381328892">"Terhubung, baterai <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g>"</string>      <string name="quick_settings_connecting" msgid="47623027419264404">"Menyambung..."</string>      <string name="quick_settings_tethering_label" msgid="7153452060448575549">"Menambatkan"</string>      <string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string> diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml index 2d4dd17e485d..f424a30dae2c 100644 --- a/packages/SystemUI/res/values-iw/strings.xml +++ b/packages/SystemUI/res/values-iw/strings.xml @@ -534,7 +534,7 @@      <string name="tuner_warning" msgid="8730648121973575701">"System UI Tuner מספק לך דרכים נוספות להתאים אישית את ממשק המשתמש של Android. התכונות הניסיוניות האלה עשויות להשתנות, להתקלקל או להיעלם בגרסאות עתידיות. המשך בזהירות."</string>      <string name="tuner_persistent_warning" msgid="8597333795565621795">"התכונות הניסיוניות האלה עשויות להשתנות, להתקלקל או להיעלם בגרסאות עתידיות. המשך בזהירות."</string>      <string name="got_it" msgid="2239653834387972602">"הבנתי"</string> -    <string name="tuner_toast" msgid="603429811084428439">"מזל טוב! System UI Tuner נוסף ל\'הגדרות\'"</string> +    <string name="tuner_toast" msgid="603429811084428439">"מזל טוב! ה-System UI Tuner נוסף ל\'הגדרות\'"</string>      <string name="remove_from_settings" msgid="8389591916603406378">"הסר מההגדרות"</string>      <string name="remove_from_settings_prompt" msgid="6069085993355887748">"האם להסיר את System UI Tuner ולהפסיק להשתמש בכל התכונות שלו?"</string>      <string name="activity_not_found" msgid="348423244327799974">"האפליקציה אינה מותקנת במכשיר"</string> diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml index cb9c77b7a263..906b40f0d316 100644 --- a/packages/SystemUI/res/values-zh-rCN/strings.xml +++ b/packages/SystemUI/res/values-zh-rCN/strings.xml @@ -310,8 +310,7 @@      <string name="quick_settings_more_settings" msgid="326112621462813682">"更多设置"</string>      <string name="quick_settings_done" msgid="3402999958839153376">"完成"</string>      <string name="quick_settings_connected" msgid="1722253542984847487">"已连接"</string> -    <!-- no translation found for quick_settings_connected_battery_level (4136051440381328892) --> -    <skip /> +    <string name="quick_settings_connected_battery_level" msgid="4136051440381328892">"已连接,电池电量为 <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g>"</string>      <string name="quick_settings_connecting" msgid="47623027419264404">"正在连接…"</string>      <string name="quick_settings_tethering_label" msgid="7153452060448575549">"网络共享"</string>      <string name="quick_settings_hotspot_label" msgid="6046917934974004879">"热点"</string> diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index 91d6b247d3d0..1705f79389bd 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -267,6 +267,12 @@      <!-- Doze: alpha to apply to small icons when dozing -->      <integer name="doze_small_icon_alpha">222</integer><!-- 87% of 0xff --> +    <!-- Doze: the brightness value to use for the lower brightness AOD mode --> +    <integer name="config_doze_aod_brightness_low">6</integer> + +    <!-- Doze: the brightness value to use for the higher brightness AOD mode --> +    <integer name="config_doze_aod_brightness_high">27</integer> +      <!-- Doze: whether the double tap sensor reports 2D touch coordinates -->      <bool name="doze_double_tap_reports_touch_coordinates">false</bool> diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 8807393dcea6..1ff7ae4ccf80 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -814,6 +814,9 @@              burn-in on AOD -->      <dimen name="burn_in_prevention_offset_y">50dp</dimen> +    <!-- padding between the notification stack and the keyguard status view when dozing --> +    <dimen name="dozing_stack_padding">10dp</dimen> +      <dimen name="corner_size">16dp</dimen>      <dimen name="top_padding">0dp</dimen>      <dimen name="bottom_padding">48dp</dimen> diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml index e375a21f0b08..b61c5b55ee12 100644 --- a/packages/SystemUI/res/values/styles.xml +++ b/packages/SystemUI/res/values/styles.xml @@ -308,6 +308,7 @@          <item name="darkIconTheme">@style/DualToneDarkTheme</item>          <item name="bgProtectTextColor">?android:attr/textColorPrimaryInverse</item>          <item name="bgProtectSecondaryTextColor">?android:attr/textColorSecondaryInverse</item> +        <item name="android:colorControlHighlight">?android:attr/textColorSecondaryInverse</item>          <item name="*android:lockPatternStyle">@style/LockPatternStyle</item>      </style> diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java index 2262869603cd..5005f9dd7db2 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java @@ -19,9 +19,11 @@ package com.android.keyguard;  import android.app.ActivityManager;  import android.app.AlarmManager;  import android.content.Context; +import android.content.res.ColorStateList;  import android.content.res.Configuration;  import android.content.res.Resources;  import android.graphics.Color; +import android.graphics.PorterDuff;  import android.os.UserHandle;  import android.support.v4.graphics.ColorUtils;  import android.text.TextUtils; @@ -56,11 +58,14 @@ public class KeyguardStatusView extends GridLayout {      private TextView mOwnerInfo;      private ViewGroup mClockContainer;      private ChargingView mBatteryDoze; +    private View mKeyguardStatusArea;      private View[] mVisibleInDoze;      private boolean mPulsing; -    private float mDarkAmount; +    private float mDarkAmount = 0;      private int mTextColor; +    private int mDateTextColor; +    private int mAlarmTextColor;      private KeyguardUpdateMonitorCallback mInfoCallback = new KeyguardUpdateMonitorCallback() { @@ -126,8 +131,11 @@ public class KeyguardStatusView extends GridLayout {          mClockView.setAccessibilityDelegate(new KeyguardClockAccessibilityDelegate(mContext));          mOwnerInfo = findViewById(R.id.owner_info);          mBatteryDoze = findViewById(R.id.battery_doze); -        mVisibleInDoze = new View[]{mBatteryDoze, mClockView}; +        mKeyguardStatusArea = findViewById(R.id.keyguard_status_area); +        mVisibleInDoze = new View[]{mBatteryDoze, mClockView, mKeyguardStatusArea};          mTextColor = mClockView.getCurrentTextColor(); +        mDateTextColor = mDateView.getCurrentTextColor(); +        mAlarmTextColor = mAlarmStatusView.getCurrentTextColor();          boolean shouldMarquee = KeyguardUpdateMonitor.getInstance(mContext).isDeviceInteractive();          setEnableMarquee(shouldMarquee); @@ -186,8 +194,7 @@ public class KeyguardStatusView extends GridLayout {      }      public int getClockBottom() { -        return mClockView.getBottom() + -                ((MarginLayoutParams) mClockView.getLayoutParams()).bottomMargin; +        return mKeyguardStatusArea.getBottom();      }      public float getClockTextSize() { @@ -304,6 +311,10 @@ public class KeyguardStatusView extends GridLayout {          updateDozeVisibleViews();          mBatteryDoze.setDark(dark);          mClockView.setTextColor(ColorUtils.blendARGB(mTextColor, Color.WHITE, darkAmount)); +        mDateView.setTextColor(ColorUtils.blendARGB(mDateTextColor, Color.WHITE, darkAmount)); +        int blendedAlarmColor = ColorUtils.blendARGB(mAlarmTextColor, Color.WHITE, darkAmount); +        mAlarmStatusView.setTextColor(blendedAlarmColor); +        mAlarmStatusView.setCompoundDrawableTintList(ColorStateList.valueOf(blendedAlarmColor));      }      public void setPulsing(boolean pulsing) { diff --git a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java index 6571294cdb92..907a79e723ac 100644 --- a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java +++ b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java @@ -199,7 +199,7 @@ public class ImageWallpaper extends WallpaperService {              // Load background image dimensions, if we haven't saved them yet              if (mBackgroundWidth <= 0 || mBackgroundHeight <= 0) {                  // Need to load the image to get dimensions -                loadWallpaper(forDraw, true /* needsReset */); +                loadWallpaper(forDraw, false /* needsReset */);                  if (DEBUG) {                      Log.d(TAG, "Reloading, redoing updateSurfaceSize later.");                  } diff --git a/packages/SystemUI/src/com/android/systemui/colorextraction/SysuiColorExtractor.java b/packages/SystemUI/src/com/android/systemui/colorextraction/SysuiColorExtractor.java index ccb81172c75c..44cf003b3dcb 100644 --- a/packages/SystemUI/src/com/android/systemui/colorextraction/SysuiColorExtractor.java +++ b/packages/SystemUI/src/com/android/systemui/colorextraction/SysuiColorExtractor.java @@ -16,6 +16,7 @@  package com.android.systemui.colorextraction; +import android.app.WallpaperColors;  import android.app.WallpaperManager;  import android.content.Context;  import android.os.Handler; @@ -41,16 +42,16 @@ public class SysuiColorExtractor extends ColorExtractor {      private final GradientColors mWpHiddenColors;      public SysuiColorExtractor(Context context) { -        this(context, new Tonal(), true); +        this(context, new Tonal(context), true);      }      @VisibleForTesting      public SysuiColorExtractor(Context context, ExtractionType type, boolean registerVisibility) {          super(context, type); -          mWpHiddenColors = new GradientColors(); -        mWpHiddenColors.setMainColor(FALLBACK_COLOR); -        mWpHiddenColors.setSecondaryColor(FALLBACK_COLOR); + +        WallpaperColors systemColors = getWallpaperColors(WallpaperManager.FLAG_SYSTEM); +        updateDefaultGradients(systemColors);          if (registerVisibility) {              try { @@ -71,6 +72,24 @@ public class SysuiColorExtractor extends ColorExtractor {          }      } +    private void updateDefaultGradients(WallpaperColors colors) { +        Tonal.applyFallback(colors, mWpHiddenColors); +    } + +    @Override +    public void onColorsChanged(WallpaperColors colors, int which) { +        super.onColorsChanged(colors, which); + +        if ((which & WallpaperManager.FLAG_SYSTEM) != 0) { +            updateDefaultGradients(colors); +        } +    } + +    @VisibleForTesting +    GradientColors getFallbackColors() { +        return mWpHiddenColors; +    } +      /**       * Get TYPE_NORMAL colors when wallpaper is visible, or fallback otherwise.       * diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeLog.java b/packages/SystemUI/src/com/android/systemui/doze/DozeLog.java index ce0a151aff28..0993ace8cfcc 100644 --- a/packages/SystemUI/src/com/android/systemui/doze/DozeLog.java +++ b/packages/SystemUI/src/com/android/systemui/doze/DozeLog.java @@ -35,7 +35,7 @@ public class DozeLog {      private static final int SIZE = Build.IS_DEBUGGABLE ? 400 : 50;      static final SimpleDateFormat FORMAT = new SimpleDateFormat("MM-dd HH:mm:ss.SSS"); -    private static final int PULSE_REASONS = 5; +    private static final int PULSE_REASONS = 6;      public static final int PULSE_REASON_NONE = -1;      public static final int PULSE_REASON_INTENT = 0; @@ -43,6 +43,7 @@ public class DozeLog {      public static final int PULSE_REASON_SENSOR_SIGMOTION = 2;      public static final int PULSE_REASON_SENSOR_PICKUP = 3;      public static final int PULSE_REASON_SENSOR_DOUBLE_TAP = 4; +    public static final int PULSE_REASON_SENSOR_LONG_PRESS = 5;      private static boolean sRegisterKeyguardCallback = true; @@ -179,6 +180,7 @@ public class DozeLog {              case PULSE_REASON_SENSOR_SIGMOTION: return "sigmotion";              case PULSE_REASON_SENSOR_PICKUP: return "pickup";              case PULSE_REASON_SENSOR_DOUBLE_TAP: return "doubletap"; +            case PULSE_REASON_SENSOR_LONG_PRESS: return "longpress";              default: throw new IllegalArgumentException("bad reason: " + pulseReason);          }      } diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java b/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java index e461986da5e0..28a45aae6892 100644 --- a/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java +++ b/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java @@ -23,6 +23,9 @@ import android.hardware.SensorEventListener;  import android.hardware.SensorManager;  import android.os.Handler; +import com.android.internal.annotations.VisibleForTesting; +import com.android.systemui.R; +  /**   * Controls the screen brightness when dozing.   */ @@ -34,6 +37,9 @@ public class DozeScreenBrightness implements DozeMachine.Part, SensorEventListen      private final Sensor mLightSensor;      private boolean mRegistered; +    private final int mHighBrightness; +    private final int mLowBrightness; +      public DozeScreenBrightness(Context context, DozeMachine.Service service,              SensorManager sensorManager, Sensor lightSensor, Handler handler) {          mContext = context; @@ -41,6 +47,11 @@ public class DozeScreenBrightness implements DozeMachine.Part, SensorEventListen          mSensorManager = sensorManager;          mLightSensor = lightSensor;          mHandler = handler; + +        mLowBrightness = context.getResources().getInteger( +                R.integer.config_doze_aod_brightness_low); +        mHighBrightness = context.getResources().getInteger( +                R.integer.config_doze_aod_brightness_high);      }      @Override @@ -67,7 +78,17 @@ public class DozeScreenBrightness implements DozeMachine.Part, SensorEventListen      @Override      public void onSensorChanged(SensorEvent event) {          if (mRegistered) { -            mDozeService.setDozeScreenBrightness(Math.max(1, (int) event.values[0])); +            mDozeService.setDozeScreenBrightness(computeBrightness((int) event.values[0])); +        } +    } + +    private int computeBrightness(int sensorValue) { +        // The sensor reports 0 for off, 1 for low brightness and 2 for high brightness. +        // We currently use DozeScreenState for screen off, so we treat off as low brightness. +        if (sensorValue >= 2) { +            return mHighBrightness; +        } else { +            return mLowBrightness;          }      } diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java b/packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java index 545a1ea11be3..0d5527cf6cd9 100644 --- a/packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java +++ b/packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java @@ -98,7 +98,14 @@ public class DozeSensors {                          Settings.Secure.DOZE_PULSE_ON_DOUBLE_TAP,                          true /* configured */,                          DozeLog.PULSE_REASON_SENSOR_DOUBLE_TAP, -                        dozeParameters.doubleTapReportsTouchCoordinates()) +                        dozeParameters.doubleTapReportsTouchCoordinates()), +                new TriggerSensor( +                        findSensorWithType(config.longPressSensorType()), +                        Settings.Secure.DOZE_PULSE_ON_LONG_PRESS, +                        false /* settingDef */, +                        true /* configured */, +                        DozeLog.PULSE_REASON_SENSOR_LONG_PRESS, +                        true /* reports touch coordinates */),          };          mProxSensor = new ProxSensor(); @@ -263,6 +270,7 @@ public class DozeSensors {          final int mPulseReason;          final String mSetting;          final boolean mReportsTouchCoordinates; +        final boolean mSettingDefault;          private boolean mRequested;          private boolean mRegistered; @@ -270,8 +278,15 @@ public class DozeSensors {          public TriggerSensor(Sensor sensor, String setting, boolean configured, int pulseReason,                  boolean reportsTouchCoordinates) { +            this(sensor, setting, true /* settingDef */, configured, pulseReason, +                    reportsTouchCoordinates); +        } + +        public TriggerSensor(Sensor sensor, String setting, boolean settingDef, +                boolean configured, int pulseReason, boolean reportsTouchCoordinates) {              mSensor = sensor;              mSetting = setting; +            mSettingDefault = settingDef;              mConfigured = configured;              mPulseReason = pulseReason;              mReportsTouchCoordinates = reportsTouchCoordinates; @@ -305,7 +320,7 @@ public class DozeSensors {              if (TextUtils.isEmpty(mSetting)) {                  return true;              } -            return Settings.Secure.getIntForUser(mResolver, mSetting, 1, +            return Settings.Secure.getIntForUser(mResolver, mSetting, mSettingDefault ? 1 : 0,                      UserHandle.USER_CURRENT) != 0;          } diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java b/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java index ec6caf183c49..d1f5337b80b0 100644 --- a/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java +++ b/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java @@ -123,8 +123,9 @@ public class DozeTriggers implements DozeMachine.Part {              float screenX, float screenY) {          boolean isDoubleTap = pulseReason == DozeLog.PULSE_REASON_SENSOR_DOUBLE_TAP;          boolean isPickup = pulseReason == DozeLog.PULSE_REASON_SENSOR_PICKUP; +        boolean isLongPress = pulseReason == DozeLog.PULSE_REASON_SENSOR_LONG_PRESS; -        if (mConfig.alwaysOnEnabled(UserHandle.USER_CURRENT)) { +        if (mConfig.alwaysOnEnabled(UserHandle.USER_CURRENT) && !isLongPress) {              proximityCheckThenCall((result) -> {                  if (result == ProximityCheck.RESULT_NEAR) {                      // In pocket, drop event. diff --git a/packages/SystemUI/src/com/android/systemui/qs/CellTileView.java b/packages/SystemUI/src/com/android/systemui/qs/CellTileView.java index 5b3ec08ce752..3d8f9ffe79d7 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/CellTileView.java +++ b/packages/SystemUI/src/com/android/systemui/qs/CellTileView.java @@ -16,12 +16,14 @@ 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.Utils;  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 com.android.systemui.statusbar.phone.SignalDrawable;  import java.util.Objects; @@ -35,7 +37,8 @@ public class CellTileView extends SignalTileView {      public CellTileView(Context context) {          super(context);          mSignalDrawable = new SignalDrawable(mContext); -        mSignalDrawable.setDarkIntensity(isDark(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));      } @@ -48,10 +51,6 @@ public class CellTileView extends SignalTileView {          }      } -    private static int isDark(Context context) { -        return Utils.getColorAttr(context, android.R.attr.colorForeground) == 0xff000000 ? 1 : 0; -    } -      public static class SignalIcon extends Icon {          private final int mState; @@ -68,7 +67,8 @@ public class CellTileView extends SignalTileView {          public Drawable getDrawable(Context context) {              //TODO: Not the optimal solution to create this drawable              SignalDrawable d = new SignalDrawable(context); -            d.setDarkIntensity(isDark(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/SlashDrawable.java b/packages/SystemUI/src/com/android/systemui/qs/SlashDrawable.java index a10aa5413ca9..c35614893098 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/SlashDrawable.java +++ b/packages/SystemUI/src/com/android/systemui/qs/SlashDrawable.java @@ -33,11 +33,12 @@ import android.graphics.PorterDuff.Mode;  import android.graphics.Rect;  import android.graphics.RectF;  import android.graphics.drawable.Drawable; -import android.util.Log;  import android.util.FloatProperty;  public class SlashDrawable extends Drawable { +    public static final float CORNER_RADIUS = 1f; +      private final Path mPath = new Path();      private final Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); @@ -61,6 +62,7 @@ public class SlashDrawable extends Drawable {      private boolean mSlashed;      private Mode mTintMode;      private ColorStateList mTintList; +    private boolean mAnimationEnabled = true;      public SlashDrawable(Drawable d) {          mDrawable = d; @@ -97,6 +99,10 @@ public class SlashDrawable extends Drawable {          invalidateSelf();      } +    public void setAnimationEnabled(boolean enabled) { +        mAnimationEnabled = enabled; +    } +      // Animate this value on change      private float mCurrentSlashLength;      private final FloatProperty mSlashLengthProp = new FloatProperty<SlashDrawable>("slashLength") { @@ -119,12 +125,15 @@ public class SlashDrawable extends Drawable {          final float end = mSlashed ? SLASH_HEIGHT / SCALE : 0f;          final float start = mSlashed ? 0f : SLASH_HEIGHT / SCALE; -        ObjectAnimator anim = ObjectAnimator.ofFloat(this, mSlashLengthProp, start, end); -        anim.addUpdateListener((ValueAnimator valueAnimator) -> { +        if (mAnimationEnabled) { +            ObjectAnimator anim = ObjectAnimator.ofFloat(this, mSlashLengthProp, start, end); +            anim.addUpdateListener((ValueAnimator valueAnimator) -> invalidateSelf()); +            anim.setDuration(QS_ANIM_LENGTH); +            anim.start(); +        } else { +            mCurrentSlashLength = end;              invalidateSelf(); -        }); -        anim.setDuration(QS_ANIM_LENGTH); -        anim.start(); +        }      }      @Override @@ -133,8 +142,8 @@ public class SlashDrawable extends Drawable {          Matrix m = new Matrix();          final int width = getBounds().width();          final int height = getBounds().height(); -        final float radiusX = scale(1f, width); -        final float radiusY = scale(1f, height); +        final float radiusX = scale(CORNER_RADIUS, width); +        final float radiusY = scale(CORNER_RADIUS, height);          updateRect(                  scale(LEFT, width),                  scale(TOP, height), diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java index 5ab3927ff098..8074cb9b0443 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java @@ -98,10 +98,14 @@ public class QSIconViewImpl extends QSIconView {                  d.setAutoMirrored(false);                  d.setLayoutDirection(getLayoutDirection());              } -            iv.setImageDrawable(d); -            if (state.slash != null && iv instanceof SlashImageView) { -                ((SlashImageView) iv).setState(state.slash); + +            if (iv instanceof SlashImageView) { +                ((SlashImageView) iv).setAnimationEnabled(shouldAnimate); +                ((SlashImageView) iv).setState(state.slash, d); +            } else { +                iv.setImageDrawable(d);              } +              iv.setTag(R.id.qs_icon_tag, state.icon);              iv.setTag(R.id.qs_slash_tag, state.slash);              iv.setPadding(0, padding, 0, padding); diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/SlashImageView.java b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/SlashImageView.java index 315a815af100..13912fe0c16d 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/SlashImageView.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/SlashImageView.java @@ -14,8 +14,10 @@  package com.android.systemui.qs.tileimpl; +import android.annotation.Nullable;  import android.content.Context;  import android.graphics.drawable.Drawable; +import android.support.annotation.NonNull;  import android.widget.ImageView;  import com.android.internal.annotations.VisibleForTesting; @@ -26,6 +28,7 @@ public class SlashImageView extends ImageView {      @VisibleForTesting      protected SlashDrawable mSlash; +    private boolean mAnimationEnabled = true;      public SlashImageView(Context context) {          super(context); @@ -34,6 +37,7 @@ public class SlashImageView extends ImageView {      private void ensureSlashDrawable() {          if (mSlash == null) {              mSlash = new SlashDrawable(getDrawable()); +            mSlash.setAnimationEnabled(mAnimationEnabled);              super.setImageDrawable(mSlash);          }      } @@ -46,13 +50,28 @@ public class SlashImageView extends ImageView {          } else if (mSlash == null) {              super.setImageDrawable(drawable);          } else { +            mSlash.setAnimationEnabled(mAnimationEnabled);              mSlash.setDrawable(drawable);          }      } -    public void setState(SlashState slashState) { +    public void setAnimationEnabled(boolean enabled) { +        mAnimationEnabled = enabled; +    } + +    private void setSlashState(@NonNull SlashState slashState) {          ensureSlashDrawable();          mSlash.setRotation(slashState.rotation);          mSlash.setSlashed(slashState.isSlashed);      } + +    public void setState(@Nullable SlashState state, @Nullable Drawable drawable) { +        if (state != null) { +            setImageDrawable(drawable); +            setSlashState(state); +        } else { +            mSlash = null; +            setImageDrawable(drawable); +        } +    }  } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/AnimatedImageView.java b/packages/SystemUI/src/com/android/systemui/statusbar/AnimatedImageView.java index e5aad0336061..ba92c451f764 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/AnimatedImageView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/AnimatedImageView.java @@ -32,7 +32,7 @@ public class AnimatedImageView extends ImageView {      private final boolean mHasOverlappingRendering;      AnimationDrawable mAnim;      boolean mAttached; -    private boolean mAllowAnimation; +    private boolean mAllowAnimation = true;      // Tracks the last image that was set, so that we don't refresh the image if it is exactly      // the same as the previous one. If this is a resid, we track that. If it's a drawable, we diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java index a60102854618..e5f68ad60089 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java @@ -298,7 +298,8 @@ public class NotificationShelf extends ActivatableNotificationView implements      private void updateNotificationClipHeight(ExpandableNotificationRow row,              float notificationClipEnd) {          float viewEnd = row.getTranslationY() + row.getActualHeight(); -        boolean isPinned = row.isPinned() || row.isHeadsUpAnimatingAway(); +        boolean isPinned = (row.isPinned() || row.isHeadsUpAnimatingAway()) +                && !mAmbientState.isDozingAndNotPulsing(row);          if (viewEnd > notificationClipEnd                  && (mAmbientState.isShadeExpanded() || !isPinned)) {              int clipBottomAmount = (int) (viewEnd - notificationClipEnd); @@ -450,7 +451,7 @@ public class NotificationShelf extends ActivatableNotificationView implements                  ? fullTransitionAmount                  : transitionAmount;          iconState.clampedAppearAmount = clampedAmount; -        float contentTransformationAmount = !row.isAboveShelf() +        float contentTransformationAmount = !mAmbientState.isAboveShelf(row)                      && (isLastChild || iconState.translateContent)                  ? iconTransitionAmount                  : 0.0f; @@ -519,7 +520,7 @@ public class NotificationShelf extends ActivatableNotificationView implements                  iconState.scaleY = 1.0f;                  iconState.hidden = false;              } -            if (row.isAboveShelf() || (!row.isInShelf() && (isLastChild && row.areGutsExposed() +            if (mAmbientState.isAboveShelf(row) || (!row.isInShelf() && (isLastChild && row.areGutsExposed()                      || row.getTranslationZ() > mAmbientState.getBaseZHeight()))) {                  iconState.hidden = true;              } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java index 652288d57fe3..e65bab6b4032 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java @@ -78,6 +78,7 @@ public class KeyguardClockPositionAlgorithm {      private AccelerateInterpolator mAccelerateInterpolator = new AccelerateInterpolator();      private int mClockBottom;      private float mDarkAmount; +    private int mDozingStackPadding;      /**       * Refreshes the dimension values. @@ -97,6 +98,7 @@ public class KeyguardClockPositionAlgorithm {                  R.dimen.burn_in_prevention_offset_x);          mBurnInPreventionOffsetY = res.getDimensionPixelSize(                  R.dimen.burn_in_prevention_offset_y); +        mDozingStackPadding = res.getDimensionPixelSize(R.dimen.dozing_stack_padding);      }      public void setup(int maxKeyguardNotifications, int maxPanelHeight, float expandedHeight, @@ -135,7 +137,7 @@ public class KeyguardClockPositionAlgorithm {          result.stackScrollerPadding = (int) interpolate(                  result.stackScrollerPadding, -                mClockBottom + y, +                mClockBottom + y + mDozingStackPadding,                  mDarkAmount);          result.clockX = (int) interpolate(0, burnInPreventionOffsetX(), mDarkAmount); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SignalDrawable.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SignalDrawable.java index d537cda00b10..15ef742af02e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SignalDrawable.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SignalDrawable.java @@ -36,6 +36,7 @@ import android.util.LayoutDirection;  import com.android.settingslib.R;  import com.android.settingslib.Utils; +import com.android.systemui.qs.SlashDrawable;  public class SignalDrawable extends Drawable { @@ -198,6 +199,11 @@ public class SignalDrawable extends Drawable {          return true;      } +    public void setColors(int background, int foreground) { +        mPaint.setColor(background); +        mForegroundPaint.setColor(foreground); +    } +      public void setDarkIntensity(float darkIntensity) {          if (darkIntensity == mOldDarkIntensity) {              return; @@ -333,10 +339,9 @@ public class SignalDrawable extends Drawable {              mForegroundPath.reset();              mFullPath.op(mCutPath, Path.Op.DIFFERENCE);          } else if (mState == STATE_AIRPLANE) { -            // Airplane mode is slashed, full-signal -            mForegroundPath.set(mFullPath); -            mFullPath.reset(); -            mSlash.draw((int) height, (int) width, canvas, mForegroundPaint); +            // 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)); @@ -473,6 +478,7 @@ public class SignalDrawable extends Drawable {          void draw(int height, int width, @NonNull Canvas canvas, Paint paint) {              Matrix m = new Matrix(); +            final float radius = scale(SlashDrawable.CORNER_RADIUS, width);              updateRect(                      scale(LEFT, width),                      scale(TOP, height), @@ -481,7 +487,7 @@ public class SignalDrawable extends Drawable {              mPath.reset();              // Draw the slash vertically -            mPath.addRect(mSlashRect, Direction.CW); +            mPath.addRoundRect(mSlashRect, radius, radius, Direction.CW);              m.setRotate(ROTATION, width / 2, height / 2);              mPath.transform(m);              canvas.drawPath(mPath, paint); @@ -491,7 +497,7 @@ public class SignalDrawable extends Drawable {              mPath.transform(m);              m.setTranslate(mSlashRect.width(), 0);              mPath.transform(m); -            mPath.addRect(mSlashRect, Direction.CW); +            mPath.addRoundRect(mSlashRect, radius, radius, Direction.CW);              m.setRotate(ROTATION, width / 2, height / 2);              mPath.transform(m);              canvas.clipOutPath(mPath); 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 ea6e88af4566..ec6f747db8f3 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -4596,11 +4596,13 @@ public class StatusBar extends SystemUI implements DemoMode,              try {                  mOverlayManager.setEnabled("com.android.systemui.theme.lightwallpaper",                          useDarkText, mCurrentUserId); -                mStatusBarWindowManager.setKeyguardDark(useDarkText);              } catch (RemoteException e) {                  Log.w(TAG, "Can't change theme", e);              }          } + +        // Make sure we have the correct navbar/statusbar colors. +        mStatusBarWindowManager.setKeyguardDark(useDarkText);      }      private void updateDozingState() { @@ -5336,6 +5338,12 @@ public class StatusBar extends SystemUI implements DemoMode,          @Override          public void pulseWhileDozing(@NonNull PulseCallback callback, int reason) { +            if (reason == DozeLog.PULSE_REASON_SENSOR_LONG_PRESS) { +                mPowerManager.wakeUp(SystemClock.uptimeMillis(), "com.android.systemui:NODOZE"); +                startAssist(new Bundle()); +                return; +            } +              mDozeScrimController.pulse(new PulseCallback() {                  @Override @@ -7234,6 +7242,9 @@ public class StatusBar extends SystemUI implements DemoMode,              if (mAccessibilityManager.isTouchExplorationEnabled()) {                  if (DEBUG) Log.d(TAG, "No peeking: accessible fullscreen: " + sbn.getKey());                  return false; +            } else if (mDozing) { +                // We never want heads up when we are dozing. +                return false;              } else {                  // we only allow head-up on the lockscreen if it doesn't have a fullscreen intent                  return !mStatusBarKeyguardViewManager.isShowing() diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java index ba1e7c2d86c5..4d8da441c039 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java @@ -21,11 +21,15 @@ import android.view.View;  import com.android.systemui.R;  import com.android.systemui.statusbar.ActivatableNotificationView; +import com.android.systemui.statusbar.ExpandableNotificationRow; +import com.android.systemui.statusbar.ExpandableView; +import com.android.systemui.statusbar.NotificationData;  import com.android.systemui.statusbar.NotificationShelf;  import com.android.systemui.statusbar.StatusBarState;  import com.android.systemui.statusbar.policy.HeadsUpManager;  import java.util.ArrayList; +import java.util.Collection;  /**   * A global state to track all input states for the algorithm. @@ -59,7 +63,7 @@ public class AmbientState {      private boolean mPanelTracking;      private boolean mExpansionChanging;      private boolean mPanelFullWidth; -    private boolean mHasPulsingNotifications; +    private Collection<HeadsUpManager.HeadsUpEntry> mPulsing;      private boolean mUnlockHintRunning;      private boolean mQsCustomizerShowing;      private int mIntrinsicPadding; @@ -290,11 +294,23 @@ public class AmbientState {      }      public boolean hasPulsingNotifications() { -        return mHasPulsingNotifications; +        return mPulsing != null;      } -    public void setHasPulsingNotifications(boolean hasPulsing) { -        mHasPulsingNotifications = hasPulsing; +    public void setPulsing(Collection<HeadsUpManager.HeadsUpEntry> hasPulsing) { +        mPulsing = hasPulsing; +    } + +    public boolean isPulsing(NotificationData.Entry entry) { +        if (mPulsing == null) { +            return false; +        } +        for (HeadsUpManager.HeadsUpEntry e : mPulsing) { +            if (e.entry == entry) { +                return true; +            } +        } +        return false;      }      public boolean isPanelTracking() { @@ -332,4 +348,34 @@ public class AmbientState {      public int getIntrinsicPadding() {          return mIntrinsicPadding;      } + +    /** +     * Similar to the normal is above shelf logic but doesn't allow it to be above in AOD1. +     * +     * @param expandableView the view to check +     */ +    public boolean isAboveShelf(ExpandableView expandableView) { +        if (!(expandableView instanceof ExpandableNotificationRow)) { +            return expandableView.isAboveShelf(); +        } +        ExpandableNotificationRow row = (ExpandableNotificationRow) expandableView; +        return row.isAboveShelf() && !isDozingAndNotPulsing(row); +    } + +    /** +     * @return whether a view is dozing and not pulsing right now +     */ +    public boolean isDozingAndNotPulsing(ExpandableView view) { +        if (view instanceof ExpandableNotificationRow) { +            return isDozingAndNotPulsing((ExpandableNotificationRow) view); +        } +        return false; +    } + +    /** +     * @return whether a row is dozing and not pulsing right now +     */ +    public boolean isDozingAndNotPulsing(ExpandableNotificationRow row) { +        return isDark() && !isPulsing(row.getEntry()); +    }  } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java index 74523e28c460..00973911ac0d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -805,7 +805,7 @@ public class NotificationStackScrollLayout extends ViewGroup       */      private float getAppearStartPosition() {          if (mTrackingHeadsUp && mFirstVisibleBackgroundChild != null) { -            if (mFirstVisibleBackgroundChild.isAboveShelf()) { +            if (mAmbientState.isAboveShelf(mFirstVisibleBackgroundChild)) {                  // If we ever expanded beyond the first notification, it's allowed to merge into                  // the shelf                  return mFirstVisibleBackgroundChild.getPinnedHeadsUpHeight(); @@ -823,7 +823,8 @@ public class NotificationStackScrollLayout extends ViewGroup          int notGoneChildCount = getNotGoneChildCount();          if (mEmptyShadeView.getVisibility() == GONE && notGoneChildCount != 0) {              int minNotificationsForShelf = 1; -            if (mTrackingHeadsUp || mHeadsUpManager.hasPinnedHeadsUp()) { +            if (mTrackingHeadsUp +                    || (mHeadsUpManager.hasPinnedHeadsUp() && !mAmbientState.isDark())) {                  appearPosition = mHeadsUpManager.getTopHeadsUpPinnedHeight();                  minNotificationsForShelf = 2;              } else { @@ -2008,12 +2009,7 @@ public class NotificationStackScrollLayout extends ViewGroup      }      private boolean isPulsing(NotificationData.Entry entry) { -        for (HeadsUpManager.HeadsUpEntry e : mPulsing) { -            if (e.entry == entry) { -                return true; -            } -        } -        return false; +        return mAmbientState.isPulsing(entry);      }      public boolean hasPulsingNotifications() { @@ -4148,7 +4144,7 @@ public class NotificationStackScrollLayout extends ViewGroup              return;          }          mPulsing = pulsing; -        mAmbientState.setHasPulsingNotifications(hasPulsingNotifications()); +        mAmbientState.setPulsing(pulsing);          updateNotificationAnimationStates();          updateContentHeight();          notifyHeightChangeListener(mShelf); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java index 8235bc7dde07..f4197a3496ea 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java @@ -413,7 +413,7 @@ public class StackScrollAlgorithm {              if (mIsExpanded) {                  // Ensure that the heads up is always visible even when scrolled off                  clampHunToTop(ambientState, row, childState); -                if (i == 0 && row.isAboveShelf()) { +                if (i == 0 && ambientState.isAboveShelf(row)) {                      // the first hun can't get off screen.                      clampHunToMaxTranslation(ambientState, row, childState);                      childState.hidden = false; @@ -515,7 +515,7 @@ public class StackScrollAlgorithm {          ExpandableViewState childViewState = resultState.getViewStateForView(child);          int zDistanceBetweenElements = ambientState.getZDistanceBetweenElements();          float baseZ = ambientState.getBaseZHeight(); -        if (child.mustStayOnScreen() +        if (child.mustStayOnScreen() && !ambientState.isDozingAndNotPulsing(child)                  && childViewState.yTranslation < ambientState.getTopPadding()                  + ambientState.getStackTranslation()) {              if (childrenOnTop != 0.0f) { @@ -527,7 +527,7 @@ public class StackScrollAlgorithm {              }              childViewState.zTranslation = baseZ                      + childrenOnTop * zDistanceBetweenElements; -        } else if (i == 0 && child.isAboveShelf()) { +        } else if (i == 0 && ambientState.isAboveShelf(child)) {              // In case this is a new view that has never been measured before, we don't want to              // elevate if we are currently expanded more then the notification              int shelfHeight = ambientState.getShelf().getIntrinsicHeight(); diff --git a/packages/SystemUI/tests/src/com/android/systemui/colorextraction/SysuiColorExtractorTests.java b/packages/SystemUI/tests/src/com/android/systemui/colorextraction/SysuiColorExtractorTests.java index a81188af85ef..d0f0bfd88883 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/colorextraction/SysuiColorExtractorTests.java +++ b/packages/SystemUI/tests/src/com/android/systemui/colorextraction/SysuiColorExtractorTests.java @@ -48,14 +48,13 @@ public class SysuiColorExtractorTests extends SysuiTestCase {      @Test      public void getColors_usesGreyIfWallpaperNotVisible() { -        ColorExtractor.GradientColors fallbackColors = new ColorExtractor.GradientColors(); -        fallbackColors.setMainColor(ColorExtractor.FALLBACK_COLOR); -        fallbackColors.setSecondaryColor(ColorExtractor.FALLBACK_COLOR); - -        SysuiColorExtractor extractor = new SysuiColorExtractor(getContext(), new Tonal(), false); +        SysuiColorExtractor extractor = new SysuiColorExtractor(getContext(), +                new Tonal(getContext()), false);          simulateEvent(extractor);          extractor.setWallpaperVisible(false); +        ColorExtractor.GradientColors fallbackColors = extractor.getFallbackColors(); +          for (int which : sWhich) {              for (int type : sTypes) {                  assertEquals("Not using fallback!", extractor.getColors(which, type), @@ -76,7 +75,6 @@ public class SysuiColorExtractorTests extends SysuiTestCase {                      outGradientColorsNormal.set(colors);                      outGradientColorsDark.set(colors);                      outGradientColorsExtraDark.set(colors); -                    return true;                  }, false);          simulateEvent(extractor);          extractor.setWallpaperVisible(true); @@ -91,7 +89,7 @@ public class SysuiColorExtractorTests extends SysuiTestCase {      private void simulateEvent(SysuiColorExtractor extractor) {          // Let's fake a color event -        extractor.onColorsChanged(new WallpaperColors(Color.valueOf(Color.BLACK), null, null, 0), +        extractor.onColorsChanged(new WallpaperColors(Color.valueOf(Color.GREEN), null, null, 0),                  WallpaperManager.FLAG_SYSTEM | WallpaperManager.FLAG_LOCK);      }  }
\ No newline at end of file diff --git a/packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenBrightnessTest.java b/packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenBrightnessTest.java index 514dc8b94de5..fe3221af418c 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenBrightnessTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenBrightnessTest.java @@ -38,11 +38,13 @@ import com.android.systemui.SysuiTestCase;  import com.android.systemui.utils.hardware.FakeSensorManager;  import org.junit.Before; +import org.junit.Ignore;  import org.junit.Test;  import org.junit.runner.RunWith;  @RunWith(AndroidJUnit4.class)  @SmallTest +@Ignore  public class DozeScreenBrightnessTest extends SysuiTestCase {      DozeServiceFake mServiceFake; diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/SlashImageViewTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/SlashImageViewTest.java index aef584f8d986..9fe3e10b752e 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/SlashImageViewTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/SlashImageViewTest.java @@ -38,16 +38,29 @@ public class SlashImageViewTest extends SysuiTestCase {      private TestableSlashImageView mSlashView;      @Test -    public void testSetSlashStateCreatesSlashDrawable() { +    public void testSetNonNullSlashStateCreatesSlashDrawable() {          SlashState mockState = mock(SlashState.class);          Drawable mockDrawable = mock(Drawable.class);          mSlashView = new TestableSlashImageView(mContext);          assertTrue(mSlashView.getSlashDrawable() == null); -        mSlashView.setImageDrawable(mockDrawable); -        mSlashView.setState(mockState); +        mSlashView.setState(mockState, mockDrawable); + +        assertTrue(mSlashView.getSlashDrawable() != null); +    } + +    @Test +    public void testSetNullSlashStateRemovesSlashDrawable() { +        SlashState mockState = mock(SlashState.class); +        Drawable mockDrawable = mock(Drawable.class); +        mSlashView = new TestableSlashImageView(mContext); +        mSlashView.setState(mockState, mockDrawable);          assertTrue(mSlashView.getSlashDrawable() != null); + +        mSlashView.setState(null, mockDrawable); + +        assertTrue(mSlashView.getSlashDrawable() == null);      }      @Test @@ -57,7 +70,7 @@ public class SlashImageViewTest extends SysuiTestCase {          mSlashView = new TestableSlashImageView(mContext);          mSlashView.setImageDrawable(mockDrawable); -        mSlashView.setState(mockState); +        mSlashView.setState(mockState, mockDrawable);          mSlashView.setImageDrawable(null);          assertTrue(mSlashView.getSlashDrawable() == null); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java index b88ee442f821..7708adb7c9dd 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java @@ -18,10 +18,10 @@ import org.junit.runner.RunWith;  @SmallTest  @RunWith(AndroidJUnit4.class) -@Ignore("Flaky")  public class NetworkControllerDataTest extends NetworkControllerBaseTest {      @Test +    @Ignore("Flaky")      public void test3gDataIcon() {          setupDefaultSignal(); @@ -30,6 +30,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void test2gDataIcon() {          setupDefaultSignal();          updateDataConnectionState(TelephonyManager.DATA_CONNECTED, @@ -40,6 +41,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testCdmaDataIcon() {          setupDefaultSignal();          updateDataConnectionState(TelephonyManager.DATA_CONNECTED, @@ -50,6 +52,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testEdgeDataIcon() {          setupDefaultSignal();          updateDataConnectionState(TelephonyManager.DATA_CONNECTED, @@ -60,6 +63,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testLteDataIcon() {          setupDefaultSignal();          updateDataConnectionState(TelephonyManager.DATA_CONNECTED, @@ -70,6 +74,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testHspaDataIcon() {          setupDefaultSignal();          updateDataConnectionState(TelephonyManager.DATA_CONNECTED, @@ -80,6 +85,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testWfcNoDataIcon() {          setupDefaultSignal();          updateDataConnectionState(TelephonyManager.DATA_CONNECTED, @@ -89,6 +95,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void test4gDataIcon() {          // Switch to showing 4g icon and re-initialize the NetworkController.          mConfig.show4gForLte = true; @@ -108,6 +115,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testDataDisabledIcon() {          setupNetworkController();          when(mMockTm.getDataEnabled(mSubId)).thenReturn(false); @@ -120,6 +128,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testDataDisabledIcon_UserNotSetup() {          setupNetworkController();          when(mMockTm.getDataEnabled(mSubId)).thenReturn(false); @@ -134,6 +143,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void test4gDataIconConfigChange() {          setupDefaultSignal();          updateDataConnectionState(TelephonyManager.DATA_CONNECTED, @@ -151,6 +161,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testDataChangeWithoutConnectionState() {          setupDefaultSignal();          updateDataConnectionState(TelephonyManager.DATA_CONNECTED, @@ -167,6 +178,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testDataActivity() {          setupDefaultSignal(); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java index 97a406195443..9055022df261 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java @@ -48,10 +48,10 @@ import static org.mockito.Mockito.mock;  @SmallTest  @RunWith(AndroidJUnit4.class) -@Ignore("Flaky")  public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      @Test +    @Ignore("Flaky")      public void testNoIconWithoutMobile() {          // Turn off mobile network support.          Mockito.when(mMockCm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE)).thenReturn(false); @@ -66,6 +66,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testNoSimsIconPresent() {          // No Subscriptions.          mNetworkController.mMobileSignalControllers.clear(); @@ -75,6 +76,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testEmergencyOnly() {          setupDefaultSignal();          mNetworkController.recalculateEmergency(); @@ -86,6 +88,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testEmergencyOnlyNoSubscriptions() {          setupDefaultSignal();          setSubscriptions(); @@ -96,6 +99,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testNoEmergencyOnlyWrongSubscription() {          setupDefaultSignal();          setDefaultSubId(42); @@ -104,6 +108,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testNoEmengencyNoSubscriptions() {          setupDefaultSignal();          setSubscriptions(); @@ -114,6 +119,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testNoSimlessIconWithoutMobile() {          // Turn off mobile network support.          Mockito.when(mMockCm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE)).thenReturn(false); @@ -132,6 +138,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testSignalStrength() {          for (int testStrength = 0;                  testStrength < SignalStrength.NUM_SIGNAL_STRENGTH_BINS; testStrength++) { @@ -149,6 +156,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testCdmaSignalStrength() {          for (int testStrength = 0;                  testStrength < SignalStrength.NUM_SIGNAL_STRENGTH_BINS; testStrength++) { @@ -163,6 +171,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testSignalRoaming() {          for (int testStrength = 0;                  testStrength < SignalStrength.NUM_SIGNAL_STRENGTH_BINS; testStrength++) { @@ -177,6 +186,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testCdmaSignalRoaming() {          for (int testStrength = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN;                  testStrength <= SignalStrength.SIGNAL_STRENGTH_GREAT; testStrength++) { @@ -192,6 +202,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testQsSignalStrength() {          for (int testStrength = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN;                  testStrength <= SignalStrength.SIGNAL_STRENGTH_GREAT; testStrength++) { @@ -205,6 +216,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testCdmaQsSignalStrength() {          for (int testStrength = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN;                  testStrength <= SignalStrength.SIGNAL_STRENGTH_GREAT; testStrength++) { @@ -219,6 +231,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testNoBangWithWifi() {          setupDefaultSignal();          setConnectivity(mMobileSignalController.mTransportType, false, false); @@ -230,6 +243,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      // Some tests of actual NetworkController code, just internals not display stuff      // TODO: Put this somewhere else, maybe in its own file.      @Test +    @Ignore("Flaky")      public void testHasCorrectMobileControllers() {          int[] testSubscriptions = new int[] { 1, 5, 3 };          int notTestSubscription = 0; @@ -257,6 +271,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testSetCurrentSubscriptions() {          // We will not add one controller to make sure it gets created.          int indexToSkipController = 0; @@ -310,6 +325,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testHistorySize() {          // Verify valid history size, otherwise it gits printed out the wrong order and whatnot.          assertEquals(0, SignalController.HISTORY_SIZE & (SignalController.HISTORY_SIZE - 1)); @@ -323,6 +339,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testOnReceive_stringsUpdatedAction_spn() {          String expectedMNetworkName = "Test";          Intent intent = createStringsUpdatedIntent(true /* showSpn */, @@ -336,6 +353,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testOnReceive_stringsUpdatedAction_plmn() {          String expectedMNetworkName = "Test"; @@ -350,6 +368,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testOnReceive_stringsUpdatedAction_bothFalse() {          Intent intent = createStringsUpdatedIntent(false /* showSpn */,                "Irrelevant" /* spn */, @@ -365,6 +384,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testOnReceive_stringsUpdatedAction_bothTrueAndNull() {          Intent intent = createStringsUpdatedIntent(true /* showSpn */,              null /* spn */, @@ -379,6 +399,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testOnReceive_stringsUpdatedAction_bothTrueAndNonNull() {          String spn = "Test1";          String plmn = "Test2"; @@ -413,6 +434,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testOnUpdateDataActivity_dataIn() {          setupDefaultSignal(); @@ -427,6 +449,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testOnUpdateDataActivity_dataOut() {        setupDefaultSignal(); @@ -440,6 +463,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testOnUpdateDataActivity_dataInOut() {        setupDefaultSignal(); @@ -454,6 +478,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testOnUpdateDataActivity_dataActivityNone() {        setupDefaultSignal(); @@ -468,6 +493,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testCarrierNetworkChange_carrierNetworkChange() {        int strength = SignalStrength.SIGNAL_STRENGTH_GREAT; @@ -497,6 +523,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testCarrierNetworkChange_roamingBeforeNetworkChange() {        int strength = SignalStrength.SIGNAL_STRENGTH_GREAT; @@ -530,6 +557,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {      }      @Test +    @Ignore("Flaky")      public void testCarrierNetworkChange_roamingAfterNetworkChange() {        int strength = SignalStrength.SIGNAL_STRENGTH_GREAT; diff --git a/proto/src/gnss.proto b/proto/src/gnss.proto index 33a5584f327b..c54ddadd07df 100644 --- a/proto/src/gnss.proto +++ b/proto/src/gnss.proto @@ -33,4 +33,13 @@ message GnssLog {    // Standard deviation of position accuracy (in meters)    optional int32 standard_deviation_position_accuracy_meters = 8; + +  // Number of top 4 average CN0 processed +  optional int32 num_top_four_average_cn0_processed = 9; + +  // Mean of top 4 average CN0 (dB-Hz) +  optional double mean_top_four_average_cn0_db_hz = 10; + +  // Standard deviation of top 4 average CN0 (dB-Hz) +  optional double standard_deviation_top_four_average_cn0_db_hz = 11;  }
\ No newline at end of file diff --git a/proto/src/metrics_constants.proto b/proto/src/metrics_constants.proto index 78d593e4b92a..d6ca23f7fe2b 100644 --- a/proto/src/metrics_constants.proto +++ b/proto/src/metrics_constants.proto @@ -138,6 +138,18 @@ message MetricsEvent {      REASON_TIMEOUT = 19;    } +  // Subtypes of camera events for ACTION_CAMERA_EVENT +  enum CameraEvent { +    // A back-facing camera was used +    CAMERA_BACK_USED = 0; + +    // A front-facing camera was used +    CAMERA_FRONT_USED = 1; + +    // An external camera was used +    CAMERA_EXTERNAL_USED = 2; +  } +    // Known visual elements: views or controls.    enum View {      // Unknown view @@ -4196,6 +4208,12 @@ message MetricsEvent {      // OS: O DR      DIALOG_BLUETOOTH_PAIRED_DEVICE_FORGET = 1031; +    // An event from the camera service +    // CATEGORY: OTHER +    //  SUBTYPE: CameraEvent +    // OS: O DR +    ACTION_CAMERA_EVENT = 1032; +      // ---- End O-DR1 Constants, all O-DR1 constants go above this line ----      // Add new aosp constants above this line. diff --git a/proto/src/wifi.proto b/proto/src/wifi.proto index fbb1a5753ae0..28e342738172 100644 --- a/proto/src/wifi.proto +++ b/proto/src/wifi.proto @@ -258,6 +258,24 @@ message WifiLog {    // Wi-Fi Aware metrics    optional WifiAwareLog wifi_aware_log = 57; + +  // Number of saved Passpoint providers in user profile. +  optional int32 num_passpoint_providers = 58; + +  // Count of times Passpoint provider being installed. +  optional int32 num_passpoint_provider_installation = 59; + +  // Count of times Passpoint provivider is installed successfully. +  optional int32 num_passpoint_provider_install_success = 60; + +  // Count of times Passpoint provider is being uninstalled. +  optional int32 num_passpoint_provider_uninstallation = 61; + +  // Count of times Passpoint provider is uninstalled successfully. +  optional int32 num_passpoint_provider_uninstall_success = 62; + +  // Count of saved Passpoint providers device has ever connected to. +  optional int32 num_passpoint_providers_successfully_connected = 63;  }  // Information that gets logged for every WiFi connection. diff --git a/services/backup/java/com/android/server/backup/BackupManagerService.java b/services/backup/java/com/android/server/backup/BackupManagerService.java index 4a7eef930f65..abfc31e29eb5 100644 --- a/services/backup/java/com/android/server/backup/BackupManagerService.java +++ b/services/backup/java/com/android/server/backup/BackupManagerService.java @@ -4871,6 +4871,7 @@ public class BackupManagerService implements BackupManagerServiceInterface {                  final int N = mPackages.size();                  final byte[] buffer = new byte[8192];                  for (int i = 0; i < N; i++) { +                    mBackupRunner = null;                      PackageInfo currentPackage = mPackages.get(i);                      String packageName = currentPackage.packageName;                      if (DEBUG) { @@ -5054,7 +5055,13 @@ public class BackupManagerService implements BackupManagerServiceInterface {                          }                          EventLog.writeEvent(EventLogTags.FULL_BACKUP_AGENT_FAILURE, packageName,                                  "transport rejected"); -                        // Do nothing, clean up, and continue looping. +                        // This failure state can come either a-priori from the transport, or +                        // from the preflight pass.  If we got as far as preflight, we now need +                        // to tear down the target process. +                        if (mBackupRunner != null) { +                            tearDownAgentAndKill(currentPackage.applicationInfo); +                        } +                        // ... and continue looping.                      } else if (backupPackageStatus == BackupTransport.TRANSPORT_QUOTA_EXCEEDED) {                          sendBackupOnPackageResult(mBackupObserver, packageName,                                  BackupManager.ERROR_TRANSPORT_QUOTA_EXCEEDED); @@ -5063,6 +5070,7 @@ public class BackupManagerService implements BackupManagerServiceInterface {                              EventLog.writeEvent(EventLogTags.FULL_BACKUP_QUOTA_EXCEEDED,                                      packageName);                          } +                        tearDownAgentAndKill(currentPackage.applicationInfo);                          // Do nothing, clean up, and continue looping.                      } else if (backupPackageStatus == BackupTransport.AGENT_ERROR) {                          sendBackupOnPackageResult(mBackupObserver, packageName, @@ -5086,6 +5094,7 @@ public class BackupManagerService implements BackupManagerServiceInterface {                          EventLog.writeEvent(EventLogTags.FULL_BACKUP_TRANSPORT_FAILURE);                          // Abort entire backup pass.                          backupRunStatus = BackupManager.ERROR_TRANSPORT_ABORTED; +                        tearDownAgentAndKill(currentPackage.applicationInfo);                          return;                      } else {                          // Success! diff --git a/services/core/java/com/android/server/NetworkManagementService.java b/services/core/java/com/android/server/NetworkManagementService.java index 8ea334dbfb17..7959e392d500 100644 --- a/services/core/java/com/android/server/NetworkManagementService.java +++ b/services/core/java/com/android/server/NetworkManagementService.java @@ -18,6 +18,7 @@ package com.android.server;  import static android.Manifest.permission.CONNECTIVITY_INTERNAL;  import static android.Manifest.permission.DUMP; +import static android.Manifest.permission.NETWORK_STACK;  import static android.Manifest.permission.SHUTDOWN;  import static android.net.NetworkPolicyManager.FIREWALL_CHAIN_DOZABLE;  import static android.net.NetworkPolicyManager.FIREWALL_CHAIN_NAME_DOZABLE; @@ -55,6 +56,7 @@ import android.content.Context;  import android.net.ConnectivityManager;  import android.net.INetd;  import android.net.INetworkManagementEventObserver; +import android.net.ITetheringStatsProvider;  import android.net.InterfaceConfiguration;  import android.net.IpPrefix;  import android.net.LinkAddress; @@ -225,6 +227,10 @@ public class NetworkManagementService extends INetworkManagementService.Stub      private final NetworkStatsFactory mStatsFactory = new NetworkStatsFactory(); +    @GuardedBy("mTetheringStatsProviders") +    private final HashMap<ITetheringStatsProvider, String> +            mTetheringStatsProviders = Maps.newHashMap(); +      /**       * If both locks need to be held, then they should be obtained in the order:       * first {@link #mQuotaLock} and then {@link #mRulesLock}. @@ -331,6 +337,10 @@ public class NetworkManagementService extends INetworkManagementService.Stub          Watchdog.getInstance().addMonitor(this);          LocalServices.addService(NetworkManagementInternal.class, new LocalService()); + +        synchronized (mTetheringStatsProviders) { +            mTetheringStatsProviders.put(new NetdTetheringStatsProvider(), "netd"); +        }      }      @VisibleForTesting @@ -520,6 +530,23 @@ public class NetworkManagementService extends INetworkManagementService.Stub          }      } +    @Override +    public void registerTetheringStatsProvider(ITetheringStatsProvider provider, String name) { +        mContext.enforceCallingOrSelfPermission(NETWORK_STACK, TAG); +        Preconditions.checkNotNull(provider); +        synchronized(mTetheringStatsProviders) { +            mTetheringStatsProviders.put(provider, name); +        } +    } + +    @Override +    public void unregisterTetheringStatsProvider(ITetheringStatsProvider provider) { +        mContext.enforceCallingOrSelfPermission(NETWORK_STACK, TAG); +        synchronized(mTetheringStatsProviders) { +            mTetheringStatsProviders.remove(provider); +        } +    } +      // Sync the state of the given chain with the native daemon.      private void syncFirewallChainLocked(int chain, String name) {          SparseIntArray rules; @@ -1789,14 +1816,16 @@ public class NetworkManagementService extends INetworkManagementService.Stub          }      } -    @Override -    public NetworkStats getNetworkStatsTethering() { -        mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); - -        final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 1); -        try { -            final NativeDaemonEvent[] events = mConnector.executeForList( -                    "bandwidth", "gettetherstats"); +    private class NetdTetheringStatsProvider extends ITetheringStatsProvider.Stub { +        @Override +        public NetworkStats getTetherStats() { +            final NativeDaemonEvent[] events; +            try { +                events = mConnector.executeForList("bandwidth", "gettetherstats"); +            } catch (NativeDaemonConnectorException e) { +                throw e.rethrowAsParcelableException(); +            } +            final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 1);              for (NativeDaemonEvent event : events) {                  if (event.getCode() != TetheringStatsListResult) continue; @@ -1822,8 +1851,24 @@ public class NetworkManagementService extends INetworkManagementService.Stub                      throw new IllegalStateException("problem parsing tethering stats: " + event);                  }              } -        } catch (NativeDaemonConnectorException e) { -            throw e.rethrowAsParcelableException(); +            return stats; +        } +    } + +    @Override +    public NetworkStats getNetworkStatsTethering() { +        mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + +        final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 1); +        synchronized (mTetheringStatsProviders) { +            for (ITetheringStatsProvider provider: mTetheringStatsProviders.keySet()) { +                try { +                    stats.combineAllValues(provider.getTetherStats()); +                } catch (RemoteException e) { +                    Log.e(TAG, "Problem reading tethering stats from " + +                            mTetheringStatsProviders.get(provider) + ": " + e); +                } +            }          }          return stats;      } diff --git a/services/core/java/com/android/server/SystemServiceManager.java b/services/core/java/com/android/server/SystemServiceManager.java index 72ff6068cd68..581914db4bfa 100644 --- a/services/core/java/com/android/server/SystemServiceManager.java +++ b/services/core/java/com/android/server/SystemServiceManager.java @@ -18,6 +18,7 @@ package com.android.server;  import android.annotation.NonNull;  import android.content.Context; +import android.os.SystemClock;  import android.os.Trace;  import android.util.Slog; @@ -118,14 +119,14 @@ public class SystemServiceManager {          // Register it.          mServices.add(service);          // Start it. -        long time = System.currentTimeMillis(); +        long time = SystemClock.elapsedRealtime();          try {              service.onStart();          } catch (RuntimeException ex) {              throw new RuntimeException("Failed to start service " + service.getClass().getName()                      + ": onStart threw an exception", ex);          } -        warnIfTooLong(System.currentTimeMillis() - time, service, "onStart"); +        warnIfTooLong(SystemClock.elapsedRealtime() - time, service, "onStart");      }      /** @@ -146,7 +147,7 @@ public class SystemServiceManager {              final int serviceLen = mServices.size();              for (int i = 0; i < serviceLen; i++) {                  final SystemService service = mServices.get(i); -                long time = System.currentTimeMillis(); +                long time = SystemClock.elapsedRealtime();                  Trace.traceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, service.getClass().getName());                  try {                      service.onBootPhase(mCurrentPhase); @@ -156,7 +157,7 @@ public class SystemServiceManager {                              + ": onBootPhase threw an exception during phase "                              + mCurrentPhase, ex);                  } -                warnIfTooLong(System.currentTimeMillis() - time, service, "onBootPhase"); +                warnIfTooLong(SystemClock.elapsedRealtime() - time, service, "onBootPhase");                  Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);              }          } finally { @@ -178,14 +179,14 @@ public class SystemServiceManager {              final SystemService service = mServices.get(i);              Trace.traceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, "onStartUser "                      + service.getClass().getName()); -            long time = System.currentTimeMillis(); +            long time = SystemClock.elapsedRealtime();              try {                  service.onStartUser(userHandle);              } catch (Exception ex) {                  Slog.wtf(TAG, "Failure reporting start of user " + userHandle                          + " to service " + service.getClass().getName(), ex);              } -            warnIfTooLong(System.currentTimeMillis() - time, service, "onStartUser "); +            warnIfTooLong(SystemClock.elapsedRealtime() - time, service, "onStartUser ");              Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);          }      } @@ -197,14 +198,14 @@ public class SystemServiceManager {              final SystemService service = mServices.get(i);              Trace.traceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, "onUnlockUser "                      + service.getClass().getName()); -            long time = System.currentTimeMillis(); +            long time = SystemClock.elapsedRealtime();              try {                  service.onUnlockUser(userHandle);              } catch (Exception ex) {                  Slog.wtf(TAG, "Failure reporting unlock of user " + userHandle                          + " to service " + service.getClass().getName(), ex);              } -            warnIfTooLong(System.currentTimeMillis() - time, service, "onUnlockUser "); +            warnIfTooLong(SystemClock.elapsedRealtime() - time, service, "onUnlockUser ");              Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);          }      } @@ -216,14 +217,14 @@ public class SystemServiceManager {              final SystemService service = mServices.get(i);              Trace.traceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, "onSwitchUser "                      + service.getClass().getName()); -            long time = System.currentTimeMillis(); +            long time = SystemClock.elapsedRealtime();              try {                  service.onSwitchUser(userHandle);              } catch (Exception ex) {                  Slog.wtf(TAG, "Failure reporting switch of user " + userHandle                          + " to service " + service.getClass().getName(), ex);              } -            warnIfTooLong(System.currentTimeMillis() - time, service, "onSwitchUser"); +            warnIfTooLong(SystemClock.elapsedRealtime() - time, service, "onSwitchUser");              Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);          }      } @@ -235,14 +236,14 @@ public class SystemServiceManager {              final SystemService service = mServices.get(i);              Trace.traceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, "onStopUser "                      + service.getClass().getName()); -            long time = System.currentTimeMillis(); +            long time = SystemClock.elapsedRealtime();              try {                  service.onStopUser(userHandle);              } catch (Exception ex) {                  Slog.wtf(TAG, "Failure reporting stop of user " + userHandle                          + " to service " + service.getClass().getName(), ex);              } -            warnIfTooLong(System.currentTimeMillis() - time, service, "onStopUser"); +            warnIfTooLong(SystemClock.elapsedRealtime() - time, service, "onStopUser");              Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);          }      } @@ -254,14 +255,14 @@ public class SystemServiceManager {              final SystemService service = mServices.get(i);              Trace.traceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, "onCleanupUser "                      + service.getClass().getName()); -            long time = System.currentTimeMillis(); +            long time = SystemClock.elapsedRealtime();              try {                  service.onCleanupUser(userHandle);              } catch (Exception ex) {                  Slog.wtf(TAG, "Failure reporting cleanup of user " + userHandle                          + " to service " + service.getClass().getName(), ex);              } -            warnIfTooLong(System.currentTimeMillis() - time, service, "onCleanupUser"); +            warnIfTooLong(SystemClock.elapsedRealtime() - time, service, "onCleanupUser");              Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);          }      } diff --git a/services/core/java/com/android/server/Watchdog.java b/services/core/java/com/android/server/Watchdog.java index b18fa322bd2b..aceedf1ab805 100644 --- a/services/core/java/com/android/server/Watchdog.java +++ b/services/core/java/com/android/server/Watchdog.java @@ -85,8 +85,9 @@ public class Watchdog extends Thread {          "android.hardware.bluetooth@1.0::IBluetoothHci",          "android.hardware.camera.provider@2.4::ICameraProvider",          "android.hardware.graphics.composer@2.1::IComposer", -        "android.hardware.vr@1.0::IVr", -        "android.hardware.media.omx@1.0::IOmx" +        "android.hardware.media.omx@1.0::IOmx", +        "android.hardware.sensors@1.0::ISensors", +        "android.hardware.vr@1.0::IVr"      );      static Watchdog sWatchdog; diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index f106ca0b35cb..75467f514540 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -12460,10 +12460,10 @@ public class ActivityManagerService extends IActivityManager.Stub          switch (mWakefulness) {              case PowerManagerInternal.WAKEFULNESS_AWAKE:              case PowerManagerInternal.WAKEFULNESS_DREAMING: -            case PowerManagerInternal.WAKEFULNESS_DOZING:                  // Pause applications whenever the lock screen is shown or any sleep                  // tokens have been acquired.                  return mKeyguardController.isKeyguardShowing() || !mSleepTokens.isEmpty(); +            case PowerManagerInternal.WAKEFULNESS_DOZING:              case PowerManagerInternal.WAKEFULNESS_ASLEEP:              default:                  // If we're asleep then pause applications unconditionally. diff --git a/services/core/java/com/android/server/am/ActivityRecord.java b/services/core/java/com/android/server/am/ActivityRecord.java index 6a8f6d35c7c0..7a00a549a293 100644 --- a/services/core/java/com/android/server/am/ActivityRecord.java +++ b/services/core/java/com/android/server/am/ActivityRecord.java @@ -42,6 +42,7 @@ import static android.content.Intent.CATEGORY_LAUNCHER;  import static android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS;  import static android.content.Intent.FLAG_ACTIVITY_NO_HISTORY;  import static android.content.pm.ActivityInfo.CONFIG_ORIENTATION; +import static android.content.pm.ActivityInfo.CONFIG_ROTATION;  import static android.content.pm.ActivityInfo.CONFIG_SCREEN_LAYOUT;  import static android.content.pm.ActivityInfo.CONFIG_SCREEN_SIZE;  import static android.content.pm.ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE; @@ -74,6 +75,7 @@ import static android.os.Build.VERSION_CODES.HONEYCOMB;  import static android.os.Build.VERSION_CODES.O;  import static android.os.Process.SYSTEM_UID;  import static android.os.Trace.TRACE_TAG_ACTIVITY_MANAGER; +import static android.view.WindowManagerPolicy.NAV_BAR_LEFT;  import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_CONFIGURATION;  import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_SAVED_STATE; @@ -154,6 +156,7 @@ import android.view.IAppTransitionAnimationSpecsFuture;  import android.view.IApplicationToken;  import android.view.WindowManager.LayoutParams; +import com.android.internal.annotations.VisibleForTesting;  import com.android.internal.app.ResolverActivity;  import com.android.internal.content.ReferrerIntent;  import com.android.internal.util.XmlUtils; @@ -2319,10 +2322,12 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo          outBounds.setEmpty();          final float maxAspectRatio = info.maxAspectRatio;          final ActivityStack stack = getStack(); -        if (task == null || stack == null || !task.mFullscreen || maxAspectRatio == 0) { +        if (task == null || stack == null || !task.mFullscreen || maxAspectRatio == 0 +                || isInVrUiMode(getConfiguration())) {              // We don't set override configuration if that activity task isn't fullscreen. I.e. the              // activity is in multi-window mode. Or, there isn't a max aspect ratio specified for -            // the activity. This is indicated by an empty {@link outBounds}. +            // the activity. This is indicated by an empty {@link outBounds}. We also don't set it +            // if we are in VR mode.              return;          } @@ -2358,6 +2363,17 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo          // Compute configuration based on max supported width and height.          outBounds.set(0, 0, maxActivityWidth, maxActivityHeight); +        // Position the activity frame on the opposite side of the nav bar. +        final int navBarPosition = service.mWindowManager.getNavBarPosition(); +        final int left = navBarPosition == NAV_BAR_LEFT +                ? configuration.appBounds.right - outBounds.width() : 0; +        outBounds.offsetTo(left, 0 /* top */); +    } + +    /** Get bounds of the activity. */ +    @VisibleForTesting +    Rect getBounds() { +        return new Rect(mBounds);      }      /** @@ -2581,6 +2597,10 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo                  changes &= ~CONFIG_SMALLEST_SCREEN_SIZE;              }          } +        // We don't want rotation to cause relaunches. +        if ((changes & CONFIG_ROTATION) != 0) { +            changes &= ~CONFIG_ROTATION; +        }          return changes;      } diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java index 518e12daaeb6..777a36887440 100644 --- a/services/core/java/com/android/server/am/ActivityStack.java +++ b/services/core/java/com/android/server/am/ActivityStack.java @@ -745,6 +745,13 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai          return null;      } +    final TaskRecord bottomTask() { +        if (mTaskHistory.isEmpty()) { +            return null; +        } +        return mTaskHistory.get(0); +    } +      TaskRecord taskForIdLocked(int id) {          for (int taskNdx = mTaskHistory.size() - 1; taskNdx >= 0; --taskNdx) {              final TaskRecord task = mTaskHistory.get(taskNdx); @@ -1902,7 +1909,14 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai                          // the recents activity from an app.                          behindFullscreenActivity = true;                      } - +                } else if (mStackId == FULLSCREEN_WORKSPACE_STACK_ID) { +                    if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Skipping after task=" + task +                            + " returning to non-application type=" + task.getTaskToReturnTo()); +                    // Once we reach a fullscreen task that should return to another task, then no +                    // other activities behind that one should be visible. +                    if (task.getTaskToReturnTo() != APPLICATION_ACTIVITY_TYPE) { +                        behindFullscreenActivity = true; +                    }                  }              } @@ -2887,10 +2901,13 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai                          transit = TRANSIT_TASK_OPEN_BEHIND;                      } else {                          // If a new task is being launched, then mark the existing top activity as -                        // supporting picture-in-picture while pausing +                        // supporting picture-in-picture while pausing only if the starting activity +                        // would not be considered an overlay on top of the current activity +                        // (eg. not fullscreen, or the assistant)                          if (focusedTopActivity != null                                  && focusedTopActivity.getStackId() != PINNED_STACK_ID -                                && r.getStackId() != ASSISTANT_STACK_ID) { +                                && r.getStackId() != ASSISTANT_STACK_ID +                                && r.fullscreen) {                              focusedTopActivity.supportsPictureInPictureWhilePausing = true;                          }                          transit = TRANSIT_TASK_OPEN; @@ -3372,6 +3389,16 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai       * @param allowFocusSelf Is the focus allowed to remain on the same stack.       */      private boolean adjustFocusToNextFocusableStackLocked(String reason, boolean allowFocusSelf) { +        if (isAssistantStack() && bottomTask() != null && +                bottomTask().getTaskToReturnTo() == HOME_ACTIVITY_TYPE) { +            // If the current stack is the assistant stack, then use the return-to type to determine +            // whether to return to the home screen. This is needed to workaround an issue where +            // launching a fullscreen task (and subequently returning from that task) will cause +            // the fullscreen stack to be found as the next focusable stack below, even if the +            // assistant was launched over home. +            return mStackSupervisor.moveHomeStackTaskToTop(reason); +        } +          final ActivityStack stack = mStackSupervisor.getNextFocusableStackLocked(                  allowFocusSelf ? null : this);          final String myReason = reason + " adjustFocusToNextFocusableStack"; @@ -4555,9 +4582,10 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai              updateTransitLocked(TRANSIT_TASK_TO_FRONT, options);          }          // If a new task is moved to the front, then mark the existing top activity as supporting -        // picture-in-picture while paused +        // picture-in-picture while paused only if the task would not be considered an oerlay on top +        // of the current activity (eg. not fullscreen, or the assistant)          if (topActivity != null && topActivity.getStackId() != PINNED_STACK_ID -                && tr.getStackId() != ASSISTANT_STACK_ID) { +                && tr.getStackId() != ASSISTANT_STACK_ID && tr.containsOnlyFullscreenActivities()) {              topActivity.supportsPictureInPictureWhilePausing = true;          } diff --git a/services/core/java/com/android/server/am/TaskRecord.java b/services/core/java/com/android/server/am/TaskRecord.java index 4f211e37eddd..96d857354f1a 100644 --- a/services/core/java/com/android/server/am/TaskRecord.java +++ b/services/core/java/com/android/server/am/TaskRecord.java @@ -1112,6 +1112,19 @@ final class TaskRecord extends ConfigurationContainer implements TaskWindowConta          return intent != null ? intent : affinityIntent;      } +    /** +     * @return Whether there are only fullscreen activities in this task. +     */ +    boolean containsOnlyFullscreenActivities() { +        for (int i = 0; i < mActivities.size(); i++) { +            final ActivityRecord r = mActivities.get(i); +            if (!r.finishing && !r.fullscreen) { +                return false; +            } +        } +        return true; +    } +      /** Returns the first non-finishing activity from the root. */      ActivityRecord getRootActivity() {          for (int i = 0; i < mActivities.size(); i++) { diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index d5ff99a614ae..dda8c1ca2080 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -648,20 +648,29 @@ public class AudioService extends IAudioService.Stub          mHasVibrator = vibrator == null ? false : vibrator.hasVibrator();          // Initialize volume -        int maxVolume = SystemProperties.getInt("ro.config.vc_call_vol_steps", -                MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL]); -        if (maxVolume != MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL]) { -            MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = maxVolume; -            AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = (maxVolume * 3) / 4; -        } -        maxVolume = SystemProperties.getInt("ro.config.media_vol_steps", -                MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]); -        if (maxVolume != MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]) { -            MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = maxVolume; +        int maxCallVolume = SystemProperties.getInt("ro.config.vc_call_vol_steps", -1); +        if (maxCallVolume != -1) { +            MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = maxCallVolume; +            AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = +                    (maxCallVolume * 3) / 4; +        } + +        int maxMusicVolume = SystemProperties.getInt("ro.config.media_vol_steps", -1); +        if (maxMusicVolume != -1) { +            MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = maxMusicVolume; +        } + +        int defaultMusicVolume = SystemProperties.getInt("ro.config.media_vol_default", -1); +        if (defaultMusicVolume != -1 && +                defaultMusicVolume <= MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]) { +            AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = defaultMusicVolume; +        } else {              if (isPlatformTelevision()) { -                AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = maxVolume / 4; +                AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = +                        MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] / 4;              } else { -                AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = (maxVolume * 3) / 4; +                AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = +                        MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] / 3;              }          } @@ -982,6 +991,19 @@ public class AudioService extends IAudioService.Stub          checkAllFixedVolumeDevices();          checkAllAliasStreamVolumes();          checkMuteAffectedStreams(); +        updateDefaultVolumes(); +    } + +    // Update default indexes from aliased streams. Must be called after mStreamStates is created +    private void updateDefaultVolumes() { +        for (int stream = 0; stream < mStreamStates.length; stream++) { +            if (stream != mStreamVolumeAlias[stream]) { +                AudioSystem.DEFAULT_STREAM_VOLUME[stream] = rescaleIndex( +                        AudioSystem.DEFAULT_STREAM_VOLUME[mStreamVolumeAlias[stream]], +                        mStreamVolumeAlias[stream], +                        stream); +            } +        }      }      private void dumpStreamStates(PrintWriter pw) { @@ -1030,7 +1052,9 @@ public class AudioService extends IAudioService.Stub          mStreamVolumeAlias[AudioSystem.STREAM_DTMF] = dtmfStreamAlias;          mStreamVolumeAlias[AudioSystem.STREAM_ACCESSIBILITY] = a11yStreamAlias; -        if (updateVolumes) { +        if (updateVolumes && mStreamStates != null) { +            updateDefaultVolumes(); +              mStreamStates[AudioSystem.STREAM_DTMF].setAllIndexes(mStreamStates[dtmfStreamAlias],                      caller); diff --git a/services/core/java/com/android/server/camera/CameraServiceProxy.java b/services/core/java/com/android/server/camera/CameraServiceProxy.java index d1558254a1fb..3133a51a5fb5 100644 --- a/services/core/java/com/android/server/camera/CameraServiceProxy.java +++ b/services/core/java/com/android/server/camera/CameraServiceProxy.java @@ -21,6 +21,7 @@ import android.content.Intent;  import android.content.IntentFilter;  import android.hardware.ICameraService;  import android.hardware.ICameraServiceProxy; +import android.metrics.LogMaker;  import android.nfc.INfcAdapter;  import android.os.Binder;  import android.os.Handler; @@ -28,15 +29,23 @@ import android.os.IBinder;  import android.os.Message;  import android.os.Process;  import android.os.RemoteException; +import android.os.SystemClock;  import android.os.SystemProperties;  import android.os.UserManager; +import android.util.ArrayMap;  import android.util.ArraySet;  import android.util.Slog; +import com.android.internal.logging.MetricsLogger; +import com.android.internal.logging.nano.MetricsProto.MetricsEvent; +import com.android.server.LocalServices;  import com.android.server.ServiceThread;  import com.android.server.SystemService; +import java.util.ArrayList;  import java.util.Collection; +import java.util.Collections; +import java.util.List;  import java.util.Set;  /** @@ -56,12 +65,6 @@ public class CameraServiceProxy extends SystemService      public static final String CAMERA_SERVICE_PROXY_BINDER_NAME = "media.camera.proxy"; -    // State arguments to use with the notifyCameraState call from camera service: -    public static final int CAMERA_STATE_OPEN = 0; -    public static final int CAMERA_STATE_ACTIVE = 1; -    public static final int CAMERA_STATE_IDLE = 2; -    public static final int CAMERA_STATE_CLOSED = 3; -      // Flags arguments to NFC adapter to enable/disable NFC      public static final int DISABLE_POLLING_FLAGS = 0x1000;      public static final int ENABLE_POLLING_FLAGS = 0x0000; @@ -71,6 +74,9 @@ public class CameraServiceProxy extends SystemService      private static final int RETRY_DELAY_TIME = 20; //ms +    // Maximum entries to keep in usage history before dumping out +    private static final int MAX_USAGE_HISTORY = 100; +      private final Context mContext;      private final ServiceThread mHandlerThread;      private final Handler mHandler; @@ -82,14 +88,52 @@ public class CameraServiceProxy extends SystemService      private ICameraService mCameraServiceRaw; -    private final ArraySet<String> mActiveCameraIds = new ArraySet<>(); - +    private final ArrayMap<String, CameraUsageEvent> mActiveCameraUsage = new ArrayMap<>(); +    private final List<CameraUsageEvent> mCameraUsageHistory = new ArrayList<>(); +    private final MetricsLogger mLogger = new MetricsLogger();      private static final String NFC_NOTIFICATION_PROP = "ro.camera.notify_nfc";      private static final String NFC_SERVICE_BINDER_NAME = "nfc";      private static final IBinder nfcInterfaceToken = new Binder();      private final boolean mNotifyNfc; -    private int mActiveCameraCount = 0; + +    /** +     * Structure to track camera usage +     */ +    private static class CameraUsageEvent { +        public final int mCameraFacing; +        public final String mClientName; + +        private boolean mCompleted; +        private long mDurationOrStartTimeMs;  // Either start time, or duration once completed + +        public CameraUsageEvent(int facing, String clientName) { +            mCameraFacing = facing; +            mClientName = clientName; +            mDurationOrStartTimeMs = SystemClock.elapsedRealtime(); +            mCompleted = false; +        } + +        public void markCompleted() { +            if (mCompleted) { +                return; +            } +            mCompleted = true; +            mDurationOrStartTimeMs = SystemClock.elapsedRealtime() - mDurationOrStartTimeMs; +            if (CameraServiceProxy.DEBUG) { +                Slog.v(TAG, "A camera facing " + cameraFacingToString(mCameraFacing) + +                        " was in use by " + mClientName + " for " + +                        mDurationOrStartTimeMs + " ms"); +            } +        } + +        /** +         * Return duration of camera usage event, or 0 if the event is not done +         */ +        public long getDuration() { +            return mCompleted ? mDurationOrStartTimeMs : 0; +        } +    }      private final BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {          @Override @@ -123,11 +167,14 @@ public class CameraServiceProxy extends SystemService          }          @Override -        public void notifyCameraState(String cameraId, int newCameraState) { +        public void notifyCameraState(String cameraId, int newCameraState, int facing, +                String clientName) {              String state = cameraStateToString(newCameraState); -            if (DEBUG) Slog.v(TAG, "Camera " + cameraId + " state now " + state); +            String facingStr = cameraFacingToString(facing); +            if (DEBUG) Slog.v(TAG, "Camera " + cameraId + " facing " + facingStr + " state now " + +                    state + " for client " + clientName); -            updateActivityCount(cameraId, newCameraState); +            updateActivityCount(cameraId, newCameraState, facing, clientName);          }      }; @@ -173,6 +220,9 @@ public class CameraServiceProxy extends SystemService          mContext.registerReceiver(mIntentReceiver, filter);          publishBinderService(CAMERA_SERVICE_PROXY_BINDER_NAME, mCameraServiceProxy); +        publishLocalService(CameraServiceProxy.class, this); + +        CameraStatsJobService.schedule(mContext);      }      @Override @@ -202,8 +252,8 @@ public class CameraServiceProxy extends SystemService              mCameraServiceRaw = null;              // All cameras reset to idle on camera service death -            boolean wasEmpty = mActiveCameraIds.isEmpty(); -            mActiveCameraIds.clear(); +            boolean wasEmpty = mActiveCameraUsage.isEmpty(); +            mActiveCameraUsage.clear();              if ( mNotifyNfc && !wasEmpty ) {                  notifyNfcService(/*enablePolling*/ true); @@ -211,6 +261,46 @@ public class CameraServiceProxy extends SystemService          }      } +    /** +     * Dump camera usage events to log. +     * Package-private +     */ +    void dumpUsageEvents() { +        synchronized(mLock) { +            // Randomize order of events so that it's not meaningful +            Collections.shuffle(mCameraUsageHistory); +            for (CameraUsageEvent e : mCameraUsageHistory) { +                if (DEBUG) { +                    Slog.v(TAG, "Camera: " + e.mClientName + " used a camera facing " + +                            cameraFacingToString(e.mCameraFacing) + " for " + +                            e.getDuration() + " ms"); +                } +                int subtype = 0; +                switch(e.mCameraFacing) { +                    case ICameraServiceProxy.CAMERA_FACING_BACK: +                        subtype = MetricsEvent.CAMERA_BACK_USED; +                        break; +                    case ICameraServiceProxy.CAMERA_FACING_FRONT: +                        subtype = MetricsEvent.CAMERA_FRONT_USED; +                        break; +                    case ICameraServiceProxy.CAMERA_FACING_EXTERNAL: +                        subtype = MetricsEvent.CAMERA_EXTERNAL_USED; +                        break; +                    default: +                        continue; +                } +                LogMaker l = new LogMaker(MetricsEvent.ACTION_CAMERA_EVENT) +                        .setType(MetricsEvent.TYPE_ACTION) +                        .setSubtype(subtype) +                        .setLatency(e.getDuration()) +                        .setPackageName(e.mClientName); +                mLogger.write(l); +            } +            mCameraUsageHistory.clear(); +        } +        CameraStatsJobService.schedule(mContext); +    } +      private void switchUserLocked(int userHandle) {          Set<Integer> currentUserHandles = getEnabledUserHandles(userHandle);          mLastUser = userHandle; @@ -278,21 +368,35 @@ public class CameraServiceProxy extends SystemService          return true;      } -    private void updateActivityCount(String cameraId, int newCameraState) { +    private void updateActivityCount(String cameraId, int newCameraState, int facing, String clientName) {          synchronized(mLock) { -            boolean wasEmpty = mActiveCameraIds.isEmpty(); +            // Update active camera list and notify NFC if necessary +            boolean wasEmpty = mActiveCameraUsage.isEmpty();              switch (newCameraState) { -                case CAMERA_STATE_OPEN: +                case ICameraServiceProxy.CAMERA_STATE_OPEN:                      break; -                case CAMERA_STATE_ACTIVE: -                    mActiveCameraIds.add(cameraId); +                case ICameraServiceProxy.CAMERA_STATE_ACTIVE: +                    CameraUsageEvent newEvent = new CameraUsageEvent(facing, clientName); +                    CameraUsageEvent oldEvent = mActiveCameraUsage.put(cameraId, newEvent); +                    if (oldEvent != null) { +                        Slog.w(TAG, "Camera " + cameraId + " was already marked as active"); +                        oldEvent.markCompleted(); +                        mCameraUsageHistory.add(oldEvent); +                    }                      break; -                case CAMERA_STATE_IDLE: -                case CAMERA_STATE_CLOSED: -                    mActiveCameraIds.remove(cameraId); +                case ICameraServiceProxy.CAMERA_STATE_IDLE: +                case ICameraServiceProxy.CAMERA_STATE_CLOSED: +                    CameraUsageEvent doneEvent = mActiveCameraUsage.remove(cameraId); +                    if (doneEvent != null) { +                        doneEvent.markCompleted(); +                        mCameraUsageHistory.add(doneEvent); +                        if (mCameraUsageHistory.size() > MAX_USAGE_HISTORY) { +                            dumpUsageEvents(); +                        } +                    }                      break;              } -            boolean isEmpty = mActiveCameraIds.isEmpty(); +            boolean isEmpty = mActiveCameraUsage.isEmpty();              if ( mNotifyNfc && (wasEmpty != isEmpty) ) {                  notifyNfcService(isEmpty);              } @@ -328,12 +432,23 @@ public class CameraServiceProxy extends SystemService      private static String cameraStateToString(int newCameraState) {          switch (newCameraState) { -            case CAMERA_STATE_OPEN: return "CAMERA_STATE_OPEN"; -            case CAMERA_STATE_ACTIVE: return "CAMERA_STATE_ACTIVE"; -            case CAMERA_STATE_IDLE: return "CAMERA_STATE_IDLE"; -            case CAMERA_STATE_CLOSED: return "CAMERA_STATE_CLOSED"; +            case ICameraServiceProxy.CAMERA_STATE_OPEN: return "CAMERA_STATE_OPEN"; +            case ICameraServiceProxy.CAMERA_STATE_ACTIVE: return "CAMERA_STATE_ACTIVE"; +            case ICameraServiceProxy.CAMERA_STATE_IDLE: return "CAMERA_STATE_IDLE"; +            case ICameraServiceProxy.CAMERA_STATE_CLOSED: return "CAMERA_STATE_CLOSED";              default: break;          }          return "CAMERA_STATE_UNKNOWN";      } + +    private static String cameraFacingToString(int cameraFacing) { +        switch (cameraFacing) { +            case ICameraServiceProxy.CAMERA_FACING_BACK: return "CAMERA_FACING_BACK"; +            case ICameraServiceProxy.CAMERA_FACING_FRONT: return "CAMERA_FACING_FRONT"; +            case ICameraServiceProxy.CAMERA_FACING_EXTERNAL: return "CAMERA_FACING_EXTERNAL"; +            default: break; +        } +        return "CAMERA_FACING_UNKNOWN"; +    } +  } diff --git a/services/core/java/com/android/server/camera/CameraStatsJobService.java b/services/core/java/com/android/server/camera/CameraStatsJobService.java new file mode 100644 index 000000000000..b8a6846ced76 --- /dev/null +++ b/services/core/java/com/android/server/camera/CameraStatsJobService.java @@ -0,0 +1,77 @@ +/* + * 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/LICENSE2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * 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.camera; + +import android.app.job.JobInfo; +import android.app.job.JobParameters; +import android.app.job.JobScheduler; +import android.app.job.JobService; +import android.content.ComponentName; +import android.content.ContentResolver; +import android.content.Context; +import android.util.Slog; + +import java.util.concurrent.TimeUnit; + +import com.android.server.LocalServices; + +/** + * A JobService to periodically collect camera usage stats. + */ +public class CameraStatsJobService extends JobService { +    private static final String TAG = "CameraStatsJobService"; + +    // Must be unique within UID (system service) +    private static final int CAMERA_REPORTING_JOB_ID = 0xCA3E7A; + +    private static ComponentName sCameraStatsJobServiceName = new ComponentName( +            "android", +            CameraStatsJobService.class.getName()); + +    @Override +    public boolean onStartJob(JobParameters params) { +        CameraServiceProxy serviceProxy = LocalServices.getService(CameraServiceProxy.class); +        if (serviceProxy == null) { +            Slog.w(TAG, "Can't collect camera usage stats - no camera service proxy found"); +            return false; +        } + +        serviceProxy.dumpUsageEvents(); +        return false; +    } + +    @Override +    public boolean onStopJob(JobParameters params) { +        // All work is done in onStartJob, so nothing to stop here +        return false; +    } + +    public static void schedule(Context context) { + +        JobScheduler js = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE); +        if (js == null) { +            Slog.e(TAG, "Can't collect camera usage stats - no Job Scheduler"); +            return; +        } +        js.schedule(new JobInfo.Builder(CAMERA_REPORTING_JOB_ID, sCameraStatsJobServiceName) +                .setMinimumLatency(TimeUnit.DAYS.toMillis(1)) +                .setRequiresDeviceIdle(true) +                .build()); + +    } + +} diff --git a/services/core/java/com/android/server/connectivity/Tethering.java b/services/core/java/com/android/server/connectivity/Tethering.java index 1bee594de9f1..b0be8f7b9635 100644 --- a/services/core/java/com/android/server/connectivity/Tethering.java +++ b/services/core/java/com/android/server/connectivity/Tethering.java @@ -57,6 +57,7 @@ import android.net.NetworkRequest;  import android.net.NetworkState;  import android.net.NetworkUtils;  import android.net.RouteInfo; +import android.net.util.PrefixUtils;  import android.net.util.SharedLog;  import android.net.wifi.WifiManager;  import android.os.Binder; @@ -213,13 +214,13 @@ public class Tethering extends BaseNetworkObserver {          final Handler smHandler = mTetherMasterSM.getHandler();          mOffloadController = new OffloadController(smHandler,                  deps.getOffloadHardwareInterface(smHandler, mLog), -                mContext.getContentResolver(), +                mContext.getContentResolver(), mNMService,                  mLog);          mUpstreamNetworkMonitor = new UpstreamNetworkMonitor( -                mContext, mTetherMasterSM, mLog, TetherMasterSM.EVENT_UPSTREAM_CALLBACK ); +                mContext, mTetherMasterSM, mLog, TetherMasterSM.EVENT_UPSTREAM_CALLBACK);          mForwardedDownstreams = new HashSet<>();          mSimChange = new SimChangeListener( -                mContext, mTetherMasterSM.getHandler(), () -> reevaluateSimCardProvisioning()); +                mContext, smHandler, () -> reevaluateSimCardProvisioning());          mStateReceiver = new StateReceiver();          IntentFilter filter = new IntentFilter(); @@ -227,13 +228,13 @@ public class Tethering extends BaseNetworkObserver {          filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);          filter.addAction(WifiManager.WIFI_AP_STATE_CHANGED_ACTION);          filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED); -        mContext.registerReceiver(mStateReceiver, filter, null, mTetherMasterSM.getHandler()); +        mContext.registerReceiver(mStateReceiver, filter, null, smHandler);          filter = new IntentFilter();          filter.addAction(Intent.ACTION_MEDIA_SHARED);          filter.addAction(Intent.ACTION_MEDIA_UNSHARED);          filter.addDataScheme("file"); -        mContext.registerReceiver(mStateReceiver, filter, null, mTetherMasterSM.getHandler()); +        mContext.registerReceiver(mStateReceiver, filter, null, smHandler);          // load device config info          updateConfiguration(); @@ -255,6 +256,12 @@ public class Tethering extends BaseNetworkObserver {          mUpstreamNetworkMonitor.updateMobileRequiresDun(mConfig.isDunRequired);      } +    private void maybeUpdateConfiguration() { +        final int dunCheck = TetheringConfiguration.checkDunRequired(mContext); +        if (dunCheck == mConfig.dunCheck) return; +        updateConfiguration(); +    } +      @Override      public void interfaceStatusChanged(String iface, boolean up) {          // Never called directly: only called from interfaceLinkStateChanged. @@ -1136,12 +1143,6 @@ public class Tethering extends BaseNetworkObserver {          }      } -    private void startOffloadController() { -        mOffloadController.start(); -        mOffloadController.updateExemptPrefixes( -                mUpstreamNetworkMonitor.getOffloadExemptPrefixes()); -    } -      class TetherMasterSM extends StateMachine {          private static final int BASE_MASTER                    = Protocol.BASE_TETHERING;          // an interface SM has requested Tethering/Local Hotspot @@ -1159,14 +1160,14 @@ public class Tethering extends BaseNetworkObserver {          static final int CMD_CLEAR_ERROR                        = BASE_MASTER + 6;          static final int EVENT_IFACE_UPDATE_LINKPROPERTIES      = BASE_MASTER + 7; -        private State mInitialState; -        private State mTetherModeAliveState; +        private final State mInitialState; +        private final State mTetherModeAliveState; -        private State mSetIpForwardingEnabledErrorState; -        private State mSetIpForwardingDisabledErrorState; -        private State mStartTetheringErrorState; -        private State mStopTetheringErrorState; -        private State mSetDnsForwardersErrorState; +        private final State mSetIpForwardingEnabledErrorState; +        private final State mSetIpForwardingDisabledErrorState; +        private final State mStartTetheringErrorState; +        private final State mStopTetheringErrorState; +        private final State mSetDnsForwardersErrorState;          // This list is a little subtle.  It contains all the interfaces that currently are          // requesting tethering, regardless of whether these interfaces are still members of @@ -1206,22 +1207,46 @@ public class Tethering extends BaseNetworkObserver {              mNotifyList = new ArrayList<>();              mIPv6TetheringCoordinator = new IPv6TetheringCoordinator(mNotifyList, mLog); +              setInitialState(mInitialState);          } +        private void startOffloadController() { +            mOffloadController.start(); +            sendOffloadExemptPrefixes(); +        } + +        private void sendOffloadExemptPrefixes() { +            sendOffloadExemptPrefixes(mUpstreamNetworkMonitor.getLocalPrefixes()); +        } + +        private void sendOffloadExemptPrefixes(Set<IpPrefix> localPrefixes) { +            // Add in well-known minimum set. +            PrefixUtils.addNonForwardablePrefixes(localPrefixes); +            // Add tragically hardcoded prefixes. +            localPrefixes.add(PrefixUtils.DEFAULT_WIFI_P2P_PREFIX); + +            // Add prefixes for all downstreams, regardless of IP serving mode. +            for (TetherInterfaceStateMachine tism : mNotifyList) { +                localPrefixes.addAll(PrefixUtils.localPrefixesFrom(tism.linkProperties())); +            } + +            mOffloadController.setLocalPrefixes(localPrefixes); +        } +          class InitialState extends State {              @Override              public boolean processMessage(Message message) {                  logMessage(this, message.what);                  switch (message.what) {                      case EVENT_IFACE_SERVING_STATE_ACTIVE: -                        TetherInterfaceStateMachine who = (TetherInterfaceStateMachine)message.obj; +                        TetherInterfaceStateMachine who = (TetherInterfaceStateMachine) message.obj;                          if (VDBG) Log.d(TAG, "Tether Mode requested by " + who);                          handleInterfaceServingStateActive(message.arg1, who);                          transitionTo(mTetherModeAliveState);                          break;                      case EVENT_IFACE_SERVING_STATE_INACTIVE: -                        who = (TetherInterfaceStateMachine)message.obj; +                        who = (TetherInterfaceStateMachine) message.obj;                          if (VDBG) Log.d(TAG, "Tether Mode unrequested by " + who);                          handleInterfaceServingStateInactive(who);                          break; @@ -1283,7 +1308,9 @@ public class Tethering extends BaseNetworkObserver {          }          protected void chooseUpstreamType(boolean tryCell) { -            updateConfiguration(); // TODO - remove? +            // We rebuild configuration on ACTION_CONFIGURATION_CHANGED, but we +            // do not currently know how to watch for changes in DUN settings. +            maybeUpdateConfiguration();              final NetworkState ns = mUpstreamNetworkMonitor.selectPreferredUpstreamType(                      mConfig.preferredUpstreamIfaceTypes); @@ -1414,8 +1441,8 @@ public class Tethering extends BaseNetworkObserver {          }          private void handleUpstreamNetworkMonitorCallback(int arg1, Object o) { -            if (arg1 == UpstreamNetworkMonitor.NOTIFY_EXEMPT_PREFIXES) { -                mOffloadController.updateExemptPrefixes((Set<IpPrefix>) o); +            if (arg1 == UpstreamNetworkMonitor.NOTIFY_LOCAL_PREFIXES) { +                sendOffloadExemptPrefixes((Set<IpPrefix>) o);                  return;              } @@ -1519,7 +1546,7 @@ public class Tethering extends BaseNetworkObserver {                  boolean retValue = true;                  switch (message.what) {                      case EVENT_IFACE_SERVING_STATE_ACTIVE: { -                        TetherInterfaceStateMachine who = (TetherInterfaceStateMachine)message.obj; +                        TetherInterfaceStateMachine who = (TetherInterfaceStateMachine) message.obj;                          if (VDBG) Log.d(TAG, "Tether Mode requested by " + who);                          handleInterfaceServingStateActive(message.arg1, who);                          who.sendMessage(TetherInterfaceStateMachine.CMD_TETHER_CONNECTION_CHANGED, @@ -1533,7 +1560,7 @@ public class Tethering extends BaseNetworkObserver {                          break;                      }                      case EVENT_IFACE_SERVING_STATE_INACTIVE: { -                        TetherInterfaceStateMachine who = (TetherInterfaceStateMachine)message.obj; +                        TetherInterfaceStateMachine who = (TetherInterfaceStateMachine) message.obj;                          if (VDBG) Log.d(TAG, "Tether Mode unrequested by " + who);                          handleInterfaceServingStateInactive(who); @@ -1565,6 +1592,9 @@ public class Tethering extends BaseNetworkObserver {                              mOffloadController.notifyDownstreamLinkProperties(newLp);                          } else {                              mOffloadController.removeDownstreamInterface(newLp.getInterfaceName()); +                            // Another interface might be in local-only hotspot mode; +                            // resend all local prefixes to the OffloadController. +                            sendOffloadExemptPrefixes();                          }                          break;                      } @@ -1606,7 +1636,7 @@ public class Tethering extends BaseNetworkObserver {                  boolean retValue = true;                  switch (message.what) {                      case EVENT_IFACE_SERVING_STATE_ACTIVE: -                        TetherInterfaceStateMachine who = (TetherInterfaceStateMachine)message.obj; +                        TetherInterfaceStateMachine who = (TetherInterfaceStateMachine) message.obj;                          who.sendMessage(mErrorNotification);                          break;                      case CMD_CLEAR_ERROR: @@ -1729,6 +1759,11 @@ public class Tethering extends BaseNetworkObserver {              pw.decreaseIndent();          } +        pw.println("Hardware offload:"); +        pw.increaseIndent(); +        mOffloadController.dump(pw); +        pw.decreaseIndent(); +          pw.println("Log:");          pw.increaseIndent();          if (argsContain(args, SHORT_ARG)) { diff --git a/services/core/java/com/android/server/connectivity/tethering/OffloadController.java b/services/core/java/com/android/server/connectivity/tethering/OffloadController.java index a69e4caebd5d..1a5ff778010c 100644 --- a/services/core/java/com/android/server/connectivity/tethering/OffloadController.java +++ b/services/core/java/com/android/server/connectivity/tethering/OffloadController.java @@ -16,20 +16,38 @@  package com.android.server.connectivity.tethering; +import static android.net.NetworkStats.SET_DEFAULT; +import static android.net.NetworkStats.TAG_NONE; +import static android.net.TrafficStats.UID_TETHERING;  import static android.provider.Settings.Global.TETHER_OFFLOAD_DISABLED;  import android.content.ContentResolver; +import android.net.ITetheringStatsProvider;  import android.net.IpPrefix; +import android.net.LinkAddress;  import android.net.LinkProperties; +import android.net.NetworkStats;  import android.net.RouteInfo;  import android.net.util.SharedLog;  import android.os.Handler; +import android.os.INetworkManagementService; +import android.os.RemoteException; +import android.os.SystemClock;  import android.provider.Settings; +import android.text.TextUtils; + +import com.android.internal.util.IndentingPrintWriter;  import java.net.Inet4Address; +import java.net.Inet6Address;  import java.net.InetAddress;  import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Objects;  import java.util.Set; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit;  /**   * A class to encapsulate the business logic of programming the tethering @@ -40,6 +58,8 @@ import java.util.Set;  public class OffloadController {      private static final String TAG = OffloadController.class.getSimpleName(); +    private static final int STATS_FETCH_TIMEOUT_MS = 1000; +      private final Handler mHandler;      private final OffloadHardwareInterface mHwInterface;      private final ContentResolver mContentResolver; @@ -47,14 +67,33 @@ public class OffloadController {      private boolean mConfigInitialized;      private boolean mControlInitialized;      private LinkProperties mUpstreamLinkProperties; +    // The complete set of offload-exempt prefixes passed in via Tethering from +    // all upstream and downstream sources.      private Set<IpPrefix> mExemptPrefixes; +    // A strictly "smaller" set of prefixes, wherein offload-approved prefixes +    // (e.g. downstream on-link prefixes) have been removed and replaced with +    // prefixes representing only the locally-assigned IP addresses. +    private Set<String> mLastLocalPrefixStrs; + +    // Maps upstream interface names to offloaded traffic statistics. +    private HashMap<String, OffloadHardwareInterface.ForwardedStats> +            mForwardedStats = new HashMap<>();      public OffloadController(Handler h, OffloadHardwareInterface hwi, -            ContentResolver contentResolver, SharedLog log) { +            ContentResolver contentResolver, INetworkManagementService nms, SharedLog log) {          mHandler = h;          mHwInterface = hwi;          mContentResolver = contentResolver;          mLog = log.forSubComponent(TAG); +        mExemptPrefixes = new HashSet<>(); +        mLastLocalPrefixStrs = new HashSet<>(); + +        try { +            nms.registerTetheringStatsProvider( +                    new OffloadTetheringStatsProvider(), getClass().getSimpleName()); +        } catch (RemoteException e) { +            mLog.e("Cannot register offload stats provider: " + e); +        }      }      public void start() { @@ -77,8 +116,36 @@ public class OffloadController {          mControlInitialized = mHwInterface.initOffloadControl(                  new OffloadHardwareInterface.ControlCallback() {                      @Override -                    public void onOffloadEvent(int event) { -                        mLog.log("got offload event: " + event); +                    public void onStarted() { +                        mLog.log("onStarted"); +                    } + +                    @Override +                    public void onStoppedError() { +                        mLog.log("onStoppedError"); +                    } + +                    @Override +                    public void onStoppedUnsupported() { +                        mLog.log("onStoppedUnsupported"); +                    } + +                    @Override +                    public void onSupportAvailable() { +                        mLog.log("onSupportAvailable"); + +                        // [1] Poll for statistics and notify NetworkStats +                        // [2] (Re)Push all state: +                        //     [a] push local prefixes +                        //     [b] push downstreams +                        //     [c] push upstream parameters +                        pushUpstreamParameters(); +                    } + +                    @Override +                    public void onStoppedLimitReached() { +                        mLog.log("onStoppedLimitReached"); +                        // Poll for statistics and notify NetworkStats                      }                      @Override @@ -98,6 +165,7 @@ public class OffloadController {      public void stop() {          final boolean wasStarted = started(); +        updateStatsForCurrentUpstream();          mUpstreamLinkProperties = null;          mHwInterface.stopOffloadControl();          mControlInitialized = false; @@ -105,26 +173,83 @@ public class OffloadController {          if (wasStarted) mLog.log("tethering offload stopped");      } +    private class OffloadTetheringStatsProvider extends ITetheringStatsProvider.Stub { +        @Override +        public NetworkStats getTetherStats() { +            NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 0); +            CountDownLatch latch = new CountDownLatch(1); + +            mHandler.post(() -> { +                try { +                    NetworkStats.Entry entry = new NetworkStats.Entry(); +                    entry.set = SET_DEFAULT; +                    entry.tag = TAG_NONE; +                    entry.uid = UID_TETHERING; + +                    updateStatsForCurrentUpstream(); + +                    for (String iface : mForwardedStats.keySet()) { +                        entry.iface = iface; +                        entry.rxBytes = mForwardedStats.get(iface).rxBytes; +                        entry.txBytes = mForwardedStats.get(iface).txBytes; +                        stats.addValues(entry); +                    } +                } finally { +                    latch.countDown(); +                } +            }); + +            try { +                latch.await(STATS_FETCH_TIMEOUT_MS, TimeUnit.MILLISECONDS); +            } catch (InterruptedException e) { +                mLog.e("Tethering stats fetch timed out after " + STATS_FETCH_TIMEOUT_MS + "ms"); +            } + +            return stats; +        } +    } + +    private void maybeUpdateStats(String iface) { +        if (TextUtils.isEmpty(iface)) { +            return; +        } + +        if (!mForwardedStats.containsKey(iface)) { +            mForwardedStats.put(iface, new OffloadHardwareInterface.ForwardedStats()); +        } +        mForwardedStats.get(iface).add(mHwInterface.getForwardedStats(iface)); +    } + +    private void updateStatsForCurrentUpstream() { +        if (mUpstreamLinkProperties != null) { +            maybeUpdateStats(mUpstreamLinkProperties.getInterfaceName()); +        } +    } +      public void setUpstreamLinkProperties(LinkProperties lp) { -        if (!started()) return; +        if (!started() || Objects.equals(mUpstreamLinkProperties, lp)) return; + +        String prevUpstream = (mUpstreamLinkProperties != null) ? +                mUpstreamLinkProperties.getInterfaceName() : null;          mUpstreamLinkProperties = (lp != null) ? new LinkProperties(lp) : null; +          // TODO: examine return code and decide what to do if programming          // upstream parameters fails (probably just wait for a subsequent          // onOffloadEvent() callback to tell us offload is available again and          // then reapply all state). +        computeAndPushLocalPrefixes();          pushUpstreamParameters(); + +        // Update stats after we've told the hardware to change routing so we don't miss packets. +        maybeUpdateStats(prevUpstream);      } -    public void updateExemptPrefixes(Set<IpPrefix> exemptPrefixes) { +    public void setLocalPrefixes(Set<IpPrefix> localPrefixes) {          if (!started()) return; -        mExemptPrefixes = exemptPrefixes; -        // TODO: -        //     - add IP addresses from all downstream link properties -        //     - add routes from all non-tethering downstream link properties -        //     - remove any 64share prefixes -        //     - push this to the HAL +        mExemptPrefixes = localPrefixes; +        computeAndPushLocalPrefixes();      }      public void notifyDownstreamLinkProperties(LinkProperties lp) { @@ -187,4 +312,54 @@ public class OffloadController {          return mHwInterface.setUpstreamParameters(                  iface, v4addr, v4gateway, (v6gateways.isEmpty() ? null : v6gateways));      } + +    private boolean computeAndPushLocalPrefixes() { +        final Set<String> localPrefixStrs = computeLocalPrefixStrings( +                mExemptPrefixes, mUpstreamLinkProperties); +        if (mLastLocalPrefixStrs.equals(localPrefixStrs)) return true; + +        mLastLocalPrefixStrs = localPrefixStrs; +        return mHwInterface.setLocalPrefixes(new ArrayList<>(localPrefixStrs)); +    } + +    // TODO: Factor in downstream LinkProperties once that information is available. +    private static Set<String> computeLocalPrefixStrings( +            Set<IpPrefix> localPrefixes, LinkProperties upstreamLinkProperties) { +        // Create an editable copy. +        final Set<IpPrefix> prefixSet = new HashSet<>(localPrefixes); + +        // TODO: If a downstream interface (not currently passed in) is reusing +        // the /64 of the upstream (64share) then: +        // +        //     [a] remove that /64 from the local prefixes +        //     [b] add in /128s for IP addresses on the downstream interface +        //     [c] add in /128s for IP addresses on the upstream interface +        // +        // Until downstream information is available here, simply add /128s from +        // the upstream network; they'll just be redundant with their /64. +        if (upstreamLinkProperties != null) { +            for (LinkAddress linkAddr : upstreamLinkProperties.getLinkAddresses()) { +                if (!linkAddr.isGlobalPreferred()) continue; +                final InetAddress ip = linkAddr.getAddress(); +                if (!(ip instanceof Inet6Address)) continue; +                prefixSet.add(new IpPrefix(ip, 128)); +            } +        } + +        final HashSet<String> localPrefixStrs = new HashSet<>(); +        for (IpPrefix pfx : prefixSet) localPrefixStrs.add(pfx.toString()); +        return localPrefixStrs; +    } + +    public void dump(IndentingPrintWriter pw) { +        if (isOffloadDisabled()) { +            pw.println("Offload disabled"); +            return; +        } +        pw.println("Offload HALs " + (started() ? "started" : "not started")); +        LinkProperties lp = mUpstreamLinkProperties; +        String upstream = (lp != null) ? lp.getInterfaceName() : null; +        pw.println("Current upstream: " + upstream); +        pw.println("Exempt prefixes: " + mLastLocalPrefixStrs); +    }  } diff --git a/services/core/java/com/android/server/connectivity/tethering/OffloadHardwareInterface.java b/services/core/java/com/android/server/connectivity/tethering/OffloadHardwareInterface.java index 913096cb5bef..4df566f03d6d 100644 --- a/services/core/java/com/android/server/connectivity/tethering/OffloadHardwareInterface.java +++ b/services/core/java/com/android/server/connectivity/tethering/OffloadHardwareInterface.java @@ -21,6 +21,7 @@ import static com.android.internal.util.BitUtils.uint16;  import android.hardware.tetheroffload.control.V1_0.IOffloadControl;  import android.hardware.tetheroffload.control.V1_0.ITetheringOffloadCallback;  import android.hardware.tetheroffload.control.V1_0.NatTimeoutUpdate; +import android.hardware.tetheroffload.control.V1_0.OffloadCallbackEvent;  import android.os.Handler;  import android.os.RemoteException;  import android.net.util.SharedLog; @@ -53,7 +54,11 @@ public class OffloadHardwareInterface {      private ControlCallback mControlCallback;      public static class ControlCallback { -        public void onOffloadEvent(int event) {} +        public void onStarted() {} +        public void onStoppedError() {} +        public void onStoppedUnsupported() {} +        public void onSupportAvailable() {} +        public void onStoppedLimitReached() {}          public void onNatTimeoutUpdate(int proto,                                         String srcAddr, int srcPort, @@ -108,7 +113,7 @@ public class OffloadHardwareInterface {                  (controlCb == null) ? "null"                          : "0x" + Integer.toHexString(System.identityHashCode(controlCb))); -        mTetheringOffloadCallback = new TetheringOffloadCallback(mHandler, mControlCallback); +        mTetheringOffloadCallback = new TetheringOffloadCallback(mHandler, mControlCallback, mLog);          final CbResults results = new CbResults();          try {              mOffloadControl.initOffload( @@ -163,6 +168,26 @@ public class OffloadHardwareInterface {          return stats;      } +    public boolean setLocalPrefixes(ArrayList<String> localPrefixes) { +        final String logmsg = String.format("setLocalPrefixes([%s])", +                String.join(",", localPrefixes)); + +        final CbResults results = new CbResults(); +        try { +            mOffloadControl.setLocalPrefixes(localPrefixes, +                    (boolean success, String errMsg) -> { +                        results.success = success; +                        results.errMsg = errMsg; +                    }); +        } catch (RemoteException e) { +            record(logmsg, e); +            return false; +        } + +        record(logmsg, results); +        return results.success; +    } +      public boolean setUpstreamParameters(              String iface, String v4addr, String v4gateway, ArrayList<String> v6gws) {          iface = (iface != null) ? iface : NO_INTERFACE_NAME; @@ -206,15 +231,37 @@ public class OffloadHardwareInterface {      private static class TetheringOffloadCallback extends ITetheringOffloadCallback.Stub {          public final Handler handler;          public final ControlCallback controlCb; +        public final SharedLog log; -        public TetheringOffloadCallback(Handler h, ControlCallback cb) { +        public TetheringOffloadCallback(Handler h, ControlCallback cb, SharedLog sharedLog) {              handler = h;              controlCb = cb; +            log = sharedLog;          }          @Override          public void onEvent(int event) { -            handler.post(() -> { controlCb.onOffloadEvent(event); }); +            handler.post(() -> { +                switch (event) { +                    case OffloadCallbackEvent.OFFLOAD_STARTED: +                        controlCb.onStarted(); +                        break; +                    case OffloadCallbackEvent.OFFLOAD_STOPPED_ERROR: +                        controlCb.onStoppedError(); +                        break; +                    case OffloadCallbackEvent.OFFLOAD_STOPPED_UNSUPPORTED: +                        controlCb.onStoppedUnsupported(); +                        break; +                    case OffloadCallbackEvent.OFFLOAD_SUPPORT_AVAILABLE: +                        controlCb.onSupportAvailable(); +                        break; +                    case OffloadCallbackEvent.OFFLOAD_STOPPED_LIMIT_REACHED: +                        controlCb.onStoppedLimitReached(); +                        break; +                    default: +                        log.e("Unsupported OffloadCallbackEvent: " + event); +                } +            });          }          @Override diff --git a/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java b/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java index 4bac69ce7495..69678df4543d 100644 --- a/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java +++ b/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java @@ -161,6 +161,8 @@ public class TetherInterfaceStateMachine extends StateMachine {      public int lastError() { return mLastError; } +    public LinkProperties linkProperties() { return new LinkProperties(mLinkProperties); } +      public void stop() { sendMessage(CMD_INTERFACE_DOWN); }      public void unwanted() { sendMessage(CMD_TETHER_UNREQUESTED); } diff --git a/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java b/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java index 7efa1664788c..acbc10b9dc43 100644 --- a/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java +++ b/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java @@ -70,6 +70,7 @@ public class TetheringConfiguration {      public final String[] tetherableUsbRegexs;      public final String[] tetherableWifiRegexs;      public final String[] tetherableBluetoothRegexs; +    public final int dunCheck;      public final boolean isDunRequired;      public final Collection<Integer> preferredUpstreamIfaceTypes;      public final String[] dhcpRanges; @@ -88,7 +89,7 @@ public class TetheringConfiguration {          tetherableBluetoothRegexs = ctx.getResources().getStringArray(                  com.android.internal.R.array.config_tether_bluetooth_regexs); -        final int dunCheck = checkDunRequired(ctx); +        dunCheck = checkDunRequired(ctx);          configLog.log("DUN check returned: " + dunCheckString(dunCheck));          preferredUpstreamIfaceTypes = getUpstreamIfaceTypes(ctx, dunCheck); @@ -175,7 +176,7 @@ public class TetheringConfiguration {          return upstreamNames;      } -    private static int checkDunRequired(Context ctx) { +    public static int checkDunRequired(Context ctx) {          final TelephonyManager tm = (TelephonyManager) ctx.getSystemService(TELEPHONY_SERVICE);          return (tm != null) ? tm.getTetherApnRequired() : DUN_UNSPECIFIED;      } diff --git a/services/core/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java b/services/core/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java index eb66767bfdfa..c5f752807cb7 100644 --- a/services/core/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java +++ b/services/core/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java @@ -34,6 +34,7 @@ import android.net.NetworkCapabilities;  import android.net.NetworkRequest;  import android.net.NetworkState;  import android.net.util.NetworkConstants; +import android.net.util.PrefixUtils;  import android.net.util.SharedLog;  import android.util.Log; @@ -72,16 +73,11 @@ public class UpstreamNetworkMonitor {      private static final boolean DBG = false;      private static final boolean VDBG = false; -    private static final IpPrefix[] MINIMUM_LOCAL_PREFIXES_SET = { -            prefix("127.0.0.0/8"), prefix("169.254.0.0/16"), -            prefix("::/3"), prefix("fe80::/64"), prefix("fc00::/7"), prefix("ff00::/8"), -    }; -      public static final int EVENT_ON_AVAILABLE      = 1;      public static final int EVENT_ON_CAPABILITIES   = 2;      public static final int EVENT_ON_LINKPROPERTIES = 3;      public static final int EVENT_ON_LOST           = 4; -    public static final int NOTIFY_EXEMPT_PREFIXES  = 10; +    public static final int NOTIFY_LOCAL_PREFIXES   = 10;      private static final int CALLBACK_LISTEN_ALL = 1;      private static final int CALLBACK_TRACK_DEFAULT = 2; @@ -93,7 +89,7 @@ public class UpstreamNetworkMonitor {      private final Handler mHandler;      private final int mWhat;      private final HashMap<Network, NetworkState> mNetworkMap = new HashMap<>(); -    private HashSet<IpPrefix> mOffloadExemptPrefixes; +    private HashSet<IpPrefix> mLocalPrefixes;      private ConnectivityManager mCM;      private NetworkCallback mListenAllCallback;      private NetworkCallback mDefaultNetworkCallback; @@ -107,7 +103,7 @@ public class UpstreamNetworkMonitor {          mHandler = mTarget.getHandler();          mLog = log.forSubComponent(TAG);          mWhat = what; -        mOffloadExemptPrefixes = allOffloadExemptPrefixes(mNetworkMap.values()); +        mLocalPrefixes = new HashSet<>();      }      @VisibleForTesting @@ -223,8 +219,8 @@ public class UpstreamNetworkMonitor {          return typeStatePair.ns;      } -    public Set<IpPrefix> getOffloadExemptPrefixes() { -        return (Set<IpPrefix>) mOffloadExemptPrefixes.clone(); +    public Set<IpPrefix> getLocalPrefixes() { +        return (Set<IpPrefix>) mLocalPrefixes.clone();      }      private void handleAvailable(int callbackType, Network network) { @@ -360,11 +356,11 @@ public class UpstreamNetworkMonitor {          notifyTarget(EVENT_ON_LOST, mNetworkMap.remove(network));      } -    private void recomputeOffloadExemptPrefixes() { -        final HashSet<IpPrefix> exemptPrefixes = allOffloadExemptPrefixes(mNetworkMap.values()); -        if (!mOffloadExemptPrefixes.equals(exemptPrefixes)) { -            mOffloadExemptPrefixes = exemptPrefixes; -            notifyTarget(NOTIFY_EXEMPT_PREFIXES, exemptPrefixes.clone()); +    private void recomputeLocalPrefixes() { +        final HashSet<IpPrefix> localPrefixes = allLocalPrefixes(mNetworkMap.values()); +        if (!mLocalPrefixes.equals(localPrefixes)) { +            mLocalPrefixes = localPrefixes; +            notifyTarget(NOTIFY_LOCAL_PREFIXES, localPrefixes.clone());          }      } @@ -402,7 +398,7 @@ public class UpstreamNetworkMonitor {          @Override          public void onLinkPropertiesChanged(Network network, LinkProperties newLp) {              handleLinkProp(network, newLp); -            recomputeOffloadExemptPrefixes(); +            recomputeLocalPrefixes();          }          // TODO: Handle onNetworkSuspended(); @@ -411,7 +407,7 @@ public class UpstreamNetworkMonitor {          @Override          public void onLost(Network network) {              handleLost(mCallbackType, network); -            recomputeOffloadExemptPrefixes(); +            recomputeLocalPrefixes();          }      } @@ -460,35 +456,15 @@ public class UpstreamNetworkMonitor {          return result;      } -    private static HashSet<IpPrefix> allOffloadExemptPrefixes(Iterable<NetworkState> netStates) { +    private static HashSet<IpPrefix> allLocalPrefixes(Iterable<NetworkState> netStates) {          final HashSet<IpPrefix> prefixSet = new HashSet<>(); -        addDefaultLocalPrefixes(prefixSet); -          for (NetworkState ns : netStates) { -            addOffloadExemptPrefixes(prefixSet, ns.linkProperties); +            final LinkProperties lp = ns.linkProperties; +            if (lp == null) continue; +            prefixSet.addAll(PrefixUtils.localPrefixesFrom(lp));          }          return prefixSet;      } - -    private static void addDefaultLocalPrefixes(Set<IpPrefix> prefixSet) { -        Collections.addAll(prefixSet, MINIMUM_LOCAL_PREFIXES_SET); -    } - -    private static void addOffloadExemptPrefixes(Set<IpPrefix> prefixSet, LinkProperties lp) { -        if (lp == null) return; - -        for (LinkAddress linkAddr : lp.getAllLinkAddresses()) { -            prefixSet.add(new IpPrefix(linkAddr.getAddress(), linkAddr.getPrefixLength())); -        } - -        // TODO: Consider adding other non-default routes associated with this -        // network. Traffic to these destinations should perhaps not go through -        // the Internet (upstream). -    } - -    private static IpPrefix prefix(String prefixStr) { -        return new IpPrefix(prefixStr); -    }  } diff --git a/services/core/java/com/android/server/location/GnssLocationProvider.java b/services/core/java/com/android/server/location/GnssLocationProvider.java index 4511aa9390c6..601dd9454118 100644 --- a/services/core/java/com/android/server/location/GnssLocationProvider.java +++ b/services/core/java/com/android/server/location/GnssLocationProvider.java @@ -1651,6 +1651,9 @@ public class GnssLocationProvider implements LocationProviderInterface {                  mSvAzimuths,                  mSvCarrierFreqs); +        // Log CN0 as part of GNSS metrics +        mGnssMetrics.logCn0(mCn0s, svCount); +          if (VERBOSE) {              Log.v(TAG, "SV count: " + svCount);          } diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 57605bb73d50..a7eb2c6a273b 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -520,7 +520,8 @@ public class NotificationManagerService extends SystemService {          }      } -    private final NotificationDelegate mNotificationDelegate = new NotificationDelegate() { +    @VisibleForTesting +    final NotificationDelegate mNotificationDelegate = new NotificationDelegate() {          @Override          public void onSetDisabled(int status) { @@ -1012,6 +1013,25 @@ public class NotificationManagerService extends SystemService {      }      @VisibleForTesting +    int getNotificationRecordCount() { +        synchronized (mNotificationLock) { +            int count = mNotificationList.size() + mNotificationsByKey.size() +                    + mSummaryByGroupKey.size() + mEnqueuedNotifications.size(); +            // subtract duplicates +            for (NotificationRecord posted : mNotificationList) { +                if (mNotificationsByKey.containsKey(posted.getKey())) { +                    count--; +                } +                if (posted.sbn.isGroup() && posted.getNotification().isGroupSummary()) { +                    count --; +                } +            } + +            return count; +        } +    } + +    @VisibleForTesting      void addNotification(NotificationRecord r) {          mNotificationList.add(r);          mNotificationsByKey.put(r.sbn.getKey(), r); @@ -4553,6 +4573,7 @@ public class NotificationManagerService extends SystemService {                  canceledNotifications = new ArrayList<>();              }              notificationList.remove(i); +            mNotificationsByKey.remove(r.getKey());              canceledNotifications.add(r);              cancelNotificationLocked(r, sendDelete, reason, wasPosted);          } @@ -4662,6 +4683,7 @@ public class NotificationManagerService extends SystemService {                  EventLogTags.writeNotificationCancel(callingUid, callingPid, pkg, childSbn.getId(),                          childSbn.getTag(), userId, 0, 0, reason, listenerName);                  notificationList.remove(i); +                mNotificationsByKey.remove(childR.getKey());                  cancelNotificationLocked(childR, sendDelete, reason, wasPosted);              }          } diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index 8425d235fe66..75fc25aaec77 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -358,10 +358,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {      private static final String SYSUI_SCREENSHOT_ERROR_RECEIVER =              "com.android.systemui.screenshot.ScreenshotServiceErrorReceiver"; -    private static final int NAV_BAR_BOTTOM = 0; -    private static final int NAV_BAR_RIGHT = 1; -    private static final int NAV_BAR_LEFT = 2; -      /**       * Keyguard stuff       */ @@ -6943,6 +6939,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {      }      @Override +    public int getNavBarPosition() { +        // TODO(multi-display): Support system decor on secondary displays. +        return mNavigationBarPosition; +    } + +    @Override      public boolean isDockSideAllowed(int dockSide) {          // We do not allow all dock sides at which the navigation bar touches the docked stack. diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java index 839ee0ec7efd..b9d02a900d1c 100644 --- a/services/core/java/com/android/server/wm/AppWindowToken.java +++ b/services/core/java/com/android/server/wm/AppWindowToken.java @@ -1357,8 +1357,10 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree       * @return {@code true} If all children have been considered, {@code false}.       */      private boolean allDrawnStatesConsidered() { -        for (WindowState child : mChildren) { -            if (!child.getDrawnStatedEvaluated()) { +        for (int i = mChildren.size() - 1; i >= 0; --i) { +            final WindowState child = mChildren.get(i); +            if (child.mightAffectAllDrawn(false /*visibleOnly*/ ) +                    && !child.getDrawnStateEvaluated()) {                  return false;              }          } diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 9fe73815b380..05f4626259d7 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -1073,7 +1073,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo              }              if (w.mHasSurface && !rotateSeamlessly) {                  if (DEBUG_ORIENTATION) Slog.v(TAG_WM, "Set mOrientationChanging of " + w); -                w.mOrientationChanging = true; +                w.setOrientationChanging(true);                  mService.mRoot.mOrientationChangeComplete = false;                  w.mLastFreezeDuration = 0;              } @@ -2679,10 +2679,10 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo          mService.mWindowsFreezingScreen = WINDOWS_FREEZING_SCREENS_TIMEOUT;          forAllWindows(w -> { -            if (!w.mOrientationChanging) { +            if (!w.getOrientationChanging()) {                  return;              } -            w.mOrientationChanging = false; +            w.setOrientationChanging(false);              w.mLastFreezeDuration = (int)(SystemClock.elapsedRealtime()                      - mService.mDisplayFreezeTime);              Slog.w(TAG_WM, "Force clearing orientation change: " + w); diff --git a/services/core/java/com/android/server/wm/WindowLayersController.java b/services/core/java/com/android/server/wm/WindowLayersController.java index 01a3143a7b22..5dc79f8500c0 100644 --- a/services/core/java/com/android/server/wm/WindowLayersController.java +++ b/services/core/java/com/android/server/wm/WindowLayersController.java @@ -17,13 +17,14 @@  package com.android.server.wm;  import android.util.Slog; -import android.view.Display;  import java.util.ArrayDeque;  import java.util.function.Consumer; +import static android.app.ActivityManager.StackId;  import static android.app.ActivityManager.StackId.ASSISTANT_STACK_ID;  import static android.app.ActivityManager.StackId.DOCKED_STACK_ID; +import static android.app.ActivityManager.StackId.INVALID_STACK_ID;  import static android.app.ActivityManager.StackId.PINNED_STACK_ID;  import static android.view.Display.DEFAULT_DISPLAY;  import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER; @@ -56,7 +57,6 @@ class WindowLayersController {          mService = service;      } -    private int mHighestApplicationLayer = 0;      private ArrayDeque<WindowState> mPinnedWindows = new ArrayDeque<>();      private ArrayDeque<WindowState> mDockedWindows = new ArrayDeque<>();      private ArrayDeque<WindowState> mAssistantWindows = new ArrayDeque<>(); @@ -66,6 +66,8 @@ class WindowLayersController {      private int mCurBaseLayer;      private int mCurLayer;      private boolean mAnyLayerChanged; +    private int mHighestApplicationLayer; +    private int mHighestDockedAffectedLayer;      private int mHighestLayerInImeTargetBaseLayer;      private WindowState mImeTarget;      private boolean mAboveImeTarget; @@ -98,6 +100,10 @@ class WindowLayersController {              mHighestLayerInImeTargetBaseLayer = Math.max(mHighestLayerInImeTargetBaseLayer,                      w.mWinAnimator.mAnimLayer);          } +        if (w.getAppToken() != null && StackId.isResizeableByDockedStack(w.getStackId())) { +            mHighestDockedAffectedLayer = Math.max(mHighestDockedAffectedLayer, +                    w.mWinAnimator.mAnimLayer); +        }          collectSpecialWindows(w); @@ -135,7 +141,6 @@ class WindowLayersController {      }      private void reset() { -        mHighestApplicationLayer = 0;          mPinnedWindows.clear();          mInputMethodWindows.clear();          mDockedWindows.clear(); @@ -147,8 +152,10 @@ class WindowLayersController {          mCurLayer = 0;          mAnyLayerChanged = false; -        mImeTarget = mService.mInputMethodTarget; +        mHighestApplicationLayer = 0; +        mHighestDockedAffectedLayer = 0;          mHighestLayerInImeTargetBaseLayer = (mImeTarget != null) ? mImeTarget.mBaseLayer : 0; +        mImeTarget = mService.mInputMethodTarget;          mAboveImeTarget = false;          mAboveImeTargetAppWindows.clear();      } @@ -179,32 +186,41 @@ class WindowLayersController {              }          } -        final Task task = w.getTask(); -        if (task == null) { -            return; -        } -        final TaskStack stack = task.mStack; -        if (stack == null) { -            return; -        } -        if (stack.mStackId == PINNED_STACK_ID) { +        final int stackId = w.getAppToken() != null ? w.getStackId() : INVALID_STACK_ID; +        if (stackId == PINNED_STACK_ID) {              mPinnedWindows.add(w); -        } else if (stack.mStackId == DOCKED_STACK_ID) { +        } else if (stackId == DOCKED_STACK_ID) {              mDockedWindows.add(w); -        } else if (stack.mStackId == ASSISTANT_STACK_ID) { +        } else if (stackId == ASSISTANT_STACK_ID) {              mAssistantWindows.add(w);          }      }      private void adjustSpecialWindows() { -        int layer = mHighestApplicationLayer + WINDOW_LAYER_MULTIPLIER; -        // For pinned and docked stack window, we want to make them above other windows also when -        // these windows are animating. -        while (!mDockedWindows.isEmpty()) { -            layer = assignAndIncreaseLayerIfNeeded(mDockedWindows.remove(), layer); +        // The following adjustments are beyond the highest docked-affected layer +        int layer = mHighestDockedAffectedLayer +  WINDOW_LAYER_MULTIPLIER; + +        // Adjust the docked stack windows and dock divider above only the windows that are affected +        // by the docked stack. When this happens, also boost the assistant window layers, otherwise +        // the docked stack windows & divider would be promoted above the assistant. +        if (!mDockedWindows.isEmpty() && mHighestDockedAffectedLayer > 0) { +            while (!mDockedWindows.isEmpty()) { +                final WindowState window = mDockedWindows.remove(); +                layer = assignAndIncreaseLayerIfNeeded(window, layer); +            } + +            layer = assignAndIncreaseLayerIfNeeded(mDockDivider, layer); + +            while (!mAssistantWindows.isEmpty()) { +                final WindowState window = mAssistantWindows.remove(); +                if (window.mLayer > mHighestDockedAffectedLayer) { +                    layer = assignAndIncreaseLayerIfNeeded(window, layer); +                } +            }          } -        layer = assignAndIncreaseLayerIfNeeded(mDockDivider, layer); +        // The following adjustments are beyond the highest app layer or boosted layer +        layer = Math.max(layer, mHighestApplicationLayer + WINDOW_LAYER_MULTIPLIER);          // We know that we will be animating a relaunching window in the near future, which will          // receive a z-order increase. We want the replaced window to immediately receive the same @@ -213,12 +229,6 @@ class WindowLayersController {              layer = assignAndIncreaseLayerIfNeeded(mReplacingWindows.remove(), layer);          } -        // Adjust the assistant stack windows to be above the docked and fullscreen stack windows, -        // but under the pinned stack windows -        while (!mAssistantWindows.isEmpty()) { -            layer = assignAndIncreaseLayerIfNeeded(mAssistantWindows.remove(), layer); -        } -          while (!mPinnedWindows.isEmpty()) {              layer = assignAndIncreaseLayerIfNeeded(mPinnedWindows.remove(), layer);          } diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index ebfeac339083..17e87a04e2c2 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -5789,7 +5789,7 @@ public class WindowManagerService extends IWindowManager.Stub          // orientation.          if (!okToDisplay() && mWindowsFreezingScreen != WINDOWS_FREEZING_SCREENS_TIMEOUT) {              if (DEBUG_ORIENTATION) Slog.v(TAG_WM, "Changing surface while display frozen: " + w); -            w.mOrientationChanging = true; +            w.setOrientationChanging(true);              w.mLastFreezeDuration = 0;              mRoot.mOrientationChangeComplete = false;              if (mWindowsFreezingScreen == WINDOWS_FREEZING_SCREENS_NONE) { @@ -6292,6 +6292,22 @@ public class WindowManagerService extends IWindowManager.Stub          }      } +    /** +     * Used by ActivityManager to determine where to position an app with aspect ratio shorter then +     * the screen is. +     * @see WindowManagerPolicy#getNavBarPosition() +     */ +    public int getNavBarPosition() { +        synchronized (mWindowMap) { +            // Perform layout if it was scheduled before to make sure that we get correct nav bar +            // position when doing rotations. +            final DisplayContent defaultDisplayContent = getDefaultDisplayContentLocked(); +            defaultDisplayContent.performLayout(false /* initial */, +                    false /* updateInputWindows */); +            return mPolicy.getNavBarPosition(); +        } +    } +      @Override      public WindowManagerPolicy.InputConsumer createInputConsumer(Looper looper, String name,              InputEventReceiver.Factory inputEventReceiverFactory) { diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index 1bfc1a0047c3..34ff9e8e338f 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -441,7 +441,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP       * Set when the orientation is changing and this window has not yet       * been updated for the new orientation.       */ -    boolean mOrientationChanging; +    private boolean mOrientationChanging;      /**       * The orientation during the last visible call to relayout. If our @@ -685,7 +685,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP      /**       * Returns whether this {@link WindowState} has been considered for drawing by its parent.       */ -    boolean getDrawnStatedEvaluated() { +    boolean getDrawnStateEvaluated() {          return mDrawnStateEvaluated;      } @@ -1184,7 +1184,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP              // then we need to hold off on unfreezing the display until this window has been              // redrawn; to do that, we need to go through the process of getting informed by the              // application when it has finished drawing. -            if (mOrientationChanging || dragResizingChanged || isResizedWhileNotDragResizing()) { +            if (getOrientationChanging() || dragResizingChanged +                    || isResizedWhileNotDragResizing()) {                  if (DEBUG_SURFACE_TRACE || DEBUG_ANIM || DEBUG_ORIENTATION || DEBUG_RESIZE) {                      Slog.v(TAG_WM, "Orientation or resize start waiting for draw"                              + ", mDrawState=DRAW_PENDING in " + this @@ -1199,17 +1200,33 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP                  if (DEBUG_RESIZE || DEBUG_ORIENTATION) Slog.v(TAG_WM, "Resizing window " + this);                  mService.mResizingWindows.add(this);              } -        } else if (mOrientationChanging) { +        } else if (getOrientationChanging()) {              if (isDrawnLw()) {                  if (DEBUG_ORIENTATION) Slog.v(TAG_WM, "Orientation not waiting for draw in "                          + this + ", surfaceController " + winAnimator.mSurfaceController); -                mOrientationChanging = false; +                setOrientationChanging(false);                  mLastFreezeDuration = (int)(SystemClock.elapsedRealtime()                          - mService.mDisplayFreezeTime);              }          }      } +    boolean getOrientationChanging() { +        // In addition to the local state flag, we must also consider the difference in the last +        // reported configuration vs. the current state. If the client code has not been informed of +        // the change, logic dependent on having finished processing the orientation, such as +        // unfreezing, could be improperly triggered. +        // TODO(b/62846907): Checking against {@link mLastReportedConfiguration} could be flaky as +        //                   this is not necessarily what the client has processed yet. Find a +        //                   better indicator consistent with the client. +        return mOrientationChanging || (isVisible() +                && getConfiguration().orientation != mLastReportedConfiguration.orientation); +    } + +    void setOrientationChanging(boolean changing) { +        mOrientationChanging = changing; +    } +      DisplayContent getDisplayContent() {          return mToken.getDisplayContent();      } @@ -1970,7 +1987,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP              return false;          } -        final boolean windowsAreFocusable = mAppToken != null && mAppToken.windowsAreFocusable(); +        final boolean windowsAreFocusable = mAppToken == null || mAppToken.windowsAreFocusable();          if (!windowsAreFocusable) {              // This window can't be an IME target if the app's windows should not be focusable.              return false; @@ -2669,10 +2686,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP          mAppFreezing = false; -        if (mHasSurface && !mOrientationChanging +        if (mHasSurface && !getOrientationChanging()                  && mService.mWindowsFreezingScreen != WINDOWS_FREEZING_SCREENS_TIMEOUT) {              if (DEBUG_ORIENTATION) Slog.v(TAG_WM, "set mOrientationChanging of " + this); -            mOrientationChanging = true; +            setOrientationChanging(true);              mService.mRoot.mOrientationChangeComplete = false;          }          mLastFreezeDuration = 0; @@ -3091,7 +3108,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP              mWinAnimator.mSurfaceResized = false;              mReportOrientationChanged = false;          } catch (RemoteException e) { -            mOrientationChanging = false; +            setOrientationChanging(false);              mLastFreezeDuration = (int)(SystemClock.elapsedRealtime()                      - mService.mDisplayFreezeTime);              // We are assuming the hosting process is dead or in a zombie state. @@ -3350,7 +3367,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP                  pw.print(prefix); pw.print("mAppToken="); pw.println(mAppToken);                  pw.print(prefix); pw.print(" isAnimatingWithSavedSurface()=");                  pw.print(isAnimatingWithSavedSurface()); -                pw.print(" mAppDied=");pw.println(mAppDied); +                pw.print(" mAppDied=");pw.print(mAppDied); +                pw.print(prefix); pw.print("drawnStateEvaluated="); +                        pw.print(getDrawnStateEvaluated()); +                pw.print(prefix); pw.print("mightAffectAllDrawn="); +                        pw.println(mightAffectAllDrawn(false /*visibleOnly*/));              }              pw.print(prefix); pw.print("mViewVisibility=0x");              pw.print(Integer.toHexString(mViewVisibility)); @@ -3450,10 +3471,13 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP                      pw.print(" mDestroying="); pw.print(mDestroying);                      pw.print(" mRemoved="); pw.println(mRemoved);          } -        if (mOrientationChanging || mAppFreezing || mTurnOnScreen +        if (getOrientationChanging() || mAppFreezing || mTurnOnScreen                  || mReportOrientationChanged) {              pw.print(prefix); pw.print("mOrientationChanging=");                      pw.print(mOrientationChanging); +                    pw.print(" configOrientationChanging="); +                    pw.print(mLastReportedConfiguration.orientation +                            != getConfiguration().orientation);                      pw.print(" mAppFreezing="); pw.print(mAppFreezing);                      pw.print(" mTurnOnScreen="); pw.print(mTurnOnScreen);                      pw.print(" mReportOrientationChanged="); pw.println(mReportOrientationChanged); @@ -3490,6 +3514,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP          if (computeDragResizing()) {              pw.print(prefix); pw.println("computeDragResizing=" + computeDragResizing());          } +        pw.print(prefix); pw.println("isOnScreen=" + isOnScreen()); +        pw.print(prefix); pw.println("isVisible=" + isVisible());      }      @Override diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java index cd55156a67a9..8f1065f75642 100644 --- a/services/core/java/com/android/server/wm/WindowStateAnimator.java +++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java @@ -1527,11 +1527,11 @@ class WindowStateAnimator {              // There is no need to wait for an animation change if our window is gone for layout              // already as we'll never be visible. -            if (w.mOrientationChanging && w.isGoneForLayoutLw()) { +            if (w.getOrientationChanging() && w.isGoneForLayoutLw()) {                  if (DEBUG_ORIENTATION) {                      Slog.v(TAG, "Orientation change skips hidden " + w);                  } -                w.mOrientationChanging = false; +                w.setOrientationChanging(false);              }              return;          } @@ -1564,8 +1564,8 @@ class WindowStateAnimator {              // really hidden (gone for layout), there is no point in still waiting for it.              // Note that this does introduce a potential glitch if the window becomes unhidden              // before it has drawn for the new orientation. -            if (w.mOrientationChanging && w.isGoneForLayoutLw()) { -                w.mOrientationChanging = false; +            if (w.getOrientationChanging() && w.isGoneForLayoutLw()) { +                w.setOrientationChanging(false);                  if (DEBUG_ORIENTATION) Slog.v(TAG,                          "Orientation change skips hidden " + w);              } @@ -1618,7 +1618,7 @@ class WindowStateAnimator {                      mAnimator.setPendingLayoutChanges(w.getDisplayId(),                              WindowManagerPolicy.FINISH_LAYOUT_REDO_ANIM);                  } else { -                    w.mOrientationChanging = false; +                    w.setOrientationChanging(false);                  }              }              if (hasSurface()) { @@ -1631,14 +1631,14 @@ class WindowStateAnimator {              displayed = true;          } -        if (w.mOrientationChanging) { +        if (w.getOrientationChanging()) {              if (!w.isDrawnLw()) {                  mAnimator.mBulkUpdateParams &= ~SET_ORIENTATION_CHANGE_COMPLETE;                  mAnimator.mLastWindowFreezeSource = w;                  if (DEBUG_ORIENTATION) Slog.v(TAG,                          "Orientation continue waiting for draw in " + w);              } else { -                w.mOrientationChanging = false; +                w.setOrientationChanging(false);                  if (DEBUG_ORIENTATION) Slog.v(TAG, "Orientation change complete in " + w);              }          } diff --git a/services/core/jni/com_android_server_VibratorService.cpp b/services/core/jni/com_android_server_VibratorService.cpp index cb8416b36be5..45e9cc785bf8 100644 --- a/services/core/jni/com_android_server_VibratorService.cpp +++ b/services/core/jni/com_android_server_VibratorService.cpp @@ -73,11 +73,13 @@ Return<R> halCall(Return<R> (I::* fn)(Args0...), Args1&&... args1) {          ret = (sHal == nullptr) ? NullptrStatus<R>()                  : (*sHal.*fn)(std::forward<Args1>(args1)...); -        if (!ret.isOk()) { -            ALOGE("Failed to issue command to vibrator HAL. Retrying."); -            // Restoring connection to the HAL. -            sHal = I::tryGetService(); +        if (ret.isOk()) { +            break;          } + +        ALOGE("Failed to issue command to vibrator HAL. Retrying."); +        // Restoring connection to the HAL. +        sHal = I::tryGetService();      }      return ret;  } diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index eca285a1a27b..c9be3a2c41cc 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -775,13 +775,6 @@ public final class SystemServer {              mContentResolver = context.getContentResolver(); -            if (!disableCameraService) { -                Slog.i(TAG, "Camera Service Proxy"); -                traceBeginAndSlog("StartCameraServiceProxy"); -                mSystemServiceManager.startService(CameraServiceProxy.class); -                traceEnd(); -            } -              // The AccountManager must come before the ContentService              traceBeginAndSlog("StartAccountManagerService");              mSystemServiceManager.startService(ACCOUNT_SERVICE_CLASS); @@ -1531,6 +1524,12 @@ public final class SystemServer {              }          } +        if (!disableCameraService) { +            traceBeginAndSlog("StartCameraServiceProxy"); +            mSystemServiceManager.startService(CameraServiceProxy.class); +            traceEnd(); +        } +          // Before things start rolling, be sure we have decided whether          // we are in safe mode.          final boolean safeMode = wm.detectSafeMode(); diff --git a/services/net/java/android/net/util/PrefixUtils.java b/services/net/java/android/net/util/PrefixUtils.java new file mode 100644 index 000000000000..962aab459a19 --- /dev/null +++ b/services/net/java/android/net/util/PrefixUtils.java @@ -0,0 +1,74 @@ +/* + * 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 android.net.util; + +import android.net.IpPrefix; +import android.net.LinkAddress; +import android.net.LinkProperties; + +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; + + +/** + * @hide + */ +public class PrefixUtils { +    private static final IpPrefix[] MIN_NON_FORWARDABLE_PREFIXES = { +            pfx("127.0.0.0/8"),     // IPv4 loopback +            pfx("169.254.0.0/16"),  // IPv4 link-local, RFC3927#section-8 +            pfx("::/3"), +            pfx("fe80::/64"),       // IPv6 link-local +            pfx("fc00::/7"),        // IPv6 ULA +            pfx("ff02::/8"),        // IPv6 link-local multicast +    }; + +    public static final IpPrefix DEFAULT_WIFI_P2P_PREFIX = pfx("192.168.49.0/24"); + +    public static Set<IpPrefix> getNonForwardablePrefixes() { +        final HashSet<IpPrefix> prefixes = new HashSet<>(); +        addNonForwardablePrefixes(prefixes); +        return prefixes; +    } + +    public static void addNonForwardablePrefixes(Set<IpPrefix> prefixes) { +        Collections.addAll(prefixes, MIN_NON_FORWARDABLE_PREFIXES); +    } + +    public static Set<IpPrefix> localPrefixesFrom(LinkProperties lp) { +        final HashSet<IpPrefix> localPrefixes = new HashSet<>(); +        if (lp == null) return localPrefixes; + +        for (LinkAddress addr : lp.getAllLinkAddresses()) { +            if (addr.getAddress().isLinkLocalAddress()) continue; +            localPrefixes.add(asIpPrefix(addr)); +        } +        // TODO: Add directly-connected routes as well (ones from which we did +        // not also form a LinkAddress)? + +        return localPrefixes; +    } + +    public static IpPrefix asIpPrefix(LinkAddress addr) { +        return new IpPrefix(addr.getAddress(), addr.getPrefixLength()); +    } + +    private static IpPrefix pfx(String prefixStr) { +        return new IpPrefix(prefixStr); +    } +} diff --git a/services/tests/notification/src/com/android/server/notification/NotificationChannelTest.java b/services/tests/notification/src/com/android/server/notification/NotificationChannelTest.java index 3007cb1755e2..f457f6a550c1 100644 --- a/services/tests/notification/src/com/android/server/notification/NotificationChannelTest.java +++ b/services/tests/notification/src/com/android/server/notification/NotificationChannelTest.java @@ -25,8 +25,14 @@ import android.os.Parcel;  import android.support.test.runner.AndroidJUnit4;  import android.test.suitebuilder.annotation.SmallTest; +import com.android.internal.util.FastXmlSerializer; +  import org.junit.Test;  import org.junit.runner.RunWith; +import org.xmlpull.v1.XmlSerializer; + +import java.io.BufferedOutputStream; +import java.io.ByteArrayOutputStream;  @SmallTest  @RunWith(AndroidJUnit4.class) @@ -50,4 +56,15 @@ public class NotificationChannelTest extends NotificationTestCase {          channel.setBlockableSystem(true);          assertEquals(true, channel.isBlockableSystem());      } + +    @Test +    public void testEmptyVibration_noException() throws Exception { +        NotificationChannel channel = new NotificationChannel("a", "ab", IMPORTANCE_DEFAULT); +        channel.setVibrationPattern(new long[0]); + +        XmlSerializer serializer = new FastXmlSerializer(); +        ByteArrayOutputStream baos = new ByteArrayOutputStream(); +        serializer.setOutput(new BufferedOutputStream(baos), "utf-8"); +        channel.writeXml(serializer); +    }  } diff --git a/services/tests/notification/src/com/android/server/notification/NotificationManagerServiceTest.java b/services/tests/notification/src/com/android/server/notification/NotificationManagerServiceTest.java index 2e96f6fb888b..8b3fb1817304 100644 --- a/services/tests/notification/src/com/android/server/notification/NotificationManagerServiceTest.java +++ b/services/tests/notification/src/com/android/server/notification/NotificationManagerServiceTest.java @@ -314,9 +314,9 @@ public class NotificationManagerServiceTest extends NotificationTestCase {          mBinderService.enqueueNotificationWithTag(PKG, "opPkg", "tag", 0,                  generateNotificationRecord(null).getNotification(), 0);          waitForIdle(); -        StatusBarNotification[] notifs = -                mBinderService.getActiveNotifications(PKG); +        StatusBarNotification[] notifs = mBinderService.getActiveNotifications(PKG);          assertEquals(1, notifs.length); +        assertEquals(1, mNotificationManagerService.getNotificationRecordCount());      }      @Test @@ -328,6 +328,7 @@ public class NotificationManagerServiceTest extends NotificationTestCase {          StatusBarNotification[] notifs =                  mBinderService.getActiveNotifications(PKG);          assertEquals(0, notifs.length); +        assertEquals(0, mNotificationManagerService.getNotificationRecordCount());      }      @Test @@ -342,6 +343,7 @@ public class NotificationManagerServiceTest extends NotificationTestCase {          StatusBarNotification[] notifs =                  mBinderService.getActiveNotifications(PKG);          assertEquals(0, notifs.length); +        assertEquals(0, mNotificationManagerService.getNotificationRecordCount());      }      @Test @@ -354,6 +356,7 @@ public class NotificationManagerServiceTest extends NotificationTestCase {          StatusBarNotification[] notifs =                  mBinderService.getActiveNotifications(sbn.getPackageName());          assertEquals(0, notifs.length); +        assertEquals(0, mNotificationManagerService.getNotificationRecordCount());      }      @Test @@ -366,6 +369,43 @@ public class NotificationManagerServiceTest extends NotificationTestCase {          StatusBarNotification[] notifs =                  mBinderService.getActiveNotifications(sbn.getPackageName());          assertEquals(0, notifs.length); +        assertEquals(0, mNotificationManagerService.getNotificationRecordCount()); +    } + +    @Test +    public void testUserInitiatedClearAll_noLeak() throws Exception { +        final NotificationRecord n = generateNotificationRecord( +                mTestNotificationChannel, 1, "group", true); + +        mBinderService.enqueueNotificationWithTag(PKG, "opPkg", "tag", +                n.sbn.getId(), n.sbn.getNotification(), n.sbn.getUserId()); +        waitForIdle(); + +        mNotificationManagerService.mNotificationDelegate.onClearAll(uid, Binder.getCallingPid(), +                n.getUserId()); +        waitForIdle(); +        StatusBarNotification[] notifs = +                mBinderService.getActiveNotifications(n.sbn.getPackageName()); +        assertEquals(0, notifs.length); +        assertEquals(0, mNotificationManagerService.getNotificationRecordCount()); +    } + +    @Test +    public void testCancelAllNotificationsCancelsChildren() throws Exception { +        final NotificationRecord parent = generateNotificationRecord( +                mTestNotificationChannel, 1, "group1", true); +        final NotificationRecord child = generateNotificationRecord( +                mTestNotificationChannel, 2, "group1", false); + +        mBinderService.enqueueNotificationWithTag(PKG, "opPkg", "tag", +                parent.sbn.getId(), parent.sbn.getNotification(), parent.sbn.getUserId()); +        mBinderService.enqueueNotificationWithTag(PKG, "opPkg", "tag", +                child.sbn.getId(), child.sbn.getNotification(), child.sbn.getUserId()); +        waitForIdle(); + +        mBinderService.cancelAllNotifications(PKG, parent.sbn.getUserId()); +        waitForIdle(); +        assertEquals(0, mNotificationManagerService.getNotificationRecordCount());      }      @Test @@ -377,6 +417,8 @@ public class NotificationManagerServiceTest extends NotificationTestCase {          }          mBinderService.cancelAllNotifications(PKG, sbn.getUserId());          waitForIdle(); + +        assertEquals(0, mNotificationManagerService.getNotificationRecordCount());      }      @Test @@ -403,6 +445,8 @@ public class NotificationManagerServiceTest extends NotificationTestCase {                  parentAsChild.sbn.getId(), parentAsChild.sbn.getNotification(),                  parentAsChild.sbn.getUserId());          waitForIdle(); + +        assertEquals(0, mNotificationManagerService.getNotificationRecordCount());      }      @Test @@ -416,6 +460,7 @@ public class NotificationManagerServiceTest extends NotificationTestCase {          StatusBarNotification[] notifs =                  mBinderService.getActiveNotifications(sbn.getPackageName());          assertEquals(1, notifs.length); +        assertEquals(1, mNotificationManagerService.getNotificationRecordCount());      }      @Test @@ -429,6 +474,7 @@ public class NotificationManagerServiceTest extends NotificationTestCase {          StatusBarNotification[] notifs =                  mBinderService.getActiveNotifications(sbn.getPackageName());          assertEquals(1, notifs.length); +        assertEquals(1, mNotificationManagerService.getNotificationRecordCount());      }      @Test @@ -441,6 +487,7 @@ public class NotificationManagerServiceTest extends NotificationTestCase {          StatusBarNotification[] notifs =                  mBinderService.getActiveNotifications(sbn.getPackageName());          assertEquals(0, notifs.length); +        assertEquals(0, mNotificationManagerService.getNotificationRecordCount());      }      @Test @@ -454,6 +501,7 @@ public class NotificationManagerServiceTest extends NotificationTestCase {          StatusBarNotification[] notifs =                  mBinderService.getActiveNotifications(sbn.getPackageName());          assertEquals(1, notifs.length); +        assertEquals(1, mNotificationManagerService.getNotificationRecordCount());      }      @Test @@ -483,6 +531,7 @@ public class NotificationManagerServiceTest extends NotificationTestCase {          mBinderService.cancelNotificationWithTag(PKG, "tag", sbn.getId(), sbn.getUserId());          waitForIdle();          assertEquals(0, mBinderService.getActiveNotifications(sbn.getPackageName()).length); +        assertEquals(0, mNotificationManagerService.getNotificationRecordCount());      }      @Test diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityRecordTests.java b/services/tests/servicestests/src/com/android/server/am/ActivityRecordTests.java index f75d49cae574..2252c85dddf2 100644 --- a/services/tests/servicestests/src/com/android/server/am/ActivityRecordTests.java +++ b/services/tests/servicestests/src/com/android/server/am/ActivityRecordTests.java @@ -16,10 +16,15 @@  package com.android.server.am; +import static android.view.WindowManagerPolicy.NAV_BAR_BOTTOM; +import static android.view.WindowManagerPolicy.NAV_BAR_LEFT; +import static android.view.WindowManagerPolicy.NAV_BAR_RIGHT;  import static org.junit.Assert.assertEquals;  import static org.junit.Assert.assertNull; +import static org.mockito.Mockito.when;  import android.content.ComponentName; +import android.graphics.Rect;  import android.platform.test.annotations.Presubmit;  import android.support.test.filters.MediumTest;  import android.support.test.runner.AndroidJUnit4; @@ -94,4 +99,36 @@ public class ActivityRecordTests extends ActivityTestsBase {          return -1;      } + +    @Test +    public void testPositionLimitedAspectRatioNavBarBottom() throws Exception { +        verifyPositionWithLimitedAspectRatio(NAV_BAR_BOTTOM, new Rect(0, 0, 1000, 2000), 1.5f, +                new Rect(0, 0, 1000, 1500)); +    } + +    @Test +    public void testPositionLimitedAspectRatioNavBarLeft() throws Exception { +        verifyPositionWithLimitedAspectRatio(NAV_BAR_LEFT, new Rect(0, 0, 2000, 1000), 1.5f, +                new Rect(500, 0, 2000, 1000)); +    } + +    @Test +    public void testPositionLimitedAspectRatioNavBarRight() throws Exception { +        verifyPositionWithLimitedAspectRatio(NAV_BAR_RIGHT, new Rect(0, 0, 2000, 1000), 1.5f, +                new Rect(0, 0, 1500, 1000)); +    } + +    private void verifyPositionWithLimitedAspectRatio(int navBarPosition, Rect taskBounds, +            float aspectRatio, Rect expectedActivityBounds) { +        final ActivityManagerService service = createActivityManagerService(); +        final TaskRecord task = createTask(service, testActivityComponent, TEST_STACK_ID); +        final ActivityRecord record = createActivity(service, testActivityComponent, task); + +        // Verify with nav bar on the right. +        when(service.mWindowManager.getNavBarPosition()).thenReturn(navBarPosition); +        task.getConfiguration().setAppBounds(taskBounds); +        record.info.maxAspectRatio = aspectRatio; +        record.ensureActivityConfigurationLocked(0 /* globalChanges */, false /* preserveWindow */); +        assertEquals(expectedActivityBounds, record.getBounds()); +    }  } diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java b/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java index bac121695ed9..16bc011f97b5 100644 --- a/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java +++ b/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java @@ -120,6 +120,7 @@ public class ActivityTestsBase {                  null /*_taskDescription*/, new ActivityManager.TaskThumbnailInfo());          final ActivityStack stack = service.mStackSupervisor.getStack(stackId,                  true /*createStaticStackIfNeeded*/, true /*onTop*/); +        service.mStackSupervisor.setFocusStackUnchecked("test", stack);          stack.addTask(task, true, "creating test task");          task.setStack(stack);          task.setWindowContainerController(mock(TaskWindowContainerController.class)); diff --git a/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java b/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java index a4e56fc9f745..0a7a5f26d35e 100644 --- a/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java +++ b/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java @@ -17,6 +17,7 @@  package com.android.server.wm;  import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING; +import static android.view.WindowManagerPolicy.NAV_BAR_BOTTOM;  import static org.mockito.Matchers.anyInt;  import static org.mockito.Mockito.doReturn;  import static org.mockito.Mockito.mock; @@ -614,6 +615,11 @@ class TestWindowManagerPolicy implements WindowManagerPolicy {      }      @Override +    public int getNavBarPosition() { +        return NAV_BAR_BOTTOM; +    } + +    @Override      public void getNonDecorInsetsLw(int displayRotation, int displayWidth, int displayHeight,              Rect outInsets) { diff --git a/services/usb/java/com/android/server/usb/descriptors/UsbDescriptorParser.java b/services/usb/java/com/android/server/usb/descriptors/UsbDescriptorParser.java index 7c074dadadf9..303a577767ad 100644 --- a/services/usb/java/com/android/server/usb/descriptors/UsbDescriptorParser.java +++ b/services/usb/java/com/android/server/usb/descriptors/UsbDescriptorParser.java @@ -118,27 +118,28 @@ public class UsbDescriptorParser {      /**       * @hide       */ -    public boolean parseDescriptors(byte[] descriptors) { -        try { -            mDescriptors.clear(); - -            ByteStream stream = new ByteStream(descriptors); -            while (stream.available() > 0) { -                UsbDescriptor descriptor = allocDescriptor(stream); -                if (descriptor != null) { -                    // Parse +    public void parseDescriptors(byte[] descriptors) { +        mDescriptors.clear(); + +        ByteStream stream = new ByteStream(descriptors); +        while (stream.available() > 0) { +            UsbDescriptor descriptor = allocDescriptor(stream); +            if (descriptor != null) { +                // Parse +                try {                      descriptor.parseRawDescriptors(stream); -                    mDescriptors.add(descriptor); - -                    // Clean up -                    descriptor.postParse(stream); +                } catch (Exception ex) { +                    Log.e(TAG, "Exception parsing USB descriptors.", ex);                  } + +                // Its OK to add the invalid descriptor as the postParse() +                // routine will mark it as invalid. +                mDescriptors.add(descriptor); + +                // Clean up +                descriptor.postParse(stream);              } -            return true; -        } catch (Exception ex) { -            Log.e(TAG, "Exception parsing USB descriptors.", ex);          } -        return false;      }      /** @@ -146,7 +147,11 @@ public class UsbDescriptorParser {       */      public boolean parseDevice(String deviceAddr) {          byte[] rawDescriptors = getRawDescriptors(deviceAddr); -        return rawDescriptors != null && parseDescriptors(rawDescriptors); +        if (rawDescriptors != null) { +            parseDescriptors(rawDescriptors); +            return true; +        } +        return false;      }      private native byte[] getRawDescriptors(String deviceAddr); diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 9b3786e1fbb0..f6deb0a07b26 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -1471,6 +1471,17 @@ public class CarrierConfigManager {      public static final String IMSI_KEY_EXPIRATION_DAYS_TIME_INT =              "imsi_key_expiration_days_time_int"; +    /** +     * Key identifying if the CDMA Caller ID presentation and suppression MMI codes +     * should be converted to 3GPP CLIR codes when a multimode (CDMA+UMTS+LTE) device is roaming +     * on a 3GPP network. Specifically *67<number> will be converted to #31#<number> and +     * *82<number> will be converted to *31#<number> before dialing a call when this key is +     * set TRUE and device is roaming on a 3GPP network. +     * @hide +     */ +    public static final String KEY_CONVERT_CDMA_CALLER_ID_MMI_CODES_WHILE_ROAMING_ON_3GPP_BOOL = +            "convert_cdma_caller_id_mmi_codes_while_roaming_on_3gpp_bool"; +      /** The default value for every variable. */      private final static PersistableBundle sDefaults; @@ -1721,6 +1732,8 @@ public class CarrierConfigManager {          sDefaults.putBoolean(KEY_DISABLE_VOICE_BARRING_NOTIFICATION_BOOL, false);          sDefaults.putInt(IMSI_KEY_EXPIRATION_DAYS_TIME_INT, IMSI_ENCRYPTION_DAYS_TIME_DISABLED);          sDefaults.putString(IMSI_KEY_DOWNLOAD_URL_STRING, null); +        sDefaults.putBoolean(KEY_CONVERT_CDMA_CALLER_ID_MMI_CODES_WHILE_ROAMING_ON_3GPP_BOOL, +                false);      }      /** diff --git a/tests/Internal/src/com/android/internal/colorextraction/ColorExtractorTest.java b/tests/Internal/src/com/android/internal/colorextraction/ColorExtractorTest.java index 71821472f55e..0060901578cd 100644 --- a/tests/Internal/src/com/android/internal/colorextraction/ColorExtractorTest.java +++ b/tests/Internal/src/com/android/internal/colorextraction/ColorExtractorTest.java @@ -62,21 +62,6 @@ public class ColorExtractorTest {      }      @Test -    public void getColors_usesFallbackIfFails() { -        ExtractionType alwaysFail = -                (inWallpaperColors, outGradientColorsNormal, outGradientColorsDark, -                        outGradientColorsExtraDark) -> false; -        ColorExtractor extractor = new ColorExtractor(mContext, alwaysFail); -        GradientColors colors = extractor.getColors(WallpaperManager.FLAG_SYSTEM); - -        assertEquals("Should be using the fallback color.", -                colors.getMainColor(), ColorExtractor.FALLBACK_COLOR); -        assertEquals("Should be using the fallback color.", -                colors.getSecondaryColor(), ColorExtractor.FALLBACK_COLOR); -        assertFalse("Dark text support should be false.", colors.supportsDarkText()); -    } - -    @Test      public void getColors_usesExtractedColors() {          GradientColors colorsExpectedNormal = new GradientColors();          colorsExpectedNormal.setMainColor(Color.RED); @@ -96,8 +81,6 @@ public class ColorExtractorTest {              outGradientColorsNormal.set(colorsExpectedNormal);              outGradientColorsDark.set(colorsExpectedDark);              outGradientColorsExtraDark.set(colorsExpectedExtraDark); -            // Successful extraction -            return true;          };          ColorExtractor extractor = new ColorExtractor(mContext, type); diff --git a/tests/Internal/src/com/android/internal/colorextraction/types/TonalTest.java b/tests/Internal/src/com/android/internal/colorextraction/types/TonalTest.java index 1e3e8e91d9ef..6dc9ba7b621f 100644 --- a/tests/Internal/src/com/android/internal/colorextraction/types/TonalTest.java +++ b/tests/Internal/src/com/android/internal/colorextraction/types/TonalTest.java @@ -20,6 +20,7 @@ import static org.junit.Assert.assertTrue;  import android.app.WallpaperColors;  import android.graphics.Color; +import android.support.test.InstrumentationRegistry;  import android.support.test.filters.SmallTest;  import android.support.test.runner.AndroidJUnit4;  import android.util.Range; @@ -40,6 +41,32 @@ import java.util.Arrays;  public class TonalTest {      @Test +    public void extractInto_usesFallback() { +        GradientColors normal = new GradientColors(); +        Tonal tonal = new Tonal(InstrumentationRegistry.getContext()); +        tonal.extractInto(null, normal, new GradientColors(), +                new GradientColors()); +        assertFalse("Should use fallback color if WallpaperColors is null.", +                normal.getMainColor() == Tonal.MAIN_COLOR_LIGHT); +    } + +    @Test +    public void extractInto_usesFallbackWhenTooLightOrDark() { +        GradientColors normal = new GradientColors(); +        Tonal tonal = new Tonal(InstrumentationRegistry.getContext()); +        tonal.extractInto(new WallpaperColors(Color.valueOf(0xff000000), null, null, 0), +                normal, new GradientColors(), new GradientColors()); +        assertTrue("Should use fallback color if WallpaperColors is too dark.", +                normal.getMainColor() == Tonal.MAIN_COLOR_DARK); + +        tonal.extractInto(new WallpaperColors(Color.valueOf(0xffffffff), null, null, +                        WallpaperColors.HINT_SUPPORTS_DARK_TEXT), +                normal, new GradientColors(), new GradientColors()); +        assertTrue("Should use fallback color if WallpaperColors is too light.", +                normal.getMainColor() == Tonal.MAIN_COLOR_LIGHT); +    } + +    @Test      public void colorRange_containsColor() {          Tonal.ColorRange colorRange = new Tonal.ColorRange(new Range<>(0f, 50f),                  new Range<>(0f, 1f), new Range<>(0f, 1f)); @@ -64,16 +91,28 @@ public class TonalTest {      }      @Test -    public void colorRange_excludeBlacklistedColor() { -        // Creating a WallpaperColors object that contains *only* blacklisted colors -        float[] hsl = Tonal.BLACKLISTED_COLORS[0].getCenter(); +    public void configParser_dataSanity() { +        Tonal.ConfigParser config = new Tonal.ConfigParser(InstrumentationRegistry.getContext()); +        // 1 to avoid regression where only first item would be parsed. +        assertTrue("Tonal palettes are empty", config.getTonalPalettes().size() > 1); +        assertTrue("Blacklisted colors are empty", config.getBlacklistedColors().size() > 1); +    } + +    @Test +    public void tonal_excludeBlacklistedColor() { +        // Make sure that palette generation will fail. +        Tonal tonal = new Tonal(InstrumentationRegistry.getContext()); + +        // Creating a WallpaperColors object that contains *only* blacklisted colors. +        float[] hsl = tonal.getBlacklistedColors().get(0).getCenter();          WallpaperColors colors = new WallpaperColors(Color.valueOf(ColorUtils.HSLToColor(hsl)),                  null, null, 0);          // Make sure that palette generation will fail -        Tonal tonal = new Tonal(); -        boolean success = tonal.extractInto(colors, new GradientColors(), new GradientColors(), +        GradientColors normal = new GradientColors(); +        tonal.extractInto(colors, normal, new GradientColors(),                  new GradientColors()); -        assertFalse("Cannot generate a tonal palette from blacklisted colors ", success); +        assertTrue("Cannot generate a tonal palette from blacklisted colors.", +                normal.getMainColor() == Tonal.MAIN_COLOR_DARK);      }  } diff --git a/tests/net/java/com/android/server/connectivity/TetheringTest.java b/tests/net/java/com/android/server/connectivity/TetheringTest.java index acf9e8f71718..a115146486a4 100644 --- a/tests/net/java/com/android/server/connectivity/TetheringTest.java +++ b/tests/net/java/com/android/server/connectivity/TetheringTest.java @@ -178,6 +178,7 @@ public class TetheringTest {          mTethering = new Tethering(mServiceContext, mNMService, mStatsService, mPolicyManager,                                     mLooper.getLooper(), mSystemProperties,                                     mTetheringDependencies); +        verify(mNMService).registerTetheringStatsProvider(any(), anyString());      }      @After diff --git a/tests/net/java/com/android/server/connectivity/tethering/OffloadControllerTest.java b/tests/net/java/com/android/server/connectivity/tethering/OffloadControllerTest.java index 0dedf703f3bb..dcb9723fa5e2 100644 --- a/tests/net/java/com/android/server/connectivity/tethering/OffloadControllerTest.java +++ b/tests/net/java/com/android/server/connectivity/tethering/OffloadControllerTest.java @@ -16,25 +16,38 @@  package com.android.server.connectivity.tethering; +import static android.net.NetworkStats.SET_DEFAULT; +import static android.net.NetworkStats.TAG_NONE; +import static android.net.TrafficStats.UID_TETHERING;  import static android.provider.Settings.Global.TETHER_OFFLOAD_DISABLED; +import static com.android.server.connectivity.tethering.OffloadHardwareInterface.ForwardedStats;  import static org.junit.Assert.assertEquals;  import static org.junit.Assert.assertTrue;  import static org.junit.Assert.fail;  import static org.mockito.Matchers.any;  import static org.mockito.Matchers.anyObject; +import static org.mockito.Matchers.anyString;  import static org.mockito.Matchers.eq; +import static org.mockito.Mockito.doNothing;  import static org.mockito.Mockito.inOrder;  import static org.mockito.Mockito.never;  import static org.mockito.Mockito.reset;  import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify;  import static org.mockito.Mockito.when;  import android.content.Context;  import android.content.pm.ApplicationInfo; +import android.net.ITetheringStatsProvider; +import android.net.IpPrefix;  import android.net.LinkAddress;  import android.net.LinkProperties; +import android.net.NetworkStats;  import android.net.RouteInfo;  import android.net.util.SharedLog; +import android.os.Handler; +import android.os.Looper; +import android.os.INetworkManagementService;  import android.provider.Settings;  import android.provider.Settings.SettingNotFoundException; @@ -45,6 +58,8 @@ import com.android.internal.util.test.FakeSettingsProvider;  import java.net.InetAddress;  import java.util.ArrayList; +import java.util.HashSet; +import java.util.Set;  import org.junit.After;  import org.junit.Before; @@ -63,11 +78,14 @@ public class OffloadControllerTest {      @Mock private OffloadHardwareInterface mHardware;      @Mock private ApplicationInfo mApplicationInfo;      @Mock private Context mContext; +    @Mock private INetworkManagementService mNMService;      private final ArgumentCaptor<ArrayList> mStringArrayCaptor =              ArgumentCaptor.forClass(ArrayList.class); +    private final ArgumentCaptor<ITetheringStatsProvider.Stub> mTetherStatsProviderCaptor = +            ArgumentCaptor.forClass(ITetheringStatsProvider.Stub.class);      private MockContentResolver mContentResolver; -    @Before public void setUp() throws Exception { +    @Before public void setUp() {          MockitoAnnotations.initMocks(this);          when(mContext.getApplicationInfo()).thenReturn(mApplicationInfo);          when(mContext.getPackageName()).thenReturn("OffloadControllerTest"); @@ -85,14 +103,23 @@ public class OffloadControllerTest {          when(mHardware.initOffloadConfig()).thenReturn(true);          when(mHardware.initOffloadControl(any(OffloadHardwareInterface.ControlCallback.class)))                  .thenReturn(true); +        when(mHardware.getForwardedStats(any())).thenReturn(new ForwardedStats());      }      private void enableOffload() {          Settings.Global.putInt(mContentResolver, TETHER_OFFLOAD_DISABLED, 0);      } +    private OffloadController makeOffloadController() throws Exception { +        OffloadController offload = new OffloadController(new Handler(Looper.getMainLooper()), +                mHardware, mContentResolver, mNMService, new SharedLog("test")); +        verify(mNMService).registerTetheringStatsProvider( +                mTetherStatsProviderCaptor.capture(), anyString()); +        return offload; +    } +      @Test -    public void testNoSettingsValueDefaultDisabledDoesNotStart() { +    public void testNoSettingsValueDefaultDisabledDoesNotStart() throws Exception {          setupFunctioningHardwareInterface();          when(mHardware.getDefaultTetherOffloadDisabled()).thenReturn(1);          try { @@ -100,8 +127,7 @@ public class OffloadControllerTest {              fail();          } catch (SettingNotFoundException expected) {} -        final OffloadController offload = -                new OffloadController(null, mHardware, mContentResolver, new SharedLog("test")); +        final OffloadController offload = makeOffloadController();          offload.start();          final InOrder inOrder = inOrder(mHardware); @@ -113,7 +139,7 @@ public class OffloadControllerTest {      }      @Test -    public void testNoSettingsValueDefaultEnabledDoesStart() { +    public void testNoSettingsValueDefaultEnabledDoesStart() throws Exception {          setupFunctioningHardwareInterface();          when(mHardware.getDefaultTetherOffloadDisabled()).thenReturn(0);          try { @@ -121,8 +147,7 @@ public class OffloadControllerTest {              fail();          } catch (SettingNotFoundException expected) {} -        final OffloadController offload = -                new OffloadController(null, mHardware, mContentResolver, new SharedLog("test")); +        final OffloadController offload = makeOffloadController();          offload.start();          final InOrder inOrder = inOrder(mHardware); @@ -134,12 +159,11 @@ public class OffloadControllerTest {      }      @Test -    public void testSettingsAllowsStart() { +    public void testSettingsAllowsStart() throws Exception {          setupFunctioningHardwareInterface();          Settings.Global.putInt(mContentResolver, TETHER_OFFLOAD_DISABLED, 0); -        final OffloadController offload = -                new OffloadController(null, mHardware, mContentResolver, new SharedLog("test")); +        final OffloadController offload = makeOffloadController();          offload.start();          final InOrder inOrder = inOrder(mHardware); @@ -151,12 +175,11 @@ public class OffloadControllerTest {      }      @Test -    public void testSettingsDisablesStart() { +    public void testSettingsDisablesStart() throws Exception {          setupFunctioningHardwareInterface();          Settings.Global.putInt(mContentResolver, TETHER_OFFLOAD_DISABLED, 1); -        final OffloadController offload = -                new OffloadController(null, mHardware, mContentResolver, new SharedLog("test")); +        final OffloadController offload = makeOffloadController();          offload.start();          final InOrder inOrder = inOrder(mHardware); @@ -171,8 +194,7 @@ public class OffloadControllerTest {          setupFunctioningHardwareInterface();          enableOffload(); -        final OffloadController offload = -                new OffloadController(null, mHardware, mContentResolver, new SharedLog("test")); +        final OffloadController offload = makeOffloadController();          offload.start();          final InOrder inOrder = inOrder(mHardware); @@ -182,17 +204,43 @@ public class OffloadControllerTest {                  any(OffloadHardwareInterface.ControlCallback.class));          inOrder.verifyNoMoreInteractions(); +        // In reality, the UpstreamNetworkMonitor would have passed down to us +        // a covering set of local prefixes representing a minimum essential +        // set plus all the prefixes on networks with network agents. +        // +        // We simulate that there, and then add upstream elements one by one +        // and watch what happens. +        final Set<IpPrefix> minimumLocalPrefixes = new HashSet<>(); +        for (String s : new String[]{ +                "127.0.0.0/8", "192.0.2.0/24", "fe80::/64", "2001:db8::/64"}) { +            minimumLocalPrefixes.add(new IpPrefix(s)); +        } +        offload.setLocalPrefixes(minimumLocalPrefixes); +        inOrder.verify(mHardware, times(1)).setLocalPrefixes(mStringArrayCaptor.capture()); +        ArrayList<String> localPrefixes = mStringArrayCaptor.getValue(); +        assertEquals(4, localPrefixes.size()); +        assertTrue(localPrefixes.contains("127.0.0.0/8")); +        assertTrue(localPrefixes.contains("192.0.2.0/24")); +        assertTrue(localPrefixes.contains("fe80::/64")); +        assertTrue(localPrefixes.contains("2001:db8::/64")); +        inOrder.verifyNoMoreInteractions(); +          offload.setUpstreamLinkProperties(null); -        inOrder.verify(mHardware, times(1)).setUpstreamParameters( -                eq(null), eq(null), eq(null), eq(null)); +        // No change in local addresses means no call to setLocalPrefixes(). +        inOrder.verify(mHardware, never()).setLocalPrefixes(mStringArrayCaptor.capture()); +        // This LinkProperties value does not differ from the default upstream. +        // There should be no extraneous call to setUpstreamParameters(). +        inOrder.verify(mHardware, never()).setUpstreamParameters( +                anyObject(), anyObject(), anyObject(), anyObject());          inOrder.verifyNoMoreInteractions(); -        reset(mHardware);          final LinkProperties lp = new LinkProperties();          final String testIfName = "rmnet_data17";          lp.setInterfaceName(testIfName);          offload.setUpstreamLinkProperties(lp); +        // No change in local addresses means no call to setLocalPrefixes(). +        inOrder.verify(mHardware, never()).setLocalPrefixes(mStringArrayCaptor.capture());          inOrder.verify(mHardware, times(1)).setUpstreamParameters(                  eq(testIfName), eq(null), eq(null), eq(null));          inOrder.verifyNoMoreInteractions(); @@ -200,23 +248,38 @@ public class OffloadControllerTest {          final String ipv4Addr = "192.0.2.5";          final String linkAddr = ipv4Addr + "/24";          lp.addLinkAddress(new LinkAddress(linkAddr)); +        lp.addRoute(new RouteInfo(new IpPrefix("192.0.2.0/24")));          offload.setUpstreamLinkProperties(lp); +        // IPv4 prefixes and addresses on the upstream are simply left as whole +        // prefixes (already passed in from UpstreamNetworkMonitor code). If a +        // tethering client sends traffic to the IPv4 default router or other +        // clients on the upstream this will not be hardware-forwarded, and that +        // should be fine for now. Ergo: no change in local addresses, no call +        // to setLocalPrefixes(). +        inOrder.verify(mHardware, never()).setLocalPrefixes(mStringArrayCaptor.capture());          inOrder.verify(mHardware, times(1)).setUpstreamParameters(                  eq(testIfName), eq(ipv4Addr), eq(null), eq(null)); +        inOrder.verify(mHardware, times(1)).getForwardedStats(eq(testIfName));          inOrder.verifyNoMoreInteractions();          final String ipv4Gateway = "192.0.2.1";          lp.addRoute(new RouteInfo(InetAddress.getByName(ipv4Gateway)));          offload.setUpstreamLinkProperties(lp); +        // No change in local addresses means no call to setLocalPrefixes(). +        inOrder.verify(mHardware, never()).setLocalPrefixes(mStringArrayCaptor.capture());          inOrder.verify(mHardware, times(1)).setUpstreamParameters(                  eq(testIfName), eq(ipv4Addr), eq(ipv4Gateway), eq(null)); +        inOrder.verify(mHardware, times(1)).getForwardedStats(eq(testIfName));          inOrder.verifyNoMoreInteractions();          final String ipv6Gw1 = "fe80::cafe";          lp.addRoute(new RouteInfo(InetAddress.getByName(ipv6Gw1)));          offload.setUpstreamLinkProperties(lp); +        // No change in local addresses means no call to setLocalPrefixes(). +        inOrder.verify(mHardware, never()).setLocalPrefixes(mStringArrayCaptor.capture());          inOrder.verify(mHardware, times(1)).setUpstreamParameters(                  eq(testIfName), eq(ipv4Addr), eq(ipv4Gateway), mStringArrayCaptor.capture()); +        inOrder.verify(mHardware, times(1)).getForwardedStats(eq(testIfName));          ArrayList<String> v6gws = mStringArrayCaptor.getValue();          assertEquals(1, v6gws.size());          assertTrue(v6gws.contains(ipv6Gw1)); @@ -225,8 +288,11 @@ public class OffloadControllerTest {          final String ipv6Gw2 = "fe80::d00d";          lp.addRoute(new RouteInfo(InetAddress.getByName(ipv6Gw2)));          offload.setUpstreamLinkProperties(lp); +        // No change in local addresses means no call to setLocalPrefixes(). +        inOrder.verify(mHardware, never()).setLocalPrefixes(mStringArrayCaptor.capture());          inOrder.verify(mHardware, times(1)).setUpstreamParameters(                  eq(testIfName), eq(ipv4Addr), eq(ipv4Gateway), mStringArrayCaptor.capture()); +        inOrder.verify(mHardware, times(1)).getForwardedStats(eq(testIfName));          v6gws = mStringArrayCaptor.getValue();          assertEquals(2, v6gws.size());          assertTrue(v6gws.contains(ipv6Gw1)); @@ -240,12 +306,115 @@ public class OffloadControllerTest {          stacked.addRoute(new RouteInfo(InetAddress.getByName("fe80::bad:f00")));          assertTrue(lp.addStackedLink(stacked));          offload.setUpstreamLinkProperties(lp); +        // No change in local addresses means no call to setLocalPrefixes(). +        inOrder.verify(mHardware, never()).setLocalPrefixes(mStringArrayCaptor.capture()); +        inOrder.verify(mHardware, times(1)).setUpstreamParameters( +                eq(testIfName), eq(ipv4Addr), eq(ipv4Gateway), mStringArrayCaptor.capture()); +        inOrder.verify(mHardware, times(1)).getForwardedStats(eq(testIfName)); +        v6gws = mStringArrayCaptor.getValue(); +        assertEquals(2, v6gws.size()); +        assertTrue(v6gws.contains(ipv6Gw1)); +        assertTrue(v6gws.contains(ipv6Gw2)); +        inOrder.verifyNoMoreInteractions(); + +        // Add in some IPv6 upstream info. When there is a tethered downstream +        // making use of the IPv6 prefix we would expect to see the /64 route +        // removed from "local prefixes" and /128s added for the upstream IPv6 +        // addresses.  This is not yet implemented, and for now we simply +        // expect to see these /128s. +        lp.addRoute(new RouteInfo(new IpPrefix("2001:db8::/64"))); +        // "2001:db8::/64" plus "assigned" ASCII in hex +        lp.addLinkAddress(new LinkAddress("2001:db8::6173:7369:676e:6564/64")); +        // "2001:db8::/64" plus "random" ASCII in hex +        lp.addLinkAddress(new LinkAddress("2001:db8::7261:6e64:6f6d/64")); +        offload.setUpstreamLinkProperties(lp); +        inOrder.verify(mHardware, times(1)).setLocalPrefixes(mStringArrayCaptor.capture()); +        localPrefixes = mStringArrayCaptor.getValue(); +        assertEquals(6, localPrefixes.size()); +        assertTrue(localPrefixes.contains("127.0.0.0/8")); +        assertTrue(localPrefixes.contains("192.0.2.0/24")); +        assertTrue(localPrefixes.contains("fe80::/64")); +        assertTrue(localPrefixes.contains("2001:db8::/64")); +        assertTrue(localPrefixes.contains("2001:db8::6173:7369:676e:6564/128")); +        assertTrue(localPrefixes.contains("2001:db8::7261:6e64:6f6d/128")); +        // The relevant parts of the LinkProperties have not changed, but at the +        // moment we do not de-dup upstream LinkProperties this carefully.          inOrder.verify(mHardware, times(1)).setUpstreamParameters(                  eq(testIfName), eq(ipv4Addr), eq(ipv4Gateway), mStringArrayCaptor.capture());          v6gws = mStringArrayCaptor.getValue();          assertEquals(2, v6gws.size());          assertTrue(v6gws.contains(ipv6Gw1));          assertTrue(v6gws.contains(ipv6Gw2)); +        inOrder.verify(mHardware, times(1)).getForwardedStats(eq(testIfName)); +        inOrder.verifyNoMoreInteractions(); + +        // Completely identical LinkProperties updates are de-duped. +        offload.setUpstreamLinkProperties(lp); +        // This LinkProperties value does not differ from the default upstream. +        // There should be no extraneous call to setUpstreamParameters(). +        inOrder.verify(mHardware, never()).setUpstreamParameters( +                anyObject(), anyObject(), anyObject(), anyObject());          inOrder.verifyNoMoreInteractions();      } + +    private void assertNetworkStats(String iface, ForwardedStats stats, NetworkStats.Entry entry) { +        assertEquals(iface, entry.iface); +        assertEquals(stats.rxBytes, entry.rxBytes); +        assertEquals(stats.txBytes, entry.txBytes); +        assertEquals(SET_DEFAULT, entry.set); +        assertEquals(TAG_NONE, entry.tag); +        assertEquals(UID_TETHERING, entry.uid); +    } + +    @Test +    public void testGetForwardedStats() throws Exception { +        setupFunctioningHardwareInterface(); +        enableOffload(); + +        final OffloadController offload = makeOffloadController(); +        offload.start(); + +        final String ethernetIface = "eth1"; +        final String mobileIface = "rmnet_data0"; + +        ForwardedStats ethernetStats = new ForwardedStats(); +        ethernetStats.rxBytes = 12345; +        ethernetStats.txBytes = 54321; + +        ForwardedStats mobileStats = new ForwardedStats(); +        mobileStats.rxBytes = 999; +        mobileStats.txBytes = 99999; + +        when(mHardware.getForwardedStats(eq(ethernetIface))).thenReturn(ethernetStats); +        when(mHardware.getForwardedStats(eq(mobileIface))).thenReturn(mobileStats); + +        final LinkProperties lp = new LinkProperties(); +        lp.setInterfaceName(ethernetIface); +        offload.setUpstreamLinkProperties(lp); + +        lp.setInterfaceName(mobileIface); +        offload.setUpstreamLinkProperties(lp); + +        lp.setInterfaceName(ethernetIface); +        offload.setUpstreamLinkProperties(lp); + +        ethernetStats.rxBytes = 100000; +        ethernetStats.txBytes = 100000; +        offload.setUpstreamLinkProperties(null); + +        NetworkStats stats = mTetherStatsProviderCaptor.getValue().getTetherStats(); +        assertEquals(2, stats.size()); + +        NetworkStats.Entry entry = null; +        int ethernetPosition = ethernetIface.equals(stats.getValues(0, entry).iface) ? 0 : 1; +        int mobilePosition = 1 - ethernetPosition; + +        entry = stats.getValues(mobilePosition, entry); +        assertNetworkStats(mobileIface, mobileStats, entry); + +        ethernetStats.rxBytes = 12345 + 100000; +        ethernetStats.txBytes = 54321 + 100000; +        entry = stats.getValues(ethernetPosition, entry); +        assertNetworkStats(ethernetIface, ethernetStats, entry); +    }  } diff --git a/tests/net/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitorTest.java b/tests/net/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitorTest.java index 69c93b14a486..c3b9defdec4e 100644 --- a/tests/net/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitorTest.java +++ b/tests/net/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitorTest.java @@ -324,19 +324,14 @@ public class UpstreamNetworkMonitorTest {      }      @Test -    public void testOffloadExemptPrefixes() throws Exception { +    public void testLocalPrefixes() throws Exception {          mUNM.start(); -        // [0] Test minimum set of exempt prefixes. -        Set<IpPrefix> exempt = mUNM.getOffloadExemptPrefixes(); -        final String[] MINSET = { -                "127.0.0.0/8", "169.254.0.0/16", -                "::/3", "fe80::/64", "fc00::/7", "ff00::/8", -        }; -        assertPrefixSet(exempt, INCLUDES, MINSET); +        // [0] Test minimum set of local prefixes. +        Set<IpPrefix> local = mUNM.getLocalPrefixes(); +        assertTrue(local.isEmpty()); +          final Set<String> alreadySeen = new HashSet<>(); -        Collections.addAll(alreadySeen, MINSET); -        assertEquals(alreadySeen.size(), exempt.size());          // [1] Pretend Wi-Fi connects.          final TestNetworkAgent wifiAgent = new TestNetworkAgent(mCM, TRANSPORT_WIFI); @@ -355,15 +350,15 @@ public class UpstreamNetworkMonitorTest {          wifiAgent.fakeConnect();          wifiAgent.sendLinkProperties(wifiLp); -        exempt = mUNM.getOffloadExemptPrefixes(); -        assertPrefixSet(exempt, INCLUDES, alreadySeen); +        local = mUNM.getLocalPrefixes(); +        assertPrefixSet(local, INCLUDES, alreadySeen);          final String[] wifiLinkPrefixes = { -                // Excludes link-local as that's already tested within MINSET. +                // Link-local prefixes are excluded and dealt with elsewhere.                  "100.112.96.0/20", "2001:db8:4:fd00::/64", "fd6a:a640:60bf:e985::/64",          }; -        assertPrefixSet(exempt, INCLUDES, wifiLinkPrefixes); +        assertPrefixSet(local, INCLUDES, wifiLinkPrefixes);          Collections.addAll(alreadySeen, wifiLinkPrefixes); -        assertEquals(alreadySeen.size(), exempt.size()); +        assertEquals(alreadySeen.size(), local.size());          // [2] Pretend mobile connects.          final TestNetworkAgent cellAgent = new TestNetworkAgent(mCM, TRANSPORT_CELLULAR); @@ -379,12 +374,12 @@ public class UpstreamNetworkMonitorTest {          cellAgent.fakeConnect();          cellAgent.sendLinkProperties(cellLp); -        exempt = mUNM.getOffloadExemptPrefixes(); -        assertPrefixSet(exempt, INCLUDES, alreadySeen); +        local = mUNM.getLocalPrefixes(); +        assertPrefixSet(local, INCLUDES, alreadySeen);          final String[] cellLinkPrefixes = { "10.102.211.32/27", "2001:db8:0:1::/64" }; -        assertPrefixSet(exempt, INCLUDES, cellLinkPrefixes); +        assertPrefixSet(local, INCLUDES, cellLinkPrefixes);          Collections.addAll(alreadySeen, cellLinkPrefixes); -        assertEquals(alreadySeen.size(), exempt.size()); +        assertEquals(alreadySeen.size(), local.size());          // [3] Pretend DUN connects.          final TestNetworkAgent dunAgent = new TestNetworkAgent(mCM, TRANSPORT_CELLULAR); @@ -401,21 +396,20 @@ public class UpstreamNetworkMonitorTest {          dunAgent.fakeConnect();          dunAgent.sendLinkProperties(dunLp); -        exempt = mUNM.getOffloadExemptPrefixes(); -        assertPrefixSet(exempt, INCLUDES, alreadySeen); +        local = mUNM.getLocalPrefixes(); +        assertPrefixSet(local, INCLUDES, alreadySeen);          final String[] dunLinkPrefixes = { "192.0.2.32/27", "2001:db8:1:2::/64" }; -        assertPrefixSet(exempt, INCLUDES, dunLinkPrefixes); +        assertPrefixSet(local, INCLUDES, dunLinkPrefixes);          Collections.addAll(alreadySeen, dunLinkPrefixes); -        assertEquals(alreadySeen.size(), exempt.size()); +        assertEquals(alreadySeen.size(), local.size());          // [4] Pretend Wi-Fi disconnected.  It's addresses/prefixes should no          // longer be included (should be properly removed).          wifiAgent.fakeDisconnect(); -        exempt = mUNM.getOffloadExemptPrefixes(); -        assertPrefixSet(exempt, INCLUDES, MINSET); -        assertPrefixSet(exempt, EXCLUDES, wifiLinkPrefixes); -        assertPrefixSet(exempt, INCLUDES, cellLinkPrefixes); -        assertPrefixSet(exempt, INCLUDES, dunLinkPrefixes); +        local = mUNM.getLocalPrefixes(); +        assertPrefixSet(local, EXCLUDES, wifiLinkPrefixes); +        assertPrefixSet(local, INCLUDES, cellLinkPrefixes); +        assertPrefixSet(local, INCLUDES, dunLinkPrefixes);      }      private void assertSatisfiesLegacyType(int legacyType, NetworkState ns) { diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index 613c529fa616..7173775a34fa 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -1411,6 +1411,8 @@ public class WifiManager {      public static final int WIFI_FEATURE_IE_WHITELIST     = 0x1000000; // Probe IE white listing      /** @hide */      public static final int WIFI_FEATURE_SCAN_RAND        = 0x2000000; // Random MAC & Probe seq +    /** @hide */ +    public static final int WIFI_FEATURE_TX_POWER_LIMIT   = 0x4000000; // Set Tx power limit      private int getSupportedFeatures() { @@ -2302,12 +2304,20 @@ public class WifiManager {       */      @SystemApi      public interface ActionListener { -        /** The operation succeeded */ +        /** +         * The operation succeeded. +         * This is called when the scan request has been validated and ready +         * to sent to driver. +         */          public void onSuccess();          /** -         * The operation failed -         * @param reason The reason for failure could be one of -         * {@link #ERROR}, {@link #IN_PROGRESS} or {@link #BUSY} +         * The operation failed. +         * This is called when the scan request failed. +         * @param reason The reason for failure could be one of the following: +         * {@link #REASON_INVALID_REQUEST}} is specified when scan request parameters are invalid. +         * {@link #REASON_NOT_AUTHORIZED} is specified when requesting app doesn't have the required +         * permission to request a scan. +         * {@link #REASON_UNSPECIFIED} is specified when driver reports a scan failure.           */          public void onFailure(int reason);      }  |