Merge "Get permissions flags with GET_RUNTIME_PERMISSION"
diff --git a/Android.bp b/Android.bp
index 5e03982..e14281a 100644
--- a/Android.bp
+++ b/Android.bp
@@ -108,6 +108,7 @@
"core/java/android/app/prediction/IPredictionCallback.aidl",
"core/java/android/app/prediction/IPredictionManager.aidl",
"core/java/android/app/role/IOnRoleHoldersChangedListener.aidl",
+ "core/java/android/app/role/IRoleController.aidl",
"core/java/android/app/role/IRoleManager.aidl",
"core/java/android/app/role/IRoleManagerCallback.aidl",
"core/java/android/app/slice/ISliceManager.aidl",
@@ -275,7 +276,6 @@
"core/java/android/os/storage/IStorageShutdownObserver.aidl",
"core/java/android/os/storage/IObbActionListener.aidl",
"core/java/android/permission/IPermissionController.aidl",
- "core/java/android/rolecontrollerservice/IRoleControllerService.aidl",
":keystore_aidl",
"core/java/android/security/keymaster/IKeyAttestationApplicationIdProvider.aidl",
"core/java/android/service/appprediction/IPredictionService.aidl",
diff --git a/api/current.txt b/api/current.txt
index a291a10..1d5318c 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -14460,7 +14460,7 @@
method public android.graphics.Paint.Style getStyle();
method public android.graphics.Paint.Align getTextAlign();
method public void getTextBounds(String, int, int, android.graphics.Rect);
- method public void getTextBounds(CharSequence, int, int, android.graphics.Rect);
+ method public void getTextBounds(@NonNull CharSequence, int, int, @NonNull android.graphics.Rect);
method public void getTextBounds(char[], int, int, android.graphics.Rect);
method @NonNull public java.util.Locale getTextLocale();
method @NonNull @Size(min=1) public android.os.LocaleList getTextLocales();
@@ -14479,7 +14479,7 @@
method public android.graphics.Typeface getTypeface();
method @Px public float getUnderlinePosition();
method @Px public float getUnderlineThickness();
- method public float getWordSpacing();
+ method @Px public float getWordSpacing();
method @Deprecated public android.graphics.Xfermode getXfermode();
method public boolean hasGlyph(String);
method public final boolean isAntiAlias();
@@ -14535,7 +14535,7 @@
method public void setTextSkewX(float);
method public android.graphics.Typeface setTypeface(android.graphics.Typeface);
method public void setUnderlineText(boolean);
- method public void setWordSpacing(float);
+ method public void setWordSpacing(@Px float);
method @Deprecated public android.graphics.Xfermode setXfermode(android.graphics.Xfermode);
field public static final int ANTI_ALIAS_FLAG = 1; // 0x1
field public static final int CURSOR_AFTER = 0; // 0x0
@@ -15115,13 +15115,13 @@
method public android.graphics.Typeface.Builder setWeight(@IntRange(from=1, to=1000) int);
}
- public static class Typeface.CustomFallbackBuilder {
+ public static final class Typeface.CustomFallbackBuilder {
ctor public Typeface.CustomFallbackBuilder(@NonNull android.graphics.fonts.FontFamily);
- method public android.graphics.Typeface.CustomFallbackBuilder addCustomFallback(@NonNull android.graphics.fonts.FontFamily);
- method public android.graphics.Typeface build();
+ method @NonNull public android.graphics.Typeface.CustomFallbackBuilder addCustomFallback(@NonNull android.graphics.fonts.FontFamily);
+ method @NonNull public android.graphics.Typeface build();
method @IntRange(from=64) public static int getMaxCustomFallbackCount();
- method public android.graphics.Typeface.CustomFallbackBuilder setStyle(@NonNull android.graphics.fonts.FontStyle);
- method public android.graphics.Typeface.CustomFallbackBuilder setSystemFallback(@NonNull String);
+ method @NonNull public android.graphics.Typeface.CustomFallbackBuilder setStyle(@NonNull android.graphics.fonts.FontStyle);
+ method @NonNull public android.graphics.Typeface.CustomFallbackBuilder setSystemFallback(@NonNull String);
}
public class Xfermode {
@@ -15775,15 +15775,15 @@
method @NonNull public java.nio.ByteBuffer getBuffer();
method @Nullable public java.io.File getFile();
method @NonNull public android.os.LocaleList getLocaleList();
- method public android.graphics.fonts.FontStyle getStyle();
+ method @NonNull public android.graphics.fonts.FontStyle getStyle();
method @IntRange(from=0) public int getTtcIndex();
}
- public static class Font.Builder {
+ public static final class Font.Builder {
ctor public Font.Builder(@NonNull java.nio.ByteBuffer);
ctor public Font.Builder(@NonNull java.io.File);
- ctor public Font.Builder(@NonNull java.io.FileDescriptor);
- ctor public Font.Builder(@NonNull java.io.FileDescriptor, @IntRange(from=0) long, @IntRange(from=0xffffffff) long);
+ ctor public Font.Builder(@NonNull android.os.ParcelFileDescriptor);
+ ctor public Font.Builder(@NonNull android.os.ParcelFileDescriptor, @IntRange(from=0) long, @IntRange(from=0xffffffff) long);
ctor public Font.Builder(@NonNull android.content.res.AssetManager, @NonNull String);
ctor public Font.Builder(@NonNull android.content.res.Resources, int);
method @Nullable public android.graphics.fonts.Font build() throws java.io.IOException;
@@ -15795,11 +15795,11 @@
}
public final class FontFamily {
- method public android.graphics.fonts.Font getFont(@IntRange(from=0) int);
- method public int getSize();
+ method @NonNull public android.graphics.fonts.Font getFont(@IntRange(from=0) int);
+ method @IntRange(from=1) public int getSize();
}
- public static class FontFamily.Builder {
+ public static final class FontFamily.Builder {
ctor public FontFamily.Builder(@NonNull android.graphics.fonts.Font);
method @NonNull public android.graphics.fonts.FontFamily.Builder addFont(@NonNull android.graphics.fonts.Font);
method @NonNull public android.graphics.fonts.FontFamily build();
@@ -15891,7 +15891,7 @@
package android.graphics.text {
public class LineBreaker {
- method public android.graphics.text.LineBreaker.Result computeLineBreaks(@NonNull android.graphics.text.MeasuredText, @NonNull android.graphics.text.LineBreaker.ParagraphConstraints, @IntRange(from=0) int);
+ method @NonNull public android.graphics.text.LineBreaker.Result computeLineBreaks(@NonNull android.graphics.text.MeasuredText, @NonNull android.graphics.text.LineBreaker.ParagraphConstraints, @IntRange(from=0) int);
field public static final int BREAK_STRATEGY_BALANCED = 2; // 0x2
field public static final int BREAK_STRATEGY_HIGH_QUALITY = 1; // 0x1
field public static final int BREAK_STRATEGY_SIMPLE = 0; // 0x0
@@ -15902,13 +15902,13 @@
field public static final int JUSTIFICATION_MODE_NONE = 0; // 0x0
}
- public static class LineBreaker.Builder {
+ public static final class LineBreaker.Builder {
ctor public LineBreaker.Builder();
- method public android.graphics.text.LineBreaker build();
- method public android.graphics.text.LineBreaker.Builder setBreakStrategy(int);
- method public android.graphics.text.LineBreaker.Builder setHyphenationFrequency(int);
- method public android.graphics.text.LineBreaker.Builder setIndents(@Nullable int[]);
- method public android.graphics.text.LineBreaker.Builder setJustified(int);
+ method @NonNull public android.graphics.text.LineBreaker build();
+ method @NonNull public android.graphics.text.LineBreaker.Builder setBreakStrategy(int);
+ method @NonNull public android.graphics.text.LineBreaker.Builder setHyphenationFrequency(int);
+ method @NonNull public android.graphics.text.LineBreaker.Builder setIndents(@Nullable int[]);
+ method @NonNull public android.graphics.text.LineBreaker.Builder setJustificationMode(int);
}
public static class LineBreaker.ParagraphConstraints {
@@ -15940,14 +15940,14 @@
method @FloatRange(from=0.0) @Px public float getWidth(@IntRange(from=0) int, @IntRange(from=0) int);
}
- public static class MeasuredText.Builder {
+ public static final class MeasuredText.Builder {
ctor public MeasuredText.Builder(@NonNull char[]);
ctor public MeasuredText.Builder(@NonNull android.graphics.text.MeasuredText);
- method public android.graphics.text.MeasuredText.Builder appendReplacementRun(@NonNull android.graphics.Paint, @IntRange(from=0) int, @FloatRange(from=0) float);
- method public android.graphics.text.MeasuredText.Builder appendStyleRun(@NonNull android.graphics.Paint, @IntRange(from=0) int, boolean);
- method public android.graphics.text.MeasuredText build();
- method public android.graphics.text.MeasuredText.Builder setComputeHyphenation(boolean);
- method public android.graphics.text.MeasuredText.Builder setComputeLayout(boolean);
+ method @NonNull public android.graphics.text.MeasuredText.Builder appendReplacementRun(@NonNull android.graphics.Paint, @IntRange(from=0) int, @Px @FloatRange(from=0) float);
+ method @NonNull public android.graphics.text.MeasuredText.Builder appendStyleRun(@NonNull android.graphics.Paint, @IntRange(from=0) int, boolean);
+ method @NonNull public android.graphics.text.MeasuredText build();
+ method @NonNull public android.graphics.text.MeasuredText.Builder setComputeHyphenation(boolean);
+ method @NonNull public android.graphics.text.MeasuredText.Builder setComputeLayout(boolean);
}
}
@@ -38954,6 +38954,7 @@
field public static final String ACTION_INTERNET_CONNECTIVITY = "android.settings.panel.action.INTERNET_CONNECTIVITY";
field public static final String ACTION_NFC = "android.settings.panel.action.NFC";
field public static final String ACTION_VOLUME = "android.settings.panel.action.VOLUME";
+ field public static final String ACTION_WIFI = "android.settings.panel.action.WIFI";
}
public static final class Settings.Secure extends android.provider.Settings.NameValueTable {
@@ -39256,13 +39257,13 @@
}
public static final class Telephony.CarrierId implements android.provider.BaseColumns {
- method @NonNull public static android.net.Uri getPreciseCarrierIdUriForSubscriptionId(int);
+ method @NonNull public static android.net.Uri getSpecificCarrierIdUriForSubscriptionId(int);
method public static android.net.Uri getUriForSubscriptionId(int);
field public static final String CARRIER_ID = "carrier_id";
field public static final String CARRIER_NAME = "carrier_name";
field public static final android.net.Uri CONTENT_URI;
- field public static final String PRECISE_CARRIER_ID = "precise_carrier_id";
- field public static final String PRECISE_CARRIER_ID_NAME = "precise_carrier_id_name";
+ field public static final String SPECIFIC_CARRIER_ID = "specific_carrier_id";
+ field public static final String SPECIFIC_CARRIER_ID_NAME = "specific_carrier_id_name";
}
public static final class Telephony.Carriers implements android.provider.BaseColumns {
@@ -41406,7 +41407,7 @@
method @Nullable public String getImsi();
method public String getMcc();
method public String getMnc();
- method public int getPreciseCarrierId();
+ method public int getSpecificCarrierId();
method @Nullable public String getSpn();
method public void writeToParcel(android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.service.carrier.CarrierIdentifier> CREATOR;
@@ -45111,9 +45112,9 @@
method public String getSimCountryIso();
method public String getSimOperator();
method public String getSimOperatorName();
- method public int getSimPreciseCarrierId();
- method @Nullable public CharSequence getSimPreciseCarrierIdName();
method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getSimSerialNumber();
+ method public int getSimSpecificCarrierId();
+ method @Nullable public CharSequence getSimSpecificCarrierIdName();
method public int getSimState();
method public int getSimState(int);
method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getSubscriberId();
@@ -45174,7 +45175,7 @@
field public static final String ACTION_SECRET_CODE = "android.telephony.action.SECRET_CODE";
field public static final String ACTION_SHOW_VOICEMAIL_NOTIFICATION = "android.telephony.action.SHOW_VOICEMAIL_NOTIFICATION";
field public static final String ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED = "android.telephony.action.SUBSCRIPTION_CARRIER_IDENTITY_CHANGED";
- field public static final String ACTION_SUBSCRIPTION_PRECISE_CARRIER_IDENTITY_CHANGED = "android.telephony.action.SUBSCRIPTION_PRECISE_CARRIER_IDENTITY_CHANGED";
+ field public static final String ACTION_SUBSCRIPTION_SPECIFIC_CARRIER_IDENTITY_CHANGED = "android.telephony.action.SUBSCRIPTION_SPECIFIC_CARRIER_IDENTITY_CHANGED";
field public static final int APPTYPE_CSIM = 4; // 0x4
field public static final int APPTYPE_ISIM = 5; // 0x5
field public static final int APPTYPE_RUIM = 3; // 0x3
@@ -45209,8 +45210,8 @@
field public static final String EXTRA_NETWORK_COUNTRY = "android.telephony.extra.NETWORK_COUNTRY";
field public static final String EXTRA_NOTIFICATION_COUNT = "android.telephony.extra.NOTIFICATION_COUNT";
field public static final String EXTRA_PHONE_ACCOUNT_HANDLE = "android.telephony.extra.PHONE_ACCOUNT_HANDLE";
- field public static final String EXTRA_PRECISE_CARRIER_ID = "android.telephony.extra.PRECISE_CARRIER_ID";
- field public static final String EXTRA_PRECISE_CARRIER_NAME = "android.telephony.extra.PRECISE_CARRIER_NAME";
+ field public static final String EXTRA_SPECIFIC_CARRIER_ID = "android.telephony.extra.SPECIFIC_CARRIER_ID";
+ field public static final String EXTRA_SPECIFIC_CARRIER_NAME = "android.telephony.extra.SPECIFIC_CARRIER_NAME";
field public static final String EXTRA_STATE = "state";
field public static final String EXTRA_STATE_IDLE;
field public static final String EXTRA_STATE_OFFHOOK;
diff --git a/api/system-current.txt b/api/system-current.txt
index 91b9940..906c062 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -1116,6 +1116,17 @@
method public void onRoleHoldersChanged(@NonNull String, @NonNull android.os.UserHandle);
}
+ public abstract class RoleControllerService extends android.app.Service {
+ ctor public RoleControllerService();
+ method public abstract void onAddRoleHolder(@NonNull String, @NonNull String, int, @NonNull android.app.role.RoleManagerCallback);
+ method @Nullable public final android.os.IBinder onBind(@Nullable android.content.Intent);
+ method public abstract void onClearRoleHolders(@NonNull String, int, @NonNull android.app.role.RoleManagerCallback);
+ method public abstract void onGrantDefaultRoles(@NonNull android.app.role.RoleManagerCallback);
+ method public abstract void onRemoveRoleHolder(@NonNull String, @NonNull String, int, @NonNull android.app.role.RoleManagerCallback);
+ method public abstract void onSmsKillSwitchToggled(boolean);
+ field public static final String SERVICE_INTERFACE = "android.app.role.RoleControllerService";
+ }
+
public final class RoleManager {
method @RequiresPermission(android.Manifest.permission.OBSERVE_ROLE_HOLDERS) public void addOnRoleHoldersChangedListenerAsUser(@NonNull java.util.concurrent.Executor, @NonNull android.app.role.OnRoleHoldersChangedListener, @NonNull android.os.UserHandle);
method @RequiresPermission(android.Manifest.permission.MANAGE_ROLE_HOLDERS) public void addRoleHolderAsUser(@NonNull String, @NonNull String, int, @NonNull android.os.UserHandle, @NonNull java.util.concurrent.Executor, @NonNull android.app.role.RoleManagerCallback);
@@ -6177,21 +6188,6 @@
}
-package android.rolecontrollerservice {
-
- public abstract class RoleControllerService extends android.app.Service {
- ctor public RoleControllerService();
- method public abstract void onAddRoleHolder(@NonNull String, @NonNull String, int, @NonNull android.app.role.RoleManagerCallback);
- method @Nullable public final android.os.IBinder onBind(@Nullable android.content.Intent);
- method public abstract void onClearRoleHolders(@NonNull String, int, @NonNull android.app.role.RoleManagerCallback);
- method public abstract void onGrantDefaultRoles(@NonNull android.app.role.RoleManagerCallback);
- method public abstract void onRemoveRoleHolder(@NonNull String, @NonNull String, int, @NonNull android.app.role.RoleManagerCallback);
- method public abstract void onSmsKillSwitchToggled(boolean);
- field public static final String SERVICE_INTERFACE = "android.rolecontrollerservice.RoleControllerService";
- }
-
-}
-
package android.security.keystore {
public abstract class AttestationUtils {
@@ -6488,10 +6484,14 @@
public abstract class ContentSuggestionsService extends android.app.Service {
ctor public ContentSuggestionsService();
- method public abstract void classifyContentSelections(@NonNull android.app.contentsuggestions.ClassificationsRequest, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.ClassificationsCallback);
- method public abstract void notifyInteraction(@NonNull String, @NonNull android.os.Bundle);
- method public abstract void processContextImage(int, @Nullable android.graphics.Bitmap, @NonNull android.os.Bundle);
- method public abstract void suggestContentSelections(@NonNull android.app.contentsuggestions.SelectionsRequest, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.SelectionsCallback);
+ method @Deprecated public void classifyContentSelections(@NonNull android.app.contentsuggestions.ClassificationsRequest, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.ClassificationsCallback);
+ method @Deprecated public void notifyInteraction(@NonNull String, @NonNull android.os.Bundle);
+ method public void onClassifyContentSelections(@NonNull android.app.contentsuggestions.ClassificationsRequest, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.ClassificationsCallback);
+ method public void onNotifyInteraction(@NonNull String, @NonNull android.os.Bundle);
+ method public void onProcessContextImage(int, @Nullable android.graphics.Bitmap, @NonNull android.os.Bundle);
+ method public void onSuggestContentSelections(@NonNull android.app.contentsuggestions.SelectionsRequest, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.SelectionsCallback);
+ method @Deprecated public void processContextImage(int, @Nullable android.graphics.Bitmap, @NonNull android.os.Bundle);
+ method @Deprecated public void suggestContentSelections(@NonNull android.app.contentsuggestions.SelectionsRequest, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.SelectionsCallback);
field public static final String SERVICE_INTERFACE = "android.service.contentsuggestions.ContentSuggestionsService";
}
diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java
index 1faa2ac..90bc0a6 100644
--- a/core/java/android/app/SystemServiceRegistry.java
+++ b/core/java/android/app/SystemServiceRegistry.java
@@ -26,6 +26,7 @@
import android.app.job.IJobScheduler;
import android.app.job.JobScheduler;
import android.app.prediction.AppPredictionManager;
+import android.app.role.RoleControllerManager;
import android.app.role.RoleManager;
import android.app.slice.SliceManager;
import android.app.timedetector.TimeDetector;
@@ -1243,6 +1244,14 @@
return new RoleManager(ctx.getOuterContext());
}});
+ registerService(Context.ROLE_CONTROLLER_SERVICE, RoleControllerManager.class,
+ new CachedServiceFetcher<RoleControllerManager>() {
+ @Override
+ public RoleControllerManager createService(ContextImpl ctx)
+ throws ServiceNotFoundException {
+ return new RoleControllerManager(ctx.getOuterContext());
+ }});
+
registerService(Context.ROLLBACK_SERVICE, RollbackManager.class,
new CachedServiceFetcher<RollbackManager>() {
@Override
diff --git a/core/java/android/rolecontrollerservice/IRoleControllerService.aidl b/core/java/android/app/role/IRoleController.aidl
similarity index 87%
rename from core/java/android/rolecontrollerservice/IRoleControllerService.aidl
rename to core/java/android/app/role/IRoleController.aidl
index 40852ea..07a4161 100644
--- a/core/java/android/rolecontrollerservice/IRoleControllerService.aidl
+++ b/core/java/android/app/role/IRoleController.aidl
@@ -14,14 +14,16 @@
* limitations under the License.
*/
-package android.rolecontrollerservice;
+package android.app.role;
import android.app.role.IRoleManagerCallback;
/**
* @hide
*/
-oneway interface IRoleControllerService {
+oneway interface IRoleController {
+
+ void onGrantDefaultRoles(in IRoleManagerCallback callback);
void onAddRoleHolder(in String roleName, in String packageName, int flags,
in IRoleManagerCallback callback);
@@ -31,7 +33,5 @@
void onClearRoleHolders(in String roleName, int flags, in IRoleManagerCallback callback);
- void onGrantDefaultRoles(in IRoleManagerCallback callback);
-
- void onSmsKillSwitchToggled(boolean smsRestrictionEnabled);
+ void onSmsKillSwitchToggled(boolean enabled);
}
diff --git a/core/java/android/app/role/RoleControllerManager.java b/core/java/android/app/role/RoleControllerManager.java
new file mode 100644
index 0000000..a9b13ee
--- /dev/null
+++ b/core/java/android/app/role/RoleControllerManager.java
@@ -0,0 +1,474 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.app.role;
+
+import android.annotation.NonNull;
+import android.annotation.SystemService;
+import android.annotation.UserIdInt;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.os.Binder;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.util.Log;
+import android.util.SparseArray;
+
+import com.android.internal.annotations.GuardedBy;
+import com.android.internal.infra.AbstractMultiplePendingRequestsRemoteService;
+import com.android.internal.infra.AbstractRemoteService;
+
+/**
+ * Interface for communicating with the role controller.
+ *
+ * @hide
+ */
+@SystemService(Context.ROLE_CONTROLLER_SERVICE)
+public class RoleControllerManager {
+
+ private static final String LOG_TAG = RoleControllerManager.class.getSimpleName();
+
+ private static final Object sRemoteServicesLock = new Object();
+ /**
+ * Global remote services (per user) used by all {@link RoleControllerManager managers}.
+ */
+ @GuardedBy("sRemoteServicesLock")
+ private static final SparseArray<RemoteService> sRemoteServices = new SparseArray<>();
+
+ @NonNull
+ private final RemoteService mRemoteService;
+
+ public RoleControllerManager(@NonNull Context context, @NonNull Handler handler) {
+ synchronized (sRemoteServicesLock) {
+ int userId = context.getUserId();
+ RemoteService remoteService = sRemoteServices.get(userId);
+ if (remoteService == null) {
+ Intent intent = new Intent(RoleControllerService.SERVICE_INTERFACE);
+ PackageManager packageManager = context.getPackageManager();
+ intent.setPackage(packageManager.getPermissionControllerPackageName());
+ ResolveInfo resolveInfo = packageManager.resolveService(intent, 0);
+
+ remoteService = new RemoteService(context.getApplicationContext(),
+ resolveInfo.getComponentInfo().getComponentName(), handler, userId);
+ sRemoteServices.put(userId, remoteService);
+ }
+ mRemoteService = remoteService;
+ }
+ }
+
+ public RoleControllerManager(@NonNull Context context) {
+ this(context, context.getMainThreadHandler());
+ }
+
+ /**
+ * @see RoleControllerService#onGrantDefaultRoles(RoleManagerCallback)
+ */
+ public void onGrantDefaultRoles(@NonNull IRoleManagerCallback callback) {
+ mRemoteService.scheduleRequest(new OnGrantDefaultRolesRequest(mRemoteService, callback));
+ }
+
+ /**
+ * @see RoleControllerService#onAddRoleHolder(String, String, int, RoleManagerCallback)
+ */
+ public void onAddRoleHolder(@NonNull String roleName, @NonNull String packageName,
+ @RoleManager.ManageHoldersFlags int flags, @NonNull IRoleManagerCallback callback) {
+ mRemoteService.scheduleRequest(new OnAddRoleHolderRequest(mRemoteService, roleName,
+ packageName, flags, callback));
+ }
+
+ /**
+ * @see RoleControllerService#onRemoveRoleHolder(String, String, int, RoleManagerCallback)
+ */
+ public void onRemoveRoleHolder(@NonNull String roleName, @NonNull String packageName,
+ @RoleManager.ManageHoldersFlags int flags, @NonNull IRoleManagerCallback callback) {
+ mRemoteService.scheduleRequest(new OnRemoveRoleHolderRequest(mRemoteService, roleName,
+ packageName, flags, callback));
+ }
+
+ /**
+ * @see RoleControllerService#onClearRoleHolders(String, int, RoleManagerCallback)
+ */
+ public void onClearRoleHolders(@NonNull String roleName,
+ @RoleManager.ManageHoldersFlags int flags, @NonNull IRoleManagerCallback callback) {
+ mRemoteService.scheduleRequest(new OnClearRoleHoldersRequest(mRemoteService, roleName,
+ flags, callback));
+ }
+
+ /**
+ * @see RoleControllerService#onSmsKillSwitchToggled(boolean)
+ */
+ public void onSmsKillSwitchToggled(boolean enabled) {
+ mRemoteService.scheduleAsyncRequest(new OnSmsKillSwitchToggledRequest(enabled));
+ }
+
+ /**
+ * Connection to the remote service.
+ */
+ private static final class RemoteService extends AbstractMultiplePendingRequestsRemoteService<
+ RemoteService, IRoleController> {
+
+ private static final long UNBIND_DELAY_MILLIS = 15 * 1000;
+ private static final long REQUEST_TIMEOUT_MILLIS = 15 * 1000;
+
+ /**
+ * Create a connection to the remote service
+ *
+ * @param context the context to use
+ * @param componentName the component of the service to connect to
+ * @param handler the handler for binding service and callbacks
+ * @param userId the user whom remote service should be connected as
+ */
+ RemoteService(@NonNull Context context, @NonNull ComponentName componentName,
+ @NonNull Handler handler, @UserIdInt int userId) {
+ super(context, RoleControllerService.SERVICE_INTERFACE, componentName, userId,
+ service -> Log.e(LOG_TAG, "RemoteService " + service + " died"), handler, false,
+ false, 1);
+ }
+
+ /**
+ * @return The default handler used by this service.
+ */
+ @NonNull
+ public Handler getHandler() {
+ return mHandler;
+ }
+
+ @Override
+ protected @NonNull IRoleController getServiceInterface(@NonNull IBinder binder) {
+ return IRoleController.Stub.asInterface(binder);
+ }
+
+ @Override
+ protected long getTimeoutIdleBindMillis() {
+ return UNBIND_DELAY_MILLIS;
+ }
+
+ @Override
+ protected long getRemoteRequestMillis() {
+ return REQUEST_TIMEOUT_MILLIS;
+ }
+
+ @Override
+ public void scheduleRequest(
+ @NonNull BasePendingRequest<RemoteService, IRoleController> pendingRequest) {
+ super.scheduleRequest(pendingRequest);
+ }
+
+ @Override
+ public void scheduleAsyncRequest(@NonNull AsyncRequest<IRoleController> request) {
+ super.scheduleAsyncRequest(request);
+ }
+ }
+
+ /**
+ * Request for {@link #onGrantDefaultRoles(IRoleManagerCallback)}.
+ */
+ private static final class OnGrantDefaultRolesRequest
+ extends AbstractRemoteService.PendingRequest<RemoteService, IRoleController> {
+
+ @NonNull
+ private final IRoleManagerCallback mCallback;
+
+ @NonNull
+ private final IRoleManagerCallback mRemoteCallback;
+
+ private OnGrantDefaultRolesRequest(@NonNull RemoteService service,
+ @NonNull IRoleManagerCallback callback) {
+ super(service);
+
+ mCallback = callback;
+
+ mRemoteCallback = new IRoleManagerCallback.Stub() {
+ @Override
+ public void onSuccess() throws RemoteException {
+ long token = Binder.clearCallingIdentity();
+ try {
+ mCallback.onSuccess();
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ finish();
+ }
+ }
+ @Override
+ public void onFailure() throws RemoteException {
+ long token = Binder.clearCallingIdentity();
+ try {
+ mCallback.onSuccess();
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ finish();
+ }
+ }
+ };
+ }
+
+ @Override
+ protected void onTimeout(@NonNull RemoteService remoteService) {
+ try {
+ mCallback.onFailure();
+ } catch (RemoteException e) {
+ Log.e(LOG_TAG, "Error calling onFailure() on callback", e);
+ }
+ }
+
+ @Override
+ public void run() {
+ try {
+ getService().getServiceInterface().onGrantDefaultRoles(mRemoteCallback);
+ } catch (RemoteException e) {
+ Log.e(LOG_TAG, "Error calling onGrantDefaultRoles()", e);
+ }
+ }
+ }
+
+ /**
+ * Request for {@link #onAddRoleHolder(String, String, int, IRoleManagerCallback)}.
+ */
+ private static final class OnAddRoleHolderRequest
+ extends AbstractRemoteService.PendingRequest<RemoteService, IRoleController> {
+
+ @NonNull
+ private final String mRoleName;
+ @NonNull
+ private final String mPackageName;
+ @RoleManager.ManageHoldersFlags
+ private final int mFlags;
+ @NonNull
+ private final IRoleManagerCallback mCallback;
+
+ @NonNull
+ private final IRoleManagerCallback mRemoteCallback;
+
+ private OnAddRoleHolderRequest(@NonNull RemoteService service, @NonNull String roleName,
+ @NonNull String packageName, @RoleManager.ManageHoldersFlags int flags,
+ @NonNull IRoleManagerCallback callback) {
+ super(service);
+
+ mRoleName = roleName;
+ mPackageName = packageName;
+ mFlags = flags;
+ mCallback = callback;
+
+ mRemoteCallback = new IRoleManagerCallback.Stub() {
+ @Override
+ public void onSuccess() throws RemoteException {
+ long token = Binder.clearCallingIdentity();
+ try {
+ mCallback.onSuccess();
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ finish();
+ }
+ }
+ @Override
+ public void onFailure() throws RemoteException {
+ long token = Binder.clearCallingIdentity();
+ try {
+ mCallback.onSuccess();
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ finish();
+ }
+ }
+ };
+ }
+
+ @Override
+ protected void onTimeout(@NonNull RemoteService remoteService) {
+ try {
+ mCallback.onFailure();
+ } catch (RemoteException e) {
+ Log.e(LOG_TAG, "Error calling onFailure() on callback", e);
+ }
+ }
+
+ @Override
+ public void run() {
+ try {
+ getService().getServiceInterface().onAddRoleHolder(mRoleName, mPackageName, mFlags,
+ mRemoteCallback);
+ } catch (RemoteException e) {
+ Log.e(LOG_TAG, "Error calling onAddRoleHolder()", e);
+ }
+ }
+ }
+
+ /**
+ * Request for {@link #onRemoveRoleHolder(String, String, int, IRoleManagerCallback)}.
+ */
+ private static final class OnRemoveRoleHolderRequest
+ extends AbstractRemoteService.PendingRequest<RemoteService, IRoleController> {
+
+ @NonNull
+ private final String mRoleName;
+ @NonNull
+ private final String mPackageName;
+ @RoleManager.ManageHoldersFlags
+ private final int mFlags;
+ @NonNull
+ private final IRoleManagerCallback mCallback;
+
+ @NonNull
+ private final IRoleManagerCallback mRemoteCallback;
+
+ private OnRemoveRoleHolderRequest(@NonNull RemoteService service, @NonNull String roleName,
+ @NonNull String packageName, @RoleManager.ManageHoldersFlags int flags,
+ @NonNull IRoleManagerCallback callback) {
+ super(service);
+
+ mRoleName = roleName;
+ mPackageName = packageName;
+ mFlags = flags;
+ mCallback = callback;
+
+ mRemoteCallback = new IRoleManagerCallback.Stub() {
+ @Override
+ public void onSuccess() throws RemoteException {
+ long token = Binder.clearCallingIdentity();
+ try {
+ mCallback.onSuccess();
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ finish();
+ }
+ }
+ @Override
+ public void onFailure() throws RemoteException {
+ long token = Binder.clearCallingIdentity();
+ try {
+ mCallback.onSuccess();
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ finish();
+ }
+ }
+ };
+ }
+
+ @Override
+ protected void onTimeout(@NonNull RemoteService remoteService) {
+ try {
+ mCallback.onFailure();
+ } catch (RemoteException e) {
+ Log.e(LOG_TAG, "Error calling onFailure() on callback", e);
+ }
+ }
+
+ @Override
+ public void run() {
+ try {
+ getService().getServiceInterface().onRemoveRoleHolder(mRoleName, mPackageName,
+ mFlags, mRemoteCallback);
+ } catch (RemoteException e) {
+ Log.e(LOG_TAG, "Error calling onRemoveRoleHolder()", e);
+ }
+ }
+ }
+
+ /**
+ * Request for {@link #onClearRoleHolders(String, int, IRoleManagerCallback)}.
+ */
+ private static final class OnClearRoleHoldersRequest
+ extends AbstractRemoteService.PendingRequest<RemoteService, IRoleController> {
+
+ @NonNull
+ private final String mRoleName;
+ @RoleManager.ManageHoldersFlags
+ private final int mFlags;
+ @NonNull
+ private final IRoleManagerCallback mCallback;
+
+ @NonNull
+ private final IRoleManagerCallback mRemoteCallback;
+
+ private OnClearRoleHoldersRequest(@NonNull RemoteService service, @NonNull String roleName,
+ @RoleManager.ManageHoldersFlags int flags, @NonNull IRoleManagerCallback callback) {
+ super(service);
+
+ mRoleName = roleName;
+ mFlags = flags;
+ mCallback = callback;
+
+ mRemoteCallback = new IRoleManagerCallback.Stub() {
+ @Override
+ public void onSuccess() throws RemoteException {
+ long token = Binder.clearCallingIdentity();
+ try {
+ mCallback.onSuccess();
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ finish();
+ }
+ }
+ @Override
+ public void onFailure() throws RemoteException {
+ long token = Binder.clearCallingIdentity();
+ try {
+ mCallback.onSuccess();
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ finish();
+ }
+ }
+ };
+ }
+
+ @Override
+ protected void onTimeout(@NonNull RemoteService remoteService) {
+ try {
+ mCallback.onFailure();
+ } catch (RemoteException e) {
+ Log.e(LOG_TAG, "Error calling onFailure() on callback", e);
+ }
+ }
+
+ @Override
+ public void run() {
+ try {
+ getService().getServiceInterface().onClearRoleHolders(mRoleName, mFlags,
+ mRemoteCallback);
+ } catch (RemoteException e) {
+ Log.e(LOG_TAG, "Error calling onClearRoleHolders()", e);
+ }
+ }
+ }
+
+ /**
+ * Request for {@link #onSmsKillSwitchToggled(boolean)}
+ */
+ private static final class OnSmsKillSwitchToggledRequest
+ implements AbstractRemoteService.AsyncRequest<IRoleController> {
+
+ private final boolean mEnabled;
+
+ private OnSmsKillSwitchToggledRequest(boolean enabled) {
+ mEnabled = enabled;
+ }
+
+ @Override
+ public void run(@NonNull IRoleController service) {
+ try {
+ service.onSmsKillSwitchToggled(mEnabled);
+ } catch (RemoteException e) {
+ Log.e(LOG_TAG, "Error calling onSmsKillSwitchToggled()", e);
+ }
+ }
+ }
+}
diff --git a/core/java/android/rolecontrollerservice/RoleControllerService.java b/core/java/android/app/role/RoleControllerService.java
similarity index 90%
rename from core/java/android/rolecontrollerservice/RoleControllerService.java
rename to core/java/android/app/role/RoleControllerService.java
index c846b07..f3da358 100644
--- a/core/java/android/rolecontrollerservice/RoleControllerService.java
+++ b/core/java/android/app/role/RoleControllerService.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,15 +14,12 @@
* limitations under the License.
*/
-package android.rolecontrollerservice;
+package android.app.role;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.app.Service;
-import android.app.role.IRoleManagerCallback;
-import android.app.role.RoleManager;
-import android.app.role.RoleManagerCallback;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;
@@ -48,17 +45,21 @@
private static final String LOG_TAG = RoleControllerService.class.getSimpleName();
/**
- * The {@link Intent} that must be declared as handled by the service. The service should also
- * require the {@link android.Manifest.permission#BIND_ROLE_CONTROLLER_SERVICE} permission so
- * that other applications can not abuse it.
+ * The {@link Intent} that must be declared as handled by the service.
*/
- public static final String SERVICE_INTERFACE =
- "android.rolecontrollerservice.RoleControllerService";
+ public static final String SERVICE_INTERFACE = "android.app.role.RoleControllerService";
@Nullable
@Override
public final IBinder onBind(@Nullable Intent intent) {
- return new IRoleControllerService.Stub() {
+ return new IRoleController.Stub() {
+
+ @Override
+ public void onGrantDefaultRoles(IRoleManagerCallback callback) {
+ Preconditions.checkNotNull(callback, "callback cannot be null");
+ RoleControllerService.this.onGrantDefaultRoles(new RoleManagerCallbackDelegate(
+ callback));
+ }
@Override
public void onAddRoleHolder(String roleName, String packageName, int flags,
@@ -92,13 +93,6 @@
}
@Override
- public void onGrantDefaultRoles(IRoleManagerCallback callback) {
- Preconditions.checkNotNull(callback, "callback cannot be null");
- RoleControllerService.this.onGrantDefaultRoles(new RoleManagerCallbackDelegate(
- callback));
- }
-
- @Override
public void onSmsKillSwitchToggled(boolean smsRestrictionEnabled) {
RoleControllerService.this.onSmsKillSwitchToggled(smsRestrictionEnabled);
}
@@ -106,6 +100,16 @@
}
/**
+ * Called by system to grant default permissions and roles.
+ * <p>
+ * This is typically when creating a new user or upgrading either system or
+ * permission controller package
+ *
+ * @param callback the callback for whether this call is successful
+ */
+ public abstract void onGrantDefaultRoles(@NonNull RoleManagerCallback callback);
+
+ /**
* Add a specific application to the holders of a role. If the role is exclusive, the previous
* holder will be replaced.
* <p>
@@ -153,20 +157,10 @@
/**
* Cleanup appop/permissions state in response to sms kill switch toggle
*
- * @param smsRestrictionEnabled whether kill switch was turned on
+ * @param enabled whether kill switch was turned on
*/
//STOPSHIP: remove this api before shipping a final version
- public abstract void onSmsKillSwitchToggled(boolean smsRestrictionEnabled);
-
- /**
- * Called by system to grant default permissions and roles.
- * <p>
- * This is typically when creating a new user or upgrading either system or
- * permission controller package
- *
- * @param callback the callback for whether this call is successful
- */
- public abstract void onGrantDefaultRoles(@NonNull RoleManagerCallback callback);
+ public abstract void onSmsKillSwitchToggled(boolean enabled);
private static class RoleManagerCallbackDelegate implements RoleManagerCallback {
diff --git a/core/java/android/app/role/RoleManager.java b/core/java/android/app/role/RoleManager.java
index f91d878..a663498 100644
--- a/core/java/android/app/role/RoleManager.java
+++ b/core/java/android/app/role/RoleManager.java
@@ -545,7 +545,7 @@
/**
* Set the names of all the available roles. Should only be called from
- * {@link android.rolecontrollerservice.RoleControllerService}.
+ * {@link android.app.role.RoleControllerService}.
* <p>
* <strong>Note:</strong> Using this API requires holding
* {@link #PERMISSION_MANAGE_ROLES_FROM_CONTROLLER}.
@@ -569,7 +569,7 @@
/**
* Add a specific application to the holders of a role, only modifying records inside
* {@link RoleManager}. Should only be called from
- * {@link android.rolecontrollerservice.RoleControllerService}.
+ * {@link android.app.role.RoleControllerService}.
* <p>
* <strong>Note:</strong> Using this API requires holding
* {@link #PERMISSION_MANAGE_ROLES_FROM_CONTROLLER}.
@@ -602,7 +602,7 @@
/**
* Remove a specific application from the holders of a role, only modifying records inside
* {@link RoleManager}. Should only be called from
- * {@link android.rolecontrollerservice.RoleControllerService}.
+ * {@link android.app.role.RoleControllerService}.
* <p>
* <strong>Note:</strong> Using this API requires holding
* {@link #PERMISSION_MANAGE_ROLES_FROM_CONTROLLER}.
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index f28718c..f896274 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -3176,6 +3176,7 @@
RESTRICTIONS_SERVICE,
APP_OPS_SERVICE,
ROLE_SERVICE,
+ //@hide ROLE_CONTROLLER_SERVICE,
CAMERA_SERVICE,
PRINT_SERVICE,
CONSUMER_IR_SERVICE,
@@ -4285,6 +4286,16 @@
public static final String ROLE_SERVICE = "role";
/**
+ * Official published name of the (internal) role controller service.
+ *
+ * @see #getSystemService(String)
+ * @see android.app.role.RoleControllerService
+ *
+ * @hide
+ */
+ public static final String ROLE_CONTROLLER_SERVICE = "role_controller";
+
+ /**
* Use with {@link #getSystemService(String)} to retrieve a
* {@link android.hardware.camera2.CameraManager} for interacting with
* camera devices.
diff --git a/core/java/android/permission/PermissionControllerManager.java b/core/java/android/permission/PermissionControllerManager.java
index 5695e42..2379928 100644
--- a/core/java/android/permission/PermissionControllerManager.java
+++ b/core/java/android/permission/PermissionControllerManager.java
@@ -513,7 +513,8 @@
RemoteService(@NonNull Context context, @NonNull ComponentName componentName,
@NonNull UserHandle user) {
super(context, SERVICE_INTERFACE, componentName, user.getIdentifier(),
- service -> Log.e(TAG, "RemoteService " + service + " died"), false, false, 1);
+ service -> Log.e(TAG, "RemoteService " + service + " died"),
+ context.getMainThreadHandler(), false, false, 1);
}
/**
diff --git a/core/java/android/provider/DeviceConfig.java b/core/java/android/provider/DeviceConfig.java
index 60c8d36..0ac7c37 100644
--- a/core/java/android/provider/DeviceConfig.java
+++ b/core/java/android/provider/DeviceConfig.java
@@ -323,18 +323,40 @@
*/
@SystemApi
public interface Rollback {
+
+ /**
+ * Namespace for flags that can be changed immediately after becoming available on device.
+ */
String NAMESPACE = "rollback";
+ /**
+ * Namespace for flags that can be changed only after reboot.
+ */
String BOOT_NAMESPACE = "rollback_boot";
/**
- * Timeout in milliseconds for enabling package rollback.
+ * Timeout duration in milliseconds for enabling package rollback. If we fail to enable
+ * rollback within that period, the install will proceed without rollback enabled.
+ *
+ * <p>If flag value is negative, the default value will be assigned.
+ *
+ * Flag type: {@code long}
+ * Namespace: Rollback.NAMESPACE
*/
String ENABLE_ROLLBACK_TIMEOUT = "enable_rollback_timeout";
- /**
- * The lifetime duration of rollback packages in millis
- */
+ /**
+ * Lifetime duration of rollback packages in millis. A rollback will be available for
+ * at most that duration of time after a package is installed with
+ * {@link PackageInstaller.SessionParams#setEnableRollback()}.
+ *
+ * <p>If flag value is negative, the default value will be assigned.
+ *
+ * @see RollbackManager
+ *
+ * Flag type: {@code long}
+ * Namespace: Rollback.BOOT_NAMESPACE
+ */
String ROLLBACK_LIFETIME_IN_MILLIS = "rollback_lifetime_in_millis";
}
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index ecbd673..5f36373 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -7557,6 +7557,15 @@
private static final Validator SKIP_GESTURE_VALIDATOR = BOOLEAN_VALIDATOR;
/**
+ * Count of successful gestures.
+ * @hide
+ */
+ public static final String SKIP_GESTURE_COUNT = "skip_gesture_count";
+
+ private static final Validator SKIP_GESTURE_COUNT_VALIDATOR =
+ NON_NEGATIVE_INTEGER_VALIDATOR;
+
+ /**
* Gesture that silences sound (alarms, notification, calls).
* @hide
*/
@@ -7565,6 +7574,34 @@
private static final Validator SILENCE_GESTURE_VALIDATOR = BOOLEAN_VALIDATOR;
/**
+ * Count of successful silence alarms gestures.
+ * @hide
+ */
+ public static final String SILENCE_ALARMS_GESTURE_COUNT = "silence_alarms_gesture_count";
+
+ /**
+ * Count of successful silence timer gestures.
+ * @hide
+ */
+ public static final String SILENCE_TIMER_GESTURE_COUNT = "silence_timer_gesture_count";
+
+ /**
+ * Count of successful silence call gestures.
+ * @hide
+ */
+ public static final String SILENCE_CALL_GESTURE_COUNT = "silence_call_gesture_count";
+
+ /**
+ * Count of successful silence notification gestures.
+ * @hide
+ */
+ public static final String SILENCE_NOTIFICATION_GESTURE_COUNT =
+ "silence_notification_gesture_count";
+
+ private static final Validator SILENCE_GESTURE_COUNT_VALIDATOR =
+ NON_NEGATIVE_INTEGER_VALIDATOR;
+
+ /**
* The current night mode that has been selected by the user. Owned
* and controlled by UiModeManagerService. Constants are as per
* UiModeManager.
@@ -8011,6 +8048,16 @@
BOOLEAN_VALIDATOR;
/**
+ * Whether or not face unlock dismisses the keyguard.
+ * @hide
+ */
+ public static final String FACE_UNLOCK_DISMISSES_KEYGUARD =
+ "face_unlock_dismisses_keyguard";
+
+ private static final Validator FACE_UNLOCK_DISMISSES_KEYGUARD_VALIDATOR =
+ BOOLEAN_VALIDATOR;
+
+ /**
* Whether or not face unlock is allowed for apps (through BiometricPrompt).
* @hide
*/
@@ -8684,6 +8731,7 @@
NFC_PAYMENT_DEFAULT_COMPONENT,
AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN,
FACE_UNLOCK_KEYGUARD_ENABLED,
+ FACE_UNLOCK_DISMISSES_KEYGUARD,
FACE_UNLOCK_APP_ENABLED,
FACE_UNLOCK_ALWAYS_REQUIRE_CONFIRMATION,
ASSIST_GESTURE_ENABLED,
@@ -8723,6 +8771,11 @@
SILENCE_GESTURE,
THEME_CUSTOMIZATION_OVERLAY_PACKAGES,
AWARE_ENABLED,
+ SKIP_GESTURE_COUNT,
+ SILENCE_ALARMS_GESTURE_COUNT,
+ SILENCE_NOTIFICATION_GESTURE_COUNT,
+ SILENCE_CALL_GESTURE_COUNT,
+ SILENCE_TIMER_GESTURE_COUNT,
};
/**
@@ -8845,6 +8898,8 @@
VALIDATORS.put(AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN,
AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN_VALIDATOR);
VALIDATORS.put(FACE_UNLOCK_KEYGUARD_ENABLED, FACE_UNLOCK_KEYGUARD_ENABLED_VALIDATOR);
+ VALIDATORS.put(FACE_UNLOCK_DISMISSES_KEYGUARD,
+ FACE_UNLOCK_DISMISSES_KEYGUARD_VALIDATOR);
VALIDATORS.put(FACE_UNLOCK_APP_ENABLED, FACE_UNLOCK_APP_ENABLED_VALIDATOR);
VALIDATORS.put(FACE_UNLOCK_ALWAYS_REQUIRE_CONFIRMATION,
FACE_UNLOCK_ALWAYS_REQUIRE_CONFIRMATION_VALIDATOR);
@@ -8897,6 +8952,11 @@
VALIDATORS.put(THEME_CUSTOMIZATION_OVERLAY_PACKAGES,
THEME_CUSTOMIZATION_OVERLAY_PACKAGES_VALIDATOR);
VALIDATORS.put(AWARE_ENABLED, AWARE_ENABLED_VALIDATOR);
+ VALIDATORS.put(SKIP_GESTURE_COUNT, SKIP_GESTURE_COUNT_VALIDATOR);
+ VALIDATORS.put(SILENCE_ALARMS_GESTURE_COUNT, SILENCE_GESTURE_COUNT_VALIDATOR);
+ VALIDATORS.put(SILENCE_TIMER_GESTURE_COUNT, SILENCE_GESTURE_COUNT_VALIDATOR);
+ VALIDATORS.put(SILENCE_CALL_GESTURE_COUNT, SILENCE_GESTURE_COUNT_VALIDATOR);
+ VALIDATORS.put(SILENCE_NOTIFICATION_GESTURE_COUNT, SILENCE_GESTURE_COUNT_VALIDATOR);
}
/**
@@ -14952,6 +15012,17 @@
"android.settings.panel.action.NFC";
/**
+ * Activity Action: Show a settings dialog containing controls for Wifi.
+ * <p>
+ * Input: Nothing.
+ * <p>
+ * Output: Nothing.
+ */
+ @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_WIFI =
+ "android.settings.panel.action.WIFI";
+
+ /**
* Activity Action: Show a settings dialog containing all volume streams.
* <p>
* Input: Nothing.
diff --git a/core/java/android/provider/TEST_MAPPING b/core/java/android/provider/TEST_MAPPING
deleted file mode 100644
index 7486f7f..0000000
--- a/core/java/android/provider/TEST_MAPPING
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "presubmit": [
- {
- "name": "FrameworksCoreTests",
- "options": [
- {
- "include-filter": "android.provider.SettingsBackupTest"
- }
- ]
- }
- ]
-}
diff --git a/core/java/android/service/carrier/CarrierIdentifier.java b/core/java/android/service/carrier/CarrierIdentifier.java
index 3b7392f..6629233 100644
--- a/core/java/android/service/carrier/CarrierIdentifier.java
+++ b/core/java/android/service/carrier/CarrierIdentifier.java
@@ -55,7 +55,7 @@
private @Nullable String mGid1;
private @Nullable String mGid2;
private int mCarrierId = TelephonyManager.UNKNOWN_CARRIER_ID;
- private int mPreciseCarrierId = TelephonyManager.UNKNOWN_CARRIER_ID;
+ private int mSpecificCarrierId = TelephonyManager.UNKNOWN_CARRIER_ID;
public CarrierIdentifier(String mcc, String mnc, @Nullable String spn, @Nullable String imsi,
@Nullable String gid1, @Nullable String gid2) {
@@ -72,12 +72,12 @@
* @param gid2 group id level 2
* @param carrierid carrier unique identifier {@link TelephonyManager#getSimCarrierId()}, used
* to uniquely identify the carrier and look up the carrier configurations.
- * @param preciseCarrierId precise carrier identifier
- * {@link TelephonyManager#getSimPreciseCarrierId()}
+ * @param specificCarrierId specific carrier identifier
+ * {@link TelephonyManager#getSimSpecificCarrierId()}
*/
public CarrierIdentifier(@NonNull String mcc, @NonNull String mnc, @Nullable String spn,
@Nullable String imsi, @Nullable String gid1, @Nullable String gid2,
- int carrierid, int preciseCarrierId) {
+ int carrierid, int specificCarrierId) {
mMcc = mcc;
mMnc = mnc;
mSpn = spn;
@@ -85,7 +85,7 @@
mGid1 = gid1;
mGid2 = gid2;
mCarrierId = carrierid;
- mPreciseCarrierId = preciseCarrierId;
+ mSpecificCarrierId = specificCarrierId;
}
/**
@@ -162,11 +162,17 @@
}
/**
- * Returns the precise carrier id.
- * @see TelephonyManager#getSimPreciseCarrierId()
+ * A specific carrier ID returns the fine-grained carrier ID of the current subscription.
+ * It can represent the fact that a carrier may be in effect an aggregation of other carriers
+ * (ie in an MVNO type scenario) where each of these specific carriers which are used to make
+ * up the actual carrier service may have different carrier configurations.
+ * A specific carrier ID could also be used, for example, in a scenario where a carrier requires
+ * different carrier configuration for different service offering such as a prepaid plan.
+ *
+ * @see TelephonyManager#getSimSpecificCarrierId()
*/
- public int getPreciseCarrierId() {
- return mPreciseCarrierId;
+ public int getSpecificCarrierId() {
+ return mSpecificCarrierId;
}
@Override
@@ -186,12 +192,12 @@
&& Objects.equals(mGid1, that.mGid1)
&& Objects.equals(mGid2, that.mGid2)
&& Objects.equals(mCarrierId, that.mCarrierId)
- && Objects.equals(mPreciseCarrierId, that.mPreciseCarrierId);
+ && Objects.equals(mSpecificCarrierId, that.mSpecificCarrierId);
}
@Override
public int hashCode(){
- return Objects.hash(mMcc, mMnc, mSpn, mImsi, mGid1, mGid2, mCarrierId, mPreciseCarrierId);
+ return Objects.hash(mMcc, mMnc, mSpn, mImsi, mGid1, mGid2, mCarrierId, mSpecificCarrierId);
}
@Override
@@ -208,7 +214,7 @@
out.writeString(mGid1);
out.writeString(mGid2);
out.writeInt(mCarrierId);
- out.writeInt(mPreciseCarrierId);
+ out.writeInt(mSpecificCarrierId);
}
@Override
@@ -221,7 +227,7 @@
+ ",gid1=" + mGid1
+ ",gid2=" + mGid2
+ ",carrierid=" + mCarrierId
- + ",mPreciseCarrierId=" + mPreciseCarrierId
+ + ",specificCarrierId=" + mSpecificCarrierId
+ "}";
}
@@ -234,7 +240,7 @@
mGid1 = in.readString();
mGid2 = in.readString();
mCarrierId = in.readInt();
- mPreciseCarrierId = in.readInt();
+ mSpecificCarrierId = in.readInt();
}
/** @hide */
diff --git a/core/java/android/service/contentsuggestions/ContentSuggestionsService.java b/core/java/android/service/contentsuggestions/ContentSuggestionsService.java
index 2814300..86f99bb 100644
--- a/core/java/android/service/contentsuggestions/ContentSuggestionsService.java
+++ b/core/java/android/service/contentsuggestions/ContentSuggestionsService.java
@@ -54,8 +54,8 @@
* The action for the intent used to define the content suggestions service.
*
* <p>To be supported, the service must also require the
- * * {@link android.Manifest.permission#BIND_CONTENT_SUGGESTIONS_SERVICE} permission so
- * * that other applications can not abuse it.
+ * * {@link android.Manifest.permission#BIND_CONTENT_SUGGESTIONS_SERVICE} permission so
+ * * that other applications can not abuse it.
*/
public static final String SERVICE_INTERFACE =
"android.service.contentsuggestions.ContentSuggestionsService";
@@ -72,7 +72,7 @@
}
mHandler.sendMessage(
- obtainMessage(ContentSuggestionsService::processContextImage,
+ obtainMessage(ContentSuggestionsService::onProcessContextImage,
ContentSuggestionsService.this, taskId,
wrappedBuffer,
imageContextRequestExtras));
@@ -81,7 +81,8 @@
@Override
public void suggestContentSelections(SelectionsRequest request,
ISelectionsCallback callback) {
- mHandler.sendMessage(obtainMessage(ContentSuggestionsService::suggestContentSelections,
+ mHandler.sendMessage(obtainMessage(
+ ContentSuggestionsService::onSuggestContentSelections,
ContentSuggestionsService.this, request, wrapSelectionsCallback(callback)));
}
@@ -89,14 +90,15 @@
@Override
public void classifyContentSelections(ClassificationsRequest request,
IClassificationsCallback callback) {
- mHandler.sendMessage(obtainMessage(ContentSuggestionsService::classifyContentSelections,
+ mHandler.sendMessage(obtainMessage(
+ ContentSuggestionsService::onClassifyContentSelections,
ContentSuggestionsService.this, request, wrapClassificationCallback(callback)));
}
@Override
public void notifyInteraction(String requestId, Bundle interaction) {
mHandler.sendMessage(
- obtainMessage(ContentSuggestionsService::notifyInteraction,
+ obtainMessage(ContentSuggestionsService::onNotifyInteraction,
ContentSuggestionsService.this, requestId, interaction));
}
};
@@ -122,25 +124,41 @@
* Called by the system to provide the snapshot for the task associated with the given
* {@param taskId}.
*/
- public abstract void processContextImage(
- int taskId, @Nullable Bitmap contextImage, @NonNull Bundle extras);
+ public void onProcessContextImage(
+ int taskId, @Nullable Bitmap contextImage, @NonNull Bundle extras) {
+ // TODO(b/127532182): remove after next prebuilt drop.
+ processContextImage(taskId, contextImage, extras);
+ }
/**
- * Called by a client app to make a request for content selections.
+ * Content selections have been request through {@link ContentSuggestionsManager}, implementer
+ * should reply on the callback with selections.
*/
- public abstract void suggestContentSelections(@NonNull SelectionsRequest request,
- @NonNull ContentSuggestionsManager.SelectionsCallback callback);
+ public void onSuggestContentSelections(@NonNull SelectionsRequest request,
+ @NonNull ContentSuggestionsManager.SelectionsCallback callback) {
+ // TODO(b/127532182): remove after next prebuilt drop.
+ suggestContentSelections(request, callback);
+ }
/**
- * Called by a client app to classify the provided content selections.
+ * Content classifications have been request through {@link ContentSuggestionsManager},
+ * implementer should reply on the callback with classifications.
*/
- public abstract void classifyContentSelections(@NonNull ClassificationsRequest request,
- @NonNull ContentSuggestionsManager.ClassificationsCallback callback);
+ public void onClassifyContentSelections(@NonNull ClassificationsRequest request,
+ @NonNull ContentSuggestionsManager.ClassificationsCallback callback) {
+ // TODO(b/127532182): remove after next prebuilt drop.
+ classifyContentSelections(request, callback);
+ }
/**
- * Called by a client app to report an interaction.
+ * User interactions have been reported through {@link ContentSuggestionsManager}, implementer
+ * should handle those interactions.
*/
- public abstract void notifyInteraction(@NonNull String requestId, @NonNull Bundle interaction);
+ public void onNotifyInteraction(
+ @NonNull String requestId, @NonNull Bundle interaction) {
+ // TODO(b/127532182): remove after next prebuilt drop.
+ notifyInteraction(requestId, interaction);
+ }
private ContentSuggestionsManager.SelectionsCallback wrapSelectionsCallback(
ISelectionsCallback callback) {
@@ -163,4 +181,40 @@
}
});
}
+
+
+ /**
+ * For temporary compat reason, remove with b/127532182
+ * @deprecated
+ */
+ @Deprecated
+ public void processContextImage(
+ int taskId, @Nullable Bitmap contextImage, @NonNull Bundle extras) {
+ }
+
+ /**
+ * For temporary compat reason, remove with b/127532182
+ * @deprecated
+ */
+ @Deprecated
+ public void suggestContentSelections(@NonNull SelectionsRequest request,
+ @NonNull ContentSuggestionsManager.SelectionsCallback callback) {
+ }
+
+ /**
+ * For temporary compat reason, remove with b/127532182
+ * @deprecated
+ */
+ @Deprecated
+ public void classifyContentSelections(@NonNull ClassificationsRequest request,
+ @NonNull ContentSuggestionsManager.ClassificationsCallback callback) {
+ }
+
+ /**
+ * For temporary compat reason, remove with b/127532182
+ * @deprecated
+ */
+ @Deprecated
+ public void notifyInteraction(@NonNull String requestId, @NonNull Bundle interaction) {
+ }
}
diff --git a/core/java/android/text/StaticLayout.java b/core/java/android/text/StaticLayout.java
index 24d746e..defe2ce 100644
--- a/core/java/android/text/StaticLayout.java
+++ b/core/java/android/text/StaticLayout.java
@@ -643,7 +643,7 @@
.setBreakStrategy(b.mBreakStrategy)
.setHyphenationFrequency(b.mHyphenationFrequency)
// TODO: Support more justification mode, e.g. letter spacing, stretching.
- .setJustified(b.mJustificationMode)
+ .setJustificationMode(b.mJustificationMode)
.setIndents(indents)
.build();
diff --git a/core/java/com/android/internal/infra/AbstractMultiplePendingRequestsRemoteService.java b/core/java/com/android/internal/infra/AbstractMultiplePendingRequestsRemoteService.java
index 293ffd3..37f61bf 100644
--- a/core/java/com/android/internal/infra/AbstractMultiplePendingRequestsRemoteService.java
+++ b/core/java/com/android/internal/infra/AbstractMultiplePendingRequestsRemoteService.java
@@ -19,6 +19,7 @@
import android.annotation.NonNull;
import android.content.ComponentName;
import android.content.Context;
+import android.os.Handler;
import android.os.IInterface;
import android.util.Slog;
@@ -43,10 +44,10 @@
public AbstractMultiplePendingRequestsRemoteService(@NonNull Context context,
@NonNull String serviceInterface, @NonNull ComponentName componentName, int userId,
- @NonNull VultureCallback<S> callback, boolean bindInstantServiceAllowed,
- boolean verbose, int initialCapacity) {
- super(context, serviceInterface, componentName, userId, callback, bindInstantServiceAllowed,
- verbose);
+ @NonNull VultureCallback<S> callback, @NonNull Handler handler,
+ boolean bindInstantServiceAllowed, boolean verbose, int initialCapacity) {
+ super(context, serviceInterface, componentName, userId, callback, handler,
+ bindInstantServiceAllowed, verbose);
mInitialCapacity = initialCapacity;
}
diff --git a/core/java/com/android/internal/infra/AbstractRemoteService.java b/core/java/com/android/internal/infra/AbstractRemoteService.java
index 7270302..2e709de 100644
--- a/core/java/com/android/internal/infra/AbstractRemoteService.java
+++ b/core/java/com/android/internal/infra/AbstractRemoteService.java
@@ -28,7 +28,6 @@
import android.os.IBinder;
import android.os.IBinder.DeathRecipient;
import android.os.IInterface;
-import android.os.Looper;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.UserHandle;
@@ -114,14 +113,14 @@
// NOTE: must be package-protected so this class is not extended outside
AbstractRemoteService(@NonNull Context context, @NonNull String serviceInterface,
@NonNull ComponentName componentName, int userId, @NonNull VultureCallback<S> callback,
- boolean bindInstantServiceAllowed, boolean verbose) {
+ @NonNull Handler handler, boolean bindInstantServiceAllowed, boolean verbose) {
mContext = context;
mVultureCallback = callback;
mVerbose = verbose;
mComponentName = componentName;
mIntent = new Intent(serviceInterface).setComponent(mComponentName);
mUserId = userId;
- mHandler = new Handler(Looper.getMainLooper());
+ mHandler = new Handler(handler.getLooper());
mBindInstantServiceAllowed = bindInstantServiceAllowed;
}
diff --git a/core/java/com/android/internal/infra/AbstractSinglePendingRequestRemoteService.java b/core/java/com/android/internal/infra/AbstractSinglePendingRequestRemoteService.java
index 3e92a0b..a70fc3e 100644
--- a/core/java/com/android/internal/infra/AbstractSinglePendingRequestRemoteService.java
+++ b/core/java/com/android/internal/infra/AbstractSinglePendingRequestRemoteService.java
@@ -19,6 +19,7 @@
import android.annotation.NonNull;
import android.content.ComponentName;
import android.content.Context;
+import android.os.Handler;
import android.os.IInterface;
import android.util.Slog;
@@ -42,10 +43,10 @@
public AbstractSinglePendingRequestRemoteService(@NonNull Context context,
@NonNull String serviceInterface, @NonNull ComponentName componentName, int userId,
- @NonNull VultureCallback<S> callback, boolean bindInstantServiceAllowed,
- boolean verbose) {
- super(context, serviceInterface, componentName, userId, callback, bindInstantServiceAllowed,
- verbose);
+ @NonNull VultureCallback<S> callback, @NonNull Handler handler,
+ boolean bindInstantServiceAllowed, boolean verbose) {
+ super(context, serviceInterface, componentName, userId, callback, handler,
+ bindInstantServiceAllowed, verbose);
}
@Override // from AbstractRemoteService
diff --git a/core/java/com/android/internal/os/BinderCallsStats.java b/core/java/com/android/internal/os/BinderCallsStats.java
index 5688870..0fb2728 100644
--- a/core/java/com/android/internal/os/BinderCallsStats.java
+++ b/core/java/com/android/internal/os/BinderCallsStats.java
@@ -344,6 +344,7 @@
resultCallStats.add(createDebugEntry("end_time_millis", SystemClock.elapsedRealtime()));
resultCallStats.add(
createDebugEntry("battery_time_millis", mBatteryStopwatch.getMillis()));
+ resultCallStats.add(createDebugEntry("sampling_interval", mPeriodicSamplingInterval));
}
return resultCallStats;
diff --git a/core/java/com/android/internal/os/LooperStats.java b/core/java/com/android/internal/os/LooperStats.java
index c059721..932ff57 100644
--- a/core/java/com/android/internal/os/LooperStats.java
+++ b/core/java/com/android/internal/os/LooperStats.java
@@ -165,6 +165,7 @@
exportedEntries.add(createDebugEntry("end_time_millis", SystemClock.elapsedRealtime()));
exportedEntries.add(
createDebugEntry("battery_time_millis", mBatteryStopwatch.getMillis()));
+ exportedEntries.add(createDebugEntry("sampling_interval", mSamplingInterval));
}
return exportedEntries;
}
diff --git a/core/jni/com_android_internal_content_NativeLibraryHelper.cpp b/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
index dc536b2..be82879 100644
--- a/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
+++ b/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
@@ -187,20 +187,20 @@
off64_t offset;
if (!zipFile->getEntryInfo(zipEntry, &method, &uncompLen, NULL, &offset, &when, &crc)) {
- ALOGD("Couldn't read zip entry info\n");
+ ALOGE("Couldn't read zip entry info\n");
return INSTALL_FAILED_INVALID_APK;
}
if (!extractNativeLibs) {
// check if library is uncompressed and page-aligned
if (method != ZipFileRO::kCompressStored) {
- ALOGD("Library '%s' is compressed - will not be able to open it directly from apk.\n",
+ ALOGE("Library '%s' is compressed - will not be able to open it directly from apk.\n",
fileName);
return INSTALL_FAILED_INVALID_APK;
}
if (offset % PAGE_SIZE != 0) {
- ALOGD("Library '%s' is not page-aligned - will not be able to open it directly from"
+ ALOGE("Library '%s' is not page-aligned - will not be able to open it directly from"
" apk.\n", fileName);
return INSTALL_FAILED_INVALID_APK;
}
@@ -213,7 +213,7 @@
char localFileName[nativeLibPath.size() + fileNameLen + 2];
if (strlcpy(localFileName, nativeLibPath.c_str(), sizeof(localFileName)) != nativeLibPath.size()) {
- ALOGD("Couldn't allocate local file name for library");
+ ALOGE("Couldn't allocate local file name for library");
return INSTALL_FAILED_INTERNAL_ERROR;
}
@@ -221,7 +221,7 @@
if (strlcpy(localFileName + nativeLibPath.size() + 1, fileName, sizeof(localFileName)
- nativeLibPath.size() - 1) != fileNameLen) {
- ALOGD("Couldn't allocate local file name for library");
+ ALOGE("Couldn't allocate local file name for library");
return INSTALL_FAILED_INTERNAL_ERROR;
}
@@ -237,24 +237,24 @@
char localTmpFileName[nativeLibPath.size() + TMP_FILE_PATTERN_LEN + 1];
if (strlcpy(localTmpFileName, nativeLibPath.c_str(), sizeof(localTmpFileName))
!= nativeLibPath.size()) {
- ALOGD("Couldn't allocate local file name for library");
+ ALOGE("Couldn't allocate local file name for library");
return INSTALL_FAILED_INTERNAL_ERROR;
}
if (strlcpy(localTmpFileName + nativeLibPath.size(), TMP_FILE_PATTERN,
TMP_FILE_PATTERN_LEN + 1) != TMP_FILE_PATTERN_LEN) {
- ALOGI("Couldn't allocate temporary file name for library");
+ ALOGE("Couldn't allocate temporary file name for library");
return INSTALL_FAILED_INTERNAL_ERROR;
}
int fd = mkstemp(localTmpFileName);
if (fd < 0) {
- ALOGI("Couldn't open temporary file name: %s: %s\n", localTmpFileName, strerror(errno));
+ ALOGE("Couldn't open temporary file name: %s: %s\n", localTmpFileName, strerror(errno));
return INSTALL_FAILED_CONTAINER_ERROR;
}
if (!zipFile->uncompressEntry(zipEntry, fd)) {
- ALOGI("Failed uncompressing %s to %s\n", fileName, localTmpFileName);
+ ALOGE("Failed uncompressing %s to %s\n", fileName, localTmpFileName);
close(fd);
unlink(localTmpFileName);
return INSTALL_FAILED_CONTAINER_ERROR;
@@ -268,7 +268,7 @@
times[1].tv_sec = modTime;
times[0].tv_usec = times[1].tv_usec = 0;
if (utimes(localTmpFileName, times) < 0) {
- ALOGI("Couldn't change modification time on %s: %s\n", localTmpFileName, strerror(errno));
+ ALOGE("Couldn't change modification time on %s: %s\n", localTmpFileName, strerror(errno));
unlink(localTmpFileName);
return INSTALL_FAILED_CONTAINER_ERROR;
}
@@ -276,14 +276,14 @@
// Set the mode to 755
static const mode_t mode = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
if (chmod(localTmpFileName, mode) < 0) {
- ALOGI("Couldn't change permissions on %s: %s\n", localTmpFileName, strerror(errno));
+ ALOGE("Couldn't change permissions on %s: %s\n", localTmpFileName, strerror(errno));
unlink(localTmpFileName);
return INSTALL_FAILED_CONTAINER_ERROR;
}
// Finally, rename it to the final name.
if (rename(localTmpFileName, localFileName) < 0) {
- ALOGI("Couldn't rename %s to %s: %s\n", localTmpFileName, localFileName, strerror(errno));
+ ALOGE("Couldn't rename %s to %s: %s\n", localTmpFileName, localFileName, strerror(errno));
unlink(localTmpFileName);
return INSTALL_FAILED_CONTAINER_ERROR;
}
diff --git a/core/proto/android/app/settings_enums.proto b/core/proto/android/app/settings_enums.proto
index 445075d..927c85f2 100644
--- a/core/proto/android/app/settings_enums.proto
+++ b/core/proto/android/app/settings_enums.proto
@@ -2299,4 +2299,7 @@
// Open: Settings will show the conditional when Grayscale mode is on
SETTINGS_CONDITION_GRAYSCALE_MODE = 1683;
+
+ // Panel for Wifi
+ PANEL_WIFI = 1687;
}
diff --git a/core/proto/android/providers/settings/secure.proto b/core/proto/android/providers/settings/secure.proto
index 08286a1..27a18ee 100644
--- a/core/proto/android/providers/settings/secure.proto
+++ b/core/proto/android/providers/settings/secure.proto
@@ -191,6 +191,21 @@
optional SettingProto emergency_assistance_application = 22 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto enhanced_voice_privacy_enabled = 23 [ (android.privacy).dest = DEST_AUTOMATIC ];
+
+ message Gesture {
+ optional SettingProto aware_enabled = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
+
+ optional SettingProto silence_alarms_count = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto silence_calls_count = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto silence_enabled = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto silence_notification_count = 5 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto silence_timer_count = 6 [ (android.privacy).dest = DEST_AUTOMATIC ];
+
+ optional SettingProto skip_count = 7 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto skip_enabled = 8 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ }
+ optional Gesture gesture = 74;
+
optional SettingProto immersive_mode_confirmations = 24 [ (android.privacy).dest = DEST_AUTOMATIC ];
message Incall {
@@ -443,6 +458,7 @@
// parent profile.
optional SettingProto sync_parent_sounds = 55 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto system_navigation_keys_enabled = 56 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto theme_customization_overlay_packages = 75 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto trust_agents_initialized = 57 [ (android.privacy).dest = DEST_AUTOMATIC ];
message Tts {
@@ -534,13 +550,7 @@
}
optional Zen zen = 71;
- optional SettingProto skip_gesture_enabled = 74 [ (android.privacy).dest = DEST_AUTOMATIC ];
- optional SettingProto silence_gesture_enabled = 75 [ (android.privacy).dest = DEST_AUTOMATIC ];
- optional SettingProto theme_customization_overlay_packages = 76 [ (android.privacy).dest = DEST_AUTOMATIC ];
-
- optional SettingProto aware_enabled = 77 [ (android.privacy).dest = DEST_AUTOMATIC ];
-
// Please insert fields in alphabetical order and group them into messages
// if possible (to avoid reaching the method limit).
- // Next tag = 78;
+ // Next tag = 76;
}
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 5d24ebc..d176260 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -3049,12 +3049,6 @@
<permission android:name="android.permission.BIND_COMPANION_DEVICE_MANAGER_SERVICE"
android:protectionLevel="signature" />
- <!-- Must be required by the RoleControllerService to ensure that only the system can bind to
- it.
- @hide -->
- <permission android:name="android.permission.BIND_ROLE_CONTROLLER_SERVICE"
- android:protectionLevel="signature" />
-
<!-- @SystemApi Must be required by the RuntimePermissionPresenterService to ensure
that only the system can bind to it.
@hide -->
diff --git a/core/res/res/anim/lock_in.xml b/core/res/res/anim/lock_in.xml
index 992bc92..cd4effd 100755
--- a/core/res/res/anim/lock_in.xml
+++ b/core/res/res/anim/lock_in.xml
@@ -14,111 +14,76 @@
limitations under the License.
-->
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:aapt="http://schemas.android.com/aapt">
+ xmlns:aapt="http://schemas.android.com/aapt">
<aapt:attr name="android:drawable">
- <vector
- android:width="24dp"
- android:height="24dp"
- android:viewportWidth="24"
- android:viewportHeight="24">
+ <vector android:height="32dp" android:width="32dp" android:viewportHeight="32"
+ android:viewportWidth="32">
<group android:name="_R_G">
- <group android:name="_R_G_L_2_G_N_3_T_0_M">
- <group
- android:name="_R_G_L_2_G_N_3_T_0"
- android:pivotX="2.25"
- android:pivotY="2.25"
- android:scaleX="0"
- android:scaleY="0"
- android:translateX="9.75"
- android:translateY="12.75">
- <group
- android:name="_R_G_L_2_G_T_1"
- android:scaleX="0.12346"
- android:scaleY="0.12346"
- android:translateX="2.25"
- android:translateY="2.373">
- <group
- android:name="_R_G_L_2_G"
- android:translateY="32">
- <path
- android:name="_R_G_L_2_G_D_0_P_0"
- android:fillAlpha="0"
- android:fillColor="#ff0000"
- android:fillType="nonZero"
- android:pathData=" M-28.21 -31.92 C-28.21,-31.92 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 "
- android:trimPathStart="0.14"
- android:trimPathEnd="0.89"
- android:trimPathOffset="0" />
- <path
- android:name="_R_G_L_2_G_D_1_P_0"
- android:pathData=" M-28.21 -31.92 C-28.21,-31.92 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 "
- android:strokeWidth="16"
- android:strokeAlpha="1"
- android:strokeColor="?attr/textColor"
- android:trimPathStart="0.14"
- android:trimPathEnd="0.89"
- android:trimPathOffset="0" />
+ <group android:name="_R_G_L_2_G_N_2_N_1_T_0" android:translateX="16"
+ android:translateY="16" android:scaleX="1.3" android:scaleY="1.3">
+ <group android:name="_R_G_L_2_G_N_2_T_0" android:translateX="-2.25"
+ android:translateY="0.75" android:pivotX="2.25" android:pivotY="2.25"
+ android:scaleX="0" android:scaleY="0">
+ <group android:name="_R_G_L_2_G_T_1" android:translateX="2.25"
+ android:translateY="2.373" android:scaleX="0.12346"
+ android:scaleY="0.12346">
+ <group android:name="_R_G_L_2_G" android:translateY="32">
+ <path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="#ff0000"
+ android:fillAlpha="0" android:fillType="nonZero"
+ android:trimPathStart="0.14" android:trimPathEnd="0.89"
+ android:trimPathOffset="0"
+ android:pathData=" M-28.21 -31.92 C-28.21,-31.92 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 "/>
+ <path android:name="_R_G_L_2_G_D_1_P_0"
+ android:strokeColor="?attr/textColor" android:strokeLineCap="round"
+ android:strokeLineJoin="round" android:strokeWidth="16"
+ android:strokeAlpha="1" android:trimPathStart="0.14"
+ android:trimPathEnd="0.89" android:trimPathOffset="0"
+ android:pathData=" M-28.21 -31.92 C-28.21,-31.92 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 "/>
</group>
</group>
</group>
</group>
- <group
- android:name="_R_G_L_1_G"
- android:pivotX="8.25"
- android:pivotY="7.25"
- android:scaleX="0"
- android:scaleY="0"
- android:translateX="3.75"
- android:translateY="7.75">
- <path
- android:name="_R_G_L_1_G_D_0_P_0"
- android:fillAlpha="1"
- android:fillColor="?attr/textColor"
- android:fillType="nonZero"
- android:pathData=" M14.25 0.25 C14.25,0.25 12.75,0.25 12.75,0.25 C12.75,0.25 10.75,0.25 10.75,0.25 C10.75,0.25 5.75,0.25 5.75,0.25 C5.75,0.25 3.75,0.25 3.75,0.25 C3.75,0.25 2.25,0.25 2.25,0.25 C1.15,0.25 0.25,1.15 0.25,2.25 C0.25,2.25 0.25,12.25 0.25,12.25 C0.25,13.35 1.15,14.25 2.25,14.25 C2.25,14.25 14.25,14.25 14.25,14.25 C15.35,14.25 16.25,13.35 16.25,12.25 C16.25,12.25 16.25,2.25 16.25,2.25 C16.25,1.15 15.35,0.25 14.25,0.25c M14.25 12.25 C14.25,12.25 2.25,12.25 2.25,12.25 C2.25,12.25 2.25,2.25 2.25,2.25 C2.25,2.25 3.75,2.25 3.75,2.25 C3.75,2.25 12.75,2.25 12.75,2.25 C12.75,2.25 14.25,2.25 14.25,2.25 C14.25,2.25 14.25,12.25 14.25,12.25c " />
+ <group android:name="_R_G_L_1_G_N_1_T_0" android:translateX="16"
+ android:translateY="16" android:scaleX="1.3" android:scaleY="1.3">
+ <group android:name="_R_G_L_1_G" android:translateX="-8.25"
+ android:translateY="-4.25" android:pivotX="8.25" android:pivotY="7.25"
+ android:scaleX="0" android:scaleY="0">
+ <path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="?attr/textColor"
+ android:fillAlpha="1" android:fillType="nonZero"
+ android:pathData=" M14.25 0.25 C14.25,0.25 12.75,0.25 12.75,0.25 C12.75,0.25 10.75,0.25 10.75,0.25 C10.75,0.25 5.75,0.25 5.75,0.25 C5.75,0.25 3.75,0.25 3.75,0.25 C3.75,0.25 2.25,0.25 2.25,0.25 C1.15,0.25 0.25,1.15 0.25,2.25 C0.25,2.25 0.25,12.25 0.25,12.25 C0.25,13.35 1.15,14.25 2.25,14.25 C2.25,14.25 14.25,14.25 14.25,14.25 C15.35,14.25 16.25,13.35 16.25,12.25 C16.25,12.25 16.25,2.25 16.25,2.25 C16.25,1.15 15.35,0.25 14.25,0.25c M14.25 12.25 C14.25,12.25 2.25,12.25 2.25,12.25 C2.25,12.25 2.25,2.25 2.25,2.25 C2.25,2.25 3.75,2.25 3.75,2.25 C3.75,2.25 12.75,2.25 12.75,2.25 C12.75,2.25 14.25,2.25 14.25,2.25 C14.25,2.25 14.25,12.25 14.25,12.25c "/>
+ </group>
</group>
- <group
- android:name="_R_G_L_0_G"
- android:pivotX="2.25"
- android:pivotY="2.25"
- android:scaleX="0"
- android:scaleY="0"
- android:translateX="9.75"
- android:translateY="12.75">
- <path
- android:name="_R_G_L_0_G_D_0_P_0"
- android:fillAlpha="1"
- android:fillColor="?attr/textColor"
- android:fillType="nonZero"
- android:pathData=" M2.25 0.25 C3.35,0.25 4.25,1.15 4.25,2.25 C4.25,3.35 3.35,4.25 2.25,4.25 C1.15,4.25 0.25,3.35 0.25,2.25 C0.25,1.15 1.15,0.25 2.25,0.25c " />
+ <group android:name="_R_G_L_0_G_N_1_T_0" android:translateX="16"
+ android:translateY="16" android:scaleX="1.3" android:scaleY="1.3">
+ <group android:name="_R_G_L_0_G" android:translateX="-2.25"
+ android:translateY="0.75" android:pivotX="2.25" android:pivotY="2.25"
+ android:scaleX="0" android:scaleY="0">
+ <path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="?attr/textColor"
+ android:fillAlpha="1" android:fillType="nonZero"
+ android:pathData=" M2.25 0.25 C3.35,0.25 4.25,1.15 4.25,2.25 C4.25,3.35 3.35,4.25 2.25,4.25 C1.15,4.25 0.25,3.35 0.25,2.25 C0.25,1.15 1.15,0.25 2.25,0.25c "/>
+ </group>
</group>
</group>
- <group android:name="time_group" />
+ <group android:name="time_group"/>
</vector>
</aapt:attr>
<target android:name="_R_G_L_2_G_D_0_P_0">
<aapt:attr name="android:animation">
<set android:ordering="together">
- <objectAnimator
- android:duration="50"
- android:propertyName="trimPathStart"
- android:startOffset="0"
- android:valueFrom="0.14"
- android:valueTo="0.14"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="trimPathStart" android:duration="50"
+ android:startOffset="0" android:valueFrom="0.14"
+ android:valueTo="0.14" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ <pathInterpolator
+ android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="67"
- android:propertyName="trimPathStart"
- android:startOffset="50"
- android:valueFrom="0.14"
- android:valueTo="0"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="trimPathStart" android:duration="67"
+ android:startOffset="50" android:valueFrom="0.14"
+ android:valueTo="0" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ <pathInterpolator
+ android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
</set>
@@ -127,26 +92,20 @@
<target android:name="_R_G_L_2_G_D_0_P_0">
<aapt:attr name="android:animation">
<set android:ordering="together">
- <objectAnimator
- android:duration="50"
- android:propertyName="trimPathEnd"
- android:startOffset="0"
- android:valueFrom="0.89"
- android:valueTo="0.89"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="trimPathEnd" android:duration="50"
+ android:startOffset="0" android:valueFrom="0.89"
+ android:valueTo="0.89" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ <pathInterpolator
+ android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="67"
- android:propertyName="trimPathEnd"
- android:startOffset="50"
- android:valueFrom="0.89"
- android:valueTo="1"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="trimPathEnd" android:duration="67"
+ android:startOffset="50" android:valueFrom="0.89"
+ android:valueTo="1" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ <pathInterpolator
+ android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
</set>
@@ -155,26 +114,20 @@
<target android:name="_R_G_L_2_G_D_1_P_0">
<aapt:attr name="android:animation">
<set android:ordering="together">
- <objectAnimator
- android:duration="50"
- android:propertyName="trimPathStart"
- android:startOffset="0"
- android:valueFrom="0.14"
- android:valueTo="0.14"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="trimPathStart" android:duration="50"
+ android:startOffset="0" android:valueFrom="0.14"
+ android:valueTo="0.14" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ <pathInterpolator
+ android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="67"
- android:propertyName="trimPathStart"
- android:startOffset="50"
- android:valueFrom="0.14"
- android:valueTo="0"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="trimPathStart" android:duration="67"
+ android:startOffset="50" android:valueFrom="0.14"
+ android:valueTo="0" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ <pathInterpolator
+ android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
</set>
@@ -183,26 +136,20 @@
<target android:name="_R_G_L_2_G_D_1_P_0">
<aapt:attr name="android:animation">
<set android:ordering="together">
- <objectAnimator
- android:duration="50"
- android:propertyName="trimPathEnd"
- android:startOffset="0"
- android:valueFrom="0.89"
- android:valueTo="0.89"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="trimPathEnd" android:duration="50"
+ android:startOffset="0" android:valueFrom="0.89"
+ android:valueTo="0.89" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ <pathInterpolator
+ android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="67"
- android:propertyName="trimPathEnd"
- android:startOffset="50"
- android:valueFrom="0.89"
- android:valueTo="1"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="trimPathEnd" android:duration="67"
+ android:startOffset="50" android:valueFrom="0.89"
+ android:valueTo="1" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ <pathInterpolator
+ android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
</set>
@@ -211,128 +158,91 @@
<target android:name="_R_G_L_2_G_T_1">
<aapt:attr name="android:animation">
<set android:ordering="together">
- <objectAnimator
- android:duration="150"
- android:pathData="M 2.25,2.373C 2.25,1.2001604776382402 2.25,-3.49116047763824 2.25,-4.664"
- android:propertyName="translateXY"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:startOffset="0">
+ <objectAnimator android:propertyName="translateXY" android:duration="150"
+ android:startOffset="0" android:propertyXName="translateX"
+ android:propertyYName="translateY"
+ android:pathData="M 2.25,2.373C 2.25,1.2001604776382402 2.25,-3.49116047763824 2.25,-4.664">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.001,0 0.2,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.001,0 0.2,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
</set>
</aapt:attr>
</target>
- <target android:name="_R_G_L_2_G_N_3_T_0">
+ <target android:name="_R_G_L_2_G_N_2_T_0">
<aapt:attr name="android:animation">
<set android:ordering="together">
- <objectAnimator
- android:duration="233"
- android:propertyName="scaleX"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1.0125"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="scaleX" android:duration="233"
+ android:startOffset="0" android:valueFrom="0"
+ android:valueTo="1.0125" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.043,0.556 0.667,1 1.0,1.0" />
+ <pathInterpolator
+ android:pathData="M 0.0,0.0 c0.043,0.556 0.667,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="233"
- android:propertyName="scaleY"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1.0125"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="scaleY" android:duration="233"
+ android:startOffset="0" android:valueFrom="0"
+ android:valueTo="1.0125" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.043,0.556 0.667,1 1.0,1.0" />
+ <pathInterpolator
+ android:pathData="M 0.0,0.0 c0.043,0.556 0.667,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="117"
- android:propertyName="scaleX"
- android:startOffset="233"
- android:valueFrom="1.0125"
- android:valueTo="1"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="scaleX" android:duration="117"
+ android:startOffset="233" android:valueFrom="1.0125"
+ android:valueTo="1" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="117"
- android:propertyName="scaleY"
- android:startOffset="233"
- android:valueFrom="1.0125"
- android:valueTo="1"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="scaleY" android:duration="117"
+ android:startOffset="233" android:valueFrom="1.0125"
+ android:valueTo="1" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
</set>
</aapt:attr>
</target>
- <target android:name="_R_G_L_2_G_N_3_T_0_M">
+ <target android:name="_R_G_L_2_G_N_2_N_1_T_0">
<aapt:attr name="android:animation">
<set android:ordering="together">
- <objectAnimator
- android:duration="0"
- android:propertyName="scaleX"
- android:startOffset="50"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
+ <objectAnimator android:propertyName="scaleX" android:duration="0"
+ android:startOffset="50" android:valueFrom="0" android:valueTo="1.3"
+ android:valueType="floatType"/>
</set>
</aapt:attr>
</target>
<target android:name="_R_G_L_1_G">
<aapt:attr name="android:animation">
<set android:ordering="together">
- <objectAnimator
- android:duration="233"
- android:propertyName="scaleX"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1.025"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="scaleX" android:duration="233"
+ android:startOffset="0" android:valueFrom="0"
+ android:valueTo="1.025" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.001,0 0.2,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.001,0 0.2,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="233"
- android:propertyName="scaleY"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1.025"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="scaleY" android:duration="233"
+ android:startOffset="0" android:valueFrom="0"
+ android:valueTo="1.025" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.001,0 0.2,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.001,0 0.2,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="117"
- android:propertyName="scaleX"
- android:startOffset="233"
- android:valueFrom="1.025"
- android:valueTo="1"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="scaleX" android:duration="117"
+ android:startOffset="233" android:valueFrom="1.025"
+ android:valueTo="1" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="117"
- android:propertyName="scaleY"
- android:startOffset="233"
- android:valueFrom="1.025"
- android:valueTo="1"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="scaleY" android:duration="117"
+ android:startOffset="233" android:valueFrom="1.025"
+ android:valueTo="1" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
</set>
@@ -341,48 +251,34 @@
<target android:name="_R_G_L_0_G">
<aapt:attr name="android:animation">
<set android:ordering="together">
- <objectAnimator
- android:duration="233"
- android:propertyName="scaleX"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1.0125"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="scaleX" android:duration="233"
+ android:startOffset="0" android:valueFrom="0"
+ android:valueTo="1.0125" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.043,0.556 0.667,1 1.0,1.0" />
+ <pathInterpolator
+ android:pathData="M 0.0,0.0 c0.043,0.556 0.667,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="233"
- android:propertyName="scaleY"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1.0125"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="scaleY" android:duration="233"
+ android:startOffset="0" android:valueFrom="0"
+ android:valueTo="1.0125" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.043,0.556 0.667,1 1.0,1.0" />
+ <pathInterpolator
+ android:pathData="M 0.0,0.0 c0.043,0.556 0.667,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="117"
- android:propertyName="scaleX"
- android:startOffset="233"
- android:valueFrom="1.0125"
- android:valueTo="1"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="scaleX" android:duration="117"
+ android:startOffset="233" android:valueFrom="1.0125"
+ android:valueTo="1" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="117"
- android:propertyName="scaleY"
- android:startOffset="233"
- android:valueFrom="1.0125"
- android:valueTo="1"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="scaleY" android:duration="117"
+ android:startOffset="233" android:valueFrom="1.0125"
+ android:valueTo="1" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
</set>
@@ -391,13 +287,9 @@
<target android:name="time_group">
<aapt:attr name="android:animation">
<set android:ordering="together">
- <objectAnimator
- android:duration="717"
- android:propertyName="translateX"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
+ <objectAnimator android:propertyName="translateX" android:duration="717"
+ android:startOffset="0" android:valueFrom="0" android:valueTo="1"
+ android:valueType="floatType"/>
</set>
</aapt:attr>
</target>
diff --git a/core/res/res/anim/lock_lock.xml b/core/res/res/anim/lock_lock.xml
index 8b7887c..ce9c8e8 100755
--- a/core/res/res/anim/lock_lock.xml
+++ b/core/res/res/anim/lock_lock.xml
@@ -13,4 +13,277 @@
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" xmlns:aapt="http://schemas.android.com/aapt"><aapt:attr name="android:drawable"><vector android:height="24dp" android:width="24dp" android:viewportHeight="24" android:viewportWidth="24"><group android:name="_R_G"><group android:name="_R_G_L_2_G_T_1" android:translateX="12" android:translateY="15"><group android:name="_R_G_L_2_G" android:translateX="-8.25" android:translateY="-7.25"><path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="?attr/textColor" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M14.25 0.25 C14.25,0.25 12.75,0.25 12.75,0.25 C12.75,0.25 10.75,0.25 10.75,0.25 C10.75,0.25 5.75,0.25 5.75,0.25 C5.75,0.25 3.75,0.25 3.75,0.25 C3.75,0.25 2.25,0.25 2.25,0.25 C1.15,0.25 0.25,1.15 0.25,2.25 C0.25,2.25 0.25,12.25 0.25,12.25 C0.25,13.35 1.15,14.25 2.25,14.25 C2.25,14.25 14.25,14.25 14.25,14.25 C15.35,14.25 16.25,13.35 16.25,12.25 C16.25,12.25 16.25,2.25 16.25,2.25 C16.25,1.15 15.35,0.25 14.25,0.25c M14.25 12.25 C14.25,12.25 2.25,12.25 2.25,12.25 C2.25,12.25 2.25,2.25 2.25,2.25 C2.25,2.25 3.75,2.25 3.75,2.25 C3.75,2.25 12.75,2.25 12.75,2.25 C12.75,2.25 14.25,2.25 14.25,2.25 C14.25,2.25 14.25,12.25 14.25,12.25c "/></group></group><group android:name="_R_G_L_1_G_N_5_T_1" android:translateX="12" android:translateY="15"><group android:name="_R_G_L_1_G_N_5_T_0" android:translateX="-8.25" android:translateY="-7.25"><group android:name="_R_G_L_1_G" android:translateX="6" android:translateY="5" android:pivotX="2.25" android:pivotY="2.25" android:scaleX="1" android:scaleY="1"><path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="?attr/textColor" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M2.25 0.25 C3.35,0.25 4.25,1.15 4.25,2.25 C4.25,3.35 3.35,4.25 2.25,4.25 C1.15,4.25 0.25,3.35 0.25,2.25 C0.25,1.15 1.15,0.25 2.25,0.25c "/></group></group></group><group android:name="_R_G_L_0_G_N_5_T_1" android:translateX="12" android:translateY="15"><group android:name="_R_G_L_0_G_N_5_T_0" android:translateX="-8.25" android:translateY="-7.25"><group android:name="_R_G_L_0_G" android:translateX="-16.219" android:translateY="32.25" android:pivotX="27.965" android:pivotY="-32" android:scaleX="0.125" android:scaleY="0.125"><path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#ff0000" android:fillAlpha="0" android:fillType="nonZero" android:pathData=" M79.79 -48.55 C79.79,-48.55 79.75,-53.75 79.78,-55.48 C79.83,-57.62 79.08,-78.36 53.07,-78.83 C29.5,-79.25 25.2,-59.38 25.22,-58.27 C25.25,-56.25 24.97,-31.17 24.97,-31.17 "/><path android:name="_R_G_L_0_G_D_1_P_0" android:strokeColor="?attr/textColor" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="16" android:strokeAlpha="1" android:pathData=" M79.79 -48.55 C79.79,-48.55 79.75,-53.75 79.78,-55.48 C79.83,-57.62 79.08,-78.36 53.07,-78.83 C29.5,-79.25 25.2,-59.38 25.22,-58.27 C25.25,-56.25 24.97,-31.17 24.97,-31.17 "/></group></group></group></group><group android:name="time_group"/></vector></aapt:attr><target android:name="_R_G_L_2_G_T_1"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateXY" android:duration="400" android:startOffset="0" android:propertyXName="translateX" android:propertyYName="translateY" android:pathData="M 12,15C 12,15.09895833581686 12,15 12,15"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateXY" android:duration="67" android:startOffset="400" android:propertyXName="translateX" android:propertyYName="translateY" android:pathData="M 12,15C 12,15.09895833581686 12,15.594 12,15.594"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateXY" android:duration="83" android:startOffset="467" android:propertyXName="translateX" android:propertyYName="translateY" android:pathData="M 12,15.594C 12,15.594 12,15.09895833581686 12,15"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_1_G"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="scaleX" android:duration="450" android:startOffset="0" android:valueFrom="1" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="450" android:startOffset="0" android:valueFrom="1" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="67" android:startOffset="450" android:valueFrom="1" android:valueTo="1.1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="67" android:startOffset="450" android:valueFrom="1" android:valueTo="1.1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="183" android:startOffset="517" android:valueFrom="1.1" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="183" android:startOffset="517" android:valueFrom="1.1" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_1_G_N_5_T_1"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateXY" android:duration="400" android:startOffset="0" android:propertyXName="translateX" android:propertyYName="translateY" android:pathData="M 12,15C 12,15.09895833581686 12,15 12,15"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateXY" android:duration="67" android:startOffset="400" android:propertyXName="translateX" android:propertyYName="translateY" android:pathData="M 12,15C 12,15.09895833581686 12,15.594 12,15.594"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateXY" android:duration="83" android:startOffset="467" android:propertyXName="translateX" android:propertyYName="translateY" android:pathData="M 12,15.594C 12,15.594 12,15.09895833581686 12,15"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="pathData" android:duration="317" android:startOffset="0" android:valueFrom="M79.79 -48.55 C79.79,-48.55 79.75,-53.75 79.78,-55.48 C79.83,-57.62 79.08,-78.36 53.07,-78.83 C29.5,-79.25 25.2,-59.38 25.22,-58.27 C25.25,-56.25 24.97,-31.17 24.97,-31.17 " android:valueTo="M-27.97 -55.05 C-27.97,-55.05 -28,-60.25 -27.97,-61.98 C-27.92,-64.13 -23.5,-86.37 -0.75,-86.32 C22.77,-86.26 27.75,-65.87 27.72,-64.77 C27.55,-59.38 27.97,-31.67 27.97,-31.67 " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.974,0 0.458,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="pathData" android:duration="133" android:startOffset="317" android:valueFrom="M-27.97 -55.05 C-27.97,-55.05 -28,-60.25 -27.97,-61.98 C-27.92,-64.13 -23.5,-86.37 -0.75,-86.32 C22.77,-86.26 27.75,-65.87 27.72,-64.77 C27.55,-59.38 27.97,-31.67 27.97,-31.67 " android:valueTo="M-28.21 -28.42 C-28.21,-28.42 -27.85,-44.88 -27.97,-51.98 C-28,-54.13 -23.5,-76.37 -0.75,-76.32 C22.77,-76.26 27.75,-55.87 27.72,-54.77 C27.55,-49.38 27.97,-28.17 27.97,-28.17 " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="pathData" android:duration="250" android:startOffset="450" android:valueFrom="M-28.21 -28.42 C-28.21,-28.42 -27.85,-44.88 -27.97,-51.98 C-28,-54.13 -23.5,-76.37 -0.75,-76.32 C22.77,-76.26 27.75,-55.87 27.72,-54.77 C27.55,-49.38 27.97,-28.17 27.97,-28.17 " android:valueTo="M-28.21 -31.92 C-28.21,-31.92 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.414,0 0.647,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_D_1_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="pathData" android:duration="317" android:startOffset="0" android:valueFrom="M79.79 -48.55 C79.79,-48.55 79.75,-53.75 79.78,-55.48 C79.83,-57.62 79.08,-78.36 53.07,-78.83 C29.5,-79.25 25.2,-59.38 25.22,-58.27 C25.25,-56.25 24.97,-31.17 24.97,-31.17 " android:valueTo="M-27.97 -55.05 C-27.97,-55.05 -28,-60.25 -27.97,-61.98 C-27.92,-64.13 -23.5,-86.37 -0.75,-86.32 C22.77,-86.26 27.75,-65.87 27.72,-64.77 C27.55,-59.38 27.97,-31.67 27.97,-31.67 " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.974,0 0.458,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="pathData" android:duration="133" android:startOffset="317" android:valueFrom="M-27.97 -55.05 C-27.97,-55.05 -28,-60.25 -27.97,-61.98 C-27.92,-64.13 -23.5,-86.37 -0.75,-86.32 C22.77,-86.26 27.75,-65.87 27.72,-64.77 C27.55,-59.38 27.97,-31.67 27.97,-31.67 " android:valueTo="M-28.21 -28.42 C-28.21,-28.42 -27.85,-44.88 -27.97,-51.98 C-28,-54.13 -23.5,-76.37 -0.75,-76.32 C22.77,-76.26 27.75,-55.87 27.72,-54.77 C27.55,-49.38 27.97,-28.17 27.97,-28.17 " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="pathData" android:duration="250" android:startOffset="450" android:valueFrom="M-28.21 -28.42 C-28.21,-28.42 -27.85,-44.88 -27.97,-51.98 C-28,-54.13 -23.5,-76.37 -0.75,-76.32 C22.77,-76.26 27.75,-55.87 27.72,-54.77 C27.55,-49.38 27.97,-28.17 27.97,-28.17 " android:valueTo="M-28.21 -31.92 C-28.21,-31.92 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.414,0 0.647,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_N_5_T_1"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateXY" android:duration="400" android:startOffset="0" android:propertyXName="translateX" android:propertyYName="translateY" android:pathData="M 12,15C 12,15.09895833581686 12,15 12,15"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateXY" android:duration="67" android:startOffset="400" android:propertyXName="translateX" android:propertyYName="translateY" android:pathData="M 12,15C 12,15.09895833581686 12,15.594 12,15.594"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateXY" android:duration="83" android:startOffset="467" android:propertyXName="translateX" android:propertyYName="translateY" android:pathData="M 12,15.594C 12,15.594 12,15.09895833581686 12,15"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="time_group"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateX" android:duration="717" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target></animated-vector>
\ No newline at end of file
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:aapt="http://schemas.android.com/aapt">
+ <aapt:attr name="android:drawable">
+ <vector android:height="32dp" android:width="32dp" android:viewportHeight="32"
+ android:viewportWidth="32">
+ <group android:name="_R_G">
+ <group android:name="_R_G_L_2_G_N_1_T_0" android:translateX="16"
+ android:translateY="16" android:scaleX="1.3" android:scaleY="1.3">
+ <group android:name="_R_G_L_2_G_T_1" android:translateX="0"
+ android:translateY="3">
+ <group android:name="_R_G_L_2_G" android:translateX="-8.25"
+ android:translateY="-7.25">
+ <path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="?attr/textColor"
+ android:fillAlpha="1" android:fillType="nonZero"
+ android:pathData=" M14.25 0.25 C14.25,0.25 12.75,0.25 12.75,0.25 C12.75,0.25 10.75,0.25 10.75,0.25 C10.75,0.25 5.75,0.25 5.75,0.25 C5.75,0.25 3.75,0.25 3.75,0.25 C3.75,0.25 2.25,0.25 2.25,0.25 C1.15,0.25 0.25,1.15 0.25,2.25 C0.25,2.25 0.25,12.25 0.25,12.25 C0.25,13.35 1.15,14.25 2.25,14.25 C2.25,14.25 14.25,14.25 14.25,14.25 C15.35,14.25 16.25,13.35 16.25,12.25 C16.25,12.25 16.25,2.25 16.25,2.25 C16.25,1.15 15.35,0.25 14.25,0.25c M14.25 12.25 C14.25,12.25 2.25,12.25 2.25,12.25 C2.25,12.25 2.25,2.25 2.25,2.25 C2.25,2.25 3.75,2.25 3.75,2.25 C3.75,2.25 12.75,2.25 12.75,2.25 C12.75,2.25 14.25,2.25 14.25,2.25 C14.25,2.25 14.25,12.25 14.25,12.25c "/>
+ </group>
+ </group>
+ </group>
+ <group android:name="_R_G_L_1_G_N_4_N_1_T_0" android:translateX="16"
+ android:translateY="16" android:scaleX="1.3" android:scaleY="1.3">
+ <group android:name="_R_G_L_1_G_N_4_T_1" android:translateX="0"
+ android:translateY="3">
+ <group android:name="_R_G_L_1_G_N_4_T_0" android:translateX="-8.25"
+ android:translateY="-7.25">
+ <group android:name="_R_G_L_1_G" android:translateX="6"
+ android:translateY="5" android:pivotX="2.25"
+ android:pivotY="2.25" android:scaleX="1" android:scaleY="1">
+ <path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="?attr/textColor"
+ android:fillAlpha="1" android:fillType="nonZero"
+ android:pathData=" M2.25 0.25 C3.35,0.25 4.25,1.15 4.25,2.25 C4.25,3.35 3.35,4.25 2.25,4.25 C1.15,4.25 0.25,3.35 0.25,2.25 C0.25,1.15 1.15,0.25 2.25,0.25c "/>
+ </group>
+ </group>
+ </group>
+ </group>
+ <group android:name="_R_G_L_0_G_N_4_N_1_T_0" android:translateX="16"
+ android:translateY="16" android:scaleX="1.3" android:scaleY="1.3">
+ <group android:name="_R_G_L_0_G_N_4_T_1" android:translateX="0"
+ android:translateY="3">
+ <group android:name="_R_G_L_0_G_N_4_T_0" android:translateX="-8.25"
+ android:translateY="-7.25">
+ <group android:name="_R_G_L_0_G" android:translateX="-16.219"
+ android:translateY="32.25" android:pivotX="27.965"
+ android:pivotY="-32" android:scaleX="0.125"
+ android:scaleY="0.125">
+ <path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#ff0000"
+ android:fillAlpha="0" android:fillType="nonZero"
+ android:pathData=" M79.79 -48.55 C79.79,-48.55 79.75,-53.75 79.78,-55.48 C79.83,-57.62 79.08,-78.36 53.07,-78.83 C29.5,-79.25 25.2,-59.38 25.22,-58.27 C25.25,-56.25 24.97,-31.17 24.97,-31.17 "/>
+ <path android:name="_R_G_L_0_G_D_1_P_0"
+ android:strokeColor="?attr/textColor" android:strokeLineCap="round"
+ android:strokeLineJoin="round" android:strokeWidth="16"
+ android:strokeAlpha="1"
+ android:pathData=" M79.79 -48.55 C79.79,-48.55 79.75,-53.75 79.78,-55.48 C79.83,-57.62 79.08,-78.36 53.07,-78.83 C29.5,-79.25 25.2,-59.38 25.22,-58.27 C25.25,-56.25 24.97,-31.17 24.97,-31.17 "/>
+ </group>
+ </group>
+ </group>
+ </group>
+ </group>
+ <group android:name="time_group"/>
+ </vector>
+ </aapt:attr>
+ <target android:name="_R_G_L_2_G_T_1">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator android:propertyName="translateXY" android:duration="400"
+ android:startOffset="0" android:propertyXName="translateX"
+ android:propertyYName="translateY"
+ android:pathData="M 0,3C 0,3.09895833581686 0,3 0,3">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="translateXY" android:duration="67"
+ android:startOffset="400" android:propertyXName="translateX"
+ android:propertyYName="translateY"
+ android:pathData="M 0,3C 0,3.09895833581686 0,3.594 0,3.594">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="translateXY" android:duration="83"
+ android:startOffset="467" android:propertyXName="translateX"
+ android:propertyYName="translateY"
+ android:pathData="M 0,3.594C 0,3.594 0,3.09895833581686 0,3">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_1_G">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator android:propertyName="scaleX" android:duration="450"
+ android:startOffset="0" android:valueFrom="1" android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="scaleY" android:duration="450"
+ android:startOffset="0" android:valueFrom="1" android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="scaleX" android:duration="67"
+ android:startOffset="450" android:valueFrom="1"
+ android:valueTo="1.1" android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="scaleY" android:duration="67"
+ android:startOffset="450" android:valueFrom="1"
+ android:valueTo="1.1" android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="scaleX" android:duration="183"
+ android:startOffset="517" android:valueFrom="1.1"
+ android:valueTo="1" android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="scaleY" android:duration="183"
+ android:startOffset="517" android:valueFrom="1.1"
+ android:valueTo="1" android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_1_G_N_4_T_1">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator android:propertyName="translateXY" android:duration="400"
+ android:startOffset="0" android:propertyXName="translateX"
+ android:propertyYName="translateY"
+ android:pathData="M 0,3C 0,3.09895833581686 0,3 0,3">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="translateXY" android:duration="67"
+ android:startOffset="400" android:propertyXName="translateX"
+ android:propertyYName="translateY"
+ android:pathData="M 0,3C 0,3.09895833581686 0,3.594 0,3.594">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="translateXY" android:duration="83"
+ android:startOffset="467" android:propertyXName="translateX"
+ android:propertyYName="translateY"
+ android:pathData="M 0,3.594C 0,3.594 0,3.09895833581686 0,3">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_0_G_D_0_P_0">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator android:propertyName="pathData" android:duration="317"
+ android:startOffset="0"
+ android:valueFrom="M79.79 -48.55 C79.79,-48.55 79.75,-53.75 79.78,-55.48 C79.83,-57.62 79.08,-78.36 53.07,-78.83 C29.5,-79.25 25.2,-59.38 25.22,-58.27 C25.25,-56.25 24.97,-31.17 24.97,-31.17 "
+ android:valueTo="M-27.97 -55.05 C-27.97,-55.05 -28,-60.25 -27.97,-61.98 C-27.92,-64.13 -23.5,-86.37 -0.75,-86.32 C22.77,-86.26 27.75,-65.87 27.72,-64.77 C27.55,-59.38 27.97,-31.67 27.97,-31.67 "
+ android:valueType="pathType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.974,0 0.458,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="pathData" android:duration="133"
+ android:startOffset="317"
+ android:valueFrom="M-27.97 -55.05 C-27.97,-55.05 -28,-60.25 -27.97,-61.98 C-27.92,-64.13 -23.5,-86.37 -0.75,-86.32 C22.77,-86.26 27.75,-65.87 27.72,-64.77 C27.55,-59.38 27.97,-31.67 27.97,-31.67 "
+ android:valueTo="M-28.21 -28.42 C-28.21,-28.42 -27.85,-44.88 -27.97,-51.98 C-28,-54.13 -23.5,-76.37 -0.75,-76.32 C22.77,-76.26 27.75,-55.87 27.72,-54.77 C27.55,-49.38 27.97,-28.17 27.97,-28.17 "
+ android:valueType="pathType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="pathData" android:duration="250"
+ android:startOffset="450"
+ android:valueFrom="M-28.21 -28.42 C-28.21,-28.42 -27.85,-44.88 -27.97,-51.98 C-28,-54.13 -23.5,-76.37 -0.75,-76.32 C22.77,-76.26 27.75,-55.87 27.72,-54.77 C27.55,-49.38 27.97,-28.17 27.97,-28.17 "
+ android:valueTo="M-28.21 -31.92 C-28.21,-31.92 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 "
+ android:valueType="pathType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.414,0 0.647,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_0_G_D_1_P_0">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator android:propertyName="pathData" android:duration="317"
+ android:startOffset="0"
+ android:valueFrom="M79.79 -48.55 C79.79,-48.55 79.75,-53.75 79.78,-55.48 C79.83,-57.62 79.08,-78.36 53.07,-78.83 C29.5,-79.25 25.2,-59.38 25.22,-58.27 C25.25,-56.25 24.97,-31.17 24.97,-31.17 "
+ android:valueTo="M-27.97 -55.05 C-27.97,-55.05 -28,-60.25 -27.97,-61.98 C-27.92,-64.13 -23.5,-86.37 -0.75,-86.32 C22.77,-86.26 27.75,-65.87 27.72,-64.77 C27.55,-59.38 27.97,-31.67 27.97,-31.67 "
+ android:valueType="pathType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.974,0 0.458,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="pathData" android:duration="133"
+ android:startOffset="317"
+ android:valueFrom="M-27.97 -55.05 C-27.97,-55.05 -28,-60.25 -27.97,-61.98 C-27.92,-64.13 -23.5,-86.37 -0.75,-86.32 C22.77,-86.26 27.75,-65.87 27.72,-64.77 C27.55,-59.38 27.97,-31.67 27.97,-31.67 "
+ android:valueTo="M-28.21 -28.42 C-28.21,-28.42 -27.85,-44.88 -27.97,-51.98 C-28,-54.13 -23.5,-76.37 -0.75,-76.32 C22.77,-76.26 27.75,-55.87 27.72,-54.77 C27.55,-49.38 27.97,-28.17 27.97,-28.17 "
+ android:valueType="pathType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="pathData" android:duration="250"
+ android:startOffset="450"
+ android:valueFrom="M-28.21 -28.42 C-28.21,-28.42 -27.85,-44.88 -27.97,-51.98 C-28,-54.13 -23.5,-76.37 -0.75,-76.32 C22.77,-76.26 27.75,-55.87 27.72,-54.77 C27.55,-49.38 27.97,-28.17 27.97,-28.17 "
+ android:valueTo="M-28.21 -31.92 C-28.21,-31.92 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 "
+ android:valueType="pathType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.414,0 0.647,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_0_G_N_4_T_1">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator android:propertyName="translateXY" android:duration="400"
+ android:startOffset="0" android:propertyXName="translateX"
+ android:propertyYName="translateY"
+ android:pathData="M 0,3C 0,3.09895833581686 0,3 0,3">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="translateXY" android:duration="67"
+ android:startOffset="400" android:propertyXName="translateX"
+ android:propertyYName="translateY"
+ android:pathData="M 0,3C 0,3.09895833581686 0,3.594 0,3.594">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="translateXY" android:duration="83"
+ android:startOffset="467" android:propertyXName="translateX"
+ android:propertyYName="translateY"
+ android:pathData="M 0,3.594C 0,3.594 0,3.09895833581686 0,3">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="time_group">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator android:propertyName="translateX" android:duration="717"
+ android:startOffset="0" android:valueFrom="0" android:valueTo="1"
+ android:valueType="floatType"/>
+ </set>
+ </aapt:attr>
+ </target>
+</animated-vector>
\ No newline at end of file
diff --git a/core/res/res/anim/lock_scanning.xml b/core/res/res/anim/lock_scanning.xml
index 36d8f88..998c965 100644
--- a/core/res/res/anim/lock_scanning.xml
+++ b/core/res/res/anim/lock_scanning.xml
@@ -16,43 +16,35 @@
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt">
<aapt:attr name="android:drawable">
- <vector android:height="32dp" android:width="32dp" android:viewportHeight="32"
+ <vector android:height="42dp" android:width="32dp" android:viewportHeight="42"
android:viewportWidth="32">
<group android:name="_R_G">
- <group android:name="_R_G_L_2_G_N_1_T_0" android:pivotX="16" android:pivotY="16"
- android:scaleX="1.5" android:scaleY="1.5">
- <group android:name="_R_G_L_2_G" android:translateX="7.75"
+ <group android:name="_R_G_L_2_G_N_5_N_1_T_0" android:translateY="5"
+ android:pivotX="16" android:pivotY="16" android:scaleX="2"
+ android:scaleY="2">
+ <group android:name="_R_G_L_2_G_N_5_T_0" android:translateX="7.75"
android:translateY="10.670000000000002" android:pivotX="8.25"
android:pivotY="7.25" android:scaleX="0.64" android:scaleY="0.64">
- <path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="?attr/textColor"
- android:fillAlpha="1" android:fillType="nonZero"
- android:pathData=" M14.25 0.25 C14.25,0.25 12.75,0.25 12.75,0.25 C12.75,0.25 10.75,0.25 10.75,0.25 C10.75,0.25 5.75,0.25 5.75,0.25 C5.75,0.25 3.75,0.25 3.75,0.25 C3.75,0.25 2.25,0.25 2.25,0.25 C1.15,0.25 0.25,1.15 0.25,2.25 C0.25,2.25 0.25,12.25 0.25,12.25 C0.25,13.35 1.15,14.25 2.25,14.25 C2.25,14.25 14.25,14.25 14.25,14.25 C15.35,14.25 16.25,13.35 16.25,12.25 C16.25,12.25 16.25,2.25 16.25,2.25 C16.25,1.15 15.35,0.25 14.25,0.25c M14.25 12.25 C14.25,12.25 2.25,12.25 2.25,12.25 C2.25,12.25 2.25,2.25 2.25,2.25 C2.25,2.25 3.75,2.25 3.75,2.25 C3.75,2.25 12.75,2.25 12.75,2.25 C12.75,2.25 14.25,2.25 14.25,2.25 C14.25,2.25 14.25,12.25 14.25,12.25c "/>
- </group>
- </group>
- <group android:name="_R_G_L_1_G_N_4_N_1_T_0" android:pivotX="16" android:pivotY="16"
- android:scaleX="1.5" android:scaleY="1.5">
- <group android:name="_R_G_L_1_G_N_4_T_0" android:translateX="7.75"
- android:translateY="10.670000000000002" android:pivotX="8.25"
- android:pivotY="7.25" android:scaleX="0.64" android:scaleY="0.64">
- <group android:name="_R_G_L_1_G" android:translateX="6"
+ <group android:name="_R_G_L_2_G" android:translateX="6"
android:translateY="5" android:pivotX="2.25" android:pivotY="2.25"
android:scaleX="1" android:scaleY="1">
- <path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="?attr/textColor"
+ <path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="?attr/textColor"
android:fillAlpha="1" android:fillType="nonZero"
android:pathData=" M2.25 0.25 C3.35,0.25 4.25,1.15 4.25,2.25 C4.25,3.35 3.35,4.25 2.25,4.25 C1.15,4.25 0.25,3.35 0.25,2.25 C0.25,1.15 1.15,0.25 2.25,0.25c "/>
</group>
</group>
</group>
- <group android:name="_R_G_L_0_G_N_4_N_1_T_0" android:pivotX="16" android:pivotY="16"
- android:scaleX="1.5" android:scaleY="1.5">
- <group android:name="_R_G_L_0_G_N_4_T_0" android:translateX="7.75"
+ <group android:name="_R_G_L_1_G_N_5_N_1_T_0" android:translateY="5"
+ android:pivotX="16" android:pivotY="16" android:scaleX="2"
+ android:scaleY="2">
+ <group android:name="_R_G_L_1_G_N_5_T_0" android:translateX="7.75"
android:translateY="10.670000000000002" android:pivotX="8.25"
android:pivotY="7.25" android:scaleX="0.64" android:scaleY="0.64">
- <group android:name="_R_G_L_0_G_T_1" android:translateX="8.25"
+ <group android:name="_R_G_L_1_G_T_1" android:translateX="8.25"
android:translateY="1.121" android:scaleX="0.125"
android:scaleY="0.125">
- <group android:name="_R_G_L_0_G" android:translateY="25.029">
- <path android:name="_R_G_L_0_G_D_0_P_0"
+ <group android:name="_R_G_L_1_G" android:translateY="25.029">
+ <path android:name="_R_G_L_1_G_D_0_P_0"
android:strokeColor="?attr/textColor" android:strokeLineCap="round"
android:strokeLineJoin="round" android:strokeWidth="16"
android:strokeAlpha="1"
@@ -61,6 +53,21 @@
</group>
</group>
</group>
+ <group android:name="_R_G_L_0_G_N_5_N_1_T_0" android:translateY="5"
+ android:pivotX="16" android:pivotY="16" android:scaleX="2"
+ android:scaleY="2">
+ <group android:name="_R_G_L_0_G_N_5_T_0" android:translateX="7.75"
+ android:translateY="10.670000000000002" android:pivotX="8.25"
+ android:pivotY="7.25" android:scaleX="0.64" android:scaleY="0.64">
+ <group android:name="_R_G_L_0_G" android:translateY="0.04699999999999971"
+ android:pivotX="8.25" android:pivotY="7.25" android:scaleX="1.01562"
+ android:scaleY="1.01563">
+ <path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="?attr/textColor"
+ android:fillAlpha="1" android:fillType="nonZero"
+ android:pathData=" M14.25 0.25 C14.25,0.25 12.75,0.25 12.75,0.25 C12.75,0.25 10.75,0.25 10.75,0.25 C10.75,0.25 5.75,0.25 5.75,0.25 C5.75,0.25 3.75,0.25 3.75,0.25 C3.75,0.25 2.25,0.25 2.25,0.25 C1.15,0.25 0.25,1.15 0.25,2.25 C0.25,2.25 0.25,12.25 0.25,12.25 C0.25,13.35 1.15,14.25 2.25,14.25 C2.25,14.25 14.25,14.25 14.25,14.25 C15.35,14.25 16.25,13.35 16.25,12.25 C16.25,12.25 16.25,2.25 16.25,2.25 C16.25,1.15 15.35,0.25 14.25,0.25c M14.25 12.25 C14.25,12.25 2.25,12.25 2.25,12.25 C2.25,12.25 2.25,2.25 2.25,2.25 C2.25,2.25 3.75,2.25 3.75,2.25 C3.75,2.25 12.75,2.25 12.75,2.25 C12.75,2.25 14.25,2.25 14.25,2.25 C14.25,2.25 14.25,12.25 14.25,12.25c "/>
+ </group>
+ </group>
+ </group>
</group>
<group android:name="time_group"/>
</vector>
@@ -68,68 +75,6 @@
<target android:name="_R_G_L_2_G">
<aapt:attr name="android:animation">
<set android:ordering="together">
- <objectAnimator android:propertyName="scaleX" android:duration="83"
- android:startOffset="0" android:valueFrom="0.64"
- android:valueTo="0.64" android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
- </aapt:attr>
- </objectAnimator>
- <objectAnimator android:propertyName="scaleY" android:duration="83"
- android:startOffset="0" android:valueFrom="0.64"
- android:valueTo="0.64" android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
- </aapt:attr>
- </objectAnimator>
- <objectAnimator android:propertyName="scaleX" android:duration="83"
- android:startOffset="83" android:valueFrom="0.64"
- android:valueTo="0.62" android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
- </aapt:attr>
- </objectAnimator>
- <objectAnimator android:propertyName="scaleY" android:duration="83"
- android:startOffset="83" android:valueFrom="0.64"
- android:valueTo="0.62" android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
- </aapt:attr>
- </objectAnimator>
- <objectAnimator android:propertyName="scaleX" android:duration="183"
- android:startOffset="167" android:valueFrom="0.62"
- android:valueTo="0.8" android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
- </aapt:attr>
- </objectAnimator>
- <objectAnimator android:propertyName="scaleY" android:duration="183"
- android:startOffset="167" android:valueFrom="0.62"
- android:valueTo="0.8" android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
- </aapt:attr>
- </objectAnimator>
- <objectAnimator android:propertyName="scaleX" android:duration="250"
- android:startOffset="350" android:valueFrom="0.8"
- android:valueTo="0.64" android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
- </aapt:attr>
- </objectAnimator>
- <objectAnimator android:propertyName="scaleY" android:duration="250"
- android:startOffset="350" android:valueFrom="0.8"
- android:valueTo="0.64" android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_1_G">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
<objectAnimator android:propertyName="scaleX" android:duration="150"
android:startOffset="0" android:valueFrom="1" android:valueTo="1"
android:valueType="floatType">
@@ -175,7 +120,7 @@
</set>
</aapt:attr>
</target>
- <target android:name="_R_G_L_1_G_N_4_T_0">
+ <target android:name="_R_G_L_2_G_N_5_T_0">
<aapt:attr name="android:animation">
<set android:ordering="together">
<objectAnimator android:propertyName="scaleX" android:duration="83"
@@ -237,7 +182,7 @@
</set>
</aapt:attr>
</target>
- <target android:name="_R_G_L_0_G_D_0_P_0">
+ <target android:name="_R_G_L_1_G_D_0_P_0">
<aapt:attr name="android:animation">
<set android:ordering="together">
<objectAnimator android:propertyName="pathData" android:duration="83"
@@ -270,7 +215,7 @@
</set>
</aapt:attr>
</target>
- <target android:name="_R_G_L_0_G_T_1">
+ <target android:name="_R_G_L_1_G_T_1">
<aapt:attr name="android:animation">
<set android:ordering="together">
<objectAnimator android:propertyName="translateY" android:duration="83"
@@ -297,7 +242,69 @@
</set>
</aapt:attr>
</target>
- <target android:name="_R_G_L_0_G_N_4_T_0">
+ <target android:name="_R_G_L_1_G_N_5_T_0">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator android:propertyName="scaleX" android:duration="83"
+ android:startOffset="0" android:valueFrom="0.64"
+ android:valueTo="0.64" android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="scaleY" android:duration="83"
+ android:startOffset="0" android:valueFrom="0.64"
+ android:valueTo="0.64" android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="scaleX" android:duration="83"
+ android:startOffset="83" android:valueFrom="0.64"
+ android:valueTo="0.62" android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="scaleY" android:duration="83"
+ android:startOffset="83" android:valueFrom="0.64"
+ android:valueTo="0.62" android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="scaleX" android:duration="183"
+ android:startOffset="167" android:valueFrom="0.62"
+ android:valueTo="0.8" android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="scaleY" android:duration="183"
+ android:startOffset="167" android:valueFrom="0.62"
+ android:valueTo="0.8" android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="scaleX" android:duration="250"
+ android:startOffset="350" android:valueFrom="0.8"
+ android:valueTo="0.64" android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator android:propertyName="scaleY" android:duration="250"
+ android:startOffset="350" android:valueFrom="0.8"
+ android:valueTo="0.64" android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/>
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_0_G_N_5_T_0">
<aapt:attr name="android:animation">
<set android:ordering="together">
<objectAnimator android:propertyName="scaleX" android:duration="83"
diff --git a/core/res/res/anim/lock_to_error.xml b/core/res/res/anim/lock_to_error.xml
index 4aad742..ddef96b 100755
--- a/core/res/res/anim/lock_to_error.xml
+++ b/core/res/res/anim/lock_to_error.xml
@@ -19,52 +19,44 @@
<vector android:height="32dp" android:width="32dp" android:viewportHeight="32"
android:viewportWidth="32">
<group android:name="_R_G">
- <group android:name="_R_G_L_2_G_N_1_T_0" android:pivotX="16" android:pivotY="16"
- android:scaleX="1.5" android:scaleY="1.5">
- <group android:name="_R_G_L_2_G" android:translateX="7.75"
- android:translateY="10.670000000000002" android:pivotX="8.25"
- android:pivotY="7.25" android:rotation="0" android:scaleX="0.64"
- android:scaleY="0.64">
+ <group android:name="_R_G_L_2_G_N_2_T_0" android:translateX="7.75"
+ android:translateY="12.649999999999999" android:pivotX="8.25"
+ android:pivotY="7.25" android:rotation="0" android:scaleX="1.3"
+ android:scaleY="1.3">
+ <group android:name="_R_G_L_2_G" android:translateX="6"
+ android:translateY="4.954" android:pivotX="2.25" android:pivotY="2.25"
+ android:scaleX="0.98462" android:scaleY="0.98462">
<path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="?attr/textColor"
android:fillAlpha="1" android:fillType="nonZero"
- android:pathData=" M14.25 0.25 C14.25,0.25 12.75,0.25 12.75,0.25 C12.75,0.25 10.75,0.25 10.75,0.25 C10.75,0.25 5.75,0.25 5.75,0.25 C5.75,0.25 3.75,0.25 3.75,0.25 C3.75,0.25 2.25,0.25 2.25,0.25 C1.15,0.25 0.25,1.15 0.25,2.25 C0.25,2.25 0.25,12.25 0.25,12.25 C0.25,13.35 1.15,14.25 2.25,14.25 C2.25,14.25 14.25,14.25 14.25,14.25 C15.35,14.25 16.25,13.35 16.25,12.25 C16.25,12.25 16.25,2.25 16.25,2.25 C16.25,1.15 15.35,0.25 14.25,0.25c M14.25 12.25 C14.25,12.25 2.25,12.25 2.25,12.25 C2.25,12.25 2.25,2.25 2.25,2.25 C2.25,2.25 3.75,2.25 3.75,2.25 C3.75,2.25 12.75,2.25 12.75,2.25 C12.75,2.25 14.25,2.25 14.25,2.25 C14.25,2.25 14.25,12.25 14.25,12.25c "/>
+ android:pathData=" M2.25 0.25 C3.35,0.25 4.25,1.15 4.25,2.25 C4.25,3.35 3.35,4.25 2.25,4.25 C1.15,4.25 0.25,3.35 0.25,2.25 C0.25,1.15 1.15,0.25 2.25,0.25c "/>
</group>
</group>
- <group android:name="_R_G_L_1_G_N_4_N_1_T_0" android:pivotX="16" android:pivotY="16"
- android:scaleX="1.5" android:scaleY="1.5">
- <group android:name="_R_G_L_1_G_N_4_T_0" android:translateX="7.75"
- android:translateY="10.670000000000002" android:pivotX="8.25"
- android:pivotY="7.25" android:rotation="0" android:scaleX="0.64"
- android:scaleY="0.64">
- <group android:name="_R_G_L_1_G" android:translateX="6"
- android:translateY="5">
- <path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="?attr/textColor"
- android:fillAlpha="1" android:fillType="nonZero"
- android:pathData=" M2.25 0.25 C3.35,0.25 4.25,1.15 4.25,2.25 C4.25,3.35 3.35,4.25 2.25,4.25 C1.15,4.25 0.25,3.35 0.25,2.25 C0.25,1.15 1.15,0.25 2.25,0.25c "/>
- </group>
+ <group android:name="_R_G_L_1_G_N_2_T_0" android:translateX="7.75"
+ android:translateY="12.649999999999999" android:pivotX="8.25"
+ android:pivotY="7.25" android:rotation="0" android:scaleX="1.3"
+ android:scaleY="1.3">
+ <group android:name="_R_G_L_1_G" android:translateX="-16.273"
+ android:translateY="32.312" android:pivotX="27.965" android:pivotY="-32"
+ android:scaleX="0.12308" android:scaleY="0.12308">
+ <path android:name="_R_G_L_1_G_D_0_P_0" android:strokeColor="?attr/textColor"
+ android:strokeLineCap="round" android:strokeLineJoin="round"
+ android:strokeWidth="16" android:strokeAlpha="1"
+ android:pathData=" M-28.21 -25.03 C-28.21,-25.03 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.93,-26.15 27.93,-26.15 "/>
</group>
</group>
- <group android:name="_R_G_L_0_G_N_4_N_1_T_0" android:pivotX="16" android:pivotY="16"
- android:scaleX="1.5" android:scaleY="1.5">
- <group android:name="_R_G_L_0_G_N_4_T_0" android:translateX="7.75"
- android:translateY="10.670000000000002" android:pivotX="8.25"
- android:pivotY="7.25" android:rotation="0" android:scaleX="0.64"
- android:scaleY="0.64">
- <group android:name="_R_G_L_0_G" android:translateX="-16.219"
- android:translateY="32.25" android:pivotX="27.965"
- android:pivotY="-32" android:scaleX="0.125" android:scaleY="0.125">
- <path android:name="_R_G_L_0_G_D_0_P_0" android:strokeColor="?attr/textColor"
- android:strokeLineCap="round" android:strokeLineJoin="round"
- android:strokeWidth="16" android:strokeAlpha="1"
- android:pathData=" M-28.21 -25.03 C-28.21,-25.03 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.93,-26.15 27.93,-26.15 "/>
- </group>
- </group>
+ <group android:name="_R_G_L_0_G" android:translateX="7.75"
+ android:translateY="12.649999999999999" android:pivotX="8.25"
+ android:pivotY="7.25" android:rotation="0" android:scaleX="1.3"
+ android:scaleY="1.3">
+ <path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="?attr/textColor"
+ android:fillAlpha="1" android:fillType="nonZero"
+ android:pathData=" M14.25 0.25 C14.25,0.25 12.75,0.25 12.75,0.25 C12.75,0.25 10.75,0.25 10.75,0.25 C10.75,0.25 5.75,0.25 5.75,0.25 C5.75,0.25 3.75,0.25 3.75,0.25 C3.75,0.25 2.25,0.25 2.25,0.25 C1.15,0.25 0.25,1.15 0.25,2.25 C0.25,2.25 0.25,12.25 0.25,12.25 C0.25,13.35 1.15,14.25 2.25,14.25 C2.25,14.25 14.25,14.25 14.25,14.25 C15.35,14.25 16.25,13.35 16.25,12.25 C16.25,12.25 16.25,2.25 16.25,2.25 C16.25,1.15 15.35,0.25 14.25,0.25c M14.25 12.25 C14.25,12.25 2.25,12.25 2.25,12.25 C2.25,12.25 2.25,2.25 2.25,2.25 C2.25,2.25 3.75,2.25 3.75,2.25 C3.75,2.25 12.75,2.25 12.75,2.25 C12.75,2.25 14.25,2.25 14.25,2.25 C14.25,2.25 14.25,12.25 14.25,12.25c "/>
</group>
</group>
<group android:name="time_group"/>
</vector>
</aapt:attr>
- <target android:name="_R_G_L_2_G">
+ <target android:name="_R_G_L_2_G_N_2_T_0">
<aapt:attr name="android:animation">
<set android:ordering="together">
<objectAnimator android:propertyName="rotation" android:duration="133"
@@ -105,7 +97,7 @@
</set>
</aapt:attr>
</target>
- <target android:name="_R_G_L_1_G_N_4_T_0">
+ <target android:name="_R_G_L_1_G_N_2_T_0">
<aapt:attr name="android:animation">
<set android:ordering="together">
<objectAnimator android:propertyName="rotation" android:duration="133"
@@ -146,7 +138,7 @@
</set>
</aapt:attr>
</target>
- <target android:name="_R_G_L_0_G_N_4_T_0">
+ <target android:name="_R_G_L_0_G">
<aapt:attr name="android:animation">
<set android:ordering="together">
<objectAnimator android:propertyName="rotation" android:duration="133"
diff --git a/core/res/res/anim/lock_unlock.xml b/core/res/res/anim/lock_unlock.xml
index 9cc31a0..0e85c9d 100755
--- a/core/res/res/anim/lock_unlock.xml
+++ b/core/res/res/anim/lock_unlock.xml
@@ -14,124 +14,85 @@
limitations under the License.
-->
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:aapt="http://schemas.android.com/aapt">
+ xmlns:aapt="http://schemas.android.com/aapt">
<aapt:attr name="android:drawable">
- <vector
- android:width="24dp"
- android:height="24dp"
- android:viewportWidth="24"
- android:viewportHeight="24">
+ <vector android:height="40dp" android:width="32dp" android:viewportHeight="40"
+ android:viewportWidth="32">
<group android:name="_R_G">
- <group
- android:name="_R_G_L_2_G_T_1"
- android:translateX="12"
- android:translateY="15">
- <group
- android:name="_R_G_L_2_G"
- android:translateX="-8.25"
- android:translateY="-7.25">
- <path
- android:name="_R_G_L_2_G_D_0_P_0"
- android:fillAlpha="1"
- android:fillColor="?attr/textColor"
- android:fillType="nonZero"
- android:pathData=" M14.25 0.25 C14.25,0.25 12.75,0.25 12.75,0.25 C12.75,0.25 10.75,0.25 10.75,0.25 C10.75,0.25 5.75,0.25 5.75,0.25 C5.75,0.25 3.75,0.25 3.75,0.25 C3.75,0.25 2.25,0.25 2.25,0.25 C1.15,0.25 0.25,1.15 0.25,2.25 C0.25,2.25 0.25,12.25 0.25,12.25 C0.25,13.35 1.15,14.25 2.25,14.25 C2.25,14.25 14.25,14.25 14.25,14.25 C15.35,14.25 16.25,13.35 16.25,12.25 C16.25,12.25 16.25,2.25 16.25,2.25 C16.25,1.15 15.35,0.25 14.25,0.25c M14.25 12.25 C14.25,12.25 2.25,12.25 2.25,12.25 C2.25,12.25 2.25,2.25 2.25,2.25 C2.25,2.25 3.75,2.25 3.75,2.25 C3.75,2.25 12.75,2.25 12.75,2.25 C12.75,2.25 14.25,2.25 14.25,2.25 C14.25,2.25 14.25,12.25 14.25,12.25c " />
- </group>
- </group>
- <group
- android:name="_R_G_L_1_G_N_5_T_1"
- android:translateX="12"
- android:translateY="15">
- <group
- android:name="_R_G_L_1_G_N_5_T_0"
- android:translateX="-8.25"
- android:translateY="-7.25">
- <group
- android:name="_R_G_L_1_G"
- android:pivotX="2.25"
- android:pivotY="2.25"
- android:scaleX="1"
- android:scaleY="1"
- android:translateX="6"
- android:translateY="5">
- <path
- android:name="_R_G_L_1_G_D_0_P_0"
- android:fillAlpha="1"
- android:fillColor="?attr/textColor"
- android:fillType="nonZero"
- android:pathData=" M2.25 0.25 C3.35,0.25 4.25,1.15 4.25,2.25 C4.25,3.35 3.35,4.25 2.25,4.25 C1.15,4.25 0.25,3.35 0.25,2.25 C0.25,1.15 1.15,0.25 2.25,0.25c " />
+ <group android:name="_R_G_L_2_G_N_1_T_0" android:translateX="16"
+ android:translateY="20" android:scaleX="1.3" android:scaleY="1.3">
+ <group android:name="_R_G_L_2_G_T_1" android:translateY="3">
+ <group android:name="_R_G_L_2_G" android:translateX="-8.25"
+ android:translateY="-7.25">
+ <path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="?attr/textColor"
+ android:fillAlpha="1" android:fillType="nonZero"
+ android:pathData=" M14.25 0.25 C14.25,0.25 12.75,0.25 12.75,0.25 C12.75,0.25 10.75,0.25 10.75,0.25 C10.75,0.25 5.75,0.25 5.75,0.25 C5.75,0.25 3.75,0.25 3.75,0.25 C3.75,0.25 2.25,0.25 2.25,0.25 C1.15,0.25 0.25,1.15 0.25,2.25 C0.25,2.25 0.25,12.25 0.25,12.25 C0.25,13.35 1.15,14.25 2.25,14.25 C2.25,14.25 14.25,14.25 14.25,14.25 C15.35,14.25 16.25,13.35 16.25,12.25 C16.25,12.25 16.25,2.25 16.25,2.25 C16.25,1.15 15.35,0.25 14.25,0.25c M14.25 12.25 C14.25,12.25 2.25,12.25 2.25,12.25 C2.25,12.25 2.25,2.25 2.25,2.25 C2.25,2.25 3.75,2.25 3.75,2.25 C3.75,2.25 12.75,2.25 12.75,2.25 C12.75,2.25 14.25,2.25 14.25,2.25 C14.25,2.25 14.25,12.25 14.25,12.25c "/>
</group>
</group>
</group>
- <group
- android:name="_R_G_L_0_G_N_5_T_1"
- android:translateX="12"
- android:translateY="15">
- <group
- android:name="_R_G_L_0_G_N_5_T_0"
- android:translateX="-8.25"
- android:translateY="-7.25">
- <group
- android:name="_R_G_L_0_G"
- android:pivotX="27.965"
- android:pivotY="-32"
- android:scaleX="0.125"
- android:scaleY="0.125"
- android:translateX="-16.219"
- android:translateY="32.25">
- <path
- android:name="_R_G_L_0_G_D_0_P_0"
- android:fillAlpha="0"
- android:fillColor="#ff0000"
- android:fillType="nonZero"
- android:pathData=" M-28.21 -31.92 C-28.21,-31.92 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 " />
- <path
- android:name="_R_G_L_0_G_D_1_P_0"
- android:pathData=" M-28.21 -31.92 C-28.21,-31.92 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 "
- android:strokeWidth="16"
- android:strokeAlpha="1"
- android:strokeColor="?attr/textColor"/>
+ <group android:name="_R_G_L_1_G_N_4_N_1_T_0" android:translateX="16"
+ android:translateY="20" android:scaleX="1.3" android:scaleY="1.3">
+ <group android:name="_R_G_L_1_G_N_4_T_1" android:translateY="3">
+ <group android:name="_R_G_L_1_G_N_4_T_0" android:translateX="-8.25"
+ android:translateY="-7.25">
+ <group android:name="_R_G_L_1_G" android:translateX="6"
+ android:translateY="5" android:pivotX="2.25"
+ android:pivotY="2.25" android:scaleX="1" android:scaleY="1">
+ <path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="?attr/textColor"
+ android:fillAlpha="1" android:fillType="nonZero"
+ android:pathData=" M2.25 0.25 C3.35,0.25 4.25,1.15 4.25,2.25 C4.25,3.35 3.35,4.25 2.25,4.25 C1.15,4.25 0.25,3.35 0.25,2.25 C0.25,1.15 1.15,0.25 2.25,0.25c "/>
+ </group>
+ </group>
+ </group>
+ </group>
+ <group android:name="_R_G_L_0_G_N_4_N_1_T_0" android:translateX="16"
+ android:translateY="20" android:scaleX="1.3" android:scaleY="1.3">
+ <group android:name="_R_G_L_0_G_N_4_T_1" android:translateY="3">
+ <group android:name="_R_G_L_0_G_N_4_T_0" android:translateX="-8.25"
+ android:translateY="-7.25">
+ <group android:name="_R_G_L_0_G" android:translateX="-16.219"
+ android:translateY="32.25" android:pivotX="27.965"
+ android:pivotY="-32" android:scaleX="0.125"
+ android:scaleY="0.125">
+ <path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#ff0000"
+ android:fillAlpha="0" android:fillType="nonZero"
+ android:pathData=" M-28.21 -31.92 C-28.21,-31.92 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 "/>
+ <path android:name="_R_G_L_0_G_D_1_P_0"
+ android:strokeColor="?attr/textColor" android:strokeLineCap="round"
+ android:strokeLineJoin="round" android:strokeWidth="16"
+ android:strokeAlpha="1"
+ android:pathData=" M-28.21 -31.92 C-28.21,-31.92 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 "/>
+ </group>
</group>
</group>
</group>
</group>
- <group android:name="time_group" />
+ <group android:name="time_group"/>
</vector>
</aapt:attr>
<target android:name="_R_G_L_2_G_T_1">
<aapt:attr name="android:animation">
<set android:ordering="together">
- <objectAnimator
- android:duration="133"
- android:pathData="M 12,15C 12,14.85416667163372 12,14.125 12,14.125"
- android:propertyName="translateXY"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:startOffset="0">
+ <objectAnimator android:propertyName="translateY" android:duration="133"
+ android:startOffset="0" android:valueFrom="3"
+ android:valueTo="1.625" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ <pathInterpolator
+ android:pathData="M 0.0,0.0 c0.075,0.167 0.622,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="133"
- android:pathData="M 12,14.125C 12,14.125 12,15.05870145463943 12,15.324"
- android:propertyName="translateXY"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:startOffset="133">
+ <objectAnimator android:propertyName="translateY" android:duration="133"
+ android:startOffset="133" android:valueFrom="1.625"
+ android:valueTo="3.699" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.352,0 0.717,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="100"
- android:pathData="M 12,15.324C 12,15.40252217555046 12,14.96669441461563 12,15"
- android:propertyName="translateXY"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:startOffset="267">
+ <objectAnimator android:propertyName="translateY" android:duration="100"
+ android:startOffset="267" android:valueFrom="3.699"
+ android:valueTo="3" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.356,0 0.527,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
</set>
@@ -140,87 +101,60 @@
<target android:name="_R_G_L_1_G">
<aapt:attr name="android:animation">
<set android:ordering="together">
- <objectAnimator
- android:duration="100"
- android:propertyName="scaleX"
- android:startOffset="0"
- android:valueFrom="1"
- android:valueTo="0.85"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="scaleX" android:duration="100"
+ android:startOffset="0" android:valueFrom="1" android:valueTo="0.85"
+ android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="100"
- android:propertyName="scaleY"
- android:startOffset="0"
- android:valueFrom="1"
- android:valueTo="0.85"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="scaleY" android:duration="100"
+ android:startOffset="0" android:valueFrom="1" android:valueTo="0.85"
+ android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="283"
- android:propertyName="scaleX"
- android:startOffset="100"
- android:valueFrom="0.85"
- android:valueTo="1"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="scaleX" android:duration="283"
+ android:startOffset="100" android:valueFrom="0.85"
+ android:valueTo="1" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="283"
- android:propertyName="scaleY"
- android:startOffset="100"
- android:valueFrom="0.85"
- android:valueTo="1"
- android:valueType="floatType">
+ <objectAnimator android:propertyName="scaleY" android:duration="283"
+ android:startOffset="100" android:valueFrom="0.85"
+ android:valueTo="1" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
</set>
</aapt:attr>
</target>
- <target android:name="_R_G_L_1_G_N_5_T_1">
+ <target android:name="_R_G_L_1_G_N_4_T_1">
<aapt:attr name="android:animation">
<set android:ordering="together">
- <objectAnimator
- android:duration="133"
- android:pathData="M 12,15C 12,14.85416667163372 12,14.125 12,14.125"
- android:propertyName="translateXY"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:startOffset="0">
+ <objectAnimator android:propertyName="translateY" android:duration="133"
+ android:startOffset="0" android:valueFrom="3"
+ android:valueTo="1.625" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ <pathInterpolator
+ android:pathData="M 0.0,0.0 c0.075,0.167 0.622,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="133"
- android:pathData="M 12,14.125C 12,14.125 12,15.05870145463943 12,15.324"
- android:propertyName="translateXY"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:startOffset="133">
+ <objectAnimator android:propertyName="translateY" android:duration="133"
+ android:startOffset="133" android:valueFrom="1.625"
+ android:valueTo="3.699" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.352,0 0.717,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="100"
- android:pathData="M 12,15.324C 12,15.40252217555046 12,14.96669441461563 12,15"
- android:propertyName="translateXY"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:startOffset="267">
+ <objectAnimator android:propertyName="translateY" android:duration="100"
+ android:startOffset="267" android:valueFrom="3.699"
+ android:valueTo="3" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.356,0 0.527,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
</set>
@@ -229,26 +163,22 @@
<target android:name="_R_G_L_0_G_D_0_P_0">
<aapt:attr name="android:animation">
<set android:ordering="together">
- <objectAnimator
- android:duration="67"
- android:propertyName="pathData"
- android:startOffset="0"
- android:valueFrom="M-28.21 -31.92 C-28.21,-31.92 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 "
- android:valueTo="M-27.97 -48.55 C-27.97,-48.55 -28,-53.75 -27.97,-55.48 C-27.92,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 "
- android:valueType="pathType">
+ <objectAnimator android:propertyName="pathData" android:duration="67"
+ android:startOffset="0"
+ android:valueFrom="M-28.21 -31.92 C-28.21,-31.92 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 "
+ android:valueTo="M-27.97 -59.3 C-27.97,-59.3 -28,-64.5 -27.97,-66.23 C-27.92,-68.37 -23.5,-90.63 -0.75,-90.57 C22.77,-90.51 27.75,-70.12 27.72,-69.02 C27.55,-63.63 27.97,-25.67 27.97,-25.67 "
+ android:valueType="pathType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.353,0 0.2,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.353,0 0.2,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="333"
- android:propertyName="pathData"
- android:startOffset="67"
- android:valueFrom="M-27.97 -48.55 C-27.97,-48.55 -28,-53.75 -27.97,-55.48 C-27.92,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 "
- android:valueTo="M79.79 -48.55 C79.79,-48.55 79.75,-53.75 79.78,-55.48 C79.83,-57.62 79.08,-78.36 53.07,-78.83 C29.5,-79.25 25.2,-59.38 25.22,-58.27 C25.25,-56.25 24.97,-31.17 24.97,-31.17 "
- android:valueType="pathType">
+ <objectAnimator android:propertyName="pathData" android:duration="333"
+ android:startOffset="67"
+ android:valueFrom="M-27.97 -59.3 C-27.97,-59.3 -28,-64.5 -27.97,-66.23 C-27.92,-68.37 -23.5,-90.63 -0.75,-90.57 C22.77,-90.51 27.75,-70.12 27.72,-69.02 C27.55,-63.63 27.97,-25.67 27.97,-25.67 "
+ android:valueTo="M79.79 -48.55 C79.79,-48.55 79.75,-53.75 79.78,-55.48 C79.83,-57.62 79.08,-78.36 53.07,-78.83 C29.5,-79.25 25.2,-59.38 25.22,-58.27 C25.25,-56.25 24.97,-31.17 24.97,-31.17 "
+ android:valueType="pathType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.542,0 0.026,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.542,0 0.026,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
</set>
@@ -257,65 +187,50 @@
<target android:name="_R_G_L_0_G_D_1_P_0">
<aapt:attr name="android:animation">
<set android:ordering="together">
- <objectAnimator
- android:duration="67"
- android:propertyName="pathData"
- android:startOffset="0"
- android:valueFrom="M-28.21 -31.92 C-28.21,-31.92 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 "
- android:valueTo="M-27.97 -48.55 C-27.97,-48.55 -28,-53.75 -27.97,-55.48 C-27.92,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 "
- android:valueType="pathType">
+ <objectAnimator android:propertyName="pathData" android:duration="67"
+ android:startOffset="0"
+ android:valueFrom="M-28.21 -31.92 C-28.21,-31.92 -27.85,-48.38 -27.97,-55.48 C-28,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 "
+ android:valueTo="M-27.97 -59.3 C-27.97,-59.3 -28,-64.5 -27.97,-66.23 C-27.92,-68.37 -23.5,-90.63 -0.75,-90.57 C22.77,-90.51 27.75,-70.12 27.72,-69.02 C27.55,-63.63 27.97,-25.67 27.97,-25.67 "
+ android:valueType="pathType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.353,0 0.2,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.353,0 0.2,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="333"
- android:propertyName="pathData"
- android:startOffset="67"
- android:valueFrom="M-27.97 -48.55 C-27.97,-48.55 -28,-53.75 -27.97,-55.48 C-27.92,-57.63 -23.5,-79.87 -0.75,-79.82 C22.77,-79.76 27.75,-59.37 27.72,-58.27 C27.55,-52.88 27.97,-31.67 27.97,-31.67 "
- android:valueTo="M79.79 -48.55 C79.79,-48.55 79.75,-53.75 79.78,-55.48 C79.83,-57.62 79.08,-78.36 53.07,-78.83 C29.5,-79.25 25.2,-59.38 25.22,-58.27 C25.25,-56.25 24.97,-31.17 24.97,-31.17 "
- android:valueType="pathType">
+ <objectAnimator android:propertyName="pathData" android:duration="333"
+ android:startOffset="67"
+ android:valueFrom="M-27.97 -59.3 C-27.97,-59.3 -28,-64.5 -27.97,-66.23 C-27.92,-68.37 -23.5,-90.63 -0.75,-90.57 C22.77,-90.51 27.75,-70.12 27.72,-69.02 C27.55,-63.63 27.97,-25.67 27.97,-25.67 "
+ android:valueTo="M79.79 -48.55 C79.79,-48.55 79.75,-53.75 79.78,-55.48 C79.83,-57.62 79.08,-78.36 53.07,-78.83 C29.5,-79.25 25.2,-59.38 25.22,-58.27 C25.25,-56.25 24.97,-31.17 24.97,-31.17 "
+ android:valueType="pathType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.542,0 0.026,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.542,0 0.026,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
</set>
</aapt:attr>
</target>
- <target android:name="_R_G_L_0_G_N_5_T_1">
+ <target android:name="_R_G_L_0_G_N_4_T_1">
<aapt:attr name="android:animation">
<set android:ordering="together">
- <objectAnimator
- android:duration="133"
- android:pathData="M 12,15C 12,14.85416667163372 12,14.125 12,14.125"
- android:propertyName="translateXY"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:startOffset="0">
+ <objectAnimator android:propertyName="translateY" android:duration="133"
+ android:startOffset="0" android:valueFrom="3"
+ android:valueTo="1.625" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ <pathInterpolator
+ android:pathData="M 0.0,0.0 c0.075,0.167 0.622,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="133"
- android:pathData="M 12,14.125C 12,14.125 12,15.05870145463943 12,15.324"
- android:propertyName="translateXY"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:startOffset="133">
+ <objectAnimator android:propertyName="translateY" android:duration="133"
+ android:startOffset="133" android:valueFrom="1.625"
+ android:valueTo="3.699" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.352,0 0.717,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
- <objectAnimator
- android:duration="100"
- android:pathData="M 12,15.324C 12,15.40252217555046 12,14.96669441461563 12,15"
- android:propertyName="translateXY"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:startOffset="267">
+ <objectAnimator android:propertyName="translateY" android:duration="100"
+ android:startOffset="267" android:valueFrom="3.699"
+ android:valueTo="3" android:valueType="floatType">
<aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.356,0 0.527,1 1.0,1.0"/>
</aapt:attr>
</objectAnimator>
</set>
@@ -324,13 +239,9 @@
<target android:name="time_group">
<aapt:attr name="android:animation">
<set android:ordering="together">
- <objectAnimator
- android:duration="717"
- android:propertyName="translateX"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
+ <objectAnimator android:propertyName="translateX" android:duration="717"
+ android:startOffset="0" android:valueFrom="0" android:valueTo="1"
+ android:valueType="floatType"/>
</set>
</aapt:attr>
</target>
diff --git a/core/res/res/drawable/ic_lock.xml b/core/res/res/drawable/ic_lock.xml
new file mode 100644
index 0000000..8d7143b
--- /dev/null
+++ b/core/res/res/drawable/ic_lock.xml
@@ -0,0 +1,27 @@
+<!--
+Copyright (C) 2019 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="32dp"
+ android:height="32dp"
+ android:viewportWidth="32"
+ android:viewportHeight="32">
+ <path
+ android:fillColor="?attr/textColor"
+ android:pathData="M16,20m-2.7,0a2.7,2.7 0,1 1,5.4 0a2.7,2.7 0,1 1,-5.4 0"/>
+ <path
+ android:fillColor="?attr/textColor"
+ android:pathData="M24,10.7h-2V7.3c0,-3.3 -2.7,-6 -6,-6s-6,2.7 -6,6v3.3H8c-1.5,0 -2.7,1.2 -2.7,2.7v13.3c0,1.5 1.2,2.7 2.7,2.7h16c1.5,0 2.7,-1.2 2.7,-2.7V13.3C26.7,11.9 25.5,10.7 24,10.7zM12.7,7.3C12.7,5.5 14.2,4 16,4s3.3,1.5 3.3,3.3v3.3h-6.7V7.3zM24,26.7H8V13.3h2h12h2V26.7z"/>
+</vector>
diff --git a/core/res/res/drawable/ic_lock_24dp.xml b/core/res/res/drawable/ic_lock_24dp.xml
deleted file mode 100644
index d848426..0000000
--- a/core/res/res/drawable/ic_lock_24dp.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
-Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24.0dp"
- android:height="24.0dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
- <path
- android:fillColor="?attr/textColor"
- android:pathData="M12.0,15.0m-2.0,0.0a2.0,2.0 0.0,1.0 1.0,4.0 0.0a2.0,2.0 0.0,1.0 1.0,-4.0 0.0"/>
- <path
- android:pathData="M0,0h24v24H0V0z"
- android:fillColor="#00000000"/>
- <path
- android:fillColor="?attr/textColor"
- android:pathData="M18.0,8.0l-1.5,0.0L16.5,5.5C16.5,3.01 14.49,1.0 12.0,1.0S7.5,3.01 7.5,5.5L7.5,8.0L6.0,8.0c-1.1,0.0 -2.0,0.9 -2.0,2.0l0.0,10.0c0.0,1.1 0.9,2.0 2.0,2.0l12.0,0.0c1.1,0.0 2.0,-0.9 2.0,-2.0L20.0,10.0C20.0,8.9 19.1,8.0 18.0,8.0zM9.5,5.5C9.5,4.12 10.62,3.0 12.0,3.0c1.38,0.0 2.5,1.12 2.5,2.5L14.5,8.0l-5.0,0.0L9.5,5.5zM18.0,20.0L6.0,20.0L6.0,10.0l1.5,0.0l9.0,0.0L18.0,10.0L18.0,20.0z"/>
-</vector>
diff --git a/core/res/res/drawable/ic_lock_open.xml b/core/res/res/drawable/ic_lock_open.xml
new file mode 100644
index 0000000..3a6bf93
--- /dev/null
+++ b/core/res/res/drawable/ic_lock_open.xml
@@ -0,0 +1,27 @@
+<!--
+Copyright (C) 2019 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="32dp"
+ android:height="32dp"
+ android:viewportWidth="32"
+ android:viewportHeight="32">
+ <path
+ android:fillColor="?attr/textColor"
+ android:pathData="M16,20m-2.67,0a2.67,2.67 0,1 1,5.34 0a2.67,2.67 0,1 1,-5.34 0"/>
+ <path
+ android:fillColor="?attr/textColor"
+ android:pathData="M24.67,1.33a6,6 0,0 0,-6 6v3.34L8,10.67a2.67,2.67 0,0 0,-2.67 2.66L5.33,26.67A2.67,2.67 0,0 0,8 29.33L24,29.33a2.67,2.67 0,0 0,2.67 -2.66L26.67,13.33A2.67,2.67 0,0 0,24 10.67L21.33,10.67L21.33,7.33a3.34,3.34 0,0 1,6.67 0L28,8h2.67L30.67,7.33A6,6 0,0 0,24.67 1.33ZM24,13.33L24,26.67L8,26.67L8,13.33Z"/>
+</vector>
\ No newline at end of file
diff --git a/core/res/res/drawable/ic_lock_open_24dp.xml b/core/res/res/drawable/ic_lock_open_24dp.xml
deleted file mode 100644
index 94eecad..0000000
--- a/core/res/res/drawable/ic_lock_open_24dp.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
-Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24.0dp"
- android:height="24.0dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
- <path
- android:fillColor="?attr/textColor"
- android:pathData="M12.0,15.0m-2.0,0.0a2.0,2.0 0.0,1.0 1.0,4.0 0.0a2.0,2.0 0.0,1.0 1.0,-4.0 0.0"/>
- <path
- android:fillColor="?attr/textColor"
- android:pathData="M18.5,1.0C16.01,1.0 14.0,3.01 14.0,5.5L14.0,8.0L6.0,8.0c-1.1,0.0 -2.0,0.9 -2.0,2.0l0.0,10.0c0.0,1.1 0.9,2.0 2.0,2.0l12.0,0.0c1.1,0.0 2.0,-0.9 2.0,-2.0L20.0,10.0c0.0,-1.1 -0.9,-2.0 -2.0,-2.0l-2.0,0.0L16.0,5.5C16.0,4.12 17.12,3.0 18.5,3.0C19.88,3.0 21.0,4.12 21.0,5.5L21.0,6.0l2.0,0.0L23.0,5.5C23.0,3.01 20.99,1.0 18.5,1.0zM18.0,10.0l0.0,10.0L6.0,20.0L6.0,10.0L18.0,10.0z"/>
- <path
- android:pathData="M0,0h24v24H0V0z"
- android:fillColor="#00000000"/>
-</vector>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 13551e7..96a3d96 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1378,8 +1378,8 @@
<java-symbol type="drawable" name="ic_text_dot" />
<java-symbol type="drawable" name="ic_print" />
<java-symbol type="drawable" name="ic_print_error" />
- <java-symbol type="drawable" name="ic_lock_24dp" />
- <java-symbol type="drawable" name="ic_lock_open_24dp" />
+ <java-symbol type="drawable" name="ic_lock" />
+ <java-symbol type="drawable" name="ic_lock_open" />
<java-symbol type="drawable" name="jog_dial_arrow_long_left_green" />
<java-symbol type="drawable" name="jog_dial_arrow_long_right_red" />
<java-symbol type="drawable" name="jog_dial_arrow_short_left_and_right" />
diff --git a/core/tests/coretests/src/com/android/internal/os/BinderCallsStatsTest.java b/core/tests/coretests/src/com/android/internal/os/BinderCallsStatsTest.java
index c4632f7..eb9c7b6 100644
--- a/core/tests/coretests/src/com/android/internal/os/BinderCallsStatsTest.java
+++ b/core/tests/coretests/src/com/android/internal/os/BinderCallsStatsTest.java
@@ -642,8 +642,9 @@
long startTime = SystemClock.elapsedRealtime();
TestBinderCallsStats bcs = new TestBinderCallsStats();
bcs.setAddDebugEntries(true);
+ bcs.setSamplingInterval(10);
ArrayList<BinderCallsStats.ExportedCallStat> callStats = bcs.getExportedCallStats();
- assertEquals(3, callStats.size());
+ assertEquals(4, callStats.size());
BinderCallsStats.ExportedCallStat debugEntry1 = callStats.get(0);
assertEquals("", debugEntry1.className);
assertEquals("__DEBUG_start_time_millis", debugEntry1.methodName);
@@ -656,6 +657,9 @@
assertEquals("", debugEntry3.className);
assertEquals("__DEBUG_battery_time_millis", debugEntry3.methodName);
assertTrue(debugEntry3.latencyMicros >= 0);
+ BinderCallsStats.ExportedCallStat debugEntry4 = callStats.get(3);
+ assertEquals("__DEBUG_sampling_interval", debugEntry4.methodName);
+ assertEquals(10, debugEntry4.latencyMicros);
}
@Test
diff --git a/core/tests/coretests/src/com/android/internal/os/LooperStatsTest.java b/core/tests/coretests/src/com/android/internal/os/LooperStatsTest.java
index 3edf5f8..7917a06 100644
--- a/core/tests/coretests/src/com/android/internal/os/LooperStatsTest.java
+++ b/core/tests/coretests/src/com/android/internal/os/LooperStatsTest.java
@@ -452,6 +452,7 @@
public void testAddsDebugEntries() {
TestableLooperStats looperStats = new TestableLooperStats(1, 100);
looperStats.setAddDebugEntries(true);
+ looperStats.setSamplingInterval(10);
Message message = mHandlerFirst.obtainMessage(1000);
message.when = looperStats.getSystemUptimeMillis();
@@ -459,7 +460,7 @@
looperStats.messageDispatched(token, message);
List<LooperStats.ExportedEntry> entries = looperStats.getEntries();
- assertThat(entries).hasSize(4);
+ assertThat(entries).hasSize(5);
LooperStats.ExportedEntry debugEntry1 = entries.get(1);
assertThat(debugEntry1.handlerClassName).isEqualTo("");
assertThat(debugEntry1.messageName).isEqualTo("__DEBUG_start_time_millis");
@@ -474,6 +475,9 @@
assertThat(debugEntry3.handlerClassName).isEqualTo("");
assertThat(debugEntry3.messageName).isEqualTo("__DEBUG_battery_time_millis");
assertThat(debugEntry3.totalLatencyMicros).isAtLeast(0L);
+ LooperStats.ExportedEntry debugEntry4 = entries.get(4);
+ assertThat(debugEntry4.messageName).isEqualTo("__DEBUG_sampling_interval");
+ assertThat(debugEntry4.totalLatencyMicros).isEqualTo(10L);
}
@Test
diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java
index e617c42..9eeb43b 100644
--- a/graphics/java/android/graphics/Paint.java
+++ b/graphics/java/android/graphics/Paint.java
@@ -1733,7 +1733,7 @@
* @return the paint's extra word-spacing for drawing text in pixels.
* @see #setWordSpacing(float)
*/
- public float getWordSpacing() {
+ public @Px float getWordSpacing() {
return nGetWordSpacing(mNativePaint);
}
@@ -1746,7 +1746,7 @@
* @param wordSpacing set the paint's extra word-spacing for drawing text in pixels.
* @see #getWordSpacing()
*/
- public void setWordSpacing(float wordSpacing) {
+ public void setWordSpacing(@Px float wordSpacing) {
nSetWordSpacing(mNativePaint, wordSpacing);
}
@@ -2706,6 +2706,8 @@
}
/**
+ * Retrieve the text boundary box and store to bounds.
+ *
* Return in bounds (allocated by the caller) the smallest rectangle that
* encloses all of the characters, with an implied origin at (0,0).
*
@@ -2725,6 +2727,8 @@
}
/**
+ * Retrieve the text boundary box and store to bounds.
+ *
* Return in bounds (allocated by the caller) the smallest rectangle that
* encloses all of the characters, with an implied origin at (0,0).
*
@@ -2736,7 +2740,8 @@
* @param end 1 past the last char in the text to measure
* @param bounds returns the unioned bounds of all the text. Must be allocated by the caller
*/
- public void getTextBounds(CharSequence text, int start, int end, Rect bounds) {
+ public void getTextBounds(@NonNull CharSequence text, int start, int end,
+ @NonNull Rect bounds) {
if ((start | end | (end - start) | (text.length() - end)) < 0) {
throw new IndexOutOfBoundsException();
}
diff --git a/graphics/java/android/graphics/Typeface.java b/graphics/java/android/graphics/Typeface.java
index e93e757..9518714 100644
--- a/graphics/java/android/graphics/Typeface.java
+++ b/graphics/java/android/graphics/Typeface.java
@@ -34,6 +34,7 @@
import android.graphics.fonts.SystemFonts;
import android.os.Build;
import android.os.Build.VERSION_CODES;
+import android.os.ParcelFileDescriptor;
import android.provider.FontRequest;
import android.provider.FontsContract;
import android.text.FontConfig;
@@ -368,7 +369,7 @@
private final AssetManager mAssetManager;
private final String mPath;
- private final Font.Builder mFontBuilder;
+ private final @Nullable Font.Builder mFontBuilder;
private String mFallbackFamilyName;
@@ -395,7 +396,16 @@
* @param fd The file descriptor. The passed fd must be mmap-able.
*/
public Builder(@NonNull FileDescriptor fd) {
- mFontBuilder = new Font.Builder(fd);
+ Font.Builder builder;
+ try {
+ builder = new Font.Builder(ParcelFileDescriptor.dup(fd));
+ } catch (IOException e) {
+ // We cannot tell the error to developer at this moment since we cannot change the
+ // public API signature. Instead, silently fallbacks to system fallback in the build
+ // method as the same as other error cases.
+ builder = null;
+ }
+ mFontBuilder = builder;
mAssetManager = null;
mPath = null;
}
@@ -585,6 +595,9 @@
* @return Newly created Typeface. May return null if some parameters are invalid.
*/
public Typeface build() {
+ if (mFontBuilder == null) {
+ return resolveFallbackTypeface();
+ }
try {
final Font font = mFontBuilder.build();
final String key = mAssetManager == null ? null : createAssetUid(
@@ -687,7 +700,7 @@
* </pre>
* </p>
*/
- public static class CustomFallbackBuilder {
+ public static final class CustomFallbackBuilder {
private static final int MAX_CUSTOM_FALLBACK = 64;
private final ArrayList<FontFamily> mFamilies = new ArrayList<>();
private String mFallbackName = null;
@@ -728,7 +741,7 @@
* @param familyName a family name to be used for fallback if the provided fonts can not be
* used
*/
- public CustomFallbackBuilder setSystemFallback(@NonNull String familyName) {
+ public @NonNull CustomFallbackBuilder setSystemFallback(@NonNull String familyName) {
Preconditions.checkNotNull(familyName);
mFallbackName = familyName;
return this;
@@ -743,7 +756,7 @@
*
* @param style a font style
*/
- public CustomFallbackBuilder setStyle(@NonNull FontStyle style) {
+ public @NonNull CustomFallbackBuilder setStyle(@NonNull FontStyle style) {
mStyle = style;
return this;
}
@@ -758,7 +771,7 @@
* @param family a fallback family
* @throws IllegalArgumentException if you give more than 64 custom fallback families
*/
- public CustomFallbackBuilder addCustomFallback(@NonNull FontFamily family) {
+ public @NonNull CustomFallbackBuilder addCustomFallback(@NonNull FontFamily family) {
Preconditions.checkNotNull(family);
Preconditions.checkArgument(mFamilies.size() < getMaxCustomFallbackCount(),
"Custom fallback limit exceeded(" + getMaxCustomFallbackCount() + ")");
@@ -771,7 +784,7 @@
*
* @return the Typeface object
*/
- public Typeface build() {
+ public @NonNull Typeface build() {
final int userFallbackSize = mFamilies.size();
final FontFamily[] fallback = SystemFonts.getSystemFallback(mFallbackName);
final long[] ptrArray = new long[fallback.length + userFallbackSize];
diff --git a/graphics/java/android/graphics/fonts/Font.java b/graphics/java/android/graphics/fonts/Font.java
index 7f165bf..f715f43 100644
--- a/graphics/java/android/graphics/fonts/Font.java
+++ b/graphics/java/android/graphics/fonts/Font.java
@@ -22,6 +22,7 @@
import android.content.res.AssetManager;
import android.content.res.Resources;
import android.os.LocaleList;
+import android.os.ParcelFileDescriptor;
import android.util.TypedValue;
import com.android.internal.util.Preconditions;
@@ -31,7 +32,6 @@
import libcore.util.NativeAllocationRegistry;
import java.io.File;
-import java.io.FileDescriptor;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
@@ -53,7 +53,7 @@
/**
* A builder class for creating new Font.
*/
- public static class Builder {
+ public static final class Builder {
private static final NativeAllocationRegistry sAssetByteBufferRegistroy =
new NativeAllocationRegistry(ByteBuffer.class.getClassLoader(),
nGetReleaseNativeAssetFunc(), 64);
@@ -122,7 +122,7 @@
*
* @param fd a file descriptor
*/
- public Builder(@NonNull FileDescriptor fd) {
+ public Builder(@NonNull ParcelFileDescriptor fd) {
this(fd, 0, -1);
}
@@ -133,9 +133,9 @@
* @param offset an offset to of the font data in the file
* @param size a size of the font data. If -1 is passed, use until end of the file.
*/
- public Builder(@NonNull FileDescriptor fd, @IntRange(from = 0) long offset,
+ public Builder(@NonNull ParcelFileDescriptor fd, @IntRange(from = 0) long offset,
@IntRange(from = -1) long size) {
- try (FileInputStream fis = new FileInputStream(fd)) {
+ try (FileInputStream fis = new FileInputStream(fd.getFileDescriptor())) {
final FileChannel fc = fis.getChannel();
size = (size == -1) ? fc.size() - offset : size;
mBuffer = fc.map(FileChannel.MapMode.READ_ONLY, offset, size);
@@ -467,7 +467,7 @@
* @see Builder#setSlant(int)
* @return a font style
*/
- public FontStyle getStyle() {
+ public @NonNull FontStyle getStyle() {
return mFontStyle;
}
diff --git a/graphics/java/android/graphics/fonts/FontFamily.java b/graphics/java/android/graphics/fonts/FontFamily.java
index c0f1b16..4772c1c 100644
--- a/graphics/java/android/graphics/fonts/FontFamily.java
+++ b/graphics/java/android/graphics/fonts/FontFamily.java
@@ -61,7 +61,7 @@
/**
* A builder class for creating new FontFamily.
*/
- public static class Builder {
+ public static final class Builder {
private static final NativeAllocationRegistry sFamilyRegistory =
new NativeAllocationRegistry(FontFamily.class.getClassLoader(),
nGetReleaseNativeFamily(), 64);
@@ -152,7 +152,7 @@
* @param index an index of the font
* @return a registered font
*/
- public Font getFont(@IntRange(from = 0) int index) {
+ public @NonNull Font getFont(@IntRange(from = 0) int index) {
return mFonts.get(index);
}
@@ -161,7 +161,7 @@
*
* @return the number of fonts registered in this family.
*/
- public int getSize() {
+ public @IntRange(from = 1) int getSize() {
return mFonts.size();
}
diff --git a/graphics/java/android/graphics/text/LineBreaker.java b/graphics/java/android/graphics/text/LineBreaker.java
index 1647909..046bbcf 100644
--- a/graphics/java/android/graphics/text/LineBreaker.java
+++ b/graphics/java/android/graphics/text/LineBreaker.java
@@ -177,10 +177,10 @@
/**
* Helper class for creating a {@link LineBreaker}.
*/
- public static class Builder {
+ public static final class Builder {
private @BreakStrategy int mBreakStrategy = BREAK_STRATEGY_SIMPLE;
private @HyphenationFrequency int mHyphenationFrequency = HYPHENATION_FREQUENCY_NONE;
- private @JustificationMode int mJustified = JUSTIFICATION_MODE_NONE;
+ private @JustificationMode int mJustificationMode = JUSTIFICATION_MODE_NONE;
private @Nullable int[] mIndents = null;
/**
@@ -189,7 +189,7 @@
* You can change the line breaking behavior by setting break strategy. The default value is
* {@link #BREAK_STRATEGY_SIMPLE}.
*/
- public Builder setBreakStrategy(@BreakStrategy int breakStrategy) {
+ public @NonNull Builder setBreakStrategy(@BreakStrategy int breakStrategy) {
mBreakStrategy = breakStrategy;
return this;
}
@@ -200,7 +200,8 @@
* You can change the amount of automatic hyphenation used. The default value is
* {@link #HYPHENATION_FREQUENCY_NONE}.
*/
- public Builder setHyphenationFrequency(@HyphenationFrequency int hyphenationFrequency) {
+ public @NonNull Builder setHyphenationFrequency(
+ @HyphenationFrequency int hyphenationFrequency) {
mHyphenationFrequency = hyphenationFrequency;
return this;
}
@@ -212,8 +213,8 @@
* internal parameters for justification.
* The default value is {@link #JUSTIFICATION_MODE_NONE}
*/
- public Builder setJustified(@JustificationMode int justified) {
- mJustified = justified;
+ public @NonNull Builder setJustificationMode(@JustificationMode int justificationMode) {
+ mJustificationMode = justificationMode;
return this;
}
@@ -224,7 +225,7 @@
* amount is the sum of both left and right indentations. For lines past the last element in
* the array, the indentation amount of the last element is used.
*/
- public Builder setIndents(@Nullable int[] indents) {
+ public @NonNull Builder setIndents(@Nullable int[] indents) {
mIndents = indents;
return this;
}
@@ -234,8 +235,9 @@
*
* You can reuse the Builder instance even after calling this method.
*/
- public LineBreaker build() {
- return new LineBreaker(mBreakStrategy, mHyphenationFrequency, mJustified, mIndents);
+ public @NonNull LineBreaker build() {
+ return new LineBreaker(mBreakStrategy, mHyphenationFrequency, mJustificationMode,
+ mIndents);
}
}
@@ -412,7 +414,7 @@
}
/**
- * Returns a packed packed hyphen edit for the line.
+ * Returns a packed hyphen edit for the line.
*
* @param lineIndex an index of the line.
* @return a packed hyphen edit for the line.
@@ -451,7 +453,7 @@
* @param constraints for a single paragraph
* @param lineNumber a line number of this paragraph
*/
- public Result computeLineBreaks(
+ public @NonNull Result computeLineBreaks(
@NonNull MeasuredText measuredPara,
@NonNull ParagraphConstraints constraints,
@IntRange(from = 0) int lineNumber) {
diff --git a/graphics/java/android/graphics/text/MeasuredText.java b/graphics/java/android/graphics/text/MeasuredText.java
index 2536619..480aff2 100644
--- a/graphics/java/android/graphics/text/MeasuredText.java
+++ b/graphics/java/android/graphics/text/MeasuredText.java
@@ -168,7 +168,7 @@
*
* Note: The appendStyle and appendReplacementRun should be called to cover the text length.
*/
- public static class Builder {
+ public static final class Builder {
private static final NativeAllocationRegistry sRegistry = new NativeAllocationRegistry(
MeasuredText.class.getClassLoader(), nGetReleaseFunc(), 1024);
@@ -227,7 +227,7 @@
* text
* @param isRtl true if the text is in RTL context, otherwise false.
*/
- public Builder appendStyleRun(@NonNull Paint paint, @IntRange(from = 0) int length,
+ public @NonNull Builder appendStyleRun(@NonNull Paint paint, @IntRange(from = 0) int length,
boolean isRtl) {
Preconditions.checkNotNull(paint);
Preconditions.checkArgument(length > 0, "length can not be negative");
@@ -253,8 +253,8 @@
* text
* @param width a replacement width of the range
*/
- public Builder appendReplacementRun(@NonNull Paint paint,
- @IntRange(from = 0) int length, @FloatRange(from = 0) float width) {
+ public @NonNull Builder appendReplacementRun(@NonNull Paint paint,
+ @IntRange(from = 0) int length, @Px @FloatRange(from = 0) float width) {
Preconditions.checkArgument(length > 0, "length can not be negative");
final int end = mCurrentOffset + length;
Preconditions.checkArgument(end <= mText.length, "Replacement exceeds the text length");
@@ -275,7 +275,7 @@
*
* @param computeHyphenation true if you want to use automatic hyphenations.
*/
- public Builder setComputeHyphenation(boolean computeHyphenation) {
+ public @NonNull Builder setComputeHyphenation(boolean computeHyphenation) {
mComputeHyphenation = computeHyphenation;
return this;
}
@@ -292,7 +292,7 @@
*
* @param computeLayout true if you want to retrieve full layout info, e.g. bbox.
*/
- public Builder setComputeLayout(boolean computeLayout) {
+ public @NonNull Builder setComputeLayout(boolean computeLayout) {
mComputeLayout = computeLayout;
return this;
}
@@ -305,7 +305,7 @@
* @throws IllegalStateException if the whole text is not covered by one or more runs (style
* or replacement)
*/
- public MeasuredText build() {
+ public @NonNull MeasuredText build() {
ensureNativePtrNoReuse();
if (mCurrentOffset != mText.length) {
throw new IllegalStateException("Style info has not been provided for all text.");
diff --git a/media/java/android/media/PlayerBase.java b/media/java/android/media/PlayerBase.java
index b302b06..50caf733 100644
--- a/media/java/android/media/PlayerBase.java
+++ b/media/java/android/media/PlayerBase.java
@@ -52,6 +52,10 @@
// parameters of the player that affect AppOps
protected AudioAttributes mAttributes;
+
+ // volumes of the subclass "player volumes", as seen by the client of the subclass
+ // (e.g. what was passed in AudioTrack.setVolume(float)). The actual volume applied is
+ // the combination of the player volume, and the PlayerBase pan and volume multipliers
protected float mLeftVolume = 1.0f;
protected float mRightVolume = 1.0f;
protected float mAuxEffectSendLevel = 0.0f;
@@ -79,6 +83,8 @@
private float mPanMultiplierL = 1.0f;
@GuardedBy("mLock")
private float mPanMultiplierR = 1.0f;
+ @GuardedBy("mLock")
+ private float mVolMultiplier = 1.0f;
/**
* Constructor. Must be given audio attributes, as they are required for AppOps.
@@ -199,18 +205,33 @@
mPanMultiplierR = 1.0f + p;
}
}
- baseSetVolume(mLeftVolume, mRightVolume);
+ updatePlayerVolume();
+ }
+
+ private void updatePlayerVolume() {
+ final float finalLeftVol, finalRightVol;
+ final boolean isRestricted;
+ synchronized (mLock) {
+ finalLeftVol = mVolMultiplier * mLeftVolume * mPanMultiplierL;
+ finalRightVol = mVolMultiplier * mRightVolume * mPanMultiplierR;
+ isRestricted = isRestricted_sync();
+ }
+ playerSetVolume(isRestricted /*muting*/, finalLeftVol, finalRightVol);
+ }
+
+ void setVolumeMultiplier(float vol) {
+ synchronized (mLock) {
+ this.mVolMultiplier = vol;
+ }
+ updatePlayerVolume();
}
void baseSetVolume(float leftVolume, float rightVolume) {
- final boolean isRestricted;
synchronized (mLock) {
mLeftVolume = leftVolume;
mRightVolume = rightVolume;
- isRestricted = isRestricted_sync();
}
- playerSetVolume(isRestricted/*muting*/,
- leftVolume * mPanMultiplierL, rightVolume * mPanMultiplierR);
+ updatePlayerVolume();
}
int baseSetAuxEffectSendLevel(float level) {
@@ -466,7 +487,7 @@
public void setVolume(float vol) {
final PlayerBase pb = mWeakPB.get();
if (pb != null) {
- pb.baseSetVolume(vol, vol);
+ pb.setVolumeMultiplier(vol);
}
}
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index f4c7275..c60e8c3 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -950,6 +950,8 @@
<string name="power_discharge_by_only">Should last until about <xliff:g id="time">%1$s</xliff:g></string>
<!-- [CHAR_LIMIT=100] Label for estimated time that phone will run out of battery -->
<string name="power_discharge_by_only_short">Until <xliff:g id="time" example="12 PM">%1$s</xliff:g></string>
+ <!-- [CHAR_LIMIT=100] Extend the battery life past a certain time -->
+ <string name="power_suggestion_extend_battery">Extend battery life past <xliff:g id="time" example="12 PM">%1$s</xliff:g></string>
<!-- [CHAR_LIMIT=60] label for estimated remaining duration of battery when under a certain amount -->
<string name="power_remaining_less_than_duration_only">Less than <xliff:g id="threshold">%1$s</xliff:g> remaining</string>
diff --git a/packages/SettingsLib/src/com/android/settingslib/utils/PowerUtil.java b/packages/SettingsLib/src/com/android/settingslib/utils/PowerUtil.java
index 52d7e2c..5600dd2 100644
--- a/packages/SettingsLib/src/com/android/settingslib/utils/PowerUtil.java
+++ b/packages/SettingsLib/src/com/android/settingslib/utils/PowerUtil.java
@@ -101,7 +101,29 @@
if (drainTimeMs <= ONE_DAY_MILLIS) {
return getRegularTimeRemainingShortString(context, drainTimeMs);
} else {
- return getMoreThanOneDayShortString(context, drainTimeMs);
+ return getMoreThanOneDayShortString(context, drainTimeMs,
+ R.string.power_remaining_duration_only_short);
+ }
+ }
+
+ /**
+ * This method produces the text used in Settings battery tip to describe the effect after
+ * use the tip.
+ *
+ * @param context
+ * @param drainTimeMs The estimated time remaining before the phone dies in milliseconds.
+ * @return a properly formatted and localized string
+ */
+ public static String getBatteryTipStringFormatted(Context context, long drainTimeMs) {
+ if (drainTimeMs <= 0) {
+ return null;
+ }
+ if (drainTimeMs <= ONE_DAY_MILLIS) {
+ return context.getString(R.string.power_suggestion_extend_battery,
+ getDateTimeStringFromMs(context, drainTimeMs));
+ } else {
+ return getMoreThanOneDayShortString(context, drainTimeMs,
+ R.string.power_remaining_only_more_than_subtext);
}
}
@@ -144,12 +166,13 @@
}
}
- private static String getMoreThanOneDayShortString(Context context, long drainTimeMs) {
+ private static String getMoreThanOneDayShortString(Context context, long drainTimeMs,
+ int resId) {
final long roundedTimeMs = roundTimeToNearestThreshold(drainTimeMs, ONE_HOUR_MILLIS);
CharSequence timeString = StringUtil.formatElapsedTime(context, roundedTimeMs,
false /* withSeconds */);
- return context.getString(R.string.power_remaining_duration_only_short, timeString);
+ return context.getString(resId, timeString);
}
private static String getMoreThanTwoDaysString(Context context, String percentageString) {
@@ -169,17 +192,8 @@
private static String getRegularTimeRemainingString(Context context, long drainTimeMs,
String percentageString, boolean basedOnUsage) {
- // Get the time of day we think device will die rounded to the nearest 15 min.
- final long roundedTimeOfDayMs =
- roundTimeToNearestThreshold(
- System.currentTimeMillis() + drainTimeMs,
- FIFTEEN_MINUTES_MILLIS);
- // convert the time to a properly formatted string.
- String skeleton = android.text.format.DateFormat.getTimeFormatString(context);
- DateFormat fmt = DateFormat.getInstanceForSkeleton(skeleton);
- Date date = Date.from(Instant.ofEpochMilli(roundedTimeOfDayMs));
- CharSequence timeString = fmt.format(date);
+ CharSequence timeString = getDateTimeStringFromMs(context, drainTimeMs);
if (TextUtils.isEmpty(percentageString)) {
int id = basedOnUsage
@@ -194,6 +208,20 @@
}
}
+ private static CharSequence getDateTimeStringFromMs(Context context, long drainTimeMs) {
+ // Get the time of day we think device will die rounded to the nearest 15 min.
+ final long roundedTimeOfDayMs =
+ roundTimeToNearestThreshold(
+ System.currentTimeMillis() + drainTimeMs,
+ FIFTEEN_MINUTES_MILLIS);
+
+ // convert the time to a properly formatted string.
+ String skeleton = android.text.format.DateFormat.getTimeFormatString(context);
+ DateFormat fmt = DateFormat.getInstanceForSkeleton(skeleton);
+ Date date = Date.from(Instant.ofEpochMilli(roundedTimeOfDayMs));
+ return fmt.format(date);
+ }
+
private static String getRegularTimeRemainingShortString(Context context, long drainTimeMs) {
// Get the time remaining rounded to the nearest 15 min
final long roundedTimeMs = roundTimeToNearestThreshold(drainTimeMs, FIFTEEN_MINUTES_MILLIS);
@@ -231,4 +259,4 @@
return time - remainder + multiple;
}
}
-}
+}
\ No newline at end of file
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/utils/PowerUtilTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/utils/PowerUtilTest.java
index 7ef31df..61fdbd5 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/utils/PowerUtilTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/utils/PowerUtilTest.java
@@ -42,6 +42,7 @@
private static final long THIRTY_HOURS_MILLIS = Duration.ofHours(30).toMillis();
private static final String NORMAL_CASE_EXPECTED_PREFIX = "Should last until about";
private static final String ENHANCED_SUFFIX = " based on your usage";
+ private static final String EXTEND_PREFIX = "Extend battery life past";
// matches a time (ex: '1:15 PM', '2 AM', '23:00')
private static final String TIME_OF_DAY_REGEX = " (\\d)+:?(\\d)* ((AM)*)|((PM)*)";
// matches a percentage with parenthesis (ex: '(10%)')
@@ -176,6 +177,24 @@
}
@Test
+ public void getBatteryTipStringFormatted_moreThanOneDay_usesCorrectString() {
+ String info = PowerUtil.getBatteryTipStringFormatted(mContext,
+ THREE_DAYS_MILLIS);
+
+ assertThat(info).isEqualTo("More than 3 days remaining");
+ }
+
+ @Test
+ public void getBatteryTipStringFormatted_lessThanOneDay_usesCorrectString() {
+ String info = PowerUtil.getBatteryTipStringFormatted(mContext,
+ SEVENTEEN_MIN_MILLIS);
+
+ // ex: Extend battery life past 1:15 PM
+ assertThat(info).containsMatch(Pattern.compile(
+ EXTEND_PREFIX + TIME_OF_DAY_REGEX));
+ }
+
+ @Test
public void testRoundToNearestThreshold_roundsCorrectly() {
// test some pretty normal values
assertThat(PowerUtil.roundTimeToNearestThreshold(1200, 1000)).isEqualTo(1000);
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
index 2d5606c..a33f9a8 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
@@ -1919,6 +1919,36 @@
dumpSetting(s, p,
Settings.Secure.ENHANCED_VOICE_PRIVACY_ENABLED,
SecureSettingsProto.ENHANCED_VOICE_PRIVACY_ENABLED);
+
+ final long gestureToken = p.start(SecureSettingsProto.GESTURE);
+ dumpSetting(s, p,
+ Settings.Secure.AWARE_ENABLED,
+ SecureSettingsProto.Gesture.AWARE_ENABLED);
+
+ dumpSetting(s, p,
+ Settings.Secure.SILENCE_ALARMS_GESTURE_COUNT,
+ SecureSettingsProto.Gesture.SILENCE_ALARMS_COUNT);
+ dumpSetting(s, p,
+ Settings.Secure.SILENCE_CALL_GESTURE_COUNT,
+ SecureSettingsProto.Gesture.SILENCE_CALLS_COUNT);
+ dumpSetting(s, p,
+ Settings.Secure.SILENCE_GESTURE,
+ SecureSettingsProto.Gesture.SILENCE_ENABLED);
+ dumpSetting(s, p,
+ Settings.Secure.SILENCE_NOTIFICATION_GESTURE_COUNT,
+ SecureSettingsProto.Gesture.SILENCE_NOTIFICATION_COUNT);
+ dumpSetting(s, p,
+ Settings.Secure.SILENCE_TIMER_GESTURE_COUNT,
+ SecureSettingsProto.Gesture.SILENCE_TIMER_COUNT);
+
+ dumpSetting(s, p,
+ Settings.Secure.SKIP_GESTURE_COUNT,
+ SecureSettingsProto.Gesture.SKIP_COUNT);
+ dumpSetting(s, p,
+ Settings.Secure.SKIP_GESTURE,
+ SecureSettingsProto.Gesture.SKIP_ENABLED);
+ p.end(gestureToken);
+
dumpSetting(s, p,
Settings.Secure.IMMERSIVE_MODE_CONFIRMATIONS,
SecureSettingsProto.IMMERSIVE_MODE_CONFIRMATIONS);
@@ -2284,6 +2314,9 @@
Settings.Secure.SYSTEM_NAVIGATION_KEYS_ENABLED,
SecureSettingsProto.SYSTEM_NAVIGATION_KEYS_ENABLED);
dumpSetting(s, p,
+ Settings.Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES,
+ SecureSettingsProto.THEME_CUSTOMIZATION_OVERLAY_PACKAGES);
+ dumpSetting(s, p,
Settings.Secure.TRUST_AGENTS_INITIALIZED,
SecureSettingsProto.TRUST_AGENTS_INITIALIZED);
@@ -2401,22 +2434,6 @@
SecureSettingsProto.Zen.SETTINGS_SUGGESTION_VIEWED);
p.end(zenToken);
- dumpSetting(s, p,
- Settings.Secure.SKIP_GESTURE,
- SecureSettingsProto.SKIP_GESTURE_ENABLED);
-
- dumpSetting(s, p,
- Settings.Secure.SILENCE_GESTURE,
- SecureSettingsProto.SILENCE_GESTURE_ENABLED);
-
- dumpSetting(s, p,
- Settings.Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES,
- SecureSettingsProto.THEME_CUSTOMIZATION_OVERLAY_PACKAGES);
-
- dumpSetting(s, p,
- Settings.Secure.AWARE_ENABLED,
- SecureSettingsProto.AWARE_ENABLED);
-
// Please insert new settings using the same order as in SecureSettingsProto.
p.end(token);
diff --git a/packages/SystemUI/res-keyguard/layout/type_clock.xml b/packages/SystemUI/res-keyguard/layout/type_aod_clock.xml
similarity index 73%
rename from packages/SystemUI/res-keyguard/layout/type_clock.xml
rename to packages/SystemUI/res-keyguard/layout/type_aod_clock.xml
index 89bbc09..28ff5a2 100644
--- a/packages/SystemUI/res-keyguard/layout/type_clock.xml
+++ b/packages/SystemUI/res-keyguard/layout/type_aod_clock.xml
@@ -19,13 +19,5 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
>
- <com.android.keyguard.clock.TypographicClock
- android:id="@+id/type_clock"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingStart="50dp"
- android:textAlignment="viewStart"
- style="@style/widget_big"
- android:textSize="40dp"
- />
+ <include layout="@layout/typographic_clock" />
</com.android.keyguard.clock.ClockLayout>
diff --git a/packages/SystemUI/res-keyguard/layout/type_clock.xml b/packages/SystemUI/res-keyguard/layout/typographic_clock.xml
similarity index 63%
copy from packages/SystemUI/res-keyguard/layout/type_clock.xml
copy to packages/SystemUI/res-keyguard/layout/typographic_clock.xml
index 89bbc09..73bb4b9 100644
--- a/packages/SystemUI/res-keyguard/layout/type_clock.xml
+++ b/packages/SystemUI/res-keyguard/layout/typographic_clock.xml
@@ -14,18 +14,13 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<com.android.keyguard.clock.ClockLayout
+<com.android.keyguard.clock.TypographicClock
xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/type_clock"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- >
- <com.android.keyguard.clock.TypographicClock
- android:id="@+id/type_clock"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingStart="50dp"
- android:textAlignment="viewStart"
- style="@style/widget_big"
- android:textSize="40dp"
- />
-</com.android.keyguard.clock.ClockLayout>
+ android:layout_height="wrap_content"
+ android:paddingStart="50dp"
+ android:textAlignment="viewStart"
+ style="@style/widget_big"
+ android:textSize="40dp"
+ />
diff --git a/packages/SystemUI/res/drawable/ic_media_projection_permission.xml b/packages/SystemUI/res/drawable/ic_media_projection_permission.xml
new file mode 100644
index 0000000..f46d137
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_media_projection_permission.xml
@@ -0,0 +1,26 @@
+<!--
+Copyright (C) 2019 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+ android:insetLeft="2.5dp"
+ android:insetRight="2.5dp">
+ <vector android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path android:fillColor="#FF000000" android:pathData="M1,18v3h3C4,19.34 2.66,18 1,18zM1,14v2c2.76,0 5,2.24 5,5h2C8,17.13 4.87,14 1,14zM1,10v2c4.97,0 9,4.03 9,9h2C12,14.92 7.07,10 1,10zM21,3H3C1.9,3 1,3.9 1,5v3h2V5h18v14h-7v2h7c1.1,0 2,-0.9 2,-2V5C23,3.9 22.1,3 21,3z"/>
+ <path android:fillColor="#FF0000" android:pathData="M19,7H5v1.63c3.96,1.28 7.09,4.41 8.37,8.37H19V7z"/>
+ </vector>
+</inset>
diff --git a/packages/SystemUI/res/layout/keyguard_bottom_area.xml b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
index d4957c9..adc0b41 100644
--- a/packages/SystemUI/res/layout/keyguard_bottom_area.xml
+++ b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
@@ -83,7 +83,7 @@
android:layout_height="@dimen/keyguard_lock_height"
android:layout_gravity="bottom|center_horizontal"
android:layout_marginBottom="@dimen/keyguard_lock_padding"
- android:src="@*android:drawable/ic_lock_24dp"
+ android:src="@*android:drawable/ic_lock"
android:contentDescription="@string/accessibility_unlock_button"
android:scaleType="center" />
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 121cdd8..33e1974 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -40,6 +40,9 @@
<!-- Whether or not we show the number in the bar. -->
<bool name="config_statusBarShowNumber">false</bool>
+ <!-- If the lock screen should be dismissed after biometric auth. -->
+ <bool name="config_faceAuthDismissesKeyguard">false</bool>
+
<!-- Vibrator pattern for camera gesture launch. -->
<integer-array translatable="false" name="config_cameraLaunchGestureVibePattern">
<item>0</item>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 4457440..f54f716 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -677,9 +677,9 @@
<dimen name="keyguard_affordance_width">56dp</dimen>
<!-- The width/height of the unlock icon view on keyguard. -->
- <dimen name="keyguard_lock_height">32dp</dimen>
- <dimen name="keyguard_lock_width">32dp</dimen>
- <dimen name="keyguard_lock_padding">24dp</dimen>
+ <dimen name="keyguard_lock_height">42dp</dimen>
+ <dimen name="keyguard_lock_width">42dp</dimen>
+ <dimen name="keyguard_lock_padding">19dp</dimen>
<dimen name="keyguard_indication_margin_bottom">65dp</dimen>
diff --git a/packages/SystemUI/src/com/android/keyguard/clock/TypeClockController.java b/packages/SystemUI/src/com/android/keyguard/clock/TypeClockController.java
index 69f86c7..387f265 100644
--- a/packages/SystemUI/src/com/android/keyguard/clock/TypeClockController.java
+++ b/packages/SystemUI/src/com/android/keyguard/clock/TypeClockController.java
@@ -51,7 +51,7 @@
/**
* Small clock shown on lock screen above stack scroller.
*/
- private View mLockClockContainer;
+ private TypographicClock mLockClock;
/**
* Controller for transition into dark state.
@@ -69,13 +69,15 @@
}
private void createViews() {
- mView = mLayoutInflater.inflate(R.layout.type_clock, null);
+ mView = mLayoutInflater.inflate(R.layout.type_aod_clock, null);
mTypeClock = mView.findViewById(R.id.type_clock);
// For now, this view is used to hide the default digital clock.
// Need better transition to lock screen.
- mLockClockContainer = mLayoutInflater.inflate(R.layout.digital_clock, null);
- mLockClockContainer.setVisibility(View.GONE);
+ mLockClock = (TypographicClock) mLayoutInflater.inflate(R.layout.typographic_clock, null);
+ mLockClock.setVisibility(View.GONE);
+
+ mDarkController = new CrossFadeDarkController(mView, mLockClock);
}
@Override
@@ -95,10 +97,10 @@
@Override
public View getView() {
- if (mLockClockContainer == null) {
+ if (mLockClock == null) {
createViews();
}
- return mLockClockContainer;
+ return mLockClock;
}
@Override
@@ -115,6 +117,7 @@
@Override
public void setTextColor(int color) {
mTypeClock.setTextColor(color);
+ mLockClock.setTextColor(color);
}
@Override
@@ -122,21 +125,28 @@
if (colorPalette == null || colorPalette.length == 0) {
return;
}
- final int length = colorPalette.length;
- mTypeClock.setClockColor(colorPalette[Math.max(0, length - 5)]);
+ final int color = colorPalette[Math.max(0, colorPalette.length - 5)];
+ mTypeClock.setClockColor(color);
+ mLockClock.setClockColor(color);
}
@Override
public void onTimeTick() {
mTypeClock.onTimeChanged();
+ mLockClock.onTimeChanged();
}
@Override
- public void setDarkAmount(float darkAmount) {}
+ public void setDarkAmount(float darkAmount) {
+ if (mDarkController != null) {
+ mDarkController.setDarkAmount(darkAmount);
+ }
+ }
@Override
public void onTimeZoneChanged(TimeZone timeZone) {
mTypeClock.onTimeZoneChanged(timeZone);
+ mLockClock.onTimeZoneChanged(timeZone);
}
@Override
diff --git a/packages/SystemUI/src/com/android/keyguard/clock/TypographicClock.java b/packages/SystemUI/src/com/android/keyguard/clock/TypographicClock.java
index 7bce3c5..572ab30 100644
--- a/packages/SystemUI/src/com/android/keyguard/clock/TypographicClock.java
+++ b/packages/SystemUI/src/com/android/keyguard/clock/TypographicClock.java
@@ -119,4 +119,12 @@
mTime.setTimeZone(mTimeZone != null ? mTimeZone : TimeZone.getDefault());
onTimeChanged();
}
+
+ /**
+ * Overriding hasOverlappingRendering as false to improve performance of crossfading.
+ */
+ @Override
+ public boolean hasOverlappingRendering() {
+ return false;
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
index 03e453f..51b2098 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
@@ -24,7 +24,6 @@
import static com.android.systemui.statusbar.notification.NotificationAlertingManager.alertAgain;
import android.annotation.Nullable;
-import android.app.ActivityManager;
import android.app.ActivityManager.RunningTaskInfo;
import android.app.ActivityTaskManager;
import android.app.IActivityTaskManager;
@@ -60,8 +59,6 @@
import com.android.systemui.statusbar.notification.row.NotificationContentInflater.InflationFlag;
import com.android.systemui.statusbar.phone.StatusBarWindowController;
-import java.util.List;
-
import javax.inject.Inject;
import javax.inject.Singleton;
@@ -491,24 +488,6 @@
@MainThread
private class BubbleTaskStackListener extends TaskStackChangeListener {
- @Nullable
- private ActivityManager.StackInfo findStackInfo(int taskId) throws RemoteException {
- final List<ActivityManager.StackInfo> stackInfoList =
- mActivityTaskManager.getAllStackInfos();
- // Iterate through stacks from top to bottom.
- final int stackCount = stackInfoList.size();
- for (int stackIndex = 0; stackIndex < stackCount; stackIndex++) {
- final ActivityManager.StackInfo stackInfo = stackInfoList.get(stackIndex);
- // Iterate through tasks from top to bottom.
- for (int taskIndex = stackInfo.taskIds.length - 1; taskIndex >= 0; taskIndex--) {
- if (stackInfo.taskIds[taskIndex] == taskId) {
- return stackInfo;
- }
- }
- }
- return null;
- }
-
@Override
public void onTaskMovedToFront(RunningTaskInfo taskInfo) {
if (mStackView != null && taskInfo.displayId == Display.DEFAULT_DISPLAY) {
@@ -516,15 +495,8 @@
}
}
- /**
- * This is a workaround for the case when the activity had to be created in a new task.
- * Existing code in ActivityStackSupervisor checks the display where the activity
- * ultimately ended up, displays an error message toast, and calls this method instead of
- * onTaskMovedToFront.
- */
@Override
- public void onActivityLaunchOnSecondaryDisplayFailed(RunningTaskInfo taskInfo) {
- // TODO(b/124058588): move to ActivityView.StateCallback, filter on virtualDisplay ID
+ public void onActivityLaunchOnSecondaryDisplayRerouted() {
if (mStackView != null) {
mStackView.collapseStack();
}
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java b/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java
index 9bca2cc..9f0f53e 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java
@@ -135,7 +135,7 @@
mDialog = new AlertDialog.Builder(this)
.setTitle(dialogTitle)
- .setIcon(aInfo.loadIcon(packageManager))
+ .setIcon(R.drawable.ic_media_projection_permission)
.setMessage(message)
.setPositiveButton(R.string.media_projection_action_text, this)
.setNegativeButton(android.R.string.cancel, this)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
index 2162ea7..410eeae 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
@@ -22,17 +22,21 @@
import android.os.PowerManager;
import android.os.SystemClock;
import android.os.Trace;
+import android.provider.Settings;
import android.util.Log;
+import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.LatencyTracker;
import com.android.keyguard.KeyguardConstants;
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.keyguard.KeyguardUpdateMonitorCallback;
import com.android.systemui.Dependency;
+import com.android.systemui.R;
import com.android.systemui.keyguard.KeyguardViewMediator;
import com.android.systemui.keyguard.ScreenLifecycle;
import com.android.systemui.keyguard.WakefulnessLifecycle;
import com.android.systemui.statusbar.NotificationMediaManager;
+import com.android.systemui.tuner.TunerService;
import java.io.PrintWriter;
@@ -95,6 +99,17 @@
*/
private static final float BIOMETRIC_COLLAPSE_SPEEDUP_FACTOR = 1.1f;
+ /**
+ * If face unlock dismisses the lock screen or keeps user on keyguard by default on this device.
+ */
+ private final boolean mFaceDismissesKeyguardByDefault;
+
+ /**
+ * If face unlock dismisses the lock screen or keeps user on keyguard for the current user.
+ */
+ @VisibleForTesting
+ protected boolean mFaceDismissesKeyguard;
+
private final NotificationMediaManager mMediaManager;
private final PowerManager mPowerManager;
private final Handler mHandler;
@@ -115,14 +130,42 @@
private boolean mPendingShowBouncer;
private boolean mHasScreenTurnedOnSinceAuthenticating;
+ private final TunerService.Tunable mFaceDismissedKeyguardTunable = new TunerService.Tunable() {
+ @Override
+ public void onTuningChanged(String key, String newValue) {
+ int defaultValue = mFaceDismissesKeyguardByDefault ? 1 : 0;
+ mFaceDismissesKeyguard = Settings.Secure.getIntForUser(mContext.getContentResolver(),
+ Settings.Secure.FACE_UNLOCK_DISMISSES_KEYGUARD,
+ defaultValue, KeyguardUpdateMonitor.getCurrentUser()) != 0;
+ }
+ };
+
public BiometricUnlockController(Context context,
+ DozeScrimController dozeScrimController,
+ KeyguardViewMediator keyguardViewMediator,
+ ScrimController scrimController,
+ StatusBar statusBar,
+ UnlockMethodCache unlockMethodCache, Handler handler,
+ KeyguardUpdateMonitor keyguardUpdateMonitor,
+ TunerService tunerService) {
+ this(context, dozeScrimController, keyguardViewMediator, scrimController, statusBar,
+ unlockMethodCache, handler, keyguardUpdateMonitor, tunerService,
+ context.getResources()
+ .getInteger(com.android.internal.R.integer.config_wakeUpDelayDoze),
+ context.getResources().getBoolean(R.bool.config_faceAuthDismissesKeyguard));
+ }
+
+ @VisibleForTesting
+ protected BiometricUnlockController(Context context,
DozeScrimController dozeScrimController,
KeyguardViewMediator keyguardViewMediator,
ScrimController scrimController,
StatusBar statusBar,
UnlockMethodCache unlockMethodCache, Handler handler,
KeyguardUpdateMonitor keyguardUpdateMonitor,
- int wakeUpDelay) {
+ TunerService tunerService,
+ int wakeUpDelay,
+ boolean faceDismissesKeyguard) {
mContext = context;
mPowerManager = context.getSystemService(PowerManager.class);
mUpdateMonitor = keyguardUpdateMonitor;
@@ -138,6 +181,9 @@
mUnlockMethodCache = unlockMethodCache;
mHandler = handler;
mWakeUpDelay = wakeUpDelay;
+ mFaceDismissesKeyguardByDefault = faceDismissesKeyguard;
+ tunerService.addTunable(mFaceDismissedKeyguardTunable,
+ Settings.Secure.FACE_UNLOCK_DISMISSES_KEYGUARD);
}
public void setStatusBarKeyguardViewManager(
@@ -344,27 +390,28 @@
private int calculateMode(BiometricSourceType biometricSourceType) {
boolean unlockingAllowed = mUpdateMonitor.isUnlockingWithBiometricAllowed();
boolean deviceDreaming = mUpdateMonitor.isDreaming();
- boolean isFace = biometricSourceType == BiometricSourceType.FACE;
+ boolean faceStayingOnKeyguard = biometricSourceType == BiometricSourceType.FACE
+ && !mFaceDismissesKeyguard;
if (!mUpdateMonitor.isDeviceInteractive()) {
if (!mStatusBarKeyguardViewManager.isShowing()) {
return MODE_ONLY_WAKE;
} else if (mDozeScrimController.isPulsing() && unlockingAllowed) {
- return isFace ? MODE_NONE : MODE_WAKE_AND_UNLOCK_PULSING;
+ return faceStayingOnKeyguard ? MODE_NONE : MODE_WAKE_AND_UNLOCK_PULSING;
} else if (unlockingAllowed || !mUnlockMethodCache.isMethodSecure()) {
return MODE_WAKE_AND_UNLOCK;
} else {
return MODE_SHOW_BOUNCER;
}
}
- if (unlockingAllowed && deviceDreaming && !isFace) {
+ if (unlockingAllowed && deviceDreaming && !faceStayingOnKeyguard) {
return MODE_WAKE_AND_UNLOCK_FROM_DREAM;
}
if (mStatusBarKeyguardViewManager.isShowing()) {
if (mStatusBarKeyguardViewManager.isBouncerShowing() && unlockingAllowed) {
return MODE_DISMISS_BOUNCER;
} else if (unlockingAllowed) {
- return isFace ? MODE_ONLY_WAKE : MODE_UNLOCK;
+ return faceStayingOnKeyguard ? MODE_ONLY_WAKE : MODE_UNLOCK;
} else if (!mStatusBarKeyguardViewManager.isBouncerShowing()) {
return MODE_SHOW_BOUNCER;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java
index 64e76d3..b7d1fc6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java
@@ -203,10 +203,10 @@
case STATE_SCANNING_FACE:
// Error animation also starts and ands on the padlock.
case STATE_BIOMETRICS_ERROR:
- iconRes = com.android.internal.R.drawable.ic_lock_24dp;
+ iconRes = com.android.internal.R.drawable.ic_lock;
break;
case STATE_LOCK_OPEN:
- iconRes = com.android.internal.R.drawable.ic_lock_open_24dp;
+ iconRes = com.android.internal.R.drawable.ic_lock_open;
break;
default:
throw new IllegalArgumentException();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
index bbeebd6..ccf5e4e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
@@ -54,6 +54,8 @@
} else {
mAnimationDuration = ScrimController.ANIMATION_DURATION;
}
+ mCurrentInFrontTint = Color.BLACK;
+ mCurrentBehindTint = Color.BLACK;
mCurrentBehindAlpha = mScrimBehindAlphaKeyguard;
mCurrentInFrontAlpha = 0;
}
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 0ca4e73..1832265 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -225,6 +225,7 @@
import com.android.systemui.statusbar.policy.UserInfoControllerImpl;
import com.android.systemui.statusbar.policy.UserSwitcherController;
import com.android.systemui.statusbar.policy.ZenModeController;
+import com.android.systemui.tuner.TunerService;
import com.android.systemui.util.InjectionInflationController;
import com.android.systemui.volume.VolumeComponent;
@@ -1208,8 +1209,7 @@
mBiometricUnlockController = new BiometricUnlockController(mContext,
mDozeScrimController, keyguardViewMediator,
mScrimController, this, UnlockMethodCache.getInstance(mContext),
- new Handler(), mKeyguardUpdateMonitor, mContext.getResources().getInteger(
- com.android.internal.R.integer.config_wakeUpDelayDoze));
+ new Handler(), mKeyguardUpdateMonitor, Dependency.get(TunerService.class));
mStatusBarKeyguardViewManager = keyguardViewMediator.registerStatusBar(this,
getBouncerContainer(), mNotificationPanel, mBiometricUnlockController);
mKeyguardIndicationController
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java
index 7be4756..057f752 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java
@@ -36,6 +36,7 @@
import com.android.systemui.SysuiTestCase;
import com.android.systemui.keyguard.KeyguardViewMediator;
import com.android.systemui.statusbar.NotificationMediaManager;
+import com.android.systemui.tuner.TunerService;
import org.junit.Before;
import org.junit.Test;
@@ -68,6 +69,8 @@
private StatusBar mStatusBar;
@Mock
private UnlockMethodCache mUnlockMethodCache;
+ @Mock
+ private TunerService mTunerService;
private BiometricUnlockController mBiometricUnlockController;
@Before
@@ -79,9 +82,8 @@
mDependency.injectTestDependency(NotificationMediaManager.class, mMediaManager);
mDependency.injectTestDependency(StatusBarWindowController.class,
mStatusBarWindowController);
- mBiometricUnlockController = new BiometricUnlockController(mContext, mDozeScrimController,
- mKeyguardViewMediator, mScrimController, mStatusBar, mUnlockMethodCache,
- new Handler(), mUpdateMonitor, 0 /* wakeUpDelay */);
+ mBiometricUnlockController = new TestableBiometricUnlockController(
+ false /* faceDismissesKeyguard */);
mBiometricUnlockController.setStatusBarKeyguardViewManager(mStatusBarKeyguardViewManager);
}
@@ -136,6 +138,19 @@
}
@Test
+ public void onBiometricAuthenticated_whenFace_dismissingKeyguard() {
+ mBiometricUnlockController = new TestableBiometricUnlockController(
+ true /* faceDismissesKeyguard */);
+ mBiometricUnlockController.setStatusBarKeyguardViewManager(mStatusBarKeyguardViewManager);
+
+ when(mUpdateMonitor.isUnlockingWithBiometricAllowed()).thenReturn(true);
+ mBiometricUnlockController.onBiometricAuthenticated(UserHandle.USER_CURRENT,
+ BiometricSourceType.FACE);
+
+ verify(mStatusBarKeyguardViewManager).animateCollapsePanels(anyFloat());
+ }
+
+ @Test
public void onBiometricAuthenticated_whenFaceOnBouncer_dismissBouncer() {
when(mUpdateMonitor.isUnlockingWithBiometricAllowed()).thenReturn(true);
when(mStatusBarKeyguardViewManager.isBouncerShowing()).thenReturn(true);
@@ -156,4 +171,15 @@
verify(mStatusBarKeyguardViewManager, never()).animateCollapsePanels(anyFloat());
}
+
+ private class TestableBiometricUnlockController extends BiometricUnlockController {
+
+ TestableBiometricUnlockController(boolean faceDismissesKeyguard) {
+ super(mContext, mDozeScrimController,
+ mKeyguardViewMediator, mScrimController, mStatusBar, mUnlockMethodCache,
+ new Handler(), mUpdateMonitor, mTunerService, 0 /* wakeUpDelay */,
+ faceDismissesKeyguard);
+ mFaceDismissesKeyguard = faceDismissesKeyguard;
+ }
+ }
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java
index 6db3624..7e5c3db 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java
@@ -51,6 +51,7 @@
import com.android.systemui.util.wakelock.WakeLock;
import com.android.systemui.utils.os.FakeHandler;
+import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
@@ -99,12 +100,13 @@
visible -> mScrimVisibility = visible, mDozeParamenters, mAlarmManager);
mScrimController.setHasBackdrop(false);
mScrimController.setWallpaperSupportsAmbientMode(false);
+ mScrimController.transitionTo(ScrimState.KEYGUARD);
+ mScrimController.finishAnimationsImmediately();
}
- @Test
- public void initialState() {
- Assert.assertEquals("ScrimController should start initialized",
- mScrimController.getState(), ScrimState.UNINITIALIZED);
+ @After
+ public void tearDown() {
+ mScrimController.finishAnimationsImmediately();
}
@Test
@@ -114,7 +116,7 @@
// Front scrim should be transparent
// Back scrim should be visible without tint
assertScrimVisibility(VISIBILITY_FULLY_TRANSPARENT, VISIBILITY_SEMI_TRANSPARENT);
- assertScrimTint(mScrimBehind, false /* tinted */);
+ assertScrimTint(mScrimBehind, true /* tinted */);
}
@Test
@@ -307,13 +309,13 @@
reset(mScrimBehind);
mScrimController.setPanelExpansion(0f);
mScrimController.setPanelExpansion(1.0f);
- mScrimController.onPreDraw();
+ mScrimController.finishAnimationsImmediately();
Assert.assertEquals("Scrim alpha should change after setPanelExpansion",
mScrimBehindAlpha, mScrimBehind.getViewAlpha(), 0.01f);
mScrimController.setPanelExpansion(0f);
- mScrimController.onPreDraw();
+ mScrimController.finishAnimationsImmediately();
Assert.assertEquals("Scrim alpha should change after setPanelExpansion",
mScrimBehindAlpha, mScrimBehind.getViewAlpha(), 0.01f);
@@ -336,6 +338,7 @@
mScrimController.setExpansionAffectsAlpha(true);
mScrimController.setPanelExpansion(0.1f);
+ mScrimController.finishAnimationsImmediately();
Assert.assertNotEquals("Scrim opacity should change when setExpansionAffectsAlpha "
+ "is true", scrimAlpha, mScrimBehind.getViewAlpha(), 0.01f);
}
diff --git a/proto/src/metrics_constants/metrics_constants.proto b/proto/src/metrics_constants/metrics_constants.proto
index 91b161d..9673a84 100644
--- a/proto/src/metrics_constants/metrics_constants.proto
+++ b/proto/src/metrics_constants/metrics_constants.proto
@@ -7087,6 +7087,9 @@
//ACTION: Log result for each card's eligibility check
ACTION_CONTEXTUAL_CARD_ELIGIBILITY = 1686;
+ // Panel for Wifi
+ PANEL_WIFI = 1687;
+
// ---- End Q Constants, all Q constants go above this line ----
// Add new aosp constants above this line.
// END OF AOSP CONSTANTS
diff --git a/services/appprediction/java/com/android/server/appprediction/RemoteAppPredictionService.java b/services/appprediction/java/com/android/server/appprediction/RemoteAppPredictionService.java
index 45ea86f..922b327 100644
--- a/services/appprediction/java/com/android/server/appprediction/RemoteAppPredictionService.java
+++ b/services/appprediction/java/com/android/server/appprediction/RemoteAppPredictionService.java
@@ -46,7 +46,8 @@
ComponentName componentName, int userId,
RemoteAppPredictionServiceCallbacks callback, boolean bindInstantServiceAllowed,
boolean verbose) {
- super(context, serviceInterface, componentName, userId, callback, bindInstantServiceAllowed,
+ super(context, serviceInterface, componentName, userId, callback,
+ context.getMainThreadHandler(), bindInstantServiceAllowed,
verbose, /* initialCapacity= */ 1);
}
diff --git a/services/autofill/java/com/android/server/autofill/RemoteAugmentedAutofillService.java b/services/autofill/java/com/android/server/autofill/RemoteAugmentedAutofillService.java
index a38c3cf..aaba1ed 100644
--- a/services/autofill/java/com/android/server/autofill/RemoteAugmentedAutofillService.java
+++ b/services/autofill/java/com/android/server/autofill/RemoteAugmentedAutofillService.java
@@ -55,7 +55,7 @@
boolean bindInstantServiceAllowed, boolean verbose, int idleUnbindTimeoutMs,
int requestTimeoutMs) {
super(context, AugmentedAutofillService.SERVICE_INTERFACE, serviceName, userId, callbacks,
- bindInstantServiceAllowed, verbose);
+ context.getMainThreadHandler(), bindInstantServiceAllowed, verbose);
mIdleUnbindTimeoutMs = idleUnbindTimeoutMs;
mRequestTimeoutMs = requestTimeoutMs;
diff --git a/services/autofill/java/com/android/server/autofill/RemoteFillService.java b/services/autofill/java/com/android/server/autofill/RemoteFillService.java
index e8a52b4..b8a7d44 100644
--- a/services/autofill/java/com/android/server/autofill/RemoteFillService.java
+++ b/services/autofill/java/com/android/server/autofill/RemoteFillService.java
@@ -64,7 +64,7 @@
RemoteFillService(Context context, ComponentName componentName, int userId,
FillServiceCallbacks callbacks, boolean bindInstantServiceAllowed) {
super(context, AutofillService.SERVICE_INTERFACE, componentName, userId, callbacks,
- bindInstantServiceAllowed, sVerbose);
+ context.getMainThreadHandler(), bindInstantServiceAllowed, sVerbose);
mCallbacks = callbacks;
}
diff --git a/services/contentcapture/java/com/android/server/contentcapture/RemoteContentCaptureService.java b/services/contentcapture/java/com/android/server/contentcapture/RemoteContentCaptureService.java
index f7ac7b8c..1d2d625 100644
--- a/services/contentcapture/java/com/android/server/contentcapture/RemoteContentCaptureService.java
+++ b/services/contentcapture/java/com/android/server/contentcapture/RemoteContentCaptureService.java
@@ -46,7 +46,8 @@
ContentCaptureServiceCallbacks callbacks, boolean bindInstantServiceAllowed,
boolean verbose, int idleUnbindTimeoutMs) {
super(context, serviceInterface, serviceComponentName, userId, callbacks,
- bindInstantServiceAllowed, verbose, /* initialCapacity= */ 2);
+ context.getMainThreadHandler(), bindInstantServiceAllowed, verbose,
+ /* initialCapacity= */ 2);
mServerCallback = callback.asBinder();
mIdleUnbindTimeoutMs = idleUnbindTimeoutMs;
diff --git a/services/contentsuggestions/java/com/android/server/contentsuggestions/ContentSuggestionsManagerServiceShellCommand.java b/services/contentsuggestions/java/com/android/server/contentsuggestions/ContentSuggestionsManagerServiceShellCommand.java
index e34f1ea..08cc69d 100644
--- a/services/contentsuggestions/java/com/android/server/contentsuggestions/ContentSuggestionsManagerServiceShellCommand.java
+++ b/services/contentsuggestions/java/com/android/server/contentsuggestions/ContentSuggestionsManagerServiceShellCommand.java
@@ -43,29 +43,13 @@
}
final PrintWriter pw = getOutPrintWriter();
switch (cmd) {
- case "set": {
- final String what = getNextArgRequired();
- switch (what) {
- case "temporary-service": {
- final int userId = Integer.parseInt(getNextArgRequired());
- String serviceName = getNextArg();
- if (serviceName == null) {
- mService.resetTemporaryService(userId);
- return 0;
- }
- final int duration = Integer.parseInt(getNextArgRequired());
- mService.setTemporaryService(userId, serviceName, duration);
- pw.println("ContentSuggestionsService temporarily set to " + serviceName
- + " for " + duration + "ms");
- break;
- }
- }
- }
- break;
+ case "set":
+ return requestSet(pw);
+ case "get":
+ return requestGet(pw);
default:
return handleDefaultCommands(cmd);
}
- return 0;
}
@Override
@@ -76,9 +60,72 @@
pw.println(" Prints this help text.");
pw.println("");
pw.println(" set temporary-service USER_ID [COMPONENT_NAME DURATION]");
- pw.println(" Temporarily (for DURATION ms) changes the service implemtation.");
+ pw.println(" Temporarily (for DURATION ms) changes the service implementation.");
pw.println(" To reset, call with just the USER_ID argument.");
pw.println("");
+ pw.println(" set default-service-enabled USER_ID [true|false]");
+ pw.println(" Enable / disable the default service for the user.");
+ pw.println("");
+ pw.println(" get default-service-enabled USER_ID");
+ pw.println(" Checks whether the default service is enabled for the user.");
+ pw.println("");
}
}
+
+ private int requestSet(PrintWriter pw) {
+ final String what = getNextArgRequired();
+
+ switch(what) {
+ case "temporary-service":
+ return setTemporaryService(pw);
+ case "default-service-enabled":
+ return setDefaultServiceEnabled();
+ default:
+ pw.println("Invalid set: " + what);
+ return -1;
+ }
+ }
+
+ private int requestGet(PrintWriter pw) {
+ final String what = getNextArgRequired();
+ switch(what) {
+ case "default-service-enabled":
+ return getDefaultServiceEnabled(pw);
+ default:
+ pw.println("Invalid get: " + what);
+ return -1;
+ }
+ }
+
+ private int setTemporaryService(PrintWriter pw) {
+ final int userId = Integer.parseInt(getNextArgRequired());
+ String serviceName = getNextArg();
+ if (serviceName == null) {
+ mService.resetTemporaryService(userId);
+ return 0;
+ }
+ final int duration = Integer.parseInt(getNextArgRequired());
+ mService.setTemporaryService(userId, serviceName, duration);
+ pw.println("ContentSuggestionsService temporarily set to " + serviceName
+ + " for " + duration + "ms");
+ return 0;
+ }
+
+ private int setDefaultServiceEnabled() {
+ final int userId = getNextIntArgRequired();
+ final boolean enabled = Boolean.parseBoolean(getNextArg());
+ mService.setDefaultServiceEnabled(userId, enabled);
+ return 0;
+ }
+
+ private int getDefaultServiceEnabled(PrintWriter pw) {
+ final int userId = getNextIntArgRequired();
+ final boolean enabled = mService.isDefaultServiceEnabled(userId);
+ pw.println(enabled);
+ return 0;
+ }
+
+ private int getNextIntArgRequired() {
+ return Integer.parseInt(getNextArgRequired());
+ }
}
diff --git a/services/contentsuggestions/java/com/android/server/contentsuggestions/RemoteContentSuggestionsService.java b/services/contentsuggestions/java/com/android/server/contentsuggestions/RemoteContentSuggestionsService.java
index bf48d76..442972a 100644
--- a/services/contentsuggestions/java/com/android/server/contentsuggestions/RemoteContentSuggestionsService.java
+++ b/services/contentsuggestions/java/com/android/server/contentsuggestions/RemoteContentSuggestionsService.java
@@ -47,7 +47,8 @@
int userId, Callbacks callbacks,
boolean bindInstantServiceAllowed, boolean verbose) {
super(context, ContentSuggestionsService.SERVICE_INTERFACE, serviceName, userId, callbacks,
- bindInstantServiceAllowed, verbose, /* initialCapacity= */ 1);
+ context.getMainThreadHandler(), bindInstantServiceAllowed, verbose,
+ /* initialCapacity= */ 1);
}
@Override
diff --git a/services/core/java/com/android/server/display/color/ColorDisplayService.java b/services/core/java/com/android/server/display/color/ColorDisplayService.java
index b1e5510..2311776 100644
--- a/services/core/java/com/android/server/display/color/ColorDisplayService.java
+++ b/services/core/java/com/android/server/display/color/ColorDisplayService.java
@@ -1276,11 +1276,17 @@
}
boolean isActivatedSetting() {
+ if (mCurrentUser == UserHandle.USER_NULL) {
+ return false;
+ }
return Secure.getIntForUser(getContext().getContentResolver(),
Secure.NIGHT_DISPLAY_ACTIVATED, 0, mCurrentUser) == 1;
}
int getColorTemperatureSetting() {
+ if (mCurrentUser == UserHandle.USER_NULL) {
+ return NOT_SET;
+ }
return clampNightDisplayColorTemperature(Secure.getIntForUser(
getContext().getContentResolver(), Secure.NIGHT_DISPLAY_COLOR_TEMPERATURE,
NOT_SET,
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
index 3052330..2c361e1 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
@@ -949,7 +949,11 @@
}
}
- class ImmsBroadcastReceiver extends BroadcastReceiver {
+ /**
+ * {@link BroadcastReceiver} that is intended to listen to broadcasts sent to the system user
+ * only.
+ */
+ private final class ImmsBroadcastReceiverForSystemUser extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
final String action = intent.getAction();
@@ -977,6 +981,35 @@
}
/**
+ * {@link BroadcastReceiver} that is intended to listen to broadcasts sent to all the users.
+ */
+ private final class ImmsBroadcastReceiverForAllUsers extends BroadcastReceiver {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ final String action = intent.getAction();
+ if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)) {
+ final PendingResult pendingResult = getPendingResult();
+ if (pendingResult == null) {
+ return;
+ }
+ // sender userId can be a real user ID or USER_ALL.
+ final int senderUserId = pendingResult.getSendingUserId();
+ if (senderUserId != UserHandle.USER_ALL) {
+ final int resolvedUserId = PER_PROFILE_IME_ENABLED
+ ? senderUserId : mUserManagerInternal.getProfileParentId(senderUserId);
+ if (resolvedUserId != mSettings.getCurrentUserId()) {
+ // A background user is trying to hide the dialog. Ignore.
+ return;
+ }
+ }
+ hideInputMethodMenu();
+ } else {
+ Slog.w(TAG, "Unexpected intent " + intent);
+ }
+ }
+ }
+
+ /**
* Handles {@link Intent#ACTION_LOCALE_CHANGED}.
*
* <p>Note: For historical reasons, {@link Intent#ACTION_LOCALE_CHANGED} has been sent to all
@@ -1544,36 +1577,18 @@
mMyPackageMonitor.register(mContext, null, UserHandle.ALL, true);
mSettingsObserver.registerContentObserverLocked(currentUserId);
- final IntentFilter broadcastFilter = new IntentFilter();
- broadcastFilter.addAction(Intent.ACTION_USER_ADDED);
- broadcastFilter.addAction(Intent.ACTION_USER_REMOVED);
- broadcastFilter.addAction(Intent.ACTION_LOCALE_CHANGED);
- broadcastFilter.addAction(ACTION_SHOW_INPUT_METHOD_PICKER);
- mContext.registerReceiver(new ImmsBroadcastReceiver(), broadcastFilter);
- mContext.registerReceiverAsUser(
- new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- // Intent is guaranteed to be ACTION_CLOSE_SYSTEM_DIALOGS here.
- final PendingResult pendingResult = getPendingResult();
- if (pendingResult == null) {
- return;
- }
- // sender userId can be a real user ID or USER_ALL.
- final int senderUserId = pendingResult.getSendingUserId();
- if (senderUserId != UserHandle.USER_ALL) {
- final int resolvedUserId = PER_PROFILE_IME_ENABLED
- ? senderUserId
- : mUserManagerInternal.getProfileParentId(senderUserId);
- if (resolvedUserId != mSettings.getCurrentUserId()) {
- // A background user is trying to hide the dialog. Ignore.
- return;
- }
- }
- hideInputMethodMenu();
- }
- }, UserHandle.ALL, new IntentFilter(Intent.ACTION_CLOSE_SYSTEM_DIALOGS),
- null, null);
+ final IntentFilter broadcastFilterForSystemUser = new IntentFilter();
+ broadcastFilterForSystemUser.addAction(Intent.ACTION_USER_ADDED);
+ broadcastFilterForSystemUser.addAction(Intent.ACTION_USER_REMOVED);
+ broadcastFilterForSystemUser.addAction(Intent.ACTION_LOCALE_CHANGED);
+ broadcastFilterForSystemUser.addAction(ACTION_SHOW_INPUT_METHOD_PICKER);
+ mContext.registerReceiver(new ImmsBroadcastReceiverForSystemUser(),
+ broadcastFilterForSystemUser);
+
+ final IntentFilter broadcastFilterForAllUsers = new IntentFilter();
+ broadcastFilterForAllUsers.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
+ mContext.registerReceiverAsUser(new ImmsBroadcastReceiverForAllUsers(),
+ UserHandle.ALL, broadcastFilterForAllUsers, null, null);
final String defaultImiId = mSettings.getSelectedInputMethod();
final boolean imeSelectedOnBoot = !TextUtils.isEmpty(defaultImiId);
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 251b34bc..4dcab5e 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -14702,6 +14702,9 @@
DeviceConfig.Rollback.NAMESPACE,
DeviceConfig.Rollback.ENABLE_ROLLBACK_TIMEOUT,
DEFAULT_ENABLE_ROLLBACK_TIMEOUT);
+ if (rollbackTimeout < 0) {
+ rollbackTimeout = DEFAULT_ENABLE_ROLLBACK_TIMEOUT;
+ }
final Message msg = mHandler.obtainMessage(
ENABLE_ROLLBACK_TIMEOUT);
msg.arg1 = enableRollbackToken;
diff --git a/services/core/java/com/android/server/role/RemoteRoleControllerService.java b/services/core/java/com/android/server/role/RemoteRoleControllerService.java
deleted file mode 100644
index 4fb40db..0000000
--- a/services/core/java/com/android/server/role/RemoteRoleControllerService.java
+++ /dev/null
@@ -1,336 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.role;
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.UserIdInt;
-import android.annotation.WorkerThread;
-import android.app.role.IRoleManagerCallback;
-import android.app.role.RoleManager;
-import android.app.role.RoleManagerCallback;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.ServiceConnection;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.os.UserHandle;
-import android.rolecontrollerservice.IRoleControllerService;
-import android.rolecontrollerservice.RoleControllerService;
-import android.util.Log;
-import android.util.Slog;
-
-import com.android.internal.util.function.pooled.PooledLambda;
-import com.android.server.FgThread;
-
-import java.util.ArrayDeque;
-import java.util.Arrays;
-import java.util.Queue;
-
-/**
- * Handles connection with {@link RoleControllerService}.
- */
-public class RemoteRoleControllerService {
-
- static final boolean DEBUG = false;
- private static final String LOG_TAG = RemoteRoleControllerService.class.getSimpleName();
-
- @NonNull
- private final Connection mConnection;
-
- public RemoteRoleControllerService(@UserIdInt int userId, @NonNull Context context) {
- mConnection = new Connection(userId, context);
- }
-
- /**
- * Add a specific application to the holders of a role. If the role is exclusive, the previous
- * holder will be replaced.
- *
- * @see RoleControllerService#onAddRoleHolder(String, String, int, RoleManagerCallback)
- */
- public void onAddRoleHolder(@NonNull String roleName, @NonNull String packageName,
- @RoleManager.ManageHoldersFlags int flags, @NonNull IRoleManagerCallback callback) {
- mConnection.enqueueCall(new Connection.Call((service, callbackDelegate) ->
- service.onAddRoleHolder(roleName, packageName, flags, callbackDelegate), callback));
- }
-
- /**
- * Remove a specific application from the holders of a role.
- *
- * @see RoleControllerService#onRemoveRoleHolder(String, String, int, RoleManagerCallback)
- */
- public void onRemoveRoleHolder(@NonNull String roleName, @NonNull String packageName,
- @RoleManager.ManageHoldersFlags int flags, @NonNull IRoleManagerCallback callback) {
- mConnection.enqueueCall(new Connection.Call((service, callbackDelegate) ->
- service.onRemoveRoleHolder(roleName, packageName, flags, callbackDelegate),
- callback));
- }
-
- /**
- * Remove all holders of a role.
- *
- * @see RoleControllerService#onClearRoleHolders(String, int, RoleManagerCallback)
- */
- public void onClearRoleHolders(@NonNull String roleName,
- @RoleManager.ManageHoldersFlags int flags, @NonNull IRoleManagerCallback callback) {
- mConnection.enqueueCall(new Connection.Call((service, callbackDelegate) ->
- service.onClearRoleHolders(roleName, flags, callbackDelegate), callback));
- }
-
- /**
- * Performs granting of default roles and permissions and appops
- *
- * @see RoleControllerService#onGrantDefaultRoles(RoleManagerCallback)
- */
- public void onGrantDefaultRoles(@NonNull IRoleManagerCallback callback) {
- mConnection.enqueueCall(new Connection.Call(IRoleControllerService::onGrantDefaultRoles,
- callback));
- }
-
- /**
- * @see RoleControllerService#onSmsKillSwitchToggled(boolean)
- */
- public void onSmsKillSwitchToggled(boolean smsRestrictionEnabled) {
- mConnection.enqueueCall(new Connection.Call(
- (s, cb) -> s.onSmsKillSwitchToggled(smsRestrictionEnabled),
- new IRoleManagerCallback.Default() {
- @Override
- public void onFailure() {
- Slog.e(LOG_TAG, "Failed onSmsKillSwitchToggled");
- }
- }));
- }
-
- private static final class Connection implements ServiceConnection {
-
- private static final long UNBIND_DELAY_MILLIS = 15 * 1000;
-
- @UserIdInt
- private final int mUserId;
-
- @NonNull
- private final Context mContext;
-
- @NonNull
- private final Handler mHandler = FgThread.getHandler();
-
- private boolean mBound;
-
- @Nullable
- private IRoleControllerService mService;
-
- @NonNull
- private final Queue<Call> mPendingCalls = new ArrayDeque<>();
-
- @NonNull
- private final Runnable mUnbindRunnable = this::unbind;
-
- Connection(@UserIdInt int userId, @NonNull Context context) {
- mUserId = userId;
- mContext = context;
- }
-
- @Override
- @WorkerThread
- public void onServiceConnected(@NonNull ComponentName name, @NonNull IBinder service) {
- mService = IRoleControllerService.Stub.asInterface(service);
- executePendingCalls();
- }
-
- @WorkerThread
- private void executePendingCalls() {
- while (!mPendingCalls.isEmpty()) {
- Call call = mPendingCalls.poll();
- call.execute(mService);
- }
- scheduleUnbind();
- }
-
- @Override
- @WorkerThread
- public void onServiceDisconnected(@NonNull ComponentName name) {
- mService = null;
- }
-
- @Override
- @WorkerThread
- public void onBindingDied(@NonNull ComponentName name) {
- unbind();
- }
-
- public void enqueueCall(@NonNull Call call) {
- if (DEBUG) {
- Slog.i(LOG_TAG, "Enqueue " + call);
- }
- mHandler.executeOrSendMessage(PooledLambda.obtainMessage(Connection::executeCall, this,
- call));
- }
-
- @WorkerThread
- private void executeCall(@NonNull Call call) {
- ensureBound();
- if (mService == null) {
- if (DEBUG) {
- Slog.i(LOG_TAG, "Delaying until service connected: " + call);
- }
- mPendingCalls.offer(call);
- return;
- }
- call.execute(mService);
- scheduleUnbind();
- }
-
- @WorkerThread
- private void ensureBound() {
- mHandler.removeCallbacks(mUnbindRunnable);
- if (!mBound) {
- Intent intent = new Intent(RoleControllerService.SERVICE_INTERFACE);
- intent.setPackage(mContext.getPackageManager()
- .getPermissionControllerPackageName());
- // Use direct handler to ensure onServiceConnected callback happens in the same
- // call frame, as required by onGrantDefaultRoles
- //
- // Note that as a result, onServiceConnected may happen not on main thread!
- mBound = mContext.bindServiceAsUser(intent, this, Context.BIND_AUTO_CREATE,
- mHandler, UserHandle.of(mUserId));
- }
- }
-
- private void scheduleUnbind() {
- mHandler.removeCallbacks(mUnbindRunnable);
- mHandler.postDelayed(mUnbindRunnable, UNBIND_DELAY_MILLIS);
- }
-
- @WorkerThread
- private void unbind() {
- if (mBound) {
- mService = null;
- mContext.unbindService(this);
- mBound = false;
- }
- }
-
- public static class Call {
-
- private static final int TIMEOUT_MILLIS = 15 * 1000;
-
- @NonNull
- private final CallExecutor mCallExecutor;
-
- @NonNull
- private final IRoleManagerCallback mCallback;
-
- @NonNull
- private final Handler mHandler = FgThread.getHandler();
-
- @NonNull
- private final Runnable mTimeoutRunnable = this::notifyTimeout;
-
- private boolean mCallbackNotified;
-
- @Nullable
- private final String mDebugName;
-
- private Call(@NonNull CallExecutor callExecutor,
- @NonNull IRoleManagerCallback callback) {
- mCallExecutor = callExecutor;
- mCallback = callback;
- mDebugName = DEBUG
- ? Arrays.stream(Thread.currentThread().getStackTrace())
- .filter(s -> s.getClassName().equals(
- RemoteRoleControllerService.class.getName()))
- .findFirst()
- .get()
- .getMethodName()
- : null;
- }
-
- @WorkerThread
- public void execute(IRoleControllerService service) {
- if (DEBUG) {
- Slog.i(LOG_TAG, "Executing " + this);
- }
- try {
- mHandler.postDelayed(mTimeoutRunnable, TIMEOUT_MILLIS);
- mCallExecutor.execute(service, new CallbackDelegate());
- } catch (RemoteException e) {
- Slog.e(LOG_TAG, "Error calling RoleControllerService", e);
- notifyCallback(false);
- }
- }
-
- @WorkerThread
- private void notifyTimeout() {
- Slog.e(LOG_TAG, "Call timed out, calling onFailure()");
- notifyCallback(false);
- }
-
- @WorkerThread
- private void notifyCallback(boolean success) {
- if (DEBUG) {
- Log.i(LOG_TAG, "notifyCallback(" + this
- + ", success = " + success + ")");
- }
- if (mCallbackNotified) {
- return;
- }
- mCallbackNotified = true;
- mHandler.removeCallbacks(mTimeoutRunnable);
- try {
- if (success) {
- mCallback.onSuccess();
- } else {
- mCallback.onFailure();
- }
- } catch (RemoteException e) {
- Slog.e(LOG_TAG, "Error calling " + (success ? "onSuccess()" : "onFailure()")
- + " callback", e);
- }
- }
-
- @Override
- public String toString() {
- return DEBUG ? mDebugName : "Call with callback: " + mCallback;
- }
-
- @FunctionalInterface
- public interface CallExecutor {
-
- @WorkerThread
- void execute(IRoleControllerService service, IRoleManagerCallback callbackDelegate)
- throws RemoteException;
- }
-
- private class CallbackDelegate extends IRoleManagerCallback.Stub {
-
- @Override
- public void onSuccess() throws RemoteException {
- mHandler.sendMessage(PooledLambda.obtainMessage(Call::notifyCallback, Call.this,
- true));
- }
-
- @Override
- public void onFailure() throws RemoteException {
- mHandler.sendMessage(PooledLambda.obtainMessage(Call::notifyCallback, Call.this,
- false));
- }
- }
- }
- }
-}
diff --git a/services/core/java/com/android/server/role/RoleManagerService.java b/services/core/java/com/android/server/role/RoleManagerService.java
index d04a89e..059e6d7 100644
--- a/services/core/java/com/android/server/role/RoleManagerService.java
+++ b/services/core/java/com/android/server/role/RoleManagerService.java
@@ -28,6 +28,7 @@
import android.app.role.IOnRoleHoldersChangedListener;
import android.app.role.IRoleManager;
import android.app.role.IRoleManagerCallback;
+import android.app.role.RoleControllerManager;
import android.app.role.RoleManager;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -97,6 +98,8 @@
private static final String LOG_TAG = RoleManagerService.class.getSimpleName();
+ private static final boolean DEBUG = false;
+
@NonNull
private final UserManagerInternal mUserManagerInternal;
@NonNull
@@ -123,12 +126,11 @@
private final SparseArray<RoleUserState> mUserStates = new SparseArray<>();
/**
- * Maps user id to its controller service.
+ * Maps user id to its controller.
*/
@GuardedBy("mLock")
@NonNull
- private final SparseArray<RemoteRoleControllerService> mControllerServices =
- new SparseArray<>();
+ private final SparseArray<RoleControllerManager> mControllers = new SparseArray<>();
/**
* Maps user id to its list of listeners.
@@ -190,9 +192,9 @@
@Override
public void onReceive(Context context, Intent intent) {
int userId = UserHandle.getUserId(intent.getIntExtra(Intent.EXTRA_UID, -1));
- if (RemoteRoleControllerService.DEBUG) {
- Slog.i(LOG_TAG,
- "Packages changed - re-running initial grants for user " + userId);
+ if (DEBUG) {
+ Slog.i(LOG_TAG, "Packages changed - re-running initial grants for user "
+ + userId);
}
performInitialGrantsIfNecessary(userId);
}
@@ -260,7 +262,7 @@
} catch (InterruptedException | ExecutionException | TimeoutException e) {
Slog.e(LOG_TAG, "Failed to grant defaults for user " + userId, e);
}
- } else if (RemoteRoleControllerService.DEBUG) {
+ } else if (DEBUG) {
Slog.i(LOG_TAG, "Already ran grants for package state " + packagesHash);
}
}
@@ -326,14 +328,22 @@
}
@NonNull
- private RemoteRoleControllerService getOrCreateControllerService(@UserIdInt int userId) {
+ private RoleControllerManager getOrCreateControllerService(@UserIdInt int userId) {
synchronized (mLock) {
- RemoteRoleControllerService controllerService = mControllerServices.get(userId);
- if (controllerService == null) {
- controllerService = new RemoteRoleControllerService(userId, getContext());
- mControllerServices.put(userId, controllerService);
+ RoleControllerManager controller = mControllers.get(userId);
+ if (controller == null) {
+ Context systemContext = getContext();
+ Context context;
+ try {
+ context = systemContext.createPackageContextAsUser(
+ systemContext.getPackageName(), 0, UserHandle.of(userId));
+ } catch (NameNotFoundException e) {
+ throw new RuntimeException(e);
+ }
+ controller = new RoleControllerManager(context, FgThread.getHandler());
+ mControllers.put(userId, controller);
}
- return controllerService;
+ return controller;
}
}
@@ -362,7 +372,7 @@
RoleUserState userState;
synchronized (mLock) {
listeners = mListeners.removeReturnOld(userId);
- mControllerServices.remove(userId);
+ mControllers.remove(userId);
userState = mUserStates.removeReturnOld(userId);
}
if (listeners != null) {
diff --git a/services/core/java/com/android/server/rollback/RollbackManagerServiceImpl.java b/services/core/java/com/android/server/rollback/RollbackManagerServiceImpl.java
index ffdfe57..871f9f8 100644
--- a/services/core/java/com/android/server/rollback/RollbackManagerServiceImpl.java
+++ b/services/core/java/com/android/server/rollback/RollbackManagerServiceImpl.java
@@ -535,6 +535,9 @@
DeviceConfig.Rollback.BOOT_NAMESPACE,
DeviceConfig.Rollback.ROLLBACK_LIFETIME_IN_MILLIS,
DEFAULT_ROLLBACK_LIFETIME_DURATION_MILLIS);
+ if (mRollbackLifetimeDurationInMillis < 0) {
+ mRollbackLifetimeDurationInMillis = DEFAULT_ROLLBACK_LIFETIME_DURATION_MILLIS;
+ }
}
void onBootCompleted() {
diff --git a/services/core/java/com/android/server/wm/ActivityStackSupervisor.java b/services/core/java/com/android/server/wm/ActivityStackSupervisor.java
index 1ae85b8..9a5ec2a 100644
--- a/services/core/java/com/android/server/wm/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/wm/ActivityStackSupervisor.java
@@ -450,10 +450,17 @@
}
void onSystemReady() {
- mPersisterQueue.startPersisting();
mLaunchParamsPersister.onSystemReady();
}
+ void onUserUnlocked(int userId) {
+ // Only start persisting when the first user is unlocked. The method call is
+ // idempotent so there is no side effect to call it again when the second user is
+ // unlocked.
+ mPersisterQueue.startPersisting();
+ mLaunchParamsPersister.onUnlockUser(userId);
+ }
+
public ActivityMetricsLogger getActivityMetricsLogger() {
return mActivityMetricsLogger;
}
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
index f100efc..794a4b8 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -954,7 +954,7 @@
@Override
public void onUnlockUser(int userId) {
synchronized (mService.getGlobalLock()) {
- mService.mStackSupervisor.mLaunchParamsPersister.onUnlockUser(userId);
+ mService.mStackSupervisor.onUserUnlocked(userId);
}
}
diff --git a/services/core/java/com/android/server/wm/PersisterQueue.java b/services/core/java/com/android/server/wm/PersisterQueue.java
index a17ee65..9dc3d6a 100644
--- a/services/core/java/com/android/server/wm/PersisterQueue.java
+++ b/services/core/java/com/android/server/wm/PersisterQueue.java
@@ -131,10 +131,8 @@
}
/**
- *
- * @param item
- * @param flush
- * @param <T>
+ * Updates the last item found in the queue that matches the given item, or adds it to the end
+ * of the queue if no such item is found.
*/
synchronized <T extends WriteQueueItem> void updateLastOrAddItem(T item, boolean flush) {
final T itemToUpdate = findLastItem(item::matches, (Class<T>) item.getClass());
@@ -149,10 +147,6 @@
/**
* Removes all items with which given predicate returns {@code true}.
- *
- * @param predicate the predicate
- * @param clazz
- * @param <T>
*/
synchronized <T extends WriteQueueItem> void removeItems(Predicate<T> predicate,
Class<T> clazz) {
diff --git a/services/core/java/com/android/server/wm/TaskPersister.java b/services/core/java/com/android/server/wm/TaskPersister.java
index d50af38..06bdcc0 100644
--- a/services/core/java/com/android/server/wm/TaskPersister.java
+++ b/services/core/java/com/android/server/wm/TaskPersister.java
@@ -492,16 +492,8 @@
return new File(userTaskIdsDir, PERSISTED_TASK_IDS_FILENAME);
}
- static File getUserTasksDir(int userId) {
- File userTasksDir = new File(Environment.getDataSystemCeDirectory(userId), TASKS_DIRNAME);
-
- if (!userTasksDir.exists()) {
- if (!userTasksDir.mkdir()) {
- Slog.e(TAG, "Failure creating tasks directory for user " + userId + ": "
- + userTasksDir);
- }
- }
- return userTasksDir;
+ private static File getUserTasksDir(int userId) {
+ return new File(Environment.getDataSystemCeDirectory(userId), TASKS_DIRNAME);
}
static File getUserImagesDir(int userId) {
@@ -568,8 +560,13 @@
FileOutputStream file = null;
AtomicFile atomicFile = null;
try {
- atomicFile = new AtomicFile(new File(
- getUserTasksDir(task.userId),
+ File userTasksDir = getUserTasksDir(task.userId);
+ if (!userTasksDir.isDirectory() && !userTasksDir.mkdirs()) {
+ Slog.e(TAG, "Failure creating tasks directory for user " + task.userId
+ + ": " + userTasksDir + " Dropping persistence for task " + task);
+ return;
+ }
+ atomicFile = new AtomicFile(new File(userTasksDir,
String.valueOf(task.taskId) + TASK_FILENAME_SUFFIX));
file = atomicFile.startWrite();
file.write(stringWriter.toString().getBytes());
diff --git a/telephony/java/android/provider/Telephony.java b/telephony/java/android/provider/Telephony.java
index 67477cf..3106e40 100644
--- a/telephony/java/android/provider/Telephony.java
+++ b/telephony/java/android/provider/Telephony.java
@@ -4372,24 +4372,24 @@
}
/**
- * Generates a content {@link Uri} used to receive updates on precise carrier identity
+ * Generates a content {@link Uri} used to receive updates on specific carrier identity
* change on the given subscriptionId returned by
- * {@link TelephonyManager#getSimPreciseCarrierId()}.
- * @see TelephonyManager#ACTION_SUBSCRIPTION_PRECISE_CARRIER_IDENTITY_CHANGED
+ * {@link TelephonyManager#getSimSpecificCarrierId()}.
+ * @see TelephonyManager#ACTION_SUBSCRIPTION_SPECIFIC_CARRIER_IDENTITY_CHANGED
* <p>
* Use this {@link Uri} with a {@link ContentObserver} to be notified of changes to the
- * precise carrier identity {@link TelephonyManager#getSimPreciseCarrierId()}
+ * specific carrier identity {@link TelephonyManager#getSimSpecificCarrierId()}
* while your app is running. You can also use a {@link JobService} to ensure your app
* is notified of changes to the {@link Uri} even when it is not running.
* Note, however, that using a {@link JobService} does not guarantee timely delivery of
* updates to the {@link Uri}.
*
* @param subscriptionId the subscriptionId to receive updates on
- * @return the Uri used to observe precise carrier identity changes
+ * @return the Uri used to observe specific carrier identity changes
*/
@NonNull
- public static Uri getPreciseCarrierIdUriForSubscriptionId(int subscriptionId) {
- return Uri.withAppendedPath(Uri.withAppendedPath(CONTENT_URI, "precise"),
+ public static Uri getSpecificCarrierIdUriForSubscriptionId(int subscriptionId) {
+ return Uri.withAppendedPath(Uri.withAppendedPath(CONTENT_URI, "specific"),
String.valueOf(subscriptionId));
}
@@ -4409,26 +4409,30 @@
/**
* A fine-grained carrier id.
- * @see TelephonyManager#getSimPreciseCarrierId()
+ * The specific carrier ID would be used for configuration purposes, but apps wishing to
+ * know about the carrier itself should use the regular carrier ID returned by
+ * {@link TelephonyManager#getSimCarrierId()}.
+ *
+ * @see TelephonyManager#getSimSpecificCarrierId()
* This is not a database column, only used to notify content observers for
- * {@link #getPreciseCarrierIdUriForSubscriptionId(int)}
+ * {@link #getSpecificCarrierIdUriForSubscriptionId(int)}
*/
- public static final String PRECISE_CARRIER_ID = "precise_carrier_id";
+ public static final String SPECIFIC_CARRIER_ID = "specific_carrier_id";
/**
- * A user facing carrier name for precise carrier id {@link #PRECISE_CARRIER_ID}.
- * @see TelephonyManager#getSimPreciseCarrierIdName()
+ * A user facing carrier name for specific carrier id {@link #SPECIFIC_CARRIER_ID}.
+ * @see TelephonyManager#getSimSpecificCarrierIdName()
* This is not a database column, only used to notify content observers for
- * {@link #getPreciseCarrierIdUriForSubscriptionId(int)}
+ * {@link #getSpecificCarrierIdUriForSubscriptionId(int)}
*/
- public static final String PRECISE_CARRIER_ID_NAME = "precise_carrier_id_name";
+ public static final String SPECIFIC_CARRIER_ID_NAME = "specific_carrier_id_name";
/**
* A unique parent carrier id. The parent-child
* relationship can be used to further differentiate a single carrier by different networks,
- * by prepaid v.s. postpaid or even by 4G v.s. 3G plan. It's an optional field.
- * A carrier id with a valid parent_carrier_id is considered fine-grained carrier id, will
- * not be returned as {@link #CARRIER_ID} but {@link #PRECISE_CARRIER_ID}.
+ * by prepaid v.s. postpaid. It's an optional field.
+ * A carrier id with a valid parent_carrier_id is considered fine-grained specific carrier
+ * ID, will not be returned as {@link #CARRIER_ID} but {@link #SPECIFIC_CARRIER_ID}.
* <P>Type: INTEGER </P>
* @hide
*/
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index d680b89..511b278 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -71,10 +71,10 @@
* one is available for the slot index. An optional int extra
* {@link TelephonyManager#EXTRA_CARRIER_ID} is included to indicate the carrier id for the
* changed carrier configuration. An optional int extra
- * {@link TelephonyManager#EXTRA_PRECISE_CARRIER_ID} is included to indicate the precise
+ * {@link TelephonyManager#EXTRA_SPECIFIC_CARRIER_ID} is included to indicate the precise
* carrier id for the changed carrier configuration.
* @see TelephonyManager#getSimCarrierId()
- * @see TelephonyManager#getSimPreciseCarrierId()
+ * @see TelephonyManager#getSimSpecificCarrierId()
*/
public static final String
ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED";
@@ -2633,6 +2633,13 @@
public static final String KEY_CDMA_ENHANCED_ROAMING_INDICATOR_FOR_HOME_NETWORK_INT_ARRAY =
"cdma_enhanced_roaming_indicator_for_home_network_int_array";
+ /**
+ * Indicates use 3GPP application to replace 3GPP2 application even if it's a CDMA/CDMA-LTE
+ * phone, becasue some carriers's CSIM application is present but not supported.
+ * @hide
+ */
+ public static final String KEY_USE_USIM_BOOL = "use_usim_bool";
+
/** The default value for every variable. */
private final static PersistableBundle sDefaults;
@@ -3017,6 +3024,7 @@
1 /* Roaming Indicator Off */
});
sDefaults.putStringArray(KEY_EMERGENCY_NUMBER_PREFIX_STRING_ARRAY, new String[0]);
+ sDefaults.putBoolean(KEY_USE_USIM_BOOL, false);
}
/**
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 7954d0e..dd58f31 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -1248,30 +1248,34 @@
public static final String EXTRA_CARRIER_NAME = "android.telephony.extra.CARRIER_NAME";
/**
- * Broadcast Action: The subscription precise carrier identity has changed.
- * The precise carrier id can be used to further differentiate a carrier by different
- * networks, by prepaid v.s.postpaid or even by 4G v.s.3G plan. Each carrier has a unique
- * carrier id returned by {@link #getSimCarrierId()} but could have multiple precise carrier id.
- * e.g, {@link #getSimCarrierId()} will always return Tracfone (id 2022) for a Tracfone SIM,
- * while {@link #getSimPreciseCarrierId()} can return Tracfone AT&T or Tracfone T-Mobile based
- * on the current subscription IMSI. For carriers without any fine-grained ids, precise carrier
- * id is same as carrier id.
+ * Broadcast Action: The subscription specific carrier identity has changed.
+ *
+ * A specific carrier ID returns the fine-grained carrier ID of the current subscription.
+ * It can represent the fact that a carrier may be in effect an aggregation of other carriers
+ * (ie in an MVNO type scenario) where each of these specific carriers which are used to make
+ * up the actual carrier service may have different carrier configurations.
+ * A specific carrier ID could also be used, for example, in a scenario where a carrier requires
+ * different carrier configuration for different service offering such as a prepaid plan.
+ *
+ * the specific carrier ID would be used for configuration purposes, but apps wishing to know
+ * about the carrier itself should use the regular carrier ID returned by
+ * {@link #getSimCarrierId()}.
*
* <p>Similar like {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED}, this intent will be
* sent on the event of {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} while its also
* possible to be sent without {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} when
- * precise carrier id changes with the same carrier id.
+ * specific carrier ID changes while carrier ID remains the same.
* e.g, the same subscription switches to different IMSI could potentially change its
- * precise carrier id while carrier id remains the same.
- * @see #getSimPreciseCarrierId()
+ * specific carrier ID while carrier id remains the same.
+ * @see #getSimSpecificCarrierId()
* @see #getSimCarrierId()
*
* The intent will have the following extra values:
* <ul>
- * <li>{@link #EXTRA_PRECISE_CARRIER_ID} The up-to-date precise carrier id of the
+ * <li>{@link #EXTRA_SPECIFIC_CARRIER_ID} The up-to-date specific carrier id of the
* current subscription.
* </li>
- * <li>{@link #EXTRA_PRECISE_CARRIER_NAME} The up-to-date name of the precise carrier id.
+ * <li>{@link #EXTRA_SPECIFIC_CARRIER_NAME} The up-to-date name of the specific carrier id.
* </li>
* <li>{@link #EXTRA_SUBSCRIPTION_ID} The subscription id associated with the changed carrier
* identity.
@@ -1280,30 +1284,30 @@
* <p class="note">This is a protected intent that can only be sent by the system.
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
- public static final String ACTION_SUBSCRIPTION_PRECISE_CARRIER_IDENTITY_CHANGED =
- "android.telephony.action.SUBSCRIPTION_PRECISE_CARRIER_IDENTITY_CHANGED";
+ public static final String ACTION_SUBSCRIPTION_SPECIFIC_CARRIER_IDENTITY_CHANGED =
+ "android.telephony.action.SUBSCRIPTION_SPECIFIC_CARRIER_IDENTITY_CHANGED";
/**
- * An int extra used with {@link #ACTION_SUBSCRIPTION_PRECISE_CARRIER_IDENTITY_CHANGED} which
- * indicates the updated precise carrier id returned by
- * {@link TelephonyManager#getSimPreciseCarrierId()}. Note, its possible precise carrier id
+ * An int extra used with {@link #ACTION_SUBSCRIPTION_SPECIFIC_CARRIER_IDENTITY_CHANGED} which
+ * indicates the updated specific carrier id returned by
+ * {@link TelephonyManager#getSimSpecificCarrierId()}. Note, its possible specific carrier id
* changes while {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} remains the same
* e.g, when subscription switch to different IMSIs.
* <p>Will be {@link TelephonyManager#UNKNOWN_CARRIER_ID} if the subscription is unavailable or
* the carrier cannot be identified.
*/
- public static final String EXTRA_PRECISE_CARRIER_ID =
- "android.telephony.extra.PRECISE_CARRIER_ID";
+ public static final String EXTRA_SPECIFIC_CARRIER_ID =
+ "android.telephony.extra.SPECIFIC_CARRIER_ID";
/**
- * An string extra used with {@link #ACTION_SUBSCRIPTION_PRECISE_CARRIER_IDENTITY_CHANGED} which
- * indicates the updated precise carrier name returned by
- * {@link TelephonyManager#getSimPreciseCarrierIdName()}.
- * <p>it's a user-facing name of the precise carrier id {@link #EXTRA_PRECISE_CARRIER_ID}, e.g,
- * Tracfone-AT&T.
+ * An string extra used with {@link #ACTION_SUBSCRIPTION_SPECIFIC_CARRIER_IDENTITY_CHANGED}
+ * which indicates the updated specific carrier name returned by
+ * {@link TelephonyManager#getSimSpecificCarrierIdName()}.
+ * <p>it's a user-facing name of the specific carrier id {@link #EXTRA_SPECIFIC_CARRIER_ID}
+ * e.g, Tracfone-AT&T
*/
- public static final String EXTRA_PRECISE_CARRIER_NAME =
- "android.telephony.extra.PRECISE_CARRIER_NAME";
+ public static final String EXTRA_SPECIFIC_CARRIER_NAME =
+ "android.telephony.extra.SPECIFIC_CARRIER_NAME";
/**
* An int extra used with {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} to indicate the
@@ -8940,17 +8944,23 @@
}
/**
- * Returns fine-grained carrier id of the current subscription.
+ * Returns fine-grained carrier ID of the current subscription.
*
- * <p>The precise carrier id can be used to further differentiate a carrier by different
- * networks, by prepaid v.s.postpaid or even by 4G v.s.3G plan. Each carrier has a unique
- * carrier id returned by {@link #getSimCarrierId()} but could have multiple precise carrier id.
- * e.g, {@link #getSimCarrierId()} will always return Tracfone (id 2022) for a Tracfone SIM,
- * while {@link #getSimPreciseCarrierId()} can return Tracfone AT&T or Tracfone T-Mobile based
- * on the current subscription IMSI.
+ * A specific carrier ID can represent the fact that a carrier may be in effect an aggregation
+ * of other carriers (ie in an MVNO type scenario) where each of these specific carriers which
+ * are used to make up the actual carrier service may have different carrier configurations.
+ * A specific carrier ID could also be used, for example, in a scenario where a carrier requires
+ * different carrier configuration for different service offering such as a prepaid plan.
*
- * <p>For carriers without any fine-grained carrier ids, return {@link #getSimCarrierId()}
- * <p>Precise carrier ids are defined in the same way as carrier id
+ * the specific carrier ID would be used for configuration purposes, but apps wishing to know
+ * about the carrier itself should use the regular carrier ID returned by
+ * {@link #getSimCarrierId()}.
+ *
+ * e.g, Tracfone SIMs could return different specific carrier ID based on IMSI from current
+ * subscription while carrier ID remains the same.
+ *
+ * <p>For carriers without fine-grained specific carrier ids, return {@link #getSimCarrierId()}
+ * <p>Specific carrier ids are defined in the same way as carrier id
* <a href="https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/master/assets/carrier_list.textpb">here</a>
* except each with a "parent" id linking to its top-level carrier id.
*
@@ -8958,11 +8968,11 @@
* Return {@link #UNKNOWN_CARRIER_ID} if the subscription is unavailable or the carrier cannot
* be identified.
*/
- public int getSimPreciseCarrierId() {
+ public int getSimSpecificCarrierId() {
try {
ITelephony service = getITelephony();
if (service != null) {
- return service.getSubscriptionPreciseCarrierId(getSubId());
+ return service.getSubscriptionSpecificCarrierId(getSubId());
}
} catch (RemoteException ex) {
// This could happen if binder process crashes.
@@ -8972,18 +8982,22 @@
/**
* Similar like {@link #getSimCarrierIdName()}, returns user-facing name of the
- * precise carrier id returned by {@link #getSimPreciseCarrierId()}.
+ * specific carrier id returned by {@link #getSimSpecificCarrierId()}.
+ *
+ * The specific carrier ID would be used for configuration purposes, but apps wishing to know
+ * about the carrier itself should use the regular carrier ID returned by
+ * {@link #getSimCarrierIdName()}.
*
* <p>The returned name is unlocalized.
*
- * @return user-facing name of the subscription precise carrier id. Return {@code null} if the
+ * @return user-facing name of the subscription specific carrier id. Return {@code null} if the
* subscription is unavailable or the carrier cannot be identified.
*/
- public @Nullable CharSequence getSimPreciseCarrierIdName() {
+ public @Nullable CharSequence getSimSpecificCarrierIdName() {
try {
ITelephony service = getITelephony();
if (service != null) {
- return service.getSubscriptionPreciseCarrierName(getSubId());
+ return service.getSubscriptionSpecificCarrierName(getSubId());
}
} catch (RemoteException ex) {
// This could happen if binder process crashes.
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index b90194a..c6fa22b 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -1369,7 +1369,7 @@
/**
* Returns fine-grained carrier id of the current subscription.
*
- * <p>The precise carrier id can be used to further differentiate a carrier by different
+ * <p>The specific carrier id can be used to further differentiate a carrier by different
* networks, by prepaid v.s.postpaid or even by 4G v.s.3G plan. Each carrier has a unique
* carrier id {@link #getSimCarrierId()} but can have multiple precise carrier id. e.g,
* {@link #getSimCarrierId()} will always return Tracfone (id 2022) for a Tracfone SIM, while
@@ -1383,19 +1383,19 @@
* be identified.
* @hide
*/
- int getSubscriptionPreciseCarrierId(int subId);
+ int getSubscriptionSpecificCarrierId(int subId);
/**
* Similar like {@link #getSimCarrierIdName()}, returns user-facing name of the
- * precise carrier id {@link #getSimPreciseCarrierId()}
+ * specific carrier id {@link #getSimSpecificCarrierId()}
*
* <p>The returned name is unlocalized.
*
- * @return user-facing name of the subscription precise carrier id. Return {@code null} if the
+ * @return user-facing name of the subscription specific carrier id. Return {@code null} if the
* subscription is unavailable or the carrier cannot be identified.
* @hide
*/
- String getSubscriptionPreciseCarrierName(int subId);
+ String getSubscriptionSpecificCarrierName(int subId);
/**
* Returns carrier id based on MCCMNC only. This will return a MNO carrier id used for fallback